#! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create: # rayshade.not # rayshade.dif # config.ndp # config.gcc # This archive created: Sun Oct 20 21:10:18 1991 export PATH; PATH=/bin:/usr/bin:$PATH if test -f 'rayshade.not' then echo shar: "will not over-write existing file 'rayshade.not'" else cat << \SHAR_EOF > 'rayshade.not' [ Tom Hite has ported rayshade 4.0 patchlevel 0 to MSDOS. Note that rayshade is no longer at patchlevel 0, so you will undoubtedly encounter problems in applying the diffs directly. -- CEK ] From cadsi@cadfx.ccad.uiowa.edu Tue Aug 27 18:07:43 1991 Received: from ns-mx.uiowa.edu by weedeater.math.yale.edu via SMTP; Tue, 27 Aug 91 18:07:43 -0400 Received: from cadfx.ccad.uiowa.edu by ns-mx.uiowa.edu (5.64.jnf/910724) on Tue, 27 Aug 91 17:07:37 -0500 id AA29602 with SMTP Received: by cadfx.ccad.uiowa.edu (5.0/4.7) (AA00302) on Tue, 27 Aug 91 17:12:05 CST Date: Tue, 27 Aug 91 17:12:05 CST From: CADSI Organization: CAD-Research, University of Iowa, Iowa City, Iowa Message-Id: <9108272312.AA00302@cadfx.ccad.uiowa.edu> To: craig@weedeater.math.yale.edu Subject: Rayshade/PC Notes Status: RO Craig, Here is the basic deal. I had to change filenames for a few files and the libray/libcommon directory. This is due to MS-DOS's 8/3 character filename/extension limitation. Here is a summary of those changes: 1) Change the name of libray/libcommon to libray/libcomn 2) in . (top level directory of Rayshade stuff) a) mv patchlevel.h patchlvl.h 3) in libray/libcomn (note that this is after renaming libray/libcommon): a) mv transform.c transfrm.c b) mv transform.h transfrm.h c) mv translate.c translat.c d) mv translate.h translat.h 4) in the libray/libobj directory a) mv intersect.c intrsect.c 5) in the libray/libsurf directory a) mv atmosphere.c atmspher.c b) mv atmosphere.h atmspher.h c) mv surfshade.c surfshad.c 6) in the libray/libtext directory a) mv imagetext.c imagetxt.c a) mv imagetext.h imagetxt.h Following this note, apply the changes shown by the diff file in the rayshad.dif file. I have mailed these files in order. I hope they get to you like this: 1) rayshade.not (this file of notes) 2) rayshade.dif (the diff file generated using diff -r +ingore-space-change) 3) config.ndp (config.h file for the MicroWay NDP C-386 Compiler) 4) config.gcc (config.h file for Gnu C++ for DOS (DJGPP) the DJGPP stuff is available via anonymous ftp from grape.ecs.clarkson.edu. The readme file in the pub/msdos/djgpp directory is sufficiently self- explanitory for those interested on compiling Rayshade with that. In order to get the makefiles for DOS (NDMAKE), using either DJGPP or MicroWay can just e-mail a request to me (Tom Hite): In addition, those who will be using MicroWay's compiler can get the yacc.c, y_tab.h, and lex.c files from me if they can't generate them on their Unix machines. MicroWay distributes no lex and/or yacc parser generators. cadsi@cadfx.ccad.uiowa.edu cadsi@128.255.12.10 if there is anything else you think you need from me, please feel free to ask. In particular, if you want me to write some blurb on how to make Rayshade on the pc and where to get NDMAKE and a full explanation of how to setup DJGPP (Gnu C++) and where to get it. Tom Hite cadsi@cadfx.ccad.uiowa.edu cadsi@128.255.12.10 SHAR_EOF fi if test -f 'rayshade.dif' then echo shar: "will not over-write existing file 'rayshade.dif'" else cat << \SHAR_EOF > 'rayshade.dif' diff -r +ignore-space-change rayshade.dos/etc/rsconvert/lex.l rayshade/etc/rsconvert/lex.l 22,23c22,23 < #include "libcomn/common.h" < #include "y_tab.h" --- > #include "libcommon/common.h" > #include "y.tab.h" 99c99 < /*yywrap() {return(1);}*/ --- > yywrap() {return(1);} diff -r +ignore-space-change rayshade.dos/etc/rsconvert/main.c rayshade/etc/rsconvert/main.c 27,31c27 < #include "libcomn/common.h" < < #ifdef DOS < int yylineno; < #endif --- > #include "libcommon/common.h" diff -r +ignore-space-change rayshade.dos/etc/rsconvert/yacc.y rayshade/etc/rsconvert/yacc.y 17c17 < #include "libcomn/common.h" --- > #include "libcommon/common.h" diff -r +ignore-space-change rayshade.dos/libray/libcomn/common.h rayshade/libray/libcomn/common.h 45c45 < #include "transfrm.h" --- > #include "transform.h" 101d100 < #ifndef max 103,104d101 < #endif < #ifndef min 106d102 < #endif diff -r +ignore-space-change rayshade.dos/libray/libcomn/transfrm.h rayshade/libray/libcomn/transfrm.h 2c2 < * transfrm.h --- > * transform.h 16c16 < * $Id: transfrm.h,v 4.0 91/07/17 14:32:33 kolb Exp Locker: kolb $ --- > * $Id: transform.h,v 4.0 91/07/17 14:32:33 kolb Exp Locker: kolb $ 18c18 < * $Log: transfrm.h,v $ --- > * $Log: transform.h,v $ diff -r +ignore-space-change rayshade.dos/libray/libcomn/translat.c rayshade/libray/libcomn/translat.c 24c24 < #include "translat.h" --- > #include "translate.h" diff -r +ignore-space-change rayshade.dos/libray/libimage/image.c rayshade/libray/libimage/image.c 24c24 < #include "libcomn/common.h" --- > #include "libcommon/common.h" diff -r +ignore-space-change rayshade.dos/libray/liblight/extended.c rayshade/libray/liblight/extended.c 24c24 < #include "libcomn/sampling.h" --- > #include "libcommon/sampling.h" diff -r +ignore-space-change rayshade.dos/libray/liblight/jittered.c rayshade/libray/liblight/jittered.c 76,78c76,77 < Float r = nrand(); < VecAddScaled(lp->pos, r, lp->e1, &lp->curpos); < VecAddScaled(lp->curpos, r, lp->e2, &lp->curpos); --- > VecAddScaled(lp->pos, nrand(), lp->e1, &lp->curpos); > VecAddScaled(lp->curpos, nrand(), lp->e2, &lp->curpos); diff -r +ignore-space-change rayshade.dos/libray/liblight/shadow.c rayshade/libray/liblight/shadow.c 250c250 < /* extern long ShadowOptions;*/ --- > extern int ShadowOptions; diff -r +ignore-space-change rayshade.dos/libray/libobj/geom.c rayshade/libray/libobj/geom.c 25c25 < #include "libcomn/sampling.h" --- > #include "libcommon/sampling.h" diff -r +ignore-space-change rayshade.dos/libray/libobj/geom.h rayshade/libray/libobj/geom.h 26,27c26,27 < #include "libcomn/common.h" < #include "libcomn/transfrm.h" --- > #include "libcommon/common.h" > #include "libcommon/transform.h" diff -r +ignore-space-change rayshade.dos/libray/libobj/roots.c rayshade/libray/libobj/roots.c 27c27 < #include "libcomn/common.h" --- > #include "libcommon/common.h" diff -r +ignore-space-change rayshade.dos/libray/libsurf/atmspher.c rayshade/libray/libsurf/atmspher.c 23c23 < #include "atmspher.h" --- > #include "atmosphere.h" diff -r +ignore-space-change rayshade.dos/libray/libsurf/atmspher.h rayshade/libray/libsurf/atmspher.h 26c26 < #include "libcomn/common.h" --- > #include "libcommon/common.h" diff -r +ignore-space-change rayshade.dos/libray/libsurf/fog.c rayshade/libray/libsurf/fog.c 23c23 < #include "atmspher.h" --- > #include "atmosphere.h" diff -r +ignore-space-change rayshade.dos/libray/libsurf/fogdeck.c rayshade/libray/libsurf/fogdeck.c 23c23 < #include "atmspher.h" --- > #include "atmosphere.h" diff -r +ignore-space-change rayshade.dos/libray/libsurf/mist.c rayshade/libray/libsurf/mist.c 23c23 < #include "atmspher.h" --- > #include "atmosphere.h" diff -r +ignore-space-change rayshade.dos/libray/libsurf/surface.c rayshade/libray/libsurf/surface.c 23c23 < #include "atmspher.h" --- > #include "atmosphere.h" diff -r +ignore-space-change rayshade.dos/libray/libtext/imagetxt.c rayshade/libray/libtext/imagetxt.c 25c25 < #include "imagetxt.h" --- > #include "imagetext.h" diff -r +ignore-space-change rayshade.dos/libray/libtext/noise.c rayshade/libray/libtext/noise.c 23c23 < #include "libcomn/common.h" --- > #include "libcommon/common.h" diff -r +ignore-space-change rayshade.dos/libshade/lex.l rayshade/libshade/lex.l 24c24 < #include "libsurf/atmspher.h" --- > #include "libsurf/atmosphere.h" 29c29 < #include "y_tab.h" --- > #include "y.tab.h" 160c160 < /*yywrap() {return 1;}*/ --- > yywrap() {return 1;} diff -r +ignore-space-change rayshade.dos/libshade/setup.c rayshade/libshade/setup.c 26c26 < #include "libsurf/atmspher.h" --- > #include "libsurf/atmosphere.h" diff -r +ignore-space-change rayshade.dos/libshade/shade.c rayshade/libshade/shade.c 27c27 < #include "libsurf/atmspher.h" --- > #include "libsurf/atmosphere.h" diff -r +ignore-space-change rayshade.dos/libshade/viewing.c rayshade/libshade/viewing.c 25c25 < #include "libcomn/sampling.h" --- > #include "libcommon/sampling.h" diff -r +ignore-space-change rayshade.dos/libshade/yacc.y rayshade/libshade/yacc.y 21c21 < #include "libsurf/atmspher.h" --- > #include "libsurf/atmosphere.h" 60c60 < #include "libtext/imagetxt.h" --- > #include "libtext/imagetext.h" 72,74c72,74 < #include "libcomn/rotate.h" < #include "libcomn/scale.h" < #include "libcomn/translat.h" --- > #include "libcommon/rotate.h" > #include "libcommon/scale.h" > #include "libcommon/translate.h" diff -r +ignore-space-change rayshade.dos/raypaint/render.c rayshade/raypaint/render.c 24c24 < #include "libcomn/sampling.h" --- > #include "libcommon/sampling.h" diff -r +ignore-space-change rayshade.dos/rayshade/main.c rayshade/rayshade/main.c 32,35d31 < #ifdef DOS < int yylineno; < #endif < diff -r +ignore-space-change rayshade.dos/rayshade/raytrace.c rayshade/rayshade/raytrace.c 25c25 < #include "libsurf/atmspher.h" --- > #include "libsurf/atmosphere.h" 27c27 < #include "libcomn/sampling.h" --- > #include "libcommon/sampling.h" diff -r +ignore-space-change rayshade.dos/rayshade/version.c rayshade/rayshade/version.c 24c24 < #include "patchlvl.h" --- > #include "patchlevel.h" SHAR_EOF fi if test -f 'config.ndp' then echo shar: "will not over-write existing file 'config.ndp'" else cat << \SHAR_EOF > 'config.ndp' /* config.h * This file was produced by running the config.h.SH script, which * gets its values from config.sh, which is generally produced by * running Configure. * * Feel free to modify any of this as the need arises. Note, however, * that running config.h.SH again will wipe out any changes you've made. * For a more permanent change edit config.sh and rerun config.h.SH. */ /* EUNICE: * This symbol, if defined, indicates that the program is being compiled * under the EUNICE package under VMS. The program will need to handle * things like files that don't go away the first time you unlink them, * due to version numbering. It will also need to compensate for lack * of a respectable link() command. */ /* VMS: * This symbol, if defined, indicates that the program is running under * VMS. It is currently only set in conjunction with the EUNICE symbol. */ /* XENIX: * This symbol, if defined, indicates thet the program is running under * Xenix (at least 3.0 ?). */ /* BSD: * This symbol, if defined, indicates that the program is running under * a BSD system. */ /*#undef EUNICE /**/ /*#undef VMS /**/ /*#undef XENIX /**/ /*#define BSD /**/ /* CPPSTDIN: * This symbol contains the first part of the string which will invoke * the C preprocessor on the standard input and produce to standard * output. Typical value of "cc -E" or "/lib/cpp". */ /* CPPMINUS: * This symbol contains the second part of the string which will invoke * the C preprocessor on the standard input and produce to standard * output. This symbol will have the value "-" if CPPSTDIN needs a minus * to specify standard input, otherwise the value is "". */ #define CPPSTDIN "cpp.exe" #define CPPMINUS "" /* bzero: * This symbol is maped to memset if the bzero() routine is not * available to set memory to 0. */ /*#undef bzero(s,l) memset((s),0,(l)) ; /* mapped to memset */ /* CBRT: * This symbol, if defined, indicates that the cbrt() (cube root) * function is available. */ /*#define CBRT /**/ /* index: * This preprocessor symbol is defined, along with rindex, if the system * uses the strchr and strrchr routines instead. */ /* rindex: * This preprocessor symbol is defined, along with index, if the system * uses the strchr and strrchr routines instead. */ /*#define index strchr /* cultural */ /*#define rindex strrchr /* differences? */ /* MEMSET: * This symbol, if defined, indicates that the memset routine is available * to set blocks of memory. You should always use bzero() instead of * memset() because bzero is remaped to memset if necessary. This means * that a memset() routine must be provided in case MEMSET is not defined * and no bzero() is found. */ #define MEMSET /**/ /* POPEN: * This symbol, if defined, indicates that the popen routine is * available to open a pipe from a process. */ /*#define POPEN /**/ /* RUSAGE: * This symbol, if defined, indicates that the getrusage() routine exists. * Inclusion of and may be necessary. */ /*#define RUSAGE /**/ /* TIMES: * This symbol, if defined, indicates that the times() routine exists. * Note that this became obsolete on some systems (SUNOS), which now * use getrusage(). */ /* CLOCKTYPE: * This symbol holds the type returned by times(). It can be long, * or clock_t on BSD sites (in which case should be * included). Moreover, the Clock_t symbol is defined in common.h * and should be used for easy clean reference. */ /*#define TIMES /**/ /*#define CLOCKTYPE clock_t /**/ /* I_STRING: * This symbol, if defined, indicates to the C program that it should * include (USG systems) instead of (BSD systems). */ #define I_STRING /**/ /* I_SYSRESOURCE: * This symbol, if defined, indicates to the C program that it should * include . */ /*#define I_SYSRESOURCE /**/ /* I_SYSTYPES: * This symbol, if defined, indicates to the C program that it should * include . */ /*#define I_SYSTYPES /**/ /* I_TIME: * This symbol, if defined, indicates to the C program that it should * include . */ /* I_SYSTIME: * This symbol, if defined, indicates to the C program that it should * include . */ /* I_SYSTIMEKERNEL: * This symbol, if defined, indicates to the C program that it should * include with KERNEL defined. */ #undef I_TIME /**/ /*#undef I_SYSTIME /**/ /*#undef I_SYSTIMEKERNEL /**/ /* nrand: * This macro is to be used to generate uniformly distributed * random numbers over the range [0., 1.]. */ /* seednrand: * This symbol defines the macro to be used in seeding the * random number generator (see nrand). */ #define nrand() (double)(((double)rand())/((double)2029052025.0)) #define seednrand(x) srand(x) /* VOIDFLAGS: * This symbol indicates how much support of the void type is given by this * compiler. What various bits mean: * * 1 = supports declaration of void * 2 = supports arrays of pointers to functions returning void * 4 = supports comparisons between pointers to void functions and * addresses of void functions * 8 = suports declaration of generic void pointers * * The package designer should define VOIDUSED to indicate the requirements * of the package. This can be done either by #defining VOIDUSED before * including config.h, or by defining defvoidused in Myinit.U. If the * latter approach is taken, only those flags will be tested. If the * level of void support necessary is not present, defines void to int. */ #ifndef VOIDUSED #define VOIDUSED 11 #endif #define VOIDFLAGS 15 #if (VOIDFLAGS & VOIDUSED) != VOIDUSED #define void int /* is void to be avoided? */ #define M_VOID /* Xenix strikes again */ #endif /* URT: * This symbol, if defined, indicates that the Utah Raster * Toolkit is being used. */ #undef URT /**/ /* I_VARARGS: * This symbol, if defined, indicates to the C program that it should * include . */ /*#define I_STDLIB /**/ SHAR_EOF fi if test -f 'config.gcc' then echo shar: "will not over-write existing file 'config.gcc'" else cat << \SHAR_EOF > 'config.gcc' /* config.h * This file was produced by running the config.h.SH script, which * gets its values from config.sh, which is generally produced by * running Configure. * * Feel free to modify any of this as the need arises. Note, however, * that running config.h.SH again will wipe out any changes you've made. * For a more permanent change edit config.sh and rerun config.h.SH. */ /* EUNICE: * This symbol, if defined, indicates that the program is being compiled * under the EUNICE package under VMS. The program will need to handle * things like files that don't go away the first time you unlink them, * due to version numbering. It will also need to compensate for lack * of a respectable link() command. */ /* VMS: * This symbol, if defined, indicates that the program is running under * VMS. It is currently only set in conjunction with the EUNICE symbol. */ /* XENIX: * This symbol, if defined, indicates thet the program is running under * Xenix (at least 3.0 ?). */ /* BSD: * This symbol, if defined, indicates that the program is running under * a BSD system. */ /*#undef EUNICE /**/ /*#undef VMS /**/ /*#undef XENIX /**/ /*#define BSD /**/ /* CPPSTDIN: * This symbol contains the first part of the string which will invoke * the C preprocessor on the standard input and produce to standard * output. Typical value of "cc -E" or "/lib/cpp". */ /* CPPMINUS: * This symbol contains the second part of the string which will invoke * the C preprocessor on the standard input and produce to standard * output. This symbol will have the value "-" if CPPSTDIN needs a minus * to specify standard input, otherwise the value is "". */ #define CPPSTDIN "f:/tom/apps/djgcc/bin/cpp.exe" #define CPPMINUS "" /* bzero: * This symbol is maped to memset if the bzero() routine is not * available to set memory to 0. */ /*#undef bzero(s,l) memset((s),0,(l)) ; /* mapped to memset */ /* CBRT: * This symbol, if defined, indicates that the cbrt() (cube root) * function is available. */ /*#define CBRT /**/ /* index: * This preprocessor symbol is defined, along with rindex, if the system * uses the strchr and strrchr routines instead. */ /* rindex: * This preprocessor symbol is defined, along with index, if the system * uses the strchr and strrchr routines instead. */ /*#define index strchr /* cultural */ /*#define rindex strrchr /* differences? */ /* MEMSET: * This symbol, if defined, indicates that the memset routine is available * to set blocks of memory. You should always use bzero() instead of * memset() because bzero is remaped to memset if necessary. This means * that a memset() routine must be provided in case MEMSET is not defined * and no bzero() is found. */ #define MEMSET /**/ /* POPEN: * This symbol, if defined, indicates that the popen routine is * available to open a pipe from a process. */ /*#define POPEN /**/ /* RUSAGE: * This symbol, if defined, indicates that the getrusage() routine exists. * Inclusion of and may be necessary. */ #define RUSAGE /**/ /* TIMES: * This symbol, if defined, indicates that the times() routine exists. * Note that this became obsolete on some systems (SUNOS), which now * use getrusage(). */ /* CLOCKTYPE: * This symbol holds the type returned by times(). It can be long, * or clock_t on BSD sites (in which case should be * included). Moreover, the Clock_t symbol is defined in common.h * and should be used for easy clean reference. */ #define TIMES /**/ #define CLOCKTYPE clock_t /**/ /* I_STRING: * This symbol, if defined, indicates to the C program that it should * include (USG systems) instead of (BSD systems). */ #define I_STRING /**/ /* I_SYSRESOURCE: * This symbol, if defined, indicates to the C program that it should * include . */ /*#define I_SYSRESOURCE /**/ /* I_SYSTYPES: * This symbol, if defined, indicates to the C program that it should * include . */ #define I_SYSTYPES /**/ /* I_TIME: * This symbol, if defined, indicates to the C program that it should * include . */ /* I_SYSTIME: * This symbol, if defined, indicates to the C program that it should * include . */ /* I_SYSTIMEKERNEL: * This symbol, if defined, indicates to the C program that it should * include with KERNEL defined. */ /*#undef I_TIME /**/ #undef I_SYSTIME /**/ #undef I_SYSTIMEKERNEL /**/ /* nrand: * This macro is to be used to generate uniformly distributed * random numbers over the range [0., 1.]. */ /* seednrand: * This symbol defines the macro to be used in seeding the * random number generator (see nrand). */ /*#define nrand() drand48() /**/ /*#define seednrand(x) srand48(x) /**/ #define nrand() (double)(((double)rand())/((double)2029052025.0)) #define seednrand(x) srand(x) /* VOIDFLAGS: * This symbol indicates how much support of the void type is given by this * compiler. What various bits mean: * * 1 = supports declaration of void * 2 = supports arrays of pointers to functions returning void * 4 = supports comparisons between pointers to void functions and * addresses of void functions * 8 = suports declaration of generic void pointers * * The package designer should define VOIDUSED to indicate the requirements * of the package. This can be done either by #defining VOIDUSED before * including config.h, or by defining defvoidused in Myinit.U. If the * latter approach is taken, only those flags will be tested. If the * level of void support necessary is not present, defines void to int. */ #ifndef VOIDUSED #define VOIDUSED 11 #endif #define VOIDFLAGS 15 #if (VOIDFLAGS & VOIDUSED) != VOIDUSED #define void int /* is void to be avoided? */ #define M_VOID /* Xenix strikes again */ #endif /* URT: * This symbol, if defined, indicates that the Utah Raster * Toolkit is being used. */ #undef URT /**/ /* I_VARARGS: * This symbol, if defined, indicates to the C program that it should * include . */ #define I_STDLIB /**/ SHAR_EOF fi exit 0 # End of shell archive