summaryrefslogtreecommitdiff
path: root/graphics/urt
diff options
context:
space:
mode:
authorSimon Barner <barner@FreeBSD.org>2005-03-13 17:09:55 +0000
committerSimon Barner <barner@FreeBSD.org>2005-03-13 17:09:55 +0000
commit38b13ce6f1222ca993754283d737f5bba4a2507d (patch)
tree98704e84fbc23f42ff675fc8cc9b437cb610816c /graphics/urt
parent- Correct typo (diff)
- Prepare to build cad/brlcad with framebuffer support
- Multiple minor patches to clean up the code and avoid compiler warnings (in order to prevent possible errors with future versions of GCC or other modern compilers) Remark: graphics/urt is also included in the cad/brlcad distribution, and has been factured out for the ports collection. The submitter merged some cleanups for IRIX by Lee Butler in order to prevent the mess of two diverging urt versions in the ports tree (the one bundled with cad/brlcad and graphics/urt). He also contributed serveral improvments himself. PR: ports/78687 Submitted by: Pedro F. Giffuni <giffunip@yahoo.com> Approved by: arved
Notes
Notes: svn path=/head/; revision=131110
Diffstat (limited to 'graphics/urt')
-rw-r--r--graphics/urt/files/patch-cnv::gif2rle.c11
-rw-r--r--graphics/urt/files/patch-cnv::rletops.c30
-rw-r--r--graphics/urt/files/patch-cnv::rletorla.c20
-rw-r--r--graphics/urt/files/patch-cnv::rletovcr.c24
-rw-r--r--graphics/urt/files/patch-cnv::vcrtorele.c81
-rw-r--r--graphics/urt/files/patch-config::urt14
-rw-r--r--graphics/urt/files/patch-get::getfb.c11
-rw-r--r--graphics/urt/files/patch-get::getx11::XGetHClrs.c4
-rw-r--r--graphics/urt/files/patch-get::makefile.src11
-rw-r--r--graphics/urt/files/patch-lib::inv_cmap.c11
-rw-r--r--graphics/urt/files/patch-lib::scanargs.c15
-rw-r--r--graphics/urt/files/patch-tools::avg4.c11
-rw-r--r--graphics/urt/files/patch-tools::mcut.c20
-rw-r--r--graphics/urt/files/patch-tools::mergechan.c11
-rw-r--r--graphics/urt/files/patch-tools::rlegrid.c19
-rw-r--r--graphics/urt/files/patch-tools::rlehdr.c11
-rw-r--r--graphics/urt/files/patch-tools::rleinterp.c13
-rw-r--r--graphics/urt/files/patch-tools::rlepatch.c20
18 files changed, 324 insertions, 13 deletions
diff --git a/graphics/urt/files/patch-cnv::gif2rle.c b/graphics/urt/files/patch-cnv::gif2rle.c
new file mode 100644
index 000000000000..9241b00f843a
--- /dev/null
+++ b/graphics/urt/files/patch-cnv::gif2rle.c
@@ -0,0 +1,11 @@
+--- cnv/giftorle.c.orig Thu Mar 10 20:04:40 2005
++++ cnv/giftorle.c Thu Mar 10 20:07:12 2005
+@@ -278,7 +278,7 @@
+ max_code_size = 2*clear_code;
+ max_code = clear_code+2;
+
+- GetCode(fd,NULL,TRUE);
++ GetCode(fd,0,TRUE);
+
+ fresh=TRUE;
+
diff --git a/graphics/urt/files/patch-cnv::rletops.c b/graphics/urt/files/patch-cnv::rletops.c
new file mode 100644
index 000000000000..19d1898d8772
--- /dev/null
+++ b/graphics/urt/files/patch-cnv::rletops.c
@@ -0,0 +1,30 @@
+--- cnv/rletops.c.orig Thu Mar 10 20:09:59 2005
++++ cnv/rletops.c Thu Mar 10 20:13:29 2005
+@@ -74,7 +74,7 @@
+ float heightinch = 3.0,
+ center = 3.25,
+ aspect = 1.0;
+- int y, nrow, nscan, i, pix, dummy;
++ int nrow, nscan, i, pix, dummy;
+ float x1, y1, x2, y2, widthinch;
+ unsigned char ** scan;
+ unsigned char * buffer;
+@@ -154,8 +154,7 @@
+ y2 = y1 + heightinch;
+ prologue(outfile,sflag,nscan,nrow,x1,y1,x2,y2);
+
+- while ( (y = rle_getrow( &hdr, scan )) <=
+- hdr.ymax )
++ while ( ( rle_getrow( &hdr, scan )) <= hdr.ymax )
+ {
+ if (gencps) {
+ /* generate a color line */
+@@ -231,7 +230,7 @@
+ FILE *outfile;
+ unsigned char p;
+ {
+- static npixo = 0;
++ static int npixo = 0;
+ static char tohex[] = "0123456789ABCDEF";
+
+ putc(tohex[(p>>4)&0xF],outfile);
diff --git a/graphics/urt/files/patch-cnv::rletorla.c b/graphics/urt/files/patch-cnv::rletorla.c
new file mode 100644
index 000000000000..9c52b427891e
--- /dev/null
+++ b/graphics/urt/files/patch-cnv::rletorla.c
@@ -0,0 +1,20 @@
+--- cnv/rletorla.c.orig Thu Mar 10 23:41:56 2005
++++ cnv/rletorla.c Thu Mar 10 23:39:39 2005
+@@ -312,7 +312,7 @@
+ U_CHAR *buf;
+ int *offset;
+ int width, height;
+- int scan, x, y;
++ int scan, x;
+ short len;
+ long offptr;
+ /*
+@@ -348,7 +348,7 @@
+ exit(-1);
+ }
+ for (scan = 0; scan < height; scan++) {
+- y = rle_getrow(&rle_dflt_hdr, scanline);
++ (void)rle_getrow(&rle_dflt_hdr, scanline);
+ switch (visual) {
+ case GRAYSCALE: /* 8 bits without colormap */
+ red = scanline[0];
diff --git a/graphics/urt/files/patch-cnv::rletovcr.c b/graphics/urt/files/patch-cnv::rletovcr.c
new file mode 100644
index 000000000000..d68f14745fab
--- /dev/null
+++ b/graphics/urt/files/patch-cnv::rletovcr.c
@@ -0,0 +1,24 @@
+--- cnv/rletovcr.c.orig Thu Mar 10 20:17:23 2005
++++ cnv/rletovcr.c Thu Mar 10 20:20:49 2005
+@@ -83,11 +83,10 @@
+ static char COMMENT[80]; /* comment! */
+ #endif
+
+-WriteVICARHeader(fd, width, height, BandsPerPixel)
++void WriteVICARHeader(fd, width, height, BandsPerPixel)
+ FILE *fd;
+ int width, height, BandsPerPixel;
+ {
+- int pad;
+ char *buffer, *bp;
+
+ /*
+@@ -254,7 +253,7 @@
+ int argc;
+ char *argv[];
+ {
+- char *infname = NULL, outfname = NULL;
++ char *infname = NULL, *outfname = NULL;
+ int oflag = 0;
+ unsigned char *VICARImage;
+ rle_hdr the_hdr;
diff --git a/graphics/urt/files/patch-cnv::vcrtorele.c b/graphics/urt/files/patch-cnv::vcrtorele.c
new file mode 100644
index 000000000000..d55a851f18db
--- /dev/null
+++ b/graphics/urt/files/patch-cnv::vcrtorele.c
@@ -0,0 +1,81 @@
+--- cnv/vcrtorle.c.orig Thu Mar 10 20:22:42 2005
++++ cnv/vcrtorle.c Thu Mar 10 20:30:16 2005
+@@ -94,9 +94,6 @@
+
+
+ static int VERBOSE = 0;
+-static char *RoutineName;
+-
+-static long int VICARpos; /* Position in file for reading w/o fseek. */
+
+ static void FatalError(s)
+ char *s;
+@@ -109,20 +106,10 @@
+ static int LBLSIZE; /* size of header, must be int mult of NS */
+ static char FORMAT[80]; /* 'BYTE' is OK */
+ static char TYPE[80]; /* 'IMAGE' is OK */
+-static int BUFSIZe; /* integer multiple of NS ? */
+-static int DIM; /* == 3? */
+-static int EOL; /* == 0? */
+-static int RECSIZE; /* == LBLSIZE? */
+ static char ORG[80]; /* `BSQ` is OK */
+ static int NL; /* height */
+ static int NS; /* width */
+ static int NB; /* samples per pixel? */
+-static int N1; /* == NL? */
+-static int N2; /* == NS? */
+-static int N3; /* == NB? */
+-static int N4; /* 0 is OK */
+-static int NBB; /* 0 is OK */
+-static int NLB; /* 0 is OK */
+ static char HOST[80]; /* machine type? */
+ static char INTFMT[80]; /* integer format? */
+ static char REALFMT[80]; /* real format? */
+@@ -218,20 +205,20 @@
+
+ if (0 == strcmp("FORMAT" ,Name)) {strcpy(FORMAT ,Value); continue;}
+ if (0 == strcmp("TYPE" ,Name)) {strcpy(TYPE ,Value); continue;}
+- if (0 == strcmp("BUFSIZ" ,Name)) {BUFSIZe = atoi(Value); continue;}
+- if (0 == strcmp("DIM" ,Name)) {DIM = atoi(Value); continue;}
+- if (0 == strcmp("EOL" ,Name)) {EOL = atoi(Value); continue;}
+- if (0 == strcmp("RECSIZE",Name)) {RECSIZE = atoi(Value); continue;}
++ if (0 == strcmp("BUFSIZ" ,Name)) { (void) atoi(Value); continue;}
++ if (0 == strcmp("DIM" ,Name)) { (void) atoi(Value); continue;}
++ if (0 == strcmp("EOL" ,Name)) { (void) atoi(Value); continue;}
++ if (0 == strcmp("RECSIZE",Name)) { (void) atoi(Value); continue;}
+ if (0 == strcmp("ORG" ,Name)) {strcpy(ORG ,Value); continue;}
+ if (0 == strcmp("NL" ,Name)) {NL = atoi(Value); continue;}
+ if (0 == strcmp("NS" ,Name)) {NS = atoi(Value); continue;}
+ if (0 == strcmp("NB" ,Name)) {NB = atoi(Value); continue;}
+- if (0 == strcmp("N1" ,Name)) {N1 = atoi(Value); continue;}
+- if (0 == strcmp("N2" ,Name)) {N2 = atoi(Value); continue;}
+- if (0 == strcmp("N3" ,Name)) {N3 = atoi(Value); continue;}
+- if (0 == strcmp("N4" ,Name)) {N4 = atoi(Value); continue;}
+- if (0 == strcmp("NBB" ,Name)) {NBB = atoi(Value); continue;}
+- if (0 == strcmp("NLB" ,Name)) {NLB = atoi(Value); continue;}
++ if (0 == strcmp("N1" ,Name)) { (void) atoi(Value); continue;}
++ if (0 == strcmp("N2" ,Name)) { (void) atoi(Value); continue;}
++ if (0 == strcmp("N3" ,Name)) { (void) atoi(Value); continue;}
++ if (0 == strcmp("N4" ,Name)) { (void) atoi(Value); continue;}
++ if (0 == strcmp("NBB" ,Name)) { (void) atoi(Value); continue;}
++ if (0 == strcmp("NLB" ,Name)) { (void) atoi(Value); continue;}
+ if (0 == strcmp("HOST" ,Name)) {strcpy(HOST ,Value); continue;}
+ if (0 == strcmp("INTFMT" ,Name)) {strcpy(INTFMT ,Value); continue;}
+ if (0 == strcmp("REALFMT",Name)) {strcpy(REALFMT,Value); continue;}
+@@ -249,7 +236,6 @@
+ n++;
+ }
+
+- VICARpos = n;
+ }
+
+ /* RLE stuff */
+@@ -297,7 +283,7 @@
+ unsigned char *VICARImage;
+ char *outfname = NULL;
+ int oflag = 0;
+- int x,y,z;
++ int y;
+ long int nread;
+ rle_hdr the_hdr;
+ rle_pixel **rows;
diff --git a/graphics/urt/files/patch-config::urt b/graphics/urt/files/patch-config::urt
index 37520c4548e5..e38fc0f8d0a5 100644
--- a/graphics/urt/files/patch-config::urt
+++ b/graphics/urt/files/patch-config::urt
@@ -1,5 +1,5 @@
--- config/urt.orig Wed Jul 15 19:47:15 1992
-+++ config/urt Wed Jan 12 17:22:42 2005
++++ config/urt Thu Mar 10 23:52:07 2005
@@ -1,3 +1,7 @@
+# Configuration for HP 9000/300 series running BSD4.3
+
@@ -40,15 +40,7 @@
##define HPUX300CC HP 9000/300 running HP-UX.
##define HPUX800CC HP 9000/800 running HP-UX.
##define IBMR6000CC IBM RS6000.
-@@ -70,14 +74,14 @@
- ##define 386IXCC SVr3 386/ix 2.2
-
- # You can put any system dependent flags here.
--ExtraCFLAGS =
-+ExtraCFLAGS =
-
- # System specific or configuration parameters. Define according to your
- # environment and desires.
+@@ -77,7 +81,7 @@
##define ABEKAS_PAL Convert to PAL format in Abekas A60 tool.
##define ALL_MAN Print/install all man pages.
@@ -127,7 +119,7 @@
#ifdef FB
-LIBFB = /usr/brl/lib/libfb.a
-+LIBFB = $(LOCALBASE)/lib/libfb.a
++LIBFB = $(LOCALBASE)/share/brlcad/lib/libfb.a $(LOCALBASE)/brlcad/lib/libpkg.a
#endif
#ifdef GRINNELL
diff --git a/graphics/urt/files/patch-get::getfb.c b/graphics/urt/files/patch-get::getfb.c
new file mode 100644
index 000000000000..7d587a099cc5
--- /dev/null
+++ b/graphics/urt/files/patch-get::getfb.c
@@ -0,0 +1,11 @@
+--- get/getfb.c.orig Mon Mar 7 23:33:32 2005
++++ get/getfb.c Mon Mar 7 23:44:28 2005
+@@ -47,7 +47,7 @@
+ }
+
+ rle_file = argv[0];
+- rle_names( &hdr, hdr.cmd, rle_file );
++ rle_names( &hdr, hdr.cmd, rle_file, 0 );
+ hdr.rle_file = rle_open_f(hdr.cmd, rle_file, "r");
+ if( rle_get_setup( &hdr ) < 0 ) {
+ fprintf(stderr, "getfb: Error reading setup information\n");
diff --git a/graphics/urt/files/patch-get::getx11::XGetHClrs.c b/graphics/urt/files/patch-get::getx11::XGetHClrs.c
index 39db27126c45..5e8939a991cb 100644
--- a/graphics/urt/files/patch-get::getx11::XGetHClrs.c
+++ b/graphics/urt/files/patch-get::getx11::XGetHClrs.c
@@ -1,5 +1,5 @@
---- get/getx11/XGetHClrs.c.orig Wed Jan 12 17:03:11 2005
-+++ get/getx11/XGetHClrs.c Wed Jan 12 17:06:40 2005
+--- get/getx11/XGetHClrs.c.orig Sun Jan 30 15:48:57 2005
++++ get/getx11/XGetHClrs.c Sun Jan 30 15:49:38 2005
@@ -1,5 +1,4 @@
#ifndef XLIBINT_H_NOT_AVAILABLE
-#include <X11/copyright.h>
diff --git a/graphics/urt/files/patch-get::makefile.src b/graphics/urt/files/patch-get::makefile.src
new file mode 100644
index 000000000000..3063e270d89c
--- /dev/null
+++ b/graphics/urt/files/patch-get::makefile.src
@@ -0,0 +1,11 @@
+--- get/makefile.src.orig Thu Feb 27 21:13:33 1992
++++ get/makefile.src Tue Mar 8 00:10:02 2005
+@@ -54,7 +54,7 @@
+ #ifdef FB
+ # getfb - get to a BRL libfb display
+ #@getfb.out: getfb.c
+-#@ $(CC) $(CFLAGS) $*.c $(LIBS) $(LIBFB) -lm -o $*.new
++#@ $(CC) $(CFLAGS) $(INCFB) $*.c $(LIBS) $(LIBFB) $(LIBX11) -lm -o $*.new
+ #@ mv $*.new $@
+ #endif
+
diff --git a/graphics/urt/files/patch-lib::inv_cmap.c b/graphics/urt/files/patch-lib::inv_cmap.c
new file mode 100644
index 000000000000..4438798f0d97
--- /dev/null
+++ b/graphics/urt/files/patch-lib::inv_cmap.c
@@ -0,0 +1,11 @@
+--- lib/inv_cmap.c.orig Thu Mar 10 21:28:37 2005
++++ lib/inv_cmap.c Thu Mar 10 21:29:06 2005
+@@ -42,7 +42,7 @@
+ static long cbinc, cginc, crinc;
+ static unsigned long *gdp, *rdp, *cdp;
+ static unsigned char *grgbp, *rrgbp, *crgbp;
+-static gstride, rstride;
++static int gstride, rstride;
+ static long x, xsqr, colormax;
+ static int cindex;
+ #ifdef INSTRUMENT_IT
diff --git a/graphics/urt/files/patch-lib::scanargs.c b/graphics/urt/files/patch-lib::scanargs.c
new file mode 100644
index 000000000000..10c1a0ed8415
--- /dev/null
+++ b/graphics/urt/files/patch-lib::scanargs.c
@@ -0,0 +1,15 @@
+--- lib/scanargs.c.orig Thu Mar 10 21:23:06 2005
++++ lib/scanargs.c Thu Mar 10 21:25:26 2005
+@@ -128,10 +128,10 @@
+ va_list argl;
+ {
+
+- register check; /* check counter to be sure all argvs
++ register int check; /* check counter to be sure all argvs
+ are processed */
+ register CONST_DECL char *cp;
+- register cnt;
++ register int cnt;
+ int optarg = 0; /* where optional args start */
+ int nopt = 0;
+ char tmpflg, /* temp flag */
diff --git a/graphics/urt/files/patch-tools::avg4.c b/graphics/urt/files/patch-tools::avg4.c
new file mode 100644
index 000000000000..d30e7ee57c9e
--- /dev/null
+++ b/graphics/urt/files/patch-tools::avg4.c
@@ -0,0 +1,11 @@
+--- tools/avg4.c.orig Thu Mar 10 20:47:48 2005
++++ tools/avg4.c Thu Mar 10 20:48:11 2005
+@@ -34,7 +34,7 @@
+ #include <stdio.h>
+ #include "rle.h"
+
+-static bit_count[16] = {0, 63, 63, 127, 63, 127, 127,
++static int bit_count[16] = {0, 63, 63, 127, 63, 127, 127,
+ 192, 63, 127, 127, 192, 127, 192, 192, 255};
+
+ void
diff --git a/graphics/urt/files/patch-tools::mcut.c b/graphics/urt/files/patch-tools::mcut.c
new file mode 100644
index 000000000000..3f33abf8b6f0
--- /dev/null
+++ b/graphics/urt/files/patch-tools::mcut.c
@@ -0,0 +1,20 @@
+--- tools/mcut.c.orig Thu Mar 10 20:54:44 2005
++++ tools/mcut.c Thu Mar 10 20:56:44 2005
+@@ -791,7 +791,7 @@
+ TRACE( tmp_cb, cb_list )
+ {
+ register color_t *newcol = &tmp_cb->color;
+- register newdist = DISTANCE( ref_col, *newcol );
++ register int newdist = DISTANCE( ref_col, *newcol );
+
+ if ( newdist < dist )
+ {
+@@ -963,7 +963,7 @@
+ cmp_radices ( h1, h2 )
+ histogram_t **h1, **h2;
+ {
+- register c1 = -1, c2 = -1;
++ register int c1 = -1, c2 = -1;
+
+ if ( *h1 )
+ c1 = (*h1)->color & mask;
diff --git a/graphics/urt/files/patch-tools::mergechan.c b/graphics/urt/files/patch-tools::mergechan.c
new file mode 100644
index 000000000000..254a0f75d480
--- /dev/null
+++ b/graphics/urt/files/patch-tools::mergechan.c
@@ -0,0 +1,11 @@
+--- tools/mergechan.c.orig Thu Mar 10 20:58:34 2005
++++ tools/mergechan.c Thu Mar 10 21:00:31 2005
+@@ -79,7 +79,7 @@
+ {
+ fprintf( stderr,
+ "%s: Images %d and %d are both from the standard input\n",
+- stdin_used, i );
++ argv[0], stdin_used, i );
+ exit( -1 );
+ }
+ }
diff --git a/graphics/urt/files/patch-tools::rlegrid.c b/graphics/urt/files/patch-tools::rlegrid.c
new file mode 100644
index 000000000000..89a7d4c971ff
--- /dev/null
+++ b/graphics/urt/files/patch-tools::rlegrid.c
@@ -0,0 +1,19 @@
+--- tools/rlegrid.c.orig Thu Mar 10 21:01:59 2005
++++ tools/rlegrid.c Thu Mar 10 21:03:02 2005
+@@ -65,7 +65,7 @@
+ rle_op **scanraw[2]; /* space for two raw scanline buffers */
+ rle_op *p, *q;
+ int *nrawp[2];
+- unsigned char fg, bg;
++ unsigned char fg;
+
+ out_hdr = *rle_hdr_init( NULL );
+
+@@ -81,7 +81,6 @@
+ exit( 1 );
+
+ fg = fg_color;
+- bg = bg_color;
+
+ outfile = rle_open_f( cmd_name( argv ), outfname, "w" );
+
diff --git a/graphics/urt/files/patch-tools::rlehdr.c b/graphics/urt/files/patch-tools::rlehdr.c
new file mode 100644
index 000000000000..d8805d6389bb
--- /dev/null
+++ b/graphics/urt/files/patch-tools::rlehdr.c
@@ -0,0 +1,11 @@
+--- tools/rlehdr.c.orig Thu Mar 10 21:04:49 2005
++++ tools/rlehdr.c Thu Mar 10 21:13:14 2005
+@@ -289,7 +289,7 @@
+ {
+ if ( (cp = index( the_comment, '\n' )) )
+ printf( ", %s=%.*s", *comment_names,
+- cp - the_comment - 1, the_comment );
++ *comment_names,cp - the_comment - 1, the_comment );
+ else
+ printf( ", %s=%s", *comment_names, the_comment );
+ break;
diff --git a/graphics/urt/files/patch-tools::rleinterp.c b/graphics/urt/files/patch-tools::rleinterp.c
new file mode 100644
index 000000000000..cfd7e41415d1
--- /dev/null
+++ b/graphics/urt/files/patch-tools::rleinterp.c
@@ -0,0 +1,13 @@
+--- tools/rleinterp.c.orig Thu Mar 10 21:14:52 2005
++++ tools/rleinterp.c Thu Mar 10 21:15:40 2005
+@@ -48,8 +48,8 @@
+ nom_sortie[BUFSIZ],
+ extension[80] ,
+ *basenom, *rep ;
+- int i, ni, n, nbimage=1;
+- int rle_err, width, y, x ;
++ int i, n, nbimage=1;
++ int width, y, x ;
+ int iflag1 = 0 , iflag2 = 0, oflag = 0, fd ;
+ double alpha, beta ;
+ FILE * outfile;
diff --git a/graphics/urt/files/patch-tools::rlepatch.c b/graphics/urt/files/patch-tools::rlepatch.c
new file mode 100644
index 000000000000..2befeafd507d
--- /dev/null
+++ b/graphics/urt/files/patch-tools::rlepatch.c
@@ -0,0 +1,20 @@
+--- tools/rlepatch.c.orig Thu Mar 10 21:17:33 2005
++++ tools/rlepatch.c Thu Mar 10 21:18:56 2005
+@@ -46,7 +46,7 @@
+ rle_pixel ** im_rows, **patch_rows, ** outrows;
+ int stdin_used = 0;
+ int patches = 0, oflag = 0, i, y, c, xlen, width;
+- int rle_cnt, rle_err;
++ int rle_cnt;
+
+ im_hdr = *rle_hdr_init( NULL );
+ out_hdr = *rle_hdr_init( NULL );
+@@ -86,7 +86,7 @@
+ }
+
+ for ( rle_cnt = 0;
+- (rle_err = rle_get_setup( &im_hdr )) == RLE_SUCCESS;
++ rle_get_setup( &im_hdr ) == RLE_SUCCESS;
+ rle_cnt++ )
+ {
+ /* Get the patch files set up */