X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/19bf8698eeb0ab3d7694232af115fa3f007d5c7b..eb433de218fc35876757c356fcb709d9f9d10d09:/h/fmt_scan.h?ds=sidebyside diff --git a/h/fmt_scan.h b/h/fmt_scan.h index d50dc441..2bcc265f 100644 --- a/h/fmt_scan.h +++ b/h/fmt_scan.h @@ -89,7 +89,7 @@ struct format { typedef char * (*formataddr_cb)(char *, char *); typedef char * (*concataddr_cb)(char *, char *); -typedef void (*trace_cb)(void *, struct format *, int, char *, char *); +typedef void (*trace_cb)(void *, struct format *, int, char *, const char *); struct fmt_callbacks { formataddr_cb formataddr; @@ -138,11 +138,11 @@ int fmt_compile (char *fstring, struct format **fmt, int reset); * Interpret a sequence of compiled format instructions. Arguments are: * * format - Array of format instructions generated by fmt_compile() - * scanl - Passed-in character array that will contain the output - * of the format instructions. Is always terminated with - * a newline (\n). - * max - Maximum number of bytes to be written to "scanl" (in other - * words, the buffer size). Includes the trailing NUL. + * scanl - Passed-in charstring_t object (created with + * charstring_create() and later destroyed with + * charstring_free()) that will contain the output of the + * format instructions. Is always terminated with a + * newline (\n). * width - Maximum number of displayed characters. Does not include * characters marked as nonprinting or (depending on the * encoding) bytes in a multibyte encoding that exceed the @@ -169,8 +169,8 @@ int fmt_compile (char *fstring, struct format **fmt, int reset); * execute, which is currently always NULL. */ -struct format *fmt_scan (struct format *format, char *scanl, size_t max, - int width, int *dat, struct fmt_callbacks *callbacks); +struct format *fmt_scan (struct format *format, charstring_t scanl, int width, + int *dat, struct fmt_callbacks *callbacks); /* * Free a format structure and/or component hash table. Arguments are: