Changeset 93 for trunk/src/sh_hash.c
- Timestamp:
- Feb 26, 2007, 10:48:51 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_hash.c
r77 r93 1926 1926 ******************************************************************/ 1927 1927 1928 static char * sh_hash_charhex( unsigned char i )1929 {1930 static char i2h[2];1931 int j, k;1932 1933 j = i / 16;1934 k = i - (j*16);1935 1936 if (j < 10) i2h[0] = '0'+j;1937 else i2h[0] = 'A'+(j-10);1938 1939 if (k < 10) i2h[1] = '0'+k;1940 else i2h[1] = 'A'+(k-10);1941 1942 return i2h;1943 }1944 1945 1928 void sh_hash_push2db (char * key, unsigned long val1, 1946 1929 unsigned long val2, unsigned long val3, … … 1975 1958 for (i = 0; i < size; ++i) 1976 1959 { 1977 p = sh_ hash_charhex (str[i]);1960 p = sh_util_charhex (str[i]); 1978 1961 tmpFile.linkpath[2*i] = p[0]; 1979 1962 tmpFile.linkpath[2*i+1] = p[1]; … … 1983 1966 else 1984 1967 { 1985 tmpFile.c_mode[0] = '-'; 1986 tmpFile.c_mode[1] = '-'; tmpFile.c_mode[2] = '-'; 1987 tmpFile.c_mode[3] = '-'; tmpFile.c_mode[4] = '-'; 1988 tmpFile.c_mode[5] = '-'; tmpFile.c_mode[6] = '-'; 1989 tmpFile.c_mode[7] = '-'; tmpFile.c_mode[8] = '-'; 1990 tmpFile.c_mode[9] = '-'; tmpFile.c_mode[10] = '\0'; 1991 tmpFile.linkpath[0] = '-'; tmpFile.linkpath[1] = '\0'; 1968 for (i = 0; i < 10; ++i) 1969 tmpFile.c_mode[i] = '-'; 1970 tmpFile.c_mode[10] = '\0'; 1971 tmpFile.linkpath[0] = '-'; 1972 tmpFile.linkpath[1] = '\0'; 1992 1973 } 1993 1974 1994 1975 if (sh.flag.checkSum == SH_CHECK_CHECK && 1995 1976 sh.flag.update == S_TRUE) 1996 sh_hash_pushdata_memory (&tmpFile, 1997 _("000000000000000000000000000000000000000000000000")); 1998 else 1999 sh_hash_pushdata (&tmpFile, 2000 _("000000000000000000000000000000000000000000000000")); 1977 sh_hash_pushdata_memory (&tmpFile, SH_KEY_NULL); 1978 else 1979 sh_hash_pushdata (&tmpFile, SH_KEY_NULL); 2001 1980 2002 1981 return; … … 2018 1997 if (0 == sh_hash_get_it (key, &tmpFile)) 2019 1998 { 2020 *val1 1999 *val1 = tmpFile.size; 2021 2000 *val2 = tmpFile.mtime; 2022 2001 *val3 = tmpFile.ctime; … … 2701 2680 maxcomp = KEY_LEN; 2702 2681 } 2703 2704 if ( sl_strncmp (linkHash, p->linkpath, maxcomp) != 0 && 2705 (theFile->check_mask & MODI_LNK) != 0) 2706 { 2707 modi_mask |= MODI_LNK; 2708 change_code[1] = 'L'; 2709 TPT ((0, FIL__, __LINE__, _("mod=<link>"))); 2710 } 2682 2683 2684 if ( sl_strncmp (linkHash, p->linkpath, maxcomp) != 0 && 2685 (theFile->check_mask & MODI_LNK) != 0) 2686 { 2687 modi_mask |= MODI_LNK; 2688 change_code[1] = 'L'; 2689 TPT ((0, FIL__, __LINE__, _("mod=<link>"))); 2690 } 2711 2691 } 2712 2692
Note:
See TracChangeset
for help on using the changeset viewer.