summaryrefslogtreecommitdiff
path: root/psgeom.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-31 19:00:09 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-31 19:07:24 -0700
commit7d186165440c5a370af7551f5958baae2f0b3725 (patch)
treecb8f353a8c91f4ead7623c30a46031681e73ecd1 /psgeom.c
parentbac53a94fec22563294cb57413e8d394df06c70a (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.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/psgeom.c b/psgeom.c
index fa2d1d9..135f7ec 100644
--- a/psgeom.c
+++ b/psgeom.c
@@ -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;
}