1
1

* rename ompi_show_help to opal_show_help

* rename ompi_stacktrace to opal_stacktrace
* rename ompi_strncpy to opal_strncpy

This commit was SVN r6336.
Этот коммит содержится в:
Brian Barrett 2005-07-04 02:38:44 +00:00
родитель ed81e51c3a
Коммит 170ef8af1f
36 изменённых файлов: 131 добавлений и 131 удалений

Просмотреть файл

@ -1180,7 +1180,7 @@ AM_PROG_LEX
if test -z "$LEX" -o -n "`echo $LEX | grep missing`" -o \
"`basename $LEX`" != "flex"; then
if test ! -f "$srcdir/ompi/util/show_help_lex.c"; then
if test ! -f "$srcdir/opal/util/show_help_lex.c"; then
AC_MSG_WARN([*** Could not find GNU Flex on your system.])
AC_MSG_WARN([*** GNU Flex required for developer builds of Open MPI.])
AC_MSG_WARN([*** Other versions of Lex are not supported.])

Просмотреть файл

@ -183,7 +183,7 @@ int ompi_info_get (ompi_info_t *info, char *key, int valuelen,
if (value_length < valuelen ) {
strcpy(value, search->ie_value);
} else {
ompi_strncpy(value, search->ie_value, valuelen);
opal_strncpy(value, search->ie_value, valuelen);
value[valuelen] = 0;
}
}

Просмотреть файл

@ -20,7 +20,7 @@
#include <string.h>
#include "mpi.h"
#include "util/strncpy.h"
#include "opal/util/strncpy.h"
#include "opal/class/opal_list.h"
#include "class/ompi_pointer_array.h"
#include "opal/threads/mutex.h"

Просмотреть файл

@ -23,7 +23,7 @@
#include "mpi.h"
#include "communicator/communicator.h"
#include "opal/util/argv.h"
#include "util/show_help.h"
#include "opal/util/show_help.h"
#include "opal/class/opal_list.h"
#include "opal/class/opal_object.h"
#include "mca/mca.h"
@ -224,7 +224,7 @@ int mca_coll_base_comm_select(ompi_communicator_t *comm,
if (!found) {
/* There's no modules available -- including basic. Doh! */
ompi_show_help("help-mca-coll-base",
opal_show_help("help-mca-coll-base",
"comm-select:none-available", true);
return OMPI_ERROR;
}

Просмотреть файл

@ -22,7 +22,7 @@
#include "mpi.h"
#include "communicator/communicator.h"
#include "util/show_help.h"
#include "opal/util/show_help.h"
#include "mca/mca.h"
#include "mca/base/base.h"
#include "mca/coll/coll.h"
@ -49,7 +49,7 @@ int mca_coll_base_comm_unselect(ompi_communicator_t *comm)
NULL != comm->c_coll_selected_module->coll_module_finalize) {
err = comm->c_coll_selected_module->coll_module_finalize(comm);
if (OMPI_SUCCESS != err) {
ompi_show_help("help-mca-coll-base",
opal_show_help("help-mca-coll-base",
"comm-unselect:failed-finalize", true);
return err;
}
@ -64,7 +64,7 @@ int mca_coll_base_comm_unselect(ompi_communicator_t *comm)
NULL != comm->c_coll_basic_module->coll_module_finalize) {
err = comm->c_coll_basic_module->coll_module_finalize(comm);
if (OMPI_SUCCESS != err) {
ompi_show_help("help-mca-coll-base",
opal_show_help("help-mca-coll-base",
"comm-unselect:basic-failed-finalize", true);
return err;
}

Просмотреть файл

@ -24,7 +24,7 @@
#include "include/constants.h"
#include "opal/class/opal_list.h"
#include "opal/util/output.h"
#include "util/show_help.h"
#include "opal/util/show_help.h"
#include "mca/mca.h"
#include "mca/base/base.h"
#include "mca/coll/coll.h"
@ -150,7 +150,7 @@ int mca_coll_base_find_available(bool enable_progress_threads,
mca_coll_base_components_available_valid = false;
opal_output_verbose(10, mca_coll_base_output,
"coll:find_available: no coll components available!");
ompi_show_help("help-mca-base", "find-available:none-found", true,
opal_show_help("help-mca-base", "find-available:none-found", true,
"coll");
return OMPI_ERROR;
}

Просмотреть файл

@ -18,7 +18,7 @@
#include <string.h>
#include "util/strncpy.h"
#include "opal/util/strncpy.h"
#include "include/totalview.h"
#include "mpi.h"
#include "mpi/c/bindings.h"

Просмотреть файл

@ -18,7 +18,7 @@
#include <string.h>
#include "util/strncpy.h"
#include "opal/util/strncpy.h"
#include "include/totalview.h"
#include "mpi.h"
#include "mpi/c/bindings.h"

Просмотреть файл

@ -20,7 +20,7 @@
#include "mpi/c/bindings.h"
#include "opal/class/opal_list.h"
#include "info/info.h"
#include "util/strncpy.h"
#include "opal/util/strncpy.h"
#include <stdlib.h>
#include <string.h>
#include "errhandler/errhandler.h"

Просмотреть файл

@ -21,7 +21,7 @@
#endif
#include "communicator/communicator.h"
#include "util/show_help.h"
#include "opal/util/show_help.h"
#include "util/proc_info.h"
#include "ompi/runtime/mpiruntime.h"
#include "orte/runtime/runtime.h"

Просмотреть файл

@ -28,8 +28,8 @@
#include "communicator/communicator.h"
#include "group/group.h"
#include "info/info.h"
#include "util/show_help.h"
#include "util/stacktrace.h"
#include "opal/util/show_help.h"
#include "opal/util/stacktrace.h"
#include "errhandler/errcode.h"
#include "errhandler/errclass.h"
#include "request/request.h"
@ -133,7 +133,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
}
#ifndef WIN32
if (OMPI_SUCCESS != (ret = ompi_util_register_stackhandlers ())) {
if (OMPI_SUCCESS != (ret = opal_util_register_stackhandlers ())) {
error = "util_register_stackhandlers() failed";
goto error;
}
@ -427,7 +427,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
error:
if (ret != OMPI_SUCCESS) {
ompi_show_help("help-mpi-runtime",
opal_show_help("help-mpi-runtime",
"mpi_init:startup:internal-failure", true,
"MPI_INIT", "MPI_INIT", error, ret);
return ret;

Просмотреть файл

@ -39,7 +39,7 @@
#include "opal/util/output.h"
#include "opal/util/cmd_line.h"
#include "opal/util/argv.h"
#include "util/show_help.h"
#include "opal/util/show_help.h"
#include "communicator/communicator.h"
#include "mca/base/base.h"
#include "tools/ompi_info/ompi_info.h"
@ -77,7 +77,7 @@ int main(int argc, char *argv[])
cmd_line = OBJ_NEW(opal_cmd_line_t);
if (NULL == cmd_line) {
ret = errno;
ompi_show_help("help-ompi_info.txt", "lib-call-fail", true,
opal_show_help("help-ompi_info.txt", "lib-call-fail", true,
"opal_cmd_line_create", __FILE__, __LINE__, NULL);
exit(ret);
}
@ -138,7 +138,7 @@ int main(int argc, char *argv[])
}
if (cmd_error || want_help) {
char *usage = opal_cmd_line_get_usage_msg(cmd_line);
ompi_show_help("help-ompi_info.txt", "usage", true, usage);
opal_show_help("help-ompi_info.txt", "usage", true, usage);
free(usage);
exit(cmd_error ? 1 : 0);
}

Просмотреть файл

@ -32,7 +32,7 @@
#include "opal/class/opal_value_array.h"
#include "opal/util/printf.h"
#include "util/show_help.h"
#include "opal/util/show_help.h"
#include "mca/base/mca_base_param.h"
#include "tools/ompi_info/ompi_info.h"
@ -105,7 +105,7 @@ void ompi_info::do_params(bool want_all, bool want_internal)
if (!found) {
char *usage = opal_cmd_line_get_usage_msg(cmd_line);
ompi_show_help("help-ompi_info.txt", "usage", true, usage);
opal_show_help("help-ompi_info.txt", "usage", true, usage);
free(usage);
exit(1);
}
@ -253,7 +253,7 @@ void ompi_info::do_path(bool want_all, opal_cmd_line_t *cmd_line)
show_path(path_sysconfdir, OMPI_SYSCONFDIR);
else {
char *usage = opal_cmd_line_get_usage_msg(cmd_line);
ompi_show_help("help-ompi_info.txt", "usage", true, usage);
opal_show_help("help-ompi_info.txt", "usage", true, usage);
free(usage);
exit(1);
}

Просмотреть файл

@ -15,7 +15,7 @@
//
#include "ompi_config.h"
#include "util/show_help.h"
#include "opal/util/show_help.h"
#include "tools/wrappers/ompi_wrap.h"
#include <iostream>
@ -32,7 +32,7 @@ main(int argc, char *argv[])
// language of this wrapper compiler.
#if !OMPI_WANT_F77_BINDINGS
ompi_show_help("help-wrapper.txt", "no-fortran-support", true,
opal_show_help("help-wrapper.txt", "no-fortran-support", true,
77, "mpif77");
return 1;
#else

Просмотреть файл

@ -15,7 +15,7 @@
//
#include "ompi_config.h"
#include "util/show_help.h"
#include "opal/util/show_help.h"
#include "tools/wrappers/ompi_wrap.h"
#include <iostream>
@ -32,7 +32,7 @@ main(int argc, char *argv[])
// language of this wrapper compiler.
#if !OMPI_WANT_F90_BINDINGS
ompi_show_help("help-wrapper.txt", "no-fortran-support", true,
opal_show_help("help-wrapper.txt", "no-fortran-support", true,
90, "mpif90");
return 1;
#else

Просмотреть файл

@ -32,7 +32,7 @@
#include "opal/util/argv.h"
#include "opal/util/few.h"
#include "opal/util/path.h"
#include "util/show_help.h"
#include "opal/util/show_help.h"
#include "tools/wrappers/ompi_wrap.h"
extern char **environ;
@ -116,7 +116,7 @@ ompi_wrap_parse_args(int argc, char *argv[], bool & want_flags)
#if !OMPI_ENABLE_MPI_PROFILING
// Sanity check
if (fl_profile) {
ompi_show_help("help-wrapper.txt", "no-profiling-support", true,
opal_show_help("help-wrapper.txt", "no-profiling-support", true,
argv[0], NULL);
fl_profile = false;
}
@ -431,7 +431,7 @@ ompi_wrap_exec_sv(const ompi_sv_t & sv)
// compiler first, just to try to eliminate that case.
tmp = opal_path_findv(av[0], 0, environ, NULL);
if (NULL == tmp) {
ompi_show_help("help-wrapper.txt", "no-compiler-found", true,
opal_show_help("help-wrapper.txt", "no-compiler-found", true,
av[0], NULL);
errno = 0;
status = -1;

Просмотреть файл

@ -200,8 +200,8 @@ prebuild:
@/usr/bin/flex -t -Porte_rds_hostfile_ "${topdir}/src/mca/rds/hostfile/rds_hostfile_lex.l" \
> "${topdir}/src/mca/rds/hostfile/rds_hostfile_lex.c" 2>/dev/null
@echo "Creating show_help_lex.c"
@/usr/bin/flex -t -Pompi_show_help_yy "${topdir}/src/util/show_help_lex.l" \
> "${topdir}/src/util/show_help_lex.c" 2>/dev/null
@/usr/bin/flex -t -Popal_show_help_yy "${topdir}/src/opal/util/show_help_lex.l" \
> "${topdir}/src/opal/util/show_help_lex.c" 2>/dev/null
@for dirs in ${STATIC_LIBS}; do \
(dir="mca/$${dirs}/base"; echo "Making Static components in $${dirs}"; comp_name="$${dirs}_static-components.h"; cp "${topdir}/src/win32/generated_include/$${comp_name}" "$${dir}/static-components.h";); \
done

Просмотреть файл

@ -21,7 +21,7 @@
#include <stdlib.h>
#include "opal/class/opal_list.h"
#include "util/strncpy.h"
#include "opal/util/strncpy.h"
#include "opal/util/argv.h"
#include "opal/util/output.h"
#include "mca/mca.h"

Просмотреть файл

@ -17,8 +17,8 @@
include $(top_srcdir)/config/Makefile.options
AM_CPPFLAGS = -DOMPI_PKGDATADIR=\"$(pkgdatadir)\"
AM_LFLAGS = -Pompi_show_help_yy
LEX_OUTPUT_ROOT = lex.ompi_show_help_yy
AM_LFLAGS = -Popal_show_help_yy
LEX_OUTPUT_ROOT = lex.opal_show_help_yy
noinst_LTLIBRARIES = libopalutil.la

Просмотреть файл

@ -20,7 +20,7 @@
#include "include/constants.h"
#include "opal/util/argv.h"
#include "util/strncpy.h"
#include "opal/util/strncpy.h"
#define ARGSIZE 128

Просмотреть файл

@ -26,7 +26,7 @@
#include "opal/threads/mutex.h"
#include "opal/util/argv.h"
#include "opal/util/cmd_line.h"
#include "util/strncpy.h"
#include "opal/util/strncpy.h"
#include "opal/util/output.h"
#include "mca/base/mca_base_param.h"

Просмотреть файл

@ -393,7 +393,7 @@ extern "C" {
* display (to allow for undocumented options).
*
* This function is typically only invoked internally by the
* ompi_show_help() function.
* opal_show_help() function.
*
* This function should probably be fixed up to produce prettier
* output.

Просмотреть файл

@ -49,7 +49,7 @@
#include "opal/class/opal_list.h"
#include "opal/util/if.h"
#include "opal/util/output.h"
#include "util/strncpy.h"
#include "opal/util/strncpy.h"
#ifndef IF_NAMESIZE
#define IF_NAMESIZE 32

Просмотреть файл

@ -21,8 +21,8 @@
#include <locale.h>
#include "include/constants.h"
#include "util/show_help.h"
#include "util/show_help_lex.h"
#include "opal/util/show_help.h"
#include "opal/util/show_help_lex.h"
#include "opal/util/printf.h"
#include "opal/util/argv.h"
@ -46,7 +46,7 @@ static const char *default_filename = "help-messages";
static const char *dash_line = "--------------------------------------------------------------------------\n";
int ompi_show_help(const char *filename, const char *topic,
int opal_show_help(const char *filename, const char *topic,
bool want_error_header, ...)
{
int ret;
@ -57,13 +57,13 @@ int ompi_show_help(const char *filename, const char *topic,
return ret;
}
if (OMPI_SUCCESS != (ret = find_topic(filename, topic))) {
fclose(ompi_show_help_yyin);
fclose(opal_show_help_yyin);
return ret;
}
ret = read_message(&array);
ompi_show_help_finish_parsing();
fclose(ompi_show_help_yyin);
opal_show_help_finish_parsing();
fclose(opal_show_help_yyin);
if (OMPI_SUCCESS != ret) {
destroy_message(array);
return ret;
@ -101,11 +101,11 @@ static int open_file(const char *base, const char *topic)
extension. */
asprintf(&filename, "%s/%s", OMPI_PKGDATADIR, base);
ompi_show_help_yyin = fopen(filename, "r");
opal_show_help_yyin = fopen(filename, "r");
free(filename);
if (NULL == ompi_show_help_yyin) {
if (NULL == opal_show_help_yyin) {
asprintf(&filename, "%s/%s.txt", OMPI_PKGDATADIR, base);
ompi_show_help_yyin = fopen(filename, "r");
opal_show_help_yyin = fopen(filename, "r");
free(filename);
}
#else
@ -120,27 +120,27 @@ static int open_file(const char *base, const char *topic)
default language (because we know that we have that one) */
asprintf(&filename, "%s/%s.%s", OMPI_PKGDATADIR, base, lang);
ompi_show_help_yyin = fopen(filename, "r");
opal_show_help_yyin = fopen(filename, "r");
free(filename);
if (NULL == ompi_show_help_yyin) {
if (NULL == opal_show_help_yyin) {
asprintf(&filename, "%s/%s.%s", OMPI_PKGDATADIR,
base, default_language);
ompi_show_help_yyin = fopen(filename, "r");
opal_show_help_yyin = fopen(filename, "r");
free(filename);
}
/* If we still couldn't find it, try with no extension */
if (NULL == ompi_show_help_yyin) {
if (NULL == opal_show_help_yyin) {
asprintf(&filename, "%s/%s", OMPI_PKGDATADIR, base);
ompi_show_help_yyin = fopen(filename, "r");
opal_show_help_yyin = fopen(filename, "r");
free(filename);
}
#endif
/* If we still couldn't open it, then something is wrong */
if (NULL == ompi_show_help_yyin) {
if (NULL == opal_show_help_yyin) {
fprintf(stderr, dash_line);
fprintf(stderr, "Sorry! You were supposed to get help about:\n %s\nfrom the file:\n %s\n", topic, base);
fprintf(stderr, "But I couldn't find any file matching that name. Sorry!\n");
@ -150,7 +150,7 @@ static int open_file(const char *base, const char *topic)
/* Set the buffer */
ompi_show_help_init_buffer(ompi_show_help_yyin);
opal_show_help_init_buffer(opal_show_help_yyin);
/* Happiness */
@ -170,10 +170,10 @@ static int find_topic(const char *base, const char *topic)
/* Examine every topic */
while (1) {
token = ompi_show_help_yylex();
token = opal_show_help_yylex();
switch (token) {
case OMPI_SHOW_HELP_PARSE_TOPIC:
tmp = strdup(ompi_show_help_yytext);
case OPAL_SHOW_HELP_PARSE_TOPIC:
tmp = strdup(opal_show_help_yytext);
if (NULL == tmp) {
return OMPI_ERR_OUT_OF_RESOURCE;
}
@ -185,10 +185,10 @@ static int find_topic(const char *base, const char *topic)
}
break;
case OMPI_SHOW_HELP_PARSE_MESSAGE:
case OPAL_SHOW_HELP_PARSE_MESSAGE:
break;
case OMPI_SHOW_HELP_PARSE_DONE:
case OPAL_SHOW_HELP_PARSE_DONE:
fprintf(stderr, dash_line);
fprintf(stderr, "Sorry! You were supposed to get help about:\n %s\nfrom the file:\n %s\n", topic, base);
fprintf(stderr, "But I couldn't find that topic in the file. Sorry!\n");
@ -215,10 +215,10 @@ static int read_message(char ***array)
int token;
while (1) {
token = ompi_show_help_yylex();
token = opal_show_help_yylex();
switch (token) {
case OMPI_SHOW_HELP_PARSE_MESSAGE:
tmp = strdup(ompi_show_help_yytext);
case OPAL_SHOW_HELP_PARSE_MESSAGE:
tmp = strdup(opal_show_help_yytext);
if (NULL == tmp) {
return OMPI_ERR_OUT_OF_RESOURCE;
}

Просмотреть файл

@ -26,7 +26,7 @@
* display help messages, but it can actually be used to display any
* arbitrary text messages.
*
* The function ompi_show_help() is used to find a help message and
* The function opal_show_help() is used to find a help message and
* display it. Its important parameters are a filename, message name,
* and printf()-style varargs parameters used to substitute into the
* message.
@ -43,7 +43,7 @@
* appropriate help message to display. It looks for the message name
* in the file, reads in the message, and displays it. printf()-like
* substitutions are performed (e.g., %d, %s, etc.) --
* ompi_show_help() takes a variable legnth argument list that are
* opal_show_help() takes a variable legnth argument list that are
* used for these substitutions.
*
* The format of the help file is simplistic:
@ -72,7 +72,7 @@
* It is expected that help messages will be grouped by filename;
* similar messages should be in a single file. For example, an MCA
* component may install its own helpfile in Open MPI's $pkgdatadir,
* and therefore the component can invoke ompi_show_help() to display
* and therefore the component can invoke opal_show_help() to display
* its own help messages.
*
* Message files in $pkgdatadir have a naming convention: they
@ -83,8 +83,8 @@
* previously.
*/
#ifndef OMPI_SHOW_HELP_H
#define OMPI_SHOW_HELP_H
#ifndef OPAL_SHOW_HELP_H
#define OPAL_SHOW_HELP_H
#include "ompi_config.h"
@ -111,7 +111,7 @@ extern "C" {
* based on the topic, and displays it. If want_error_header is
* true, a header and footer of asterisks are also displayed.
*/
OMPI_DECLSPEC int ompi_show_help(const char *filename, const char *topic,
OMPI_DECLSPEC int opal_show_help(const char *filename, const char *topic,
bool want_error_header, ...);
/**
@ -123,7 +123,7 @@ OMPI_DECLSPEC int ompi_show_help(const char *filename, const char *topic,
* flex parser since we may not hit the <<EOF>> rule and call this
* function automatically.
*/
OMPI_DECLSPEC int ompi_show_help_finish_parsing(void);
OMPI_DECLSPEC int opal_show_help_finish_parsing(void);
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif

Просмотреть файл

@ -14,8 +14,8 @@
* $HEADER$
*/
#ifndef OMPI_SHOW_HELP_LEX_H
#define OMPI_SHOW_HELP_LEX_H
#ifndef OPAL_SHOW_HELP_LEX_H
#define OPAL_SHOW_HELP_LEX_H
#include "ompi_config.h"
@ -33,13 +33,13 @@
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
int ompi_show_help_yylex(void);
int ompi_show_help_init_buffer(FILE *file);
int opal_show_help_yylex(void);
int opal_show_help_init_buffer(FILE *file);
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;
extern FILE *opal_show_help_yyin;
extern bool opal_show_help_parse_done;
extern char *opal_show_help_yytext;
extern int opal_show_help_yynewlines;
/*
* Make lex-generated files not issue compiler warnings
@ -51,13 +51,13 @@ extern int ompi_show_help_yynewlines;
#define YY_NO_UNPUT 1
enum {
OMPI_SHOW_HELP_PARSE_DONE,
OMPI_SHOW_HELP_PARSE_ERROR,
OPAL_SHOW_HELP_PARSE_DONE,
OPAL_SHOW_HELP_PARSE_ERROR,
OMPI_SHOW_HELP_PARSE_TOPIC,
OMPI_SHOW_HELP_PARSE_MESSAGE,
OPAL_SHOW_HELP_PARSE_TOPIC,
OPAL_SHOW_HELP_PARSE_MESSAGE,
OMPI_SHOW_HELP_PARSE_MAX
OPAL_SHOW_HELP_PARSE_MAX
};
#if defined(c_plusplus) || defined(__cplusplus)
}

Просмотреть файл

@ -22,12 +22,12 @@
#include <unistd.h>
#endif
#include "util/show_help_lex.h"
#include "opal/util/show_help_lex.h"
/*
* public functions
*/
int ompi_show_help_finish_parsing(void);
int opal_show_help_finish_parsing(void);
/*
@ -36,7 +36,7 @@ int ompi_show_help_finish_parsing(void);
#ifdef __cplusplus
extern "C" {
#endif
static int ompi_show_help_yywrap(void);
static int opal_show_help_yywrap(void);
#ifdef __cplusplus
}
#endif
@ -44,12 +44,12 @@ int ompi_show_help_finish_parsing(void);
/*
* global variables
*/
int ompi_show_help_yynewlines = 1;
bool ompi_show_help_parse_done = false;
char *ompi_show_help_string = NULL;
int opal_show_help_yynewlines = 1;
bool opal_show_help_parse_done = false;
char *opal_show_help_string = NULL;
#define yyterminate() \
return ompi_show_help_finish_parsing()
return opal_show_help_finish_parsing()
%}
@ -62,11 +62,11 @@ CHAR [A-Za-z0-9_\-\.]
#.*\n ; /* comment line */
^\[.+\]/.*\n { BEGIN(CHOMP); return OMPI_SHOW_HELP_PARSE_TOPIC; }
^\[.+\]/.*\n { BEGIN(CHOMP); return OPAL_SHOW_HELP_PARSE_TOPIC; }
<CHOMP>.*\n { BEGIN(INITIAL); }
.*/\n { BEGIN(CHOMP); return OMPI_SHOW_HELP_PARSE_MESSAGE; }
.*/\n { BEGIN(CHOMP); return OPAL_SHOW_HELP_PARSE_MESSAGE; }
%%
@ -75,7 +75,7 @@ CHAR [A-Za-z0-9_\-\.]
* This cleans up at the end of the parse (since, in this case, we
* always parse the entire file) and prevents a memory leak.
*/
int ompi_show_help_finish_parsing(void)
int opal_show_help_finish_parsing(void)
{
if (NULL != YY_CURRENT_BUFFER) {
yy_delete_buffer(YY_CURRENT_BUFFER);
@ -89,9 +89,9 @@ int ompi_show_help_finish_parsing(void)
}
static int ompi_show_help_yywrap(void)
static int opal_show_help_yywrap(void)
{
ompi_show_help_parse_done = true;
opal_show_help_parse_done = true;
return 1;
}
@ -105,7 +105,7 @@ static int ompi_show_help_yywrap(void)
* have a valid buffer. Hence, here we ensure to give it a valid
* buffer.
*/
int ompi_show_help_init_buffer(FILE *file)
int opal_show_help_init_buffer(FILE *file)
{
YY_BUFFER_STATE buf = yy_create_buffer(file, YY_BUF_SIZE);
yy_switch_to_buffer(buf);

Просмотреть файл

@ -34,7 +34,7 @@
#include <signal.h>
#endif
#include "util/stacktrace.h"
#include "opal/util/stacktrace.h"
#include "mca/base/mca_base_param.h"
#ifndef _NSIG
@ -56,7 +56,7 @@
* FIXME: Should distinguish for systems, which don't have siginfo...
*/
#ifndef WIN32
static void ompi_show_stackframe (int signo, siginfo_t * info, void * p)
static void opal_show_stackframe (int signo, siginfo_t * info, void * p)
{
#ifdef __GLIBC__
int i;
@ -263,7 +263,7 @@ static void ompi_show_stackframe (int signo, siginfo_t * info, void * p)
/**
* Here we register the ompi_show_stackframe function for signals
* Here we register the opal_show_stackframe function for signals
* passed to OpenMPI by the mpi_signal-parameter passed to mpirun
* by the user.
*
@ -272,7 +272,7 @@ static void ompi_show_stackframe (int signo, siginfo_t * info, void * p)
* is not a valid signal-number
*
*/
int ompi_util_register_stackhandlers (void)
int opal_util_register_stackhandlers (void)
{
#ifndef WIN32
struct sigaction act;
@ -285,7 +285,7 @@ int ompi_util_register_stackhandlers (void)
mca_base_param_lookup_string (param, &string_value);
memset(&act, 0, sizeof(act));
act.sa_sigaction = ompi_show_stackframe;
act.sa_sigaction = opal_show_stackframe;
act.sa_flags = SA_SIGINFO;
#ifdef SA_ONESHOT
act.sa_flags |= SA_ONESHOT;

Просмотреть файл

@ -26,7 +26,7 @@
#endif
/**
* Here we register the ompi_show_stackframe function for signals
* Here we register the opal_show_stackframe function for signals
* passed to OpenMPI by the mpi_signal-parameter passed to mpirun
* by the user.
*
@ -35,6 +35,6 @@
* is not a valid signal-number
*
*/
OMPI_DECLSPEC int ompi_util_register_stackhandlers (void);
OMPI_DECLSPEC int opal_util_register_stackhandlers (void);
#endif /* OMPI_STACKTRACE_H */

Просмотреть файл

@ -21,7 +21,7 @@
#include <string.h>
#include "util/strncpy.h"
#include "opal/util/strncpy.h"
/**
@ -41,7 +41,7 @@
* Hat Advanced Server glibc cough cough).
*/
char *
ompi_strncpy(char *dest, const char *src, size_t len)
opal_strncpy(char *dest, const char *src, size_t len)
{
size_t i;
int pad = 0;

Просмотреть файл

@ -14,8 +14,8 @@
* $HEADER$
*/
#ifndef OMPI_STRNCPY_H
#define OMPI_STRNCPY_H
#ifndef OPAL_STRNCPY_H
#define OPAL_STRNCPY_H
#include "ompi_config.h"
#ifdef HAVE_SYS_TYPES_H
@ -23,14 +23,14 @@
#endif
/*
* Use ompi_strncpy() instead of strncpy()
* Use opal_strncpy() instead of strncpy()
*/
#if defined(strncpy)
#undef strncpy
#endif
#define strncpy ompi_strncpy
#define strncpy opal_strncpy
OMPI_DECLSPEC char *ompi_strncpy(char *dest, const char *src, size_t len);
OMPI_DECLSPEC char *opal_strncpy(char *dest, const char *src, size_t len);
#endif /* OMPI_STRNCPY_H */
#endif /* OPAL_STRNCPY_H */

Просмотреть файл

@ -28,7 +28,7 @@
#include "runtime/runtime.h"
#include "runtime/runtime_types.h"
#include "runtime/ompi_rte_wait.h"
#include "util/show_help.h"
#include "opal/util/show_help.h"
#include "mca/pcm/base/base_kill_track.h"
#include "mca/pcm/base/base_job_track.h"
@ -49,7 +49,7 @@ mca_pcm_bproc_monitor_cb(pid_t pid, int status, void *data)
ret = mca_pcm_base_job_list_get_job_info(me->jobs, pid, &jobid,
&lower, &upper, true);
if (ret != OMPI_SUCCESS) {
ompi_show_help("help-mca-pcm-bproc.txt",
opal_show_help("help-mca-pcm-bproc.txt",
"spawn:no-process-record", true, pid, status);
return;
}

Просмотреть файл

@ -32,7 +32,7 @@
#include "util/session_dir.h"
#include "opal/util/output.h"
#include "opal/util/os_path.h"
#include "util/show_help.h"
#include "opal/util/show_help.h"
#include "util/universe_setup_file_io.h"
#include "runtime/runtime.h"
@ -75,7 +75,7 @@ int main(int argc, char *argv[])
if (OMPI_SUCCESS != opal_cmd_line_parse(cmd_line, true, argc, argv)) {
char *args = NULL;
args = opal_cmd_line_get_usage_msg(cmd_line);
ompi_show_help("help-console.txt", "console:usage", false,
opal_show_help("help-console.txt", "console:usage", false,
argv[0], args);
free(args);
return 1;
@ -86,7 +86,7 @@ int main(int argc, char *argv[])
opal_cmd_line_is_taken(cmd_line, "h")) {
char *args = NULL;
args = opal_cmd_line_get_usage_msg(cmd_line);
ompi_show_help("help-console.txt", "console:usage", false,
opal_show_help("help-console.txt", "console:usage", false,
argv[0], args);
free(args);
return 1;

Просмотреть файл

@ -38,7 +38,7 @@
#include "dps/dps.h"
#include "opal/util/opal_environ.h"
#include "opal/util/output.h"
#include "util/show_help.h"
#include "opal/util/show_help.h"
#include "util/sys_info.h"
#include "opal/util/os_path.h"
#include "opal/util/cmd_line.h"
@ -180,7 +180,7 @@ int main(int argc, char *argv[])
if (orted_globals.help) {
char *args = NULL;
args = opal_cmd_line_get_usage_msg(cmd_line);
ompi_show_help("help-orted.txt", "orted:usage", false,
opal_show_help("help-orted.txt", "orted:usage", false,
argv[0], args);
free(args);
return 1;

Просмотреть файл

@ -40,7 +40,7 @@
#include "opal/util/argv.h"
#include "opal/util/path.h"
#include "opal/util/output.h"
#include "util/show_help.h"
#include "opal/util/show_help.h"
#include "util/sys_info.h"
#include "opal/util/os_path.h"
#include "opal/util/cmd_line.h"
@ -151,7 +151,7 @@ int main(int argc, char *argv[])
if (orteprobe_globals.help) {
char *args = NULL;
args = opal_cmd_line_get_usage_msg(cmd_line);
ompi_show_help("help-orteprobe.txt", "orteprobe:usage", false,
opal_show_help("help-orteprobe.txt", "orteprobe:usage", false,
argv[0], args);
free(args);
return 1;

Просмотреть файл

@ -42,7 +42,7 @@
#include "util/sys_info.h"
#include "opal/util/output.h"
#include "util/universe_setup_file_io.h"
#include "util/show_help.h"
#include "opal/util/show_help.h"
#include "opal/util/basename.h"
#include "opal/threads/condition.h"
@ -250,13 +250,13 @@ int main(int argc, char *argv[])
if (0 == num_apps) {
/* This should never happen -- this case should be caught in
create_app(), but let's just double check... */
ompi_show_help("help-orterun.txt", "orterun:nothing-to-do",
opal_show_help("help-orterun.txt", "orterun:nothing-to-do",
true, orterun_basename);
exit(1);
}
apps = malloc(sizeof(orte_app_context_t *) * num_apps);
if (NULL == apps) {
ompi_show_help("help-orterun.txt", "orterun:syscall-failed",
opal_show_help("help-orterun.txt", "orterun:syscall-failed",
true, orterun_basename, "malloc returned NULL", errno);
exit(1);
}
@ -267,7 +267,7 @@ int main(int argc, char *argv[])
}
proc_infos = malloc(sizeof(struct proc_info_t) * j);
if (NULL == proc_infos) {
ompi_show_help("help-orterun.txt", "orterun:syscall-failed",
opal_show_help("help-orterun.txt", "orterun:syscall-failed",
true, orterun_basename, "malloc returned NULL", errno);
exit(1);
}
@ -287,7 +287,7 @@ int main(int argc, char *argv[])
/* now call orte_init and setup the RTE */
if (ORTE_SUCCESS != (rc = orte_init())) {
ompi_show_help("help-orterun.txt", "orterun:init-failure", true,
opal_show_help("help-orterun.txt", "orterun:init-failure", true,
"orte_init()", rc);
return rc;
}
@ -637,7 +637,7 @@ static int parse_globals(int argc, char* argv[])
if (1 == argc || orterun_globals.help) {
char *args = NULL;
args = opal_cmd_line_get_usage_msg(&cmd_line);
ompi_show_help("help-orterun.txt", "orterun:usage", false,
opal_show_help("help-orterun.txt", "orterun:usage", false,
orterun_basename, args);
free(args);
@ -880,7 +880,7 @@ static int create_app(int argc, char* argv[], orte_app_context_t **app_ptr,
/* See if we have anything left */
if (0 == app->argc) {
ompi_show_help("help-orterun.txt", "orterun:executable-not-specified",
opal_show_help("help-orterun.txt", "orterun:executable-not-specified",
true, orterun_basename, orterun_basename);
rc = ORTE_ERR_NOT_FOUND;
goto cleanup;
@ -975,7 +975,7 @@ static int create_app(int argc, char* argv[], orte_app_context_t **app_ptr,
really have no idea what the launch... */
if (app->num_procs == 0 && !map_data) {
ompi_show_help("help-orterun.txt", "orterun:num-procs-unspecified",
opal_show_help("help-orterun.txt", "orterun:num-procs-unspecified",
true, orterun_basename, app->argv[0]);
rc = ORTE_ERR_BAD_PARAM;
goto cleanup;
@ -993,7 +993,7 @@ static int create_app(int argc, char* argv[], orte_app_context_t **app_ptr,
free(value);
if (NULL == app->app) {
ompi_show_help("help-orterun.txt", "orterun:executable-not-found",
opal_show_help("help-orterun.txt", "orterun:executable-not-found",
true, orterun_basename, app->argv[0], orterun_basename);
rc = ORTE_ERR_NOT_FOUND;
goto cleanup;
@ -1035,7 +1035,7 @@ static int parse_appfile(char *filename, char ***env)
fp = fopen(filename, "r");
if (NULL == fp) {
ompi_show_help("help-orterun.txt", "orterun:appfile-not-found", true,
opal_show_help("help-orterun.txt", "orterun:appfile-not-found", true,
filename);
return ORTE_ERR_NOT_FOUND;
}