summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-04-01 13:43:53 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-04-01 13:43:53 -0700
commitac44dd4a6e8324ae9f79f61ef093cb087268d72d (patch)
tree0a9fdb1e5e427768b26bd4f444cc9d925af29f73
parent15f75aa8e6578cd2a27cadfc11e31b58e2fc6683 (diff)
Allow inlining makeName
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--fonttosfnt.h7
-rw-r--r--util.c6
2 files changed, 6 insertions, 7 deletions
diff --git a/fonttosfnt.h b/fonttosfnt.h
index 5a9decc..e0db06c 100644
--- a/fonttosfnt.h
+++ b/fonttosfnt.h
@@ -184,7 +184,6 @@ int writeFile(char *filename, FontPtr);
char *sprintf_alloc(const char *f, ...);
char *vsprintf_alloc(const char *f, va_list args);
char *makeUTF16(const char *);
-unsigned makeName(const char*);
int macTime(int *, unsigned *);
unsigned faceFoundry(FT_Face);
char *faceEncoding(FT_Face);
@@ -196,4 +195,10 @@ int faceWidth(FT_Face);
int faceItalicAngle(FT_Face);
int degreesToFraction(int, int*, int*);
+static inline unsigned int
+makeName(const char *s)
+{
+ return s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3];
+}
+
#endif /* _FONTTOSFNT_H_ */
diff --git a/util.c b/util.c
index 5a2f0e5..82bcc2f 100644
--- a/util.c
+++ b/util.c
@@ -145,12 +145,6 @@ makeUTF16(const char *string)
return value;
}
-unsigned
-makeName(const char *s)
-{
- return s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3];
-}
-
/* Like mktime(3), but UTC rather than local time */
#if defined(HAVE_TIMEGM)
static time_t