diff options
-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 |