--- ralcgm/include/mc_darwin.h.orig Fri Oct 25 06:26:03 2002 +++ ralcgm/include/mc_darwin.h Fri Oct 25 06:44:22 2002 @@ -0,0 +1,54 @@ +/* RAL-CGM Interpreter header file: @(#) mc_sun.h version 3.2 + * + * Darwin/MacOS X Specific setting for CGM Interpreter + */ + +/* Define Machine */ + +#define MACOSX + +/* Define Graphics system(s) */ + +#define POSTSCRIPT +#define BEZIER +#define HERSHEY +#define XW + +#define DATADIR getenv("CGMDATA") + +#define NAMELGTH 32 +#define EXTLGTH 8 + +#ifdef toupper +#undef toupper +#define toupper( c ) (islower( (c) )? (c) - 'a' + 'A' : (c) ) +#undef tolower +#define tolower( c ) (isupper( (c) )? (c) - 'A' + 'a' : (c) ) +#endif + +#define SignChar char + +#undef MALLOCH + +#ifdef ANSI +char *calloc( unsigned int, unsigned int ); +#else +char *calloc(); +#endif + +/* Define STDC typedefs ( size_t is defined wrongly ?) */ + +/* typdedef unsigned int size_t */ + +/*typedef long fpos_t;*/ + +#ifdef CGMOXW_C /* X-Windows specific settings */ + +#include +#include +#include +#include + +#undef major +#undef minor +#endif /* CGMOXW_C */ --- ralcgm/src/Makebase.orig Fri Oct 25 12:29:02 2002 +++ ralcgm/src/Makebase Fri Oct 25 12:29:43 2002 @@ -150,7 +150,7 @@ $(OUTUTILS)\ $(TXTUTILS)\ $(TEXTUTILS)\ - $(FNTUTILS) + $(FNTUTILS) $(ATTUTILS) $(GDPUTILS) $(FILUTILS) $(CELLUTILS) $(PTSUTILS) # # Set up names for the modules that make up `ralcgm' and `cgmlib'. # --- ralcgm/CGMinstall.orig Fri Oct 25 06:20:16 2002 +++ ralcgm/CGMinstall Fri Oct 25 12:56:22 2002 @@ -65,7 +65,7 @@ # ARGUMENTS: # ---------- # CGMinstall has one argument - system on which RAL-CGM is to be installed. -# This should be one of {sun3|sun4 +# This should be one of {sun3|sun4|macosx # |cray|craypcc # |iris|iris4d|indigo # |rs6000 @@ -111,13 +111,13 @@ echo; exit fi -systems='sun3|sun4|cray|craypcc|iris|iris4d|indigo|rs6000|hpux|ultrix|decosf|topaz' +systems='sun3|sun4|macosx|cray|craypcc|iris|iris4d|indigo|rs6000|hpux|ultrix|decosf|topaz' # # Set the echo options - check the system. # case $1 in -sun3|sun4|iris|ultrix|dec|rs6000) +sun3|sun4|macosx|iris|ultrix|dec|rs6000) # Berkely echo format el="-n" er="" @@ -185,6 +185,15 @@ xlib="-lX11 -lc" lflags="-lm" ;; +macosx) + system=darwin + cflags="-c -O" + compile="gcc2" + link="gcc2" + xw="yes" + xlib="-lX11" + lflags="" + ;; ultrix|dec) system=ultrix cflags="-c -O" @@ -294,9 +303,9 @@ # # Prompt the user to enter the RAL-CGM binary directory # -echo; echo Please enter the binary directory pathname -echo $el '(defaults to bin in current directory): '$er -read binary +#echo; echo Please enter the binary directory pathname +#echo $el '(defaults to bin in current directory): '$er +#read binary if test "$binary" = ""; then binary=$toplevel'/bin'; fi if [ `dirname $binary` = "." ]; then binary=$toplevel'/'$binary; fi @@ -323,8 +332,9 @@ # Prompt for each option and make arrangements - library first. # echo; echo Do you wish to have a separate callable library? -echo $el '(answer "y" or "n" - defaults to no): '$er -read a +#echo $el '(answer "y" or "n" - defaults to no): '$er +#read a +a="y" if test "$a" = "y" -o "$a" = "Y" then targets=${targets}" cgmlib" @@ -333,9 +343,9 @@ # # Prompt the user to enter the RAL-CGM library directory # - echo; echo Please enter the library directory pathname - echo $el '(defaults to bin in current directory): '$er - read library +# echo; echo Please enter the library directory pathname +# echo $el '(defaults to bin in current directory): '$er +# read library if test "$library" = ""; then library=$toplevel'/bin'; fi if [ `dirname $library` = "." ]; then library=$toplevel'/'$library; fi @@ -365,9 +375,9 @@ # # Prompt the user to enter the RAL-CGM data directory # -echo; echo Please enter pathname for directory in which to install data -echo $el '(defaults to data in current directory): '$er -read datadir +#echo; echo Please enter pathname for directory in which to install data +#echo $el '(defaults to data in current directory): '$er +#read datadir if test "$datadir" = ""; then datadir=$toplevel'/data'; fi if [ `dirname $datadir` = "." ]; then datadir=$toplevel'/'$datadir; fi @@ -391,9 +401,9 @@ # # Source data directory. # -echo; echo Please enter pathname for directory holding source data -echo $el '(defaults to data in current directory): '$er -read datasrcdir +#echo; echo Please enter pathname for directory holding source data +#echo $el '(defaults to data in current directory): '$er +#read datasrcdir if test "$datasrcdir" = ""; then datasrcdir=$toplevel'/data'; fi if [ `dirname $datasrcdir` = "." ]; then datasrcdir=$toplevel'/'$datasrcdir; fi @@ -408,8 +418,9 @@ # PostScript. # echo; echo Do you wish to include PostScript? -echo $el '(answer "y" or "n" - defaults to no): '$er -read a +#echo $el '(answer "y" or "n" - defaults to no): '$er +#read a +a="y" if test "$a" = "y" -o "$a" = "Y" then postscript=yes @@ -422,9 +433,10 @@ ptsflag=yes filflag=yes - echo; echo Do you wish to include the extended 35 font set? - echo $el '(answer "y" or "n" - defaults to no ie 13 font set): '$er - read a + echo; echo Do you wish to include the extended 35 font set? +# echo $el '(answer "y" or "n" - defaults to no ie 13 font set): '$er +# read a + a="y" rm -f $datadir/m_ps.fnt @@ -449,10 +461,11 @@ # # if X is available - find out where is it installed. # - echo; echo Do you wish to include X? - echo $el '(answer "y" or "n" - defaults to no): '$er + echo; echo Do you wish to include X? +# echo $el '(answer "y" or "n" - defaults to no): '$er - read a +# read a + a="y" if test "$a" = "y" -o "$a" = "Y" then cflags=${cflags}' -DXW=""' @@ -461,13 +474,13 @@ drivers=${drivers}' $(XW)' outflag=yes gdpflag=yes - echo; echo Are the X11 include files kept under /usr/include/X11? - echo $el '(answer "y" or "n" - defaults to yes): '$er - read a +# echo; echo Are the X11 include files kept under /usr/include/X11? +# echo $el '(answer "y" or "n" - defaults to yes): '$er + a="n" if test "$a" = "n" -o "$a" = "N" then echo $el 'Enter the correct destination: '$er - read a; aa=`echo $a |sed 's!/X11$!!'` + a="/usr/X11R6/include"; aa=`echo $a |sed 's!/X11$!!'` if [ ! -d $aa ] then echo; echo Error: $aa does not exist. ${command} exits. @@ -479,13 +492,14 @@ }" tmp1.$$ cflags=${cflags}" -I$aa" fi - echo; echo Is the X11 library kept under /usr/lib? - echo $el '(answer "y" or "n" - defaults to yes): '$er - read a +# echo; echo Is the X11 library kept under /usr/lib? +# echo $el '(answer "y" or "n" - defaults to yes): '$er +# read a + a="n" if test "$a" = "n" -o "$a" = "N" then echo $el 'Enter the correct destination: '$er - read a; aa=`echo $a |sed 's!/$!!'` + a="/usr/X11R6/lib"; aa=`echo $a |sed 's!/$!!'` if [ ! -d $aa ] then echo; echo Error: $aa does not exist. ${command} exits. @@ -511,8 +525,9 @@ # HPGL. # echo; echo Do you wish to include HPGL? -echo $el '(answer "y" or "n" - defaults to no): '$er -read a +#echo $el '(answer "y" or "n" - defaults to no): '$er +#read a +a="n" if test "$a" = "y" -o "$a" = "Y" then hpgl=yes @@ -539,8 +554,9 @@ # Tektronix 4200. # echo; echo Do you wish to include Tektronix 4200? -echo $el '(answer "y" or "n" - defaults to no): '$er -read a +#echo $el '(answer "y" or "n" - defaults to no): '$er +#read a +a="n" if test "$a" = "y" -o "$a" = "Y" then tek=yes @@ -565,8 +581,9 @@ if test "$outflag" = yes then echo; echo Do you wish to include Bezier fonts? - echo $el '(answer "y" or "n" - defaults to no): '$er - read a +# echo $el '(answer "y" or "n" - defaults to no): '$er +# read a + a="y" if test "$a" = "y" -o "$a" = "Y" then bezier=yes @@ -580,8 +597,9 @@ fi mv -f tmp1.$$ tmp0.$$ echo; echo Do you wish to include Hershey fonts? - echo $el '(answer "y" or "n" - defaults to no): '$er - read a +# echo $el '(answer "y" or "n" - defaults to no): '$er +# read a + a="y" if test "$a" = "y" -o "$a" = "Y" then hershey=yes @@ -600,7 +618,7 @@ mv -f tmp1.$$ tmp0.$$ fi -sed "/^#define DATADIR/s!\".*\"!\"$datadir/\"!"tmp1.$$ +cp tmp0.$$ tmp1.$$ # # Give user a chance to check & change. @@ -617,8 +636,9 @@ # Is the user happy? echo; echo Do you wish to install with these settings? -echo $el '(answer "y" or "n" - defaults to yes): '$er -read a +#echo $el '(answer "y" or "n" - defaults to yes): '$er +#read a +a="y" if test "$a" = "n" -o "$a" = "N" then echo; echo ${command} quits - please restart. @@ -631,7 +651,7 @@ # The following section does the same as the above but at a deeper level. # Use when debugging. # -#echo; echo Do you wish to check/change the settings? +echo; echo Do you wish to check/change the settings? #echo $el '(answer "y" or "n" - defaults to no): '$er #read a #if test "$a" = "y" -o "$a" = "Y"