Mercurial > libpst
comparison src/readpstlog.c @ 172:6954d315aaa8
move version-info into main configure.in, and set it properly.
prefix all external symbols in the shared library with pst_ to avoid symbol clashes with other shared libraries.
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sat, 04 Apr 2009 16:00:48 -0700 |
parents | fc11b1d1ad34 |
children |
comparison
equal
deleted
inserted
replaced
171:6c1e75bc4cac | 172:6954d315aaa8 |
---|---|
61 if (version > DEBUG_VERSION) { | 61 if (version > DEBUG_VERSION) { |
62 printf("Version number is higher than the format I know about."); | 62 printf("Version number is higher than the format I know about."); |
63 return 4; | 63 return 4; |
64 } | 64 } |
65 | 65 |
66 buf = (char*) xmalloc(BUF_SIZE); | 66 buf = (char*) pst_malloc(BUF_SIZE); |
67 | 67 |
68 while (!stop) { | 68 while (!stop) { |
69 int64_t temp; | 69 int64_t temp; |
70 if (fread(&temp, sizeof(int64_t), 1, fp)<=0) break; | 70 if (fread(&temp, sizeof(int64_t), 1, fp)<=0) break; |
71 x = (int)temp; | 71 x = (int)temp; |
211 // find the number of tokens in the string. Starting | 211 // find the number of tokens in the string. Starting |
212 // from 1 cause there will always be one | 212 // from 1 cause there will always be one |
213 while ((tmp = strchr(tmp, ',')) != NULL) { | 213 while ((tmp = strchr(tmp, ',')) != NULL) { |
214 tmp++; count++; | 214 tmp++; count++; |
215 } | 215 } |
216 *targ = (int*)xmalloc(count * sizeof(int)); | 216 *targ = (int*)pst_malloc(count * sizeof(int)); |
217 i = *targ; // for convienience | 217 i = *targ; // for convienience |
218 tmp = args; | 218 tmp = args; |
219 z = 0; | 219 z = 0; |
220 for (x = 0; x < count; x++) { | 220 for (x = 0; x < count; x++) { |
221 y = strtok(tmp, ","); | 221 y = strtok(tmp, ","); |