Go to the source code of this file.
|
LOCAL struct ga_props *_getprops | __PR ((struct ga_props *)) |
|
int _getargs | __PR ((int *, char *const **, void *, int, struct ga_props *, va_list)) |
|
LOCAL int dofile | __PR ((int *, char *const **, const char **, struct ga_props *)) |
|
LOCAL int doflag | __PR ((int *, char *const **, const char *, void *, int, va_list)) |
|
LOCAL int dosflags | __PR ((const char *, void *, int *, char *const **, int, va_list)) |
|
LOCAL int checkfmt | __PR ((const char *)) |
|
EXPORT int | _getarginit (struct ga_props *props, size_t size, UInt32_t flags) |
|
LOCAL struct ga_props * | _getprops (struct ga_props *props) |
|
EXPORT int | getargs (int *pac, pav, char *fmt, va_alist) |
|
EXPORT int | getlargs (int *pac, pav, struct ga_props *props, char *fmt, va_alist) |
|
EXPORT int | getvargs (int *pac, pav, struct ga_props *props, struct ga_flags *vfmt) |
|
EXPORT int | getallargs (int *pac, pav, char *fmt, va_alist) |
|
EXPORT int | getlallargs (int *pac, pav, struct ga_props *props, char *fmt, va_alist) |
|
EXPORT int | getvallargs (int *pac, pav, struct ga_props *props, struct ga_flags *vfmt) |
|
EXPORT int | getfiles (int *pac, pav, const char *fmt) |
|
EXPORT int | getlfiles (int *pac, pav, struct ga_props *props, const char *fmt) |
|
EXPORT int | getvfiles (int *pac, pav, struct ga_props *props, struct ga_flags *vfmt) |
|
EXPORT int | _getargs (int *pac, char *const **pav, void *vfmt, int flags, struct ga_props *props, va_list args) |
|
LOCAL int | dofile (int *pac, char *const **pav, const char **pargp, struct ga_props *props) |
|
LOCAL int | doflag (int *pac, char *const **pav, const char *argp, void *vfmt, int flags, va_list oargs) |
|
LOCAL int | dosflags (const char *argp, void *vfmt, int *pac, char *const **pav, int flags, va_list oargs) |
|
LOCAL int | checkfmt (char *fmt) const |
|
LOCAL int | checkeql (const char *str) |
|
EXPORT char * | getargerror (int err) |
|
◆ ARGVECTOR
◆ BADFLAG
◆ BADFMT
◆ FLAGDELIM
#define FLAGDELIM 2 /* "--" stopped flag processing */ |
◆ isfmtspec
◆ MAXSF
◆ NEW
◆ NOARGS
◆ NOEQUAL
◆ NOTAFILE
◆ NOTAFLAG
◆ RETMAX
◆ RETMIN
◆ RNAME
◆ SCANONLY
◆ SETARGS
◆ __PR() [1/6]
◆ __PR() [2/6]
◆ __PR() [3/6]
◆ __PR() [4/6]
◆ __PR() [5/6]
◆ __PR() [6/6]
◆ _getarginit()
Definition at line 121 of file getargs.c.
137 props->ga_oflags = 0;
#define GAF_POSIX_DEFAULT
static const WCHAR props[]
◆ _getargs()
◆ _getprops()
◆ checkeql()
Definition at line 1321 of file getargs.c.
1324 register unsigned char c;
1326 for (
c = (
unsigned char)*
str;
_Check_return_ _CRTIMP int __cdecl isalnum(_In_ int _C)
Referenced by dofile(), and doflag().
◆ checkfmt()
Definition at line 1297 of file getargs.c.
1305 if (
c ==
',' ||
c ==
'\0') {
EXPORT void raisecond(char *signame, long arg2) const
Referenced by doflag(), and for().
◆ dofile()
Definition at line 433 of file getargs.c.
439 register const char *argp = *pargp;
442 if (argp[0] ==
'-') {
457 if (argp[1] ==
'-' && argp[2] ==
'\0') {
474 if (argp[0] !=
'-') {
static const WCHAR props[]
Referenced by _getargs().
◆ doflag()
Definition at line 502 of file getargs.c.
510 register const char *
fmt = (
const char *)vfmt;
515 int singlecharflag = 0;
523 char *
const *spav = *pav;
525 void *curarg = (
void *)0;
533 if (argp[0] ==
'-') {
541 if (argp[0] ==
'-') {
547 if (argp[1] ==
'\0') {
583 if (
fmt[0] !=
'\0' &&
584 (
fmt[1] ==
',' ||
fmt[1] ==
'+' ||
585 fmt[1] ==
'~' ||
fmt[1] ==
'%' ||
fmt[1] ==
'\0'))
591 for (; *
fmt;
fmt++, argp++) {
613 if (*argp ==
'+' && argp == sargp)
622 }
else if (*argp !=
'\0' && haseql) {
650 if ((!hasdash && argp != sargp) || *
fmt !=
'&')
661 if (!haseql && *argp !=
'\0' &&
662 (
fmt[0] ==
'*' ||
fmt[0] ==
'#' ||
663 fmt[0] ==
'?' ||
fmt[0] ==
'&') &&
684 }
else if (*
fmt == *argp) {
685 if (argp[1] ==
'\0' &&
686 (
fmt[1] ==
'\0' ||
fmt[1] ==
',')) {
689 *((
int *)curarg) =
TRUE;
700 while (*
fmt !=
',' && *
fmt !=
'\0') {
702 if ((*
fmt ==
'&' || *
fmt ==
'~') &&
728 if (singlecharflag && !doubledash &&
734 if (singlecharflag && !doubledash &&
746 if (
fmt[1] ==
',' ||
fmt[1] ==
'+' ||
fmt[1] ==
'\0')
753 if (*argp ==
'\0' &&
fmt[1] !=
'_') {
764 else if (
fmt[1] ==
' ')
768 *((
const char **)curarg) = argp;
774 if (*argp ==
'\0' &&
fmt[1] !=
'_') {
785 else if (
fmt[1] ==
' ')
793 if (argp[0] !=
'\0' && argp[1] !=
'\0')
797 *((
char *)curarg) = *argp;
818 if (
fmt[1] ==
'l' ||
fmt[1] ==
'L') {
819 if (
fmt[2] ==
'l' ||
fmt[2] ==
'L') {
821 *((
Llong *)curarg) += 1;
825 *((
long *)curarg) += 1;
828 }
else if (
fmt[1] ==
's' ||
fmt[1] ==
'S') {
830 *((
short *)curarg) += 1;
832 }
else if (
fmt[1] ==
'c' ||
fmt[1] ==
'C') {
834 *((
char *)curarg) += 1;
837 if (
fmt[1] ==
'i' ||
fmt[1] ==
'I')
840 *((
int *)curarg) += 1;
857 else if (*
fmt ==
'0')
864 if (
fmt[1] ==
'l' ||
fmt[1] ==
'L') {
865 if (
fmt[2] ==
'l' ||
fmt[2] ==
'L') {
871 *((
long *)curarg) =
val;
874 }
else if (
fmt[1] ==
's' ||
fmt[1] ==
'S') {
876 *((
short *)curarg) =
val;
878 }
else if (
fmt[1] ==
'c' ||
fmt[1] ==
'C') {
880 *((
char *)curarg) =
val;
883 if (
fmt[1] ==
'i' ||
fmt[1] ==
'I')
886 *((
int *)curarg) =
val;
893 if (*argp ==
'\0' &&
fmt[1] !=
'_') {
904 else if (
fmt[1] ==
' ')
915 while (*
fmt !=
',' && *
fmt !=
'\0') {
916 if ((*
fmt ==
'&' || *
fmt ==
'~') &&
929 if (
fmt[1] ==
'l' ||
fmt[1] ==
'L') {
930 if (
fmt[2] ==
'l' ||
fmt[2] ==
'L') {
936 *((
long *)curarg) =
val;
939 }
else if (
fmt[1] ==
's' ||
fmt[1] ==
'S') {
943 }
else if (
fmt[1] ==
'c' ||
fmt[1] ==
'C') {
948 if (
fmt[1] ==
'i' ||
fmt[1] ==
'I')
951 *((
int *)curarg) = (
int)
val;
965 if (*argp ==
'\0' &&
fmt[1] !=
'_') {
976 if (*
fmt ==
'&' &&
fmt[1] ==
'_')
978 else if (
fmt[1] ==
' ')
1006 ret = ((*(getpargfun)curarg) (argp, funarg,
char * astoll(const char *s, Llong *l)
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Referenced by _getargs().
◆ dosflags()
Definition at line 1035 of file getargs.c.
1043 register const char *
fmt = (
const char *)vfmt;
1049 register sflags *rsf = sf;
1050 register int nsf = 0;
1051 register const char *
p = argp;
1053 register void *curarg = (
void *)0;
1054 getpargfun curfun = 0;
1088 curfun = (getpargfun)curarg;
1091 for (
i = 0;
i <
sizeof (
fl);
i++) {
1095 for (
i = 0;
i < nsf;
i++) {
1119 (
fmt[1] ==
',' ||
fmt[1] ==
'+' ||
1120 fmt[1] ==
'~' ||
fmt[1] ==
'%' ||
fmt[1] ==
'\0') &&
1122 for (
i = 0;
i < nsf;
i++) {
1123 if (rsf[
i].
c == *
fmt) {
1124 if (
fmt[1] ==
'+') {
1127 if (
fmt[1] ==
',' ||
1130 }
else if ((
fmt[1] ==
'l' ||
1145 }
else if (
fmt[1] ==
'%') {
1150 else if (
fmt[1] ==
'1')
1153 if (
fmt[1] ==
',' ||
1156 }
else if ((
fmt[1] ==
'l' ||
1171 }
else if (
fmt[1] ==
'~') {
1180 rsf[
i].
curfun = (
void *)curfun;
1194 while (*
fmt !=
',' && *
fmt !=
'\0') {
1199 if ((*
fmt ==
'&' || *
fmt ==
'~') &&
1217 curfun = (getpargfun)curarg;
1230 for (
p = argp; *
p;
p++) {
1236 if (
type == (
char)-1) {
1243 *((
int *)rsf[
i].curarg) =
TRUE;
1244 }
else if (
type ==
'i' ||
type ==
'I') {
1246 *((
int *)rsf[
i].curarg) += 1;
1248 *((
int *)rsf[
i].curarg) = rsf[
i].
val;
1249 }
else if (
type ==
'l' ||
type ==
'L') {
1251 *((
long *)rsf[
i].curarg) += 1;
1253 *((
long *)rsf[
i].curarg) = rsf[
i].
val;
1254 }
else if (
type ==
'Q') {
1256 *((
Llong *)rsf[
i].curarg) += 1;
1259 }
else if (
type ==
's' ||
type ==
'S') {
1261 *((
short *)rsf[
i].curarg) += 1;
1263 *((
short *)rsf[
i].curarg) = rsf[
i].
val;
1264 }
else if (
type ==
'c' ||
type ==
'C') {
1266 *((
char *)rsf[
i].curarg) += 1;
1268 *((
char *)rsf[
i].curarg) = rsf[
i].
val;
1269 }
else if (
type ==
'~') {
1277 if (rsf[
i].curfun ==
NULL)
1279 ret = ((*(getpargfun)rsf[
i].curfun) (
"",
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
char * strchr(const char *String, int ch)
GLuint GLuint GLsizei GLenum type
Referenced by doflag().
◆ getallargs()
Definition at line 245 of file getargs.c.
260 for (; ; (*pac)--, (*pav)++) {
◆ getargerror()
Definition at line 1335 of file getargs.c.
1338 if (err < RETMIN || err >
RETMAX)
1339 return (
"Illegal arg error");
Referenced by main().
◆ getargs()
◆ getfiles()
◆ getlallargs()
Definition at line 278 of file getargs.c.
295 for (; ; (*pac)--, (*pav)++) {
#define GAF_DELIM_DASHDASH
static const WCHAR props[]
◆ getlargs()
Definition at line 200 of file getargs.c.
static const WCHAR props[]
◆ getlfiles()
Definition at line 356 of file getargs.c.
static const WCHAR props[]
◆ getvallargs()
Definition at line 314 of file getargs.c.
323 for (; ; (*pac)--, (*pav)++) {
#define GAF_DELIM_DASHDASH
static const WCHAR props[]
◆ getvargs()
Definition at line 226 of file getargs.c.
static const WCHAR props[]
Referenced by main().
◆ getvfiles()
Definition at line 371 of file getargs.c.
static const WCHAR props[]
◆ fmtspecs
◆ props_default
◆ props_posix
◆ retnames
Initial value:= {
"NOTAFILE",
"BADFMT",
"BADFLAG",
"NOARGS",
"NOTAFLAG",
"FLAGDELIM",
}
Definition at line 80 of file getargs.c.
◆ sccsid
Initial value:=
"@(#)getargs.c 2.71 17/07/16 Copyright 1985, 1988, 1994-2017 J. Schilling"
Definition at line 4 of file getargs.c.
◆ va_dummy