separate out libpsargs
This commit is contained in:
17
libpsargs/libpsargs.h
Normal file
17
libpsargs/libpsargs.h
Normal file
@@ -0,0 +1,17 @@
|
||||
/* pscat(1) and pspipe(1) arguments are flanked by { '[', '\0' } and
|
||||
* { ']', '\0' }. Nesting is allowed to facilitate nesting of pscat(1) and
|
||||
* pspipe(1). This checks to make sure grouping symbols in args are balanced.
|
||||
* args is the argv that was passed to main, incremented. l is the left
|
||||
* grouping character (usually '[') and r is the right grouping character
|
||||
* (usually ']').
|
||||
* Returns 0 in the events of a syntax error or there being no arguments.
|
||||
* Otherwise, returns the number of top-level right grouping arguments
|
||||
* (i.e. the number of terms). */
|
||||
int check_arg(char **args, char l, char r);
|
||||
|
||||
/* arg is the location of the argument with the left grouping symbol within
|
||||
* argv, l is the left grouping character itself, r is the right grouping
|
||||
* character itself.
|
||||
* Returns the location of the argument with the corresponding left grouping
|
||||
* symbol within argv. */
|
||||
char **corresponding_arg(char **arg, char l, char r);
|
||||
Reference in New Issue
Block a user