|
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_ARGSTR_H_INCLUDED
|
|
Packit Service |
c5cf8c |
#define MPL_ARGSTR_H_INCLUDED
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#include "mplconfig.h"
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* Make sure that we have the definitions for the malloc routines and size_t */
|
|
Packit Service |
c5cf8c |
#include <stdio.h>
|
|
Packit Service |
c5cf8c |
#include <stdlib.h>
|
|
Packit Service |
c5cf8c |
#include "mpl_dbg.h"
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#if defined (MPL_USE_DBG_LOGGING)
|
|
Packit Service |
c5cf8c |
extern MPL_dbg_class MPIR_DBG_STRING;
|
|
Packit Service |
c5cf8c |
#endif /* MPL_USE_DBG_LOGGING */
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#define MPL_STR_SUCCESS 0
|
|
Packit Service |
c5cf8c |
#define MPL_STR_FAIL 1
|
|
Packit Service |
c5cf8c |
#define MPL_STR_NOMEM 2
|
|
Packit Service |
c5cf8c |
#define MPL_STR_TRUNCATED 3
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#define MPL_STR_QUOTE_CHAR '\"'
|
|
Packit Service |
c5cf8c |
#define MPL_STR_QUOTE_STR "\""
|
|
Packit Service |
c5cf8c |
#define MPL_STR_DELIM_CHAR '#'
|
|
Packit Service |
c5cf8c |
#define MPL_STR_DELIM_STR "#"
|
|
Packit Service |
c5cf8c |
#define MPL_STR_ESCAPE_CHAR '\\'
|
|
Packit Service |
c5cf8c |
#define MPL_STR_HIDE_CHAR '*'
|
|
Packit Service |
c5cf8c |
#define MPL_STR_SEPAR_CHAR '$'
|
|
Packit Service |
c5cf8c |
#define MPL_STR_SEPAR_STR "$"
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
int MPL_str_get_string_arg(const char *str, const char *key, char *val, int maxlen);
|
|
Packit Service |
c5cf8c |
int MPL_str_get_binary_arg(const char *str, const char *key, char *buffer,
|
|
Packit Service |
c5cf8c |
int maxlen, int *out_length);
|
|
Packit Service |
c5cf8c |
int MPL_str_get_int_arg(const char *str, const char *key, int *val_ptr);
|
|
Packit Service |
c5cf8c |
int MPL_str_add_string_arg(char **str_ptr, int *maxlen_ptr, const char *key, const char *val);
|
|
Packit Service |
c5cf8c |
int MPL_str_add_binary_arg(char **str_ptr, int *maxlen_ptr, const char *key,
|
|
Packit Service |
c5cf8c |
const char *buffer, int length);
|
|
Packit Service |
c5cf8c |
int MPL_str_add_int_arg(char **str_ptr, int *maxlen_ptr, const char *key, int val);
|
|
Packit Service |
c5cf8c |
int MPL_str_add_string(char **str_ptr, int *maxlen_ptr, const char *val);
|
|
Packit Service |
c5cf8c |
int MPL_str_get_string(char **str_ptr, char *val, int maxlen);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#endif /* MPL_ARGSTR_H_INCLUDED */
|