comparison src/readpstlog.c @ 123:ab2a11e72250

more cleanup of #include files. common.h is the only file allowed to include system .h files unprotected by autoconf HAVE_ symbols. define.h is the only other file allowed to include system .h files. define.h is never installed; common.h is installed if we are building the shared library.
author Carl Byington <carl@five-ten-sg.com>
date Tue, 03 Feb 2009 10:59:10 -0800
parents bdb38b434c0a
children 23a36ac0514d
comparison
equal deleted inserted replaced
122:bdb38b434c0a 123:ab2a11e72250
66 } 66 }
67 67
68 buf = (char*) xmalloc(BUF_SIZE); 68 buf = (char*) xmalloc(BUF_SIZE);
69 69
70 while (!stop) { 70 while (!stop) {
71 off_t temp; 71 uint64_t temp;
72 if (fread(&temp, sizeof(off_t), 1, fp)<=0) break; 72 if (fread(&temp, sizeof(uint64_t), 1, fp)<=0) break;
73 x = (int)temp; 73 x = (int)temp;
74 ptr = 0; 74 ptr = 0;
75 if (x > 0) { 75 if (x > 0) {
76 off_t i[x+1]; // plus 1 because we want to read the offset of the next index 76 uint64_t i[x+1]; // plus 1 because we want to read the offset of the next index
77 if (get(i, sizeof(off_t), x+1, fp)==0) { 77 if (get(i, sizeof(uint64_t), x+1, fp)==0) {
78 // we have reached the end of the debug file 78 // we have reached the end of the debug file
79 printf("oh dear. we must now end\n"); 79 printf("oh dear. we must now end\n");
80 break; 80 break;
81 } 81 }
82 while (ptr < x) { 82 while (ptr < x) {