Output the help text to stdout

git-svn-id: svn://svn.cc65.org/cc65/trunk@3414 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2005-03-24 20:08:41 +00:00
parent 137b66ac97
commit 8a6fdb8562
9 changed files with 282 additions and 290 deletions

View File

@@ -588,83 +588,82 @@ static void ConvertO65 (const char* File)
static void Usage (void)
/* Print usage information and exit */
{
fprintf (stderr,
"Usage: %s [options] file [...]\n"
"Short options:\n"
" -c\t\t\tCompile and assemble but don't link\n"
" -d\t\t\tDebug mode\n"
" -g\t\t\tAdd debug info\n"
" -h\t\t\tHelp (this text)\n"
" -l\t\t\tCreate an assembler listing\n"
" -m name\t\tCreate a map file\n"
" -mm model\t\tSet the memory model\n"
" -o name\t\tName the output file\n"
" -r\t\t\tEnable register variables\n"
" -t sys\t\tSet the target system\n"
" -v\t\t\tVerbose mode\n"
" -vm\t\t\tVerbose map file\n"
" -C name\t\tUse linker config file\n"
" -Cl\t\t\tMake local variables static\n"
" -D sym[=defn]\t\tDefine a preprocessor symbol\n"
" -I dir\t\tSet a compiler include directory path\n"
" -L path\t\tSpecify a library search path\n"
" -Ln name\t\tCreate a VICE label file\n"
" -O\t\t\tOptimize code\n"
" -Oi\t\t\tOptimize code, inline functions\n"
" -Or\t\t\tOptimize code, honour the register keyword\n"
" -Os\t\t\tOptimize code, inline known C funtions\n"
" -S\t\t\tCompile but don't assemble and link\n"
" -T\t\t\tInclude source as comment\n"
" -V\t\t\tPrint the version number\n"
" -W\t\t\tSuppress warnings\n"
"\n"
"Long options:\n"
" --add-source\t\tInclude source as comment\n"
" --asm-define sym[=v]\tDefine an assembler symbol\n"
" --asm-include-dir dir\tSet an assembler include directory\n"
" --bss-label name\tDefine and export a BSS segment label\n"
" --bss-name seg\tSet the name of the BSS segment\n"
" --cfg-path path\tSpecify a config file search path\n"
" --check-stack\t\tGenerate stack overflow checks\n"
" --code-label name\tDefine and export a CODE segment label\n"
" --code-name seg\tSet the name of the CODE segment\n"
" --codesize x\t\tAccept larger code by factor x\n"
" --config name\t\tUse linker config file\n"
" --cpu type\t\tSet cpu type\n"
" --create-dep\t\tCreate a make dependency file\n"
" --data-label name\tDefine and export a DATA segment label\n"
" --data-name seg\tSet the name of the DATA segment\n"
" --debug\t\tDebug mode\n"
" --debug-info\t\tAdd debug info\n"
" --feature name\tSet an emulation feature\n"
" --forget-inc-paths\tForget include search paths (compiler)\n"
" --help\t\tHelp (this text)\n"
" --include-dir dir\tSet a compiler include directory path\n"
" --lib file\t\tLink this library\n"
" --lib-path path\tSpecify a library search path\n"
" --list-targets\tList all available targets\n"
" --listing\t\tCreate an assembler listing\n"
" --list-bytes n\tNumber of bytes per assembler listing line\n"
" --mapfile name\tCreate a map file\n"
" --memory-model model\tSet the memory model\n"
" --module\t\tLink as a module\n"
" --module-id id\tSpecify a module id for the linker\n"
" --o65-model model\tOverride the o65 model\n"
" --obj file\t\tLink this object file\n"
" --obj-path path\tSpecify an object file search path\n"
" --register-space b\tSet space available for register variables\n"
" --register-vars\tEnable register variables\n"
" --rodata-name seg\tSet the name of the RODATA segment\n"
" --signed-chars\tDefault characters are signed\n"
" --standard std\tLanguage standard (c89, c99, cc65)\n"
" --start-addr addr\tSet the default start address\n"
" --static-locals\tMake local variables static\n"
" --target sys\t\tSet the target system\n"
" --version\t\tPrint the version number\n"
" --verbose\t\tVerbose mode\n"
" --zeropage-label name\tDefine and export a ZEROPAGE segment label\n"
" --zeropage-name seg\tSet the name of the ZEROPAGE segment\n",
ProgName);
printf ("Usage: %s [options] file [...]\n"
"Short options:\n"
" -c\t\t\tCompile and assemble but don't link\n"
" -d\t\t\tDebug mode\n"
" -g\t\t\tAdd debug info\n"
" -h\t\t\tHelp (this text)\n"
" -l\t\t\tCreate an assembler listing\n"
" -m name\t\tCreate a map file\n"
" -mm model\t\tSet the memory model\n"
" -o name\t\tName the output file\n"
" -r\t\t\tEnable register variables\n"
" -t sys\t\tSet the target system\n"
" -v\t\t\tVerbose mode\n"
" -vm\t\t\tVerbose map file\n"
" -C name\t\tUse linker config file\n"
" -Cl\t\t\tMake local variables static\n"
" -D sym[=defn]\t\tDefine a preprocessor symbol\n"
" -I dir\t\tSet a compiler include directory path\n"
" -L path\t\tSpecify a library search path\n"
" -Ln name\t\tCreate a VICE label file\n"
" -O\t\t\tOptimize code\n"
" -Oi\t\t\tOptimize code, inline functions\n"
" -Or\t\t\tOptimize code, honour the register keyword\n"
" -Os\t\t\tOptimize code, inline known C funtions\n"
" -S\t\t\tCompile but don't assemble and link\n"
" -T\t\t\tInclude source as comment\n"
" -V\t\t\tPrint the version number\n"
" -W\t\t\tSuppress warnings\n"
"\n"
"Long options:\n"
" --add-source\t\tInclude source as comment\n"
" --asm-define sym[=v]\tDefine an assembler symbol\n"
" --asm-include-dir dir\tSet an assembler include directory\n"
" --bss-label name\tDefine and export a BSS segment label\n"
" --bss-name seg\tSet the name of the BSS segment\n"
" --cfg-path path\tSpecify a config file search path\n"
" --check-stack\t\tGenerate stack overflow checks\n"
" --code-label name\tDefine and export a CODE segment label\n"
" --code-name seg\tSet the name of the CODE segment\n"
" --codesize x\t\tAccept larger code by factor x\n"
" --config name\t\tUse linker config file\n"
" --cpu type\t\tSet cpu type\n"
" --create-dep\t\tCreate a make dependency file\n"
" --data-label name\tDefine and export a DATA segment label\n"
" --data-name seg\tSet the name of the DATA segment\n"
" --debug\t\tDebug mode\n"
" --debug-info\t\tAdd debug info\n"
" --feature name\tSet an emulation feature\n"
" --forget-inc-paths\tForget include search paths (compiler)\n"
" --help\t\tHelp (this text)\n"
" --include-dir dir\tSet a compiler include directory path\n"
" --lib file\t\tLink this library\n"
" --lib-path path\tSpecify a library search path\n"
" --list-targets\tList all available targets\n"
" --listing\t\tCreate an assembler listing\n"
" --list-bytes n\tNumber of bytes per assembler listing line\n"
" --mapfile name\tCreate a map file\n"
" --memory-model model\tSet the memory model\n"
" --module\t\tLink as a module\n"
" --module-id id\tSpecify a module id for the linker\n"
" --o65-model model\tOverride the o65 model\n"
" --obj file\t\tLink this object file\n"
" --obj-path path\tSpecify an object file search path\n"
" --register-space b\tSet space available for register variables\n"
" --register-vars\tEnable register variables\n"
" --rodata-name seg\tSet the name of the RODATA segment\n"
" --signed-chars\tDefault characters are signed\n"
" --standard std\tLanguage standard (c89, c99, cc65)\n"
" --start-addr addr\tSet the default start address\n"
" --static-locals\tMake local variables static\n"
" --target sys\t\tSet the target system\n"
" --version\t\tPrint the version number\n"
" --verbose\t\tVerbose mode\n"
" --zeropage-label name\tDefine and export a ZEROPAGE segment label\n"
" --zeropage-name seg\tSet the name of the ZEROPAGE segment\n",
ProgName);
}
@@ -830,7 +829,7 @@ static void OptFeature (const char* Opt attribute ((unused)), const char* Arg)
static void OptForgetIncPaths (const char* Opt attribute ((unused)),
static void OptForgetIncPaths (const char* Opt attribute ((unused)),
const char* Arg attribute ((unused)))
/* Forget all currently defined include paths */
{