summaryrefslogtreecommitdiff
path: root/psgeom.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-26 16:03:30 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-26 16:03:48 -0700
commit5256304812e89c1c02bed093d11f96d97216bdbe (patch)
tree439f5f71410af72cf80cc09e9ccaccf85fbba113 /psgeom.c
parente1b1ecd2e9858dca67ed1da90799f1ea34fc9b71 (diff)
Fix many const char * warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'psgeom.c')
-rw-r--r--psgeom.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/psgeom.c b/psgeom.c
index e86426c..811d140 100644
--- a/psgeom.c
+++ b/psgeom.c
@@ -119,8 +119,8 @@ typedef struct {
/***====================================================================***/
typedef struct _PSFontDef {
- char *name;
- char **def;
+ const char *name;
+ const char **def;
} PSFontDef;
static PSFontDef internalFonts[] = {
@@ -157,9 +157,9 @@ ListInternalFonts(FILE *out, int first, int indent)
}
static Bool
-PSIncludeFont(FILE *out, char *font)
+PSIncludeFont(FILE *out, const char *font)
{
- char **pstr;
+ const char **pstr;
register int i;
pstr = NULL;
@@ -180,7 +180,7 @@ PSIncludeFont(FILE *out, char *font)
}
Bool
-DumpInternalFont(FILE *out, char *fontName)
+DumpInternalFont(FILE *out, const char *fontName)
{
if (strcmp(fontName, "IsoKeyCaps") != 0) {
uError("No internal font named \"%s\"\n", fontName);
@@ -404,7 +404,7 @@ ClearFontStuff(FontStuff *stuff)
}
static Bool
-CrackXLFDName(char *name, FontStuff *stuff)
+CrackXLFDName(const char *name, FontStuff *stuff)
{
char *tmp;
@@ -569,7 +569,7 @@ PSSetUpForLatin1(FILE *out, PSState *state)
}
static void
-PSReencodeLatin1Font(FILE *out, char *font)
+PSReencodeLatin1Font(FILE *out, const char *font)
{
fprintf(out, "/%s findfont reencodeISO-1\n", font);
fprintf(out, " /%s-8859-1 exch definefont pop\n", font);
@@ -577,7 +577,7 @@ PSReencodeLatin1Font(FILE *out, char *font)
}
static void
-PSSetUpFonts(FILE *out, char *textFont, int size)
+PSSetUpFonts(FILE *out, const char *textFont, int size)
{
fprintf(out, "/F%d { /%s findfont exch scalefont setfont } def\n",
FONT_TEXT, textFont);
@@ -845,7 +845,8 @@ PSPageTrailer(FILE *out, PSState *state)
PSSetFont(out, state, FONT_LATIN1, 14, False);
}
if (state->args->label == LABEL_SYMBOLS) {
- char buf[40], *sName = NULL, *lbuf;
+ char buf[40], *lbuf;
+ const char *sName = NULL;
Atom sAtom;
if (state->args->nLabelGroups == 1)
@@ -892,7 +893,8 @@ PSPageTrailer(FILE *out, PSState *state)
baseline += 16;
}
if (state->args->label == LABEL_KEYCODE) {
- char *sName = NULL, *lbuf;
+ const char *sName = NULL;
+ char *lbuf;
Atom sAtom;
if (xkb->names != NULL)
@@ -959,7 +961,7 @@ static void
PSDoodad(FILE *out, PSState *state, XkbDoodadPtr doodad)
{
XkbDescPtr xkb;
- char *name, *dname;
+ const char *name, *dname;
int sz, leading;
xkb = state->xkb;
@@ -1728,7 +1730,7 @@ FindKeysymsByName(XkbDescPtr xkb, char *name, PSState *state, KeyTop *top)
}
static void
-PSDrawLabel(FILE *out, char *label, int x, int y, int w, int h)
+PSDrawLabel(FILE *out, const char *label, int x, int y, int w, int h)
{
fprintf(out, "%d %d (%s) centeroffset\n", w, h, label);
fprintf(out, "%d add exch\n", y);