-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
cmdarg.h
51 lines (40 loc) · 1.53 KB
/
cmdarg.h
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
#ifndef _CMDARG_H
#define _CMDARG_H
/* cmdarg.h */
/*****************************************************************************/
/* AS-Portierung */
/* */
/* Verarbeitung Kommandozeilenparameter */
/* */
/* Historie: 4. 5.1996 Grundsteinlegung */
/* 2001-10-20: option string is pointer instead of array */
/* */
/*****************************************************************************/
typedef enum {CMDErr,CMDFile,CMDOK,CMDArg} CMDResult;
typedef CMDResult (*CMDCallback)(
#ifdef __PROTOS__
Boolean NegFlag, char *Arg
#endif
);
typedef void (*CMDErrCallback)
(
#ifdef __PROTOS__
Boolean InEnv, char *Arg
#endif
);
typedef struct
{
char *Ident;
CMDCallback Callback;
} CMDRec;
#define MAXPARAM 256
typedef Boolean CMDProcessed[MAXPARAM+1];
extern LongInt ParamCount;
extern char **ParamStr;
extern StringList FileArgList;
extern Boolean ProcessedEmpty(CMDProcessed Processed);
extern void ProcessCMD(CMDRec *Def, Integer Cnt, CMDProcessed Unprocessed,
char *EnvName, CMDErrCallback ErrProc);
extern const char *GetEXEName(void);
extern void cmdarg_init(char *ProgPath);
#endif /* _CMDARG_H */