4 * Revision 1.1 2001/04/04 05:43:37 wang
5 * First commit: compiles on Linux, Amiga, Windows, Windows CE, generic gcc
7 * Revision 1.2 1999/11/26 09:56:55 bnv
8 * Added: Error message fror CE
10 * Revision 1.1 1998/07/02 17:18:00 bnv
17 /* --------------- Lhashvalue ------------------ */
19 Lhashvalue( const PLstr str
)
22 # error "Lhashvalue is not used!"
27 if (LISNULL(*str
)) return 0;
29 switch (LTYPE(*str
)) {
30 case LINTEGER_TY
: l
= sizeof(long); break;
31 case LREAL_TY
: l
= sizeof(double); break;
32 case LSTRING_TY
: l
= MIN(255,LLEN(*str
)); break;
35 value
^= LSTR(*str
)[i
];
37 value
= _rotl(value
,1);
39 value
= ((value
>>1) | (value
<<7)) & 0xFF;