Mercurial > libpst
comparison src/deltasearch.cpp @ 73:3cb02cb1e6cd stable-0-6-10
Patch from Robert Simpson to fix doubly-linked list in the cache_ptr code, and allow arrays of unicode strings (without converting them).
More changes for Fedora packaging (#434727)
Fixes for const correctness.
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Thu, 29 May 2008 18:51:02 -0700 |
parents | b2a7f2e0926a |
children | 0f1492b7fe8b |
comparison
equal
deleted
inserted
replaced
72:c21e9c001256 | 73:3cb02cb1e6cd |
---|---|
53 cout << "using file " << argv[1] << " with delta " << d << " looking for " << search << endl; | 53 cout << "using file " << argv[1] << " with delta " << d << " looking for " << search << endl; |
54 if (fd) { | 54 if (fd) { |
55 struct stat st; | 55 struct stat st; |
56 fstat(fd, &st); | 56 fstat(fd, &st); |
57 off_t size = st.st_size; | 57 off_t size = st.st_size; |
58 unsigned char buf[size]; | 58 char buf[size]; |
59 size_t s = read(fd, buf, size); | 59 size_t s = read(fd, buf, size); |
60 pst_debug_hexdumper(stdout, buf, s, 16, 0); | 60 pst_debug_hexdumper(stdout, buf, s, 16, 0); |
61 cout << endl; | 61 cout << endl; |
62 cout << endl; | 62 cout << endl; |
63 cout << " dump decrypted data " << endl; | 63 cout << " dump decrypted data " << endl; |
64 for (off_t i=0; i<size; i++) { | 64 for (off_t i=0; i<size; i++) { |
65 buf[i] = comp_enc[buf[i]]; | 65 buf[i] = comp_enc[(unsigned char)buf[i]]; |
66 } | 66 } |
67 pst_debug_hexdumper(stdout, buf, s, 16, 0); | 67 pst_debug_hexdumper(stdout, buf, s, 16, 0); |
68 close(fd); | 68 close(fd); |
69 } | 69 } |
70 return 0; | 70 return 0; |