[BACK]Return to stackmachine.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Kan

Diff for /OpenXM/src/kan96xx/Kan/stackmachine.c between version 1.16 and 1.17

version 1.16, 2004/09/05 00:51:17 version 1.17, 2004/09/05 01:15:47
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/kan96xx/Kan/stackmachine.c,v 1.15 2004/09/04 11:25:58 takayama Exp $ */  /* $OpenXM: OpenXM/src/kan96xx/Kan/stackmachine.c,v 1.16 2004/09/05 00:51:17 takayama Exp $ */
 /*   stackmachin.c */  /*   stackmachin.c */
   
 #include <stdio.h>  #include <stdio.h>
Line 349  int hash0(str)
Line 349  int hash0(str)
 {  {
   int h=0;    int h=0;
   while (*str != '\0') {    while (*str != '\0') {
     h = ((h*128)+(*str)) % USER_DICTIONARY_SIZE;      h = ((h*128)+((unsigned char)(*str))) % USER_DICTIONARY_SIZE;
     str++;      str++;
   }    }
   return(h);    return(h);
Line 358  int hash0(str)
Line 358  int hash0(str)
 int hash1(str)  int hash1(str)
      char *str;       char *str;
 {  {
   return(8-(str[0]%8));    return(8-((unsigned char)(str[0])%8));
 }  }
   
 void hashInitialize(struct dictionary *dic)  void hashInitialize(struct dictionary *dic)

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>