55 |
* r) temporary file name |
* r) temporary file name |
56 |
*/ |
*/ |
57 |
static const char * |
static const char * |
58 |
get_tmpfile(uniq) |
get_tmpfile(int uniq) |
|
int uniq; |
|
59 |
{ |
{ |
60 |
static char path[MAXPATHLEN]; |
static char path[MAXPATHLEN]; |
61 |
int pid = getpid(); |
int pid = getpid(); |
71 |
* r) descriptor |
* r) descriptor |
72 |
*/ |
*/ |
73 |
ASSOC * |
ASSOC * |
74 |
assoc_open(c) |
assoc_open(int c) |
|
int c; |
|
75 |
{ |
{ |
76 |
ASSOC *assoc = (ASSOC *)malloc(sizeof(ASSOC)); |
ASSOC *assoc = (ASSOC *)malloc(sizeof(ASSOC)); |
77 |
const char *tmpfile = get_tmpfile(c); |
const char *tmpfile = get_tmpfile(c); |
90 |
* i) assoc descriptor |
* i) assoc descriptor |
91 |
*/ |
*/ |
92 |
void |
void |
93 |
assoc_close(assoc) |
assoc_close(ASSOC *assoc) |
|
ASSOC *assoc; |
|
94 |
{ |
{ |
95 |
if (assoc == NULL) |
if (assoc == NULL) |
96 |
return; |
return; |
107 |
* i) value value |
* i) value value |
108 |
*/ |
*/ |
109 |
void |
void |
110 |
assoc_put(assoc, name, value) |
assoc_put(ASSOC *assoc, const char *name, const char *value) |
|
ASSOC *assoc; |
|
|
const char *name; |
|
|
const char *value; |
|
111 |
{ |
{ |
112 |
if (assoc->dbop == NULL) |
if (assoc->dbop == NULL) |
113 |
abort(); |
abort(); |
121 |
* r) value |
* r) value |
122 |
*/ |
*/ |
123 |
const char * |
const char * |
124 |
assoc_get(assoc, name) |
assoc_get(ASSOC *assoc, const char *name) |
|
ASSOC *assoc; |
|
|
const char *name; |
|
125 |
{ |
{ |
126 |
if (assoc->dbop == NULL) |
if (assoc->dbop == NULL) |
127 |
abort(); |
abort(); |