* Fixed file headers git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/pwntcha/trunk@383 92316355-f0b4-4df1-b90c-862c8a59935fmaster
| @@ -6,6 +6,7 @@ DIST_SUBDIRS = $(SUBDIRS) | |||||
| EXTRA_DIST = \ | EXTRA_DIST = \ | ||||
| bootstrap \ | bootstrap \ | ||||
| ChangeLog \ | ChangeLog \ | ||||
| share/font_dilated_half.png \ | |||||
| $(NULL) | $(NULL) | ||||
| AUTOMAKE_OPTIONS = dist-bzip2 | AUTOMAKE_OPTIONS = dist-bzip2 | ||||
| @@ -1,9 +1,9 @@ | |||||
| NULL = | NULL = | ||||
| bin_PROGRAMS = pwntcha | bin_PROGRAMS = pwntcha | ||||
| pwntcha_CFLAGS = $(ADDITIONAL_CFLAGS) -Wall | |||||
| pwntcha_CFLAGS = $(ADDITIONAL_CFLAGS) -Wall -O6 | |||||
| pwntcha_LDFLAGS = $(ADDITIONAL_LDFLAGS) | pwntcha_LDFLAGS = $(ADDITIONAL_LDFLAGS) | ||||
| pwntcha_SOURCES = main.c image.c slashdot.c | |||||
| pwntcha_SOURCES = main.c image.c slashdot.c common.h | |||||
| if USE_IMLIB2 | if USE_IMLIB2 | ||||
| ADDITIONAL_CFLAGS = `imlib2-config --cflags` -DX_DISPLAY_MISSING=1 | ADDITIONAL_CFLAGS = `imlib2-config --cflags` -DX_DISPLAY_MISSING=1 | ||||
| @@ -10,7 +10,6 @@ | |||||
| */ | */ | ||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <stdint.h> | |||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include "config.h" | #include "config.h" | ||||
| @@ -133,14 +132,15 @@ int setpixel(struct image *img, int x, int y, int r, int g, int b) | |||||
| void display_image(struct image *img) | void display_image(struct image *img) | ||||
| { | { | ||||
| char name[BUFSIZ]; | |||||
| #if defined(HAVE_IMLIB2_H) | #if defined(HAVE_IMLIB2_H) | ||||
| //char name[BUFSIZ]; | |||||
| //static int i = 0; | //static int i = 0; | ||||
| //sprintf(name, "image%i-%ix%i.png", i++, img->width, img->height); | //sprintf(name, "image%i-%ix%i.png", i++, img->width, img->height); | ||||
| //imlib_context_set_image(img->priv); | //imlib_context_set_image(img->priv); | ||||
| //imlib_save_image(name); | //imlib_save_image(name); | ||||
| //fprintf(stderr, "saved to %s\n", name); | //fprintf(stderr, "saved to %s\n", name); | ||||
| #elif defined(HAVE_CV_H) | #elif defined(HAVE_CV_H) | ||||
| char name[BUFSIZ]; | |||||
| sprintf(name, "Image %p (%i x %i)", img, img->width, img->height); | sprintf(name, "Image %p (%i x %i)", img, img->width, img->height); | ||||
| cvNamedWindow(name, 0); | cvNamedWindow(name, 0); | ||||
| cvShowImage(name, img->priv); | cvShowImage(name, img->priv); | ||||
| @@ -10,7 +10,6 @@ | |||||
| */ | */ | ||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <stdint.h> | |||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include "config.h" | #include "config.h" | ||||
| @@ -10,8 +10,8 @@ | |||||
| */ | */ | ||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <stdint.h> | |||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <string.h> | |||||
| #include <math.h> | #include <math.h> | ||||
| #include "config.h" | #include "config.h" | ||||
| @@ -19,9 +19,9 @@ | |||||
| /* Our macros */ | /* Our macros */ | ||||
| #define FACTOR 1 | #define FACTOR 1 | ||||
| //#define FONTNAME "font.png" // use with FACTOR = 2 | |||||
| //#define FONTNAME "font_dilated.png" // use with FACTOR = 2 | |||||
| #define FONTNAME "font_dilated_half.png" // use with FACTOR = 1 | |||||
| //#define FONTNAME "share/font.png" // use with FACTOR = 2 | |||||
| //#define FONTNAME "share/font_dilated.png" // use with FACTOR = 2 | |||||
| #define FONTNAME "share/font_dilated_half.png" // use with FACTOR = 1 | |||||
| /* Global stuff */ | /* Global stuff */ | ||||
| char *result; | char *result; | ||||
| @@ -604,7 +604,7 @@ while(cur < 7) | |||||
| char * slashdot_decode(char *image) | char * slashdot_decode(char *image) | ||||
| { | { | ||||
| struct image *img, *tmp, *tmp2, *dst; | |||||
| struct image *img, *tmp, *tmp2; | |||||
| img = load_image(image); | img = load_image(image); | ||||
| if(img == NULL) | if(img == NULL) | ||||