#include "config.h" #include #include "catalog.h" #include "i18n.h" const char *const MSGS[] = { [MSG_USAGE_FIRST]="Usage:\n", [MSG_USAGE_1]=" " NAME " -p FILE [-o DIRECTORY]\n", [MSG_USAGE_2]=" " NAME " -l FILE [-o DIRECTORY]\n", [MSG_USAGE_LAST]=" " NAME " [-hV]\n", [MSG_HELP_FIRST]="\n", [MSG_HELP_1]="\n", [MSG_HELP_2]="Options:\n", [MSG_HELP_3]=" -p FILE parser file to be processed\n", [MSG_HELP_4]=" -l FILE lexer file to be processed\n", [MSG_HELP_5]=" -o DIRECTORY output where to place the\n", [MSG_HELP_6]=" generated files (default .)\n", [MSG_HELP_7]=" -h, --help show this help message\n", [MSG_HELP_8]=" -V, --version print the version number\n", [MSG_HELP_9]="\n", [MSG_HELP_10]="\n", [MSG_HELP_11]="Run the " NAME "(1) parser program.\n", [MSG_HELP_12]="\n", [MSG_HELP_13]="Here is the explanation for what it does, and the synopsis\n", [MSG_HELP_14]="of its usage.\n", [MSG_HELP_15]="\n", [MSG_HELP_16]="See \"man " NAME "\" for usage information and\n", [MSG_HELP_17]="\"man " NAME ".tutorial\" for a beginner introduction.\n", [MSG_HELP_18]="\n", [MSG_HELP_19]="\n", [MSG_HELP_20]="Examples:\n", [MSG_HELP_21]="\n", [MSG_HELP_22]=" Do a one-line parser:\n", [MSG_HELP_23]="\n", [MSG_HELP_24]=" $ " NAME " run md.grammar < README.md\n", [MSG_HELP_25]="\n", [MSG_HELP_26]="\n", [MSG_HELP_27]=" Compile the grammer:\n", [MSG_HELP_28]="\n", [MSG_HELP_LAST]=" $ " NAME " build csv.grammar > dunno.alsodunno\n", [MSG_VERSION]= NAME " " VERSION " " DATE "\n", [MSG_ERR_VECTOR_MAX_CAPACITY]= "Already at max capacity (%ld): %s\n", [MSG_ERR_VECTOR_OUT_OF_BOUNDS]= "idx (%ld) is beyond bounds (%ld)\n", [MSG_ERR_VECTOR_UNDERFLOW]= "pop on an empty vector\n", NULL }; const char * _(const int msg_id) { return s(MSGS, msg_id); } int i18n_init(void) { return i18n_init_msgs(MSGS); }