-int get_firstkey(hostname, hostname_size, diskname, diskname_size)
-char *hostname, *diskname;
-int hostname_size, diskname_size;
-{
-#ifdef TEXTDB
- assert(0);
- return 0;
-#else
- datum k;
- int rc;
- char *s, *fp;
- int ch;
-
- k = dbm_firstkey(infodb);
- if(k.dptr == NULL) return 0;
-
- s = k.dptr;
- ch = *s++;
-
- skip_whitespace(s, ch);
- if(ch == '\0') return 0;
- fp = hostname;
- while(ch && ch != ':') {
- if(fp >= hostname+hostname_size-1) {
- fp = NULL;
- break;
- }
- *fp = ch;
- ch = *s++;
- }
- if(fp == NULL) return 0;
- *fp = '\0';
-
- if(ch != ':') return 0;
- ch = *s++;
- copy_string(s, ch, diskname, diskname_size, fp);
- if(fp == NULL) return 0;
-
- return 1;
-#endif
-}
-
-
-int get_nextkey(hostname, hostname_size, diskname, diskname_size)
-char *hostname, *diskname;
-int hostname_size, diskname_size;
-{
-#ifdef TEXTDB
- assert(0);
- return 0;
-#else
- datum k;
- int rc;
- char *s, *fp;
- int ch;
-
- k = dbm_nextkey(infodb);
- if(k.dptr == NULL) return 0;
-
- s = k.dptr;
- ch = *s++;
-
- skip_whitespace(s, ch);
- if(ch == '\0') return 0;
- fp = hostname;
- while(ch && ch != ':') {
- if(fp >= hostname+hostname_size-1) {
- fp = NULL;
- break;
- }
- *fp = ch;
- ch = *s++;
- }
- if(fp == NULL) return 0;
- *fp = '\0';
-
- if(ch != ':') return 0;
- ch = *s++;
- copy_string(s, ch, diskname, diskname_size, fp);
- if(fp == NULL) return 0;
-
- return 1;
-#endif
-}
-
-
-int put_info(hostname, diskname, info)
- char *hostname, *diskname;
- info_t *info;