src/gedlib/dbcontext.c
/*==================================================
 * open_database -- open database
 *  forceopen:    [in] flag to override reader/writer protection
 *  dbpath:       [in] database path to open
 *================================================*/
- open database
forceopen:    [in] flag to override reader/writer protection
dbpath:       [in] database path to open
- open database forceopen : [ in ] flag to override reader / writer protection dbpath : [ in ] database path to open
BOOLEAN
open_database (INT alteration, STRING dbpath, INT *lldberr)
{
	LLDATABASE lldb = lldb_alloc();
	BOOLEAN rtn = FALSE;
	char fpath[MAXPATHLEN];
	strupdate(&readpath_file, lastpathname(dbpath));
	llstrncpy(fpath, dbpath, sizeof(fpath), 0);
	expand_special_fname_chars(fpath, sizeof(fpath), uu8);
	strupdate(&readpath, fpath);
	if (f_dbnotify)
		(*f_dbnotify)(readpath, TRUE);
	rtn = open_database_impl(lldb, alteration, lldberr);
	if (!rtn) {
		int myerr = *lldberr;
		lldb_close(&lldb);
		*lldberr = myerr;
	}
	def_lldb = lldb;
	return rtn;
}
BOOLEAN open_database ( INT alteration , STRING dbpath , INT * lldberr ) { LLDATABASE lldb = lldb_alloc ( ) ; BOOLEAN rtn = FALSE ; char fpath [ MAXPATHLEN ] ; strupdate ( & readpath_file , lastpathname ( dbpath ) ) ; llstrncpy ( fpath , dbpath , sizeof ( fpath ) , 0 ) ; expand_special_fname_chars ( fpath , sizeof ( fpath ) , uu8 ) ; strupdate ( & readpath , fpath ) ; if ( f_dbnotify ) ( * f_dbnotify ) ( readpath , TRUE ) ; rtn = open_database_impl ( lldb , alteration , lldberr ) ; if ( ! rtn ) { int myerr = * lldberr ; lldb_close ( & lldb ) ; * lldberr = myerr ; } def_lldb = lldb ; return rtn ; }
open_database -- open database
  forceopen:    [in] flag to override reader/writer protection
  dbpath:       [in] database path to open
open_database -- open database forceopen : [ in ] flag to override reader / writer protection dbpath : [ in ] database path to open
/* tentatively copy paths into gedlib module versions */ /* open failed so clean up, preserve lldberr */