search for: hashdirlen

Displaying 1 result from an estimated 1 matches for "hashdirlen".

2005 Jan 19
1
PROPOSAL: --link-hash-dest, additional linking of files to their HASH values
...into each directory. The code to generate the hash directory name is parameterized though, and could easily generate 1-4 layers. static char hex_char[16] = "0123456789abcdef"; int prefixdirs = 2; ... int digestlength; digestlength = MD4_DIGEST_LENGTH; ... const char *hashdir ... hashdirlen = strlen(hashdir); hashpath = malloc(hashdirlen+digestlength*3+1); strcpy(hashpath,hashdir); hashpath[hashdirlen]='/'; for (i=0;i<prefixdirs;i++) { hashpath[hashdirlen+i*3+1] = hex_char[md[i] >> 4]; hashpath[hashdirlen+i*3+2] = hex_char[md[i] & 0xf]; hashpa...