aboutsummaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
Diffstat (limited to 'st.c')
-rw-r--r--st.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/st.c b/st.c
index 68dc2be..39d3fee 100644
--- a/st.c
+++ b/st.c
@@ -2272,12 +2272,23 @@ strhandle(void) {
2272 2272
2273void 2273void
2274strparse(void) { 2274strparse(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
2283void 2294void