2001-07-10 18:33:40 +00:00
|
|
|
/*
|
|
|
|
**********************************************************************
|
|
|
|
* Copyright (C) 1997-2001, International Business Machines
|
|
|
|
* Corporation and others. All Rights Reserved.
|
|
|
|
**********************************************************************
|
|
|
|
*
|
|
|
|
* File USCRIPT.C
|
|
|
|
*
|
|
|
|
* Modification History:
|
|
|
|
*
|
|
|
|
* Date Name Description
|
|
|
|
* 07/06/2001 Ram Creation.
|
|
|
|
******************************************************************************
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "unicode/uscript.h"
|
2001-09-11 05:00:34 +00:00
|
|
|
#include "unicode/ures.h"
|
|
|
|
#include "cstring.h"
|
2001-07-10 18:33:40 +00:00
|
|
|
|
2001-09-21 05:09:22 +00:00
|
|
|
#define USCRIPT_CODE_ARRAY_SIZE 440
|
2001-07-10 18:33:40 +00:00
|
|
|
|
2001-09-07 00:54:02 +00:00
|
|
|
static const char kLocaleScript[] = "LocaleScript";
|
|
|
|
|
2001-08-24 00:22:07 +00:00
|
|
|
static const char * const scriptNames[]={
|
2001-09-21 05:09:22 +00:00
|
|
|
"ARABIC", /* USCRIPT_ARABIC */
|
|
|
|
"ARMENIAN", /* USCRIPT_ARMENIAN */
|
|
|
|
"BENGALI", /* USCRIPT_BENGALI */
|
|
|
|
"BOPOMOFO", /* USCRIPT_BOPOMOFO */
|
|
|
|
"CANADIAN-ABORIGINAL", /* USCRIPT_UCAS */
|
|
|
|
"CHEROKEE", /* USCRIPT_CHEROKEE */
|
2001-11-03 03:02:59 +00:00
|
|
|
"COMMON", /* USCRIPT_COMMON */
|
2001-09-21 05:09:22 +00:00
|
|
|
"CYRILLIC", /* USCRIPT_CYRILLIC */
|
|
|
|
"DESERET", /* USCRIPT_DESERET */
|
|
|
|
"DEVANAGARI", /* USCRIPT_DEVANAGARI */
|
|
|
|
"ETHIOPIC", /* USCRIPT_ETHIOPIC */
|
|
|
|
"GEORGIAN", /* USCRIPT_GEORGIAN */
|
|
|
|
"GOTHIC", /* USCRIPT_GOTHIC */
|
|
|
|
"GREEK", /* USCRIPT_GREEK */
|
|
|
|
"GUJARATI", /* USCRIPT_GUJARATI */
|
|
|
|
"GURMUKHI", /* USCRIPT_GURMUKHI */
|
|
|
|
"HAN", /* USCRIPT_HAN */
|
|
|
|
"HANGUL", /* USCRIPT_HANGUL */
|
|
|
|
"HEBREW", /* USCRIPT_HEBREW */
|
|
|
|
"HIRAGANA", /* USCRIPT_HIRAGANA */
|
|
|
|
"INHERITED", /* USCRIPT_INHERITED */
|
|
|
|
"KANNADA", /* USCRIPT_KANNADA */
|
|
|
|
"KATAKANA", /* USCRIPT_KATAKANA */
|
|
|
|
"KHMER", /* USCRIPT_KHMER */
|
|
|
|
"LATIN", /* USCRIPT_LATIN */
|
|
|
|
"MALAYALAM", /* USCRIPT_MALAYALAM */
|
|
|
|
"MONGOLIAN", /* USCRIPT_MONGOLIAN */
|
|
|
|
"MYANMAR", /* USCRIPT_MYANMAR */
|
|
|
|
"OGHAM", /* USCRIPT_OGHAM */
|
|
|
|
"OLD-ITALIC", /* USCRIPT_OLD_ITALIC */
|
|
|
|
"ORIYA", /* USCRIPT_ORIYA */
|
|
|
|
"RUNIC", /* USCRIPT_RUNIC */
|
|
|
|
"SINHALA", /* USCRIPT_SINHALA */
|
|
|
|
"SYRIAC", /* USCRIPT_SYRIAC */
|
|
|
|
"TAMIL", /* USCRIPT_TAMIL */
|
|
|
|
"TELUGU", /* USCRIPT_TELUGU */
|
|
|
|
"THAANA", /* USCRIPT_THANA */
|
|
|
|
"THAI", /* USCRIPT_THAI */
|
|
|
|
"TIBETAN", /* USCRIPT_TIBETAN */
|
|
|
|
"UCAS", /* USCRIPT_UCAS */
|
2002-03-01 01:59:59 +00:00
|
|
|
"YI" /* USCRIPT_YI */
|
2001-07-10 18:33:40 +00:00
|
|
|
};
|
|
|
|
|
2001-08-24 00:22:07 +00:00
|
|
|
static const char * const scriptAbbr[]= {
|
2001-09-11 05:00:34 +00:00
|
|
|
"Arab", /* USCRIPT_ARABIC */
|
|
|
|
"Armn", /* USCRIPT_ARMENIAN */
|
|
|
|
"Beng", /* USCRIPT_BENGALI */
|
|
|
|
"Bopo", /* USCRIPT_BOPOMOFO */
|
|
|
|
"Cans", /* USCRIPT_UCAS */
|
|
|
|
"Cher", /* USCRIPT_CHEROKEE */
|
|
|
|
"Cyrl", /* USCRIPT_CYRILLIC */
|
|
|
|
/* "Cyrs", */ /* USCRIPT_CYRILLIC */
|
|
|
|
"Deva", /* USCRIPT_DEVANAGARI */
|
|
|
|
"Dsrt", /* USCRIPT_DESERET */
|
|
|
|
"Ethi", /* USCRIPT_ETHIOPIC */
|
|
|
|
/* "Geoa", */ /* USCRIPT_GEORGIAN */
|
|
|
|
/* "Geon", */ /* USCRIPT_GEORGIAN */
|
|
|
|
"Geor", /* USCRIPT_GEORGIAN */
|
|
|
|
"Goth", /* USCRIPT_GOTHIC */
|
|
|
|
"Grek", /* USCRIPT_GREEK */
|
|
|
|
"Gujr", /* USCRIPT_GUJARATI */
|
|
|
|
"Guru", /* USCRIPT_GURMUKHI */
|
|
|
|
"Hang", /* USCRIPT_HANGUL */
|
|
|
|
"Hani", /* USCRIPT_HAN */
|
|
|
|
"Hebr", /* USCRIPT_HEBREW */
|
|
|
|
"Hira", /* USCRIPT_HIRAGANA */
|
|
|
|
"Ital", /* USCRIPT_OLD_ITALIC */
|
|
|
|
"Kana", /* USCRIPT_KATAKANA */
|
|
|
|
"Khmr", /* USCRIPT_KHMER */
|
|
|
|
"Knda", /* USCRIPT_KANNADA */
|
|
|
|
"Lao", /* USCRIPT_LAO */
|
|
|
|
/*"Laoo", */ /* USCRIPT_LAO */
|
|
|
|
/*"Latf", */ /* USCRIPT_LATIN */
|
|
|
|
/*"Latg", */ /* USCRIPT_LATIN */
|
|
|
|
"Latn", /* USCRIPT_LATIN */
|
|
|
|
"Mlym", /* USCRIPT_MALAYALAM */
|
|
|
|
"Mong", /* USCRIPT_MONGOLIAN */
|
|
|
|
"Mymr", /* USCRIPT_MYANMAR */
|
|
|
|
"Ogam", /* USCRIPT_OGHAM */
|
|
|
|
"Orya", /* USCRIPT_ORIYA */
|
|
|
|
"Qaac", /* USCRIPT_COPTIC */
|
|
|
|
"Qaai", /* USCRIPT_INHERITED */
|
|
|
|
"Runr", /* USCRIPT_RUNIC */
|
|
|
|
"Sinh", /* USCRIPT_SINHALA */
|
|
|
|
"Syrc", /* USCRIPT_SYRIAC */
|
|
|
|
/* "Syre", */ /* USCRIPT_SYRIAC */
|
|
|
|
/* "Syrj", */ /* USCRIPT_SYRIAC */
|
|
|
|
/* "Syrn", */ /* USCRIPT_SYRIAC */
|
|
|
|
"Taml", /* USCRIPT_TAMIL */
|
|
|
|
"Telu", /* USCRIPT_TELUGU */
|
|
|
|
"Thaa", /* USCRIPT_THANA */
|
|
|
|
"Thai", /* USCRIPT_THAI */
|
|
|
|
"Tibt", /* USCRIPT_TIBETAN */
|
|
|
|
"Yiii", /* USCRIPT_YI */
|
2002-03-01 01:59:59 +00:00
|
|
|
"Zyyy" /* USCRIPT_COMMON */
|
|
|
|
};
|
2001-07-10 18:33:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
static const UScriptCode scriptNameCodes[]= {
|
2001-09-11 05:00:34 +00:00
|
|
|
USCRIPT_ARABIC ,
|
|
|
|
USCRIPT_ARMENIAN ,
|
|
|
|
USCRIPT_BENGALI ,
|
|
|
|
USCRIPT_BOPOMOFO ,
|
2001-09-21 05:09:22 +00:00
|
|
|
USCRIPT_UCAS ,
|
2001-09-11 05:00:34 +00:00
|
|
|
USCRIPT_CHEROKEE ,
|
2001-11-03 03:02:59 +00:00
|
|
|
USCRIPT_COMMON ,
|
2001-09-11 05:00:34 +00:00
|
|
|
USCRIPT_CYRILLIC ,
|
|
|
|
USCRIPT_DESERET ,
|
|
|
|
USCRIPT_DEVANAGARI ,
|
|
|
|
USCRIPT_ETHIOPIC ,
|
|
|
|
USCRIPT_GEORGIAN ,
|
|
|
|
USCRIPT_GOTHIC ,
|
|
|
|
USCRIPT_GREEK ,
|
|
|
|
USCRIPT_GUJARATI ,
|
|
|
|
USCRIPT_GURMUKHI ,
|
|
|
|
USCRIPT_HAN ,
|
|
|
|
USCRIPT_HANGUL ,
|
|
|
|
USCRIPT_HEBREW ,
|
|
|
|
USCRIPT_HIRAGANA ,
|
|
|
|
USCRIPT_INHERITED ,
|
|
|
|
USCRIPT_KANNADA ,
|
|
|
|
USCRIPT_KATAKANA ,
|
|
|
|
USCRIPT_KHMER ,
|
|
|
|
USCRIPT_LATIN ,
|
|
|
|
USCRIPT_MALAYALAM ,
|
|
|
|
USCRIPT_MONGOLIAN ,
|
|
|
|
USCRIPT_MYANMAR ,
|
|
|
|
USCRIPT_OGHAM ,
|
|
|
|
USCRIPT_OLD_ITALIC ,
|
|
|
|
USCRIPT_ORIYA ,
|
|
|
|
USCRIPT_RUNIC ,
|
|
|
|
USCRIPT_SINHALA ,
|
|
|
|
USCRIPT_SYRIAC ,
|
|
|
|
USCRIPT_TAMIL ,
|
|
|
|
USCRIPT_TELUGU ,
|
|
|
|
USCRIPT_THAANA ,
|
|
|
|
USCRIPT_THAI ,
|
|
|
|
USCRIPT_TIBETAN ,
|
|
|
|
USCRIPT_UCAS ,
|
2001-09-21 05:09:22 +00:00
|
|
|
USCRIPT_YI
|
2001-07-10 18:33:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static const UScriptCode scriptAbbrCodes[] = {
|
2001-09-11 05:00:34 +00:00
|
|
|
USCRIPT_ARABIC ,
|
|
|
|
USCRIPT_ARMENIAN ,
|
|
|
|
USCRIPT_BENGALI ,
|
|
|
|
USCRIPT_BOPOMOFO ,
|
|
|
|
USCRIPT_UCAS ,
|
|
|
|
USCRIPT_CHEROKEE ,
|
|
|
|
USCRIPT_CYRILLIC ,
|
|
|
|
/* USCRIPT_CYRILLIC , */
|
|
|
|
USCRIPT_DEVANAGARI ,
|
|
|
|
USCRIPT_DESERET ,
|
|
|
|
USCRIPT_ETHIOPIC ,
|
|
|
|
/* USCRIPT_GEORGIAN , */
|
|
|
|
/* USCRIPT_GEORGIAN , */
|
|
|
|
USCRIPT_GEORGIAN ,
|
|
|
|
USCRIPT_GOTHIC ,
|
|
|
|
USCRIPT_GREEK ,
|
|
|
|
USCRIPT_GUJARATI ,
|
|
|
|
USCRIPT_GURMUKHI ,
|
|
|
|
USCRIPT_HANGUL ,
|
|
|
|
USCRIPT_HAN ,
|
|
|
|
USCRIPT_HEBREW ,
|
|
|
|
USCRIPT_HIRAGANA ,
|
|
|
|
USCRIPT_OLD_ITALIC ,
|
|
|
|
USCRIPT_KATAKANA ,
|
|
|
|
USCRIPT_KHMER ,
|
|
|
|
USCRIPT_KANNADA ,
|
|
|
|
USCRIPT_LAO ,
|
|
|
|
/* USCRIPT_LAO , */
|
|
|
|
/* USCRIPT_LATIN , */
|
|
|
|
/* USCRIPT_LATIN , */
|
|
|
|
USCRIPT_LATIN ,
|
|
|
|
USCRIPT_MALAYALAM ,
|
|
|
|
USCRIPT_MONGOLIAN ,
|
|
|
|
USCRIPT_MYANMAR ,
|
|
|
|
USCRIPT_OGHAM ,
|
|
|
|
USCRIPT_ORIYA ,
|
|
|
|
USCRIPT_COPTIC ,
|
|
|
|
USCRIPT_INHERITED ,
|
|
|
|
USCRIPT_RUNIC ,
|
|
|
|
USCRIPT_SINHALA ,
|
|
|
|
USCRIPT_SYRIAC ,
|
|
|
|
/* USCRIPT_SYRIAC , */
|
|
|
|
/* USCRIPT_SYRIAC , */
|
2001-10-23 02:00:50 +00:00
|
|
|
/* USCRIPT_SYRIAC , */
|
2001-09-11 05:00:34 +00:00
|
|
|
USCRIPT_TAMIL ,
|
|
|
|
USCRIPT_TELUGU ,
|
|
|
|
USCRIPT_THAANA ,
|
|
|
|
USCRIPT_THAI ,
|
|
|
|
USCRIPT_TIBETAN ,
|
|
|
|
USCRIPT_YI ,
|
2002-03-01 01:59:59 +00:00
|
|
|
USCRIPT_COMMON
|
2001-09-21 05:09:22 +00:00
|
|
|
};
|
|
|
|
|
2001-07-10 18:33:40 +00:00
|
|
|
/* binary search the string array */
|
2001-09-21 05:09:22 +00:00
|
|
|
U_INLINE static int
|
2001-08-24 00:22:07 +00:00
|
|
|
findStringIndex(const char* const *sortedArr, const char* target, int size){
|
2001-07-11 23:50:24 +00:00
|
|
|
int left, middle, right,rc;
|
2001-07-10 18:33:40 +00:00
|
|
|
left =0;
|
|
|
|
right= size-1;
|
2001-07-11 23:50:24 +00:00
|
|
|
|
2001-07-10 18:33:40 +00:00
|
|
|
while(left <= right){
|
|
|
|
middle = (left+right)/2;
|
2001-07-11 23:50:24 +00:00
|
|
|
rc=uprv_stricmp(sortedArr[middle],target);
|
|
|
|
if(rc<0){
|
2001-07-10 18:33:40 +00:00
|
|
|
left = middle+1;
|
2001-07-11 23:50:24 +00:00
|
|
|
}else if(rc >0){
|
2001-07-10 18:33:40 +00:00
|
|
|
right = middle -1;
|
2001-07-11 23:50:24 +00:00
|
|
|
}else{
|
2001-07-10 18:33:40 +00:00
|
|
|
return middle;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return -1;
|
|
|
|
}
|
2001-09-21 05:09:22 +00:00
|
|
|
|
2001-07-10 18:33:40 +00:00
|
|
|
/*
|
|
|
|
static int
|
|
|
|
findCodeIndex(const UScriptCode sorted[], const UScriptCode target, int size){
|
|
|
|
int left, middle, right;
|
|
|
|
left =0;
|
|
|
|
right= size-1;
|
|
|
|
while(left <= right){
|
|
|
|
middle = (left+right)/2;
|
|
|
|
if(sorted[middle] < target){
|
|
|
|
left=middle+1;
|
|
|
|
}else if(sorted[middle]>target){
|
|
|
|
right=middle-1;
|
|
|
|
}else{
|
|
|
|
return middle;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
/* linearly search the array and return the index */
|
2001-09-21 05:09:22 +00:00
|
|
|
U_INLINE static int
|
2001-07-10 18:33:40 +00:00
|
|
|
findCodeIndex(const UScriptCode unsorted[], const UScriptCode target, int size){
|
|
|
|
int i=0;
|
|
|
|
while(i<size){
|
|
|
|
if(target == unsorted[i]){
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2001-11-21 01:02:11 +00:00
|
|
|
U_CAPI int32_t U_EXPORT2
|
2001-10-23 02:00:50 +00:00
|
|
|
uscript_getCode(const char* nameOrAbbrOrLocale,
|
|
|
|
UScriptCode* fillIn,
|
|
|
|
int32_t capacity,
|
|
|
|
UErrorCode* err){
|
|
|
|
|
2001-09-11 05:00:34 +00:00
|
|
|
UScriptCode code = USCRIPT_INVALID_CODE;
|
2001-08-17 00:24:58 +00:00
|
|
|
int strIndex=0;
|
2001-10-23 02:00:50 +00:00
|
|
|
int32_t numFilled=0;
|
|
|
|
int32_t len=0;
|
2001-07-10 18:33:40 +00:00
|
|
|
/* check arguments */
|
|
|
|
if(U_FAILURE(*err)){
|
2001-10-23 02:00:50 +00:00
|
|
|
return numFilled;
|
2001-07-10 18:33:40 +00:00
|
|
|
}
|
|
|
|
/* try the Names array first */
|
2002-03-01 01:59:59 +00:00
|
|
|
strIndex = findStringIndex(scriptNames, nameOrAbbrOrLocale, sizeof(scriptNames)/sizeof(*scriptNames));
|
2001-07-10 18:33:40 +00:00
|
|
|
|
2002-03-01 01:59:59 +00:00
|
|
|
if(strIndex>=0){
|
2001-08-17 00:24:58 +00:00
|
|
|
code = (UScriptCode) scriptNameCodes[strIndex];
|
2001-10-23 02:00:50 +00:00
|
|
|
len = 1;
|
2001-07-10 18:33:40 +00:00
|
|
|
}
|
|
|
|
/* we did not find in names array so try abbr array*/
|
2001-09-11 05:00:34 +00:00
|
|
|
if(code ==USCRIPT_INVALID_CODE){
|
2002-03-01 01:59:59 +00:00
|
|
|
strIndex = findStringIndex(scriptAbbr, nameOrAbbrOrLocale, sizeof(scriptAbbr)/sizeof(*scriptAbbr));
|
|
|
|
if(strIndex>=0){
|
2001-08-17 00:24:58 +00:00
|
|
|
code = (UScriptCode) scriptAbbrCodes[strIndex];
|
2001-10-23 02:00:50 +00:00
|
|
|
len = 1;
|
2001-07-10 18:33:40 +00:00
|
|
|
}
|
|
|
|
}
|
2001-10-23 02:00:50 +00:00
|
|
|
|
2001-07-10 18:33:40 +00:00
|
|
|
/* we still haven't found it try locale */
|
2001-09-11 05:00:34 +00:00
|
|
|
if(code==USCRIPT_INVALID_CODE){
|
2001-07-10 18:33:40 +00:00
|
|
|
UResourceBundle* resB = ures_open(u_getDataDirectory(),nameOrAbbrOrLocale,err);
|
2001-08-02 16:44:21 +00:00
|
|
|
if(U_SUCCESS(*err)&& *err != U_USING_DEFAULT_ERROR){
|
2001-09-07 00:54:02 +00:00
|
|
|
UResourceBundle* resD = ures_getByKey(resB,kLocaleScript,NULL,err);
|
2001-07-10 18:33:40 +00:00
|
|
|
int index =0;
|
2001-08-02 16:44:21 +00:00
|
|
|
if(U_SUCCESS(*err) ){
|
2001-10-23 02:00:50 +00:00
|
|
|
len =0;
|
|
|
|
while(ures_hasNext(resD)){
|
|
|
|
const UChar* name = ures_getNextString(resD,&len,NULL,err);
|
|
|
|
if(U_SUCCESS(*err)){
|
|
|
|
char cName[50] = {'\0'};
|
|
|
|
u_UCharsToChars(name,cName,len);
|
2002-03-01 01:59:59 +00:00
|
|
|
index = findStringIndex(scriptAbbr, cName, sizeof(scriptAbbr)/sizeof(*scriptAbbr));
|
2001-10-23 02:00:50 +00:00
|
|
|
code = (UScriptCode) scriptAbbrCodes[index];
|
|
|
|
/* got the script code now fill in the buffer */
|
|
|
|
if(numFilled<=capacity){
|
|
|
|
*(fillIn)++=code;
|
|
|
|
numFilled++;
|
|
|
|
}else{
|
2001-10-27 00:15:39 +00:00
|
|
|
ures_close(resD);
|
|
|
|
ures_close(resB);
|
2001-10-23 02:00:50 +00:00
|
|
|
*err=U_BUFFER_OVERFLOW_ERROR;
|
|
|
|
return len;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2001-07-10 18:33:40 +00:00
|
|
|
}
|
|
|
|
ures_close(resD);
|
|
|
|
|
|
|
|
}
|
|
|
|
ures_close(resB);
|
2001-10-23 02:00:50 +00:00
|
|
|
}else{
|
|
|
|
/* we found it */
|
|
|
|
if(numFilled<=capacity){
|
|
|
|
*(fillIn)++=code;
|
|
|
|
numFilled++;
|
|
|
|
}else{
|
|
|
|
*err=U_BUFFER_OVERFLOW_ERROR;
|
|
|
|
return len;
|
|
|
|
}
|
2001-07-10 18:33:40 +00:00
|
|
|
}
|
2001-10-23 02:00:50 +00:00
|
|
|
return numFilled;
|
2001-07-10 18:33:40 +00:00
|
|
|
}
|
|
|
|
|
2001-11-21 01:02:11 +00:00
|
|
|
U_CAPI const char* U_EXPORT2
|
2001-09-11 05:00:34 +00:00
|
|
|
uscript_getName(UScriptCode scriptCode){
|
2001-07-10 18:33:40 +00:00
|
|
|
int index = -1;
|
2001-09-11 05:00:34 +00:00
|
|
|
if(scriptCode > USCRIPT_CODE_LIMIT){
|
2001-07-10 18:33:40 +00:00
|
|
|
return "";
|
|
|
|
}
|
2002-03-01 01:59:59 +00:00
|
|
|
index = findCodeIndex(scriptNameCodes,scriptCode,sizeof(scriptNameCodes)/sizeof(*scriptNameCodes));
|
2001-07-10 18:33:40 +00:00
|
|
|
if(index >=0){
|
|
|
|
return scriptNames[index];
|
|
|
|
}else{
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2001-11-21 01:02:11 +00:00
|
|
|
U_CAPI const char* U_EXPORT2
|
2001-09-11 05:00:34 +00:00
|
|
|
uscript_getShortName(UScriptCode scriptCode){
|
2001-07-10 18:33:40 +00:00
|
|
|
int index = -1;
|
2001-09-11 05:00:34 +00:00
|
|
|
if(scriptCode > USCRIPT_CODE_LIMIT){
|
2001-07-10 18:33:40 +00:00
|
|
|
return "";
|
|
|
|
}
|
2002-03-01 01:59:59 +00:00
|
|
|
index = findCodeIndex(scriptAbbrCodes,scriptCode,sizeof(scriptAbbrCodes)/sizeof(*scriptAbbrCodes));
|
2001-07-10 18:33:40 +00:00
|
|
|
if(index >=0){
|
|
|
|
return scriptAbbr[index];
|
|
|
|
}else{
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
}
|