Go to the source code of this file.
◆ dbClose()
Definition at line 319 of file sing_dbm.cc.
320{
322
328}
#define omFreeSize(addr, size)
#define SI_LINK_SET_CLOSE_P(l)
◆ dbOpen()
Definition at line 282 of file sing_dbm.cc.
283{
284 const char *mode = "r";
286 int dbm_flags = O_RDONLY | O_CREAT;
287
289 && ((
l->mode[0]==
'w')||(
l->mode[1]==
'w')))
290 {
291 dbm_flags = O_RDWR | O_CREAT;
292 mode = "rw";
294 }
296 {
297
299 }
300
301
304 {
308 else
310 l->data=(
void *)(db);
314 }
316}
DBM * dbm_open(char *file, int flags, int mode)
#define omFreeBinAddr(addr)
#define SI_LINK_SET_R_OPEN_P(l)
#define SI_LINK_SET_RW_OPEN_P(l)
◆ dbRead1()
Definition at line 378 of file sing_dbm.cc.
379{
381}
LINKAGE leftv dbRead2(si_link l, leftv key)
◆ dbRead2()
Definition at line 332 of file sing_dbm.cc.
333{
337
339 {
341 {
343 d_key.dsize = strlen(d_key.dptr)+1;
349 }
350 else
351 {
352 WerrorS(
"read(`DBM link`,`string`) expected");
353 }
354 }
355 else
356 {
359 else
361
365 {
368 }
369 else
370 {
373 }
374
375 }
377}
Class used for (list of) interpreter objects.
const Variable & v
< [in] a sqrfree bivariate poly
void WerrorS(const char *s)
EXTERN_VAR omBin sleftv_bin
datum dbm_fetch(DBM *db, datum key)
datum dbm_nextkey(DBM *db)
datum dbm_firstkey(DBM *db)
◆ dbWrite()
Definition at line 383 of file sing_dbm.cc.
384{
387 int ret;
388
389
391 {
393 {
395 {
397
398 d_key.
dptr = (
char *)key->Data();
403 if(!ret )
405 else
406 {
408 {
409 Werror(
"DBM link I/O error. Is '%s' readonly?",
l->name);
411 }
412 }
413 }
414 }
415 else
416 {
418
419 d_key.
dptr = (
char *)key->Data();
423 }
424 }
425 else
426 {
427 WerrorS(
"write(`DBM link`,`key string` [,`data string`]) expected");
428 }
430}
int dbm_store(DBM *db, datum key, datum dat, int replace)
int dbm_delete(DBM *db, datum key)
void Werror(const char *fmt,...)