]> git.deb.at Git - pkg/t-prot.git/blobdiff - contrib/t-prot.sl
Imported Upstream version 3.0
[pkg/t-prot.git] / contrib / t-prot.sl
index 422b554a8f7ef1c57e1904139533b128d37bc7cc..597f2f17096d2ff6211dfe7035675188236908b1 100644 (file)
@@ -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 <t-prot@tolot.escape.de>
 %
 % This file is provided as an example implemention for articles to be
 % Copyright (c) 2003-2005 Jochen Striepe <t-prot@tolot.escape.de>
 %
 % 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
 % 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.
 %
 % 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) {
 
        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);
                return;
        }
        () = fputs (article_as_string(), f);
@@ -81,7 +80,7 @@ define t_prot () {
 
        f = fopen (fname, "r");
        if (f == NULL) {
 
        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)) {
                return;
        }
        while (-1 != fgets (&line, f)) {
@@ -89,26 +88,26 @@ define t_prot () {
        }
        fclose (f);
 
        }
        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")) {
 
        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 {
        }
        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")) {
        }
 }
 
 define unregister_t_prot () {
        if (1 == unregister_hook("read_article_hook", "t_prot")) {
-               error("t-prot filtering deactivated");
+               message ("t-prot filtering deactivated");
        }
        else {
        }
        else {
-               error("t-prot filtering NOT deactivated");
+               message ("t-prot filtering NOT deactivated");
        }
 }
 
        }
 }