diff options
Diffstat (limited to 'src/parse.c')
-rw-r--r-- | src/parse.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/parse.c b/src/parse.c index d81c2f3..df6cce3 100644 --- a/src/parse.c +++ b/src/parse.c @@ -82,7 +82,7 @@ static unsigned char overflowbuff[20]; /* really only need one */ static int overflowlen; static unsigned char **stringListSource, *currentString; -static int doparse(int (*ifunc) (void), const char *srctypename, +static int doparse(int (*ifunc)(void), const char *srctypename, const char *srcname); static int twmFileInput(void); static int twmStringListInput(void); @@ -93,14 +93,14 @@ extern int yylineno; int ConstrainedMoveTime = 400; /* milliseconds, event times */ -int (*twmInputFunc) (void); +int (*twmInputFunc)(void); /** * parse the .twmrc file * \param filename the filename to parse. NULL indicates $HOME/.twmrc */ static int -doparse(int (*ifunc) (void), const char *srctypename, const char *srcname) +doparse(int (*ifunc)(void), const char *srctypename, const char *srcname) { mods = 0; ptr = 0; @@ -983,19 +983,20 @@ do_color_keyword(int keyword, int colormode, char *s) static void put_pixel_on_root(Pixel pixel) { - int i, addPixel = 1; + int addPixel = 1; Atom pixelAtom, retAtom; int retFormat; unsigned long nPixels, retAfter; unsigned char *retProp; - Pixel *pixelProp; pixelAtom = XInternAtom(dpy, "_MIT_PRIORITY_COLORS", True); if (XGetWindowProperty(dpy, Scr->Root, pixelAtom, 0, 8192, False, XA_CARDINAL, &retAtom, &retFormat, &nPixels, &retAfter, &retProp) == Success) { - pixelProp = (Pixel *) retProp; + int i; + Pixel *pixelProp = (Pixel *) retProp; + for (i = 0; (unsigned long) i < nPixels; i++) if (pixel == pixelProp[i]) addPixel = 0; @@ -1159,7 +1160,7 @@ do_squeeze_entry(name_list ** list, char *name, int justify, int num, int denom) if (!sinfo) { twmrc_error_prefix(); - fprintf(stderr, "unable to allocate %ld bytes for squeeze info\n", + fprintf(stderr, "unable to allocate %lu bytes for squeeze info\n", (unsigned long) sizeof(SqueezeInfo)); return; } |