Changeset 421
- Timestamp:
- Jan 5, 2005, 1:18:49 AM (18 years ago)
- Location:
- pwntcha/trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pwntcha/trunk/src/linuxfr.c
r420 r421 19 19 20 20 #define FONTNAME "share/font_linuxfr.png" 21 static struct image *font = NULL; 21 22 22 23 /* Main function */ … … 27 28 "0123456789"; 28 29 char *result; 29 struct image *tmp , *font;30 struct image *tmp; 30 31 int x, y, r, g, b, i, j, c; 31 32 int stats[40]; 32 33 33 font = image_load(FONTNAME);34 34 if(!font) 35 35 { 36 fprintf(stderr, "cannot load font %s\n", FONTNAME); 37 exit(-1); 36 font = image_load(FONTNAME); 37 if(!font) 38 { 39 fprintf(stderr, "cannot load font %s\n", FONTNAME); 40 exit(-1); 41 } 38 42 } 39 43 … … 142 146 143 147 image_free(tmp); 144 image_free(font);145 148 146 149 if(strlen(result) != 7) -
pwntcha/trunk/src/phpbb.c
r418 r421 20 20 /* Our macros */ 21 21 #define FONTNAME "share/font_phpbb.png" 22 static struct image *font = NULL; 22 23 23 24 /* Main function */ … … 27 28 char *result; 28 29 struct image *tmp1, *tmp2, *tmp3; 29 struct image *font = image_load(FONTNAME);30 30 int x, y, i = 0; 31 31 int r, g, b; … … 35 35 if(!font) 36 36 { 37 fprintf(stderr, "cannot load font %s\n", FONTNAME); 38 exit(-1); 37 font = image_load(FONTNAME); 38 if(!font) 39 { 40 fprintf(stderr, "cannot load font %s\n", FONTNAME); 41 exit(-1); 42 } 39 43 } 40 44 … … 126 130 image_free(tmp2); 127 131 image_free(tmp3); 128 image_free(font);129 132 130 133 return result; -
pwntcha/trunk/src/slashdot.c
r411 r421 19 19 #include "common.h" 20 20 21 static struct image *count_objects(struct image *img); 22 static struct image *rotate(struct image *img); 23 static struct image *cut_cells(struct image *img); 24 static struct image *find_glyphs(struct image *img); 25 21 26 /* Our macros */ 22 27 #define FACTOR 1 … … 24 29 //#define FONTNAME "share/font.png" // use with FACTOR = 2 25 30 //#define FONTNAME "share/font_dilated.png" // use with FACTOR = 2 26 27 static struct image *count_objects(struct image *img); 28 static struct image *rotate(struct image *img); 29 static struct image *cut_cells(struct image *img); 30 static struct image *find_glyphs(struct image *img); 31 static struct image *font = NULL; 31 32 32 33 /* Global stuff */ … … 238 239 glyphs[22]; 239 240 struct image *dst; 240 struct image *font = image_load(FONTNAME);241 241 int x, y, i = 0; 242 242 int r, g, b; … … 246 246 if(!font) 247 247 { 248 fprintf(stderr, "cannot load font %s\n", FONTNAME); 249 exit(-1); 248 font = image_load(FONTNAME); 249 if(!font) 250 { 251 fprintf(stderr, "cannot load font %s\n", FONTNAME); 252 exit(-1); 253 } 250 254 } 251 255 -
pwntcha/trunk/src/vbulletin.c
r414 r421 19 19 20 20 #define FONTNAME "share/font_vbulletin.png" 21 static struct image *font = NULL; 21 22 22 23 /* Main function */ … … 25 26 char all[] = "2346789ABCDEFGHJKLMNPRTWXYZ"; 26 27 char *result; 27 struct image *tmp1, *tmp2, *tmp3 , *font;28 struct image *tmp1, *tmp2, *tmp3; 28 29 int limits[6] = { 26, 53, 80, 107, 134, 160 }; 29 30 int x, y, r, g, b, i, j; 30 31 31 font = image_load(FONTNAME);32 32 if(!font) 33 33 { 34 fprintf(stderr, "cannot load font %s\n", FONTNAME); 35 exit(-1); 34 font = image_load(FONTNAME); 35 if(!font) 36 { 37 fprintf(stderr, "cannot load font %s\n", FONTNAME); 38 exit(-1); 39 } 36 40 } 37 41 … … 135 139 image_free(tmp2); 136 140 image_free(tmp3); 137 image_free(font);138 141 139 142 return result;
Note: See TracChangeset
for help on using the changeset viewer.