-% $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
% 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.
%
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);
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)) {
}
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");
}
}