diff options
author | Karol Wojtaszek <sekretarz@gentoo.org> | 2005-08-02 15:48:13 +0000 |
---|---|---|
committer | Karol Wojtaszek <sekretarz@gentoo.org> | 2005-08-02 15:48:13 +0000 |
commit | 0315c770f7686149d769db7125f5f8c394a94726 (patch) | |
tree | 166b5af7d08a95cf6205676ed6d8c523d2df2780 /media-gfx/tic98/files/tic98-1.01-gentoo.diff | |
parent | Version bumped. (diff) | |
download | historical-0315c770f7686149d769db7125f5f8c394a94726.tar.gz historical-0315c770f7686149d769db7125f5f8c394a94726.tar.bz2 historical-0315c770f7686149d769db7125f5f8c394a94726.zip |
Fixed compile problems, bug #84160. Merged tic98.diff to tic98-gentoo.diff
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'media-gfx/tic98/files/tic98-1.01-gentoo.diff')
-rw-r--r-- | media-gfx/tic98/files/tic98-1.01-gentoo.diff | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/media-gfx/tic98/files/tic98-1.01-gentoo.diff b/media-gfx/tic98/files/tic98-1.01-gentoo.diff index 21ab2f3a68cf..880dfa059545 100644 --- a/media-gfx/tic98/files/tic98-1.01-gentoo.diff +++ b/media-gfx/tic98/files/tic98-1.01-gentoo.diff @@ -80,3 +80,126 @@ diff -Nru tic98/ppmd_model.c tic98.gentoo/ppmd_model.c unsigned int arith_decode_target (unsigned int totl) /* Arithmetically decodes the target. */ +diff -Nru tic98.orig/page_features.c tic98/page_features.c +--- tic98.orig/page_features.c 1999-06-22 03:48:42.000000000 +0200 ++++ tic98/page_features.c 2005-08-02 19:47:09.485681960 +0200 +@@ -37,18 +37,17 @@ + void + dump_header() + { +- fprintf(stdout,"@arff 3 +-@relation features +-@attribute 'Number' real +-@attribute 'Area' real +-@attribute 'Avg_area' real +-@attribute 'Density' real +-@attribute 'Aspect' real +-@attribute 'Holes' real +-@attribute 'Edges' real +-@attribute 'class' string range ( {?} ) +-@data +-"); ++ fprintf(stdout,"@arff 3" ++"@relation features" ++"@attribute 'Number' real" ++"@attribute 'Area' real" ++"@attribute 'Avg_area' real" ++"@attribute 'Density' real" ++"@attribute 'Aspect' real" ++"@attribute 'Holes' real" ++"@attribute 'Edges' real" ++"@attribute 'class' string range ( {?} )" ++"@data"); + + + } +diff -ru tic98/main_tic.c tic98-new/main_tic.c +--- tic98/main_tic.c Thu Jul 1 21:02:56 1999 ++++ tic98-new/main_tic.c Fri Mar 16 11:43:56 2001 +@@ -11,6 +11,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#include <errno.h> + + #include "arithcode.h" + #include "globals.h" +@@ -96,8 +97,10 @@ + marklistptr list=NULL,list2=NULL; + marktype copy; + +- if(marktype_readnamed(fn, image)!=0) ++ if(marktype_readnamed(fn, image)!=0) { ++ fprintf(stderr, "imagefn_to_list(): bad input file %s\n", fn); + return NULL; ++ } + + *w=image->w; + *h=image->h; +@@ -495,7 +498,10 @@ + + TimerStart(1); + +- freopen(outfilename[0],"wb",stdout); ++ if (! freopen(outfilename[0],"wb",stdout)) { ++ fprintf(stderr, "failed to open %s for writing: %s\n", ++ outfilename[0], strerror(errno)); ++ } + + tic98_init(&t); + tic98_start_encoding(); +@@ -503,8 +509,11 @@ + for(i=0;i<num_in;i++){ + int w,h,xx,yy,ok=0; + marktype image; +- list=imagefn_to_list(&image,infilename[i], &w, &h); +- ++ if (! (list=imagefn_to_list(&image,infilename[i], &w, &h))) { ++ fprintf(stderr, "cannot read file %s\n", infilename[i]); ++ exit(1); ++ } ++ + tic98_num_encode(&t,NEW_PAGE); + + for(xx=0;xx<image.w;xx++) +@@ -560,7 +569,10 @@ + newoutname=(char*)malloc(sizeof(char)*(strlen(outfilename[0])+10)); + assert(newoutname); + +- freopen(infilename[0],"rb",stdin); ++ if (! freopen(infilename[0],"rb",stdin)) { ++ fprintf(stderr, "failed to open %s for reading: %s\n", ++ infilename[0], strerror(errno)); ++ } + + tic98_init(&t); + tic98_start_decoding(); +diff -ru tic98/marklist.c tic98-new/marklist.c +--- tic98/marklist.c Thu Jul 1 21:56:19 1999 ++++ tic98-new/marklist.c Fri Mar 16 11:44:20 2001 +@@ -94,11 +94,11 @@ + magic = magic_popnamed (fn, &err) >> 16; /* only interested in first 2 bytes */ + + if (err != 0) { +- return 1; /* failure */ + fprintf (stderr, "error - can't open file '%s'\n", fn); +- return 1; ++ return 1; /* failure */ + } + if (!((magic == MAGIC_P1) || (magic == MAGIC_P4))) { ++ fprintf (stderr, "bad magic in file '%s'\n", fn); + return 1; + } + if (fn2) { +diff -ru tic98/utils.c tic98-new/utils.c +--- tic98/utils.c Tue Jun 22 02:48:43 1999 ++++ tic98-new/utils.c Fri Mar 16 11:23:57 2001 +@@ -117,7 +117,7 @@ + } + else{ + *err=1; +-/* error("magic_popnamed","can't open file",fn);*/ ++ error("magic_popnamed","can't open file",fn); + return 0; + } + } |