FreeBSD Bugzilla – Attachment 82738 Details for
Bug 118344
Cleanups to the graphics/urt port
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 8.39 KB, created by
Pedro F. Giffuni
on 2007-11-30 05:10:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Pedro F. Giffuni
Created:
2007-11-30 05:10:00 UTC
Size:
8.39 KB
patch
obsolete
>diff -ruN urt.orig/files/patch-cnv::gif2rle.c urt/files/patch-cnv::gif2rle.c >--- urt.orig/files/patch-cnv::gif2rle.c Thu Nov 29 10:04:03 2007 >+++ urt/files/patch-cnv::gif2rle.c Thu Nov 29 10:42:28 2007 >@@ -1,6 +1,44 @@ >---- 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 @@ >+--- cnv/giftorle.c.orig Mon Oct 18 08:59:37 1993 >++++ cnv/giftorle.c Thu Nov 29 10:42:17 2007 >+@@ -21,7 +21,10 @@ >+ /* | don't try to make money off it, or pretend that you wrote it. | */ >+ /* +------------------------------------------------------------------+ */ >+ >++#include <stdlib.h> >+ #include <stdio.h> >++#include <unistd.h> >++ >+ #include "rle.h" >+ >+ #ifndef lint >+@@ -69,7 +72,7 @@ >+ >+ static int output_colormap = FALSE; >+ >+-void >++int >+ main(argc,argv) >+ int argc; >+ char **argv; >+@@ -96,7 +99,7 @@ >+ >+ while ( nfname-- > 0 ) >+ (void)ReadGIF( *infname++ ); >+- exit( 0 ); >++ return( 0 ); >+ } >+ >+ int >+@@ -203,7 +206,7 @@ >+ EasyFail("EOF in extention\n",TRUE); >+ if (c == 0) >+ return FALSE; >+- if (read(fd,buf,(int) c)!=(int) c) >++ if (read(fileno(fd),buf,(int) c)!=(int) c) >+ EasyFail("EOF in extention\n",TRUE); >+ } >+ } >+@@ -278,7 +281,7 @@ > max_code_size = 2*clear_code; > max_code = clear_code+2; > >diff -ruN urt.orig/files/patch-cnv::rlatorle.c urt/files/patch-cnv::rlatorle.c >--- urt.orig/files/patch-cnv::rlatorle.c Wed Dec 31 19:00:00 1969 >+++ urt/files/patch-cnv::rlatorle.c Thu Nov 29 22:16:54 2007 >@@ -0,0 +1,11 @@ >+--- cnv/rlatorle.c.orig Thu Nov 29 22:14:43 2007 >++++ cnv/rlatorle.c Thu Nov 29 22:15:43 2007 >+@@ -162,7 +162,7 @@ >+ } >+ VPRINTF(stderr, "Channel color space %s\n", head.rla_head.chan); >+ if ( rlb_flag ) >+- VPRINTF(stderr, "Interlaced? %s\n", head.rlb_head.filter_type); >++ VPRINTF(stderr, "Interlaced? %hd\n", head.rlb_head.filter_type); >+ else >+ VPRINTF(stderr, "Interlaced? %s\n", "-unused-"); >+ if (do_matte) >diff -ruN urt.orig/files/patch-get::getx11::map_scan.c urt/files/patch-get::getx11::map_scan.c >--- urt.orig/files/patch-get::getx11::map_scan.c Wed Dec 31 19:00:00 1969 >+++ urt/files/patch-get::getx11::map_scan.c Thu Nov 29 22:31:31 2007 >@@ -0,0 +1,11 @@ >+--- get/getx11/map_scan.c.orig Thu Nov 29 22:24:53 2007 >++++ get/getx11/map_scan.c Thu Nov 29 22:26:37 2007 >+@@ -2195,7 +2195,7 @@ >+ >+ if (!img->divN || !img->modN || !img->dm16 ) >+ { >+- fprintf( stderr, "%s: malloc error getting dither arrays\n"); >++ fprintf( stderr, "%s: malloc error getting dither arrays\n", progname); >+ exit (1); >+ } >+ } >diff -ruN urt.orig/files/patch-get::getx11::x11_stuff.c urt/files/patch-get::getx11::x11_stuff.c >--- urt.orig/files/patch-get::getx11::x11_stuff.c Wed Dec 31 19:00:00 1969 >+++ urt/files/patch-get::getx11::x11_stuff.c Thu Nov 29 22:48:51 2007 >@@ -0,0 +1,36 @@ >+--- get/getx11/x11_stuff.c.orig Fri May 13 20:05:44 1994 >++++ get/getx11/x11_stuff.c Thu Nov 29 22:48:26 2007 >+@@ -40,7 +40,7 @@ >+ */ >+ #include "getx11.h" >+ #ifdef X_SHARED_MEMORY >+-#include <sys/errno.h> >++#include <errno.h> >+ #endif >+ >+ #include "circle.bitmap" >+@@ -155,7 +155,6 @@ >+ IPC_CREAT|0777 ); >+ if ( img->shm_img.shmid < 0 ) >+ { >+- extern int errno; >+ if ( errno == ENOSPC ) >+ { >+ if ( !no_shared_space ) >+@@ -333,7 +332,7 @@ >+ >+ if (( img->pixmap != NULL && reallocate ) || >+ ( img->pixmap != NULL && (img->pix_w < iw || img->pix_h < ih ))){ >+- free_X_pixmap( dpy, img->pixmap ); >++ free_X_pixmap( img, img->pixmap ); >+ img->pixmap = NULL; >+ } >+ >+@@ -361,7 +360,6 @@ >+ XDestroyImage( image ); >+ if ( img->shm_pix.shmid < 0 ) >+ { >+- extern int errno; >+ if ( errno == ENOSPC ) >+ { >+ if ( !no_shared_space ) >diff -ruN urt.orig/files/patch-lib-rle_open_f.c urt/files/patch-lib-rle_open_f.c >--- urt.orig/files/patch-lib-rle_open_f.c Thu Nov 29 10:04:03 2007 >+++ urt/files/patch-lib-rle_open_f.c Thu Nov 29 23:40:42 2007 >@@ -1,5 +1,5 @@ >---- lib/rle_open_f.c.orig Thu May 13 21:28:51 1993 >-+++ lib/rle_open_f.c Wed Jan 12 16:06:07 2005 >+--- lib/rle_open_f.c.orig Thu May 13 16:28:51 1993 >++++ lib/rle_open_f.c Thu Nov 29 23:38:49 2007 > @@ -56,6 +56,7 @@ > CONST_DECL char *err_str; > register char *cp; >@@ -8,15 +8,6 @@ > > #ifdef STDIO_NEEDS_BINARY > char mode_string[32]; /* Should be enough. */ >-@@ -63,7 +64,7 @@ >- /* Concatenate a 'b' onto the mode. */ >- mode_string[0] = mode[0]; >- mode_string[1] = 'b'; >-- strcpy( mode_string + 2, mode + 1 ); >-+ strncpy( mode_string + 2, mode + 1, sizeof(mode_string + 2) ); >- mode = mode_string; >- #endif >- > @@ -150,7 +151,8 @@ > else if ( cp > file_name && *cp == '.' && *(cp + 1) == 'Z' ) > { >@@ -42,3 +33,11 @@ > > fp = my_popen( combuf, mode, &thepid ); > free( combuf ); >+@@ -256,7 +258,6 @@ >+ int pipefd[2]; >+ int i; >+ char *argv[4]; >+- extern int errno; >+ >+ /* Check args. */ >+ if ( *mode != 'r' && *mode != 'w' ) >diff -ruN urt.orig/files/patch-lib::rle_hdr.c urt/files/patch-lib::rle_hdr.c >--- urt.orig/files/patch-lib::rle_hdr.c Wed Dec 31 19:00:00 1969 >+++ urt/files/patch-lib::rle_hdr.c Thu Nov 29 22:02:41 2007 >@@ -0,0 +1,11 @@ >+--- lib/rle_hdr.c.orig Thu Nov 29 21:57:53 2007 >++++ lib/rle_hdr.c Thu Nov 29 21:59:23 2007 >+@@ -269,6 +269,8 @@ >+ { >+ rle_hdr *ret_hdr; >+ >++ if ( rle_dflt_hdr.rle_file == NULL) >++ rle_dflt_hdr.rle_file = stdout; >+ if ( the_hdr == &rle_dflt_hdr ) >+ return the_hdr; >+ >diff -ruN urt.orig/files/patch-lib::scanargs.c urt/files/patch-lib::scanargs.c >--- urt.orig/files/patch-lib::scanargs.c Thu Nov 29 10:04:03 2007 >+++ urt/files/patch-lib::scanargs.c Thu Nov 29 23:23:49 2007 >@@ -1,5 +1,5 @@ >---- lib/scanargs.c.orig Thu Mar 10 21:23:06 2005 >-+++ lib/scanargs.c Thu Mar 10 21:25:26 2005 >+--- lib/scanargs.c.orig Thu Feb 27 16:18:15 1992 >++++ lib/scanargs.c Thu Nov 29 23:22:40 2007 > @@ -128,10 +128,10 @@ > va_list argl; > { >@@ -13,3 +13,13 @@ > int optarg = 0; /* where optional args start */ > int nopt = 0; > char tmpflg, /* temp flag */ >+@@ -408,7 +408,8 @@ >+ * Copy the string so we remain nondestructive >+ */ >+ s = NEW( char, strlen(argp)+1 ); >+- strcpy( s, argp ); >++ strncpy( s, argp, sizeof(s)-1 ); >++ s[sizeof(s) - 1] = '\0'; >+ argp = s; >+ >+ /* >diff -ruN urt.orig/files/patch-tools::into.c urt/files/patch-tools::into.c >--- urt.orig/files/patch-tools::into.c Thu Nov 29 10:04:03 2007 >+++ urt/files/patch-tools::into.c Thu Nov 29 16:20:37 2007 >@@ -1,6 +1,6 @@ >---- tools/into.c.orig Thu Apr 30 23:10:15 1992 >-+++ tools/into.c Fri Dec 27 23:23:48 2002 >-@@ -41,7 +41,10 @@ >+--- tools/into.c.orig Thu Apr 30 09:10:15 1992 >++++ tools/into.c Thu Nov 29 16:17:55 2007 >+@@ -41,9 +41,12 @@ > short forceflg; /* overwrite an unwritable file? */ > > extern int errno; >@@ -9,5 +9,17 @@ > extern char *sys_errlist[]; > +#endif > >- void >+-void >++int > main(argc, argv) >+ int argc; >+ char **argv; >+@@ -82,7 +85,7 @@ >+ } >+ else >+ strcpy( buf, temp ); >+- mktemp( buf ); >++ mkstemp( buf ); >+ >+ if ( (outf = fopen( buf, "w" )) == NULL ) >+ { >diff -ruN urt.orig/files/patch-tools::rleaddcom.c urt/files/patch-tools::rleaddcom.c >--- urt.orig/files/patch-tools::rleaddcom.c Wed Dec 31 19:00:00 1969 >+++ urt/files/patch-tools::rleaddcom.c Thu Nov 29 16:37:50 2007 >@@ -0,0 +1,20 @@ >+--- tools/rleaddcom.c.orig Thu Nov 29 16:12:38 2007 >++++ tools/rleaddcom.c Thu Nov 29 16:25:14 2007 >+@@ -60,7 +60,7 @@ >+ * Algorithm: >+ * [None] >+ */ >+-void >++int >+ main( argc, argv ) >+ int argc; >+ char **argv; >+@@ -118,7 +118,7 @@ >+ } >+ else >+ strcpy( buf, temp ); >+- mktemp( buf ); >++ mkstemp( buf ); >+ #ifndef NO_OPEN_PIPES >+ /* Compressed file special case. */ >+ cp = i_fname + strlen( i_fname ) - 2; >diff -ruN urt.orig/files/patch-tools::rlecat.c urt/files/patch-tools::rlecat.c >--- urt.orig/files/patch-tools::rlecat.c Wed Dec 31 19:00:00 1969 >+++ urt/files/patch-tools::rlecat.c Thu Nov 29 16:45:47 2007 >@@ -0,0 +1,20 @@ >+--- tools/rlecat.c.orig Thu Nov 29 16:39:51 2007 >++++ tools/rlecat.c Thu Nov 29 16:40:44 2007 >+@@ -62,7 +62,7 @@ >+ * repeat count. If the collation flag (-c) is specified, then >+ * all images will be read before starting to repeat. >+ */ >+-void >++int >+ main( argc, argv ) >+ int argc; >+ char **argv; >+@@ -110,7 +110,7 @@ >+ nflag = 0; /* Not really repeating! */ >+ else >+ { >+- mktemp( temp ); /* Make a temporary file name */ >++ mkstemp( temp ); /* Make a temporary file name */ >+ tmpfile = rle_open_f( cmd_name( argv ), temp, "w+" ); >+ } >+ }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 118344
: 82738