X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b4ac0a191eae1ee939fb03f12d5a2a80e7102633..dfb935741dbdd2a843f684538ab2403c082f633b:/teshsuite/xbt/log_large_test.c diff --git a/teshsuite/xbt/log_large_test.c b/teshsuite/xbt/log_large_test.c index 5759ec4a8a..d51d8f363a 100644 --- a/teshsuite/xbt/log_large_test.c +++ b/teshsuite/xbt/log_large_test.c @@ -1,8 +1,7 @@ -/* $Id$ */ - /* log_large_test -- log a very large string to test the dynamic variants */ -/* Copyright (c) 2007 Martin Quinson. All rights reserved. */ +/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team. + * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -10,28 +9,39 @@ #include "gras.h" #include "xbt/synchro.h" -XBT_LOG_NEW_DEFAULT_CATEGORY(test,"Logs of this example"); - - -int main(int argc, char *argv[]){ - char *tmp=bprintf("\n%d%s%d%s%d%s%d%s%d%s%d%s%d%s%d%s%d%s%d%s", - 1,".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n", - 2,".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n", - 3,".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n", - 4,".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n", - 5,".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n", - 6,".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n", - 7,".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n", - 8,".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n", - 9,".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n", - 0,".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n"); - - xbt_init(&argc,argv); - - INFO10("This is a very large message:\n0%s1%s2%s3%s4%s5%s6%s7%s8%s9%s",tmp,tmp,tmp,tmp,tmp,tmp,tmp,tmp,tmp,tmp); - INFO1("Done (strlen>%d)",(int) (10*strlen(tmp))); +XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Logs of this example"); + + +int main(int argc, char *argv[]) +{ + char *tmp = bprintf("\n%d%s%d%s%d%s%d%s%d%s%d%s%d%s%d%s%d%s%d%s", + 1, + ".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n", + 2, + ".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n", + 3, + ".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n", + 4, + ".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n", + 5, + ".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n", + 6, + ".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n", + 7, + ".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n", + 8, + ".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n", + 9, + ".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n", + 0, + ".........1.........2.........3.........4.........5.........6.........7.........8.........9.........0\n"); + + xbt_init(&argc, argv); + + INFO10("This is a very large message:\n0%s1%s2%s3%s4%s5%s6%s7%s8%s9%s", + tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp); + INFO1("Done (strlen>%d)", (int) (10 * strlen(tmp))); free(tmp); - - xbt_exit(); + return 0; }