README 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. Stuff appears to work, but it's obviously not well tested. I fully
  2. expect several iterations before things are correct!! Make sure you
  3. can back this out quickly.
  4. This code supports UTF encoding. Directory dpost.utf is a version that
  5. reads UTF encoded files. Directory dpost is DWB 3.3 source and should be
  6. close to what you're currently using. Main source code changes were in
  7. dpost.utf (files font.h, font.c, and dpost.c). Select either dpost or
  8. dpost.utf in TARGETS in postscript.mk. Both build and install a program
  9. called dpost!!
  10. dpost.utf is more general and includes code that lets it read either
  11. format. Only catch is troff must tell it (with x E UTF) that the file
  12. is UTF and troff currently doesn't output encoding info, so you're
  13. stuck with two post-processors!
  14. Added common/rune.h and common/rune.c so code can be compiled elsewere.
  15. Both files are only used by dpost. Remove RUNELIB in commmon/rune.h if
  16. fullrune(), chartorune(), and runetochar() are available on your system.
  17. You will also need to set READING in common/gen.h. It controls how dpost
  18. (from dpost.utf) reads troff output. It should be UTFENCODING on Plan 9
  19. and ONEBYTE elsewhere. If troff includes encoding hint (x E UTF) then
  20. READING selects the default which sould be ONEBYTE.
  21. Leave WRITING (in common/gen.h) set to ONEBYTE. It only controls dpost
  22. output and dpost (right now) does not work 100% with UTF.enc. Fix should
  23. be easy, but I don't have time now.
  24. Other translators passed bytes through so only needed slightly modified
  25. proglogues and a new encoding scheme (psencoding/UTF.enc). It works for
  26. Latin1, but still needs a bit more attention. Prologue changes were easy
  27. and only involved adding lines like,
  28. /show {show} bind def
  29. /stringwidth {stringwidth} bind def
  30. Guarantees text procedures used in prologues aren't operators and can be
  31. successfully redefined in UTF.enc. Unbinding means a small but probably
  32. not noticeable speed penalty. You may not want to include those changes
  33. on other system.
  34. -------------
  35. Major Changes
  36. -------------
  37. See the VERSION file.
  38. -------------------
  39. Tuning The Makefile
  40. -------------------
  41. Source files, man pages, and low level makefiles can all be updated
  42. to reflect settings in postscript.mk in one simple step (described
  43. later). In most cases you only need to edit file postscript.mk.
  44. First save a copy of file postscript.mk. Then adjust the following
  45. definitions in file postscript.mk:
  46. SYSTEM best match for your version of Unix. Current choices for
  47. SYSTEM are:
  48. SYSV - System V
  49. V9 - Ninth Edition
  50. BSD4_2 - Berkeley (eg. Sun)
  51. Controls conditional compilation in a few places.
  52. GROUP group assigned to all installed files
  53. OWNER owner of everything that's installed
  54. BINDIR dpost and picpack go here. All other programs go in POSTBIN.
  55. BINDIR must already exist - it will not be created during an
  56. install.
  57. HOSTDIR hostresident font directory for PostScript printers. Only
  58. used in the font download program.
  59. FONTDIR width table directory - for troff and most postprocessors
  60. MAN1DIR command manpages. A command and its manpage are installed
  61. together - there's no easy way to avoid it. Setting MAN1DIR
  62. to an existing temporary directory (e.g. /tmp) means an
  63. install will work but manpages won't go anywhere permanent.
  64. MAN1DIR must already exist - it will not be created during
  65. an install.
  66. POSTBIN where most PostScript support programs go. dpost and picpack
  67. the exceptions.
  68. POSTLIB prologues and miscellaneous PostScript files. Primarily for
  69. the programs that live in POSTBIN.
  70. CFLGS common compiler options - used to build CFLAGS in the low
  71. level makefiles. CLFGS and LDFLGS are best set on the make
  72. command line.
  73. LDFLGS common link editor options - used to build LDFLAGS in the
  74. low level makefiles. LDFLGS and CFLGS are best set on the
  75. make command line.
  76. DKHOST set it to TRUE to compile the DKHOST Datakit support code
  77. in postio. Temporarily resets SYSTEM to SYSV if DKHOST is
  78. TRUE and SYSTEM is BSD4_2. Ignored if SYSTEM is not SYSV
  79. or BSD4_2.
  80. DKSTREAMS enables streams based DKHOST support in postio when DKHOST
  81. is TRUE and SYSTEM is SYSV or BSD4_2. Choices are TRUE,
  82. FALSE, or a stream module name (e.g. dknetty or dkty). TRUE
  83. selects dknetty. Newer systems may expect dkty.
  84. ROUNDPAGE must only be set to TRUE or FALSE. TRUE means PostScript
  85. translators include code that maps clipping path dimensions
  86. into known paper sizes.
  87. TARGETS the default list of what's built by make. Each target must
  88. be the name of a source directory. A target that names a
  89. non-existent source directory is ignored. Setting TARGETS
  90. on the make command line overrides the default list.
  91. -------------------
  92. Updating The Source
  93. -------------------
  94. Whenever file postscript.mk changes you should update source files,
  95. man pages, and low level makefiles by typing,
  96. make -f postscript.mk changes
  97. ------------------------
  98. More System Dependencies
  99. ------------------------
  100. The package has been compiled and tested on System V and Ninth Edition
  101. Unix Systems and on Sun workstations. Most differences are handled via
  102. the SYSTEM definition in postscript.mk. Problems that remain are:
  103. SYSV - System V
  104. Use the native compiler if you're on an internal System V UTS
  105. machine.
  106. V9 - Ninth or Tenth Edition
  107. chown is in /etc and chgrp no longer exists - it's been folded into
  108. the chown command. You may be forced to build a simple chgrp shell
  109. script (put it in your bin) that calls chown. If you're not superuser
  110. set OWNER to your login name and GROUP to your group id.
  111. BSD4_2 - Sun Workstations
  112. Use the Bourne shell. chown is should be in /usr/etc. Add /usr/etc
  113. to your PATH and export PATH. If you're not superuser set OWNER to
  114. your login name and GROUP to your group id.
  115. ----------------------
  116. Installing The Package
  117. ----------------------
  118. To build (but not install) the default package (i.e. everything named by
  119. TARGETS in postscript.mk) type,
  120. make -f postscript.mk all
  121. To build and install the package type,
  122. make -f postscript.mk all install
  123. After the package is installed use,
  124. make -f postscript.mk clobber
  125. to delete binary files and compiled programs from the source directories.
  126. To select part of the package define TARGETS on the command line. For
  127. example,
  128. make -f postscript.mk TARGETS="dpost devpost" all install
  129. builds and installs dpost and the PostScript font tables. Quotes hide
  130. white space from the shell.