![]() |
HylaFAX-4.1.4, whfc 1.0.9. The aim is to have just 1 faxcover template working both with faxcover and whfc. BreakIntoLines as it is documented in man page does not work with WHFC due to WHFC putting an old form of BreakIntoLine into the %prolog%. I tried http://www.hylafax.org/archive/2000-04/msg00157.php but it doesn't work, because I get weird chars in place of <cr> and lose forced new lines. I then copied all stuff faxcover puts into %prolog% but the var definitions in my cover template just before the BreakIntoLine call, so that the old defs used by WHFC are superceded by the updated ones. This works ok for automatically truncated lines, but not perfectly when user forces new line (using ENTER in comments box), see below. WHFC has a switch "Use old coversheet format" that, for the purpose of BreakIntoLines, has this behavior: [ I use <cr> and <lf> for clarity, the file has the actual chars ] a) default, new format (<lf> are replaced by a space): /comments (line1.<cr><space>line2.<cr><space>line3.<cr><space>line4.) def final result is line1. <space>line2. <space>line3. <space>line4. b) old format (the above def gets un-defined, so that another def is in effect which has raw comments with <cr><lf>): /comments (line1.<cr><lf>line2.<cr><lf>line3.<cr><lf>line4.) final results is line1. <empty line> line2. <empty line> line3. <empty line> line4. Can anyone proficient in postscript suggest the postscript code (to be put before BreakIntoLines in my template) to do a substitution inside the "comments" variable: 1) change all <cr><space> occurrences into <cr>. This would make "new format" work. 2) delete all the <cr> occurences. This would make "old format" work. The whfc code is gpl so that you could tell me "change the code and make it chage <cr> into space (instead of <lf> into space as it does)" s = Replace(stdsettings.Comments,'\n',' '); fprintf(filepr,"/comments (%s) %s\n",s,def); the problem is I don't have win development system :) Thanks. -- giulioo@pobox.com ____________________ HylaFAX(tm) Users Mailing List _______________________ To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi On UNIX: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null *To learn about commercial HylaFAX(tm) support, mail sales@hylafax.org.*