.gitignore | 72 +++++++++++++++++++++++++++----- Makefile.am | 10 ++-- configure.ac | 33 +++++++------- include/X11/fonts/fontenc.h | 2 src/Makefile.am | 7 +-- src/encparse.c | 98 ++++++++++++++++---------------------------- src/fontenc.c | 36 ++++------------ src/fontencI.h | 2 8 files changed, 133 insertions(+), 127 deletions(-)
New commits: commit a52174d1a7562a656559f9bb728a80982b814043 Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Wed Oct 20 22:35:18 2010 -0700 libfontenc 1.1.0 Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/configure.ac b/configure.ac index fb806ac..fb0b1af 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,9 @@ dnl Process this file with autoconf to create configure. AC_PREREQ([2.60]) -AC_INIT(libfontenc, 1.0.5, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libfontenc) +AC_INIT([libfontenc], [1.1.0], + [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], + [libfontenc]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE commit af4a0a752c169b2c003978c550d57602af3fbe01 Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Fri May 14 20:15:18 2010 -0700 Don't need to check if pointer is NULL before calling free() Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> Reviewed-by: Jamey Sharp <ja...@minilop.net> diff --git a/src/encparse.c b/src/encparse.c index 33e0a05..5b4cefb 100644 --- a/src/encparse.c +++ b/src/encparse.c @@ -745,20 +745,19 @@ error: if(encsize) free(enc); encsize=0; if(namsize) { for(i = first; i <= last; i++) - if(nam[i]) - free(nam[i]); + free(nam[i]); free(nam); namsize = 0; } if(mapping) { - if(mapping->client_data) free(mapping->client_data); + free(mapping->client_data); free(mapping); } if(encoding) { FontMapPtr nextmap; - if (encoding->name) free(encoding->name); + free(encoding->name); for (mapping = encoding->mappings; mapping; mapping = nextmap) { - if (mapping->client_data) free(mapping->client_data); + free(mapping->client_data); nextmap = mapping->next; free(mapping); } @@ -930,8 +929,7 @@ FontEncIdentify(const char *fileName) names = malloc((numaliases+2)*sizeof(char*)); if(names == NULL) { - if(encoding->aliases) - free(encoding->aliases); + free(encoding->aliases); free(encoding); return NULL; } diff --git a/src/fontenc.c b/src/fontenc.c index 8718eff..86f5952 100644 --- a/src/fontenc.c +++ b/src/fontenc.c @@ -913,10 +913,8 @@ FontMapReverse(FontMapPtr mapping) return reverse; bail: - if(map) - free(map); - if(reverse) - free(reverse); + free(map); + free(reverse); return NULL; } @@ -930,8 +928,7 @@ FontMapReverseFree(FontMapReversePtr delendum) return; for(i = 0; i < FONTENC_SEGMENTS; i++) - if(map[i] != NULL) - free(map[i]); + free(map[i]); free(map); return; commit 2218195ebb18b620f9e8e0adbea6f7c87ace33ce Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Fri May 14 20:09:21 2010 -0700 Replace malloc(strlen()) + strcpy() with strdup() Now that we use malloc directly instead of xalloc, we can use strdup directly too. Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> Reviewed-by: Jamey Sharp <ja...@minilop.net> diff --git a/src/encparse.c b/src/encparse.c index b288c8c..33e0a05 100644 --- a/src/encparse.c +++ b/src/encparse.c @@ -488,10 +488,9 @@ parseEncodingFile(FontFilePtr f, int headerOnly) encoding = malloc(sizeof(FontEncRec)); if(encoding == NULL) goto error; - encoding->name = malloc(strlen(keyword_value)+1); + encoding->name = strdup(keyword_value); if(encoding->name == NULL) goto error; - strcpy(encoding->name, keyword_value); encoding->size = 256; encoding->row_size = 0; encoding->mappings = NULL; @@ -508,10 +507,9 @@ parseEncodingFile(FontFilePtr f, int headerOnly) case EOF_LINE: goto done; case ALIAS_LINE: if(numaliases < MAXALIASES) { - aliases[numaliases] = malloc(strlen(keyword_value)+1); + aliases[numaliases] = strdup(keyword_value); if(aliases[numaliases] == NULL) goto error; - strcpy(aliases[numaliases], keyword_value); numaliases++; } goto no_mapping; @@ -718,11 +716,10 @@ parseEncodingFile(FontFilePtr f, int headerOnly) nam[i]=NULL; last = value1; } - nam[value1] = malloc(strlen(keyword_value)+1); + nam[value1] = strdup(keyword_value); if(nam[value1] == NULL) { goto error; } - strcpy(nam[value1], keyword_value); goto string_mapping; default: goto string_mapping; /* ignore unknown lines */ @@ -781,10 +778,9 @@ FontEncDirectory(void) if(dir == NULL) { char *c = getenv("FONT_ENCODINGS_DIRECTORY"); if(c) { - dir = malloc(strlen(c) + 1); + dir = strdup(c); if(!dir) return NULL; - strcpy(dir, c); } else { dir = FONT_ENCODINGS_DIRECTORY; } diff --git a/src/fontenc.c b/src/fontenc.c index 1a24fc2..8718eff 100644 --- a/src/fontenc.c +++ b/src/fontenc.c @@ -753,10 +753,9 @@ FontEncLoad(const char *encoding_name, const char *filename) char *new_name; int numaliases = 0; - new_name = malloc(strlen(encoding_name) + 1); + new_name = strdup(encoding_name); if(new_name == NULL) return NULL; - strcpy(new_name, encoding_name); if(encoding->aliases) { for(alias = encoding->aliases; *alias; alias++) numaliases++; commit 4af0cf6ef7309df18c81a1fd109a168c767d9f3d Author: Mikhail Gusarov <dotted...@dottedmag.net> Date: Mon May 10 22:52:42 2010 +0700 Nuke unnecessary casts Signed-off-by: Mikhail Gusarov <dotted...@dottedmag.net> Reviewed-by: Jamey Sharp <ja...@minilop.net> Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/src/encparse.c b/src/encparse.c index 5e31d9d..b288c8c 100644 --- a/src/encparse.c +++ b/src/encparse.c @@ -422,14 +422,14 @@ setCode(unsigned from, unsigned to, unsigned row_size, return 0; if(*encsize == 0) { *encsize = (index < 256) ? 256 : 0x10000; - *enc = (unsigned short*)malloc((*encsize) * sizeof(unsigned short)); + *enc = malloc((*encsize) * sizeof(unsigned short)); if(*enc == NULL) { *encsize = 0; return 1; } } else if(*encsize <= index) { *encsize = 0x10000; - if((newenc = (unsigned short*)realloc(enc, *encsize))==NULL) + if((newenc = realloc(enc, *encsize))==NULL) return 1; *enc = newenc; } @@ -485,10 +485,10 @@ parseEncodingFile(FontFilePtr f, int headerOnly) case EOF_LINE: goto error; case STARTENCODING_LINE: - encoding = (FontEncPtr)malloc(sizeof(FontEncRec)); + encoding = malloc(sizeof(FontEncRec)); if(encoding == NULL) goto error; - encoding->name = (char*)malloc(strlen(keyword_value)+1); + encoding->name = malloc(strlen(keyword_value)+1); if(encoding->name == NULL) goto error; strcpy(encoding->name, keyword_value); @@ -508,7 +508,7 @@ parseEncodingFile(FontFilePtr f, int headerOnly) case EOF_LINE: goto done; case ALIAS_LINE: if(numaliases < MAXALIASES) { - aliases[numaliases] = (char*)malloc(strlen(keyword_value)+1); + aliases[numaliases] = malloc(strlen(keyword_value)+1); if(aliases[numaliases] == NULL) goto error; strcpy(aliases[numaliases], keyword_value); @@ -527,7 +527,7 @@ parseEncodingFile(FontFilePtr f, int headerOnly) if(headerOnly) goto done; if(!strcasecmp(keyword_value, "unicode")) { - mapping = (FontMapPtr)malloc(sizeof(FontMapRec)); + mapping = malloc(sizeof(FontMapRec)); if(mapping == NULL) goto error; mapping->type = FONT_ENCODING_UNICODE; @@ -539,7 +539,7 @@ parseEncodingFile(FontFilePtr f, int headerOnly) mapping->next = NULL; goto mapping; } else if(!strcasecmp(keyword_value, "cmap")) { - mapping = (FontMapPtr)malloc(sizeof(FontMapRec)); + mapping = malloc(sizeof(FontMapRec)); if(mapping == NULL) goto error; mapping->type = FONT_ENCODING_TRUETYPE; @@ -551,7 +551,7 @@ parseEncodingFile(FontFilePtr f, int headerOnly) mapping->next = NULL; goto mapping; } else if(!strcasecmp(keyword_value, "postscript")) { - mapping = (FontMapPtr)malloc(sizeof(FontMapRec)); + mapping = malloc(sizeof(FontMapRec)); if(mapping == NULL) goto error; mapping->type = FONT_ENCODING_POSTSCRIPT; @@ -588,8 +588,7 @@ parseEncodingFile(FontFilePtr f, int headerOnly) case ENDMAPPING_LINE: mapping->recode = FontEncSimpleRecode; mapping->name = FontEncUndefinedName; - mapping->client_data = sm = - (FontEncSimpleMapPtr)malloc(sizeof(FontEncSimpleMapRec)); + mapping->client_data = sm = malloc(sizeof(FontEncSimpleMapRec)); if(sm == NULL) goto error; sm->row_size = encoding->row_size; @@ -598,8 +597,7 @@ parseEncodingFile(FontFilePtr f, int headerOnly) sm->first = first; sm->len=last-first+1; - newmap = - (unsigned short*)malloc(sm->len * sizeof(unsigned short)); + newmap = malloc(sm->len * sizeof(unsigned short)); if(newmap == NULL) { free(sm); mapping->client_data = sm = NULL; @@ -670,8 +668,7 @@ parseEncodingFile(FontFilePtr f, int headerOnly) case ENDMAPPING_LINE: mapping->recode = FontEncUndefinedRecode; mapping->name = FontEncSimpleName; - mapping->client_data = sn = - (FontEncSimpleNamePtr)malloc(sizeof(FontEncSimpleNameRec)); + mapping->client_data = sn = malloc(sizeof(FontEncSimpleNameRec)); if(sn == NULL) goto error; if(first > last) { @@ -681,7 +678,7 @@ parseEncodingFile(FontFilePtr f, int headerOnly) } sn->first = first; sn->len = last - first + 1; - sn->map = (char**)malloc(sn->len*sizeof(char*)); + sn->map = malloc(sn->len*sizeof(char*)); if(sn->map == NULL) { free(sn); mapping->client_data = sn = NULL; @@ -697,7 +694,7 @@ parseEncodingFile(FontFilePtr f, int headerOnly) if(value1 >= 0x10000) goto string_mapping; if(namsize == 0) { namsize = (value1) < 256 ? 256 : 0x10000; - nam = (char**)malloc(namsize * sizeof(char*)); + nam = malloc(namsize * sizeof(char*)); if(nam == NULL) { namsize=0; goto error; @@ -721,7 +718,7 @@ parseEncodingFile(FontFilePtr f, int headerOnly) nam[i]=NULL; last = value1; } - nam[value1] = (char*)malloc(strlen(keyword_value)+1); + nam[value1] = malloc(strlen(keyword_value)+1); if(nam[value1] == NULL) { goto error; } @@ -737,7 +734,7 @@ parseEncodingFile(FontFilePtr f, int headerOnly) encoding->aliases=NULL; if(numaliases) { - encoding->aliases = (char**)malloc((numaliases+1)*sizeof(char*)); + encoding->aliases = malloc((numaliases+1)*sizeof(char*)); if(encoding->aliases == NULL) goto error; for(i=0; i<numaliases; i++) @@ -935,7 +932,7 @@ FontEncIdentify(const char *fileName) for(alias = encoding->aliases; *alias; alias++) numaliases++; - names = (char**)malloc((numaliases+2)*sizeof(char*)); + names = malloc((numaliases+2)*sizeof(char*)); if(names == NULL) { if(encoding->aliases) free(encoding->aliases); diff --git a/src/fontenc.c b/src/fontenc.c index 77c4f89..1a24fc2 100644 --- a/src/fontenc.c +++ b/src/fontenc.c @@ -761,7 +761,7 @@ FontEncLoad(const char *encoding_name, const char *filename) for(alias = encoding->aliases; *alias; alias++) numaliases++; } - new_aliases = (char**)malloc((numaliases+2)*sizeof(char*)); + new_aliases = malloc((numaliases+2)*sizeof(char*)); if(new_aliases == NULL) { free(new_name); return NULL; commit cfc89d09f1bf0ecbe602578fc80dcf6fe46b1c54 Author: Mikhail Gusarov <dotted...@dottedmag.net> Date: Mon May 10 22:52:41 2010 +0700 Expand xalloc/xrealloc/xfree macros Signed-off-by: Mikhail Gusarov <dotted...@dottedmag.net> Reviewed-by: Jamey Sharp <ja...@minilop.net> Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/src/encparse.c b/src/encparse.c index 27215df..5e31d9d 100644 --- a/src/encparse.c +++ b/src/encparse.c @@ -35,9 +35,6 @@ THE SOFTWARE. #endif #include <stdlib.h> -#define xalloc(n) malloc(n) -#define xrealloc(p, n) realloc(p, n) -#define xfree(p) free(p) #include "zlib.h" typedef gzFile FontFilePtr; @@ -425,14 +422,14 @@ setCode(unsigned from, unsigned to, unsigned row_size, return 0; if(*encsize == 0) { *encsize = (index < 256) ? 256 : 0x10000; - *enc = (unsigned short*)xalloc((*encsize) * sizeof(unsigned short)); + *enc = (unsigned short*)malloc((*encsize) * sizeof(unsigned short)); if(*enc == NULL) { *encsize = 0; return 1; } } else if(*encsize <= index) { *encsize = 0x10000; - if((newenc = (unsigned short*)xrealloc(enc, *encsize))==NULL) + if((newenc = (unsigned short*)realloc(enc, *encsize))==NULL) return 1; *enc = newenc; } @@ -488,10 +485,10 @@ parseEncodingFile(FontFilePtr f, int headerOnly) case EOF_LINE: goto error; case STARTENCODING_LINE: - encoding = (FontEncPtr)xalloc(sizeof(FontEncRec)); + encoding = (FontEncPtr)malloc(sizeof(FontEncRec)); if(encoding == NULL) goto error; - encoding->name = (char*)xalloc(strlen(keyword_value)+1); + encoding->name = (char*)malloc(strlen(keyword_value)+1); if(encoding->name == NULL) goto error; strcpy(encoding->name, keyword_value); @@ -511,7 +508,7 @@ parseEncodingFile(FontFilePtr f, int headerOnly) case EOF_LINE: goto done; case ALIAS_LINE: if(numaliases < MAXALIASES) { - aliases[numaliases] = (char*)xalloc(strlen(keyword_value)+1); + aliases[numaliases] = (char*)malloc(strlen(keyword_value)+1); if(aliases[numaliases] == NULL) goto error; strcpy(aliases[numaliases], keyword_value); @@ -530,7 +527,7 @@ parseEncodingFile(FontFilePtr f, int headerOnly) if(headerOnly) goto done; if(!strcasecmp(keyword_value, "unicode")) { - mapping = (FontMapPtr)xalloc(sizeof(FontMapRec)); + mapping = (FontMapPtr)malloc(sizeof(FontMapRec)); if(mapping == NULL) goto error; mapping->type = FONT_ENCODING_UNICODE; @@ -542,7 +539,7 @@ parseEncodingFile(FontFilePtr f, int headerOnly) mapping->next = NULL; goto mapping; } else if(!strcasecmp(keyword_value, "cmap")) { - mapping = (FontMapPtr)xalloc(sizeof(FontMapRec)); + mapping = (FontMapPtr)malloc(sizeof(FontMapRec)); if(mapping == NULL) goto error; mapping->type = FONT_ENCODING_TRUETYPE; @@ -554,7 +551,7 @@ parseEncodingFile(FontFilePtr f, int headerOnly) mapping->next = NULL; goto mapping; } else if(!strcasecmp(keyword_value, "postscript")) { - mapping = (FontMapPtr)xalloc(sizeof(FontMapRec)); + mapping = (FontMapPtr)malloc(sizeof(FontMapRec)); if(mapping == NULL) goto error; mapping->type = FONT_ENCODING_POSTSCRIPT; @@ -592,7 +589,7 @@ parseEncodingFile(FontFilePtr f, int headerOnly) mapping->recode = FontEncSimpleRecode; mapping->name = FontEncUndefinedName; mapping->client_data = sm = - (FontEncSimpleMapPtr)xalloc(sizeof(FontEncSimpleMapRec)); + (FontEncSimpleMapPtr)malloc(sizeof(FontEncSimpleMapRec)); if(sm == NULL) goto error; sm->row_size = encoding->row_size; @@ -602,9 +599,9 @@ parseEncodingFile(FontFilePtr f, int headerOnly) sm->first = first; sm->len=last-first+1; newmap = - (unsigned short*)xalloc(sm->len * sizeof(unsigned short)); + (unsigned short*)malloc(sm->len * sizeof(unsigned short)); if(newmap == NULL) { - xfree(sm); + free(sm); mapping->client_data = sm = NULL; goto error; } @@ -674,19 +671,19 @@ parseEncodingFile(FontFilePtr f, int headerOnly) mapping->recode = FontEncUndefinedRecode; mapping->name = FontEncSimpleName; mapping->client_data = sn = - (FontEncSimpleNamePtr)xalloc(sizeof(FontEncSimpleNameRec)); + (FontEncSimpleNamePtr)malloc(sizeof(FontEncSimpleNameRec)); if(sn == NULL) goto error; if(first > last) { - xfree(sn); + free(sn); mapping->client_data = sn = NULL; goto error; } sn->first = first; sn->len = last - first + 1; - sn->map = (char**)xalloc(sn->len*sizeof(char*)); + sn->map = (char**)malloc(sn->len*sizeof(char*)); if(sn->map == NULL) { - xfree(sn); + free(sn); mapping->client_data = sn = NULL; goto error; } @@ -700,14 +697,14 @@ parseEncodingFile(FontFilePtr f, int headerOnly) if(value1 >= 0x10000) goto string_mapping; if(namsize == 0) { namsize = (value1) < 256 ? 256 : 0x10000; - nam = (char**)xalloc(namsize * sizeof(char*)); + nam = (char**)malloc(namsize * sizeof(char*)); if(nam == NULL) { namsize=0; goto error; } } else if(namsize <= value1) { namsize = 0x10000; - if((newnam = (char**)xrealloc(nam, namsize)) == NULL) + if((newnam = (char**)realloc(nam, namsize)) == NULL) goto error; nam = newnam; } @@ -724,7 +721,7 @@ parseEncodingFile(FontFilePtr f, int headerOnly) nam[i]=NULL; last = value1; } - nam[value1] = (char*)xalloc(strlen(keyword_value)+1); + nam[value1] = (char*)malloc(strlen(keyword_value)+1); if(nam[value1] == NULL) { goto error; } @@ -735,12 +732,12 @@ parseEncodingFile(FontFilePtr f, int headerOnly) } done: - if(encsize) xfree(enc); encsize=0; enc = NULL; - if(namsize) xfree(nam); namsize=0; nam = NULL; /* don't free entries! */ + if(encsize) free(enc); encsize=0; enc = NULL; + if(namsize) free(nam); namsize=0; nam = NULL; /* don't free entries! */ encoding->aliases=NULL; if(numaliases) { - encoding->aliases = (char**)xalloc((numaliases+1)*sizeof(char*)); + encoding->aliases = (char**)malloc((numaliases+1)*sizeof(char*)); if(encoding->aliases == NULL) goto error; for(i=0; i<numaliases; i++) @@ -751,30 +748,30 @@ parseEncodingFile(FontFilePtr f, int headerOnly) return encoding; error: - if(encsize) xfree(enc); encsize=0; + if(encsize) free(enc); encsize=0; if(namsize) { for(i = first; i <= last; i++) if(nam[i]) - xfree(nam[i]); - xfree(nam); + free(nam[i]); + free(nam); namsize = 0; } if(mapping) { - if(mapping->client_data) xfree(mapping->client_data); - xfree(mapping); + if(mapping->client_data) free(mapping->client_data); + free(mapping); } if(encoding) { FontMapPtr nextmap; - if (encoding->name) xfree(encoding->name); + if (encoding->name) free(encoding->name); for (mapping = encoding->mappings; mapping; mapping = nextmap) { - if (mapping->client_data) xfree(mapping->client_data); + if (mapping->client_data) free(mapping->client_data); nextmap = mapping->next; - xfree(mapping); + free(mapping); } - xfree(encoding); + free(encoding); } for(i = 0; i < numaliases; i++) - xfree(aliases[i]); + free(aliases[i]); /* We don't need to free sn and sm as they handled locally in the body.*/ return NULL; } @@ -938,11 +935,11 @@ FontEncIdentify(const char *fileName) for(alias = encoding->aliases; *alias; alias++) numaliases++; - names = (char**)xalloc((numaliases+2)*sizeof(char*)); + names = (char**)malloc((numaliases+2)*sizeof(char*)); if(names == NULL) { if(encoding->aliases) - xfree(encoding->aliases); - xfree(encoding); + free(encoding->aliases); + free(encoding); return NULL; } @@ -953,8 +950,8 @@ FontEncIdentify(const char *fileName) *name = *alias; *name = NULL; - xfree(encoding->aliases); - xfree(encoding); + free(encoding->aliases); + free(encoding); return names; } diff --git a/src/fontenc.c b/src/fontenc.c index 76de4e3..77c4f89 100644 --- a/src/fontenc.c +++ b/src/fontenc.c @@ -29,9 +29,7 @@ THE SOFTWARE. #endif #include <stdlib.h> -#define xalloc(n) malloc(n) -#define xrealloc(p, n) realloc(p, n) -#define xfree(p) free(p) + #define FALSE 0 #define TRUE 1 #define MAXFONTNAMELEN 1024 @@ -755,7 +753,7 @@ FontEncLoad(const char *encoding_name, const char *filename) char *new_name; int numaliases = 0; - new_name = xalloc(strlen(encoding_name) + 1); + new_name = malloc(strlen(encoding_name) + 1); if(new_name == NULL) return NULL; strcpy(new_name, encoding_name); @@ -763,14 +761,14 @@ FontEncLoad(const char *encoding_name, const char *filename) for(alias = encoding->aliases; *alias; alias++) numaliases++; } - new_aliases = (char**)xalloc((numaliases+2)*sizeof(char*)); + new_aliases = (char**)malloc((numaliases+2)*sizeof(char*)); if(new_aliases == NULL) { - xfree(new_name); + free(new_name); return NULL; } if(encoding->aliases) { memcpy(new_aliases, encoding->aliases, numaliases*sizeof(char*)); - xfree(encoding->aliases); + free(encoding->aliases); } new_aliases[numaliases] = new_name; new_aliases[numaliases+1] = NULL; @@ -917,9 +915,9 @@ FontMapReverse(FontMapPtr mapping) bail: if(map) - xfree(map); + free(map); if(reverse) - xfree(reverse); + free(reverse); return NULL; } @@ -934,8 +932,8 @@ FontMapReverseFree(FontMapReversePtr delendum) for(i = 0; i < FONTENC_SEGMENTS; i++) if(map[i] != NULL) - xfree(map[i]); + free(map[i]); - xfree(map); + free(map); return; } commit 3db0064e4b6108716767b136ba5867c4cdf57f99 Author: Mikhail Gusarov <dotted...@dottedmag.net> Date: Mon May 10 22:52:40 2010 +0700 unifdef FONTENC_NO_LIBFONT This symbol was unconditionally defined in Makefile Signed-off-by: Mikhail Gusarov <dotted...@dottedmag.net> Reviewed-by: Jamey Sharp <ja...@minilop.net> Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/src/Makefile.am b/src/Makefile.am index 97111ee..96d0a38 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -12,8 +12,7 @@ AM_CFLAGS = \ fontencd...@encodingsdir@ FONTENCDEFS = -DFONT_ENCODINGS_DIRECTORY=\"$(FONTENCDIR)/encodings.dir\" -INCLUDES = -I$(top_srcdir)/include \ - -DFONTENC_NO_LIBFONT $(FONTENCDEFS) +INCLUDES = -I$(top_srcdir)/include $(FONTENCDEFS) libfontenc_la_LIBADD = @FONTENC_LIBS@ diff --git a/src/encparse.c b/src/encparse.c index c738878..27215df 100644 --- a/src/encparse.c +++ b/src/encparse.c @@ -34,13 +34,6 @@ THE SOFTWARE. #include <strings.h> #endif -#ifndef FONTENC_NO_LIBFONT - -#include <X11/fonts/fntfilio.h> -#include <X11/fonts/fntfilst.h> - -#else - #include <stdlib.h> #define xalloc(n) malloc(n) #define xrealloc(p, n) realloc(p, n) @@ -55,8 +48,6 @@ typedef gzFile FontFilePtr; #define MAXFONTFILENAMELEN 1024 #define MAXFONTNAMELEN 1024 -#endif - #include <X11/fonts/fontenc.h> #include "fontencI.h" diff --git a/src/fontenc.c b/src/fontenc.c index 013a777..76de4e3 100644 --- a/src/fontenc.c +++ b/src/fontenc.c @@ -28,13 +28,6 @@ THE SOFTWARE. #include <strings.h> #endif -#ifndef FONTENC_NO_LIBFONT - -#include <X11/fonts/fontmisc.h> /* defines xalloc and friends */ -#include <X11/fonts/fntfilst.h> - -#else - #include <stdlib.h> #define xalloc(n) malloc(n) #define xrealloc(p, n) realloc(p, n) @@ -44,8 +37,6 @@ THE SOFTWARE. #define MAXFONTNAMELEN 1024 #define MAXFONTFILENAMELEN 1024 -#endif /* FONTENC_NO_FONTFILE */ - #include <X11/fonts/fontenc.h> #include "fontencI.h" commit 8029fc07fc28e427979c81dd50087083e441d65d Author: Mikhail Gusarov <dotted...@dottedmag.net> Date: Mon May 10 22:52:39 2010 +0700 Nuke RCS tags Signed-off-by: Mikhail Gusarov <dotted...@dottedmag.net> Reviewed-by: Jamey Sharp <ja...@minilop.net> Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/include/X11/fonts/fontenc.h b/include/X11/fonts/fontenc.h index 09472cf..656cfaa 100644 --- a/include/X11/fonts/fontenc.h +++ b/include/X11/fonts/fontenc.h @@ -20,8 +20,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* $XFree86: xc/lib/font/include/fontenc.h,v 1.7 2000/11/14 16:54:45 dawes Exp $ */ - /* Header for backend-independent encoding code */ /* An encoding is identified with a name. An encoding contains some diff --git a/src/encparse.c b/src/encparse.c index 217bf78..c738878 100644 --- a/src/encparse.c +++ b/src/encparse.c @@ -1,4 +1,3 @@ -/* $XdotOrg: lib/fontenc/src/encparse.c,v 1.6 2006/04/10 16:15:12 alanc Exp $ */ /* Copyright (c) 1998-2001 by Juliusz Chroboczek @@ -21,8 +20,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* $XFree86: xc/lib/font/fontfile/encparse.c,v 1.20tsi Exp $ */ - /* Parser for encoding files */ /* This code assumes that we are using ASCII. We don't use the ctype diff --git a/src/fontenc.c b/src/fontenc.c index 923e35e..013a777 100644 --- a/src/fontenc.c +++ b/src/fontenc.c @@ -20,9 +20,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* $XdotOrg: xc/lib/font/fontfile/fontenc.c,v 1.3 2005/07/03 07:01:00 daniels Exp $ */ -/* $XFree86: xc/lib/font/fontfile/fontenc.c,v 1.15 2003/02/20 03:25:19 dawes Exp $ */ - /* Backend-independent encoding code */ #include <string.h> diff --git a/src/fontencI.h b/src/fontencI.h index 741193a..9bba85e 100644 --- a/src/fontencI.h +++ b/src/fontencI.h @@ -20,8 +20,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* $XFree86: xc/lib/font/fontfile/fontencI.h,v 1.3 1999/04/25 10:01:43 dawes Exp $ */ - /* Private types and functions for the encoding code. */ /* Used by the files `fontenc.h' and `encparse.h' */ commit 3e00a8c322ea5fd8ea21f83f5861c59aa91ce341 Author: Gaetan Nadon <mems...@videotron.ca> Date: Mon Mar 29 16:50:34 2010 -0400 config: update AC_PREREQ statement to 2.60 Unrelated to the previous patches, the new value simply reflects the reality that the minimum level for autoconf to configure all x.org modules is 2.60 dated June 2006. ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz Signed-off-by: Gaetan Nadon <mems...@videotron.ca> diff --git a/configure.ac b/configure.ac index c8be520..fb806ac 100644 --- a/configure.ac +++ b/configure.ac @@ -21,7 +21,7 @@ dnl PERFORMANCE OF THIS SOFTWARE. dnl dnl Process this file with autoconf to create configure. -AC_PREREQ([2.57]) +AC_PREREQ([2.60]) AC_INIT(libfontenc, 1.0.5, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libfontenc) AM_INIT_AUTOMAKE([foreign dist-bzip2]) commit 0191826dd2f0fc54dfce72ce729d142ddecbabcf Author: Gaetan Nadon <mems...@videotron.ca> Date: Mon Mar 29 14:53:49 2010 -0400 config: remove the pkgconfig pc.in file from EXTRA_DIST Automake always includes it in the tarball. Signed-off-by: Gaetan Nadon <mems...@videotron.ca> diff --git a/Makefile.am b/Makefile.am index 6f21545..e793d4c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -25,7 +25,6 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = fontenc.pc MAINTAINERCLEANFILES = ChangeLog INSTALL -EXTRA_DIST = fontenc.pc.in .PHONY: ChangeLog INSTALL commit d2d6e4d88b62aa84e2cc9d229adf32ede81cbf5c Author: Gaetan Nadon <mems...@videotron.ca> Date: Tue Feb 16 10:37:21 2010 -0500 config: move CWARNFLAGS from configure.ac to Makefile.am Compiler warning flags should be explicitly set in the makefile rather than being merged with other packages compiler flags. Signed-off-by: Gaetan Nadon <mems...@videotron.ca> diff --git a/configure.ac b/configure.ac index b16a7e6..c8be520 100644 --- a/configure.ac +++ b/configure.ac @@ -51,9 +51,6 @@ AC_CHECK_LIB(z, gzclose) # Check for dependencies PKG_CHECK_MODULES(FONTENC, xproto) -FONTENC_CFLAGS="$CWARNFLAGS $FONTENC_CFLAGS" -AC_SUBST(FONTENC_CFLAGS) -AC_SUBST(FONTENC_LIBS) dnl Allow checking code with lint, sparse, etc. XORG_WITH_LINT diff --git a/src/Makefile.am b/src/Makefile.am index 8cd0911..97111ee 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -5,7 +5,9 @@ libfontenc_la_SOURCES = \ fontenc.c \ fontencI.h -AM_CFLAGS = @FONTENC_CFLAGS@ +AM_CFLAGS = \ + $(FONTENC_CFLAGS) \ + $(CWARNFLAGS) fontencd...@encodingsdir@ FONTENCDEFS = -DFONT_ENCODINGS_DIRECTORY=\"$(FONTENCDIR)/encodings.dir\" commit b3807dccab5aee5455137654647c9c083addb31e Author: Gaetan Nadon <mems...@videotron.ca> Date: Fri Nov 27 20:56:05 2009 -0500 Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES Now that the INSTALL file is generated. Allows running make maintainer-clean. diff --git a/Makefile.am b/Makefile.am index a2fb18e..6f21545 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,6 +24,7 @@ SUBDIRS = src pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = fontenc.pc +MAINTAINERCLEANFILES = ChangeLog INSTALL EXTRA_DIST = fontenc.pc.in .PHONY: ChangeLog INSTALL commit 79c70fcf676778192e1d7bb0a194d75cb7227506 Author: Gaetan Nadon <mems...@videotron.ca> Date: Wed Oct 28 14:09:10 2009 -0400 INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206 Add missing INSTALL file. Use standard GNU file on building tarball README may have been updated Remove AUTHORS file as it is empty and no content available yet. Remove NEWS file as it is empty and no content available yet. diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index e69de29..0000000 diff --git a/INSTALL b/INSTALL deleted file mode 100644 index e69de29..0000000 diff --git a/Makefile.am b/Makefile.am index d5ce153..a2fb18e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,12 +26,15 @@ pkgconfig_DATA = fontenc.pc EXTRA_DIST = fontenc.pc.in -.PHONY: ChangeLog +.PHONY: ChangeLog INSTALL + +INSTALL: + $(INSTALL_CMD) ChangeLog: $(CHANGELOG_CMD) -dist-hook: ChangeLog +dist-hook: ChangeLog INSTALL if LINT lint: diff --git a/NEWS b/NEWS deleted file mode 100644 index e69de29..0000000 commit e7337c1598b8f258122a1f1307b3c83ab6c74a9c Author: Gaetan Nadon <mems...@videotron.ca> Date: Tue Oct 27 15:07:25 2009 -0400 Deploy the new XORG_DEFAULT_OPTIONS #24242 This macro aggregate a number of existing macros that sets commmon X.Org components configuration options. It shields the configuration file from future changes. diff --git a/configure.ac b/configure.ac index 8ae2674..b16a7e6 100644 --- a/configure.ac +++ b/configure.ac @@ -27,15 +27,16 @@ AC_INIT(libfontenc, 1.0.5, [https://bugs.freedesktop.org/enter_bug.cgi?product=x AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE -# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG, XORG_WITH_LINT -m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) -XORG_MACROS_VERSION(1.2) +# Require xorg-macros: XORG_DEFAULT_OPTIONS -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1pjrtf-0007ld...@alioth.debian.org