src/gedlib/editmap.c
/*==============================================
 * edit_mapping -- Edit character mapping record
 *  code: [in] which translation table (see defn of map_keys)
 *============================================*/
- Edit character mapping record
code: [in] which translation table
- Edit character mapping record code : [ in ] which translation table
BOOLEAN
edit_mapping (INT trnum)
{
	BOOLEAN rtn=FALSE;
	ZSTR zstr=zs_new();
	if (trnum < 0 || trnum >= NUM_TT_MAPS) {
		msg_error("%s", _(qSbadttnum));
		goto end_edit_mapping;
	}
	if (readonly) {
		msg_error("%s", _(qSronlye));
		goto end_edit_mapping;
	}
	unlink(editfile);
	if (transl_get_legacy_tt(trnum)) {
		if (!save_tt_to_file(trnum, editfile)) {
			msg_error("%s", _(qSdataerr));
			goto end_edit_mapping;
		}
	}
	do_edit();
	while (TRUE) {
		if (load_new_tt(editfile, trnum)) {
			rtn = TRUE;
			goto end_edit_mapping;
		}
		zs_apps(zstr,_(qScmperr));
		zs_appc(zstr, ' ');
		zs_appf(zstr, _(qSsepch), "<tab>"); 
		if (ask_yes_or_no_msg(zs_str(zstr), _(qSaredit)))
			do_edit();
		else {
			goto end_edit_mapping;
		}
	}
end_edit_mapping:
	zs_free(&zstr);
	return rtn;
}
BOOLEAN edit_mapping ( INT trnum ) { BOOLEAN rtn = FALSE ; ZSTR zstr = zs_new ( ) ; if ( trnum < 0 || trnum >= NUM_TT_MAPS ) { msg_error ( " " , _ ( qSbadttnum ) ) ; goto end_edit_mapping ; } if ( readonly ) { msg_error ( " " , _ ( qSronlye ) ) ; goto end_edit_mapping ; } unlink ( editfile ) ; if ( transl_get_legacy_tt ( trnum ) ) { if ( ! save_tt_to_file ( trnum , editfile ) ) { msg_error ( " " , _ ( qSdataerr ) ) ; goto end_edit_mapping ; } } do_edit ( ) ; while ( TRUE ) { if ( load_new_tt ( editfile , trnum ) ) { rtn = TRUE ; goto end_edit_mapping ; } zs_apps ( zstr , _ ( qScmperr ) ) ; zs_appc ( zstr , ' ' ) ; zs_appf ( zstr , _ ( qSsepch ) , " " ) ; if ( ask_yes_or_no_msg ( zs_str ( zstr ) , _ ( qSaredit ) ) ) do_edit ( ) ; else { goto end_edit_mapping ; } } end_edit_mapping : zs_free ( & zstr ) ; return rtn ; }
edit_mapping -- Edit character mapping record
  code: [in] which translation table (see defn of map_keys)
edit_mapping -- Edit character mapping record code : [ in ] which translation table ( see defn of map_keys )
/* (separator is %s) */