Mercurial > libpst
annotate src/testdebug.c @ 75:987aa872294e stable-0-6-11
Use ftello/fseeko to properly handle large files.
Document and properly use datasize field in b5 blocks.
Fix some MSVC compile issues and collect MSVC dependencies into one place.
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Tue, 03 Jun 2008 12:00:58 -0700 |
parents | f66078abed38 |
children | 0f1492b7fe8b |
rev | line source |
---|---|
48 | 1 #include "define.h" |
2 | |
16 | 3 #include <stdlib.h> |
4 #include <string.h> | |
5 | |
6 #define BUF_SIZE 100000 | |
7 int main() { | |
8 char *x = xmalloc(BUF_SIZE); // 10k | |
9 memset(x, '.', BUF_SIZE-1); | |
10 x[BUF_SIZE-2]='P'; | |
11 x[BUF_SIZE-1]='\0'; | |
12 | |
13 DEBUG_INIT("libpst.log"); | |
14 DEBUG_REGISTER_CLOSE(); | |
15 | |
16 DEBUG_ENT("main"); | |
17 | |
18 DEBUG_FILE(("%s", x)); | |
19 DEBUG_FILE(("This is an error %d\n", 4)); | |
20 | |
21 DEBUG_RET(); | |
22 return 0; | |
23 } | |
24 |