ΕΕΛ/ΛΑΚ - Λίστες Ταχυδρομείου

Re: OpenOffice.org patch για ελληνικά

  • Subject: Re: OpenOffice.org patch για ελληνικά
  • From: Alexios Zavras <zvr [ at ] pobox [ dot ] com>
  • Date: Fri, 14 Jan 2005 10:53:16 +0200
Michalis Kabrianis wrote [edited]:
> Εν όψει της έκδοσης 2.0, έχει ζητηθεί από τους openoffice.org developers 
> ένα patch που θα λύνει το πρόβλημα.
> Σχετικό issue:
> http://qa.openoffice.org/issues/show_bug.cgi?id=28241
> 
> Το patch είναι αρκετά απλό για κάποιον που ξέρει λίγη C ή C++ (ένα case 
> statement)

Ayto poy eida egw sth selida me to issue (kai einai to
	http://www.openoffice.org/nonav/issues/showattachment.cgi/14702/OOo_111_source-do-not-export-chars-as-html-entities.diff.gz
den eixe case statement, alla ena if me 49 strcmp!
Yikes!  Den to kanete pio efficient ?
An pragmatika thelete na elegxete string representations,
petakste to mesa apo gperf (mia prosthesh kai 3-4 table lookups).
Attached o kwdikas (mazemenos -- profanws de xreiazetai toso... :-)

Ektos ki an milame gia allo patch...

-- 
-- zvr --
--  +---------------------------+       Alexios Zavras (-zvr-)
    | H eytyxia den exei enoxes |       zvr [ at ] pobox [ dot ] com
    +-----------------------zvr-+
#if !((' ' ==32)&&('!'==33)&&('"'==34)&&('#'==35)&&('%'==37)&&('&'==38)&&('\''==\
39)&&('('==40)&&(')'==41)&&('*'==42)&&('+'==43)&&(','==44)&&('-'==45)&&('.'==46)\
&&('/'==47)&&('0'==48)&&('1'==49)&&('2'==50)&&('3'==51)&&('4'==52)&&('5'==53)&&(\
'6'==54)&&('7'==55)&&('8'==56)&&('9'==57)&&(':'==58)&&(';'==59)&&('<'==60)&&('='\
==61)&&('>'==62)&&('?'==63)&&('A'==65)&&('B'==66)&&('C'==67)&&('D'==68)&&('E'==\
69)&&('F'==70)&&('G'==71)&&('H'==72)&&('I'==73)&&('J'==74)&&('K'==75)&&('L'==76)\
&&('M'==77)&&('N'==78)&&('O'==79)&&('P'==80)&&('Q'==81)&&('R'==82)&&('S'==83)&&(\
'T'==84)&&('U'==85)&&('V'==86)&&('W'==87)&&('X'==88)&&('Y'==89)&&('Z'==90)&&('['\
==91)&&('\\'==92)&&(']'==93)&&('^'==94)&&('_'==95)&&('a'==97)&&('b'==98)&&('c'==\
99)&&('d'==100)&&('e'==101)&&('f'==102)&&('g'==103)&&('h'==104)&&('i'==105)&&(\
'j'==106)&&('k'==107)&&('l'==108)&&('m'==109)&&('n'==110)&&('o'==111)&&('p'==112\
)&&('q'==113)&&('r'==114)&&('s'==115)&&('t'==116)&&('u'==117)&&('v'==118)&&('w'\
==119)&&('x'==120)&&('y'==121)&&('z'==122)&&('{'==123)&&('|'==124)&&('}'==125)&&\
('~'==126))
error"gperf generated tables don't work with this execution character set."
#endif
#define TOTAL_KEYWORDS 49
#define MIN_WORD_LENGTH 2
#define MAX_WORD_LENGTH 7
#define MIN_HASH_VALUE 2
#define MAX_HASH_VALUE 50
#ifdef __GNUC__
#define I __inline
#else
#define I
#ifdef __cplusplus
inline
#endif
#endif
I static unsigned int greeknamehash(str,len)register const char*str;register 
unsigned int len;{static const unsigned char asso_values[]={51,51,51,51,51,51,51
,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,
51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51
,51,51,51,51,51,41,32,40,29,20,51,33,51,41,51,31,29,32,31,16,8,51,32,34,11,31,51
,51,35,51,19,51,51,51,51,51,51,8,18,26,15,13,51,19,5,0,51,18,4,2,20,0,0,51,21,0,
3,8,51,51,26,51,7,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51
,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,
51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51
,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,
51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51
,51,51,51,51,51,51};return len+asso_values[(unsigned char)str[1]]+asso_values[(
unsigned char)str[0]];}I const char*greeknamelookup(str,len)register const char*
str;register unsigned int len;{static const unsigned char lengthtable[]={0,0,2,3
,4,5,6,5,3,7,2,3,2,5,3,7,3,5,6,3,7,5,3,5,4,7,3,7,2,3,2,5,5,5,3,4,4,2,7,5,3,2,2,6
,5,4,5,5,3,4,5};static const char*const greeknames[]={(char*)0,(char*)0,"pi",
"psi","iota","sigma","sigmaf","omega","phi","omicron","Pi","Psi","mu","theta",
"tau","upsilon","Phi","alpha","lambda","eta","epsilon","Theta","Tau","Omega",
"zeta","Omicron","Eta","Epsilon","xi","rho","nu","kappa","gamma","delta","chi",
"beta","Zeta","Xi","Upsilon","Sigma","Rho","Nu","Mu","Lambda","Kappa","Iota",
"Gamma","Delta","Chi","Beta","Alpha"};if(len<=MAX_WORD_LENGTH&&len>=
MIN_WORD_LENGTH){register int key=greeknamehash(str,len);if(key<=MAX_HASH_VALUE
&&key>=0)if(len==lengthtable[key]){register const char*s=greeknames[key];if(s&&*
str==*s&&!memcmp(str+1,s+1,len-1))return s;}}return 0;}

απαντήσεις

πλοήγηση μηνυμάτων