D_MAPCHAR
SUMMARY
d_mapchar(inchar,outchar,sort_as,subsort)
unsigned char inchar;
unsigned char outchar;
unsigned char subsort;
char *sort_as;
ARGUMENTS
inchar Value of character to be mapped.
outchar Output(displayed)character.
sort_as A pointer to a string containing sort_as characters.
subsort Value to distinguish between two equal sort_as values.
DESCRIPTION
Function d_mapchar modifies the entries in a country-table for value
inchar.The country-table is used for sorting of key fields and for the
output in some db_VISTA utilities(e.g.ida).If functions d_mapchar is
called for the first time ,the country table is placed into memory and
initialized.The table may be made case-insensitive by calling d_on_opt
with the IGNORECASE flag.if outchar is '\0',then inchar is stored
without modification in the database.Otherwise the content of outchar
is stored.This can be used for the mapping of &-bit values to 8-bit values
(e.g.necessary on UNIX systems).The string sort_as is limited to two
bytes.It can contain the value(s) with which inchar should be stored.
You can either sort by on or two character strings.The subsort value
must be used if you want to differentiate between two equal sort values.
───────────────────────────────────────────────────────────────────
NOTE
If you use a sorting table that is different from the standart 7-bit
ASCII sorting ,you must continue to use this sorting ,unless you
rebuild the key files with keybuild utility and a vista.ctb file
matching the new mapping.Stored sets cannot be changed later.Once a
database is built,it is best not to change its mappings.
───────────────────────────────────────────────────────────────────
CURRENCY CHANGES
None
RETURN CODES
-47 S_INVSORT Invalid sort string value (length>2)
-904 S_NOMEMORY No memory to install country table
EXAMPLE
...
/* Initialize country table for Gremany */
d_on_opt(IGNORECASE);
d_mapchar('Ä','Ä',"AE",0);
d_mapchar('ä','ä',"AE",0);
d_mapchar('Ü','Ü',"UE",0);
d_mapchar('ü','ü',"UE",0);
d_mapchar('Ö','Ö',"OE",0);
d_mapchar('ö','ö',"OE",0);
d_mapchar('ß','ß',"SS",0);
d_open("tims","s");
...