summaryrefslogtreecommitdiff
path: root/includes/option_system.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--includes/option_system.h73
1 files changed, 39 insertions, 34 deletions
diff --git a/includes/option_system.h b/includes/option_system.h
index 521213b..aa519e2 100644
--- a/includes/option_system.h
+++ b/includes/option_system.h
@@ -4,7 +4,7 @@
#ifdef __cplusplus
extern "C" {
#endif
-#ifdef __MWERKS__
+#ifdef __MWERKS__
#pragma options align=packed
#endif
enum {
@@ -171,7 +171,7 @@ enum {
};
enum {
OTF_GLOBAL = 1,
- OTF2 = 2,
+ OTF_STICKY = 2,
OTF_CASED = 4,
OTF_OBSOLETE = 8,
OTF_SUBSTITUTED = 0x10,
@@ -182,16 +182,14 @@ enum {
OTF_TOOL_MASK = OTF_TOOL_LINKER | OTF_TOOL_DISASSEMBLER | OTF_TOOL_COMPILER,
OTF200 = 0x200,
OTF400 = 0x400,
- OTF700 = 0x700,
OTF_IGNORED = 0x800,
- OTFC00 = 0xC00,
OTF_SECRET = 0x1000,
- OTF2000 = 0x2000,
+ OTF_HIDE_DEFAULT = 0x2000,
OTF_COMPATIBILITY = 0x4000,
- OTF8000 = 0x8000,
- OTF10000 = 0x10000,
- OTF20000 = 0x20000,
- OTF40000 = 0x40000,
+ OTF_HAS_SUB_OPTIONS = 0x8000,
+ OTF_SUB_OPTIONS_OPTIONAL = 0x10000,
+ OTF_ONLY_ONCE = 0x20000,
+ OTF_HAS_CONFLICTS = 0x40000,
OTF_WARNING = 0x80000,
OTF_SLFLAGS_8 = 0x100000,
OTF_SLFLAGS_10 = 0x200000,
@@ -205,8 +203,8 @@ enum {
OTF8000000 = 0x8000000,
OTF10000000 = 0x10000000,
OTF20000000 = 0x20000000,
- OTF40000000 = 0x40000000,
- OTF80000000 = 0x80000000
+ OTF_INTERNAL_SEEN_CONFLICTED = 0x40000000,
+ OTF_INTERNAL_ALREADY_SEEN = 0x80000000
};
enum {
@@ -260,7 +258,8 @@ enum {
};
enum {
LISTFLAGS_NONE = 0,
- LISTFLAGS_2 = 2,
+ LISTFLAGS_EXCLUSIVE = 1,
+ LISTFLAGS_ALLOW_UNKNOWNS = 2,
LISTFLAGS_4 = 4,
LISTFLAGS_COMPILER = 0x100,
LISTFLAGS_LINKER = 0x200,
@@ -288,7 +287,7 @@ enum {
PFLAGS_40 = 0x40,
PFLAGS_80 = 0x80
};
-#ifdef __MWERKS__
+#ifdef __MWERKS__
#pragma options align=reset
#endif
@@ -299,12 +298,12 @@ typedef struct {
char *text;
} ArgToken;
enum {
- ATK_0,
- ATK_1,
- ATK_2,
- ATK_3,
- ATK_4,
- ATK_5
+ ATK_END,
+ ATK_ARG_END,
+ ATK_ARG,
+ ATK_OPTION,
+ ATK_EQUALS,
+ ATK_COMMA
};
typedef struct {
int argc;
@@ -312,6 +311,20 @@ typedef struct {
char **argv;
} anon0_50;
+extern char compat;
+extern char *MAINOPTCHAR;
+extern char *FIRSTARGCHAR;
+extern char *SEPOPTSTR;
+extern char SEPOPTCHAR;
+extern char SEP1;
+extern char SEP2;
+extern char SEP3;
+extern char RESPFILECHAR;
+extern char *RESPFILESTR;
+extern anon0_50 linkargs;
+extern anon0_50 prelinkargs;
+extern anon0_50 postlinkargs;
+
extern void Arg_Init(int theargc, char **theargv);
extern void Arg_Terminate();
extern void Arg_Reset();
@@ -348,10 +361,9 @@ typedef struct {
} e;
SInt16 flags;
} Opt48;
-//static void Option_PushList(OptionList *lst);
-//static void Option_PushOpt(Option *opt, const char *optname);
-//static void Option_PopOpt(const char *optname);
-//static void Option_PopList();
+
+extern char curopt[1024];
+
extern void Args_InitStack();
extern int Args_StackSize();
extern void Args_Push(SInt16 flags, void *first, void *second);
@@ -361,23 +373,14 @@ extern void Args_AddToToolArgs(anon0_50 *ta);
extern void Options_Init();
extern OptionList *Options_GetOptions();
extern void Options_SortOptions();
-//static void Options_AddOption(Option *opt);
extern int Options_AddList(OptionList *optlst);
extern int Options_AddLists(OptionList **optlst);
-//static void Options_Reset(OptionList *optlst);
-//static void Option_SpellList(char *buffer, OptionList *conflicts, int flags);
extern int Option_ForTool(Option *opt, int which);
extern int Option_ThisTool();
extern int Option_ForThisTool(Option *opt);
extern int Option_AlsoPassedToTool(Option *opt, int which);
extern int Option_AlsoPassedFromThisTool(Option *opt);
-//static Boolean Option_ContinuesThisLevel(int level, ArgToken *tok);
-//static Boolean Option_IsEndingThisLevel(int level, ArgToken *tok);
-//static Boolean Option_IsEndingLevel(int level, ArgToken *tok);
extern int Option_Parse(Option *opt, int oflags);
-//static int Option_MatchString(char *list, char *str, int flags, int *result);
-//static Option *Option_Lookup(OptionList *search, void *unk, int *flags);
-//static int Options_DoParse(OptionList *search, int flags);
extern int Options_Parse(OptionList *options, int flags);
extern int Option_ParseDefaultOption(OptionList *options);
extern void Option_ParamError(SInt16 id, va_list ap);
@@ -392,6 +395,8 @@ extern int Options_DisplayHelp();
/********************************/
/* Parameter.c */
+extern char curparam[4096];
+
extern void Param_DescHelp(PARAM_T *param, const char **desc, const char **help, const char **defaul);
extern int Param_Compare(PARAM_T *param);
extern int Params_Parse(PARAM_T *param, int flags);
@@ -400,8 +405,8 @@ extern void Param_Warning(SInt16 id, ...);
/********************************/
/* Help.c */
-extern int Help_Option(struct OptionList *lst, struct Option *opt, int subprint, const char *keyword);
-extern void Help_Options(struct OptionList *lst, int subprint, const char *keyword);
+extern int Help_Option(OptionList *lst, Option *opt, int subprint, const char *keyword);
+extern void Help_Options(OptionList *lst, int subprint, const char *keyword);
extern void Help_Usage();
extern void Help_Null();
extern void Help_Init();