X-Git-Url: https://git.deb.at/w?p=pkg%2Ft-prot.git;a=blobdiff_plain;f=contrib%2Ft-prot.sl;h=597f2f17096d2ff6211dfe7035675188236908b1;hp=422b554a8f7ef1c57e1904139533b128d37bc7cc;hb=8dcc3a169e9d9c0186282e0ff4f002262e468ff4;hpb=d291c240515f15a9bb267aa00a60cd4b6e2a4634 diff --git a/contrib/t-prot.sl b/contrib/t-prot.sl index 422b554..597f2f1 100644 --- a/contrib/t-prot.sl +++ b/contrib/t-prot.sl @@ -1,4 +1,4 @@ -% $Id: t-prot.sl,v 1.18 2010/02/19 16:21:14 jochen Exp $ +% $Id: t-prot.sl,v 1.20 2012/02/07 11:19:57 jochen Exp $ % Copyright (c) 2003-2005 Jochen Striepe % % This file is provided as an example implemention for articles to be @@ -40,8 +40,7 @@ % on any Unix-like system, mktemp(1) should be available on any recent % OpenBSD or Debian Linux system -- you can get the sources there % if your system happens to lack this program. This macro has been -% tested with slrn-0.9.7.4 to slrn-0.9.8.0 and S-Lang v1.4.5, it might -% fail with other versions (and will definitely fail with S-Lang v2.x). +% written for S-Lang v2.x (and will definitely fail with S-Lang v1.x). % As always, bug reports, patches (preferrably in unified diff format), % comments and suggestions are welcome. % @@ -72,7 +71,7 @@ define t_prot () { f = popen (qp+"t-prot "+t_prot_params+" >"+fname, "w"); if (f == NULL) { - error ("Unable to filter article to "+fname); + message ("Unable to filter article to "+fname); return; } () = fputs (article_as_string(), f); @@ -81,7 +80,7 @@ define t_prot () { f = fopen (fname, "r"); if (f == NULL) { - error (fname+" could not be opened."); + message (fname+" could not be opened."); return; } while (-1 != fgets (&line, f)) { @@ -89,26 +88,26 @@ define t_prot () { } fclose (f); - if (0 != remove(fname)) error ("Unable to remove "+fname); + if (0 != remove(fname)) message ("Unable to remove "+fname); replace_article (art); } define register_t_prot () { if (1 == register_hook("read_article_hook", "t_prot")) { - error("t-prot filtering activated"); + message ("t-prot filtering activated"); } else { - error("t-prot filtering NOT activated"); + message ("t-prot filtering NOT activated"); } } define unregister_t_prot () { if (1 == unregister_hook("read_article_hook", "t_prot")) { - error("t-prot filtering deactivated"); + message ("t-prot filtering deactivated"); } else { - error("t-prot filtering NOT deactivated"); + message ("t-prot filtering NOT deactivated"); } }