Changeset 343
- Timestamp:
- 22/08/07 11:09:22 (15 months ago)
- Location:
- trunk/util
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/util/sha1.c
r2 r343 20 20 21 21 /* modified for j2 by Robert Norris */ 22 23 /* XXX WARNING! This function works incorrectly on 64bit platform */ 22 24 23 25 #include "sha1.h" -
trunk/util/str.c
r156 r343 19 19 */ 20 20 21 #include "pool.h" 21 22 #include "util.h" 22 23 … … 116 117 } 117 118 118 spool spool_new(pool p)119 spool spool_new(pool_t p) 119 120 { 120 121 spool s; … … 206 207 207 208 /** convenience :) */ 208 char *spools(pool p, ...)209 char *spools(pool_t p, ...) 209 210 { 210 211 va_list ap; … … 223 224 { 224 225 arg = va_arg(ap,char *); 225 if((pool )arg == p)226 if((pool_t)arg == p) 226 227 break; 227 228 else … … 235 236 236 237 237 char *strunescape(pool p, char *buf)238 char *strunescape(pool_t p, char *buf) 238 239 { 239 240 int i,j=0; … … 282 283 283 284 284 char *strescape(pool p, char *buf, int len)285 char *strescape(pool_t p, char *buf, int len) 285 286 { 286 287 int i,j,newlen = len; … … 369 370 unsigned char hashval[20]; 370 371 372 #ifdef HAVE_SSL 373 /* use OpenSSL functions when available */ 374 # include <openssl/sha.h> 375 SHA1((unsigned char *)str, strlen(str), hashval); 376 #else 371 377 sha1_hash((unsigned char *)str, strlen(str), hashval); 378 #endif 372 379 373 380 hex_from_raw(hashval, 20, hashbuf);
