10
#include <libpsio/psio.h>
13
** char *chkpt_rd_prefix()
14
** Reads the global default chkpt prefix keyword stored in the CHKPT file.
16
** returns: the prefix string
20
char *chkpt_rd_prefix(void)
24
prefix = (char *) malloc(CHKPT_PREFIX_LEN*sizeof(char));
26
psio_read_entry(PSIF_CHKPT, "Default prefix", prefix, CHKPT_PREFIX_LEN*sizeof(char));
32
** void chkpt_wt_prefix()
33
** Writes the global default chkpt prefix keyword.
35
** \param prefix = the prefix string (must be CHKPT_PREFIX_LEN long)
40
void chkpt_wt_prefix(char *prefix)
42
psio_write_entry(PSIF_CHKPT, "Default prefix", prefix, CHKPT_PREFIX_LEN*sizeof(char));
47
** void chkpt_set_prefix()
48
** Sets the default chkpt prefix in global memory. After this is set,
49
** it is intended that all chkpt_rd_() and chkpt_wt_() calls will use
50
** this prefix for psio keyword strings.
52
** \param prefix = the prefix string
57
void chkpt_set_prefix(char *prefix)
59
strcpy(chkpt_prefix, prefix);
63
** void chkpt_commit_prefix()
64
** Writes the default chkpt prefix from global memory into the chkpt file.
71
void chkpt_commit_prefix(void)
73
chkpt_wt_prefix(chkpt_prefix);
77
** void chkpt_reset_prefix()
78
** Sets the chkpt prefix in global memory back to its default. At
79
** present this is a null string.
86
void chkpt_reset_prefix(void)
88
chkpt_prefix[0] = '\0';
92
** char * chkpt_get_prefix()
93
** Returns a copy of the current chkpt prefix default stored
98
** returns: prefix = the current global prefix
101
char *chkpt_get_prefix(void)
105
prefix = (char *) malloc(CHKPT_PREFIX_LEN*sizeof(char));
107
strcpy(prefix,chkpt_prefix);