Skip to content

Commit

Permalink
organize command line option help
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed May 27, 2015
1 parent e650220 commit 1bd5a89
Showing 1 changed file with 36 additions and 22 deletions.
58 changes: 36 additions & 22 deletions ui/repl.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,42 +45,54 @@ static int imagepathspecified = 0;

static const char usage[] = "julia [options] [program] [args...]\n";
static const char opts[] =
" -v, --version Display version information\n"
" -h, --help Print this message\n"
" -q, --quiet Quiet startup without banner\n"
" -H, --home <dir> Set location of julia executable\n\n"
" -v, --version Display version information\n"
" -h, --help Print this message\n\n"

// startup options
" -J, --sysimage <file> Start up with the given system image file\n"
" -H, --home <dir> Set location of julia executable\n"
" --startup-file={yes|no} Load ~/.juliarc.jl\n"
" -f, --no-startup Don't load ~/.juliarc (deprecated, use --startup-file=no)\n"
" -F Load ~/.juliarc (deprecated, use --startup-file=yes)\n\n"

// actions
" -e, --eval <expr> Evaluate <expr>\n"
" -E, --print <expr> Evaluate and show <expr>\n"
" -P, --post-boot <expr> Evaluate <expr>, but don't disable interactive mode\n"
" -L, --load <file> Load <file> immediately on all processors\n"
" -J, --sysimage <file> Start up with the given system image file\n"
" -C, --cpu-target <target> Limit usage of cpu features up to <target>\n\n"
" -P, --post-boot <expr> Evaluate <expr>, but don't disable interactive mode (deprecated, use -i -e instead)\n"
" -L, --load <file> Load <file> immediately on all processors\n\n"

// parallel options
" -p, --procs {N|auto} Integer value N launches N additional local worker processes\n"
" 'auto' launches as many workers as the number of local cores\n"
" --machinefile <file> Run processes on hosts listed in <file>\n\n"

// interactive options
" -i Interactive mode; REPL runs and isinteractive() is true\n"
" --color={yes|no} Enable or disable color text\n\n"
" -q, --quiet Quiet startup (no banner)\n"
" --color={yes|no} Enable or disable color text\n"
" --history-file={yes|no} Load or save history\n"
" --no-history-file Don't load history file (deprecated, use --history-file=no)\n"
" --startup-file={yes|no} Load ~/.juliarc.jl\n"
" -f, --no-startup Don't load ~/.juliarc (deprecated, use --startup-file=no)\n"
" -F Load ~/.juliarc (deprecated, use --startup-file=yes)\n\n"
" --no-history-file Don't load history file (deprecated, use --history-file=no)\n\n"

" --compile={yes|no|all} Enable or disable compiler, or request exhaustive compilation\n\n"
// code generation options
" --compile={yes|no|all} Enable or disable compiler, or request exhaustive compilation\n"
" -C, --cpu-target <target> Limit usage of cpu features up to <target>\n"
" -O, --optimize Run time-intensive code optimizations\n"
" --inline={yes|no} Control whether inlining is permitted (overrides functions declared as @inline)\n"
" --check-bounds={yes|no} Emit bounds checks always or never (ignoring declarations)\n"
" --math-mode={ieee,fast} Disallow or enable unsafe floating point optimizations (overrides @fastmath declaration)\n\n"

" --code-coverage={none|user|all}, --code-coverage\n"
" Count executions of source lines (omitting setting is equivalent to 'user')\n\n"
// error and warning options
" --depwarn={yes|no} Enable or disable syntax and method deprecation warnings\n\n"

// compiler output options
" --build name Generate a system image with the given name (without extension)\n"
" --dump-bitcode={yes|no} Dump bitcode for the system image\n\n"

// instrumentation options
" --code-coverage={none|user|all}, --code-coverage\n"
" Count executions of source lines (omitting setting is equivalent to 'user')\n"
" --track-allocation={none|user|all}, --track-allocation\n"
" Count bytes allocated by each source line\n\n"
" -O, --optimize Run time-intensive code optimizations\n"
" --check-bounds={yes|no} Emit bounds checks always or never (ignoring declarations)\n"
" --dump-bitcode={yes|no} Dump bitcode for the system image (used with --build)\n"
" --depwarn={yes|no} Enable or disable syntax and method deprecation warnings\n"
" --inline={yes|no} Control whether inlining is permitted (overrides functions declared as @inline)\n";
" Count bytes allocated by each source line\n";

void parse_opts(int *argcp, char ***argvp)
{
Expand Down Expand Up @@ -318,6 +330,8 @@ void parse_opts(int *argcp, char ***argvp)
case opt_math_mode:
if (!strcmp(optarg,"ieee"))
jl_options.fast_math = JL_OPTIONS_FAST_MATH_OFF;
else if (!strcmp(optarg,"fast"))
jl_options.fast_math = JL_OPTIONS_FAST_MATH_ON;
else if (!strcmp(optarg,"user"))
jl_options.fast_math = JL_OPTIONS_FAST_MATH_DEFAULT;
else
Expand Down

0 comments on commit 1bd5a89

Please sign in to comment.