/* This should usually be called before calling u_parseArgs */ /*#if U_PLATFORM == U_PF_OS390 && (U_CHARSET_FAMILY == U_ASCII_FAMILY)*/ /* translate args from EBCDIC to ASCII */ /*# define U_MAIN_INIT_ARGS(argc, argv) __argvtoascii_a(argc, argv)*/ /*#elif defined(XP_MAC_CONSOLE)*/ #ifdefined(XP_MAC_CONSOLE) # include <console.h> /* Get the arguments from the GUI, since old Macs don't have a console Window. */ # define U_MAIN_INIT_ARGS(argc, argv) argc = ccommand((char***)&argv) #else /* Normally we do nothing. */ # define U_MAIN_INIT_ARGS(argc, argv) #endif
/* forward declarations for the function declaration */ struct UOption; typedefstruct UOption UOption;
/* function to be called for a command line option */ typedefint UOptionFn(void *context, UOption *option);
/* structure describing a command line option */ struct UOption { constchar *longName; /* "foo" for --foo */ constchar *value; /* output placeholder, will point to the argument string, if any */
UOptionFn *optionFn; /* function to be called when this option occurs */ void *context; /* parameter for the function */ char shortName; /* 'f' for -f */ char hasArg; /* enum value: option takes no/requires/may have argument */ char doesOccur; /* boolean for "this one occurred" */
};
/* macro for an entry in a declaration of UOption[] */ #define UOPTION_DEF(longName, shortName, hasArg) \
{ longName, NULL, NULL, NULL, shortName, hasArg, 0 }
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.