Browse Source

* removed global variables.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/pwntcha/trunk@418 92316355-f0b4-4df1-b90c-862c8a59935f
master
sam 20 years ago
parent
commit
07c6689143
1 changed files with 5 additions and 9 deletions
  1. +5
    -9
      src/phpbb.c

+ 5
- 9
src/phpbb.c View File

@@ -20,15 +20,11 @@
/* Our macros */
#define FONTNAME "share/font_phpbb.png"

static struct image *find_glyphs(struct image *img);

/* Global stuff */
char *result;

/* Main function */
char *decode_phpbb(struct image *img)
{
char all[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789";
char *result;
struct image *tmp1, *tmp2, *tmp3;
struct image *font = image_load(FONTNAME);
int x, y, i = 0;
@@ -36,16 +32,16 @@ char *decode_phpbb(struct image *img)
int xmin, xmax, ymin, ymax, cur, offset = -1;
int distmin, distx, disty, distch;

/* phpBB captchas have 6 characters */
result = malloc(7 * sizeof(char));
strcpy(result, " ");

if(!font)
{
fprintf(stderr, "cannot load font %s\n", FONTNAME);
exit(-1);
}

/* phpBB captchas have 6 characters */
result = malloc(7 * sizeof(char));
strcpy(result, " ");

tmp1 = filter_smooth(img);
tmp2 = filter_equalize(tmp1, 128);
tmp3 = image_new(img->width, img->height);


Loading…
Cancel
Save