diff options
Diffstat (limited to 'backend/dvi/mdvi-lib')
-rw-r--r-- | backend/dvi/mdvi-lib/Makefile.am | 4 | ||||
-rw-r--r-- | backend/dvi/mdvi-lib/afmparse.c | 18 | ||||
-rw-r--r-- | backend/dvi/mdvi-lib/bitmap.c | 2 | ||||
-rw-r--r-- | backend/dvi/mdvi-lib/color.c | 1 | ||||
-rw-r--r-- | backend/dvi/mdvi-lib/color.h | 1 | ||||
-rw-r--r-- | backend/dvi/mdvi-lib/dviread.c | 2 | ||||
-rw-r--r-- | backend/dvi/mdvi-lib/fontmap.c | 1 | ||||
-rw-r--r-- | backend/dvi/mdvi-lib/hash.c | 1 | ||||
-rw-r--r-- | backend/dvi/mdvi-lib/hash.h | 2 | ||||
-rw-r--r-- | backend/dvi/mdvi-lib/mdvi.h | 2 | ||||
-rw-r--r-- | backend/dvi/mdvi-lib/paper.h | 1 | ||||
-rw-r--r-- | backend/dvi/mdvi-lib/private.h | 14 | ||||
-rw-r--r-- | backend/dvi/mdvi-lib/special.c | 1 | ||||
-rw-r--r-- | backend/dvi/mdvi-lib/tfmfile.c | 1 | ||||
-rw-r--r-- | backend/dvi/mdvi-lib/util.c | 20 |
15 files changed, 18 insertions, 53 deletions
diff --git a/backend/dvi/mdvi-lib/Makefile.am b/backend/dvi/mdvi-lib/Makefile.am index 5edcdd03..e41b10bc 100644 --- a/backend/dvi/mdvi-lib/Makefile.am +++ b/backend/dvi/mdvi-lib/Makefile.am @@ -37,7 +37,9 @@ libmdvi_la_SOURCES = \ tfmfile.c \ tt.c \ util.c \ - vf.c + vf.c +libmdvi_la_LIBADD = $(GLIB_LIBS) +libmdvi_la_CFLAGS = $(GLIB_CFLAGS) -include $(top_srcdir)/git.mk diff --git a/backend/dvi/mdvi-lib/afmparse.c b/backend/dvi/mdvi-lib/afmparse.c index f8d840b7..f01042d2 100644 --- a/backend/dvi/mdvi-lib/afmparse.c +++ b/backend/dvi/mdvi-lib/afmparse.c @@ -81,13 +81,10 @@ #define MATCH(A,B) (strncmp((A),(B), MAX_NAME) == 0) - - /*************************** GLOBALS ***********************/ static char *ident = NULL; /* storage buffer for keywords */ - /* "shorts" for fast case statement * The values of each of these enumerated items correspond to an entry in the * table of strings defined below. Therefore, if you add a new string as @@ -175,7 +172,6 @@ static char *token(FILE *stream) } /* token */ - /*************************** linetoken *************************/ /* "linetoken" will get read all tokens until the EOL character from @@ -203,7 +199,6 @@ static char *linetoken(FILE *stream) } /* linetoken */ - /*************************** recognize *************************/ /* This function tries to match a string to a known list of @@ -234,7 +229,6 @@ static enum parseKey recognize(char *ident) } /* recognize */ - /************************* parseGlobals *****************************/ /* This function is called by "parseFile". It will parse the AFM File @@ -401,8 +395,6 @@ static BOOL parseGlobals(FILE *fp, GlobalFontInfo *gfi) } /* parseGlobals */ - - #if 0 /* this function does not seem to be used anywhere */ /************************* initializeArray ************************/ @@ -584,7 +576,6 @@ static int parseCharWidths(FILE *fp, int *cwi) } /* parseCharWidths */ - /************************* parseCharMetrics ************************/ /* This function is called by parseFile if the caller of parseFile @@ -694,8 +685,6 @@ static int parseCharMetrics(FILE *fp, FontInfo *fi) } /* parseCharMetrics */ - - /************************* parseTrackKernData ***********************/ /* This function is called by "parseFile". It will parse the AFM File @@ -797,7 +786,6 @@ static int parseTrackKernData(FILE *fp, FontInfo *fi) } /* parseTrackKernData */ - /************************* parsePairKernData ************************/ /* This function is called by "parseFile". It will parse the AFM File @@ -918,7 +906,6 @@ static int parsePairKernData(FILE *fp, FontInfo *fi) } /* parsePairKernData */ - /************************* parseCompCharData **************************/ /* This function is called by "parseFile". It will parse the AFM File @@ -1043,12 +1030,8 @@ static int parseCompCharData(FILE *fp, FontInfo *fi) } /* parseCompCharData */ - - - /*************************** 'PUBLIC' FUNCTION ********************/ - /*************************** parseFile *****************************/ /* parseFile is the only 'public' procedure available. It is called @@ -1078,7 +1061,6 @@ extern int afm_parse_file(FILE *fp, FontInfo **fi, FLAGS flags) register char *keyword; /* used to store a token */ - /* storage data for the global variable ident */ ident = (char *) calloc(MAX_NAME, sizeof(char)); if (ident == NULL) {error = storageProblem; return(error);} diff --git a/backend/dvi/mdvi-lib/bitmap.c b/backend/dvi/mdvi-lib/bitmap.c index de1de6a7..877aef5d 100644 --- a/backend/dvi/mdvi-lib/bitmap.c +++ b/backend/dvi/mdvi-lib/bitmap.c @@ -117,7 +117,6 @@ static Uchar bit_swap[] = { 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff }; - /* * next we have three bitmap functions to convert bitmaps in LSB bit order * with 8, 16 and 32 bits per unit, to our internal format. The differences @@ -192,7 +191,6 @@ BITMAP *bitmap_convert_msb8(Uchar *data, int w, int h, int stride) return bm; } - BITMAP *bitmap_copy(BITMAP *bm) { BITMAP *nb = bitmap_alloc(bm->width, bm->height); diff --git a/backend/dvi/mdvi-lib/color.c b/backend/dvi/mdvi-lib/color.c index ef6036a9..ced9ac0c 100644 --- a/backend/dvi/mdvi-lib/color.c +++ b/backend/dvi/mdvi-lib/color.c @@ -79,7 +79,6 @@ static int cc_entries; #define GAMMA_DIFF 0.005 - /* create a color table */ Ulong *get_color_table(DviDevice *dev, int nlevels, Ulong fg, Ulong bg, double gamma, int density) diff --git a/backend/dvi/mdvi-lib/color.h b/backend/dvi/mdvi-lib/color.h index cbc3c0ef..c87c4dcf 100644 --- a/backend/dvi/mdvi-lib/color.h +++ b/backend/dvi/mdvi-lib/color.h @@ -16,7 +16,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #ifndef _COLOR_H_ #define _COLOR_H_ diff --git a/backend/dvi/mdvi-lib/dviread.c b/backend/dvi/mdvi-lib/dviread.c index 44005117..dbb4abbb 100644 --- a/backend/dvi/mdvi-lib/dviread.c +++ b/backend/dvi/mdvi-lib/dviread.c @@ -614,8 +614,6 @@ int mdvi_configure(DviContext *dvi, DviParamCode option, ...) return -1; if(np.mag <= 0.0) return -1; - if(np.density < 0) - return -1; if(np.hshrink < 1 || np.vshrink < 1) return -1; if(np.hdrift < 0 || np.vdrift < 0) diff --git a/backend/dvi/mdvi-lib/fontmap.c b/backend/dvi/mdvi-lib/fontmap.c index 36111bd5..24b497bb 100644 --- a/backend/dvi/mdvi-lib/fontmap.c +++ b/backend/dvi/mdvi-lib/fontmap.c @@ -834,7 +834,6 @@ int mdvi_add_fontmap_file(const char *name, const char *fullpath) return 0; } - void mdvi_flush_encodings(void) { DviEncoding *enc; diff --git a/backend/dvi/mdvi-lib/hash.c b/backend/dvi/mdvi-lib/hash.c index 3327fa58..693f67f6 100644 --- a/backend/dvi/mdvi-lib/hash.c +++ b/backend/dvi/mdvi-lib/hash.c @@ -21,7 +21,6 @@ /* simple hash tables for MDVI */ - struct _DviHashBucket { DviHashBucket *next; DviHashKey key; diff --git a/backend/dvi/mdvi-lib/hash.h b/backend/dvi/mdvi-lib/hash.h index b10afd60..ed1cdfb0 100644 --- a/backend/dvi/mdvi-lib/hash.h +++ b/backend/dvi/mdvi-lib/hash.h @@ -3,7 +3,6 @@ /* Hash tables */ - typedef struct _DviHashBucket DviHashBucket; typedef struct _DviHashTable DviHashTable; @@ -18,7 +17,6 @@ typedef Ulong (*DviHashFunc) __PROTO((DviHashKey key)); typedef int (*DviHashComp) __PROTO((DviHashKey key1, DviHashKey key2)); typedef void (*DviHashFree) __PROTO((DviHashKey key, void *data)); - struct _DviHashTable { DviHashBucket **buckets; int nbucks; diff --git a/backend/dvi/mdvi-lib/mdvi.h b/backend/dvi/mdvi-lib/mdvi.h index a05f9278..a0857f3f 100644 --- a/backend/dvi/mdvi-lib/mdvi.h +++ b/backend/dvi/mdvi-lib/mdvi.h @@ -414,7 +414,6 @@ struct _DviRange { int step; /* step */ }; - typedef void (*DviSpecialHandler) __PROTO((DviContext *dvi, const char *prefix, const char *arg)); @@ -600,7 +599,6 @@ extern int font_free_unused __PROTO((DviDevice *)); extern int mdvi_encode_font __PROTO((DviParams *, DviFont *)); - /* font lookup functions */ extern int mdvi_register_font_type __PROTO((DviFontInfo *, int)); extern char **mdvi_list_font_class __PROTO((int)); diff --git a/backend/dvi/mdvi-lib/paper.h b/backend/dvi/mdvi-lib/paper.h index d42ee079..0eb2c938 100644 --- a/backend/dvi/mdvi-lib/paper.h +++ b/backend/dvi/mdvi-lib/paper.h @@ -24,7 +24,6 @@ struct _DviPaperSpec { const char *height; }; - extern int mdvi_get_paper_size __PROTO((const char *, DviPaper *)); extern DviPaperSpec* mdvi_get_paper_specs __PROTO((DviPaperClass)); extern void mdvi_free_paper_specs __PROTO((DviPaperSpec *)); diff --git a/backend/dvi/mdvi-lib/private.h b/backend/dvi/mdvi-lib/private.h index 9f89dc70..9bb89e13 100644 --- a/backend/dvi/mdvi-lib/private.h +++ b/backend/dvi/mdvi-lib/private.h @@ -16,8 +16,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _MDVI_PRIVATE_H -#define _MDVI_PRIVATE_H 1 +#include <config.h> +#include <glib/gi18n-lib.h> + +#define _MDVI_PRIVATE_H 1 #define HAVE_PROTOTYPES 1 #if STDC_HEADERS @@ -45,15 +48,6 @@ #define SKIPSP(p) while(ISSP(p)) p++ #define SKIPNSP(p) while(*(p) && !ISSP(p)) p++ -#ifdef ENABLE_NLS -#include <libintl.h> -#define _(x) gettext(x) -#define _G(x) x -#else -#define _(x) x -#define _G(x) x -#endif /* ENABLE_NLS */ - #if defined (__i386__) && defined (__GNUC__) && __GNUC__ >= 2 #define _BREAKPOINT() do { __asm__ __volatile__ ("int $03"); } while(0) #elif defined (__alpha__) && defined (__GNUC__) && __GNUC__ >= 2 diff --git a/backend/dvi/mdvi-lib/special.c b/backend/dvi/mdvi-lib/special.c index 64a1647b..93dd390e 100644 --- a/backend/dvi/mdvi-lib/special.c +++ b/backend/dvi/mdvi-lib/special.c @@ -212,7 +212,6 @@ void mdvi_flush_specials(void) { DviSpecial *sp, *list; - for(list = (DviSpecial *)specials.head; (sp = list); ) { list = sp->next; if(sp->prefix) mdvi_free(sp->prefix); diff --git a/backend/dvi/mdvi-lib/tfmfile.c b/backend/dvi/mdvi-lib/tfmfile.c index f7ba251f..52259dfb 100644 --- a/backend/dvi/mdvi-lib/tfmfile.c +++ b/backend/dvi/mdvi-lib/tfmfile.c @@ -258,7 +258,6 @@ int tfm_load_file(const char *filename, TFMInfo *info) /* allocate characters */ info->chars = xnalloc(TFMChar, size); - #ifdef WORD_LITTLE_ENDIAN /* byte-swap the three arrays at once (they are consecutive in memory) */ swap_array((Uint32 *)widths, nw + nh + nd); diff --git a/backend/dvi/mdvi-lib/util.c b/backend/dvi/mdvi-lib/util.c index 15b53f13..feb55ee8 100644 --- a/backend/dvi/mdvi-lib/util.c +++ b/backend/dvi/mdvi-lib/util.c @@ -17,6 +17,8 @@ */ #include <config.h> +#include <glib/gi18n-lib.h> + #include <stdio.h> #include <stdlib.h> #include <stdarg.h> @@ -30,14 +32,14 @@ #include "private.h" static char *const messages[] = { - _G("Ooops!"), - _G("Aieeeee!!"), - _G("Ouch!"), - _G("Houston, we have a problem"), - _G("3.. 2.. 1.. BOOM!"), - _G("I'm history"), - _G("I'm going down"), - _G("I smell a rat") + N_("Ooops!"), + N_("Aieeeee!!"), + N_("Ouch!"), + N_("Houston, we have a problem"), + N_("3.. 2.. 1.. BOOM!"), + N_("I'm history"), + N_("I'm going down"), + N_("I smell a rat") }; #define NMSGS (sizeof(messages) / sizeof(char *)) @@ -139,7 +141,7 @@ void mdvi_crash(const char *format, ...) va_start(ap, format); fprintf(stderr, "%s: %s: ", program_name, - gettext(messages[(int)time(NULL) % NMSGS])); + _(messages[(int)time(NULL) % NMSGS])); vfprintf(stderr, format, ap); #ifndef __GNUC__ /* let's be portable */ |