| plan 9 kernel history: overview | file list | diff list |
2001/0527/port/parse.c (diff list | history)
| 2001/0418/sys/src/9/port/parse.c:13,30 – 2001/0527/sys/src/9/port/parse.c:13,24 (short | long | prev | next) | ||
|
Change tokenize back to getfields to avoid quoted strings.
Format edits. Bug: call smalloc always.
rsc Fri Mar 4 12:44:25 2005 | ||
| 1999/0316 | { | |
| 2001/0331 | Cmdbuf *volatile cb; | |
| 1999/0316 | ||
| 2001/0405 |
| |
| 2001/0527 | cb = smalloc(sizeof(*cb)); | |
| 1999/0316 | if(n > sizeof(cb->buf)-1) n = sizeof(cb->buf)-1; | |
| 2001/0331 | ||
| 2001/0405 |
| |
| 2001/0527 | if(up!=nil && waserror()){ | |
| 2001/0331 | free(cb); nexterror(); } | |
| 2001/0418/sys/src/9/port/parse.c:35,41 – 2001/0527/sys/src/9/port/parse.c:29,35 | ||
| 1999/0316 | if(n > 0 && cb->buf[n-1] == '\n') n--; cb->buf[n] = '\0'; | |
| 2001/0418 |
| |
| 2001/0527 | cb->nf = getfields(cb->buf, cb->f, nelem(cb->f), 1, " "); | |
| 1999/0316 | return cb; } | |