home *** CD-ROM | disk | FTP | other *** search
- *** install.h.orig Mon Oct 26 14:19:02 1992
- --- install.h Mon Oct 26 14:19:01 1992
- ***************
- *** 0 ****
- --- 1,8 ----
- + #define INSTALL_TMP "/usr/tmp"
- + #define PATHNAME_LEN 80
- + #define HBUFSIZ 4096
- + #define MAX_D_ROWS 1000
- + #define MAX_D_COLS 24
- + #define DATAITEM_LEN 20
- + #define TEMPLATE_PATH "<installsharedir>/<prefix>lib/ipl/tplates"
- + #define MONTHSTUB_PATH "<installsharedir>/<prefix>lib/ipl/tplates/month.stubs"
- *** src/util.c.orig Mon Oct 26 16:09:19 1992
- --- src/util.c Mon Oct 26 16:17:38 1992
- ***************
- *** 1,6 ****
- #include "gdp.x"
-
- ! extern char *getlogin();
-
- /* ============== */
- /* save_spec() can be called to save current proc specification in file s. */
- --- 1,19 ----
- #include "gdp.x"
-
- ! char *username()
- ! {
- ! #include <sys/types.h>
- ! #include <pwd.h>
- !
- ! register struct passwd *pw;
- ! register uid_t uid;
- !
- ! uid = geteuid ();
- ! pw = getpwuid (uid);
- ! if (pw) return(pw->pw_name);
- ! return "Unknown";
- ! }
- !
-
- /* ============== */
- /* save_spec() can be called to save current proc specification in file s. */
- ***************
- *** 11,17 ****
- FILE *fp;
- int i;
-
- ! sprintf( fnm, "%s/ipl%s%d.%s", TEMPDIR, getlogin(), getpid(), s );
- fp = fopen( fnm, "w" );
- if( fp == NULL ) { fprintf( stderr, "Can't w open inherit file %s.\n", fnm ); gdp_exit(); }
- for( i = 0; i < Clines; i++ ) fprintf( fp, "%s", Chunk[i] );
- --- 24,30 ----
- FILE *fp;
- int i;
-
- ! sprintf( fnm, "%s/ipl%s%d.%s", TEMPDIR, username(), getpid(), s );
- fp = fopen( fnm, "w" );
- if( fp == NULL ) { fprintf( stderr, "Can't w open inherit file %s.\n", fnm ); gdp_exit(); }
- for( i = 0; i < Clines; i++ ) fprintf( fp, "%s", Chunk[i] );
- ***************
- *** 27,33 ****
- FILE *fp;
-
- if( strlen( s ) < 1 ) { Ilines = 0; return( 1 ); }
- ! sprintf( fnm, "%s/ipl%s%d.%s", TEMPDIR, getlogin(), getpid(), s );
- fp = fopen( fnm, "r" );
- if( fp == NULL ) { fprintf( stderr, "Can't open inheritance file %s.\n", fnm ); gdp_exit(); }
- Ilines = 0;
- --- 40,46 ----
- FILE *fp;
-
- if( strlen( s ) < 1 ) { Ilines = 0; return( 1 ); }
- ! sprintf( fnm, "%s/ipl%s%d.%s", TEMPDIR, username(), getpid(), s );
- fp = fopen( fnm, "r" );
- if( fp == NULL ) { fprintf( stderr, "Can't open inheritance file %s.\n", fnm ); gdp_exit(); }
- Ilines = 0;
- ***************
- *** 40,46 ****
- gdp_exit()
- {
- char com[80];
- ! sprintf( com, "rm %s/ipl%s%d* 2> /dev/null", TEMPDIR, getlogin(), getpid() );
- system( com );
- proc_call( "Exit" );
- exit();
- --- 53,59 ----
- gdp_exit()
- {
- char com[80];
- ! sprintf( com, "rm %s/ipl%s%d* 2> /dev/null", TEMPDIR, username(), getpid() );
- system( com );
- proc_call( "Exit" );
- exit();
- *** src/viplmenu.c.orig Mon Oct 26 16:09:19 1992
- --- src/viplmenu.c Mon Oct 26 16:16:37 1992
- ***************
- *** 23,37 ****
-
-
- /* open holding file */
- ! sprintf( holdingfile, "%s/%siplhold%05d", INSTALL_TMP, getlogin(), getpid() );
- hfp = fopen( holdingfile, "w" );
- if( hfp == NULL ) { fprintf( stderr, "Cannot open holding file\n" ); gdp_exit(); }
-
- /* get dispfile name */
- ! sprintf( dispfile, "%s/%sipldisp%05d", INSTALL_TMP, getlogin(), getpid() );
-
- /* initialize ofp */
- ! sprintf( outfile, "%s/%siplout%05d", INSTALL_TMP, getlogin(), getpid() );
- ofp = fopen( outfile, "w" );
- if( ofp == NULL ) { fprintf( stderr, "Cannot open output file\n" ); gdp_exit(); }
- fclose( ofp );
- --- 23,37 ----
-
-
- /* open holding file */
- ! sprintf( holdingfile, "%s/%siplhold%05d", INSTALL_TMP, username(), getpid() );
- hfp = fopen( holdingfile, "w" );
- if( hfp == NULL ) { fprintf( stderr, "Cannot open holding file\n" ); gdp_exit(); }
-
- /* get dispfile name */
- ! sprintf( dispfile, "%s/%sipldisp%05d", INSTALL_TMP, username(), getpid() );
-
- /* initialize ofp */
- ! sprintf( outfile, "%s/%siplout%05d", INSTALL_TMP, username(), getpid() );
- ofp = fopen( outfile, "w" );
- if( ofp == NULL ) { fprintf( stderr, "Cannot open output file\n" ); gdp_exit(); }
- fclose( ofp );
- *** src/initialize.c.orig Mon Oct 26 16:20:53 1992
- --- src/initialize.c Mon Oct 26 16:21:32 1992
- ***************
- *** 41,47 ****
- Sfp = fopen( fnm, "r" );
- }
-
- ! if( Dev == 't' && Sfp == NULL ) { fprintf( stderr, "Control file not found.\n" ); exit(); }
-
- else if( Sfp == NULL ) {
- NTinit( Dev );
- --- 41,47 ----
- Sfp = fopen( fnm, "r" );
- }
-
- ! if( Dev == 't' && Sfp == NULL ) { fprintf( stderr, "Control file not found.\n" ); gdp_exit(); }
-
- else if( Sfp == NULL ) {
- NTinit( Dev );
- ***************
- *** 56,62 ****
-
- DXlo = DXhi = 0; /* null out data dimensions */
- DYlo = DYhi = 0;
- ! sprintf( Buf, "%s %s (%02d%02d%02d %02d:%02d)", getlogin(), (Argc>1)?Arg[1]:"", yr, mon, day, hr, min );
-
- strcpy( Stdfont, "/Helvetica" );
- StdLw = 1.0;
- --- 56,62 ----
-
- DXlo = DXhi = 0; /* null out data dimensions */
- DYlo = DYhi = 0;
- ! sprintf( Buf, "%s %s (%02d%02d%02d %02d:%02d)", username(), (Argc>1)?Arg[1]:"", yr, mon, day, hr, min );
-
- strcpy( Stdfont, "/Helvetica" );
- StdLw = 1.0;
- *** src/Makefile.orig Mon Oct 26 16:22:28 1992
- --- src/Makefile Mon Oct 26 16:25:40 1992
- ***************
- *** 1,6 ****
- --- 1,7 ----
- # Makefile for IPL source 1-21-90 scg
- #
- #
- + CC=gcc -DNOSUNVIEW
-
- IPL_OBJ = areadef.o areadress.o arrow.o bargraph.o boxplot.o \
- distribution.o draw.o errorbars.o exit.o \
- ***************
- *** 15,36 ****
-
- GDP_OBJ = main.o gget.o constraint_check.o util.o
-
- ! DRIVER_OBJ = sunv.o iplps.o pcode.o
-
- LIB_OBJ = lib.o
-
-
- # Use the following when Sunview is not available..
- ! # LIBES = -lm
- ! # ipl: $(IPL_OBJ) $(GRAPHIC_OBJ) $(GDP_OBJ) $(PICK_OBJ) pcode.o iplps.o $(LIB_OBJ)
- ! # cc $(IPL_OBJ) $(GRAPHIC_OBJ) $(GDP_OBJ) $(PICK_OBJ) $(DRIVER_OBJ) $(LIB_OBJ) \
- ! # $(LIBES) -o ../bin/ipl
-
- # Use the following when Sunview is available..
- ! LIBES = -lm -lsuntool -lsunwindow -lpixrect
- ! ipl: $(IPL_OBJ) $(GRAPHIC_OBJ) $(GDP_OBJ) $(PICK_OBJ) $(DRIVER_OBJ) $(LIB_OBJ)
- ! cc $(IPL_OBJ) $(GRAPHIC_OBJ) $(GDP_OBJ) $(PICK_OBJ) $(DRIVER_OBJ) $(LIB_OBJ) \
- ! $(LIBES) -o ../bin/ipl
-
- $(GRPAHIC_OBJ) $(IPL_OBJ) $(GDP_OBJ) : ../install.h
- $(GRAPHIC_OBJ) : graphic.h
- --- 16,37 ----
-
- GDP_OBJ = main.o gget.o constraint_check.o util.o
-
- ! DRIVER_OBJ = iplps.o pcode.o
-
- LIB_OBJ = lib.o
-
-
- # Use the following when Sunview is not available..
- ! LIBES = -lm
- ! ipl: $(IPL_OBJ) $(GRAPHIC_OBJ) $(GDP_OBJ) $(PICK_OBJ) pcode.o iplps.o $(LIB_OBJ)
- ! $(CC) $(IPL_OBJ) $(GRAPHIC_OBJ) $(GDP_OBJ) $(PICK_OBJ) $(DRIVER_OBJ) $(LIB_OBJ) \
- ! $(LIBES) -o ../bin/ipl
-
- # Use the following when Sunview is available..
- ! # LIBES = -lm -lsuntool -lsunwindow -lpixrect
- ! # ipl: $(IPL_OBJ) $(GRAPHIC_OBJ) $(GDP_OBJ) $(PICK_OBJ) $(DRIVER_OBJ) $(LIB_OBJ)
- ! # cc $(IPL_OBJ) $(GRAPHIC_OBJ) $(GDP_OBJ) $(PICK_OBJ) $(DRIVER_OBJ) $(LIB_OBJ) \
- ! # $(LIBES) -o ../bin/ipl
-
- $(GRPAHIC_OBJ) $(IPL_OBJ) $(GDP_OBJ) : ../install.h
- $(GRAPHIC_OBJ) : graphic.h
- *** src/iplps.c.orig Wed Dec 9 14:12:37 1992
- --- src/iplps.c Fri Dec 11 09:11:42 1992
- ***************
- *** 55,60 ****
- --- 55,168 ----
- /* set up standard line width */
- printf( "1 setlinewidth\n" );
-
- + /* RTR changes to allow patterns as well as shading */
- + printf( "%% RTR changes to allow patterns as well as shading\n" );
- + printf( "%% pattern code is adapted from examples in PostSript Language\n" );
- + printf( "%% Tutorial and Cookbook\n\n" );
- +
- + printf( "/setuserscreendict 22 dict def\n");
- + printf( "setuserscreendict begin\n" );
- + printf( " /tempctm matrix def\n" );
- + printf( " /temprot matrix def\n" );
- + printf( " /tempscale matrix def\n\n" );
- + printf( " /concatprocs\n" );
- + printf( " { /proc2 exch cvlit def\n" );
- + printf( " /proc1 exch cvlit def\n" );
- + printf( " /newproc proc1 length proc2 length add\n" );
- + printf( " array def\n" );
- + printf( " newproc 0 proc1 putinterval\n" );
- + printf( " newproc proc1 length proc2 putinterval\n" );
- + printf( " newproc cvx\n" );
- + printf( " } def\n\n" );
- + printf( "/resmatrix matrix def\n" );
- + printf( "/findresolution\n" );
- + printf( "{ 72 0 resmatrix defaultmatrix dtransform\n" );
- + printf( " /yres exch def /xres exch def\n" );
- + printf( " xres dup mul yres dup mul add sqrt\n" );
- + printf( " } def\n" );
- + printf( "end\n\n" );
- + printf( "/setuserscreen\n" );
- + printf( " { setuserscreendict begin\n" );
- + printf( " /spotfunction exch def\n" );
- + printf( " /screenangle exch def\n" );
- + printf( " /cellsize exch def\n" );
- + printf( " /m tempctm currentmatrix def\n" );
- + printf( " /rm screenangle temprot rotate def\n" );
- + printf( " /sm cellsize dup tempscale scale def\n\n" );
- + printf( " sm rm m m concatmatrix m concatmatrix pop\n" );
- + printf( " 1 0 m dtransform /y1 exch def /x1 exch def\n" );
- + printf( " /veclength x1 dup mul y1 dup mul add sqrt def\n" );
- + printf( " /frequency findresolution veclength div def\n" );
- + printf( " /newscreenangle y1 x1 atan def\n\n" );
- + printf( " m 2 get m 1 get mul m 0 get m 3 get mul sub 0 gt\n\n" );
- + printf( " { { neg } /spotfunction load concatprocs\n" );
- + printf( " /spotfunction exch def\n" );
- + printf( " } if\n\n" );
- + printf( " frequency newscreenangle /spotfunction load\n" );
- + printf( " setscreen\n\n" );
- + printf( " end\n" );
- + printf( "} def\n\n" );
- + printf( "/setpatterndict 18 dict def\n" );
- + printf( "setpatterndict begin\n" );
- + printf( " /bitison\n" );
- + printf( " { /ybit exch def /xbit exch def\n" );
- + printf( " /bytevalue bstring ybit bwidth mul xbit 8 idiv add get def\n" );
- + printf( " /mask 1 7 xbit 8 mod sub bitshift def\n" );
- + printf( " bytevalue mask and 0 ne\n" );
- + printf( " } def\n" );
- + printf( "end\n\n" );
- + printf( "/bitpatternspotfunction\n" );
- + printf( " { setpatterndict begin\n" );
- + printf( " /y exch def /x exch def\n" );
- + printf( " /xindex x 1 add 2 div bpside mul cvi def\n" );
- + printf( " /yindex y 1 add 2 div bpside mul cvi def\n\n" );
- + printf( " xindex yindex bitison\n" );
- + printf( " {/onbits onbits 1 add def 1 }\n" );
- + printf( " {/offbits offbits 1 add def 0 }\n" );
- + printf( " ifelse\n" );
- + printf( " end\n" );
- + printf( "} def\n\n" );
- + printf( "/setpattern\n" );
- + printf( " { setpatterndict begin\n" );
- + printf( " /cellsz exch def\n" );
- + printf( " /angle exch def\n" );
- + printf( " /bwidth exch def\n" );
- + printf( " /bpside exch def\n" );
- + printf( " /bstring exch def\n\n" );
- + printf( " /onbits 0 def /offbits 0 def\n" );
- + printf( " cellsz angle /bitpatternspotfunction load\n" );
- + printf( " setuserscreen\n" );
- + printf( " {} settransfer\n" );
- + printf( " offbits offbits onbits add div setgray\n" );
- + printf( " end\n" );
- + printf( "} def\n\n" );
- + printf( "/patterns [\n" );
- + printf( " <ffffffffffffffff>\n" );
- + printf( " <ffffffffffffffff>\n" );
- + printf( " <ff7f3f1f0f070301>\n" );
- + printf( " <1028448244281000>\n" );
- + printf( " <ffffff0000000000> \n" );
- + printf( " <e0e0e0e0e0e0e0e0> \n" );
- + printf( " <0000183c3c180000>\n" );
- + printf( " <8040201008040201>\n" );
- + printf( " <0102040810204080>\n" );
- + printf( " <1818ff818181ff18>\n" );
- + printf( " <0000000000000000>\n" );
- + printf( " <e0380e03030e38e0>\n" );
- + printf( " <80808080808080ff>\n" );
- + printf( " <8142241818244281>\n" );
- + printf( " <d1e3c5885c3e1d88>\n" );
- + printf( " <2e1c3a77a3c1e277>\n" );
- + printf( "] def\n\n\n" );
- + printf( "/setfillpattern\n" );
- + printf( "{\n" );
- + printf( " /pat exch def\n\n" );
- + printf( " pat ceiling 1 le { pat setgray } \n" );
- + printf( " { patterns pat ceiling cvi get\n" );
- + printf( " 8 1 0 72 300 32 div div setpattern }\n" );
- + printf( " ifelse\n\n" );
- + printf( "} def\n\n" );
- +
- printf( "%%%%EndProlog\n%%%%Page: ? 1\nsave\n" ); /* begin first page */
- }
-
- ***************
- *** 101,107 ****
- PSshade( s )
- double s;
- {
- ! printf( "closepath\n%3.2f setgray\nfill\n0 setgray\n", s );
- }
-
- /* ============================== */
- --- 209,215 ----
- PSshade( s )
- double s;
- {
- ! printf( "closepath\n%3.2f setfillpattern\nfill\n0 setgray\n", s );
- }
-
- /* ============================== */
- *** src/pcode.c.orig Wed Dec 9 14:12:44 1992
- --- src/pcode.c Fri Dec 11 09:32:29 1992
- ***************
- *** 110,121 ****
- --- 110,126 ----
- sysdate( &mon, &day, &yr ); systime( &hr, &min, &sec );
-
- fprintf( stderr, "IPL graphics system version 1.0 by Steve Grubb\n" );
- + fprintf( stderr, "Pattern enhancements by Ready-to-Run Software, Inc\n" );
-
- /* initialize devices */
- if( dev == 's' || dev == 'v' ) {
- + #ifdef NOSUNVIEW
- + fprintf( stderr, "pcode: no Sunview support\n"); exit();
- + #else
- SVsetup( 11.0, 11.0 );
- SVclear();
- pdev = 's';
- + #endif
- }
-
- else if( dev == 't' ) {
- --- src/rect.c.orig Tue Aug 31 10:57:10 1993
- +++ src/rect.c Tue Aug 31 15:43:18 1993
- @@ -43,3 +43,65 @@
- NTlin( xlo, ylo );
- }
- }
- +/* ab_rect_sh() - shadow rectangle in absolute space */
- +ab_rect_sh(xlo, ylo, xhi, yhi, shade, outline, offx, offy)
- +double xlo, ylo, xhi, yhi, shade, offx, offy;
- +int outline;
- +{
- +double tmpd;
- +
- +if((offx == 0.0) && (offy == 0.0))
- + return;
- +if(yhi < ylo) {
- + tmpd = yhi;
- + yhi = ylo;
- + ylo = tmpd;
- +}
- +ab_rect( xlo + offx, ylo + offy, xhi + offx, yhi + offy, shade, 0);
- +if ( outline ) {
- + if(offx > 0.0) {
- + NTmov(xhi + offx, ylo + offy);
- + NTlin(xhi + offx, yhi + offy);
- + }
- + else {
- + NTmov(xlo + offx, ylo + offy);
- + NTlin(xlo + offx, yhi + offy);
- + }
- +}
- +if( shade >= 0.0 ) {
- + NTmov(xlo, ylo);
- + NTpath(xlo + offx, ylo + offy);
- + NTpath(xhi + offx, ylo + offy);
- + NTpath(xhi, ylo);
- + NTshade(shade);
- +}
- +if( outline) {
- + NTmov(xlo, ylo);
- + NTlin(xlo + offx, ylo + offy);
- + if(offy < 0.0)
- + NTlin(xhi + offx, ylo + offy);
- + else
- + NTmov(xhi + offx, ylo + offy);
- + NTlin(xhi, ylo);
- + NTlin(xlo, ylo);
- +}
- +if( shade >= 0.0) {
- + NTmov(xlo, yhi);
- + NTpath(xlo + offx, yhi + offy);
- + NTpath(xhi + offx, yhi + offy);
- + NTpath(xhi, yhi);
- + NTshade(shade);
- +}
- +if( outline) {
- + NTmov(xlo, yhi);
- + NTlin(xlo + offx, yhi + offy);
- + if(offy > 0.0)
- + NTlin(xhi + offx, yhi + offy);
- + else
- + NTmov(xhi + offx, yhi + offy);
- + NTlin(xhi, yhi);
- + NTlin(xlo, yhi);
- +}
- +}
- +
- +
- --- src/bargraph.c.orig Tue Aug 31 10:56:57 1993
- +++ src/bargraph.c Tue Aug 31 15:53:42 1993
- @@ -32,6 +32,7 @@
- sep,
- msep = 0.03;
- char str[10];
- +double offx, offy;
-
-
- /* get the data field list */
- @@ -82,6 +83,9 @@
- /* x distance between major bar spaces */
- gget( Buf, "Separation" ); sep = atof( Buf );
-
- +gget( Buf, "Shadow" );
- +sscanf( Buf, "%lf %lf", &offx, &offy );
- +
- gget( Buf, "Separation.sub" ); msep = atof( Buf );
-
- xspace = ( (Xhi-Xlo)/((DXhi-DXlo)+1) ) - (sep*Scale_x);
- @@ -122,12 +126,20 @@
- continue;
- }
- y = atof(D[i-1][ k[j]-1 ]);
- - if( y != DYlo )
- - ab_rect( curx, da_y(zer), curx+(subspace-msep), da_y(y), s[j], (s[j]==1)?1:outline );
- + if( y != DYlo ) {
- + ab_rect_sh(curx, da_y(zer), curx + (subspace-msep), da_y(y), s[j],
- + (s[j]==1)?1:outline, offx, offy);
- + ab_rect( curx, da_y(zer), curx+(subspace-msep),
- + da_y(y), s[j], (s[j]==1)?1:outline );
- +
- + }
- if( label ) {
- if( y < zer || format == STACK ) f = (-lblpos)-Chh; else f = lblpos;
- strcpy( str, D[i-1][ idf[j]-1 ] );
- - NTmov( curx, da_y(y)+f );
- + if((offy > 0) && (y > zer))
- + NTmov( curx + offx, da_y(y)+f+offy );
- + else
- + NTmov( curx, da_y(y)+f );
- NTcentext( str, subspace-msep );
- }
- if( format == STACK ) for( jj = 1; jj < n; jj++ ) {
- @@ -136,11 +148,18 @@
- continue;
- }
- y2 = y + atof( D[i-1][ k[jj] -1 ] );
- - if( y2 != DYlo )
- - ab_rect( curx, da_y(y), curx+(subspace-msep), da_y(y2), s[jj], (s[jj]==1)?1:outline );
- + if( y2 != DYlo ) {
- + ab_rect_sh( curx, da_y(y), curx+(subspace-msep), da_y(y2),
- + s[jj], (s[jj]==1)?1:outline, offx, offy );
- + ab_rect( curx, da_y(y), curx+(subspace-msep), da_y(y2),
- + s[jj], (s[jj]==1)?1:outline );
- + }
- if( label ) {
- if( y2 < zer || format == STACK ) f = (-lblpos)-Chh; else f = lblpos;
- - NTmov( curx, da_y(y2)+f );
- + if((offy > 0) && (y2 > zer))
- + NTmov( curx + offx, da_y(y2)+f+offy );
- + else
- + NTmov( curx, da_y(y2)+f );
- strcpy( str, D[i-1][ idf[jj]-1 ] );
- NTcentext( str, subspace-msep );
- }
- @@ -152,7 +171,7 @@
- }
-
- gget( Buf, "Segment" );
- -if( Buf[0] == 'y' )
- +if( (Buf[0] == 'y' ) && (offx == 0.0) && (offy == 0.0))
- for( f = DYlo+DYtic; f < DYhi; f += DYtic )
- rect( DXlo + 0.2, f-(DYhi*0.003), DXhi - 0.2, f+(DYhi*0.004), 1.0, 0 );
- }
- --- src/template.h.orig Tue Aug 31 10:57:11 1993
- +++ src/template.h Tue Aug 31 16:06:38 1993
- @@ -73,6 +73,7 @@
- "Idfield.position: -1 to 1 : 0.02 : distance of label above (or below) top of bar (inches)",
- "Idfield.size: charsize : 6 : char size of labels",
- "Idfield: dfield (list8) : : bars can be labeled using these field(s)",
- +"Shadow: coordpair : 0.0 0.0 : Offset of shadow, in absolute units." ,
- "Killwild: number : : if a data value greater than this is found, abort ",
- "Outlinebars: {y,n} : y : outline for each bar",
- "Saveas: token : : to save a set of parms for cloning",
- @@ -222,6 +223,7 @@
- "Field: dfield (M) : : Data field to use. Numbers should be integer percentages.",
- "Center: coordpair : 4.0 5.5 : Location of center, in absolute units." ,
- "Radius: 0 to 5 : 3 : Radius of pie, in absolute units.",
- +"Shadow: coordpair : 0.0 0.0 : Offset of shadow, in absolute units." ,
- "Shade: color list20 : : Shades of pie sections",
- "Linethick: 0 to 10 : 1 : Thickness of lines",
- "Explode: 0 to 3 : 0.1 : Distance in abs units to 'explode' each piece",
- @@ -320,7 +322,7 @@
- int Tdx[30] = { 0,
- 64, /* Areadef */
- 4, /* Arrow */
- - 17, /* Barg */
- + 18, /* Barg */
- 11, /* Boxp */
- 17, /* Dist */
- 8, /* Draw */
- @@ -332,7 +334,7 @@
- 11, /* Nicetab */
- 11, /* Page */
- 3, /* Pagebreak */
- - 10, /* Pie */
- + 11, /* Pie */
- 6, /* Point */
- 11, /* Polygon */
- 3, /* QuitAppend */
- --- src/pie.c.orig Tue Aug 31 10:57:09 1993
- +++ src/pie.c Tue Aug 31 16:17:38 1993
- @@ -5,6 +5,9 @@
- int i, f, first, ns, explode;
- double theta, val, stop;
- double hx, hy, x, y, r;
- +double offx;
- +double offy;
- +double sh_hx, sh_hy; /* shadow control */
- double sh[20], lt;
- double u, ux, uy, adj;
-
- @@ -14,6 +17,9 @@
- gget( Buf, "Center" );
- sscanf( Buf, "%lf %lf", &hx, &hy );
-
- +gget( Buf, "Shadow" );
- +sscanf( Buf, "%lf %lf", &offx, &offy );
- +
- gget( Buf, "Radius" );
- r = atof( Buf );
-
- @@ -32,6 +38,52 @@
- &sh[0],&sh[1],&sh[2],&sh[3],&sh[4],&sh[5],&sh[6],&sh[7],&sh[8],&sh[9],
- &sh[10],&sh[11],&sh[12],&sh[13],&sh[14],&sh[15],&sh[16],&sh[17],&sh[18],&sh[19] );
-
- +
- +/* do background and shadows */
- +if((offx != 0.0) || (offy != 0.0)) {
- + theta = adj * (3.1415927/180.0);
- + for( i = 0; i < N_d_rows; i++ ) {
- +
- + val = atof( D[i][f-1] );
- +
- + /* convert val (percentage) to radians.. */
- + val = ( val/100.0 ) * 6.28319;
- + stop = theta + val;
- + ux = u * cos( theta+(val/2.0) );
- + uy = u * sin( theta+(val/2.0) );
- +
- + sh_hx = hx + offx;
- + sh_hy = hy + offy;
- +
- + first = 1;
- + for( ; theta < stop ; theta += 0.02 ) {
- + x = sh_hx + (r * cos( theta ));
- + y = sh_hy + (r * sin( theta ));
- + if( first ) {
- + NTmov( x+ux, y+uy );
- + first = 0;
- + }
- + NTlin( x+ux, y+uy );
- + NTlin( x+ux - offx, y+uy - offy);
- + NTlin( x+ux, y+uy);
- +
- + }
- + if (i < (N_d_rows - 1))
- + theta = stop;
- + else
- + theta = adj * (3.1415927/180.0);
- + x = sh_hx + (r * cos( theta ));
- + y = sh_hy + (r * sin( theta ));
- + NTlin( x+ux, y+uy );
- +
- + NTlinetype( "0", 2.0*lt, 1.0 );
- + NTmov( x+ux - offx, y+uy - offy);
- + NTlin( x+ux, y+uy);
- + NTlinetype( "0", lt, 1.0 );
- + }
- + NTshade( 0.5 );
- +}
- +
- /* do shades */
- theta = adj * (3.1415927/180.0) ;
- for( i = 0; i < N_d_rows; i++ ) {
- @@ -45,15 +97,28 @@
- uy = u * sin( theta+(val/2.0) );
-
- first = 1;
- - for( ; theta < (stop+0.001); theta += 0.02 ) {
- + for( ; theta < stop ; theta += 0.02 ) {
- x = hx + (r * cos( theta ));
- y = hy + (r * sin( theta ));
- - if( first ) { NTmov( hx+ux, hy+uy ); NTpath( x+ux, y+uy ); first = 0; }
- + if( first ) {
- + if (N_d_rows != 1) {
- + NTmov( hx+ux, hy+uy );
- + NTpath( x+ux, y+uy );
- + }
- + else NTmov( x+ux, y+uy );
- + first = 0;
- + }
- NTpath( x+ux, y+uy );
- }
- + if (i < (N_d_rows - 1))
- + theta = stop;
- + else
- + theta = adj * (3.1415927/180.0);
- + x = hx + (r * cos( theta ));
- + y = hy + (r * sin( theta ));
- + NTpath( x+ux, y+uy );
- if( i < ns )NTshade( sh[i] );
- else NTshade( 1.0 );
- - theta = stop;
- }
-
- /* do lines */
- @@ -69,14 +134,27 @@
- uy = u * sin( theta+(val/2.0) );
-
- first = 1;
- - for( ; theta < (stop+0.001); theta += 0.02 ) {
- + for( ; theta < stop ; theta += 0.02 ) {
- x = hx + (r * cos( theta ));
- y = hy + (r * sin( theta ));
- - if( first ) { NTmov( hx+ux, hy+uy ); NTlin( x+ux, y+uy ); first = 0; }
- + if( first ) {
- + if (N_d_rows != 1) {
- + NTmov( hx+ux, hy+uy );
- + NTlin( x+ux, y+uy );
- + }
- + else NTmov( x+ux, y+uy );
- + first = 0;
- + }
- NTlin( x+ux, y+uy );
- }
- - NTlin( hx+ux, hy+uy );
- - theta = stop;
- + if (i < (N_d_rows - 1))
- + theta = stop;
- + else
- + theta = adj * (3.1415927/180.0);
- + x = hx + (r * cos( theta ));
- + y = hy + (r * sin( theta ));
- + NTlin( x+ux, y+uy );
- + if (i > 1) NTlin( hx+ux, hy+uy );
- }
-
- NTnormline();
-