Home | History | Annotate | Line # | Download | only in global
      1 /*	$NetBSD: nbdb_util.h,v 1.2 2026/05/09 18:49:16 christos Exp $	*/
      2 
      3 #ifndef _NBDB_UTIL_H_INCLUDED_
      4 #define _NBDB_UTIL_H_INCLUDED_
      5 
      6 /*++
      7 /* NAME
      8 /*	nbdb_util 3h
      9 /* SUMMARY
     10 /*	Non-Berkeley-DB migration utilities
     11 /* SYNOPSIS
     12 /*	#include <nbdb_util.h>
     13 /* DESCRIPTION
     14 /* .nf
     15 
     16  /*
     17 Utility library. */
     18 #include <dict.h>
     19 
     20  /*
     21   * External API.
     22   */
     23 #define NBDB_STAT_OK	0
     24 #define NBDB_STAT_ERROR	1
     25 
     26 extern int nbdb_level;
     27 extern bool nbdb_reindexing_lockout;
     28 
     29 extern void nbdb_util_init(const char *);
     30 extern int nbdb_is_legacy_type(const char *);
     31 extern const char *nbdb_find_non_leg_suffix(const char *);
     32 extern const char *nbdb_map_leg_type(const char *, const char *,
     33 				        const DICT_OPEN_INFO **, VSTRING *);
     34 
     35 #define NBDB_LEGACY_SUFFIX	".db"
     36 
     37  /*
     38   * Migration level internal forms.
     39   */
     40 #define NBDB_LEV_CODE_ERROR	(-1)
     41 #define NBDB_LEV_CODE_NONE	(0)
     42 #define NBDB_LEV_CODE_REDIRECT	(1)
     43 #define NBDB_LEV_CODE_REINDEX	(2)
     44 
     45 /* LICENSE
     46 /* .ad
     47 /* .fi
     48 /*	The Secure Mailer license must be distributed with this software.
     49 /* AUTHOR(S)
     50 /*	Wietse Venema
     51 /*	porcupine.org
     52 /*--*/
     53 
     54 #endif
     55