|
Packit Service |
c5cf8c |
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
|
|
Packit Service |
c5cf8c |
/*
|
|
Packit Service |
c5cf8c |
* (C) 2001 by Argonne National Laboratory.
|
|
Packit Service |
c5cf8c |
* See COPYRIGHT in top-level directory.
|
|
Packit Service |
c5cf8c |
*/
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#ifndef MPL_STR_H_INCLUDED
|
|
Packit Service |
c5cf8c |
#define MPL_STR_H_INCLUDED
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#include "mplconfig.h"
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* *INDENT-ON* */
|
|
Packit Service |
c5cf8c |
#if defined(__cplusplus)
|
|
Packit Service |
c5cf8c |
extern "C" {
|
|
Packit Service |
c5cf8c |
#endif
|
|
Packit Service |
c5cf8c |
/* *INDENT-OFF* */
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#if defined MPL_NEEDS_SNPRINTF_DECL
|
|
Packit Service |
c5cf8c |
extern int snprintf(char *, size_t, const char *, ...) ATTRIBUTE((format(printf,3,4)));
|
|
Packit Service |
c5cf8c |
#endif
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#if defined MPL_HAVE_SNPRINTF
|
|
Packit Service |
c5cf8c |
#define MPL_snprintf snprintf
|
|
Packit Service |
c5cf8c |
#else
|
|
Packit Service |
c5cf8c |
int MPL_snprintf(char *, size_t, const char *, ...) ATTRIBUTE((format(printf,3,4)));
|
|
Packit Service |
c5cf8c |
#endif /* MPL_HAVE_SNPRINTF */
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
int MPL_strncpy(char *dest, const char *src, size_t n);
|
|
Packit Service |
c5cf8c |
char *MPL_strsep(char **stringp, const char *delim);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#if defined MPL_NEEDS_STRNCMP_DECL
|
|
Packit Service |
c5cf8c |
extern int strncmp(const char *s1, const char *s2, size_t n);
|
|
Packit Service |
c5cf8c |
#endif
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#if defined MPL_HAVE_STRNCMP
|
|
Packit Service |
c5cf8c |
#define MPL_strncmp strncmp
|
|
Packit Service |
c5cf8c |
#else
|
|
Packit Service |
c5cf8c |
#error "strncmp is required"
|
|
Packit Service |
c5cf8c |
#endif /* MPL_HAVE_STRNCMP */
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#if defined MPL_NEEDS_STRERROR_DECL
|
|
Packit Service |
c5cf8c |
extern char *strerror(int errnum);
|
|
Packit Service |
c5cf8c |
#endif
|
|
Packit Service |
c5cf8c |
#if defined MPL_HAVE_STRERROR
|
|
Packit Service |
c5cf8c |
#define MPL_strerror strerror
|
|
Packit Service |
c5cf8c |
#else
|
|
Packit Service |
c5cf8c |
char *MPL_strerror(int errnum);
|
|
Packit Service |
c5cf8c |
#endif /* MPL_HAVE_STRERROR */
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
int MPL_strnapp(char *dest, const char *src, size_t n);
|
|
Packit Service |
c5cf8c |
void MPL_create_pathname(char *dest_filename, const char *dirname,
|
|
Packit Service |
c5cf8c |
const char *prefix, const int is_dir);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* *INDENT-ON* */
|
|
Packit Service |
c5cf8c |
#if defined(__cplusplus)
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
#endif
|
|
Packit Service |
c5cf8c |
/* *INDENT-OFF* */
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#endif /* MPL_STR_H_INCLUDED */
|