SparrowOSTS_121127.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:45:28 +02:00
1 parent 0e9364ff4c
commit e57428affb
1218 files changed
+247142 -165507

No files matched your search

+64
View File
@@ -0,0 +1,64 @@
U8 char_map[26]="22233344455566677778889999";
/*
Fmt of word list entry:
U8 WSD_WORD_CHAR
U8 word[] with terminating zero
I16 block; //definition offset in ::/SparrowOS/Adam/WordStat/WSDefs.DAT
*/
U0 PhoneNumWords(U8 *num)
{
U8 ch,*_num=StrNew(num),*dst=_num,
*dict=ws_dict_word_list,*st,*src;
while (*num) {
if ('0'<=*num<='9')
*dst++=*num;
num++;
}
*dst=0;
while (*dict++) {
if (StrLen(dict)>2) {
dst=st=StrNew(dict);
while (ch=ToUpper(*dst)) {
if ('A'<=ch<='Z')
*dst=char_map[ch-'A'];
else
*dst=CH_SPACE;
dst++;
}
*dst=0;
src=_num;
while (*src) {
if (!StrNCmp(st,src,StrLen(st))) {
ch=*src;
*src=0;
"" _num;
*src=ch;
"$$FG,GREEN$$%s$$FG$$",dict;
"" src+StrLen(st);
NewLine;
}
src++;
}
Free(st);
}
dict+=StrLen(dict)+3;
}
Free(_num);
NewLine;
}
U0 PNWDemo()
{
U8 *st;
while ((st=PmtStr("Phone Num:")) && *st) {
PhoneNumWords(st);
Free(st);
}
Free(st);
}
PNWDemo;