mstring [-h] [-v] [-t] [-w] [-m <module>] [-O <folder>] [-I <folders>]... [<message file>]
| Option | |
|---|---|
-m <module> | the module name of the output files; overrides $MODULE |
-O <folder> | write the files into <folder>, which must exist |
-I <folders> | $IMPORT search folders, :-separated; may be repeated |
-w | do not print warnings |
-t | trace: print every $MESSAGE on standard error |
-v | print the version |
-h | print the usage |
Input
A message file, or standard input when the file is omitted or -:
mstring errors.msg
mstring -m errors -O build/gen < errors.msg
Output
<module>.hh and <module>.cpp (other extensions and shapes per $MODULE). A file is only rewritten when its content changes.
Diagnostics and exit codes
errors.msg:12:3: error: parameter 'n' is already declared for message 'Fatal'
errors.msg:20:10: warning: message 'Started' has no [tr] text; its default text is used
| Exit code | |
|---|---|
| 0 | the files are written (warnings may have been printed) |
| 1 | an error — no file was written; or a bad option |
Every message is listed on Diagnostics.

