annotate testdebug.c @ 1:43e8802f08c5 debian libpst_0_5_1

imported from debian 0.5.1
author carl
date Thu, 23 Dec 2004 11:17:37 -0800
parents 6b1b602514db
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