summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/tgd/Makefile5
-rw-r--r--graphics/tgd/files/patch-aa21
-rw-r--r--graphics/tgd/files/patch-ab157
-rw-r--r--graphics/tgd/files/patch-ac19
-rw-r--r--graphics/tgd/files/patch-ad49
-rw-r--r--graphics/tgd/files/patch-ae300
-rw-r--r--graphics/tgd/files/tgdcommand.h6
-rw-r--r--graphics/tgd/files/tgdgd.h47
8 files changed, 595 insertions, 9 deletions
diff --git a/graphics/tgd/Makefile b/graphics/tgd/Makefile
index 1137321..37132c8 100644
--- a/graphics/tgd/Makefile
+++ b/graphics/tgd/Makefile
@@ -3,7 +3,7 @@
# Date created: 22 February 1999
# Whom: mharo@area51.fremont.ca.us
#
-# $Id$
+# $Id: Makefile,v 1.1.1.1 1999/04/03 01:42:08 steve Exp $
#
DISTNAME= tgd1.2c
@@ -22,6 +22,9 @@ DOCS= README arc.gif cap.gif char.gif fill.gif fontdemo \
helloworld.pl keygifcap.gif keypad.gif keypad.html \
keypad.inp keypad.map keypad.pl poly.gif polydemo \
rainbow.gif rainbow.pl tgd.gif tgd.html
+pre-build:
+ ${CP} ${FILESDIR}/tgdcommand.h ${WRKSRC}/
+ ${CP} ${FILESDIR}/tgdgd.h ${WRKSRC}/
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/tgd ${PREFIX}/bin
.if !defined(NOPORTDOCS)
diff --git a/graphics/tgd/files/patch-aa b/graphics/tgd/files/patch-aa
index 66f474b..a3cfc98 100644
--- a/graphics/tgd/files/patch-aa
+++ b/graphics/tgd/files/patch-aa
@@ -1,25 +1,30 @@
---- Makefile.orig Mon Feb 22 09:40:53 1999
-+++ Makefile Mon Feb 22 09:47:40 1999
+--- Makefile.orig Mon Oct 7 15:31:25 1996
++++ Makefile Sat Apr 3 11:15:32 1999
@@ -26,11 +26,10 @@
#
PROG = tgd
HOME = .
-GDHOME = $(HOME)/gd1.2
- CC = gcc
+-CC = gcc
++CC ?= gcc
CDEFS =
-INCLUDE = -I$(HOME) -I$(GDHOME)
-GDLIB = $(GDHOME)/libgd.a
-+INCLUDE = -I$(HOME) -I/usr/local/include/gd
-+GDLIB = /usr/local/lib/libgd.a
++INCLUDE = -I$(HOME) -I${PREFIX}/include/gd
++GDLIB = ${PREFIX}/lib/libgd.a
#
# Some debugging/profiling options
# CFLAGS = -p $(CDEFS) $(INCLUDE)
-@@ -43,7 +42,7 @@
- CFLAGS = $(CDEFS) $(INCLUDE)
+@@ -40,10 +39,10 @@
+ #
+ # CFLAGS = -g $(CDEFS) $(INCLUDE)
+ # LDFLAGS = -g -n
+-CFLAGS = $(CDEFS) $(INCLUDE)
++CFLAGS += $(CDEFS) $(INCLUDE)
LDFLAGS =
-LDLIBS = -L$(GDHOME) -lgd -lm
-+LDLIBS = -L/usr/local/lib -lgd -lm
++LDLIBS = -L${PREFIX}/lib -lgd -lm
MAKEFILE = Makefile
FONT1 = tgdFont10x20.c tgdFont12x24.c tgdFont5x8.c tgdFont6x10.c
FONT2 = tgdFont6x12.c tgdFont6x13.c tgdFont6x13bold.c tgdFont6x9.c
diff --git a/graphics/tgd/files/patch-ab b/graphics/tgd/files/patch-ab
new file mode 100644
index 0000000..70597d5
--- /dev/null
+++ b/graphics/tgd/files/patch-ab
@@ -0,0 +1,157 @@
+--- tgd.c.orig Mon Oct 7 15:31:25 1996
++++ tgd.c Sat Apr 3 11:41:37 1999
+@@ -31,7 +31,7 @@
+ #include <strings.h>
+ #endif
+ #include <ctype.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include "gd.h"
+ #include "gdfontl.h"
+ #include "gdfonts.h"
+@@ -40,6 +40,7 @@
+ #include "gdfontt.h"
+ #include "tgdsamfont.h"
+ #include "tgd.h"
++#include "tgdcommand.h"
+
+ static char SCCS[] = "@(#)tgd.c 1.6 10/13/95 tgd";
+ static char *Current_file; /* Name of current input file */
+@@ -54,9 +55,11 @@
+ COLOUR *colourbyname();
+ TIM *timbyname();
+ static void tgdgo();
+-static init();
++static void init();
++static void loadfonts();
++static void unloadfonts();
+
+-main( argc, argv )
++int main( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -79,7 +82,7 @@
+ fclose( fp );
+ }
+ }
+- exit( 0 );
++ return 0;
+ }
+
+
+@@ -87,7 +90,7 @@
+ * Unrecoverable error, terminate program with
+ * a message.
+ */
+-die( s )
++void die( char *s )
+ {
+ char buf[BUFSIZ];
+ sprintf( buf, "tgd error is [%s]. Near line %d in file %s.\n",
+@@ -101,7 +104,7 @@
+ * Setting Ldebug less than 0 will completely
+ * shut program up.
+ */
+-tgdputs( s )
++void tgdputs( s )
+ char *s;
+ {
+ if ( Ldebug >= 0 )
+@@ -111,7 +114,7 @@
+ /* --
+ * All error reports should go through here.
+ */
+-tgdputerr( s )
++void tgdputerr( char *s )
+ {
+ fprintf( Fp_err, "%s\n", s );
+ }
+@@ -120,7 +123,7 @@
+ * (Re)Initialize datastructures for each input file.
+ */
+ static
+-init()
++void init()
+ {
+ int i, j;
+
+@@ -236,13 +239,14 @@
+ }
+ }
+ die( "too many images" );
++ return 0; /* turn off compiler warning */
+ }
+
+ /* --
+ * Called when we read in an image to synchronize
+ * our conception of the image with the GD library.
+ */
+-timset( tim )
++void timset( tim )
+ TIM *tim;
+ {
+ int colors;
+@@ -306,7 +310,7 @@
+ * off all standard output, including that from
+ * printing functions.
+ */
+-tgddebug( argc, argv )
++void tgddebug( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -316,7 +320,7 @@
+ /* --
+ * center the string on the given x y coords. (see imagestring)
+ */
+-tgdstringcenter( argc, argv )
++void tgdstringcenter( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -347,7 +351,7 @@
+ * Note that "macros" can be built
+ * up out of text commands.
+ */
+-tgdstockimage( argc, argv )
++void tgdstockimage( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -418,7 +422,7 @@
+ /* --
+ * Release argv strings
+ */
+-tgdargdestroy( argc, argv )
++void tgdargdestroy( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -434,7 +438,7 @@
+ /* --
+ * Report on the current comand.
+ */
+-tgdshowvector( argc, argv )
++void tgdshowvector( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -510,7 +514,7 @@
+ * Font names are case-insenstive to user, so make names
+ * all lower case here (cf. fontbyname() ).
+ */
+-loadfonts()
++static void loadfonts()
+ {
+ /* Font kludge XXX */
+ strcpy( Font[0].name, "gdfontsmall" );
+@@ -562,7 +566,7 @@
+ /* --
+ * Eventually will dump fonts out of memory
+ */
+-unloadfonts()
++static void unloadfonts()
+ {
+ /* XXX */
+ }
diff --git a/graphics/tgd/files/patch-ac b/graphics/tgd/files/patch-ac
new file mode 100644
index 0000000..c1b22d6
--- /dev/null
+++ b/graphics/tgd/files/patch-ac
@@ -0,0 +1,19 @@
+--- tgd.h.orig Sat Apr 3 11:26:30 1999
++++ tgd.h Sat Apr 3 12:01:55 1999
+@@ -35,4 +35,16 @@
+ COLOUR colour[MAXCOLOUR]; /* Map colour names to gd id's */
+ } TIM; /* Map user supplied image name to a gd image pointer */
+
++/* prototypes */
++void die( char * );
++void tgdstringcenter( int, char ** );
++void tgdputerr( char * );
++void tgdstockimage( int, char ** );
++void tgddebug( int, char ** );
++void tgdargdestroy( int, char ** );
++void tgdshowvector( int, char ** );
++int tgdtokenize( char *, char** );
++void tgdputs( char * );
++void timset( TIM * );
++
+ #endif /* TGD_H */ /* End of file tgd.h */
diff --git a/graphics/tgd/files/patch-ad b/graphics/tgd/files/patch-ad
new file mode 100644
index 0000000..50e0087
--- /dev/null
+++ b/graphics/tgd/files/patch-ad
@@ -0,0 +1,49 @@
+--- tgdcommand.c.orig Sat Apr 3 11:38:42 1999
++++ tgdcommand.c Sat Apr 3 12:12:23 1999
+@@ -8,6 +8,12 @@
+ */
+
+ #include <stdio.h>
++#include <ctype.h>
++#include <string.h>
++#include "gd.h"
++#include "tgd.h"
++#include "tgdcommand.h"
++#include "tgdgd.h"
+
+ static char SCCS[] = "@(#)tgdcommand.c 1.4 10/5/95 tgd";
+
+@@ -170,6 +176,7 @@
+
+ strcat( buf, " is not a known command" );
+ die( buf );
++ return 0; /* turn off compiler warning */
+ }
+
+ /* --
+@@ -184,6 +191,7 @@
+ if ( cmd->id == id )
+ return cmd;
+ die( "command not found" ); /* XXX return NULL ? */
++ return 0; /* turn off compiler warning */
+ }
+
+ /* --
+@@ -205,7 +213,7 @@
+ CMD *cmd;
+
+ if ( cmd_id == TGDBLANKLINE )
+- return;
++ return 0; /* potential bug: value should be ignored */
+ /* one character in argcheck for each argument */
+ cmd = cmdbyid( cmd_id );
+ for ( s = cmd->argcheck, count = 0; *s; s++, count++ ) {
+@@ -250,7 +258,7 @@
+ /* --
+ * Find the routine to handle the command.
+ */
+-tgdcommand( argc, argv )
++void tgdcommand( argc, argv )
+ int argc;
+ char *argv[];
+ {
diff --git a/graphics/tgd/files/patch-ae b/graphics/tgd/files/patch-ae
new file mode 100644
index 0000000..050db8b
--- /dev/null
+++ b/graphics/tgd/files/patch-ae
@@ -0,0 +1,300 @@
+--- tgdgd.c.orig Sat Apr 3 11:44:32 1999
++++ tgdgd.c Sat Apr 3 12:02:18 1999
+@@ -16,8 +16,10 @@
+ */
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include "gd.h"
+ #include "tgd.h"
++#include "tgdgd.h"
+
+ static char SCCS[] = "@(#)tgdgd.c 1.4 10/7/96 tgd";
+
+@@ -32,7 +34,7 @@
+ /* --
+ * ... handle cx cy w h start_degrees end_degrees color
+ */
+-imagearc( argc, argv )
++void imagearc( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -56,7 +58,7 @@
+ /* --
+ * handle color
+ */
+-imageblue( argc, argv )
++void imageblue( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -96,7 +98,7 @@
+ * ... handle font x y c color
+ * (not sure whether char should be an integer, string for now.)
+ */
+-imagechar( argc, argv )
++void imagechar( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -119,7 +121,7 @@
+ /* --
+ * ... handle font x y c color
+ */
+-imagecharup( argc, argv )
++void imagecharup( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -142,7 +144,7 @@
+ /* --
+ * ... handle colorname red green blue
+ */
+-imagecolorallocate( argc, argv )
++void imagecolorallocate( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -171,7 +173,7 @@
+ * Prints closest user colorname to specified rgb.
+ * ... handle r g b
+ */
+-imagecolorclosest( argc, argv )
++void imagecolorclosest( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -217,7 +219,7 @@
+ * Prints color name matching r g b,
+ * or "-1" if no match.
+ */
+-imagecolorexact( argc, argv )
++void imagecolorexact( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -246,7 +248,7 @@
+ /* --
+ * ... handle color
+ */
+-imagecolortransparent( argc, argv )
++void imagecolortransparent( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -310,7 +312,7 @@
+ /* --
+ * ... handle x y
+ */
+-imagecreate( argc, argv )
++void imagecreate( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -323,7 +325,7 @@
+ /* --
+ * ... handle filename
+ */
+-imagecreatefromgd( argc, argv )
++void imagecreatefromgd( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -345,7 +347,7 @@
+ /* --
+ * ... handle filename
+ */
+-imagecreatefromgif( argc, argv )
++void imagecreatefromgif( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -367,7 +369,7 @@
+ * ... handle filename.xbm
+ * XXX Not working?
+ */
+-imagecreatefromxbm( argc, argv )
++void imagecreatefromxbm( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -388,7 +390,7 @@
+ /* --
+ * ... handle
+ */
+-imagecolorstotal( argc, argv )
++void imagecolorstotal( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -403,7 +405,7 @@
+ /* --
+ * supposedly defunct in 1.1.1 kept for backwards compatibility
+ */
+-imagedashedline( argc, argv )
++void imagedashedline( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -426,7 +428,7 @@
+ /* --
+ * ... handle
+ */
+-imagedestroy( argc, argv )
++void imagedestroy( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -490,7 +492,7 @@
+ /* --
+ * ... handle x1, y1, x2, y2, color
+ */
+-imagefilledrectangle( argc, argv )
++void imagefilledrectangle( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -511,7 +513,7 @@
+ /* --
+ * ... handle filename
+ */
+-imagegd( argc, argv )
++void imagegd( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -537,7 +539,7 @@
+ * ... handle
+ * print 1 if interlaced 0 otherwise
+ */
+-imagegetinterlaced( argc, argv )
++void imagegetinterlaced( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -553,7 +555,7 @@
+ /* --
+ * ... handle x y
+ */
+-imagegetpixel( argc, argv )
++void imagegetpixel( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -561,7 +563,6 @@
+ int x, y;
+ int cdex;
+ COLOUR *color;
+- char buf[100];
+ if ( NULL == ( tim = timbyname( argv[1] ) ) )
+ die( argv[1] );
+ x = atoi( argv[2] );
+@@ -577,7 +578,7 @@
+ /* --
+ * Print user name for color which is transparent for this image.
+ */
+-imagegettransparent( argc, argv )
++void imagegettransparent( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -600,7 +601,7 @@
+ /*
+ * imagegif handle filename
+ */
+-imagegif( argc, argv )
++void imagegif( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -625,7 +626,7 @@
+ /* --
+ * ... handle color
+ */
+-imagegreen( argc, argv )
++void imagegreen( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -664,7 +665,7 @@
+ /* --
+ * ... handle x1 y1 x2 y2 color
+ */
+-imageline( argc, argv )
++void imageline( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -686,7 +687,7 @@
+ /* --
+ * handle x1 y1 ... xn yn n color
+ */
+-imagefilledpolygon( argc, argv )
++void imagefilledpolygon( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -760,7 +761,7 @@
+ /* --
+ * ... handle color
+ */
+-imagered( argc, argv )
++void imagered( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -779,7 +780,7 @@
+ /* --
+ * ... handle
+ */
+-imagesx( argc, argv )
++void imagesx( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -796,7 +797,7 @@
+ /* --
+ * ... handle
+ */
+-imagesy( argc, argv )
++void imagesy( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -815,7 +816,7 @@
+ * ... handle brush_handle
+ * Set a special color as the brush
+ */
+-imagesetbrush( argc, argv )
++void imagesetbrush( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -894,7 +895,7 @@
+ /* --
+ * handle tile_handle
+ */
+-imagesettile( argc, argv )
++void imagesettile( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -910,7 +911,7 @@
+ /* --
+ * ... handle font x y s color
+ */
+-imagestring( argc, argv )
++void imagestring( argc, argv )
+ int argc;
+ char *argv[];
+ {
+@@ -934,7 +935,7 @@
+ /* --
+ * ... handle font x y s color
+ */
+-imagestringup( argc, argv )
++void imagestringup( argc, argv )
+ int argc;
+ char *argv[];
+ {
diff --git a/graphics/tgd/files/tgdcommand.h b/graphics/tgd/files/tgdcommand.h
new file mode 100644
index 0000000..2fb874f
--- /dev/null
+++ b/graphics/tgd/files/tgdcommand.h
@@ -0,0 +1,6 @@
+#ifndef TGDCOMMAND_H
+#define TGDCOMMAND_H
+
+void tgdcommand( int, char ** );
+
+#endif
diff --git a/graphics/tgd/files/tgdgd.h b/graphics/tgd/files/tgdgd.h
new file mode 100644
index 0000000..ac77848
--- /dev/null
+++ b/graphics/tgd/files/tgdgd.h
@@ -0,0 +1,47 @@
+#ifndef TGDGD_H
+#define TGDGD_H
+
+void imagearc( int, char ** );
+void imageblue( int, char ** );
+void imageboundssafe( int, char ** );
+void imagechar( int, char ** );
+void imagecolorallocate( int, char ** );
+void imagecolordeallocate( int, char ** );
+void imagecolorclosest( int, char ** );
+void imagecolorexact( int, char ** );
+void imagecolortransparent( int, char ** );
+void imagecopy( int, char ** );
+void imagecopyresized( int, char ** );
+void imagecreate( int, char ** );
+void imagecreatefromgd( int, char ** );
+void imagecreatefromgif( int, char ** );
+void imagecreatefromxbm( int, char ** );
+void imagecolorstotal( int, char ** );
+void imagedashedline( int, char ** );
+void imagedestroy( int, char ** );
+void imagefill( int, char ** );
+void imagefilltoborder( int, char ** );
+void imagefilledrectangle( int, char ** );
+void imagegd( int, char ** );
+void imagegetinterlaced( int, char ** );
+void imagegetpixel( int, char ** );
+void imagegettransparent( int, char ** );
+void imagegif( int, char ** );
+void imagegreen( int, char ** );
+void imageinterlace( int, char ** );
+void imageline( int, char ** );
+void imagefilledpolygon( int, char ** );
+void imagepolygon( int, char ** );
+void imagerectangle( int, char ** );
+void imagered( int, char ** );
+void imagesx( int, char ** );
+void imagesy( int, char ** );
+void imagesetbrush( int, char ** );
+void imagesetpixel( int, char ** );
+void imagesetstyle( int, char ** );
+void imagesettile( int, char ** );
+void imagestring( int, char ** );
+void imagestringup( int, char ** );
+void imagecharup( int, char ** );
+
+#endif
OpenPOWER on IntegriCloud