GETFILES(3)

NAME
getfiles() - gets next non flag-type argument

SYNOPSIS
int getfiles(pac, pav, fmt)
	int *pac;       /* pointer to arg count */
	char *(*pav)[]; /* pointer to address of arg vector */
	char *fmt;      /* format string */

DESCRIPTION
getfiles() returns, with a value of +1, whenever a non-flag type argument is encountered. Flag-type arguments, along with their values, are ignored. The filename is at *pav[0]. The caller must increment *pav and decrement *pac before calling getfiles() again.

RETURNS

-2  error in format string.

-1  parameter error.

0   no more file arguments.

1   no more flag-type arguments.

EXAMPLES

SEE ALSO

getallargs(3), getargs(3).

NOTES
Initially, *pav must point to the first argument (not the program name) and *pac must not count the program name. Before calling getfiles() again, decrement *pac and increment *pav, or the same name will be pointed to by *pav.

BUGS
none

AUTHOR
Joerg Schilling
Seestr. 110
D-13353 Berlin
Germany

Mail bugs and suggestions to:

schilling@fokus.gmd.de or js@cs.tu-berlin.de or joerg@schily.isdn.cs.tu-berlin.de