X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=src%2Flib%2Fcmdline_parse.h;fp=src%2Flib%2Fcmdline_parse.h;h=6facb9ee19b1225a2cf67035ca66749bf5964885;hb=df9816e5e10b0552c7e29650ee21a79654af67ef;hp=5112ab5c9bc04fc3a350ab72545eb05ba209850d;hpb=6b78e677092ace71c841c23d4f21909d3fc0ae01;p=libcmdline.git diff --git a/src/lib/cmdline_parse.h b/src/lib/cmdline_parse.h index 5112ab5..6facb9e 100644 --- a/src/lib/cmdline_parse.h +++ b/src/lib/cmdline_parse.h @@ -91,12 +91,13 @@ typedef struct cmdline_token_hdr cmdline_parse_token_hdr_t; * error. * * complete_start() prepares a completion operation. The first - * argument is the token to complete. The second argument is an opaque - * pointer that will be given to complete_iterate() function. It can - * be used to store private data for this completion. For each - * complete_start() call, the user must call complete_end() at the end - * of iterations (if defined). Return a negative value if completion - * is not possible, or 0 on success. + * argument is the token to complete. The second argument is the token + * to complete, and the third arg is an opaque pointer that will be + * given to complete_iterate() function. It can be used to store + * private data for this completion. For each complete_start() call, + * the user must call complete_end() at the end of iterations (if + * defined). Return a negative value if completion is not possible, or + * 0 on success. * * complete_iterate() copy in dstbuf (the size is specified in the * parameter) the next possible completion for this token. Return 0 on @@ -115,7 +116,8 @@ struct cmdline_token_ops { int (*parse)(cmdline_parse_token_hdr_t *, const char *, void *, unsigned int); /** prepare a completion on this token */ - int (*complete_start)(cmdline_parse_token_hdr_t *, void **); + int (*complete_start)(cmdline_parse_token_hdr_t *, const char *, + void **); /** fill dstbuf for this token (token, opaque, dstbuf, size) */ int (*complete_iterate)(cmdline_parse_token_hdr_t *, void **, char *, unsigned int);