/*++ /* NAME /* mac_parse 3 /* SUMMARY /* locate macro references in string /* SYNOPSIS /* #include <mac_parse.h> /* /* int mac_parse(string, action, context) /* const char *string; /* int (*action)(int type, VSTRING *buf, void *context); /* DESCRIPTION /* This module recognizes macro expressions in null-terminated /* strings. Macro expressions have the form $name, $(text) or /* ${text}. A macro name consists of alphanumerics and/or /* underscore. Text other than macro expressions is treated /* as literal text. /* /* mac_parse() breaks up its string argument into macro references /* and other text, and invokes the \fIaction\fR routine for each item /* found. With each action routine call, the \fItype\fR argument /* indicates what was found, \fIbuf\fR contains a copy of the text /* found, and \fIcontext\fR is passed on unmodified from the caller. /* The application is at liberty to clobber \fIbuf\fR. /* .IP MAC_PARSE_LITERAL /* The content of \fIbuf\fR is literal text. /* .IP MAC_PARSE_EXPR /* The content of \fIbuf\fR is a macro expression: either a /* bare macro name without the preceding "$", or all the text /* inside $() or ${}. /* .PP /* The action routine result value is the bit-wise OR of zero or more /* of the following: /* .IP MAC_PARSE_ERROR /* A parsing error was detected. /* .IP MAC_PARSE_UNDEF /* A macro was expanded but not defined. /* .PP /* Use the constant MAC_PARSE_OK when no error was detected. /* SEE ALSO /* dict(3) dictionary interface. /* DIAGNOSTICS /* Fatal errors: out of memory. malformed macro name. /* /* The result value is the bit-wise OR of zero or more of the /* following: /* .IP MAC_PARSE_ERROR /* A parsing error was detected. /* .IP MAC_PARSE_UNDEF /* A macro was expanded but not defined. /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Wietse Venema /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA
/*--*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.