Skip to content

Commit

Permalink
Merge pull request #242 from cormacj/man-page-fix
Browse files Browse the repository at this point in the history
Update man page, html help and the -h section to update it all to current parameters
  • Loading branch information
ColinPitrat authored Oct 7, 2023
2 parents 1074f59 + e9ecfac commit ee221e5
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 18 deletions.
51 changes: 40 additions & 11 deletions doc/man.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 14 additions & 2 deletions doc/man6/cap32.6
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ The \fBrom_path\fR entry in the configuration file is used by the emulator to fi
.PP
\fBConfiguration\fR
.RS
When launched, Caprice32 will look for a configuration file in several locations. If a configuration file was specified using the \fB\-\-cfg_file\fR command line switch, Caprice32 will try and use it. If no configuration file was specified, or the configuration file specified does not exist, Caprice32 will try and open, in this order:
When launched, Caprice32 will look for a configuration file in several locations. If a configuration file was specified using the \fB\-\-cfg_file\fR command line switch, Caprice32 will try and use it. If no configuration file was specified, or the configuration file specified does not exist, Caprice32 will try and open, in this order:
.br
- \fB$CWD/cap32.cfg\fR ($CWD being the directory where the cap32 executable resides)
.br
- \fBcap32.cfg\fR file in the location pointed to by the XDG_CONFIG_HOME environment variable. If XDG_CONFIG_HOME is undefined, it will look at $HOME/.config/ as default XDG_CONFIG_HOME directory.
.br
- \fB$HOME/.cap32.cfg\fR for compatibility.
- \fB$HOME/.cap32.cfg\fR for compatibility.
.br
- \fB/etc/cap32.cfg\fR.
.br
Expand Down Expand Up @@ -121,6 +121,18 @@ use FILE as the emulator configuration file.
\fB\-h\fR, \fB\-\-help\fR
display short help and exits
.TP
\fB\-i\fR, \fB\-\-inject\fR
inject a binary in memory after the CPC startup finishes
.TP
\fB\-o\fR, \fB\-\-offset\fR
offset at which to inject the binary provided with -i (default: 0x6000)
.TP
\fB\-O\fR, \fB\-\-override\fR
override an option from the config. Can be repeated. (example: -O system.model=3)
.TP
\fB\-s\fR, \fB\-\-sym_file\fR=\fIfile\fR
use <file> as a source of symbols and entry points for disassembling in developers' tools.
.TP
\fB\-V\fR, \fB\-\-version\fR
display Caprice32 version and exits
.TP
Expand Down
9 changes: 4 additions & 5 deletions src/argparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ void usage(std::ostream &os, char *progPath, int errcode)
os << " -a/--autocmd=<command>: execute command as soon as the emulator starts.\n";
os << " -c/--cfg_file=<file>: use <file> as the emulator configuration file instead of the default.\n";
os << " -h/--help: shows this help\n";
os << " -i/--inject: inject a binary in memory after the CPC startup finishes\n";
os << " -o/--offset: offset at which to inject the binary provided with -i (default: 0x6000)\n";
os << " -O/--override: override an option from the config. Can be repeated. (example: -o system.model=3)\n";
os << " -i/--inject=<file>: inject a binary in memory after the CPC startup finishes\n";
os << " -o/--offset=<address>: offset at which to inject the binary provided with -i (default: 0x6000)\n";
os << " -O/--override: override an option from the config. Can be repeated. (example: -O system.model=3)\n";
os << " -s/--sym_file=<file>: use <file> as a source of symbols and entry points for disassembling in developers' tools.\n";
os << " -V/--version: outputs version and exit\n";
os << " -v/--verbose: be talkative\n";
Expand Down Expand Up @@ -189,7 +189,7 @@ void parseArguments(int argc, char **argv, std::vector<std::string>& slot_list,
#ifdef DEBUG
<< " DEBUG"
#endif
#ifdef WITH_IPF
#ifdef WITH_IPF
<< " WITH_IPF"
#endif
<< "\n";
Expand All @@ -211,4 +211,3 @@ void parseArguments(int argc, char **argv, std::vector<std::string>& slot_list,
slot_list.assign(argv+optind, argv+argc);
LOG_DEBUG("slot_list: " << stringutils::join(slot_list, ","))
}

0 comments on commit ee221e5

Please sign in to comment.