Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Only use the C comment style, not the C++ one
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 28 Sep 2004 11:27:30 +0000 (11:27 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 28 Sep 2004 11:27:30 +0000 (11:27 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@435 48e7efb5-ca39-0410-a469-dd3cf9ba447f

16 files changed:
src/Makefile.am
src/amok/bandwidth.c
src/gras/Transport/rl_transport.c
src/gras/Transport/sg_transport.c
src/gras/Transport/transport_plugin_tcp.c
src/xbt/dict_multi.c
testsuite/gras/datadesc_usage.c
testsuite/gras/trp_file_client.c
testsuite/gras/trp_file_server.c
testsuite/gras/trp_tcp_client.c
testsuite/gras/trp_tcp_server.c
testsuite/xbt/dict_crash.c
testsuite/xbt/dict_usage.c
testsuite/xbt/log_usage.c
testsuite/xbt/multidict_crash.c
testsuite/xbt/set_usage.c

index 8eda89f..8c1b529 100644 (file)
@@ -1,5 +1,7 @@
 SUBDIRS=.  
 # amok not ported to GRAS NG yet
+
+AM_CFLAGS= -g
 #AM_CFLAGS= -DNDEBUG 
 
 # -DNLOG   cuts absolutely all logs at compilation time.
index a9917ff..167559c 100644 (file)
@@ -222,8 +222,8 @@ int grasbw_cbBWHandshake(gras_msg_t *msg) {
   ans->expSize=gras_msg_ctn(msg,0,0,BwExp_t).expSize;
   ans->msgSize=gras_msg_ctn(msg,0,0,BwExp_t).msgSize;
   ans->port=gras_rawsock_get_peer_port(rawIn);
-  //  fprintf(stderr,"grasbw_cbHandshake. bufSize=%d expSize=%d msgSize=%d port=%d\n",
-  //     ans->bufSize,ans->expSize,ans->msgSize,ans->port);
+  /*  fprintf(stderr,"grasbw_cbHandshake. bufSize=%d expSize=%d msgSize=%d port=%d\n",
+         ans->bufSize,ans->expSize,ans->msgSize,ans->port);*/
 
   if ((errcode=gras_msg_new_and_send(msg->sock,GRASMSG_BW_HANDSHAKED, 1,
                              ans, 1))) {
@@ -305,7 +305,7 @@ gras_error_t grasbw_request(const char* from_name,unsigned int from_port,
     return errcode;
   }
 
-  //  fprintf(stderr,"sec=%p",gras_msg_ctn(answer,1,0,msgResult_t));
+  /*  fprintf(stderr,"sec=%p",gras_msg_ctn(answer,1,0,msgResult_t)); */
   *sec=gras_msg_ctn(answer,1,0,msgResult_t).value;
   *bw=gras_msg_ctn(answer,1,1,msgResult_t).value;
 
index 13d17b6..0dce317 100644 (file)
@@ -40,7 +40,7 @@ gras_trp_select(double timeout,
   double wakeup = gras_os_time() + 1000000*timeout;
   double now = 0;
   /* nextToService used to make sure socket with high number do not starve */
-  //  static int nextToService = 0;
+  /*  static int nextToService = 0; */
   struct timeval tout, *p_tout;
 
   int max_fds=0; /* first arg of select: number of existing sockets */
index 38acc70..93dc5c7 100644 (file)
@@ -136,7 +136,7 @@ gras_trp_select(double timeout,
             MSG_process_get_name(MSG_process_self()),
             MSG_host_get_name(MSG_host_self()));
       */
-      // MSG_process_sleep(1);
+      /* MSG_process_sleep(1); */
       MSG_process_sleep(0.01);
     }
   } while (gras_os_time()-startTime < timeout
index 6fa9cb5..988b6e7 100644 (file)
@@ -156,7 +156,7 @@ gras_error_t gras_trp_tcp_socket_client(gras_trp_plugin_t *self,
 gras_error_t gras_trp_tcp_socket_server(gras_trp_plugin_t *self,
                                        unsigned short port,
                                        /* OUT */ gras_socket_t *sock){
-//  int size = bufSize * 1024;
+/*  int size = bufSize * 1024; */
   int on = 1;
   struct sockaddr_in server;
 
index b9a9d26..e1fd5ef 100644 (file)
@@ -150,9 +150,9 @@ gras_multidict_get_ext(gras_dictelm_t    *p_head,
     i++;
   }
 
-  if (p_elm) { // Found all dicts to the data
+  if (p_elm) { /* Found all dicts to the data */
 
-    //    gras_dict_dump(dict,&gras_dict_prints);
+    /*    gras_dict_dump(dict,&gras_dict_prints); */
     return gras_dict_get_ext(p_elm, key[i], key_len[i], data);
 
   } else {
@@ -216,7 +216,7 @@ gras_multidict_remove_ext(gras_dictelm_t  *p_head,
   }
 
   if (p_elm) {
-    // Found all dicts to the data
+    /* Found all dicts to the data */
     return gras_dict_remove_ext(p_elm, key[i], key_len[i]);
   } else {
     return 1;
index 25e9d30..ea8f45a 100644 (file)
@@ -549,7 +549,7 @@ gras_error_t test_clause(gras_socket_t *sock, int direction) {
 
   /* create the damn type descriptor */
   ddt = gras_datadesc_by_symbol(s_clause);
-//  gras_datadesc_type_dump(ddt);
+/*  gras_datadesc_type_dump(ddt); */
 
   TRYFAIL(gras_datadesc_ref("Clause*",ddt,&ddt));
 
@@ -617,7 +617,7 @@ int main(int argc,char *argv[]) {
 
   TRYFAIL(declare_chained_list_type());
   TRYFAIL(test_chain_list(sock,direction));
-  //  TRYFAIL(test_graph(sock,direction));
+  /*  TRYFAIL(test_graph(sock,direction)); */
 
   TRYFAIL(test_pbio(sock,direction));
 
index d27323d..a959832 100644 (file)
@@ -12,7 +12,7 @@
 #include <gras.h>
 #include "gras/Transport/transport_interface.h"
 
-//GRAS_LOG_NEW_DEFAULT_CATEGORY(test);
+/* GRAS_LOG_NEW_DEFAULT_CATEGORY(test); */
 
 int main(int argc,char *argv[]) {
   gras_socket_t *sock;
index b3b23b8..0406320 100644 (file)
@@ -12,7 +12,7 @@
 #include <gras.h>
 #include "gras/Transport/transport_interface.h"
 
-//GRAS_LOG_NEW_DEFAULT_CATEGORY(test);
+/*GRAS_LOG_NEW_DEFAULT_CATEGORY(test);*/
 
 int main(int argc,char *argv[]) {
   gras_socket_t *sock, *conn;
index fa6a09b..129e354 100644 (file)
@@ -12,7 +12,7 @@
 #include <gras.h>
 #include "gras/Transport/transport_interface.h"
 
-//GRAS_LOG_NEW_DEFAULT_CATEGORY(test);
+/*GRAS_LOG_NEW_DEFAULT_CATEGORY(test);*/
 
 int main(int argc,char *argv[]) {
   gras_socket_t * sock;
index 4611682..be8fb9f 100644 (file)
@@ -12,7 +12,7 @@
 #include <gras.h>
 #include "gras/Transport/transport_interface.h"
 
-//GRAS_LOG_NEW_DEFAULT_CATEGORY(test);
+/*GRAS_LOG_NEW_DEFAULT_CATEGORY(test);*/
 
 int main(int argc,char *argv[]) {
   gras_socket_t *sock, *conn;
index 99dadb3..5a3ddef 100644 (file)
@@ -29,7 +29,7 @@ static gras_error_t traverse(gras_dict_t *head) {
   char *data;
 
   gras_dict_foreach(head,cursor,key,data) {
-    //    printf("   Seen:  %s=%s\n",key,data);
+    /*    printf("   Seen:  %s=%s\n",key,data); */
     gras_assert2 (!strcmp(key,data),
       "Key(%s) != value(%s). Abording\n",key,data);
   }
@@ -76,11 +76,11 @@ int main(int argc,char **argv) {
       for (k=0;k<SIZEOFKEY-1;k++)
        key[k]=rand() % ('z' - 'a') + 'a';
       key[k]='\0';
-      //      printf("[%d %s]\n",j,key);
+      /*      printf("[%d %s]\n",j,key); */
       TRYFAIL(gras_dict_set(head,key,key,&free));
     }
     nb=0;
-    //    gras_dict_dump(head,(void (*)(void*))&printf);
+    /*    gras_dict_dump(head,(void (*)(void*))&printf); */
     TRYFAIL(countelems(head,&nb));
     if (nb != 1000) {
        printf ("\nI found %d elements, and not 1000\n",nb);
index 58acd2b..d585701 100644 (file)
@@ -37,9 +37,9 @@ static gras_error_t fill(gras_dict_t **head) {
   TRY(debuged_add(*head,"12b"));
   TRY(debuged_add(*head,"123"));
   TRY(debuged_add(*head,"123456"));
-  // Child becomes child of what to add
+  /* Child becomes child of what to add */
   TRY(debuged_add(*head,"1234"));
-  // Need of common ancestor
+  /* Need of common ancestor */
   TRY(debuged_add(*head,"123457"));
 
   return no_error;
@@ -77,7 +77,7 @@ static gras_error_t debuged_remove(gras_dict_t *head,const char*key)
 
   printf("   Remove '%s'\n",key);fflush(stdout);
   errcode=gras_dict_remove(head,key);
-  //  gras_dict_dump(head,(void (*)(void*))&printf);
+  /*  gras_dict_dump(head,(void (*)(void*))&printf); */
   return errcode;
 }
 
@@ -125,7 +125,7 @@ int main(int argc,char **argv) {
   printf("   - Change 12a to '12a'\n");
   TRYFAIL(gras_dict_set(head,"12a",strdup("12a"),&gras_free));
 
-  //  gras_dict_dump(head,(void (*)(void*))&printf);
+  /*  gras_dict_dump(head,(void (*)(void*))&printf); */
   printf(" - Traverse the resulting dictionnary\n");
   TRYFAIL(traverse(head));
 
@@ -148,7 +148,7 @@ int main(int argc,char **argv) {
   printf(" - Traverse the resulting dictionnary\n");
   TRYFAIL(traverse(head));
 
-  //  gras_dict_dump(head,(void (*)(void*))&printf);
+  /*  gras_dict_dump(head,(void (*)(void*))&printf); */
 
   printf(" Free the dictionnary (twice)\n");
   gras_dict_free(&head);
index 5155fd9..e92a485 100644 (file)
@@ -1,38 +1,12 @@
-// $Id$
-// Copyright (c) 2001, Bit Farm, Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-//    notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-//    notice, this list of conditions and the following disclaimer in the
-//    documentation and/or other materials provided with the distribution.
-// 3. The name of the author may not be used to endorse or promote products
-//    derived from this software without specific prior written permission.
-// 
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-/**
- *
- * Run it w/o arguments, and also try:
- *
- *    ./test_l4c Test.thresh=0
- *
- * which should print out the DEBUG message.
- *
- * 'make test' will run various test cases.
- *
- */
+/* $Id$ */
+
+/* log_usage - A test of normal usage of the log facilities                 */
+
+/* Authors: Martin Quinson                                                  */
+/* Copyright (C) 2004 the OURAGAN project.                                  */
+
+/* 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. */
 
 #include <gras.h>
 #include <stdio.h>
index c730666..c1bcac8 100644 (file)
@@ -51,7 +51,7 @@ static gras_error_t test1() {
        }
        val[l][k]='\0';
        if (verbose) printf("%s ; ",val[l]);
-       key[l]=val[l];//  NOWADAYS, no need to strdup the key.
+       key[l]=val[l];/*  NOWADAYS, no need to strdup the key. */
       }
       if (verbose) printf("in multitree %p.\n",head);
       TRYFAIL(gras_multidict_set(&head,MULTICACHE_DEPTH,key,
index 81730ad..7900c34 100644 (file)
@@ -86,9 +86,9 @@ static gras_error_t fill(gras_set_t **set) {
   TRY(debuged_add(*set,"12b"));
   TRY(debuged_add(*set,"123"));
   TRY(debuged_add(*set,"123456"));
-  // Child becomes child of what to add
+  /* Child becomes child of what to add */
   TRY(debuged_add(*set,"1234"));
-  // Need of common ancestor
+  /* Need of common ancestor */
   TRY(debuged_add(*set,"123457"));
 
   return no_error;
@@ -190,7 +190,7 @@ int main(int argc,char **argv) {
   printf("   - Change 12a to '12a'\n");
   TRYFAIL(debuged_add_with_data(set,"12a","12a"));
 
-  //  gras_dict_dump(head,(void (*)(void*))&printf);
+  /*  gras_dict_dump(head,(void (*)(void*))&printf); */
   printf(" - Traverse the resulting data set\n");
   TRYFAIL(traverse(set));
 
@@ -225,7 +225,7 @@ int main(int argc,char **argv) {
   printf(" - Traverse the resulting data set\n");
   TRYFAIL(traverse(set));
 
-  //  gras_dict_dump(head,(void (*)(void*))&printf);
+  /*  gras_dict_dump(head,(void (*)(void*))&printf); */
 
   printf(" Free the data set (twice)\n");
   gras_set_free(&set);