home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / bsd / 11739 < prev    next >
Encoding:
Text File  |  1993-01-23  |  5.2 KB  |  229 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!cs.utexas.edu!sun-barr!sh.wide!wnoc-tyo-news!virgil!ccgwy!ccgwy!hideaki
  3. From: hideaki@mahler.ee.uec.ac.jp (Hideaki Tsuchiya)
  4. Subject: Re: [386bsd] still trying to compile rayshade
  5. In-Reply-To: hideaki@berlioz.ee.uec.ac.jp's message of Fri, 22 Jan 1993 08:50:31 GMT
  6. Message-ID: <HIDEAKI.93Jan23192147@mahler.ee.uec.ac.jp>
  7. Sender: news@ccgwy.cc.uec.ac.jp (Internet news)
  8. Nntp-Posting-Host: mahler.ee.uec.ac.jp
  9. Organization: University of Electro-Communications, Chofu, Tokyo, JAPAN
  10. References: <fYaZRtt@quack.sac.ca.us>
  11.     <HIDEAKI.93Jan22175031@berlioz.ee.uec.ac.jp>
  12. Date: Sat, 23 Jan 1993 10:21:47 GMT
  13. Lines: 214
  14.  
  15. Yesterday, I posted a unofficial patch to rayshade 4.0 patchlevel 6,
  16. but it is incomplete. Here is a new unofficial patch.
  17.  
  18. In Garrett.Wollman@UVM.EDU's mail he writes:
  19.  
  20. >This is the way it's supposed to be.  Read the lex manual page, and
  21. >then read /usr/src/usr.bin/lex/flexdoc.1.  Flex doesn't support
  22. >yylineno *AT ALL*, so defining it won't do you any good.
  23. >
  24. >The proper thing to do is to fix RayShade's scanner.  I did that, and
  25. >sent the patch to the authors more than a year ago, but they said they
  26. >didn't have time to deal with it.
  27. >
  28. >In particular, you will need to include the following code:
  29. >
  30. >#ifdef FLEX_SCANNER
  31. >int yylineno = 1;
  32. >#undef yywrap
  33. >#define BUMPIT() yylineno++
  34. >#else
  35. >#define BUMPIT()
  36. >#endif /* FLEX_SCANNER */
  37. >
  38. >Then, in every rule which can possibly match a newline (there aren't
  39. >very many, as I recall), you need to add BUMPIT(); to the end of the
  40. >action.
  41. >
  42. >You probably want to compile with `lex -Cfe -bpv -t scanner.l >
  43. >scanner.c'.
  44. >
  45. >-GAWollman
  46.  
  47. My failure is that I don't know 386BSD's lex is GNU flex! New patch is
  48. as follows. Extract rayshade source, patch this and make.
  49.  
  50. IMPORTANT!
  51.     The patch in <HIDEAKI.93Jan22175031@berlioz.ee.uec.ac.jp> is
  52.     incomplete. Don't use it!
  53.  
  54.   Thanks Mr.Garrett for his report. I hope this patch is perfect.
  55.  
  56.  
  57. *** ./raypaint/Makefile.SH.orig    Fri Jan 22 14:42:52 1993
  58. --- ./raypaint/Makefile.SH    Fri Jan 22 15:53:23 1993
  59. ***************
  60. *** 55,70 ****
  61.   
  62.   #
  63.   # If using X11, use:
  64. ! #GRAPHICSLIB = -lX11
  65.   
  66.   #
  67.   # If you are using GL, use:
  68. ! GRAPHICSLIB = -lgl_s
  69.   
  70.   LIBRAY = $(LIBRAYDIR)/libray.a
  71.   LIBSHADE = $(LIBSHADEDIR)/libshade.a
  72.   
  73. ! CFLAGS = $(CCFLAGS) $(URTINC) $(INCLUDE) $(OPTIMIZE) -DSHARED_EDGES
  74.   SHELL = /bin/sh
  75.   
  76.   #
  77. --- 55,70 ----
  78.   
  79.   #
  80.   # If using X11, use:
  81. ! GRAPHICSLIB = -L/usr/X386/lib -lX11
  82.   
  83.   #
  84.   # If you are using GL, use:
  85. ! #GRAPHICSLIB = -lgl_s
  86.   
  87.   LIBRAY = $(LIBRAYDIR)/libray.a
  88.   LIBSHADE = $(LIBSHADEDIR)/libshade.a
  89.   
  90. ! CFLAGS = $(CCFLAGS) $(URTINC) $(INCLUDE) $(OPTIMIZE) -DSHARED_EDGES -I/usr/X386/include
  91.   SHELL = /bin/sh
  92.   
  93.   #
  94. ***************
  95. *** 73,79 ****
  96.   #
  97.   LIBS = $(LIBSHADE) $(LIBRAY) $(URTLIB)
  98.   
  99. ! DRIVE_C =    main.c graphics.c render.c version.c
  100.   
  101.   DRIVE_O = $(DRIVE_C:.c=.o)
  102.   
  103. --- 73,79 ----
  104.   #
  105.   LIBS = $(LIBSHADE) $(LIBRAY) $(URTLIB)
  106.   
  107. ! DRIVE_C =    main.c xgraphics.c render.c version.c
  108.   
  109.   DRIVE_O = $(DRIVE_C:.c=.o)
  110.   
  111. *** ./libshade/lex.l.orig    Fri Jan 22 14:46:37 1993
  112. --- ./libshade/lex.l    Sat Jan 23 15:05:28 1993
  113. ***************
  114. *** 28,33 ****
  115. --- 28,40 ----
  116.   #include "symtab.h"
  117.   #include "y.tab.h"
  118.   extern char *strsave();
  119. + #ifdef FLEX_SCANNER
  120. + int  yylineno=1;
  121. + #undef yywrap
  122. + #define BUMPIT() yylineno++
  123. + #else
  124. + #define BUMPIT()
  125. + #endif /* FLEX_SCANNER */
  126.   %}
  127.   alpha    [a-zA-Z]
  128.   special    [\.\_-]
  129. ***************
  130. *** 39,45 ****
  131.   %e 1500
  132.   %n 600
  133.   %%
  134. ! [ \t\n]            ;
  135.   ^#            handlehash();
  136.   "/*"            skipcomments();
  137.   ambient            return tAMBIENT;
  138. --- 46,53 ----
  139.   %e 1500
  140.   %n 600
  141.   %%
  142. ! [ \t]            ;
  143. ! "\n"            BUMPIT();
  144.   ^#            handlehash();
  145.   "/*"            skipcomments();
  146.   ambient            return tAMBIENT;
  147. *** ./etc/rsconvert/lex.l.orig    Fri Jan 22 14:46:37 1993
  148. --- ./etc/rsconvert/lex.l    Sat Jan 23 15:09:45 1993
  149. ***************
  150. *** 21,26 ****
  151. --- 21,33 ----
  152.   #endif
  153.   #include "libcommon/common.h"
  154.   #include "y.tab.h"
  155. + #ifdef FLEX_SCANNER
  156. + int  yylineno=1;
  157. + #undef yywrap
  158. + #define BUMPIT() yylineno++
  159. + #else
  160. + #define BUMPIT()
  161. + #endif /* FLEX_SCANNER */
  162.   %}
  163.   alpha    [a-zA-Z]
  164.   special    [\.\_-]
  165. ***************
  166. *** 30,36 ****
  167.   %p 3000
  168.   %%
  169.   [\t]            {WriteVerbatim(yytext);};
  170. ! "\n"            {};
  171.   " "            {};
  172.   ^#            {return handlehash();}
  173.   "/*"            {skipcomments();}
  174. --- 37,43 ----
  175.   %p 3000
  176.   %%
  177.   [\t]            {WriteVerbatim(yytext);};
  178. ! "\n"            {BUMPIT();};
  179.   " "            {};
  180.   ^#            {return handlehash();}
  181.   "/*"            {skipcomments();}
  182. *** ./Configure.orig    Fri Jan 22 14:46:33 1993
  183. --- ./Configure    Fri Jan 22 16:08:19 1993
  184. ***************
  185. *** 172,181 ****
  186.   fi
  187.   
  188.   if ls blurfl >/dev/null 2>&1; then
  189. !     if awk '' blurfl >/dev/null 2>&1; then
  190.           check='cat'
  191.       else
  192. !         check='awk ""'
  193.       fi
  194.   else
  195.       check='ls'
  196. --- 172,181 ----
  197.   fi
  198.   
  199.   if ls blurfl >/dev/null 2>&1; then
  200. !     if awk '{}' blurfl >/dev/null 2>&1; then
  201.           check='cat'
  202.       else
  203. !         check='awk "{}"'
  204.       fi
  205.   else
  206.       check='ls'
  207. ***************
  208. *** 1235,1241 ****
  209.   '');;
  210.   *)  set X $cppflags
  211.       cppflags=''
  212. !     for flag do
  213.           case $flag in
  214.           -D*|-I*) cppflags="$cppflags $flag";;
  215.           esac
  216. --- 1235,1241 ----
  217.   '');;
  218.   *)  set X $cppflags
  219.       cppflags=''
  220. !     for flag; do
  221.           case $flag in
  222.           -D*|-I*) cppflags="$cppflags $flag";;
  223.           esac
  224.  
  225.  
  226. --
  227. University of Electro-Communications, Japan.
  228. Hideaki Tsuchiya (hideaki@strauss.ee.uec.ac.jp)
  229.