Changeset 2318


Ignore:
Timestamp:
Apr 26, 2008, 10:41:43 AM (9 years ago)
Author:
Sam Hocevar
Message:
  • Step 2 of the code reorganisation: move each font to its corresponding decoder's subdirectory.
Location:
pwntcha/trunk
Files:
1 deleted
29 edited
29 moved

Legend:

Unmodified
Added
Removed
  • pwntcha/trunk/Makefile.am

    r432 r2318  
    1 NULL =
    21
    32SUBDIRS = src
    4 DIST_SUBDIRS = $(SUBDIRS) extras share
     3DIST_SUBDIRS = $(SUBDIRS) extras
    54
    65EXTRA_DIST = \
  • pwntcha/trunk/configure.ac

    r2317 r2318  
    9797  src/xanga/Makefile
    9898  extras/Makefile
    99   share/Makefile
    10099])
    101100
  • pwntcha/trunk/src/authimage/Makefile.am

    r2317 r2318  
     1
     2DECODER = authimage
    13
    24noinst_LIBRARIES = libdecoder.a
    35
    46libdecoder_a_SOURCES = decoder.c
    5 libdecoder_a_CPPFLAGS = -I$(srcdir)/..
     7libdecoder_a_CPPFLAGS = -I$(srcdir)/.. -DDECODER=\"$(DECODER)\"
    68
     9EXTRA_DIST = font.png
     10
  • pwntcha/trunk/src/authimage/decoder.c

    r2317 r2318  
    3030    if(!font)
    3131    {
    32         font = font_load_fixed("font_authimage.png",
     32        font = font_load_fixed(DECODER, "font.png",
    3333                               "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
    3434        if(!font)
  • pwntcha/trunk/src/clubic/Makefile.am

    r2317 r2318  
     1
     2DECODER = clubic
    13
    24noinst_LIBRARIES = libdecoder.a
    35
    46libdecoder_a_SOURCES = decoder.c
    5 libdecoder_a_CPPFLAGS = -I$(srcdir)/..
     7libdecoder_a_CPPFLAGS = -I$(srcdir)/.. -DDECODER=\"$(DECODER)\"
    68
     9EXTRA_DIST = font.png
     10
  • pwntcha/trunk/src/clubic/decoder.c

    r2317 r2318  
    5353    if(!font)
    5454    {
    55         font = font_load_variable("font_clubic.png", "0123456789");
     55        font = font_load_variable(DECODER, "font.png", "0123456789");
    5656        if(!font)
    5757            exit(1);
  • pwntcha/trunk/src/common.h

    r2315 r2318  
    6666
    6767/* font operations */
    68 struct font *font_load_fixed(char *file, char *chars);
    69 struct font *font_load_variable(char *file, char *chars);
    70 void font_free(struct font *font);
     68struct font *font_load_fixed(char const *, char const *, char const *);
     69struct font *font_load_variable(char const *, char const *, char const *);
     70void font_free(struct font *);
    7171
    7272/* image filters */
  • pwntcha/trunk/src/font.c

    r2315 r2318  
    1818#include "common.h"
    1919
    20 struct font *font_load_fixed(char *file, char *chars)
     20struct font *font_load_fixed(char const *decoder, char const *file,
     21                             char const *chars)
    2122{
    2223    char fontname[BUFSIZ];
     
    2526    int i;
    2627
    27     sprintf(fontname, "%s/%s", share, file);
     28    sprintf(fontname, "src/%s/%s", decoder, file);
    2829    img = image_load(fontname);
     30    if(!img)
     31    {
     32        sprintf(fontname, "%s/%s/%s", share, decoder, file);
     33        img = image_load(fontname);
     34    }
    2935    if(!img)
    3036    {
     
    5157}
    5258
    53 struct font *font_load_variable(char *file, char *chars)
     59struct font *font_load_variable(char const *decoder, char const *file,
     60                                char const *chars)
    5461{
    5562    char fontname[BUFSIZ];
     
    6067    int r, g, b;
    6168
    62     sprintf(fontname, "%s/%s", share, file);
     69    sprintf(fontname, "src/%s/%s", decoder, file);
    6370    img = image_load(fontname);
     71    if(!img)
     72    {
     73        sprintf(fontname, "%s/%s/%s", share, decoder, file);
     74        img = image_load(fontname);
     75    }
    6476    if(!img)
    6577    {
  • pwntcha/trunk/src/java/Makefile.am

    r2317 r2318  
     1
     2DECODER = java
    13
    24noinst_LIBRARIES = libdecoder.a
    35
    46libdecoder_a_SOURCES = decoder.c
    5 libdecoder_a_CPPFLAGS = -I$(srcdir)/..
     7libdecoder_a_CPPFLAGS = -I$(srcdir)/.. -DDECODER=\"$(DECODER)\"
    68
  • pwntcha/trunk/src/linuxfr/Makefile.am

    r2317 r2318  
     1
     2DECODER = linuxfr
    13
    24noinst_LIBRARIES = libdecoder.a
    35
    46libdecoder_a_SOURCES = decoder.c
    5 libdecoder_a_CPPFLAGS = -I$(srcdir)/..
     7libdecoder_a_CPPFLAGS = -I$(srcdir)/.. -DDECODER=\"$(DECODER)\"
    68
     9EXTRA_DIST = font.png
     10
  • pwntcha/trunk/src/linuxfr/decoder.c

    r2317 r2318  
    3030    if(!font)
    3131    {
    32         font = font_load_fixed("font_linuxfr.png",
     32        font = font_load_fixed(DECODER, "font.png",
    3333                               "abcdefghijklmnopqrstuvwxyz"
    3434                               "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  • pwntcha/trunk/src/livejournal/Makefile.am

    r2317 r2318  
     1
     2DECODER = livejournal
    13
    24noinst_LIBRARIES = libdecoder.a
    35
    46libdecoder_a_SOURCES = decoder.c
    5 libdecoder_a_CPPFLAGS = -I$(srcdir)/..
     7libdecoder_a_CPPFLAGS = -I$(srcdir)/.. -DDECODER=\"$(DECODER)\"
    68
  • pwntcha/trunk/src/livejournal/decoder.c

    r2317 r2318  
    5959    if(!font)
    6060    {
    61         font = font_load_variable("x_font_freesansbold_32_09az.bmp",
     61        font = font_load_variable(DECODER, "x_freesansbold_32_09az.bmp",
    6262                                  "0123456789abcdefghijklmnopqrstuvwxyz");
    6363        if(!font)
  • pwntcha/trunk/src/lmt/Makefile.am

    r2317 r2318  
     1
     2DECODER = lmt
    13
    24noinst_LIBRARIES = libdecoder.a
    35
    46libdecoder_a_SOURCES = decoder.c
    5 libdecoder_a_CPPFLAGS = -I$(srcdir)/..
     7libdecoder_a_CPPFLAGS = -I$(srcdir)/.. -DDECODER=\"$(DECODER)\"
    68
     9EXTRA_DIST = freesans_24_09AZ.bmp
     10
  • pwntcha/trunk/src/lmt/decoder.c

    r2317 r2318  
    5656    if(!font)
    5757    {
    58         font = font_load_variable("font_freesans_24_09AZ.bmp",
     58        font = font_load_variable(DECODER, "freesans_24_09AZ.bmp",
    5959                                  "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
    6060        filter_smooth(font->img);
  • pwntcha/trunk/src/paypal/Makefile.am

    r2317 r2318  
     1
     2DECODER = paypal
    13
    24noinst_LIBRARIES = libdecoder.a
    35
    46libdecoder_a_SOURCES = decoder.c
    5 libdecoder_a_CPPFLAGS = -I$(srcdir)/..
     7libdecoder_a_CPPFLAGS = -I$(srcdir)/.. -DDECODER=\"$(DECODER)\"
    68
     9EXTRA_DIST = stencil_23_AZ.bmp stencil_24_AZ.bmp
     10
  • pwntcha/trunk/src/paypal/decoder.c

    r2317 r2318  
    4848    static char *files[] =
    4949    {
    50         "font_stencil_23_AZ.bmp", "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",
    51         "font_stencil_24_AZ.bmp", "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",
     50        "stencil_23_AZ.bmp", "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",
     51        "stencil_24_AZ.bmp", "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",
    5252    };
    5353    int x, y, i = 0, f;
     
    6060        if(!fonts[f])
    6161        {
    62             fonts[f] = font_load_variable(files[f * 2], files[f * 2 + 1]);
     62            fonts[f] = font_load_variable(DECODER,
     63                                          files[f * 2], files[f * 2 + 1]);
    6364            if(!fonts[f])
    6465                exit(1);
  • pwntcha/trunk/src/phpbb/Makefile.am

    r2317 r2318  
     1
     2DECODER = phpbb
    13
    24noinst_LIBRARIES = libdecoder.a
    35
    46libdecoder_a_SOURCES = decoder.c
    5 libdecoder_a_CPPFLAGS = -I$(srcdir)/..
     7libdecoder_a_CPPFLAGS = -I$(srcdir)/.. -DDECODER=\"$(DECODER)\"
    68
     9EXTRA_DIST = font.png
     10
  • pwntcha/trunk/src/phpbb/decoder.c

    r2317 r2318  
    3232    if(!font)
    3333    {
    34         font = font_load_fixed("font_phpbb.png",
     34        font = font_load_fixed(DECODER, "font.png",
    3535                               "ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789");
    3636        if(!font)
  • pwntcha/trunk/src/scode/Makefile.am

    r2317 r2318  
     1
     2DECODER = scode
    13
    24noinst_LIBRARIES = libdecoder.a
    35
    46libdecoder_a_SOURCES = decoder.c
    5 libdecoder_a_CPPFLAGS = -I$(srcdir)/..
     7libdecoder_a_CPPFLAGS = -I$(srcdir)/.. -DDECODER=\"$(DECODER)\"
    68
  • pwntcha/trunk/src/slashdot/Makefile.am

    r2317 r2318  
     1
     2DECODER = slashdot
    13
    24noinst_LIBRARIES = libdecoder.a
    35
    46libdecoder_a_SOURCES = decoder.c
    5 libdecoder_a_CPPFLAGS = -I$(srcdir)/..
     7libdecoder_a_CPPFLAGS = -I$(srcdir)/.. -DDECODER=\"$(DECODER)\"
    68
     9EXTRA_DIST = font.png
     10
  • pwntcha/trunk/src/slashdot/decoder.c

    r2317 r2318  
    191191    if(!font)
    192192    {
    193         font = font_load_variable("font_slashdot.png", "abcdefgijkmnpqrstvwxyz");
     193        font = font_load_variable(DECODER, "font.png",
     194                                  "abcdefgijkmnpqrstvwxyz");
    194195        if(!font)
    195196            exit(1);
  • pwntcha/trunk/src/ticketmaster/Makefile.am

    r2317 r2318  
     1
     2DECODER = ticketmaster
    13
    24noinst_LIBRARIES = libdecoder.a
    35
    46libdecoder_a_SOURCES = decoder.c
    5 libdecoder_a_CPPFLAGS = -I$(srcdir)/..
     7libdecoder_a_CPPFLAGS = -I$(srcdir)/.. -DDECODER=\"$(DECODER)\"
    68
  • pwntcha/trunk/src/tickets/Makefile.am

    r2317 r2318  
     1
     2DECODER = tickets
    13
    24noinst_LIBRARIES = libdecoder.a
    35
    46libdecoder_a_SOURCES = decoder.c
    5 libdecoder_a_CPPFLAGS = -I$(srcdir)/..
     7libdecoder_a_CPPFLAGS = -I$(srcdir)/.. -DDECODER=\"$(DECODER)\"
    68
     9EXTRA_DIST = font1.png font2.png font3.png font4.png font5.png font6.png font7.png font8.png
     10
  • pwntcha/trunk/src/tickets/decoder.c

    r2317 r2318  
    3535        {
    3636            char buf[BUFSIZ];
    37             sprintf(buf, "font_tickets%i.png", i + 1);
    38             fonts[i] = font_load_variable(buf, "0123456789");
     37            sprintf(buf, "font%i.png", i + 1);
     38            fonts[i] = font_load_variable(DECODER, buf, "0123456789");
    3939            if(!fonts[i])
    4040                exit(-1);
  • pwntcha/trunk/src/vbulletin/Makefile.am

    r2317 r2318  
     1
     2DECODER = vbulletin
    13
    24noinst_LIBRARIES = libdecoder.a
    35
    46libdecoder_a_SOURCES = decoder.c
    5 libdecoder_a_CPPFLAGS = -I$(srcdir)/..
     7libdecoder_a_CPPFLAGS = -I$(srcdir)/.. -DDECODER=\"$(DECODER)\"
    68
     9EXTRA_DIST = font.png
     10
  • pwntcha/trunk/src/vbulletin/decoder.c

    r2317 r2318  
    3030    if(!font)
    3131    {
    32         font = font_load_fixed("font_vbulletin.png",
     32        font = font_load_fixed(DECODER, "font.png",
    3333                               "2346789ABCDEFGHJKLMNPRTWXYZ");
    3434        if(!font)
  • pwntcha/trunk/src/xanga/Makefile.am

    r2317 r2318  
     1
     2DECODER = xanga
    13
    24noinst_LIBRARIES = libdecoder.a
    35
    46libdecoder_a_SOURCES = decoder.c
    5 libdecoder_a_CPPFLAGS = -I$(srcdir)/..
     7libdecoder_a_CPPFLAGS = -I$(srcdir)/.. -DDECODER=\"$(DECODER)\"
    68
     9EXTRA_DIST = \
     10    comic_24_az_messed.bmp \
     11    comic_32_az.bmp \
     12    freemonobold_24_az.bmp \
     13    freemonobold_32_az.bmp \
     14    freesansbold_32_az.bmp \
     15    freesansbold_36_az_messed.bmp \
     16    x_comic_24_az_messed.bmp \
     17    x_comic_32_az.bmp \
     18    x_freemonobold_24_az.bmp \
     19    x_freemonobold_32_az.bmp \
     20    x_freesansbold_32_az.bmp \
     21    x_freesansbold_36_az_messed.bmp
     22
  • pwntcha/trunk/src/xanga/decoder.c

    r2317 r2318  
    121121    static char *files[] =
    122122    {
    123         "x_font_freemonobold_32_az.bmp", "abcdefghijklmnopqrstuvwxyz",
    124         "x_font_freemonobold_24_az.bmp", "abcdefghijklmnopqrstuvwxyz",
    125         "x_font_freesansbold_32_az.bmp", "abcdefghijklmnopqrstuvwxyz",
    126         //"x_font_freeserifbold_32_az.bmp", "abcdefghijklmnopqrstuvwxyz",
    127         "x_font_comic_32_az.bmp", "abcdefghijklmnopqrstuvwxyz",
    128         "x_font_comic_24_az_messed.bmp", "abcdefghijklmnopqrstuvwxyz",
    129         "x_font_freesansbold_36_az_messed.bmp", "abcdefghijklmnopqrstuvwxyz",
     123        "x_freemonobold_32_az.bmp", "abcdefghijklmnopqrstuvwxyz",
     124        "x_freemonobold_24_az.bmp", "abcdefghijklmnopqrstuvwxyz",
     125        "x_freesansbold_32_az.bmp", "abcdefghijklmnopqrstuvwxyz",
     126        //"x_freeserifbold_32_az.bmp", "abcdefghijklmnopqrstuvwxyz",
     127        "x_comic_32_az.bmp", "abcdefghijklmnopqrstuvwxyz",
     128        "x_comic_24_az_messed.bmp", "abcdefghijklmnopqrstuvwxyz",
     129        "x_freesansbold_36_az_messed.bmp", "abcdefghijklmnopqrstuvwxyz",
    130130    };
    131131    struct image *tmp;
     
    139139        if(!fonts[f])
    140140        {
    141             fonts[f] = font_load_variable(files[f * 2], files[f * 2 + 1]);
     141            fonts[f] = font_load_variable(DECODER,
     142                                          files[f * 2], files[f * 2 + 1]);
    142143            if(!fonts[f])
    143144                exit(1);
Note: See TracChangeset for help on using the changeset viewer.