3 Cmdbuf, parsecmd, respondcmderror, lookupcmd \- control message parsing
16 .ta \w'\fL1234'u +\w'\fL12345678'u
31 Cmdbuf *parsecmd(char *p, int n)
32 Cmdtab *lookupcmd(Cmdbuf *cb, Cmdtab *tab, int ntab)
33 void respondcmderror(Req *r, Cmdbuf *cb, char *fmt, ...)
36 These data structures and functions provide parsing of textual control messages.
43 (which need not be NUL-terminated) as a UTF string and splits it
48 structure holding pointers to each field in the message.
51 walks through the array
58 that matches the parsed command.
59 (If the parsed command is empty,
61 returns nil immediately.)
64 matches the command if
76 is not zero, then the parsed command
79 fields (including the command string itself).
80 If the command has the wrong number of arguments,
83 Otherwise, it returns a pointer to the
88 does not find a matching command at all,
92 returns nil, it sets the system error string.
97 with an error of the form
98 `\fIfmt\fB:\fI cmd\fR,'
101 is the formatted string and
103 is a reconstruction of the parsed command.
108 This interface is not used in any distributed 9P servers.
109 It was lifted from the Plan 9 kernel.
110 Almost any kernel driver
111 .RB ( /usr/local/plan9/src/9/*/dev*.c )
114 .B /usr/local/plan9/src/lib9p/parse.c