SUBDIRS=.
# amok not ported to GRAS NG yet
+
+AM_CFLAGS= -g
#AM_CFLAGS= -DNDEBUG
# -DNLOG cuts absolutely all logs at compilation time.
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))) {
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;
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 */
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
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;
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 {
}
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;
/* 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));
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));
#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;
#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;
#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;
#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;
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);
}
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);
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;
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;
}
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));
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);
-// $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>
}
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,
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;
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));
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);