annotate testdebug.c @ 0:6b1b602514db libpst_0_5

Initial revision
author carl
date Fri, 09 Jul 2004 07:26:16 -0700
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6b1b602514db Initial revision
carl
parents:
diff changeset
1 #include <stdlib.h>
6b1b602514db Initial revision
carl
parents:
diff changeset
2 #include <string.h>
6b1b602514db Initial revision
carl
parents:
diff changeset
3 #include "define.h"
6b1b602514db Initial revision
carl
parents:
diff changeset
4
6b1b602514db Initial revision
carl
parents:
diff changeset
5 #define BUF_SIZE 100000
6b1b602514db Initial revision
carl
parents:
diff changeset
6 int main() {
6b1b602514db Initial revision
carl
parents:
diff changeset
7 char *x = xmalloc(BUF_SIZE); // 10k
6b1b602514db Initial revision
carl
parents:
diff changeset
8 memset(x, '.', BUF_SIZE-1);
6b1b602514db Initial revision
carl
parents:
diff changeset
9 x[BUF_SIZE-2]='P';
6b1b602514db Initial revision
carl
parents:
diff changeset
10 x[BUF_SIZE-1]='\0';
6b1b602514db Initial revision
carl
parents:
diff changeset
11
6b1b602514db Initial revision
carl
parents:
diff changeset
12 DEBUG_INIT("libpst.log");
6b1b602514db Initial revision
carl
parents:
diff changeset
13 DEBUG_REGISTER_CLOSE();
6b1b602514db Initial revision
carl
parents:
diff changeset
14
6b1b602514db Initial revision
carl
parents:
diff changeset
15 DEBUG_ENT("main");
6b1b602514db Initial revision
carl
parents:
diff changeset
16
6b1b602514db Initial revision
carl
parents:
diff changeset
17 DEBUG_FILE(("%s", x));
6b1b602514db Initial revision
carl
parents:
diff changeset
18 DEBUG_FILE(("This is an error %d\n", 4));
6b1b602514db Initial revision
carl
parents:
diff changeset
19
6b1b602514db Initial revision
carl
parents:
diff changeset
20 DEBUG_RET();
6b1b602514db Initial revision
carl
parents:
diff changeset
21 return 0;
6b1b602514db Initial revision
carl
parents:
diff changeset
22 }
6b1b602514db Initial revision
carl
parents:
diff changeset
23