Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
change TCP_gamma to not be a compilation-time #define, but a command line option
[simgrid.git] / teshsuite / xbt / log_large_test.c
1 /* $Id$ */
2
3 /* log_large_test -- log a very large string to test the dynamic variants   */
4
5 /* Copyright (c) 2007 Martin Quinson. All rights reserved.                  */
6
7 /* This program is free software; you can redistribute it and/or modify it
8  * under the terms of the license (GNU LGPL) which comes with this package. */
9
10 #include "gras.h"
11 #include "xbt/synchro.h"
12
13 XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Logs of this example");
14
15
16 int main(int argc, char *argv[])
17 {
18   char *tmp = bprintf("\n%d%s%d%s%d%s%d%s%d%s%d%s%d%s%d%s%d%s%d%s",
19                       1,
20                       ".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n",
21                       2,
22                       ".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n",
23                       3,
24                       ".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n",
25                       4,
26                       ".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n",
27                       5,
28                       ".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n",
29                       6,
30                       ".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n",
31                       7,
32                       ".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n",
33                       8,
34                       ".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n",
35                       9,
36                       ".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n",
37                       0,
38                       ".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n");
39
40   xbt_init(&argc, argv);
41
42   INFO10("This is a very large message:\n0%s1%s2%s3%s4%s5%s6%s7%s8%s9%s", tmp,
43          tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp);
44   INFO1("Done (strlen>%d)", (int) (10 * strlen(tmp)));
45   free(tmp);
46
47   xbt_exit();
48   return 0;
49 }