home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume28 / rayshade / patch06 < prev    next >
Text File  |  1992-02-10  |  11KB  |  397 lines

  1. Newsgroups: comp.sources.misc
  2. From: Craig Kolb <rayshade-request@cs.princeton.edu>
  3. Subject:  v28i032:  rayshade - A raytracing package for UNIX, Patch06
  4. Message-ID: <1992Feb10.162152.6029@sparky.imd.sterling.com>
  5. X-Md4-Signature: 8823d1170e9d315973bd6e1c96f6209d
  6. Date: Mon, 10 Feb 1992 16:21:52 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: Craig Kolb <rayshade-request@cs.princeton.edu>
  10. Posting-number: Volume 28, Issue 32
  11. Archive-name: rayshade/patch06
  12. Environment: UNIX
  13. Patch-To: rayshade: Volume 21, Issue 3-22
  14.  
  15. System: rayshade version 4.0
  16. Patch #: 6
  17. Priority: CRITICAL 
  18. Date: Sun Feb  9 21:21:06 EST 1992
  19. From: Rayshade Construction Co. <rayshade-request@cs.princeton.edu>
  20.  
  21. Description:
  22.  
  23.     libshade:
  24.  
  25.     Fixed typo in libshade/picture.c that kept
  26.     source from compiling when not using the URT.
  27.  
  28.     libray:
  29.  
  30.     Decreased MAXMODELDEPTH to keep from beating on the stack
  31.     and to avoid the odd core dump in CsgIntersect();.
  32.  
  33.     rsconvert:
  34.  
  35.     Fixed extended source syntax in quickref.
  36.  
  37.     Superquads now convert to comments.
  38.  
  39.     Adaptive keyword now converts to samples.
  40.  
  41.     Associated cylinder surf with endcaps.
  42.  
  43.     More informative error messages.
  44.  
  45.     raypaint:
  46.  
  47.     Noted X11 greyscale operation.
  48.  
  49.  
  50. Fix:    From rn, say "| patch -p -N -d DIR", where DIR is your rayshade source
  51.     directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
  52.     If you don't have the patch program, apply the following by hand,
  53.     or get patch (version 2.0, latest patchlevel).
  54.  
  55.     After patching:
  56.         Configure -d
  57.         make depend
  58.         make
  59.  
  60.     If patch indicates that patchlevel is the wrong version, you may need
  61.     to apply one or more previous patches, or the patch may already
  62.     have been applied.  See the patchlevel.h file to find out what has or
  63.     has not been applied.  In any event, don't continue with the patch.
  64.  
  65.     If you are missing previous patches they can be obtained through
  66.     anonymous ftp from weedeaer.math.yale.edu (130.132.23.17) in
  67.     pub/rayshade.4.0/patches.
  68.  
  69.  
  70. Index: patchlevel.h
  71. Prereq: 5
  72. 1c1
  73. < #define PATCHLEVEL 5
  74. ---
  75. > #define PATCHLEVEL 6
  76. Index: etc/rsconvert/yacc.y
  77. Prereq: 4.0.1.2
  78. *** old/etc/rsconvert/yacc.y    1991/11/26 21:13:36
  79. --- new/etc/rsconvert/yacc.y    1992/02/07 11:05:22
  80. ***************
  81. *** 11,17 ****
  82.   /*                                        */
  83.   /* There is no warranty or other guarantee of fitness of this software       */
  84.   /* for any purpose.  It is provided solely "as is".               */
  85. ! /* $Id: yacc.y,v 4.0.1.2 91/11/26 21:13:36 cek Exp cek $ */
  86.   %{
  87.   #include <stdio.h>
  88.   #include "libcommon/common.h"
  89. --- 11,17 ----
  90.   /*                                        */
  91.   /* There is no warranty or other guarantee of fitness of this software       */
  92.   /* for any purpose.  It is provided solely "as is".               */
  93. ! /* $Id: yacc.y,v 4.0.1.3 92/02/07 11:05:21 cek Exp Locker: cek $ */
  94.   %{
  95.   #include <stdio.h>
  96.   #include "libcommon/common.h"
  97. ***************
  98. *** 36,41 ****
  99. --- 36,43 ----
  100.   %type <d> Fnumber sFnumber
  101.   %type <col> sColor
  102.   %type <v> sVector
  103. + %type <i> sInt
  104. + %type <c> sString
  105.   %token tADAPTIVE tAPERTURE
  106.   %token tBACKGROUND tBLOTCH tBOX tBUMP tCONE tCYL tDIRECTIONAL
  107.   %token tENDDEF tEXTENDED tEYEP tFBM tFBMBUMP tFOCALDIST tFOG tFOV tGLOSS tGRID
  108. ***************
  109. *** 258,265 ****
  110.               NEWLINE();
  111.           }
  112.           ;
  113. ! Adaptive    : ADAPTIVE Int
  114.           {
  115.               NEWLINE();
  116.           }
  117.           ;
  118. --- 260,268 ----
  119.               NEWLINE();
  120.           }
  121.           ;
  122. ! Adaptive    : ADAPTIVE sInt
  123.           {
  124. +             WriteFloat((Float)($2+1));
  125.               NEWLINE();
  126.           }
  127.           ;
  128. ***************
  129. *** 440,466 ****
  130.               NEWLINE();
  131.           }
  132.           ;
  133. ! Cylinder    : CYL String sVector sVector sFnumber
  134.           {
  135.               Vector tmp;
  136.   
  137.               /* Radius now goes first */
  138.               WriteFloat($5);
  139.               WriteVector(&$3);
  140.               WriteVector(&$4);
  141.               NEWLINE();
  142. !             WriteString("#ifdef ENDCAPS\n");
  143.                   VecSub($3, $4, &tmp);
  144.                   WriteVerbatim("disc ");
  145.                   WriteFloat($5);    /* radius */
  146.                   WriteVector(&$3); /* pos */
  147.                   WriteVector(&tmp);
  148.                   WriteVerbatim("\ndisc ");
  149.                   VecScale(-1, tmp, &tmp);
  150.                   WriteFloat($5);    /* radius */
  151.                   WriteVector(&$4); /* pos */
  152.                   WriteVector(&tmp);
  153. !             WriteString("\n#endif\n");
  154.           }
  155.           ;
  156.   Sphere        : SPHERE String Fnumber Vector
  157. --- 443,472 ----
  158.               NEWLINE();
  159.           }
  160.           ;
  161. ! Cylinder    : CYL sString sVector sVector sFnumber
  162.           {
  163.               Vector tmp;
  164.   
  165. +             WriteString($2);
  166.               /* Radius now goes first */
  167.               WriteFloat($5);
  168.               WriteVector(&$3);
  169.               WriteVector(&$4);
  170.               NEWLINE();
  171. !             WriteVerbatim("#ifdef ENDCAPS\n");
  172.                   VecSub($3, $4, &tmp);
  173.                   WriteVerbatim("disc ");
  174. +                 WriteString($2);
  175.                   WriteFloat($5);    /* radius */
  176.                   WriteVector(&$3); /* pos */
  177.                   WriteVector(&tmp);
  178.                   WriteVerbatim("\ndisc ");
  179. +                 WriteString($2);
  180.                   VecScale(-1, tmp, &tmp);
  181.                   WriteFloat($5);    /* radius */
  182.                   WriteVector(&$4); /* pos */
  183.                   WriteVector(&tmp);
  184. !             WriteVerbatim("\n#endif\n");
  185.           }
  186.           ;
  187.   Sphere        : SPHERE String Fnumber Vector
  188. ***************
  189. *** 496,501 ****
  190. --- 502,508 ----
  191.               Fnumber Fnumber Fnumber
  192.               Fnumber
  193.           {
  194. +             WriteVerbatim("*/");
  195.               NEWLINE();
  196.           }
  197.           ;
  198. ***************
  199. *** 545,550 ****
  200. --- 552,559 ----
  201.           ;
  202.   Int        : tINT
  203.           { WriteFloat((Float)$1); };
  204. + sInt        : tINT
  205. +         { $$ = (int)$1; };
  206.   sFnumber    : tFLOAT
  207.           | tINT
  208.           { $$ = (double)$1; }
  209. ***************
  210. *** 551,557 ****
  211.           ;
  212.   String        : tSTRING
  213.           { WriteString($1); }
  214. ! ADAPTIVE    : tADAPTIVE    { WriteString("adaptive"); }
  215.   APERTURE    : tAPERTURE    { WriteString("aperture"); }
  216.   BACKGROUND    : tBACKGROUND    { WriteString("background"); }
  217.   BLOTCH        : tBLOTCH    { WriteString("blotch"); }
  218. --- 560,568 ----
  219.           ;
  220.   String        : tSTRING
  221.           { WriteString($1); }
  222. ! sString        : tSTRING
  223. !         { $$ = $1; }
  224. ! ADAPTIVE    : tADAPTIVE    { WriteString("samples"); }
  225.   APERTURE    : tAPERTURE    { WriteString("aperture"); }
  226.   BACKGROUND    : tBACKGROUND    { WriteString("background"); }
  227.   BLOTCH        : tBLOTCH    { WriteString("blotch"); }
  228. ***************
  229. *** 589,595 ****
  230.   SCREEN        : tSCREEN    { WriteString("screen"); }
  231.   SPHERE        : tSPHERE    { WriteString("sphere"); }
  232.   STARTDEF    : tSTARTDEF tSTRING    { StartDefine($2); }
  233. ! SUPERQ        : tSUPERQ    { WriteString("superq"); }
  234.   SURFACE        : tSURFACE    { WriteString("surface"); }
  235.   RESOLUTION    : tRESOLUTION    { WriteString("resolution"); }
  236.   TRANSLATE    : tTRANSLATE    { WriteString("translate"); }
  237. --- 600,606 ----
  238.   SCREEN        : tSCREEN    { WriteString("screen"); }
  239.   SPHERE        : tSPHERE    { WriteString("sphere"); }
  240.   STARTDEF    : tSTARTDEF tSTRING    { StartDefine($2); }
  241. ! SUPERQ        : tSUPERQ    { WriteString("/* superq"); }
  242.   SURFACE        : tSURFACE    { WriteString("surface"); }
  243.   RESOLUTION    : tRESOLUTION    { WriteString("resolution"); }
  244.   TRANSLATE    : tTRANSLATE    { WriteString("translate"); }
  245. ***************
  246. *** 618,624 ****
  247.   
  248.   yyerror(s)
  249.   {
  250. !     fprintf(stderr,"yyerror: %s\n",s);
  251.   }
  252.   
  253.   StartDefine(name)
  254. --- 629,637 ----
  255.   
  256.   yyerror(s)
  257.   {
  258. !     fprintf(stderr,"rsconvert: %s, line %d: %s \n",
  259. !             yyfilename[0] ? yyfilename : "stdin",
  260. !             yylineno, s);
  261.   }
  262.   
  263.   StartDefine(name)
  264. Index: libshade/picture.c
  265. Prereq: 4.0.1.1
  266. *** old/libshade/picture.c    1992/01/10 16:28:28
  267. --- new/libshade/picture.c    1992/02/07 09:22:20
  268. ***************
  269. *** 13,21 ****
  270.    * There is no warranty or other guarantee of fitness of this software
  271.    * for any purpose.  It is provided solely "as is".
  272.    *
  273. !  * $Id: picture.c,v 4.0.1.1 92/01/10 16:28:28 cek Exp Locker: cek $
  274.    *
  275.    * $Log:    picture.c,v $
  276.    * Revision 4.0.1.1  92/01/10  16:28:28  cek
  277.    * patch3: Added check for nonexistent patial image file.
  278.    * patch3: Fixed declaration of nrow in count_rle_rows().
  279. --- 13,24 ----
  280.    * There is no warranty or other guarantee of fitness of this software
  281.    * for any purpose.  It is provided solely "as is".
  282.    *
  283. !  * $Id: picture.c,v 4.0.1.2 92/02/07 09:22:20 cek Exp Locker: cek $
  284.    *
  285.    * $Log:    picture.c,v $
  286. +  * Revision 4.0.1.2  92/02/07  09:22:20  cek
  287. +  * patch6: Fixed typo in MTV error message.
  288. +  * 
  289.    * Revision 4.0.1.1  92/01/10  16:28:28  cek
  290.    * patch3: Added check for nonexistent patial image file.
  291.    * patch3: Fixed declaration of nrow in count_rle_rows().
  292. ***************
  293. *** 293,299 ****
  294.       if (Options.imgname) {
  295.           Options.pictfile = fopen(Options.imgname, "w");
  296.           if (Options.pictfile == (FILE *)NULL)
  297. !             RLerror(RL_ERROR, "Cannot open %s for writing.",
  298.                   Options.imgname);
  299.       } else
  300.           Options.pictfile = stdout;
  301. --- 296,302 ----
  302.       if (Options.imgname) {
  303.           Options.pictfile = fopen(Options.imgname, "w");
  304.           if (Options.pictfile == (FILE *)NULL)
  305. !             RLerror(RL_ABORT, "Cannot open %s for writing.",
  306.                   Options.imgname);
  307.       } else
  308.           Options.pictfile = stdout;
  309. Index: libray/libobj/geom.h
  310. Prereq: 4.0
  311. *** old/libray/libobj/geom.h    1991/07/17 14:37:52
  312. --- new/libray/libobj/geom.h    1992/02/07 13:10:58
  313. ***************
  314. *** 13,21 ****
  315.    * There is no warranty or other guarantee of fitness of this software
  316.    * for any purpose.  It is provided solely "as is".
  317.    *
  318. !  * $Id: geom.h,v 4.0 91/07/17 14:37:52 kolb Exp Locker: kolb $
  319.    *
  320.    * $Log:    geom.h,v $
  321.    * Revision 4.0  91/07/17  14:37:52  kolb
  322.    * Initial version.
  323.    * 
  324. --- 13,24 ----
  325.    * There is no warranty or other guarantee of fitness of this software
  326.    * for any purpose.  It is provided solely "as is".
  327.    *
  328. !  * $Id: geom.h,v 4.0.1.1 92/02/07 13:10:58 cek Exp Locker: cek $
  329.    *
  330.    * $Log:    geom.h,v $
  331. +  * Revision 4.0.1.1  92/02/07  13:10:58  cek
  332. +  * patch6: Decreased MAXMODELDEPTH to keep from beating on the stack.
  333. +  * 
  334.    * Revision 4.0  91/07/17  14:37:52  kolb
  335.    * Initial version.
  336.    * 
  337. ***************
  338. *** 33,39 ****
  339.   #define EXITING        1
  340.   #define ENTERING    2
  341.   
  342. ! #define MAXMODELDEPTH    128        /* Maximum height of DAG. */
  343.   
  344.   typedef char * GeomRef;
  345.   typedef GeomRef GeomCreateFunc();
  346. --- 36,42 ----
  347.   #define EXITING        1
  348.   #define ENTERING    2
  349.   
  350. ! #define MAXMODELDEPTH    32        /* Maximum height of DAG. */
  351.   
  352.   typedef char * GeomRef;
  353.   typedef GeomRef GeomCreateFunc();
  354. Index: raypaint/README
  355. *** old/raypaint/README    1992/02/07 09:04:27
  356. --- new/raypaint/README    1992/02/07 11:29:36
  357. ***************
  358. *** 1,6 ****
  359.   Raypaint reads a rayshade input file and opens a graphics window into
  360.   which the image is progressively rendered.  Graphics support routines
  361. ! are provided for X11 and GL (SGI / RS6000).
  362.   
  363.   Command-line arguments to raypaint are identical to rayshade arguments.
  364.   
  365. --- 1,7 ----
  366.   Raypaint reads a rayshade input file and opens a graphics window into
  367.   which the image is progressively rendered.  Graphics support routines
  368. ! are provided for X11 and GL (SGI / RS6000).  Note that raypaint displays
  369. ! a greyscale image when running under X.
  370.   
  371.   Command-line arguments to raypaint are identical to rayshade arguments.
  372.   
  373. Index: Doc/quickref.txt
  374. *** old/Doc/quickref.txt    1992/02/07 08:56:47
  375. --- new/Doc/quickref.txt    1992/02/07 14:20:03
  376. ***************
  377. *** 212,218 ****
  378.           ambient
  379.           point       Xpos Ypos Zpos
  380.           directional Xdir Ydir Zdir
  381. !         extended    Xpos Ypos Zpos Radius
  382.           spot        Xpos Ypos Zpos Xat Yat Zat Coef Thetain Thetaout
  383.           area        Xorigin Yorigin Zorigin Xu Yu Zu Usamples Xv Yv Zv Vsamples
  384.   
  385. --- 212,218 ----
  386.           ambient
  387.           point       Xpos Ypos Zpos
  388.           directional Xdir Ydir Zdir
  389. !         extended    Radius Xpos Ypos Zpos
  390.           spot        Xpos Ypos Zpos Xat Yat Zat Coef Thetain Thetaout
  391.           area        Xorigin Yorigin Zorigin Xu Yu Zu Usamples Xv Yv Zv Vsamples
  392.   
  393.  
  394. *** End of Patch 6 ***
  395.  
  396. exit 0 # Just in case...
  397.