/*++ /* NAME /* extpar 3 /* SUMMARY /* extract text from parentheses /* SYNOPSIS /* #include <stringops.h> /* /* char *extpar(bp, parens, flags) /* char **bp; /* const char *parens; /* int flags; /* DESCRIPTION /* extpar() extracts text from an input string that is enclosed /* in the specified parentheses, and updates the buffer pointer /* to point to that text. /* /* Arguments: /* .IP bp /* Pointer to buffer pointer. Both the buffer and the buffer /* pointer are modified. /* .IP parens /* One matching pair of parentheses, opening parenthesis first. /* .IP flags /* EXTPAR_FLAG_NONE, or the bitwise OR of one or more flags: /* .RS /* .IP EXTPAR_FLAG_EXTRACT /* This flag is intended to instruct extpar() callers that /* extpar() should be invoked. It has no effect on expar() /* itself. /* .IP EXTPAR_FLAG_STRIP /* Skip whitespace after the opening parenthesis, and trim /* whitespace before the closing parenthesis. /* .IP EXTPAR_FLAG_NORMAL_WS /* Substitute SPACE for control characters (newline etc.) that /* match isspace(). This neutralizes line break etc. characters in /* the value portion of { name = value }. /* .RE /* DIAGNOSTICS /* In case of error the result value is a dynamically-allocated /* string with a description of the problem that includes a /* copy of the offending input. A non-null result value should /* be destroyed with myfree(). The following describes the errors /* and the state of the buffer and buffer pointer. /* .IP "no opening parenthesis at start of text" /* The buffer pointer points to the input text. /* .IP "missing closing parenthesis" /* The buffer pointer points to text as if a closing parenthesis /* were present at the end of the input. /* .IP "text after closing parenthesis" /* The buffer pointer points to text as if the offending text /* were not present. /* SEE ALSO /* balpar(3) determine length of string in parentheses /* 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 /* /* Wietse Venema /* Google, Inc. /* 111 8th Avenue /* New York, NY 10011, 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.