
- see src/util/show_help.h for details (doxygen); main function call is ompi_show_help() - text message files are expected to be located in $pkgdatadir (usually $prefix/share/openmpi). Anyone can install a text file in $pkgdatadir with their message(s) in it and then have them displayed via ompi_show_help(). "pkgdata_DATA" is the keyword to use in Makefile.am's, for example (from src/mca/base/Makefile.am): pkgdata_DATA = help-mca-base.txt - added a few examples in the code base using ompi_show_help(), but not too many -- can convert more "show_help" comments in the code over time; no huge rush. :-) - no i18n-like support yet; waiting for advice and consensus from other developers This commit was SVN r2519.
49 строки
786 B
C
49 строки
786 B
C
/*
|
|
* $HEADER$
|
|
*/
|
|
|
|
#ifndef OMPI_SHOW_HELP_LEX_H
|
|
#define OMPI_SHOW_HELP_LEX_H
|
|
|
|
#include "ompi_config.h"
|
|
|
|
#ifdef malloc
|
|
#undef malloc
|
|
#endif
|
|
#ifdef realloc
|
|
#undef realloc
|
|
#endif
|
|
#ifdef free
|
|
#undef free
|
|
#endif
|
|
|
|
#include <stdio.h>
|
|
|
|
extern int ompi_show_help_yylex(void);
|
|
|
|
extern FILE *ompi_show_help_yyin;
|
|
extern bool ompi_show_help_parse_done;
|
|
extern char *ompi_show_help_yytext;
|
|
extern int ompi_show_help_yynewlines;
|
|
|
|
/*
|
|
* Make lex-generated files not issue compiler warnings
|
|
*/
|
|
#define YY_STACK_USED 0
|
|
#define YY_ALWAYS_INTERACTIVE 0
|
|
#define YY_NEVER_INTERACTIVE 0
|
|
#define YY_MAIN 0
|
|
#define YY_NO_UNPUT 1
|
|
|
|
enum {
|
|
OMPI_SHOW_HELP_PARSE_DONE,
|
|
OMPI_SHOW_HELP_PARSE_ERROR,
|
|
|
|
OMPI_SHOW_HELP_PARSE_TOPIC,
|
|
OMPI_SHOW_HELP_PARSE_MESSAGE,
|
|
|
|
OMPI_SHOW_HELP_PARSE_MAX
|
|
};
|
|
|
|
#endif
|