src/gedlib/charmaps.c
/*===================================================
 * init_map_from_rec -- Init single translation table
 *  indx:  [IN]  which translation table (see defn of map_keys)
 *  ptt:   [OUT] new translation table, if created
 * Returns FALSE if error
 * But if no tt found, *ptt=0 and returns TRUE.
 *=================================================*/
- Init single translation table
indx:  [IN]  which translation table
ptt:   [OUT] new translation table, if created
Returns FALSE if error
But if no tt found, *ptt=0 and returns TRUE.
- Init single translation table indx : [ IN ] which translation table ptt : [ OUT ] new translation table if created Returns FALSE if error But if no tt found * ptt = 0 and returns TRUE .
BOOLEAN
init_map_from_rec (CNSTRING key, INT trnum, TRANTABLE * ptt)
{
	STRING rawrec=0;
	INT len;
	BOOLEAN ok;
	ZSTR zerr=0;
	CNSTRING mapname = transl_get_map_name(trnum);
	*ptt = 0;
	if (!(rawrec = retrieve_raw_record(key, &len)))
		return TRUE;
	zerr = zs_new();
	ok = init_map_from_str(rawrec, mapname, ptt, zerr);
	stdfree(rawrec);
	if (!ok)
		maperror(zs_str(zerr));
	zs_free(&zerr);
	return ok;
}
BOOLEAN init_map_from_rec ( CNSTRING key , INT trnum , TRANTABLE * ptt ) { STRING rawrec = 0 ; INT len ; BOOLEAN ok ; ZSTR zerr = 0 ; CNSTRING mapname = transl_get_map_name ( trnum ) ; * ptt = 0 ; if ( ! ( rawrec = retrieve_raw_record ( key , & len ) ) ) return TRUE ; zerr = zs_new ( ) ; ok = init_map_from_str ( rawrec , mapname , ptt , zerr ) ; stdfree ( rawrec ) ; if ( ! ok ) maperror ( zs_str ( zerr ) ) ; zs_free ( & zerr ) ; return ok ; }
init_map_from_rec -- Init single translation table
  indx:  [IN]  which translation table (see defn of map_keys)
  ptt:   [OUT] new translation table, if created
 Returns FALSE if error
 But if no tt found, *ptt=0 and returns TRUE.
init_map_from_rec -- Init single translation table indx : [ IN ] which translation table ( see defn of map_keys ) ptt : [ OUT ] new translation table if created Returns FALSE if error But if no tt found * ptt = 0 and returns TRUE .