1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
/* @(#)getargs.h 1.14 06/09/13 Copyright 1985 J. Schilling */
/*
* Definitions for getargs()/getallargs()/getfiles()
*
* Copyright (c) 1985 J. Schilling
*/
/*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* See the file CDDL.Schily.txt in this distribution for details.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file CDDL.Schily.txt from this distribution.
*/
#ifndef _SCHILY_GETARGS_H
#define _SCHILY_GETARGS_H
#ifndef _SCHILY_MCONFIG_H
#include <schily/mconfig.h>
#endif
#ifndef _SCHILY_PROTOTYP_H
#include <schily/prototyp.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define NOARGS 0 /* No more args */
#define NOTAFLAG 1 /* Not a flag type argument */
#define BADFLAG (-1) /* Not a valid flag argument */
#define BADFMT (-2) /* Error in format string */
#define NOTAFILE (-3) /* Seems to be a flag type */
typedef int (*getargfun) __PR((const void *, void *));
typedef int (*getpargfun) __PR((const void *, void *, int *__pac, char *const **__pav, const char *__opt));
#define NO_ARGFUN (getargpfun)0
struct ga_flags {
const char *ga_format;
void *ga_arg;
getpargfun ga_funcp;
};
/*
* Keep in sync with schily.h
*/
extern int getallargs __PR((int *, char * const**, const char *, ...));
extern int getargs __PR((int *, char * const**, const char *, ...));
extern int getfiles __PR((int *, char * const**, const char *));
extern char *getargerror __PR((int));
/*
* The vector versions of the functions need struct ga_flags and thus need
* getargs.h
*/
extern int getvallargs __PR((int *, char * const**, struct ga_flags *, void *));
extern int getvargs __PR((int *, char * const**, struct ga_flags *, void *));
extern int getvfiles __PR((int *, char * const**, struct ga_flags *, void *));
#ifdef __cplusplus
}
#endif
#endif /* _SCHILY_GETARGS_H */
|