diff options
-rw-r--r-- | config.mk | 2 | ||||
-rw-r--r-- | st.c | 15 |
2 files changed, 14 insertions, 3 deletions
@@ -19,7 +19,7 @@ LIBS = -L/usr/lib -lc -L${X11LIB} -lm -lrt -lX11 -lutil -lXext -lXft \ | |||
19 | `pkg-config --libs freetype2` | 19 | `pkg-config --libs freetype2` |
20 | 20 | ||
21 | # flags | 21 | # flags |
22 | CPPFLAGS = -DVERSION=\"${VERSION}\" -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 | 22 | CPPFLAGS = -DVERSION=\"${VERSION}\" -D_XOPEN_SOURCE=600 |
23 | CFLAGS += -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os ${INCS} ${CPPFLAGS} | 23 | CFLAGS += -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os ${INCS} ${CPPFLAGS} |
24 | LDFLAGS += -g ${LIBS} | 24 | LDFLAGS += -g ${LIBS} |
25 | 25 | ||
@@ -2272,12 +2272,23 @@ strhandle(void) { | |||
2272 | 2272 | ||
2273 | void | 2273 | void |
2274 | strparse(void) { | 2274 | strparse(void) { |
2275 | int c; | ||
2275 | char *p = strescseq.buf; | 2276 | char *p = strescseq.buf; |
2276 | 2277 | ||
2277 | strescseq.narg = 0; | 2278 | strescseq.narg = 0; |
2278 | strescseq.buf[strescseq.len] = '\0'; | 2279 | strescseq.buf[strescseq.len] = '\0'; |
2279 | while(p && strescseq.narg < STR_ARG_SIZ) | 2280 | |
2280 | strescseq.args[strescseq.narg++] = strsep(&p, ";"); | 2281 | if(*p == '\0') |
2282 | return; | ||
2283 | |||
2284 | while(strescseq.narg < STR_ARG_SIZ) { | ||
2285 | strescseq.args[strescseq.narg++] = p; | ||
2286 | while((c = *p) != ';' && c != '\0') | ||
2287 | ++p; | ||
2288 | if(c == '\0') | ||
2289 | return; | ||
2290 | *p++ = '\0'; | ||
2291 | } | ||
2281 | } | 2292 | } |
2282 | 2293 | ||
2283 | void | 2294 | void |