diff options
author | Juliusz Chroboczek <jch@pps.jussieu.fr> | 2008-05-11 00:30:12 +0200 |
---|---|---|
committer | Juliusz Chroboczek <jch@pps.jussieu.fr> | 2008-05-11 00:30:12 +0200 |
commit | 8e36cc8647b27a4d14cf3f63045410db79fb98a3 (patch) | |
tree | f9c31b8c0a7f92ec50094f7ff33f51228e7ecc18 | |
parent | 867c33d332abe479ab088f98e01c06800203a3e0 (diff) |
Rename *_reliable to *_alloc.
-rw-r--r-- | fonttosfnt.c | 4 | ||||
-rw-r--r-- | fonttosfnt.h | 4 | ||||
-rw-r--r-- | read.c | 22 | ||||
-rw-r--r-- | util.c | 10 |
4 files changed, 20 insertions, 20 deletions
diff --git a/fonttosfnt.c b/fonttosfnt.c index e8e41b0..78c6b7e 100644 --- a/fonttosfnt.c +++ b/fonttosfnt.c @@ -58,10 +58,10 @@ main(int argc, char **argv) if(argv[i][1] == 'o') { if(argv[i][2] == '\0') { - output = sprintf_reliable("%s", argv[i + 1]); + output = sprintf_alloc("%s", argv[i + 1]); i += 2; } else { - output = sprintf_reliable("%s", argv[i] + 2); + output = sprintf_alloc("%s", argv[i] + 2); i++; } } else if(strcmp(argv[i], "-v") == 0) { diff --git a/fonttosfnt.h b/fonttosfnt.h index b7392a7..5b3ec78 100644 --- a/fonttosfnt.h +++ b/fonttosfnt.h @@ -162,8 +162,8 @@ int writeFile(char *filename, FontPtr); #define PROP_INTEGER 2 #define PROP_CARDINAL 3 -char *sprintf_reliable(char *f, ...); -char *vsprintf_reliable(char *f, va_list args); +char *sprintf_alloc(char *f, ...); +char *vsprintf_alloc(char *f, va_list args); char *makeUTF16(char *); unsigned makeName(char*); int macTime(int *, unsigned *); @@ -109,29 +109,29 @@ readFile(char *filename, FontPtr font) BDF_PropertyRec prop; int rc, i; if(strcmp(face->style_name, "Regular") == 0) - full_name = sprintf_reliable("%s", face->family_name); + full_name = sprintf_alloc("%s", face->family_name); else - full_name = sprintf_reliable("%s %s", - face->family_name, face->style_name); + full_name = sprintf_alloc("%s %s", + face->family_name, face->style_name); /* The unique name doesn't actually need to be globally unique; it only needs to be unique among all installed fonts on a Windows system. We don't bother getting it quite right. */ if(face->num_fixed_sizes <= 0) - unique_name = sprintf_reliable("%s "XVENDORNAMESHORT" bitmap" - , full_name); + unique_name = sprintf_alloc("%s "XVENDORNAMESHORT" bitmap", + full_name); else if(face->available_sizes[0].width == face->available_sizes[0].height) - unique_name = sprintf_reliable("%s "XVENDORNAMESHORT + unique_name = sprintf_alloc("%s "XVENDORNAMESHORT " bitmap size %d", full_name, face->available_sizes[0].height); else - unique_name = sprintf_reliable("%s "XVENDORNAMESHORT - " bitmap size %dx%d", - full_name, - face->available_sizes[0].width, - face->available_sizes[0].height); + unique_name = sprintf_alloc("%s "XVENDORNAMESHORT + " bitmap size %dx%d", + full_name, + face->available_sizes[0].width, + face->available_sizes[0].height); font->names = malloc(10 * sizeof(FontNameEntryRec)); if(font->names == NULL) { @@ -69,19 +69,19 @@ extern void unsetenv(const char *name); #endif char* -sprintf_reliable(char *f, ...) +sprintf_alloc(char *f, ...) { char *s; va_list args; va_start(args, f); - s = vsprintf_reliable(f, args); + s = vsprintf_alloc(f, args); va_end(args); return s; } #ifdef __GLIBC__ char* -vsprintf_reliable(char *f, va_list args) +vsprintf_alloc(char *f, va_list args) { char *r; int rc; @@ -94,7 +94,7 @@ vsprintf_reliable(char *f, va_list args) #else /* This is not portable, doesn't do va_copy right. */ char* -vsprintf_reliable(char *f, va_list args) +vsprintf_alloc(char *f, va_list args) { int n, size = 12; char *string; @@ -391,7 +391,7 @@ faceEncoding(FT_Face face) if(rc != 0 || p2.type != BDF_PROPERTY_TYPE_ATOM) return NULL; - return sprintf_reliable("%s-%s", p1.u.atom, p2.u.atom); + return sprintf_alloc("%s-%s", p1.u.atom, p2.u.atom); } int |