mkhelpw.red 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. % This file runs the "*.tex" to "redhelp.rtf" conversion code in CSL.
  2. % As well as providing the top level direction to the process it patches
  3. % up for at least some of the places where the conversion code had been
  4. % written in a manner not strongly related to the portability objectives
  5. % of Standard Lisp...
  6. symbolic;
  7. off echo;
  8. on backtrace;
  9. on comp;
  10. !*windows := t;
  11. fluid '(package);
  12. package := 'redhelp;
  13. symbolic procedure inf x;
  14. char!-code x;
  15. symbolic procedure channellinelength(f, l);
  16. begin
  17. f := wrs f;
  18. l := linelength l;
  19. wrs f;
  20. return l
  21. end;
  22. symbolic procedure channelprin2(f, x);
  23. begin
  24. f := wrs f;
  25. prin2 x;
  26. wrs f;
  27. return x
  28. end;
  29. symbolic macro procedure channelprintf u;
  30. begin
  31. scalar g;
  32. g := gensym();
  33. return list('prog, list g,
  34. list('setq, g, list('wrs, cadr u)),
  35. 'printf . cddr u,
  36. list('wrs, g))
  37. end;
  38. symbolic procedure channelterpri f;
  39. begin
  40. f := wrs f;
  41. terpri();
  42. wrs f;
  43. end;
  44. symbolic procedure channelreadch f;
  45. begin
  46. scalar c;
  47. f := rds f;
  48. c := readch();
  49. rds f;
  50. return c
  51. end;
  52. in "comphelp.red"$
  53. in "helpwin.red"$
  54. in "minitex.red"$
  55. dir_src := "$reduce/doc/help/";
  56. job(bldmsg("%w.tex",package),"null.fil");
  57. delete!-file "null.fil";
  58. job(bldmsg("%w.tex",package),bldmsg("%w.rtf",package));
  59. bye;