+2005-03-31 19:39 Jochen Striepe
+
+ * contrib/t-prot.sl: Use S-Lang calls popen(), fputs(), and
+ remove() instead of system() and pipe_article() to reduce
+ flickering (and for cleaner code). Patch by Gregor Herrman, many
+ thanks!
+
+2005-03-31 19:20 Jochen Striepe
+
+ * contrib/t-prot.sl: Mention mimedecode as filter for Quoted
+ Printable. Thanks to Gregor Herrmann.
+
+2005-03-31 19:17 Jochen Striepe
+
+ * contrib/t-prot.sl: Change key bindings: ESC-0 and ESC-1 are
+ prefixes for other commands, so we should not overwrite those.
+ Patch by Gregor Herrmann, many thanks!
+
2005-03-24 22:24 Jochen Striepe
* t-prot: Release as v1.99.
-% $Id: t-prot.sl,v 1.11 2005/01/07 18:15:36 jochen Exp $
+% $Id: t-prot.sl,v 1.14 2005/03/31 19:39:08 jochen Exp $
% Copyright (c) 2003 Jochen Striepe <t-prot@tolot.escape.de>
%
% This file is provided as an example implemention for articles to be
% variable t_prot_qp = "";
% into ~/.slrn/t-prot-cfg and add
% interpret .slrn/t-prot-cfg
-% to your ~/.slrnrc (after 'interpret t-prot.sl'). However, please keep
-% in mind that the path of the temp directory should NOT be readable to
-% other users -- otherwise it might reveal information on what you read,
-% and probably even be a security hole.
-% Please see t-prot's man page for details on command line parameters.
+% to your ~/.slrnrc (after 'interpret t-prot.sl'). If "mimedecode" is
+% installed on your system you might want to use
+% variable t_prot_qp = "mimedecode";
+% You can get mimedecode at
+% http://packages.debian.org/stable/mail/mimedecode.html
+%
+% However, please keep in mind that the path of the temp directory should
+% NOT be readable to other users -- otherwise it might reveal information on
+% what you read, and probably even be a security hole. Please see t-prot's
+% man page for details on command line parameters.
%
% If you want to toggle t-prot filtering on/off without leaving slrn,
% you may want to add something like
-% setkey article register_t_prot "\e1"
-% setkey article unregister_t_prot "\e0"
-% to your ~/.slrnrc -- press ESC-1 to activate t-prot filtering, and
-% ESC-0 to disable it (this will take effect on the next article you
+% setkey article register_t_prot "\e6"
+% setkey article unregister_t_prot "\e7"
+% to your ~/.slrnrc -- press ESC-6 to activate t-prot filtering, and
+% ESC-7 to disable it (this will take effect on the next article you
% read, see the package's TODO file).
%
% Requirements/Bugs: tr(1) and rm(1) are POSIX and should be available
if (t_prot_qp != "") { qp = t_prot_qp+"|"; } else { qp = ""; }
- pipe_article (qp+"t-prot "+t_prot_params+" >"+fname);
+
+ f = popen (qp+"t-prot "+t_prot_params+" >"+fname, "w");
+ if (f == NULL) {
+ error ("Unable to filter article to "+fname);
+ return;
+ }
+ () = fputs (article_as_string(), f);
+ () = pclose (f);
+
f = fopen (fname, "r");
if (f == NULL) {
}
fclose (f);
- % The removal of the tmp file works this way but should be made a
- % little more reliable. Any ideas?
- system ("rm -f "+fname);
+ if (0 != remove(fname)) error ("Unable to remove "+fname);
+
replace_article (art);
}