diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-05-31 19:00:09 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-05-31 19:07:24 -0700 |
commit | 7d186165440c5a370af7551f5958baae2f0b3725 (patch) | |
tree | cb8f353a8c91f4ead7623c30a46031681e73ecd1 /psgeom.c | |
parent | bac53a94fec22563294cb57413e8d394df06c70a (diff) |
Combine IsoKeyCaps array of strings into a single string
Packs more efficiently in binary, reduces number of calls to output,
gets rid of ~4k array of pointers to each string in data segment to
initialize on program load.
"xkbprint -if IsoKeyCaps" generates identical IsoKeyCaps.pfa files
before & after this change.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'psgeom.c')
-rw-r--r-- | psgeom.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -126,7 +126,7 @@ typedef struct _PSFontDef { } PSFontDef; static PSFontDef internalFonts[] = { - { "IsoKeyCaps", IsoKeyCaps } + { "IsoKeyCaps", &IsoKeyCaps } }; static int nInternalFonts = (sizeof(internalFonts) / sizeof(PSFontDef)); @@ -171,10 +171,7 @@ PSIncludeFont(FILE *out, const char *font) } if (pstr != NULL) { fprintf(out, "%%%%BeginFont: %s\n", font); - while (*pstr != NULL) { - fprintf(out, "%s\n", *pstr); - pstr++; - } + fprintf(out, "%s", *pstr); fprintf(out, "%%%%EndFont\n"); return True; } |