16 dbm=dbm_open(
Getstring(argv[0])->c.str.chars,
26 dbm_close(ckintval(argv[0]));
38 key.dsize=strlength(s);
39 content=dbm_fetch(ckintval(argv[0]), key);
40 if (content.dptr==
NULL)
return(
NIL);
41 return(
makestring(content.dptr,content.dsize));}
52 key.dsize=strlength(s);
55 content.dsize=strlength(s);
56 n=dbm_store(ckintval(argv[0]), key, content, ckintval(argv[3]));
57 return((n==0)?
T:
NIL);}
68 key.dsize=strlength(s);
69 n=dbm_delete(ckintval(argv[0]), key);
70 return((n==0)?
T:
NIL);}
78 key=dbm_firstkey(ckintval(argv[0]));
79 if (key.dptr==
NULL)
return(
NIL);
88 key=dbm_nextkey(ckintval(argv[0]));
89 if (key.dptr==
NULL)
return(
NIL);
97 n=dbm_error((DBM *)ckintval(argv[0]));
98 return((n==0)?
T:
NIL);}
105 dbm_clearerr((DBM *)ckintval(argv[0]));
pointer DBM_CLOSE(context *ctx, int n, argv)
pointer DBM_STORE(context *ctx, int n, argv)
defun("ADR_TO_STRING", mod, ADR_TO_STRING)
pointer DBM_OPEN(context *ctx, int n, argv)
pointer DBM_NEXTKEY(context *ctx, int n, argv)
static void key(unsigned char c, int x, int y)
ndbm(context *ctx, int n, pointer argv[])
pointer DBM_FETCH(context *ctx, int n, argv)
pointer DBM_FIRSTKEY(context *ctx, int n, argv)
pointer makestring(char *, int)
pointer DBM_ERROR(context *ctx, int n, argv)
pointer DBM_DELETE(context *ctx, int n, argv)
pointer DBM_CLEARERR(context *ctx, int n, argv)