nvpair.h
Go to the documentation of this file.
/*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef NVPAIR_H
#define NVPAIR_H
#include <stdio.h>
#include "int_sizes.h"
#include "hash_table.h"
struct nvpair *nvpair_create();
void nvpair_delete(struct nvpair *n);
void nvpair_parse(struct nvpair *n, const char *text);
int nvpair_parse_stream(struct nvpair *n, FILE * stream);
int nvpair_print(struct nvpair *n, char *text, int length);
int nvpair_print_alloc(struct nvpair *n, char **text);
void nvpair_remove( struct nvpair *n, const char *name );
void nvpair_insert_string(struct nvpair *n, const char *name, const char *value);
void nvpair_insert_integer(struct nvpair *n, const char *name, INT64_T value);
void nvpair_insert_float(struct nvpair *n, const char *name, double value);
const char *nvpair_lookup_string(struct nvpair *n, const char *name);
INT64_T nvpair_lookup_integer(struct nvpair *n, const char *name);
double nvpair_lookup_float(struct nvpair *n, const char *name);
void nvpair_export( struct nvpair *nv );
void nvpair_first_item(struct nvpair *nv);
int nvpair_next_item(struct nvpair *nv, char **name, char **value);
#endif
hash_table.h
A general purpose hash table.
nvpair_export
void nvpair_export(struct nvpair *nv)
Export all items in the nvpair to the environment with setenv.
nvpair_print
int nvpair_print(struct nvpair *n, char *text, int length)
Print an nvpair to ASCII text with a limit.
nvpair_next_item
int nvpair_next_item(struct nvpair *nv, char **name, char **value)
Continue iteration over all items.
nvpair_insert_float
void nvpair_insert_float(struct nvpair *n, const char *name, double value)
Insert a property in floating point form.
nvpair_insert_string
void nvpair_insert_string(struct nvpair *n, const char *name, const char *value)
Insert a property in string form.
nvpair_insert_integer
void nvpair_insert_integer(struct nvpair *n, const char *name, INT64_T value)
Insert a property in integer form.
nvpair_remove
void nvpair_remove(struct nvpair *n, const char *name)
Remove a property from an nvpair.
nvpair_print_alloc
int nvpair_print_alloc(struct nvpair *n, char **text)
Print an nvpair to ASCII text, allocating the needed buffer.
nvpair_lookup_integer
INT64_T nvpair_lookup_integer(struct nvpair *n, const char *name)
Lookup a property in integer form.
nvpair_lookup_string
const char * nvpair_lookup_string(struct nvpair *n, const char *name)
Lookup a property in string form.
nvpair_parse_stream
int nvpair_parse_stream(struct nvpair *n, FILE *stream)
Load in an nvpair from a standard I/O stream.
nvpair_parse
void nvpair_parse(struct nvpair *n, const char *text)
Load in an nvpair from ASCII text.
nvpair_lookup_float
double nvpair_lookup_float(struct nvpair *n, const char *name)
Lookup a property in floating point form.
nvpair_create
struct nvpair * nvpair_create()
Create an empty nvpair.
nvpair_first_item
void nvpair_first_item(struct nvpair *nv)
Begin iteration over all items.
nvpair_delete
void nvpair_delete(struct nvpair *n)
Delete an nvpair.
nvpair
Definition nvpair_private.h:15