home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / unixtex-6.1b-src.tgz / tar.out / contrib / unixtex / web2c / PROBLEMS < prev    next >
Text File  |  1996-09-28  |  12KB  |  371 lines

  1. Some generic problems you might encounter (for other machine-specific
  2. problems, see MACHINES):
  3.  
  4. * Question: I know all about slow starting TeX :-).
  5.   How do I organize the directory scheme to avoid the slowness, while at
  6.   the same time enjoying a structured inputs directory?
  7.  
  8. The answer has been moved to the Kpathsea manual, in the section
  9. `Subdirectory problems', so I don't have to keep it in two places.
  10. Please read that.
  11.  
  12.  
  13. * If you run out of memory space making plain.fmt, because memsize=3000,
  14.   somehow the trip constants have persisted. make clean-triptrap and
  15.   make again.
  16.  
  17.  
  18. * wchar_t is the source of endless problems compiling x11[-Xt].c. See
  19.   xdvi.h in my xdvik distribution for all the details; I'm not going to
  20.   repeat all that here. You can try defining NO_FOIL_X_WCHAR_T.
  21.  
  22. * For DOS, you may have to change the definitions of WORDS_BIGENDIAN and
  23.   DOS in lib/c-auto.h.  Here are some additional notes:
  24.   
  25. From: Richard Mansfield <melvin@math.psu.edu>
  26. Date: Mon, 9 Nov 92 14:24:10 -0500
  27.  
  28. Make the changes in site.h. I don't know if I got the default
  29. directories to work. TEXPOOL seemed to work fine (using /), but I had trouble
  30. with TEXINPUTS. After minimal attempts to get it right, I punted
  31. and decided to use environmental variables. In the variables I use 
  32. \ and ; as a separator as in DOS. Thinking about in some more as I write
  33. this, my troubles could have been caused by not correctly reading tex.pool
  34. although I don't know.  
  35.  
  36. My method for getting the source files was to do
  37. make TeX > tex.log
  38. on the SUN and then editing tex.log to become tex.bat. I then carried
  39. the .c and .h files home on a floppy and compiled them at home.
  40.  
  41. DOS gcc does have yacc and bison, but I did not use them.
  42.  
  43. If you want to see my exact set up. ftp to ftp.math.psu.edu,
  44. look in directory pub/melvin/pctex and get the files read.me
  45. and tex.zip.
  46.  
  47. * GNU sed 1.06 cannot handle the sed script in mf/convert; neither can
  48.   1.07.  1.08 and later fix it.
  49.  
  50. * Likewise, sed on a 386/bsd machine can't handle it, according to
  51.   bsd@yrloc.ipsa.reuter.com.
  52.   
  53. * GNU Make 3.57 does not pass arguments to shell scripts (like convert),
  54. under system V.  3.56 does not have this problem, and neither do later
  55. versions.
  56.  
  57. * On an i386 machine, GNU C 1.36 does not compile tex5.c correctly when
  58. making a 32-bit TeX.  1.37 fixes this bug.
  59.  
  60. * On the AT&T 3b2, under System V release 3.2, cc thinks that
  61. eject_penalty (which is -1000, defined at line 3216), is a very large
  62. positive number.  oc@vmp.com is developing a port for the 3b2; he has
  63. contributed some (incomplete) patches; they are below.
  64.  
  65. * On a Sun 3 running 3.x, cc cannot compile mf2.c or mf4.c, because the
  66. preprocessor puts a # directive at the end of line 1811 (or
  67. thereabouts), instead of at the beginning.  You have to manually move
  68. it.
  69.  
  70. * On a Sun 386i running 4.0.1, cc cannot compile Metafont with -O, because it
  71. can't compile x = x + y correctly.  Don't use -O, or don't use cc. 
  72. (From morgan@ics.uci.edu.)
  73.  
  74. * Make loses heavily if you are using a networked filesystem, and the
  75.   server and the local machine have different times.  You might have
  76.   this problem if `initex' gets made twice, for instance.
  77.  
  78. * On a 386 machine running 386/ix, cc cannot compile itex.c, according
  79. to Reiner Petersen <reiner@db0tui62.bitnet>.  Here is an ed script to
  80. get around the problem (alternatively, you can get gcc, and compile with
  81. that):
  82.  
  83. :
  84. #       Reiner Petersen (reiner@coma.uucp)
  85. #       Technical University of Berlin
  86. #
  87. ed - $1 << end-of-edscript
  88. !echo change:
  89. /  register integer for_end; i = 1 ; for_end = 31 ; if ( i <= for_end) do
  90. +1,.+2p
  91. -2,.c
  92.   register integer for_end;
  93.    register char j;             /* 386/ix cc bug workaround  rp */
  94.    i = 1 ;
  95.    for_end = 31 ;
  96.    if ( i <= for_end) do 
  97.         j = i;
  98.         xchr [ j ] = chr ( i ) ;
  99.     
  100.     while ( i++ < for_end ) ; 
  101. .
  102. !echo to:
  103. -8,.p
  104. w $1
  105. end-of-edscript
  106.  
  107. If you want, you can put this into the pipeline in ./tex/convert.
  108.  
  109. * undump doesn't work under 386/ix.  Here is a diff to undump.SYS_V.c to
  110. fix this, again contributed by reiner:
  111. *** undump.SYS_V.c      Mon Apr 20 00:57:23 1987
  112. --- undump.c    Fri Aug 19 17:55:27 1988
  113. ***************
  114. *** 1,7 ****
  115.   /*
  116.    * undump - resurrect a core file into a running program.
  117.    *
  118. !  *    for UNIX System V on a 3Bx
  119.    *    that uses the Common Object File Format
  120.    *
  121.    * Author:
  122. --- 1,7 ----
  123.   /*
  124.    * undump - resurrect a core file into a running program.
  125.    *
  126. !  *    for UNIX System V on a 3Bx or Interactive 386/ix
  127.    *    that uses the Common Object File Format
  128.    *
  129.    * Author:
  130. ***************
  131. *** 9,14 ****
  132. --- 9,19 ----
  133.    *    New York University
  134.    *    Tue Mar  3 13:18:25 EST 1987
  135.    *
  136. +  * Additions for 386/ix:
  137. +  *    Reiner Petersen (reiner@coma.uucp)
  138. +  *    Technical University of Berlin
  139. +  *    Thu Aug 18 13:40:20 MET DST 1988
  140. +  *
  141.    * Adapted from:
  142.    *     Spencer Thomas's undump and the file unexec.c in GNU emacs
  143.    */
  144. ***************
  145. *** 15,22 ****
  146. --- 20,33 ----
  147.  
  148.   #include <sys/param.h>
  149.   #include <sys/types.h>
  150. +
  151. + #ifndef       ISC_386ix       /* not availible in ISC 386/ix */
  152. +
  153.   #include <sys/psw.h>
  154.   #include <sys/pcb.h>
  155. +
  156. + #endif        /* ISC_386ix */
  157. +
  158.   #include <sys/signal.h>
  159.   #include <sys/fs/s5dir.h>
  160.   #include <sys/user.h>
  161. ***************
  162. *** 37,46 ****
  163. --- 48,66 ----
  164.   struct scnhdr dsc;
  165.   struct scnhdr bsc;
  166.  
  167. + #ifdef        ISC_386ix
  168. + struct scnhdr csc;            /* Comment section used by ISC 386/ix */
  169. + #endif        /* ISC_386ix */
  170. +
  171.   long bias;
  172.   long lnnoptr;
  173.   long text_scnptr;
  174.   long data_scnptr;
  175. +
  176. + #ifdef        ISC_386ix
  177. + long comment_scnptr;
  178. + #endif        /* ISC_386ix */
  179. +
  180.   long symlocptr;
  181.  
  182.   main(argc, argv)
  183. ***************
  184. *** 89,94 ****
  185. --- 109,118 ----
  186.                         dsc = sc;
  187.                  else if (strcmp(sc.s_name, ".bss") == 0) 
  188.                         bsc = sc;
  189. + #ifdef        ISC_386ix
  190. +                else if (strcmp(sc.s_name, ".comment") == 0) 
  191. +                       csc = sc;
  192. + #endif        /* ISC_386ix */
  193.                 
  194.         
  195.  
  196. ***************
  197. *** 97,103 ****
  198.         if (u.u_exdata.ux_tsize != aout.tsize ||
  199.             u.u_exdata.ux_dsize != aout.dsize ||
  200.             u.u_exdata.ux_bsize != aout.bsize) 
  201. !               fprintf("mismatch between %s and %s sizes\n", a_out_name,
  202.  core_name);
  203.                 exit(1);
  204.         
  205.  
  206. --- 121,128 ----
  207.         if (u.u_exdata.ux_tsize != aout.tsize ||
  208.             u.u_exdata.ux_dsize != aout.dsize ||
  209.             u.u_exdata.ux_bsize != aout.bsize) 
  210. !               fprintf( stderr, "mismatch between %s and %s sizes\n",
  211. !                                                       a_out_name, core_name);
  212.                 exit(1);
  213.         
  214.  
  215. ***************
  216. *** 122,128 ****
  217. --- 147,159 ----
  218.         bsc.s_paddr = bsc.s_vaddr = aout.data_start + aout.dsize;
  219.         bsc.s_size = aout.bsize;
  220.         bsc.s_scnptr = 0L;
  221. + #ifndef       ISC_386ix
  222.         bias = dsc.s_scnptr + dsc.s_size - lnnoptr;
  223. + #else
  224. +       comment_scnptr = csc.s_scnptr;
  225. +       csc.s_scnptr = dsc.s_scnptr + dsc.s_size;
  226. +       bias = csc.s_scnptr + csc.s_size - lnnoptr;
  227. + #endif        /* ISC_386ix */
  228.  
  229.         if (fh.f_symptr > 0L)
  230.                 fh.f_symptr += bias;
  231. ***************
  232. *** 139,149 ****
  233. --- 170,186 ----
  234.                 Perror("ds write");
  235.         if (fwrite(&bsc, sizeof(bsc), 1, nfp) != 1)
  236.                 Perror("bs write");
  237. +       if (fwrite(&csc, sizeof(csc), 1, nfp) != 1)
  238. +               Perror("cs write");
  239.         fseek(nfp, (long)text_scnptr, 0);
  240.         copy(afp, nfp, aout.tsize);
  241.         fseek(cfp, off, 0);
  242.         fseek(nfp, (long)data_scnptr, 0);
  243.         copy(cfp, nfp, size);
  244. + #ifdef        ISC_386ix
  245. +       fseek(afp, (long)comment_scnptr, 0);
  246. +       copy(afp, nfp, csc.s_size);
  247. + #endif        /* ISC_386ix */
  248.         copy_syms(afp, nfp);
  249.         fclose(nfp);
  250.         fclose(afp);
  251.  
  252. These patches for the 3b2 machine are meant to serve as a starting point
  253. only, as they are for pre-2.992 TeX.  If you work on this, contact oc@vmp.com.
  254.  
  255. #
  256. # 3b2patch.sh, to fix web2c for 3B2s
  257. #      for TeX 2.9*
  258. #
  259. # First, make sure we have EXTRA.c and ITEX.c that are the
  260. # same as the distribution versions of extra.c and itex.c
  261. # since we're going to modify those files.
  262. #
  263. if [ -f EXTRA.c ]
  264. then
  265.     cp EXTRA.c extra.c
  266. else
  267.     cp extra.c EXTRA.c
  268. fi
  269. if [ -f ITEX.c ]
  270. then
  271.     cp ITEX.c itex.c
  272. else
  273.     cp itex.c ITEX.c
  274. fi
  275. #
  276. # Then use a "sed" script to fix the "too may case statements"
  277. # in tex8.c
  278. #
  279. sed '/maincontrol/a\
  280.   int fallthrough;
  281.     /switch/i\
  282.   fallthrough = 0;
  283.     /case 71/i\
  284.   default : fallthgrough = 1 ; break ;\
  285.   }\
  286.   if ( fallthrough )\
  287.   switch ( abs ( curlist .modefield ) + curcmd ) {' <tex8.c >$$t8 &&
  288. mv $$t8 tex8.c
  289. #
  290. # Then find those screwy negative array pointers in texd.h
  291. # and fix them throughout all the files
  292. #
  293. # first find the base numbers we're looking for
  294. #
  295. XEQL=`sed -n 's/^#define xeqlevel (.*-\([0-9][0-9]*\).*/\1/p' <texd.h`
  296. HASH=`sed -n 's/^#define hash (.*-\([0-9][0-9]*\).*/\1/p' <texd.h`
  297. #
  298. # then get rid of the negatives in texd.h
  299. #
  300. sed 's/\(#define xeqlevel (.*\)-[0-9][0-9]*/\1/
  301.     s/\(#define hash (.*\)-[0-9][0-9]*/\1/' <texd.h >$$td &&
  302. mv $$td texd.h
  303. #
  304. # finally fix all the *.c files to do the subtraction
  305. # at array addressing time
  306. #
  307. for i in tex[0-8].c extra.c itex.c
  308. do
  309.     sed 's/\([^a-z]xeqlevel \[\)/\1 -'${XEQL}' +/g
  310.          s/\([^a-z]hash \[\)/\1 -'${HASH}' +/g' < $i > tkshl$$ &&
  311.         mv tkshl$$ $i
  312. done
  313.  
  314. When compiling for an Atari ST, some of Metafont's constants have to be
  315. decreased (even beyond small.sed), according to
  316. ridderbusch.pad@nixdorf.com.
  317.  
  318. *** /tmp/,RCSt1a00228    Tue Nov 20 09:44:11 1990
  319. --- cmf.ch    Mon Nov 19 10:11:30 1990
  320. ***************
  321. *** 143,149 ****
  322.   @d file_name_size == FILENAMESIZE {Get value from \.{site.h}.}
  323.   
  324.   @<Constants...@>=
  325. ! @!mem_max=60000; {greatest index in \MF's internal |mem| array;
  326.     must be strictly less than |max_halfword|;
  327.     must be equal to |mem_top| in \.{INIMF}, otherwise |>=mem_top|}
  328.   @!max_internal=100; {maximum number of internal quantities}
  329. --- 143,149 ----
  330.   @d file_name_size == FILENAMESIZE {Get value from \.{site.h}.}
  331.   
  332.   @<Constants...@>=
  333. ! @!mem_max=30000; {greatest index in \MF's internal |mem| array;
  334.     must be strictly less than |max_halfword|;
  335.     must be equal to |mem_top| in \.{INIMF}, otherwise |>=mem_top|}
  336.   @!max_internal=100; {maximum number of internal quantities}
  337. ***************
  338. *** 166,172 ****
  339.     length of \MF's own strings, which is currently about 22000}
  340.   @!move_size=5000; {space for storing moves in a single octant}
  341.   @!max_wiggle=300; {number of autorounded points per cycle}
  342. ! @!gf_buf_size=16384; {size of the output buffer, must be a multiple of 8}
  343.   @!pool_name='mf.pool';
  344.     {string of length |file_name_size|; tells where the string pool appears}
  345.   @!path_size=300; {maximum number of knots between breakpoints of a path}
  346. --- 166,172 ----
  347.     length of \MF's own strings, which is currently about 22000}
  348.   @!move_size=5000; {space for storing moves in a single octant}
  349.   @!max_wiggle=300; {number of autorounded points per cycle}
  350. ! @!gf_buf_size=4096; {size of the output buffer, must be a multiple of 8}
  351.   @!pool_name='mf.pool';
  352.     {string of length |file_name_size|; tells where the string pool appears}
  353.   @!path_size=300; {maximum number of knots between breakpoints of a path}
  354. ***************
  355. *** 177,183 ****
  356.     at least 255 and at most 32510}
  357.   @!max_kerns=500; {maximum number of distinct kern amounts}
  358.   @!max_font_dimen=50; {maximum number of \&{fontdimen} parameters}
  359. ! @!mem_top=60000; {largest index in the |mem| array dumped by \.{INIMF};
  360.     must be substantially larger than |mem_min|
  361.     and not greater than |mem_max|}
  362.   @z
  363. --- 177,183 ----
  364.     at least 255 and at most 32510}
  365.   @!max_kerns=500; {maximum number of distinct kern amounts}
  366.   @!max_font_dimen=50; {maximum number of \&{fontdimen} parameters}
  367. ! @!mem_top=30000; {largest index in the |mem| array dumped by \.{INIMF};
  368.     must be substantially larger than |mem_min|
  369.     and not greater than |mem_max|}
  370.   @z
  371.