aboutsummaryrefslogtreecommitdiff
path: root/x.c
diff options
context:
space:
mode:
authorMarkus F.X.J. Oberhumer <markus@oberhumer.com>2021-03-28 21:16:59 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2021-05-06 18:21:10 +0200
commit4536f46cfff50c66a115755def0155d8e246b02f (patch)
tree39339361538ab5ed96cceff78f02ea529a842dd8 /x.c
parent9e68fdbcdb06dfa3d23fe3a7a7f7b59e40e1ea2f (diff)
downloadst-patched-4536f46cfff50c66a115755def0155d8e246b02f.tar.bz2
st-patched-4536f46cfff50c66a115755def0155d8e246b02f.tar.xz
st-patched-4536f46cfff50c66a115755def0155d8e246b02f.zip
Mild const-correctness improvements.
Only touch a few things, the main focus is to improve code readability.
Diffstat (limited to 'x.c')
-rw-r--r--x.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/x.c b/x.c
index 8bf998e..7186040 100644
--- a/x.c
+++ b/x.c
@@ -156,7 +156,7 @@ static void xresize(int, int);
156static void xhints(void); 156static void xhints(void);
157static int xloadcolor(int, const char *, Color *); 157static int xloadcolor(int, const char *, Color *);
158static int xloadfont(Font *, FcPattern *); 158static int xloadfont(Font *, FcPattern *);
159static void xloadfonts(char *, double); 159static void xloadfonts(const char *, double);
160static void xunloadfont(Font *); 160static void xunloadfont(Font *);
161static void xunloadfonts(void); 161static void xunloadfonts(void);
162static void xsetenv(void); 162static void xsetenv(void);
@@ -952,7 +952,7 @@ xloadfont(Font *f, FcPattern *pattern)
952} 952}
953 953
954void 954void
955xloadfonts(char *fontstr, double fontsize) 955xloadfonts(const char *fontstr, double fontsize)
956{ 956{
957 FcPattern *pattern; 957 FcPattern *pattern;
958 double fontval; 958 double fontval;
@@ -960,7 +960,7 @@ xloadfonts(char *fontstr, double fontsize)
960 if (fontstr[0] == '-') 960 if (fontstr[0] == '-')
961 pattern = XftXlfdParse(fontstr, False, False); 961 pattern = XftXlfdParse(fontstr, False, False);
962 else 962 else
963 pattern = FcNameParse((FcChar8 *)fontstr); 963 pattern = FcNameParse((const FcChar8 *)fontstr);
964 964
965 if (!pattern) 965 if (!pattern)
966 die("can't open font %s\n", fontstr); 966 die("can't open font %s\n", fontstr);