[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r8032 - in GNUnet: contrib src/applications/datastore src/a
From: |
gnunet |
Subject: |
[GNUnet-SVN] r8032 - in GNUnet: contrib src/applications/datastore src/applications/dht/module src/applications/dht/tools src/applications/dstore_mysql src/applications/dstore_sqlite src/applications/dv/module src/applications/fs/collection src/applications/fs/ecrs src/applications/fs/fsui src/applications/fs/gap src/applications/fs/tools src/applications/testing src/applications/topology_default src/include src/libs/mysql src/server src/setup src/setup/cocoa src/setup/lib src/setup/ncurses src/transports src/util/containers src/util/network_client src/util/os |
Date: |
Sat, 27 Dec 2008 00:50:06 -0700 (MST) |
Author: grothoff
Date: 2008-12-27 00:50:06 -0700 (Sat, 27 Dec 2008)
New Revision: 8032
Modified:
GNUnet/contrib/valgrind.sh
GNUnet/src/applications/datastore/datastore.c
GNUnet/src/applications/dht/module/routing.c
GNUnet/src/applications/dht/tools/dht-query.c
GNUnet/src/applications/dht/tools/dht_api.c
GNUnet/src/applications/dht/tools/dht_expiration_test.c
GNUnet/src/applications/dht/tools/dht_loopback_test.c
GNUnet/src/applications/dht/tools/dht_multipeer_test.c
GNUnet/src/applications/dht/tools/dht_twopeer_test.c
GNUnet/src/applications/dstore_mysql/dstore_mysql.c
GNUnet/src/applications/dstore_sqlite/dstore.c
GNUnet/src/applications/dv/module/dv.c
GNUnet/src/applications/fs/collection/collection.c
GNUnet/src/applications/fs/ecrs/download.c
GNUnet/src/applications/fs/ecrs/namespace.c
GNUnet/src/applications/fs/fsui/fsui.c
GNUnet/src/applications/fs/gap/gap.c
GNUnet/src/applications/fs/gap/plan.c
GNUnet/src/applications/fs/gap/shared.c
GNUnet/src/applications/fs/tools/gnunet-unindex.c
GNUnet/src/applications/testing/remote.c
GNUnet/src/applications/testing/remotetopologies.c
GNUnet/src/applications/testing/testing.c
GNUnet/src/applications/topology_default/topology.c
GNUnet/src/include/gnunet_dht_lib.h
GNUnet/src/include/gnunet_util_containers.h
GNUnet/src/include/plibc.h
GNUnet/src/libs/mysql/lmysql.c
GNUnet/src/server/connection.c
GNUnet/src/setup/cocoa/GNUNETSetupView.h
GNUnet/src/setup/cocoa/PackingBoxContainer.h
GNUnet/src/setup/cocoa/config_cocoa.h
GNUnet/src/setup/gnunet-setup.c
GNUnet/src/setup/lib/gns.c
GNUnet/src/setup/lib/tree.c
GNUnet/src/setup/ncurses/mconf.c
GNUnet/src/transports/http.c
GNUnet/src/util/containers/maptest.c
GNUnet/src/util/network_client/tcpio.c
GNUnet/src/util/os/installpath.c
GNUnet/src/util/os/osconfig.c
Log:
indent
Modified: GNUnet/contrib/valgrind.sh
===================================================================
--- GNUnet/contrib/valgrind.sh 2008-12-27 07:49:35 UTC (rev 8031)
+++ GNUnet/contrib/valgrind.sh 2008-12-27 07:50:06 UTC (rev 8032)
@@ -4,6 +4,6 @@
cd `dirname $n`;
cd ..;
echo Running `basename $n`
- valgrind --tool=memcheck --leak-check=yes
--suppressions=$HOME/svn/GNUnet/contrib/gnunet.supp .libs/`basename $n` &>
`basename $n`.val || echo FAILED
+ valgrind --tool=memcheck --leak-check=yes
--suppressions=$HOME/svn/GNUnet/contrib/gnunet.supp .libs/`basename $n` 2>
`basename $n`.val > `basename $n`.out || echo FAILED
cd $HOME/svn/GNUnet/
done
Modified: GNUnet/src/applications/datastore/datastore.c
===================================================================
--- GNUnet/src/applications/datastore/datastore.c 2008-12-27 07:49:35 UTC
(rev 8031)
+++ GNUnet/src/applications/datastore/datastore.c 2008-12-27 07:50:06 UTC
(rev 8032)
@@ -402,9 +402,9 @@
stat_filter_failed =
stats->create (gettext_noop ("# bloom filter false positives"));
- stats->
- set (stats->create (gettext_noop ("# bytes allowed in datastore")),
- quota);
+ stats->set (stats->
+ create (gettext_noop ("# bytes allowed in datastore")),
+ quota);
}
state = capi->service_request ("state");
if (state != NULL)
Modified: GNUnet/src/applications/dht/module/routing.c
===================================================================
--- GNUnet/src/applications/dht/module/routing.c 2008-12-27 07:49:35 UTC
(rev 8031)
+++ GNUnet/src/applications/dht/module/routing.c 2008-12-27 07:50:06 UTC
(rev 8032)
@@ -250,8 +250,8 @@
*/
static int
route_result (const GNUNET_HashCode * key,
- unsigned int type,
- unsigned int size, const char *data, void *cls)
+ unsigned int type,
+ unsigned int size, const char *data, void *cls)
{
DHTQueryRecord *q;
unsigned int i;
@@ -398,7 +398,7 @@
*/
static int
add_route (const GNUNET_PeerIdentity * sender,
- GNUNET_ResultProcessor handler, void *cls, const DHT_MESSAGE * get)
+ GNUNET_ResultProcessor handler, void *cls, const DHT_MESSAGE * get)
{
DHTQueryRecord *q;
unsigned int i;
@@ -484,7 +484,7 @@
*/
static int
handle_get (const GNUNET_PeerIdentity * sender,
- const GNUNET_MessageHeader * msg)
+ const GNUNET_MessageHeader * msg)
{
GNUNET_PeerIdentity next[GET_TRIES + 1];
const DHT_MESSAGE *get;
@@ -583,7 +583,7 @@
*/
static int
handle_put (const GNUNET_PeerIdentity * sender,
- const GNUNET_MessageHeader * msg)
+ const GNUNET_MessageHeader * msg)
{
GNUNET_PeerIdentity next[PUT_TRIES + 1];
const DHT_MESSAGE *put;
@@ -693,7 +693,7 @@
*/
static int
handle_result (const GNUNET_PeerIdentity * sender,
- const GNUNET_MessageHeader * msg)
+ const GNUNET_MessageHeader * msg)
{
const DHT_MESSAGE *result;
#if DEBUG_ROUTING
@@ -715,9 +715,9 @@
"Received REMOTE DHT RESULT for key `%s'.\n", &enc);
#endif
route_result (&result->key,
- ntohl (result->type),
- ntohs (result->header.size) - sizeof (DHT_MESSAGE),
- (const char *) &result[1], (void *) msg);
+ ntohl (result->type),
+ ntohs (result->header.size) - sizeof (DHT_MESSAGE),
+ (const char *) &result[1], (void *) msg);
return GNUNET_OK;
}
Modified: GNUnet/src/applications/dht/tools/dht-query.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht-query.c 2008-12-27 07:49:35 UTC
(rev 8031)
+++ GNUnet/src/applications/dht/tools/dht-query.c 2008-12-27 07:50:06 UTC
(rev 8032)
@@ -74,9 +74,9 @@
static void
do_get (struct GNUNET_ClientServerConnection *sock, const char *key)
{
- struct GNUNET_DHT_GetRequest* ret;
+ struct GNUNET_DHT_GetRequest *ret;
GNUNET_HashCode hc;
-
+
GNUNET_hash (key, strlen (key), &hc);
#if DEBUG_DHT_QUERY
GNUNET_GE_LOG (ectx,
@@ -91,8 +91,7 @@
return;
}
GNUNET_thread_sleep (timeout);
- GNUNET_DHT_get_stop (ctx,
- ret);
+ GNUNET_DHT_get_stop (ctx, ret);
}
static void
Modified: GNUnet/src/applications/dht/tools/dht_api.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht_api.c 2008-12-27 07:49:35 UTC (rev
8031)
+++ GNUnet/src/applications/dht/tools/dht_api.c 2008-12-27 07:50:06 UTC (rev
8032)
@@ -35,12 +35,12 @@
* Doubly-linked list of get requests.
*/
struct GNUNET_DHT_GetRequest
-{
- struct GNUNET_DHT_GetRequest * prev;
+{
+ struct GNUNET_DHT_GetRequest *prev;
- struct GNUNET_DHT_GetRequest * next;
+ struct GNUNET_DHT_GetRequest *next;
- CS_dht_request_get_MESSAGE request;
+ CS_dht_request_get_MESSAGE request;
};
/**
@@ -57,7 +57,7 @@
/**
* Lock for head and tail fields.
*/
- struct GNUNET_Mutex * lock;
+ struct GNUNET_Mutex *lock;
/**
* Callback to call for each result.
@@ -77,12 +77,12 @@
/**
* Head of our pending requests.
*/
- struct GNUNET_DHT_GetRequest * head;
+ struct GNUNET_DHT_GetRequest *head;
/**
* Tail of our pending requests.
*/
- struct GNUNET_DHT_GetRequest * tail;
+ struct GNUNET_DHT_GetRequest *tail;
/**
* Are we done (for whichever reason)?
@@ -99,7 +99,7 @@
/**
* Main loop of the poll thread.
- *
+ *
* @param cls the DHT context
* @return NULL (always)
*/
@@ -115,29 +115,29 @@
while (info->aborted == GNUNET_NO)
{
reply = NULL;
- if ( (info->restart == GNUNET_YES) ||
- (GNUNET_OK != GNUNET_client_connection_read (info->sock, &reply)) )
- {
- info->restart = GNUNET_NO;
- while ( (info->aborted == GNUNET_NO) &&
- (GNUNET_OK != GNUNET_client_connection_ensure_connected
(info->sock)) )
- GNUNET_thread_sleep(100 * GNUNET_CRON_MILLISECONDS);
- if (info->aborted != GNUNET_NO)
- break;
- GNUNET_mutex_lock(info->lock);
- get = info->head;
- while ( (get != NULL) &&
- (info->restart == GNUNET_NO) &&
- (info->aborted == GNUNET_NO) )
- {
- if (GNUNET_OK !=
- GNUNET_client_connection_write (info->sock,
- &get->request.header))
- info->restart = GNUNET_YES;
- get = get->next;
- }
- GNUNET_mutex_unlock(info->lock);
- continue;
+ if ((info->restart == GNUNET_YES) ||
+ (GNUNET_OK != GNUNET_client_connection_read (info->sock, &reply)))
+ {
+ info->restart = GNUNET_NO;
+ while ((info->aborted == GNUNET_NO) &&
+ (GNUNET_OK !=
+ GNUNET_client_connection_ensure_connected (info->sock)))
+ GNUNET_thread_sleep (100 * GNUNET_CRON_MILLISECONDS);
+ if (info->aborted != GNUNET_NO)
+ break;
+ GNUNET_mutex_lock (info->lock);
+ get = info->head;
+ while ((get != NULL) &&
+ (info->restart == GNUNET_NO) && (info->aborted == GNUNET_NO))
+ {
+ if (GNUNET_OK !=
+ GNUNET_client_connection_write (info->sock,
+ &get->request.header))
+ info->restart = GNUNET_YES;
+ get = get->next;
+ }
+ GNUNET_mutex_unlock (info->lock);
+ continue;
}
if ((sizeof (CS_dht_request_put_MESSAGE) > ntohs (reply->size)) ||
(GNUNET_CS_PROTO_DHT_REQUEST_PUT != ntohs (reply->type)))
@@ -187,7 +187,7 @@
if (sock == NULL)
return NULL;
ctx = GNUNET_malloc (sizeof (struct GNUNET_DHT_Context));
- ctx->lock = GNUNET_mutex_create(GNUNET_NO);
+ ctx->lock = GNUNET_mutex_create (GNUNET_NO);
ctx->sock = sock;
ctx->processor = resultCallback;
ctx->closure = resCallbackClosure;
@@ -215,17 +215,17 @@
GNUNET_DHT_get_start (struct GNUNET_DHT_Context *ctx,
unsigned int type, const GNUNET_HashCode * key)
{
- struct GNUNET_DHT_GetRequest * req;
+ struct GNUNET_DHT_GetRequest *req;
- req = GNUNET_malloc(sizeof(struct GNUNET_DHT_GetRequest));
+ req = GNUNET_malloc (sizeof (struct GNUNET_DHT_GetRequest));
req->request.header.size = htons (sizeof (CS_dht_request_get_MESSAGE));
req->request.header.type = htons (GNUNET_CS_PROTO_DHT_REQUEST_GET);
req->request.type = htonl (type);
req->request.key = *key;
- GNUNET_mutex_lock(ctx->lock);
- GNUNET_DLL_insert(ctx->head, ctx->tail, req);
- GNUNET_mutex_unlock(ctx->lock);
- if (GNUNET_OK !=
+ GNUNET_mutex_lock (ctx->lock);
+ GNUNET_DLL_insert (ctx->head, ctx->tail, req);
+ GNUNET_mutex_unlock (ctx->lock);
+ if (GNUNET_OK !=
GNUNET_client_connection_write (ctx->sock, &req->request.header))
ctx->restart = GNUNET_YES;
return req;
@@ -241,7 +241,7 @@
*/
int
GNUNET_DHT_get_stop (struct GNUNET_DHT_Context *ctx,
- struct GNUNET_DHT_GetRequest * req)
+ struct GNUNET_DHT_GetRequest *req)
{
CS_dht_request_get_MESSAGE creq;
@@ -249,12 +249,12 @@
creq.header.type = htons (GNUNET_CS_PROTO_DHT_REQUEST_GET_END);
creq.type = req->request.type;
creq.key = req->request.key;
- GNUNET_mutex_lock(ctx->lock);
- GNUNET_DLL_remove(ctx->head, ctx->tail, req);
- GNUNET_mutex_unlock(ctx->lock);
+ GNUNET_mutex_lock (ctx->lock);
+ GNUNET_DLL_remove (ctx->head, ctx->tail, req);
+ GNUNET_mutex_unlock (ctx->lock);
if (GNUNET_OK != GNUNET_client_connection_write (ctx->sock, &creq.header))
ctx->restart = GNUNET_YES;
- GNUNET_free(req);
+ GNUNET_free (req);
return GNUNET_OK;
}
@@ -269,15 +269,15 @@
{
void *unused;
- GNUNET_GE_ASSERT(NULL, ctx->head == NULL);
- GNUNET_GE_ASSERT(NULL, ctx->tail == NULL);
+ GNUNET_GE_ASSERT (NULL, ctx->head == NULL);
+ GNUNET_GE_ASSERT (NULL, ctx->tail == NULL);
ctx->aborted = GNUNET_YES;
GNUNET_client_connection_close_forever (ctx->sock);
GNUNET_thread_stop_sleep (ctx->poll_thread);
GNUNET_thread_join (ctx->poll_thread, &unused);
GNUNET_client_connection_destroy (ctx->sock);
- GNUNET_mutex_destroy(ctx->lock);
- GNUNET_free(ctx);
+ GNUNET_mutex_destroy (ctx->lock);
+ GNUNET_free (ctx);
return GNUNET_OK;
}
Modified: GNUnet/src/applications/dht/tools/dht_expiration_test.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht_expiration_test.c 2008-12-27
07:49:35 UTC (rev 8031)
+++ GNUnet/src/applications/dht/tools/dht_expiration_test.c 2008-12-27
07:50:06 UTC (rev 8032)
@@ -104,11 +104,11 @@
/* FIXME: this value has to be >> than the expiration
time (which is currently fixed to 12h, so we can not
really do this test in practice... */
- GNUNET_thread_sleep(60 * GNUNET_CRON_SECONDS);
+ GNUNET_thread_sleep (60 * GNUNET_CRON_SECONDS);
CHECK (1 == GNUNET_DHT_get_start (ctx,
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
&key));
- GNUNET_thread_sleep(15 * GNUNET_CRON_SECONDS);
+ GNUNET_thread_sleep (15 * GNUNET_CRON_SECONDS);
GNUNET_DHT_context_destroy (ctx);
FAILURE:
Modified: GNUnet/src/applications/dht/tools/dht_loopback_test.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht_loopback_test.c 2008-12-27
07:49:35 UTC (rev 8031)
+++ GNUnet/src/applications/dht/tools/dht_loopback_test.c 2008-12-27
07:50:06 UTC (rev 8032)
@@ -80,8 +80,8 @@
struct GNUNET_GE_Context *ectx;
struct GNUNET_GC_Configuration *cfg;
struct GNUNET_DHT_Context *ctx;
- struct GNUNET_DHT_GetRequest * get1;
- struct GNUNET_DHT_GetRequest * get2;
+ struct GNUNET_DHT_GetRequest *get1;
+ struct GNUNET_DHT_GetRequest *get2;
int left;
int i;
@@ -120,8 +120,8 @@
8, value));
i = 'A';
CHECK (NULL != (get1 = GNUNET_DHT_get_start (ctx,
-
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
- &key)));
+
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+ &key)));
GNUNET_hash ("key_for_B", 3, &key);
value = GNUNET_malloc (8);
memset (value, 'B', 8);
@@ -131,22 +131,22 @@
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
8, value));
left = 10;
- while ( (found == 0) && (--left >= 0) )
- GNUNET_thread_sleep(50 * GNUNET_CRON_MILLISECONDS);
+ while ((found == 0) && (--left >= 0))
+ GNUNET_thread_sleep (50 * GNUNET_CRON_MILLISECONDS);
CHECK (err == 0);
CHECK (found != 0);
found = 0;
- GNUNET_DHT_get_stop(ctx, get1);
+ GNUNET_DHT_get_stop (ctx, get1);
i = 'B';
CHECK (NULL != (get2 = GNUNET_DHT_get_start (ctx,
-
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
- &key)));
+
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+ &key)));
left = 10;
- while ( (found == 0) && (--left >= 0) )
- GNUNET_thread_sleep(50 * GNUNET_CRON_MILLISECONDS);
+ while ((found == 0) && (--left >= 0))
+ GNUNET_thread_sleep (50 * GNUNET_CRON_MILLISECONDS);
CHECK (err == 0);
CHECK (found != 0);
- GNUNET_DHT_get_stop(ctx, get2);
+ GNUNET_DHT_get_stop (ctx, get2);
/* end of actual test code */
GNUNET_DHT_context_destroy (ctx);
Modified: GNUnet/src/applications/dht/tools/dht_multipeer_test.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht_multipeer_test.c 2008-12-27
07:49:35 UTC (rev 8031)
+++ GNUnet/src/applications/dht/tools/dht_multipeer_test.c 2008-12-27
07:50:06 UTC (rev 8032)
@@ -102,7 +102,7 @@
struct GNUNET_GC_Configuration *cfg;
struct GNUNET_ClientServerConnection *sock;
struct GNUNET_DHT_Context *dctx;
- struct GNUNET_DHT_GetRequest * get1;
+ struct GNUNET_DHT_GetRequest *get1;
int left;
int i;
int j;
@@ -119,7 +119,7 @@
GNUNET_GC_free (cfg);
return -1;
}
- printf("Starting %u peers...\n", NUM_PEERS);
+ printf ("Starting %u peers...\n", NUM_PEERS);
peers = GNUNET_TESTING_start_daemons ("tcp",
"advertising dht stats",
"/tmp/gnunet-dht-test",
@@ -147,114 +147,118 @@
for (r = 0; r < NUM_REPEAT; r++)
{
if (r > 0)
- {
- printf ("Found %u out of %u attempts.\n", found, NUM_PEERS *
NUM_PEERS * r);
- if (found >= NUM_PEERS * NUM_PEERS * r / 2)
- break; /* good enough */
- }
- if (GNUNET_shutdown_test() == GNUNET_YES)
- break;
+ {
+ printf ("Found %u out of %u attempts.\n", found,
+ NUM_PEERS * NUM_PEERS * r);
+ if (found >= NUM_PEERS * NUM_PEERS * r / 2)
+ break; /* good enough */
+ }
+ if (GNUNET_shutdown_test () == GNUNET_YES)
+ break;
/* put loop */
printf ("Waiting for DHT connections of peer");
for (i = 0; i < NUM_PEERS; i++)
- {
- if (GNUNET_shutdown_test() == GNUNET_YES)
- break;
- ok = 0;
- printf (" %d", i);
- fflush (stdout);
- GNUNET_snprintf (buf, sizeof(buf), "localhost:%u", 2087 + i * 10);
- GNUNET_GC_set_configuration_value_string (cfg, ectx, "NETWORK",
"HOST",
- buf);
- /* wait for some DHT's to find each other! */
- sock = GNUNET_client_connection_create (NULL, cfg);
- left = 30; /* how many iterations should we wait? */
- while (GNUNET_OK ==
- GNUNET_STATS_get_statistics (NULL, sock, &waitForConnect,
NULL))
- {
- if (GNUNET_shutdown_test() == GNUNET_YES)
- break;
- if (9 == left % 10)
- printf (".");
- fflush (stdout);
- GNUNET_thread_sleep (2 * GNUNET_CRON_SECONDS);
- left--;
- if (left == 0)
- break;
- }
- GNUNET_client_connection_destroy (sock);
- if (ok == 0)
- {
- printf ("ERROR!\n");
- fflush (stdout);
- GNUNET_TESTING_stop_daemons (peers);
- fprintf (stderr, "Peers' DHTs failed to DHT-connect!\n");
- GNUNET_GC_free (cfg);
- return -1;
- }
- GNUNET_hash (buf, strlen (buf), &key);
- memset (value, 'A' + i, sizeof(value));
- CHECK (GNUNET_OK == GNUNET_DHT_put (cfg,
- ectx,
- &key,
-
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
- sizeof(value), value));
- }
- printf("\n");
+ {
+ if (GNUNET_shutdown_test () == GNUNET_YES)
+ break;
+ ok = 0;
+ printf (" %d", i);
+ fflush (stdout);
+ GNUNET_snprintf (buf, sizeof (buf), "localhost:%u", 2087 + i * 10);
+ GNUNET_GC_set_configuration_value_string (cfg, ectx, "NETWORK",
+ "HOST", buf);
+ /* wait for some DHT's to find each other! */
+ sock = GNUNET_client_connection_create (NULL, cfg);
+ left = 30; /* how many iterations should we wait? */
+ while (GNUNET_OK ==
+ GNUNET_STATS_get_statistics (NULL, sock, &waitForConnect,
+ NULL))
+ {
+ if (GNUNET_shutdown_test () == GNUNET_YES)
+ break;
+ if (9 == left % 10)
+ printf (".");
+ fflush (stdout);
+ GNUNET_thread_sleep (2 * GNUNET_CRON_SECONDS);
+ left--;
+ if (left == 0)
+ break;
+ }
+ GNUNET_client_connection_destroy (sock);
+ if (ok == 0)
+ {
+ printf ("ERROR!\n");
+ fflush (stdout);
+ GNUNET_TESTING_stop_daemons (peers);
+ fprintf (stderr, "Peers' DHTs failed to DHT-connect!\n");
+ GNUNET_GC_free (cfg);
+ return -1;
+ }
+ GNUNET_hash (buf, strlen (buf), &key);
+ memset (value, 'A' + i, sizeof (value));
+ CHECK (GNUNET_OK == GNUNET_DHT_put (cfg,
+ ectx,
+ &key,
+
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+ sizeof (value), value));
+ }
+ printf ("\n");
/* get loop */
for (i = 0; i < NUM_PEERS; i++)
- {
- if (GNUNET_shutdown_test() == GNUNET_YES)
- break;
- GNUNET_snprintf (buf, sizeof(buf), "localhost:%u", 2087 + i * 10);
- GNUNET_GC_set_configuration_value_string (cfg,
- ectx, "NETWORK", "HOST",
buf);
- dctx = GNUNET_DHT_context_create (cfg, ectx, &result_callback, &c);
- printf ("Peer %d gets key", i);
- fflush (stdout);
- for (j = 0; j < NUM_PEERS; j++)
- {
- if (GNUNET_shutdown_test() == GNUNET_YES)
- break;
- c = 'A' + j;
- GNUNET_snprintf (buf, sizeof(buf), "localhost:%u", 2087 + j * 10);
- GNUNET_hash (buf, strlen (buf), &key);
- printf (" %d", j);
- fflush (stdout);
- last = found;
- get1 = GNUNET_DHT_get_start (dctx,
-
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
- &key);
- GNUNET_GE_ASSERT(NULL, get1 != NULL);
- for (k = 0; k < NUM_ROUNDS; k++)
- {
- if (GNUNET_shutdown_test() == GNUNET_YES)
- break;
- if (9 == (k % 10))
- {
- printf (".");
- fflush (stdout);
- }
- fflush (stdout);
- GNUNET_thread_sleep (50 * GNUNET_CRON_MILLISECONDS);
- if (last < found)
- break;
- }
- GNUNET_DHT_get_stop (dctx,
- get1);
- if (k == NUM_ROUNDS)
- {
- printf ("?");
- fflush (stdout);
- }
- }
- GNUNET_DHT_context_destroy (dctx);
- printf ("\n");
- }
+ {
+ if (GNUNET_shutdown_test () == GNUNET_YES)
+ break;
+ GNUNET_snprintf (buf, sizeof (buf), "localhost:%u", 2087 + i * 10);
+ GNUNET_GC_set_configuration_value_string (cfg,
+ ectx, "NETWORK", "HOST",
+ buf);
+ dctx = GNUNET_DHT_context_create (cfg, ectx, &result_callback, &c);
+ printf ("Peer %d gets key", i);
+ fflush (stdout);
+ for (j = 0; j < NUM_PEERS; j++)
+ {
+ if (GNUNET_shutdown_test () == GNUNET_YES)
+ break;
+ c = 'A' + j;
+ GNUNET_snprintf (buf, sizeof (buf), "localhost:%u",
+ 2087 + j * 10);
+ GNUNET_hash (buf, strlen (buf), &key);
+ printf (" %d", j);
+ fflush (stdout);
+ last = found;
+ get1 = GNUNET_DHT_get_start (dctx,
+
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+ &key);
+ GNUNET_GE_ASSERT (NULL, get1 != NULL);
+ for (k = 0; k < NUM_ROUNDS; k++)
+ {
+ if (GNUNET_shutdown_test () == GNUNET_YES)
+ break;
+ if (9 == (k % 10))
+ {
+ printf (".");
+ fflush (stdout);
+ }
+ fflush (stdout);
+ GNUNET_thread_sleep (50 * GNUNET_CRON_MILLISECONDS);
+ if (last < found)
+ break;
+ }
+ GNUNET_DHT_get_stop (dctx, get1);
+ if (k == NUM_ROUNDS)
+ {
+ printf ("?");
+ fflush (stdout);
+ }
+ }
+ GNUNET_DHT_context_destroy (dctx);
+ printf ("\n");
+ }
}
/* end of actual test code */
if (r == NUM_REPEAT)
- printf ("Found %u out of %u attempts.\n", found, NUM_PEERS * NUM_PEERS *
r);
+ printf ("Found %u out of %u attempts.\n", found,
+ NUM_PEERS * NUM_PEERS * r);
if (found < NUM_PEERS * NUM_PEERS * r / 2)
{
printf
Modified: GNUnet/src/applications/dht/tools/dht_twopeer_test.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht_twopeer_test.c 2008-12-27
07:49:35 UTC (rev 8031)
+++ GNUnet/src/applications/dht/tools/dht_twopeer_test.c 2008-12-27
07:50:06 UTC (rev 8032)
@@ -111,7 +111,7 @@
struct GNUNET_GC_Configuration *cfg;
struct GNUNET_DHT_Context *ctx_peer1;
struct GNUNET_DHT_Context *ctx_peer2;
- struct GNUNET_DHT_GetRequest * get1;
+ struct GNUNET_DHT_GetRequest *get1;
struct GNUNET_ClientServerConnection *sock;
int left;
int k;
@@ -212,27 +212,26 @@
"NETWORK", "HOST",
"localhost:2087");
GNUNET_hash ("key 1", 5, &key);
- memset (value, 'A', sizeof(value));
+ memset (value, 'A', sizeof (value));
CHECK (GNUNET_OK == GNUNET_DHT_put (cfg,
ectx,
&key,
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
- sizeof(value), value));
+ sizeof (value), value));
GNUNET_hash ("key 2", 5, &key);
- value = GNUNET_malloc (8);
- memset (value, 'B', 8);
+ memset (value, 'B', sizeof (value));
CHECK (GNUNET_OK == GNUNET_DHT_put (cfg,
ectx,
&key,
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
- sizeof(value), value));
+ sizeof (value), value));
GNUNET_hash ("key 1", 5, &key);
peer2count = 10;
printf ("Getting key 1 from peer 2 (stored at peer 1)");
want = 'A';
CHECK (NULL != (get1 = GNUNET_DHT_get_start (ctx_peer2,
-
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
- &key)));
+
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+ &key)));
for (k = 0; k < NUM_ROUNDS; k++)
{
if (0 == (k % 10))
@@ -242,8 +241,7 @@
if (peer2count < 10)
break;
}
- CHECK (GNUNET_OK == GNUNET_DHT_get_stop (ctx_peer2,
- get1));
+ CHECK (GNUNET_OK == GNUNET_DHT_get_stop (ctx_peer2, get1));
printf (peer2count < 10 ? " OK!\n" : "?\n");
CHECK (peer2count < 10);
@@ -252,8 +250,8 @@
peer1count = 10;
want = 'B';
CHECK (NULL != (get1 = GNUNET_DHT_get_start (ctx_peer1,
-
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
- &key)));
+
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+ &key)));
for (k = 0; k < NUM_ROUNDS; k++)
{
if (0 == (k % 10))
@@ -263,8 +261,7 @@
if (peer1count < 10)
break;
}
- CHECK (GNUNET_OK == GNUNET_DHT_get_stop (ctx_peer1,
- get1));
+ CHECK (GNUNET_OK == GNUNET_DHT_get_stop (ctx_peer1, get1));
printf (peer1count < 10 ? " OK!\n" : "?\n");
CHECK (peer1count < 10);
Modified: GNUnet/src/applications/dstore_mysql/dstore_mysql.c
===================================================================
--- GNUnet/src/applications/dstore_mysql/dstore_mysql.c 2008-12-27 07:49:35 UTC
(rev 8031)
+++ GNUnet/src/applications/dstore_mysql/dstore_mysql.c 2008-12-27 07:50:06 UTC
(rev 8032)
@@ -99,7 +99,7 @@
static struct GNUNET_MysqlStatementHandle *update_value;
static int
-itable()
+itable ()
{
#define MRUNS(a) (GNUNET_OK != GNUNET_MYSQL_run_statement (db, a) )
if (MRUNS ("CREATE TEMPORARY TABLE gn080dstore ("
@@ -113,7 +113,7 @@
" INDEX hashidx (hash(64),type,expire),"
" INDEX allidx (hash(64),vhash(64),type,size),"
" INDEX expireidx (puttime)" ") ENGINE=InnoDB") ||
- MRUNS ("SET AUTOCOMMIT = 1") )
+ MRUNS ("SET AUTOCOMMIT = 1"))
return GNUNET_SYSERR;
return GNUNET_OK;
#undef MRUNS
@@ -140,7 +140,7 @@
return GNUNET_SYSERR;
}
#undef PINIT
- return itable();
+ return itable ();
}
static int
@@ -200,36 +200,37 @@
rbind[4].buffer = GNUNET_malloc (GNUNET_MAX_BUFFER_SIZE);
if ((GNUNET_OK !=
(ret = GNUNET_MYSQL_prepared_statement_run_select (select_old_value,
- 5,
- rbind,
- return_ok,
- NULL,
- -1))) ||
+ 5,
+ rbind,
+ return_ok,
+ NULL,
+ -1))) ||
(GNUNET_OK !=
(ret = GNUNET_MYSQL_prepared_statement_run (delete_value,
- NULL,
- MYSQL_TYPE_BLOB,
- &v_key,
- sizeof (GNUNET_HashCode),
- &k_length,
- MYSQL_TYPE_BLOB,
- &vhash,
- sizeof (GNUNET_HashCode),
- &h_length,
- MYSQL_TYPE_LONG,
- &v_type,
- GNUNET_YES,
- MYSQL_TYPE_LONG,
- &v_size,
- GNUNET_YES,
- MYSQL_TYPE_BLOB,
- rbind[4].buffer,
- (unsigned long)
- GNUNET_MAX_BUFFER_SIZE,
&v_length,
- -1))))
+ NULL,
+ MYSQL_TYPE_BLOB,
+ &v_key,
+ sizeof (GNUNET_HashCode),
+ &k_length,
+ MYSQL_TYPE_BLOB,
+ &vhash,
+ sizeof (GNUNET_HashCode),
+ &h_length,
+ MYSQL_TYPE_LONG,
+ &v_type,
+ GNUNET_YES,
+ MYSQL_TYPE_LONG,
+ &v_size,
+ GNUNET_YES,
+ MYSQL_TYPE_BLOB,
+ rbind[4].buffer,
+ (unsigned long)
+ GNUNET_MAX_BUFFER_SIZE,
+ &v_length, -1))))
{
GNUNET_free (rbind[4].buffer);
- if (ret == GNUNET_SYSERR) itable();
+ if (ret == GNUNET_SYSERR)
+ itable ();
return GNUNET_SYSERR;
}
GNUNET_free (rbind[4].buffer);
@@ -299,33 +300,34 @@
v_length = size;
if (GNUNET_OK !=
(ret = GNUNET_MYSQL_prepared_statement_run (insert_value,
- NULL,
- MYSQL_TYPE_LONG,
- &size,
- GNUNET_YES,
- MYSQL_TYPE_LONG,
- &type,
- GNUNET_YES,
- MYSQL_TYPE_LONGLONG,
- &now,
- GNUNET_YES,
- MYSQL_TYPE_LONGLONG,
- &discard_time,
- GNUNET_YES,
- MYSQL_TYPE_BLOB,
- key,
- sizeof (GNUNET_HashCode),
- &k_length,
- MYSQL_TYPE_BLOB,
- &vhash,
- sizeof (GNUNET_HashCode),
- &h_length,
- MYSQL_TYPE_BLOB,
- data,
- (unsigned long) size,
- &v_length, -1)))
+ NULL,
+ MYSQL_TYPE_LONG,
+ &size,
+ GNUNET_YES,
+ MYSQL_TYPE_LONG,
+ &type,
+ GNUNET_YES,
+ MYSQL_TYPE_LONGLONG,
+ &now,
+ GNUNET_YES,
+ MYSQL_TYPE_LONGLONG,
+ &discard_time,
+ GNUNET_YES,
+ MYSQL_TYPE_BLOB,
+ key,
+ sizeof (GNUNET_HashCode),
+ &k_length,
+ MYSQL_TYPE_BLOB,
+ &vhash,
+ sizeof (GNUNET_HashCode),
+ &h_length,
+ MYSQL_TYPE_BLOB,
+ data,
+ (unsigned long) size,
+ &v_length, -1)))
{
- if (ret == GNUNET_SYSERR) itable();
+ if (ret == GNUNET_SYSERR)
+ itable ();
return GNUNET_SYSERR;
}
if (bloom != NULL)
@@ -375,23 +377,24 @@
rbind[0].is_unsigned = GNUNET_YES;
if ((GNUNET_OK !=
(ret = GNUNET_MYSQL_prepared_statement_run_select (count_value,
- 1,
- rbind,
- return_ok,
- NULL,
- MYSQL_TYPE_BLOB,
- key,
- sizeof
(GNUNET_HashCode),
- &h_length,
- MYSQL_TYPE_LONG,
- &type,
- GNUNET_YES,
- MYSQL_TYPE_LONGLONG,
- &now,
- GNUNET_YES,
- -1))) || (-1 ==
total))
+ 1,
+ rbind,
+ return_ok,
+ NULL,
+ MYSQL_TYPE_BLOB,
+ key,
+ sizeof
+ (GNUNET_HashCode),
+ &h_length,
+ MYSQL_TYPE_LONG,
+ &type, GNUNET_YES,
+ MYSQL_TYPE_LONGLONG,
+ &now, GNUNET_YES,
+ -1)))
+ || (-1 == total))
{
- if (ret == GNUNET_SYSERR) itable();
+ if (ret == GNUNET_SYSERR)
+ itable ();
return GNUNET_SYSERR;
}
if ((handler == NULL) || (total == 0))
@@ -412,26 +415,31 @@
off = (off + 1) % total;
if ((GNUNET_OK !=
(ret = GNUNET_MYSQL_prepared_statement_run_select (select_value,
- 2,
- rbind,
- return_ok,
- NULL,
- MYSQL_TYPE_BLOB,
- key,
- sizeof
- (GNUNET_HashCode),
- &h_length,
- MYSQL_TYPE_LONG,
&type,
- GNUNET_YES,
-
MYSQL_TYPE_LONGLONG,
- &now, GNUNET_YES,
- MYSQL_TYPE_LONG,
&off,
- GNUNET_YES, -1)))
+ 2,
+ rbind,
+ return_ok,
+ NULL,
+ MYSQL_TYPE_BLOB,
+ key,
+ sizeof
+
(GNUNET_HashCode),
+ &h_length,
+ MYSQL_TYPE_LONG,
+ &type,
+ GNUNET_YES,
+
MYSQL_TYPE_LONGLONG,
+ &now,
+ GNUNET_YES,
+ MYSQL_TYPE_LONG,
+ &off,
+ GNUNET_YES,
+ -1)))
|| (v_length != v_size))
{
GNUNET_GE_BREAK (NULL, v_length == v_size);
GNUNET_free (rbind[1].buffer);
- if (ret == GNUNET_SYSERR) itable();
+ if (ret == GNUNET_SYSERR)
+ itable ();
return GNUNET_SYSERR;
}
cnt++;
Modified: GNUnet/src/applications/dstore_sqlite/dstore.c
===================================================================
--- GNUnet/src/applications/dstore_sqlite/dstore.c 2008-12-27 07:49:35 UTC
(rev 8031)
+++ GNUnet/src/applications/dstore_sqlite/dstore.c 2008-12-27 07:50:06 UTC
(rev 8032)
@@ -330,8 +330,8 @@
#if DEBUG_DSTORE
GNUNET_GE_LOG (coreAPI->ectx,
GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_DEVELOPER,
- "dstore processes put `%.*s' with expiration %llu\n",
- size, data, discard_time);
+ "dstore processes put `%.*s' with expiration %llu\n",
+ size, data, discard_time);
#endif
/* first try UPDATE */
@@ -500,8 +500,7 @@
#if DEBUG_DSTORE
GNUNET_GE_LOG (coreAPI->ectx,
GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_DEVELOPER,
- "dstore processes get at `%llu'\n",
- now);
+ "dstore processes get at `%llu'\n", now);
#endif
if (sq_prepare (dbh,
"SELECT count(*) FROM ds080 WHERE key=? AND type=? AND
expire >= ?",
Modified: GNUnet/src/applications/dv/module/dv.c
===================================================================
--- GNUnet/src/applications/dv/module/dv.c 2008-12-27 07:49:35 UTC (rev
8031)
+++ GNUnet/src/applications/dv/module/dv.c 2008-12-27 07:50:06 UTC (rev
8032)
@@ -382,8 +382,8 @@
if (GNUNET_multi_hash_map_size (ctx->direct_neighbors) == 0)
return NULL;
- return (struct GNUNET_dv_neighbor *) GNUNET_multi_hash_map_get_random (ctx->
-
direct_neighbors);
+ return (struct GNUNET_dv_neighbor *)
+ GNUNET_multi_hash_map_get_random (ctx->direct_neighbors);
}
static struct GNUNET_dv_neighbor *
@@ -469,19 +469,18 @@
if (GNUNET_SYSERR ==
- coreAPI->
- peer_disconnect_notification_register (&peer_disconnect_handler, NULL))
+ coreAPI->peer_disconnect_notification_register
+ (&peer_disconnect_handler, NULL))
ok = GNUNET_SYSERR;
if (GNUNET_SYSERR ==
- coreAPI->
- peer_connect_notification_register (&peer_connect_handler, NULL))
+ coreAPI->peer_connect_notification_register (&peer_connect_handler,
+ NULL))
ok = GNUNET_SYSERR;
if (GNUNET_SYSERR ==
- coreAPI->
- p2p_ciphertext_handler_register (GNUNET_P2P_PROTO_DV_NEIGHBOR_MESSAGE,
- &p2pHandleDVNeighborMessage))
+ coreAPI->p2p_ciphertext_handler_register
+ (GNUNET_P2P_PROTO_DV_NEIGHBOR_MESSAGE, &p2pHandleDVNeighborMessage))
ok = GNUNET_SYSERR;
@@ -531,9 +530,8 @@
done_module_dv ()
{
ctx->closing = 1;
- coreAPI->
- p2p_ciphertext_handler_unregister (GNUNET_P2P_PROTO_DV_NEIGHBOR_MESSAGE,
- &p2pHandleDVNeighborMessage);
+ coreAPI->p2p_ciphertext_handler_unregister
+ (GNUNET_P2P_PROTO_DV_NEIGHBOR_MESSAGE, &p2pHandleDVNeighborMessage);
coreAPI->peer_disconnect_notification_unregister (&peer_disconnect_handler,
NULL);
Modified: GNUnet/src/applications/fs/collection/collection.c
===================================================================
--- GNUnet/src/applications/fs/collection/collection.c 2008-12-27 07:49:35 UTC
(rev 8031)
+++ GNUnet/src/applications/fs/collection/collection.c 2008-12-27 07:50:06 UTC
(rev 8032)
@@ -520,9 +520,12 @@
GNUNET_OK == GNUNET_ECRS_directory_create (ectx,
&dirData,
&dirLen,
-
collectionData->file_count,
-
collectionData->files,
-
collectionData->meta));
+ collectionData->
+ file_count,
+ collectionData->
+ files,
+ collectionData->
+ meta));
if (-1 == WRITE (fd, dirData, dirLen))
{
GNUNET_GE_LOG_STRERROR (ectx,
@@ -536,10 +539,10 @@
GNUNET_free (dirData);
CLOSE (fd);
if (GNUNET_OK != GNUNET_ECRS_file_upload (ectx, cfg, tmpName, GNUNET_NO,
/* indexing */
- ntohl (collectionData->
- data.anonymityLevel),
- ntohl (collectionData->
- data.priority),
+ ntohl (collectionData->data.
+ anonymityLevel),
+ ntohl (collectionData->data.
+ priority),
GNUNET_get_time () +
COLLECTION_ADV_LIFETIME, NULL,
NULL, NULL, NULL, &directoryURI))
@@ -564,10 +567,10 @@
uri = GNUNET_ECRS_namespace_add_content (ectx,
cfg,
&collectionData->data.pid,
- ntohl (collectionData->
- data.anonymityLevel),
- ntohl (collectionData->
- data.priority),
+ ntohl (collectionData->data.
+ anonymityLevel),
+ ntohl (collectionData->data.
+ priority),
GNUNET_get_time () +
COLLECTION_ADV_LIFETIME,
this_revision_string,
Modified: GNUnet/src/applications/fs/ecrs/download.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/download.c 2008-12-27 07:49:35 UTC (rev
8031)
+++ GNUnet/src/applications/fs/ecrs/download.c 2008-12-27 07:50:06 UTC (rev
8032)
@@ -223,14 +223,14 @@
while (rm->head != NULL)
{
pos = rm->head;
- GNUNET_DLL_remove(rm->head, rm->tail, pos);
+ GNUNET_DLL_remove (rm->head, rm->tail, pos);
if (rm->my_sctx != GNUNET_YES)
GNUNET_FS_stop_search (rm->sctx, &content_receive_callback, pos);
GNUNET_free (pos);
}
if (rm->my_sctx != GNUNET_YES)
GNUNET_FS_resume_search_context (rm->sctx);
- GNUNET_GE_ASSERT(NULL, rm->tail == NULL);
+ GNUNET_GE_ASSERT (NULL, rm->tail == NULL);
if (rm->handle >= 0)
CLOSE (rm->handle);
if (rm->main != NULL)
@@ -302,7 +302,7 @@
{
struct GNUNET_ECRS_DownloadContext *rm = node->ctx;
- GNUNET_DLL_insert(rm->head, rm->tail, node);
+ GNUNET_DLL_insert (rm->head, rm->tail, node);
GNUNET_FS_start_search (rm->sctx,
rm->have_target == GNUNET_NO ? NULL : &rm->target,
GNUNET_ECRS_BLOCKTYPE_DATA, 1,
@@ -331,7 +331,7 @@
{
struct GNUNET_ECRS_DownloadContext *rm = node->ctx;
- GNUNET_DLL_remove(rm->head, rm->tail, node);
+ GNUNET_DLL_remove (rm->head, rm->tail, node);
GNUNET_free (node);
if (rm->head == NULL)
GNUNET_thread_stop_sleep (rm->main);
Modified: GNUnet/src/applications/fs/ecrs/namespace.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/namespace.c 2008-12-27 07:49:35 UTC (rev
8031)
+++ GNUnet/src/applications/fs/ecrs/namespace.c 2008-12-27 07:50:06 UTC (rev
8032)
@@ -309,8 +309,8 @@
sizeof (unsigned
int),
&ksb->sblock,
- &ksb->
- kblock.signature));
+ &ksb->kblock.
+ signature));
/* extra check: verify sig */
GNUNET_RSA_free_key (pk);
if (GNUNET_OK != GNUNET_FS_insert (sock, knvalue))
Modified: GNUnet/src/applications/fs/fsui/fsui.c
===================================================================
--- GNUnet/src/applications/fs/fsui/fsui.c 2008-12-27 07:49:35 UTC (rev
8031)
+++ GNUnet/src/applications/fs/fsui/fsui.c 2008-12-27 07:50:06 UTC (rev
8032)
@@ -338,19 +338,17 @@
if (pos->mandatoryMatchesRemaining == 0)
{
- ((GNUNET_ECRS_FileInfo *) event->data.SearchResumed.fis)[event->data.
- SearchResumed.
- fisSize] =
- pos->fi;
- event->data.SearchResumed.availability_rank[event->data.SearchResumed.
- fisSize] =
+ ((GNUNET_ECRS_FileInfo *) event->data.SearchResumed.fis)[event->
+
data.SearchResumed.fisSize]
+ = pos->fi;
+ event->data.SearchResumed.availability_rank[event->data.
+ SearchResumed.fisSize] =
pos->probeSuccess - pos->probeFailure;
- event->data.SearchResumed.availability_certainty[event->data.
- SearchResumed.
- fisSize] =
- pos->probeSuccess + pos->probeFailure;
- event->data.SearchResumed.applicability_rank[event->data.SearchResumed.
- fisSize] =
+ event->data.SearchResumed.availability_certainty[event->
+
data.SearchResumed.fisSize]
+ = pos->probeSuccess + pos->probeFailure;
+ event->data.SearchResumed.applicability_rank[event->data.
+ SearchResumed.fisSize] =
pos->matchingSearchCount;
event->data.SearchResumed.fisSize++;
}
Modified: GNUnet/src/applications/fs/gap/gap.c
===================================================================
--- GNUnet/src/applications/fs/gap/gap.c 2008-12-27 07:49:35 UTC (rev
8031)
+++ GNUnet/src/applications/fs/gap/gap.c 2008-12-27 07:50:06 UTC (rev
8032)
@@ -303,7 +303,7 @@
}
if (stats != NULL)
stats->change (stat_gap_query_refreshed, 1);
- total_priority += priority;
+ total_priority += priority;
rl->value += priority;
rl->remaining_value += priority;
rl->expiration = newTTL;
@@ -325,7 +325,7 @@
}
/* update BF */
if (rl->bloomfilter != NULL)
- GNUNET_bloomfilter_free (rl->bloomfilter);
+ GNUNET_bloomfilter_free (rl->bloomfilter);
rl->bloomfilter_mutator = filter_mutator;
rl->bloomfilter_size = filter_size;
if (filter_size > 0)
@@ -498,7 +498,7 @@
value += rl->value;
rl_value = rl->value;
total_priority -= rl->value;
- rl->value = 0;
+ rl->value = 0;
if (rl->type == GNUNET_ECRS_BLOCKTYPE_DATA)
{
@@ -506,8 +506,8 @@
table[index] = rl->next;
else
prev->next = rl->next;
- active_request_count--;
- total_priority -= rl->value;
+ active_request_count--;
+ total_priority -= rl->value;
GNUNET_FS_SHARED_free_request_list (rl);
if (prev == NULL)
rl = table[index];
@@ -599,8 +599,8 @@
table[i] = rl->next;
else
prev->next = rl->next;
- active_request_count--;
- total_priority -= rl->value;
+ active_request_count--;
+ total_priority -= rl->value;
GNUNET_FS_SHARED_free_request_list (rl);
if (prev == NULL)
rl = table[i];
@@ -723,8 +723,8 @@
while (NULL != (rl = table[i]))
{
table[i] = rl->next;
- active_request_count--;
- total_priority -= rl->value;
+ active_request_count--;
+ total_priority -= rl->value;
GNUNET_FS_SHARED_free_request_list (rl);
}
}
@@ -741,8 +741,8 @@
coreAPI->service_release (stats);
stats = NULL;
}
- GNUNET_GE_BREAK(NULL, active_request_count == 0);
- GNUNET_GE_BREAK(NULL, total_priority == 0);
+ GNUNET_GE_BREAK (NULL, active_request_count == 0);
+ GNUNET_GE_BREAK (NULL, total_priority == 0);
return 0;
}
Modified: GNUnet/src/applications/fs/gap/plan.c
===================================================================
--- GNUnet/src/applications/fs/gap/plan.c 2008-12-27 07:49:35 UTC (rev
8031)
+++ GNUnet/src/applications/fs/gap/plan.c 2008-12-27 07:50:06 UTC (rev
8032)
@@ -341,7 +341,7 @@
while (total-- > 0)
pos = pos->next;
/* insert into datastructure at pos */
- GNUNET_DLL_insert_after(qpl->head, qpl->tail, pos, entry);
+ GNUNET_DLL_insert_after (qpl->head, qpl->tail, pos, entry);
}
/**
@@ -724,7 +724,7 @@
if (ret != 0)
{
/* remove e from e's doubly-linked list */
- GNUNET_DLL_remove(pl->head, pl->tail, e);
+ GNUNET_DLL_remove (pl->head, pl->tail, e);
/* remove e from singly-linked list of request */
prev = NULL;
pos = e->request->plan_entries;
Modified: GNUnet/src/applications/fs/gap/shared.c
===================================================================
--- GNUnet/src/applications/fs/gap/shared.c 2008-12-27 07:49:35 UTC (rev
8031)
+++ GNUnet/src/applications/fs/gap/shared.c 2008-12-27 07:50:06 UTC (rev
8032)
@@ -49,7 +49,7 @@
{
planl = rl->plan_entries;
rl->plan_entries = planl->plan_entries_next;
- GNUNET_DLL_remove(planl->list->head, planl->list->tail, planl);
+ GNUNET_DLL_remove (planl->list->head, planl->list->tail, planl);
GNUNET_free (planl);
}
if (rl->bloomfilter != NULL)
Modified: GNUnet/src/applications/fs/tools/gnunet-unindex.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-unindex.c 2008-12-27 07:49:35 UTC
(rev 8031)
+++ GNUnet/src/applications/fs/tools/gnunet-unindex.c 2008-12-27 07:50:06 UTC
(rev 8032)
@@ -75,9 +75,9 @@
event->data.UnindexCompleted.total,
delta / GNUNET_CRON_SECONDS,
(delta ==
- 0) ? (double) (-1.0) : (double) (event->
- data.UnindexCompleted.
- total / 1024.0 *
+ 0) ? (double) (-1.0) : (double) (event->data.
+ UnindexCompleted.total /
+ 1024.0 *
GNUNET_CRON_SECONDS /
delta));
}
Modified: GNUnet/src/applications/testing/remote.c
===================================================================
--- GNUnet/src/applications/testing/remote.c 2008-12-27 07:49:35 UTC (rev
8031)
+++ GNUnet/src/applications/testing/remote.c 2008-12-27 07:50:06 UTC (rev
8032)
@@ -408,7 +408,8 @@
GNUNET_REMOTE_start_daemon (remote_gnunetd_path, "/tmp/",
temp, remote_config_path,
curr_host, ssh_username,
-
temp_pos->remote_friend_file_path);
+ temp_pos->
+ remote_friend_file_path);
GNUNET_GC_get_configuration_value_number (basecfg,
"NETWORK",
Modified: GNUnet/src/applications/testing/remotetopologies.c
===================================================================
--- GNUnet/src/applications/testing/remotetopologies.c 2008-12-27 07:49:35 UTC
(rev 8031)
+++ GNUnet/src/applications/testing/remotetopologies.c 2008-12-27 07:50:06 UTC
(rev 8032)
@@ -380,13 +380,15 @@
{
fprintf (stderr, ".");
if (GNUNET_YES == GNUNET_IDENTITY_request_connect (sock1,
-
&h2->senderIdentity))
+ &h2->
+
senderIdentity))
{
ret = GNUNET_OK;
break;
}
if (GNUNET_YES == GNUNET_IDENTITY_request_connect (sock2,
-
&h1->senderIdentity))
+ &h1->
+
senderIdentity))
{
ret = GNUNET_OK;
break;
Modified: GNUnet/src/applications/testing/testing.c
===================================================================
--- GNUnet/src/applications/testing/testing.c 2008-12-27 07:49:35 UTC (rev
8031)
+++ GNUnet/src/applications/testing/testing.c 2008-12-27 07:50:06 UTC (rev
8032)
@@ -283,7 +283,8 @@
fprintf (stderr, ".");
#endif
if (GNUNET_YES == GNUNET_IDENTITY_request_connect (sock1,
-
&h2->senderIdentity))
+ &h2->
+
senderIdentity))
{
ret = GNUNET_OK;
GNUNET_free_non_null (h1);
@@ -291,7 +292,8 @@
break;
}
if (GNUNET_YES == GNUNET_IDENTITY_request_connect (sock2,
-
&h1->senderIdentity))
+ &h1->
+
senderIdentity))
{
ret = GNUNET_OK;
GNUNET_free_non_null (h1);
Modified: GNUnet/src/applications/topology_default/topology.c
===================================================================
--- GNUnet/src/applications/topology_default/topology.c 2008-12-27 07:49:35 UTC
(rev 8031)
+++ GNUnet/src/applications/topology_default/topology.c 2008-12-27 07:50:06 UTC
(rev 8032)
@@ -453,7 +453,7 @@
"/friends", &fn);
/**Nate change, don't beat me up if it's not pretty!*/
if (GNUNET_OK != GNUNET_disk_file_test (ectx, fn))
- GNUNET_disk_file_write (ectx, fn, NULL, 0, "600");
+ GNUNET_disk_file_write (ectx, fn, NULL, 0, "600");
if ((0 == GNUNET_disk_file_test (ectx, fn)) || (0 != STAT (fn, &frstat)))
{
GNUNET_free (fn);
@@ -471,7 +471,7 @@
friends_mtime = frstat.st_mtime;
else
{
- GNUNET_free_non_null(fn);
+ GNUNET_free_non_null (fn);
return 0;
}
if ((fn != NULL) && (frstat.st_size > 0))
Modified: GNUnet/src/include/gnunet_dht_lib.h
===================================================================
--- GNUnet/src/include/gnunet_dht_lib.h 2008-12-27 07:49:35 UTC (rev 8031)
+++ GNUnet/src/include/gnunet_dht_lib.h 2008-12-27 07:50:06 UTC (rev 8032)
@@ -55,11 +55,15 @@
* GNUNET_SYSERR
* @return NULL on error
*/
-struct GNUNET_DHT_Context *
-GNUNET_DHT_context_create (struct GNUNET_GC_Configuration *cfg,
- struct GNUNET_GE_Context *ectx,
- GNUNET_ResultProcessor resultCallback,
- void *resCallbackClosure);
+struct GNUNET_DHT_Context *GNUNET_DHT_context_create (struct
+ GNUNET_GC_Configuration
+ *cfg,
+ struct GNUNET_GE_Context
+ *ectx,
+ GNUNET_ResultProcessor
+ resultCallback,
+ void
+ *resCallbackClosure);
/**
* Start an asynchronous GET operation on the DHT looking for
@@ -69,9 +73,10 @@
* @param key the key to look up
* @return NULL on error
*/
-struct GNUNET_DHT_GetRequest *
-GNUNET_DHT_get_start (struct GNUNET_DHT_Context *ctx,
- unsigned int type, const GNUNET_HashCode * key);
+struct GNUNET_DHT_GetRequest *GNUNET_DHT_get_start (struct GNUNET_DHT_Context
+ *ctx, unsigned int type,
+ const GNUNET_HashCode *
+ key);
/**
* Stop an asynchronous GET operation on the DHT looking for
@@ -81,7 +86,7 @@
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
int GNUNET_DHT_get_stop (struct GNUNET_DHT_Context *ctx,
- struct GNUNET_DHT_GetRequest * handle);
+ struct GNUNET_DHT_GetRequest *handle);
/**
* Destroy a previously created context for DHT operations.
Modified: GNUnet/src/include/gnunet_util_containers.h
===================================================================
--- GNUnet/src/include/gnunet_util_containers.h 2008-12-27 07:49:35 UTC (rev
8031)
+++ GNUnet/src/include/gnunet_util_containers.h 2008-12-27 07:50:06 UTC (rev
8032)
@@ -538,7 +538,7 @@
(head) = (element);
/**
- * Insert an element into a DLL after the given other
+ * Insert an element into a DLL after the given other
* element. Insert at the head if the other
* element is NULL.
*/
@@ -557,7 +557,7 @@
if (NULL == (element)->next) \
(tail) = (element); \
else \
- (element)->next->prev = (element);
+ (element)->next->prev = (element);
Modified: GNUnet/src/include/plibc.h
===================================================================
--- GNUnet/src/include/plibc.h 2008-12-27 07:49:35 UTC (rev 8031)
+++ GNUnet/src/include/plibc.h 2008-12-27 07:50:06 UTC (rev 8032)
@@ -1,787 +1,582 @@
-/*
- This file is part of PlibC.
- (C) 2005, 2006, 2007, 2008 Nils Durner (and other contributing authors)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
+/*
+ This file is part of PlibC.
+ (C) 2005, 2006, 2007, 2008 Nils Durner (and other contributing authors)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
*/
-
-
-/**
- * @file include/plibc.h
- * @brief PlibC header
- * @attention This file is usually not installed under Unix,
- * so ship it with your application
- * @version $Revision: 1.46 $
- */
-
-#ifndef _PLIBC_H_
-#define _PLIBC_H_
-
-#ifndef SIGALRM
-#define SIGALRM 14
-#endif /*
+
+/**
+ * @file include/plibc.h
+ * @brief PlibC header
+ * @attention This file is usually not installed under Unix,
+ * so ship it with your application
+ * @version $Revision: 1.46 $
*/
-
-#ifdef __cplusplus
+
+#ifndef _PLIBC_H_
+#define _PLIBC_H_
+
+#ifndef SIGALRM
+#define SIGALRM 14
+#endif /* */
+
+#ifdef __cplusplus
extern "C"
{
-
-#endif /*
- */
-
-#ifdef Q_OS_WIN32
-#define WINDOWS 1
-#endif /*
- */
-
-#define HAVE_PLIBC_FD 0
-
-#ifdef WINDOWS
-
-#if ENABLE_NLS
-#include "langinfo.h"
-#endif /*
- */
-
-#include <windows.h>
-#include <Ws2tcpip.h>
-#include <time.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <errno.h>
-#include <stdarg.h>
-
-#define __BYTE_ORDER BYTE_ORDER
-#define __BIG_ENDIAN BIG_ENDIAN
-
-/* Conflicts with our definitions */
-#define __G_WIN32_H__
-
-/* Convert LARGE_INTEGER to double */
-#define Li2Double(x) ((double)((x).HighPart) * 4.294967296E9 + \
- (double) ((x).LowPart))
-
-#define socklen_t int
-#define ssize_t int
-#define off_t int
-#define int64_t long long
-#define int32_t long
-
-struct stat64
+
+#endif /* */
+
+#ifdef Q_OS_WIN32
+#define WINDOWS 1
+#endif /* */
+
+#define HAVE_PLIBC_FD 0
+
+#ifdef WINDOWS
+
+#if ENABLE_NLS
+#include "langinfo.h"
+#endif /* */
+
+#include <windows.h>
+#include <Ws2tcpip.h>
+#include <time.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <dirent.h>
+#include <errno.h>
+#include <stdarg.h>
+
+#define __BYTE_ORDER BYTE_ORDER
+#define __BIG_ENDIAN BIG_ENDIAN
+
+/* Conflicts with our definitions */
+#define __G_WIN32_H__
+
+/* Convert LARGE_INTEGER to double */
+#define Li2Double(x) ((double)((x).HighPart) * 4.294967296E9 + \
+ (double) ((x).LowPart))
+#define socklen_t int
+#define ssize_t int
+#define off_t int
+#define int64_t long long
+#define int32_t long
+ struct stat64
{
-
-_dev_t st_dev;
-
-_ino_t st_ino;
-
-_mode_t st_mode;
-
-short st_nlink;
-
-short st_uid;
-
-short st_gid;
-
- _dev_t st_rdev;
-
- __int64 st_size;
-
- __time64_t st_atime;
-
- __time64_t st_mtime;
-
- __time64_t st_ctime;
-
-};
-
-
-#ifndef pid_t
-#define pid_t int
-#endif /*
- */
-
-#ifndef WEXITSTATUS
-#define WEXITSTATUS(status) (((status) & 0xff00) >> 8)
-#endif /*
- */
-
-/* Thanks to the Cygwin project */
-#define ENOCSI 43 /* No CSI structure available */
-#define EL2HLT 44 /* Level 2 halted */
-#ifndef EDEADLK
-#define EDEADLK 45 /* Deadlock condition */
-#endif /*
- */
-#ifndef ENOLCK
-#define ENOLCK 46 /* No record locks available */
-#endif /*
- */
-#define EBADE 50 /* Invalid exchange */
-#define EBADR 51 /* Invalid request descriptor */
-#define EXFULL 52 /* Exchange full */
-#define ENOANO 53 /* No anode */
-#define EBADRQC 54 /* Invalid request code */
-#define EBADSLT 55 /* Invalid slot */
-#ifndef EDEADLOCK
-#define EDEADLOCK EDEADLK /* File locking deadlock error */
-#endif /*
- */
-#define EBFONT 57 /* Bad font file fmt */
-#define ENOSTR 60 /* Device not a stream */
-#define ENODATA 61 /* No data (for no delay io) */
-#define ETIME 62 /* Timer expired */
-#define ENOSR 63 /* Out of streams resources */
-#define ENONET 64 /* Machine is not on the network */
-#define ENOPKG 65 /* Package not installed */
-#define EREMOTE 66 /* The object is remote */
-#define ENOLINK 67 /* The link has been severed */
-#define EADV 68 /* Advertise error */
-#define ESRMNT 69 /* Srmount error */
-#define ECOMM 70 /* Communication error on send */
-#define EPROTO 71 /* Protocol error */
-#define EMULTIHOP 74 /* Multihop attempted */
-#define ELBIN 75 /* Inode is remote (not really error) */
-#define EDOTDOT 76 /* Cross mount point (not really error) */
-#define EBADMSG 77 /* Trying to read unreadable message */
-#define ENOTUNIQ 80 /* Given log. name not unique */
-#define EBADFD 81 /* f.d. invalid for this operation */
-#define EREMCHG 82 /* Remote address changed */
-#define ELIBACC 83 /* Can't access a needed shared lib */
-#define ELIBBAD 84 /* Accessing a corrupted shared lib */
-#define ELIBSCN 85 /* .lib section in a.out corrupted */
-#define ELIBMAX 86 /* Attempting to link in too many libs */
-#define ELIBEXEC 87 /* Attempting to exec a shared library */
-#ifndef ENOSYS
-#define ENOSYS 88 /* Function not implemented */
-#endif /*
- */
-#define ENMFILE 89 /* No more files */
-#ifndef ENOTEMPTY
-#define ENOTEMPTY 90 /* Directory not empty */
-#endif /*
- */
-#ifndef ENAMETOOLONG
-#define ENAMETOOLONG 91 /* File or path name too long */
-#endif /*
- */
-#define ELOOP 92 /* Too many symbolic links */
-#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
-#define EPFNOSUPPORT 96 /* Protocol family not supported */
-#define ECONNRESET 104 /* Connection reset by peer */
-#define ENOBUFS 105 /* No buffer space available */
-#define EAFNOSUPPORT 106 /* Address family not supported by protocol family */
-#define EPROTOTYPE 107 /* Protocol wrong type for socket */
-#define ENOTSOCK 108 /* Socket operation on non-socket */
-#define ENOPROTOOPT 109 /* Protocol not available */
-#define ESHUTDOWN 110 /* Can't send after socket shutdown */
-#define ECONNREFUSED 111 /* Connection refused */
-#define EADDRINUSE 112 /* Address already in use */
-#define ECONNABORTED 113 /* Connection aborted */
-#define ENETUNREACH 114 /* Network is unreachable */
-#define ENETDOWN 115 /* Network interface is not configured */
-#ifndef ETIMEDOUT
-#define ETIMEDOUT 116 /* Connection timed out */
-#endif /*
- */
-#define EHOSTDOWN 117 /* Host is down */
-#define EHOSTUNREACH 118 /* Host is unreachable */
-#define EINPROGRESS 119 /* Connection already in progress */
-#define EALREADY 120 /* Socket already connected */
-#define EDESTADDRREQ 121 /* Destination address required */
-#define EMSGSIZE 122 /* Message too long */
-#define EPROTONOSUPPORT 123 /* Unknown protocol */
-#define ESOCKTNOSUPPORT 124 /* Socket type not supported */
-#define EADDRNOTAVAIL 125 /* Address not available */
-#define ENETRESET 126 /* Connection aborted by network */
-#define EISCONN 127 /* Socket is already connected */
-#define ENOTCONN 128 /* Socket is not connected */
-#define ETOOMANYREFS 129 /* Too many references: cannot splice */
-#define EPROCLIM 130 /* Too many processes */
-#define EUSERS 131 /* Too many users */
-#define EDQUOT 132 /* Disk quota exceeded */
-#define ESTALE 133 /* Unknown error */
-#ifndef ENOTSUP
-#define ENOTSUP 134 /* Not supported */
-#endif /*
- */
-#define ENOMEDIUM 135 /* No medium (in tape drive) */
-#define ENOSHARE 136 /* No such host or network path */
-#define ECASECLASH 137 /* Filename exists with different case */
-#define EWOULDBLOCK EAGAIN /* Operation would block */
-#define EOVERFLOW 139 /* Value too large for defined data type */
-
-#undef HOST_NOT_FOUND
-#define HOST_NOT_FOUND 1
-#undef TRY_AGAIN
-#define TRY_AGAIN 2
-#undef NO_RECOVERY
-#define NO_RECOVERY 3
-#undef NO_ADDRESS
-#define NO_ADDRESS 4
-
-#define PROT_READ 0x1
-#define PROT_WRITE 0x2
-#define MAP_SHARED 0x1
-#define MAP_PRIVATE 0x2 /* unsupported */
-#define MAP_FIXED 0x10
-#define MAP_FAILED ((void *)-1)
-
-struct statfs
+ _dev_t st_dev;
+ _ino_t st_ino;
+ _mode_t st_mode;
+ short st_nlink;
+ short st_uid;
+ short st_gid;
+ _dev_t st_rdev;
+ __int64 st_size;
+ __time64_t st_atime;
+ __time64_t st_mtime;
+ __time64_t st_ctime;
+ };
+
+#ifndef pid_t
+#define pid_t int
+#endif /* */
+
+#ifndef WEXITSTATUS
+#define WEXITSTATUS(status) (((status) & 0xff00) >> 8)
+#endif /* */
+
+/* Thanks to the Cygwin project */
+#define ENOCSI 43 /* No CSI structure available */
+#define EL2HLT 44 /* Level 2 halted */
+#ifndef EDEADLK
+#define EDEADLK 45 /* Deadlock condition */
+#endif /* */
+#ifndef ENOLCK
+#define ENOLCK 46 /* No record locks available */
+#endif /* */
+#define EBADE 50 /* Invalid exchange */
+#define EBADR 51 /* Invalid request descriptor */
+#define EXFULL 52 /* Exchange full */
+#define ENOANO 53 /* No anode */
+#define EBADRQC 54 /* Invalid request code */
+#define EBADSLT 55 /* Invalid slot */
+#ifndef EDEADLOCK
+#define EDEADLOCK EDEADLK /* File locking deadlock error */
+#endif /* */
+#define EBFONT 57 /* Bad font file fmt */
+#define ENOSTR 60 /* Device not a stream */
+#define ENODATA 61 /* No data (for no delay io) */
+#define ETIME 62 /* Timer expired */
+#define ENOSR 63 /* Out of streams resources */
+#define ENONET 64 /* Machine is not on the network */
+#define ENOPKG 65 /* Package not installed */
+#define EREMOTE 66 /* The object is remote */
+#define ENOLINK 67 /* The link has been severed */
+#define EADV 68 /* Advertise error */
+#define ESRMNT 69 /* Srmount error */
+#define ECOMM 70 /* Communication error on send */
+#define EPROTO 71 /* Protocol error */
+#define EMULTIHOP 74 /* Multihop attempted */
+#define ELBIN 75 /* Inode is remote (not really error) */
+#define EDOTDOT 76 /* Cross mount point (not really error) */
+#define EBADMSG 77 /* Trying to read unreadable message */
+#define ENOTUNIQ 80 /* Given log. name not unique */
+#define EBADFD 81 /* f.d. invalid for this operation */
+#define EREMCHG 82 /* Remote address changed */
+#define ELIBACC 83 /* Can't access a needed shared lib */
+#define ELIBBAD 84 /* Accessing a corrupted shared lib */
+#define ELIBSCN 85 /* .lib section in a.out corrupted */
+#define ELIBMAX 86 /* Attempting to link in too many libs */
+#define ELIBEXEC 87 /* Attempting to exec a shared library */
+#ifndef ENOSYS
+#define ENOSYS 88 /* Function not implemented */
+#endif /* */
+#define ENMFILE 89 /* No more files */
+#ifndef ENOTEMPTY
+#define ENOTEMPTY 90 /* Directory not empty */
+#endif /* */
+#ifndef ENAMETOOLONG
+#define ENAMETOOLONG 91 /* File or path name too long */
+#endif /* */
+#define ELOOP 92 /* Too many symbolic links */
+#define EOPNOTSUPP 95 /* Operation not supported on transport
endpoint */
+#define EPFNOSUPPORT 96 /* Protocol family not supported */
+#define ECONNRESET 104 /* Connection reset by peer */
+#define ENOBUFS 105 /* No buffer space available */
+#define EAFNOSUPPORT 106 /* Address family not supported by protocol
family */
+#define EPROTOTYPE 107 /* Protocol wrong type for socket */
+#define ENOTSOCK 108 /* Socket operation on non-socket */
+#define ENOPROTOOPT 109 /* Protocol not available */
+#define ESHUTDOWN 110 /* Can't send after socket shutdown */
+#define ECONNREFUSED 111 /* Connection refused */
+#define EADDRINUSE 112 /* Address already in use */
+#define ECONNABORTED 113 /* Connection aborted */
+#define ENETUNREACH 114 /* Network is unreachable */
+#define ENETDOWN 115 /* Network interface is not configured */
+#ifndef ETIMEDOUT
+#define ETIMEDOUT 116 /* Connection timed out */
+#endif /* */
+#define EHOSTDOWN 117 /* Host is down */
+#define EHOSTUNREACH 118 /* Host is unreachable */
+#define EINPROGRESS 119 /* Connection already in progress */
+#define EALREADY 120 /* Socket already connected */
+#define EDESTADDRREQ 121 /* Destination address required */
+#define EMSGSIZE 122 /* Message too long */
+#define EPROTONOSUPPORT 123 /* Unknown protocol */
+#define ESOCKTNOSUPPORT 124 /* Socket type not supported */
+#define EADDRNOTAVAIL 125 /* Address not available */
+#define ENETRESET 126 /* Connection aborted by network */
+#define EISCONN 127 /* Socket is already connected */
+#define ENOTCONN 128 /* Socket is not connected */
+#define ETOOMANYREFS 129 /* Too many references: cannot splice */
+#define EPROCLIM 130 /* Too many processes */
+#define EUSERS 131 /* Too many users */
+#define EDQUOT 132 /* Disk quota exceeded */
+#define ESTALE 133 /* Unknown error */
+#ifndef ENOTSUP
+#define ENOTSUP 134 /* Not supported */
+#endif /* */
+#define ENOMEDIUM 135 /* No medium (in tape drive) */
+#define ENOSHARE 136 /* No such host or network path */
+#define ECASECLASH 137 /* Filename exists with different case */
+#define EWOULDBLOCK EAGAIN /* Operation would block */
+#define EOVERFLOW 139 /* Value too large for defined data type */
+
+#undef HOST_NOT_FOUND
+#define HOST_NOT_FOUND 1
+#undef TRY_AGAIN
+#define TRY_AGAIN 2
+#undef NO_RECOVERY
+#define NO_RECOVERY 3
+#undef NO_ADDRESS
+#define NO_ADDRESS 4
+
+#define PROT_READ 0x1
+#define PROT_WRITE 0x2
+#define MAP_SHARED 0x1
+#define MAP_PRIVATE 0x2 /* unsupported */
+#define MAP_FIXED 0x10
+#define MAP_FAILED ((void *)-1)
+ struct statfs
{
-
-long f_type; /* type of filesystem (see below) */
-
-long f_bsize; /* optimal transfer block size */
-
-long f_blocks; /* total data blocks in file system */
-
-long f_bfree; /* free blocks in fs */
-
-long f_bavail; /* free blocks avail to non-superuser */
-
-long f_files; /* total file nodes in file system */
-
-long f_ffree; /* free file nodes in fs */
-
-long f_fsid; /* file system id */
-
-long f_namelen; /* maximum length of filenames */
-
-long f_spare[6]; /* spare for later */
-
-};
-
-
-extern const struct in6_addr in6addr_any; /* :: */
-
-extern const struct in6_addr in6addr_loopback; /* ::1 */
-
-
-/* Taken from the Wine project <http://www.winehq.org>
- /wine/include/winternl.h */
- enum SYSTEM_INFORMATION_CLASS
- {
-SystemBasicInformation = 0,
-Unknown1,
-SystemPerformanceInformation =
- 2,
-SystemTimeOfDayInformation = 3, /* was SystemTimeInformation */
- Unknown4,
-SystemProcessInformation =
- 5,
-Unknown6,
-Unknown7,
-SystemProcessorPerformanceInformation =
- 8,
-Unknown9,
-Unknown10,
-SystemDriverInformation,
-Unknown12,
-
-Unknown13,
-Unknown14,
-Unknown15,
-SystemHandleList,
-Unknown17,
-
-Unknown18,
-Unknown19,
-Unknown20,
-SystemCacheInformation,
-
-Unknown22,
-SystemInterruptInformation =
- 23,
-SystemExceptionInformation =
- 33,
-SystemRegistryQuotaInformation =
- 37,
-SystemLookasideInformation = 45
+ long f_type; /* type of filesystem (see below) */
+ long f_bsize; /* optimal transfer block size */
+ long f_blocks; /* total data blocks in file system */
+ long f_bfree; /* free blocks in fs */
+ long f_bavail; /* free blocks avail to non-superuser */
+ long f_files; /* total file nodes in file system */
+ long f_ffree; /* free file nodes in fs */
+ long f_fsid; /* file system id */
+ long f_namelen; /* maximum length of filenames */
+ long f_spare[6]; /* spare for later */
};
-
-
-typedef struct
+ extern const struct in6_addr in6addr_any; /* :: */
+ extern const struct in6_addr in6addr_loopback; /* ::1 */
+
+/* Taken from the Wine project <http://www.winehq.org>
+ /wine/include/winternl.h */
+ enum SYSTEM_INFORMATION_CLASS
+ { SystemBasicInformation = 0, Unknown1, SystemPerformanceInformation = 2,
SystemTimeOfDayInformation = 3, /* was SystemTimeInformation */
+ Unknown4, SystemProcessInformation =
+ 5, Unknown6, Unknown7, SystemProcessorPerformanceInformation =
+ 8, Unknown9, Unknown10, SystemDriverInformation, Unknown12,
+ Unknown13, Unknown14, Unknown15, SystemHandleList, Unknown17,
+ Unknown18, Unknown19, Unknown20, SystemCacheInformation,
+ Unknown22, SystemInterruptInformation =
+ 23, SystemExceptionInformation =
+ 33, SystemRegistryQuotaInformation = 37, SystemLookasideInformation = 45
+ };
+ typedef struct
{
-
-LARGE_INTEGER IdleTime;
-
-LARGE_INTEGER KernelTime;
-
-LARGE_INTEGER UserTime;
-
-LARGE_INTEGER Reserved1[2];
-
-ULONG Reserved2;
-
-} SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
-
-
-#define sleep(secs) (Sleep(secs * 1000))
-
-/*********************** statfs *****************************/
-/* fake block size */
-#define FAKED_BLOCK_SIZE 512
-
-/* linux-compatible values for fs type */
-#define MSDOS_SUPER_MAGIC 0x4d44
-#define NTFS_SUPER_MAGIC 0x5346544E
-
-/*********************** End of statfs ***********************/
-
-#define SHUT_RDWR SD_BOTH
-
-/* Operations for flock() */
-#define LOCK_SH 1 /* shared lock */
-#define LOCK_EX 2 /* exclusive lock */
-#define LOCK_NB 4 /* or'd with one of the above to prevent
- blocking */
-#define LOCK_UN 8 /* remove lock */
-
-/* Not supported under MinGW */
-#define S_IRGRP 0
-#define S_IWGRP 0
-#define S_IROTH 0
-#define S_IXGRP 0
-#define S_IWOTH 0
-#define S_IXOTH 0
-#define S_ISUID 0
-#define S_ISGID 0
-#define S_ISVTX 0
-#define S_IRWXG 0
-#define S_IRWXO 0
-
-#define SHUT_WR SD_SEND
-#define SHUT_RD SD_RECEIVE
-#define SHUT_RDWR SD_BOTH
-
-#define SIGKILL 9
-#define SIGTERM 15
-
-#define SetErrnoFromWinError(e) _SetErrnoFromWinError(e, __FILE__, __LINE__)
-
-BOOL _plibc_CreateShortcut (const char *pszSrc, const char *pszDest);
-
-BOOL _plibc_DereferenceShortcut (char *pszShortcut);
-
-char *plibc_ChooseDir (char *pszTitle, unsigned long ulFlags);
-
-char *plibc_ChooseFile (char *pszTitle, unsigned long ulFlags);
-
-long QueryRegistry (HKEY hMainKey, char *pszKey, char *pszSubKey,
-
-char *pszBuffer, long *pdLength);
-
-
-BOOL __win_IsHandleMarkedAsBlocking (SOCKET hHandle);
-
-void __win_SetHandleBlockingMode (SOCKET s, BOOL bBlocking);
-
-void __win_DiscardHandleBlockingMode (SOCKET s);
-
-int _win_isSocketValid (int s);
-
-int plibc_conv_to_win_path (const char *pszUnix, char *pszWindows);
-
-unsigned plibc_get_handle_count ();
-
-
-typedef void (*TPanicProc) (int, char *);
-
-void plibc_set_panic_proc (TPanicProc proc);
-
-
-int flock (int fd, int operation);
-
-int fsync (int fildes);
-
-int inet_pton (int af, const char *src, void *dst);
-
-int inet_pton4 (const char *src, u_char * dst, int pton);
-
-#if USE_IPV6
+ LARGE_INTEGER IdleTime;
+ LARGE_INTEGER KernelTime;
+ LARGE_INTEGER UserTime;
+ LARGE_INTEGER Reserved1[2];
+ ULONG Reserved2;
+ } SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
+
+#define sleep(secs) (Sleep(secs * 1000))
+
+/*********************** statfs *****************************/
+/* fake block size */
+#define FAKED_BLOCK_SIZE 512
+
+/* linux-compatible values for fs type */
+#define MSDOS_SUPER_MAGIC 0x4d44
+#define NTFS_SUPER_MAGIC 0x5346544E
+
+/*********************** End of statfs ***********************/
+
+#define SHUT_RDWR SD_BOTH
+
+/* Operations for flock() */
+#define LOCK_SH 1 /* shared lock */
+#define LOCK_EX 2 /* exclusive lock */
+#define LOCK_NB 4 /* or'd with one of the above to prevent
+ blocking */
+#define LOCK_UN 8 /* remove lock */
+
+/* Not supported under MinGW */
+#define S_IRGRP 0
+#define S_IWGRP 0
+#define S_IROTH 0
+#define S_IXGRP 0
+#define S_IWOTH 0
+#define S_IXOTH 0
+#define S_ISUID 0
+#define S_ISGID 0
+#define S_ISVTX 0
+#define S_IRWXG 0
+#define S_IRWXO 0
+
+#define SHUT_WR SD_SEND
+#define SHUT_RD SD_RECEIVE
+#define SHUT_RDWR SD_BOTH
+
+#define SIGKILL 9
+#define SIGTERM 15
+
+#define SetErrnoFromWinError(e) _SetErrnoFromWinError(e, __FILE__, __LINE__)
+ BOOL _plibc_CreateShortcut (const char *pszSrc, const char *pszDest);
+ BOOL _plibc_DereferenceShortcut (char *pszShortcut);
+ char *plibc_ChooseDir (char *pszTitle, unsigned long ulFlags);
+ char *plibc_ChooseFile (char *pszTitle, unsigned long ulFlags);
+ long QueryRegistry (HKEY hMainKey, char *pszKey, char *pszSubKey,
+ char *pszBuffer, long *pdLength);
+ BOOL __win_IsHandleMarkedAsBlocking (SOCKET hHandle);
+ void __win_SetHandleBlockingMode (SOCKET s, BOOL bBlocking);
+ void __win_DiscardHandleBlockingMode (SOCKET s);
+ int _win_isSocketValid (int s);
+ int plibc_conv_to_win_path (const char *pszUnix, char *pszWindows);
+ unsigned plibc_get_handle_count ();
+ typedef void (*TPanicProc) (int, char *);
+ void plibc_set_panic_proc (TPanicProc proc);
+ int flock (int fd, int operation);
+ int fsync (int fildes);
+ int inet_pton (int af, const char *src, void *dst);
+ int inet_pton4 (const char *src, u_char * dst, int pton);
+
+#if USE_IPV6
int inet_pton6 (const char *src, u_char * dst);
-
-#endif /*
- */
+
+#endif /* */
int truncate (const char *fname, int distance);
-
-int statfs (const char *path, struct statfs *buf);
-
-const char *hstrerror (int err);
-
-void gettimeofday (struct timeval *tp, void *tzp);
-
-int mkstemp (char *tmplate);
-
-char *strptime (const char *buf, const char *format, struct tm *tm);
-
-char *ctime (const time_t * clock);
-
-char *ctime_r (const time_t * clock, char *buf);
-
-const char *inet_ntop (int af, const void *src, char *dst, size_t size);
-
-int plibc_init (char *pszOrg, char *pszApp);
-
-void plibc_shutdown ();
-
-int plibc_initialized ();
-
-int plibc_conv_to_win_path_ex (const char *pszUnix, char *pszWindows,
- int derefLinks);
-
-void _SetErrnoFromWinError (long lWinError, char *pszCaller, int iLine);
-
-void SetErrnoFromWinsockError (long lWinError);
-
-void SetHErrnoFromWinError (long lWinError);
-
-void SetErrnoFromHRESULT (HRESULT hRes);
-
-FILE * _win_fopen (const char *filename, const char *mode);
-
-DIR * _win_opendir (const char *dirname);
-
-int _win_open (const char *filename, int oflag, ...);
-
-#ifdef ENABLE_NLS
+ int statfs (const char *path, struct statfs *buf);
+ const char *hstrerror (int err);
+ void gettimeofday (struct timeval *tp, void *tzp);
+ int mkstemp (char *tmplate);
+ char *strptime (const char *buf, const char *format, struct tm *tm);
+ char *ctime (const time_t * clock);
+ char *ctime_r (const time_t * clock, char *buf);
+ const char *inet_ntop (int af, const void *src, char *dst, size_t size);
+ int plibc_init (char *pszOrg, char *pszApp);
+ void plibc_shutdown ();
+ int plibc_initialized ();
+ int plibc_conv_to_win_path_ex (const char *pszUnix, char *pszWindows,
+ int derefLinks);
+ void _SetErrnoFromWinError (long lWinError, char *pszCaller, int iLine);
+ void SetErrnoFromWinsockError (long lWinError);
+ void SetHErrnoFromWinError (long lWinError);
+ void SetErrnoFromHRESULT (HRESULT hRes);
+ FILE *_win_fopen (const char *filename, const char *mode);
+ DIR *_win_opendir (const char *dirname);
+ int _win_open (const char *filename, int oflag, ...);
+
+#ifdef ENABLE_NLS
char *_win_bindtextdomain (const char *domainname, const char *dirname);
-
-#endif /*
- */
+
+#endif /* */
int _win_chdir (const char *path);
-
-int _win_close (int fd);
-
-int _win_creat (const char *path, mode_t mode);
-
-int _win_fstat (int handle, struct stat *buffer);
-
-int _win_ftruncate (int fildes, off_t length);
-
-int _win_kill (pid_t pid, int sig);
-
-int _win_pipe (int *phandles);
-
-int _win_rmdir (const char *path);
-
-int _win_access (const char *path, int mode);
-
-int _win_chmod (const char *filename, int pmode);
-
-char *realpath (const char *file_name, char *resolved_name);
-
-long _win_random (void);
-
-int _win_remove (const char *path);
-
-int _win_rename (const char *oldname, const char *newname);
-
-int _win_stat (const char *path, struct stat *buffer);
-
-int _win_stat64 (const char *path, struct stat64 *buffer);
-
-int _win_unlink (const char *filename);
-
-int _win_write (int fildes, const void *buf, size_t nbyte);
-
-int _win_read (int fildes, void *buf, size_t nbyte);
-
-size_t _win_fwrite (const void *buffer, size_t size, size_t count,
- FILE * stream);
-
-size_t _win_fread (void *buffer, size_t size, size_t count, FILE * stream);
-
-int _win_symlink (const char *path1, const char *path2);
-
-void *_win_mmap (void *start, size_t len, int access, int flags, int fd,
-
-unsigned long long offset);
-
-int _win_munmap (void *start, size_t length);
-
-int _win_lstat (const char *path, struct stat *buf);
-
-int _win_lstat64 (const char *path, struct stat64 *buf);
-
-int _win_readlink (const char *path, char *buf, size_t bufsize);
-
-int _win_accept (SOCKET s, struct sockaddr *addr, int *addrlen);
-
-int _win_printf (const char *format, ...);
-
-int _win_fprintf (FILE * f, const char *format, ...);
-
-int _win_vprintf (const char *format, va_list ap);
-
-int _win_vfprintf (FILE * stream, const char *format, va_list arg_ptr);
-
-int _win_vsprintf (char *dest, const char *format, va_list arg_ptr);
-
-int _win_vsnprintf (char *str, size_t size, const char *format,
- va_list arg_ptr);
-
-int _win_snprintf (char *str, size_t size, const char *format, ...);
-
-int _win_sprintf (char *dest, const char *format, ...);
-
-int _win_vsscanf (const char *str, const char *format, va_list arg_ptr);
-
-int _win_sscanf (const char *str, const char *format, ...);
-
-int _win_vfscanf (FILE * stream, const char *format, va_list arg_ptr);
-
-int _win_vscanf (const char *format, va_list arg_ptr);
-
-int _win_scanf (const char *format, ...);
-
-int _win_fscanf (FILE * stream, const char *format, ...);
-
-pid_t _win_waitpid (pid_t pid, int *stat_loc, int options);
-
-int _win_bind (SOCKET s, const struct sockaddr *name, int namelen);
-
-int _win_connect (SOCKET s, const struct sockaddr *name, int namelen);
-
-int _win_getpeername (SOCKET s, struct sockaddr *name,
-int *namelen);
-
-int _win_getsockname (SOCKET s, struct sockaddr *name,
-int *namelen);
-
-int _win_getsockopt (SOCKET s, int level, int optname, char *optval,
-
-int *optlen);
-
-int _win_listen (SOCKET s, int backlog);
-
-int _win_recv (SOCKET s, char *buf, int len, int flags);
-
-int _win_recvfrom (SOCKET s, void *buf, int len, int flags,
-
-struct sockaddr *from, int *fromlen);
-
-int _win_select (int max_fd, fd_set * rfds, fd_set * wfds, fd_set * efds,
-
-const struct timeval *tv);
-
-int _win_send (SOCKET s, const char *buf, int len, int flags);
-
-int _win_sendto (SOCKET s, const char *buf, int len, int flags,
-
-const struct sockaddr *to, int tolen);
-
-int _win_setsockopt (SOCKET s, int level, int optname, const void *optval,
-
-int optlen);
-
-int _win_shutdown (SOCKET s, int how);
-
-SOCKET _win_socket (int af, int type, int protocol);
-
-struct hostent *_win_gethostbyaddr (const char *addr, int len, int type);
-
-struct hostent *_win_gethostbyname (const char *name);
-
-struct hostent *gethostbyname2 (const char *name, int af);
-
-char *_win_strerror (int errnum);
-
-int IsWinNT ();
-
-char *index (const char *s, int c);
-
-
-#if !HAVE_STRNDUP
+ int _win_close (int fd);
+ int _win_creat (const char *path, mode_t mode);
+ int _win_fstat (int handle, struct stat *buffer);
+ int _win_ftruncate (int fildes, off_t length);
+ int _win_kill (pid_t pid, int sig);
+ int _win_pipe (int *phandles);
+ int _win_rmdir (const char *path);
+ int _win_access (const char *path, int mode);
+ int _win_chmod (const char *filename, int pmode);
+ char *realpath (const char *file_name, char *resolved_name);
+ long _win_random (void);
+ int _win_remove (const char *path);
+ int _win_rename (const char *oldname, const char *newname);
+ int _win_stat (const char *path, struct stat *buffer);
+ int _win_stat64 (const char *path, struct stat64 *buffer);
+ int _win_unlink (const char *filename);
+ int _win_write (int fildes, const void *buf, size_t nbyte);
+ int _win_read (int fildes, void *buf, size_t nbyte);
+ size_t _win_fwrite (const void *buffer, size_t size, size_t count,
+ FILE * stream);
+ size_t _win_fread (void *buffer, size_t size, size_t count, FILE * stream);
+ int _win_symlink (const char *path1, const char *path2);
+ void *_win_mmap (void *start, size_t len, int access, int flags, int fd,
+ unsigned long long offset);
+ int _win_munmap (void *start, size_t length);
+ int _win_lstat (const char *path, struct stat *buf);
+ int _win_lstat64 (const char *path, struct stat64 *buf);
+ int _win_readlink (const char *path, char *buf, size_t bufsize);
+ int _win_accept (SOCKET s, struct sockaddr *addr, int *addrlen);
+ int _win_printf (const char *format, ...);
+ int _win_fprintf (FILE * f, const char *format, ...);
+ int _win_vprintf (const char *format, va_list ap);
+ int _win_vfprintf (FILE * stream, const char *format, va_list arg_ptr);
+ int _win_vsprintf (char *dest, const char *format, va_list arg_ptr);
+ int _win_vsnprintf (char *str, size_t size, const char *format,
+ va_list arg_ptr);
+ int _win_snprintf (char *str, size_t size, const char *format, ...);
+ int _win_sprintf (char *dest, const char *format, ...);
+ int _win_vsscanf (const char *str, const char *format, va_list arg_ptr);
+ int _win_sscanf (const char *str, const char *format, ...);
+ int _win_vfscanf (FILE * stream, const char *format, va_list arg_ptr);
+ int _win_vscanf (const char *format, va_list arg_ptr);
+ int _win_scanf (const char *format, ...);
+ int _win_fscanf (FILE * stream, const char *format, ...);
+ pid_t _win_waitpid (pid_t pid, int *stat_loc, int options);
+ int _win_bind (SOCKET s, const struct sockaddr *name, int namelen);
+ int _win_connect (SOCKET s, const struct sockaddr *name, int namelen);
+ int _win_getpeername (SOCKET s, struct sockaddr *name, int *namelen);
+ int _win_getsockname (SOCKET s, struct sockaddr *name, int *namelen);
+ int _win_getsockopt (SOCKET s, int level, int optname, char *optval,
+ int *optlen);
+ int _win_listen (SOCKET s, int backlog);
+ int _win_recv (SOCKET s, char *buf, int len, int flags);
+ int _win_recvfrom (SOCKET s, void *buf, int len, int flags,
+ struct sockaddr *from, int *fromlen);
+ int _win_select (int max_fd, fd_set * rfds, fd_set * wfds, fd_set * efds,
+ const struct timeval *tv);
+ int _win_send (SOCKET s, const char *buf, int len, int flags);
+ int _win_sendto (SOCKET s, const char *buf, int len, int flags,
+ const struct sockaddr *to, int tolen);
+ int _win_setsockopt (SOCKET s, int level, int optname, const void *optval,
+ int optlen);
+ int _win_shutdown (SOCKET s, int how);
+ SOCKET _win_socket (int af, int type, int protocol);
+ struct hostent *_win_gethostbyaddr (const char *addr, int len, int type);
+ struct hostent *_win_gethostbyname (const char *name);
+ struct hostent *gethostbyname2 (const char *name, int af);
+ char *_win_strerror (int errnum);
+ int IsWinNT ();
+ char *index (const char *s, int c);
+
+#if !HAVE_STRNDUP
char *strndup (const char *s, size_t n);
-
-#endif /*
- */
-#if !HAVE_STRNLEN
+
+#endif /* */
+#if !HAVE_STRNLEN
size_t strnlen (const char *str, size_t maxlen);
-
-#endif /*
- */
-
-#define strcasecmp(a, b) stricmp(a, b)
-#define strncasecmp(a, b, c) strnicmp(a, b, c)
-
-#endif /* WINDOWS */
-
-#ifndef WINDOWS
-#define DIR_SEPARATOR '/'
-#define DIR_SEPARATOR_STR "/"
-#define PATH_SEPARATOR ';'
-#define PATH_SEPARATOR_STR ";"
-#define NEWLINE "\n"
-
-#ifdef ENABLE_NLS
-#define BINDTEXTDOMAIN(d, n) bindtextdomain(d, n)
-#endif /*
- */
-#define CREAT(p, m) creat(p, m)
-#undef FOPEN
-#define FOPEN(f, m) fopen(f, m)
-#define FTRUNCATE(f, l) ftruncate(f, l)
-#define OPENDIR(d) opendir(d)
-#define OPEN open
-#define CHDIR(d) chdir(d)
-#define CLOSE(f) close(f)
-#define LSEEK(f, o, w) lseek(f, o, w)
-#define RMDIR(f) rmdir(f)
-#define ACCESS(p, m) access(p, m)
-#define CHMOD(f, p) chmod(f, p)
-#define FSTAT(h, b) fstat(h, b)
-#define PLIBC_KILL(p, s) kill(p, s)
-#define PIPE(h) pipe(h)
-#define REMOVE(p) remove(p)
-#define RENAME(o, n) rename(o, n)
-#define STAT(p, b) stat(p, b)
-#define STAT64(p, b) stat64(p, b)
-#define UNLINK(f) unlink(f)
-#define WRITE(f, b, n) write(f, b, n)
-#define READ(f, b, n) read(f, b, n)
-#define GN_FREAD(b, s, c, f) fread(b, s, c, f)
-#define GN_FWRITE(b, s, c, f) fwrite(b, s, c, f)
-#define SYMLINK(a, b) symlink(a, b)
-#define MMAP(s, l, p, f, d, o) mmap(s, l, p, f, d, o)
-#define MUNMAP(s, l) munmap(s, l)
-#define STRERROR(i) strerror(i)
-#define RANDOM() random()
-#define READLINK(p, b, s) readlink(p, b, s)
-#define LSTAT(p, b) lstat(p, b)
-#define LSTAT64(p, b) lstat64(p, b)
-#define PRINTF printf
-#define FPRINTF fprintf
-#define VPRINTF(f, a) vprintf(f, a)
-#define VFPRINTF(s, f, a) vfprintf(s, f, a)
-#define VSPRINTF(d, f, a) vsprintf(d, f, a)
-#define VSNPRINTF(str, size, fmt, a) vsnprintf(str, size, fmt, a)
-#define _REAL_SNPRINTF snprintf
-#define SPRINTF sprintf
-#define VSSCANF(s, f, a) vsscanf(s, f, a)
-#define SSCANF sscanf
-#define VFSCANF(s, f, a) vfscanf(s, f, a)
-#define VSCANF(f, a) vscanf(f, a)
-#define SCANF scanf
-#define FSCANF fscanf
-#define WAITPID(p, s, o) waitpid(p, s, o)
-#define ACCEPT(s, a, l) accept(s, a, l)
-#define BIND(s, n, l) bind(s, n, l)
-#define CONNECT(s, n, l) connect(s, n, l)
-#define GETPEERNAME(s, n, l) getpeername(s, n, l)
-#define GETSOCKNAME(s, n, l) getsockname(s, n, l)
-#define GETSOCKOPT(s, l, o, v, p) getsockopt(s, l, o, v, p)
-#define LISTEN(s, b) listen(s, b)
-#define RECV(s, b, l, f) recv(s, b, l, f)
-#define RECVFROM(s, b, l, f, r, o) recvfrom(s, b, l, f, r, o)
-#define SELECT(n, r, w, e, t) select(n, r, w, e, t)
-#define SEND(s, b, l, f) send(s, b, l, f)
-#define SENDTO(s, b, l, f, o, n) sendto(s, b, l, f, o, n)
-#define SETSOCKOPT(s, l, o, v, n) setsockopt(s, l, o, v, n)
-#define SHUTDOWN(s, h) shutdown(s, h)
-#define SOCKET(a, t, p) socket(a, t, p)
-#define GETHOSTBYADDR(a, l, t) gethostbyname(a, l, t)
-#define GETHOSTBYNAME(n) gethostbyname(n)
-#else /*
- */
-#define DIR_SEPARATOR '\\'
-#define DIR_SEPARATOR_STR "\\"
-#define PATH_SEPARATOR ':'
-#define PATH_SEPARATOR_STR ":"
-#define NEWLINE "\r\n"
-
-#ifdef ENABLE_NLS
-#define BINDTEXTDOMAIN(d, n) _win_bindtextdomain(d, n)
-#endif /*
- */
-#define CREAT(p, m) _win_creat(p, m)
-#define FOPEN(f, m) _win_fopen(f, m)
-#define FTRUNCATE(f, l) _win_ftruncate(f, l)
-#define OPENDIR(d) _win_opendir(d)
-#define OPEN _win_open
-#define CHDIR(d) _win_chdir(d)
-#define CLOSE(f) _win_close(f)
-#define PLIBC_KILL(p, s) _win_kill(p, s)
-#define LSEEK(f, o, w) _win_lseek(f, o, w)
-#define FSTAT(h, b) _win_fstat(h, b)
-#define RMDIR(f) _win_rmdir(f)
-#define ACCESS(p, m) _win_access(p, m)
-#define CHMOD(f, p) _win_chmod(f, p)
-#define PIPE(h) _win_pipe(h)
-#define RANDOM() _win_random()
-#define REMOVE(p) _win_remove(p)
-#define RENAME(o, n) _win_rename(o, n)
-#define STAT(p, b) _win_stat(p, b)
-#define STAT64(p, b) _win_stat64(p, b)
-#define UNLINK(f) _win_unlink(f)
-#define WRITE(f, b, n) _win_write(f, b, n)
-#define READ(f, b, n) _win_read(f, b, n)
-#define GN_FREAD(b, s, c, f) _win_fread(b, s, c, f)
-#define GN_FWRITE(b, s, c, f) _win_fwrite(b, s, c, f)
-#define SYMLINK(a, b) _win_symlink(a, b)
-#define MMAP(s, l, p, f, d, o) _win_mmap(s, l, p, f, d, o)
-#define MUNMAP(s, l) _win_munmap(s, l)
-#define STRERROR(i) _win_strerror(i)
-#define READLINK(p, b, s) _win_readlink(p, b, s)
-#define LSTAT(p, b) _win_lstat(p, b)
-#define LSTAT64(p, b) _win_lstat64(p, b)
-#define PRINTF(f, ...) _win_printf(f , __VA_ARGS__)
-#define FPRINTF(fil, fmt, ...) _win_fprintf(fil, fmt, __VA_ARGS__)
-#define VPRINTF(f, a) _win_vprintf(f, a)
-#define VFPRINTF(s, f, a) _win_vfprintf(s, f, a)
-#define VSPRINTF(d, f, a) _win_vsprintf(d, f, a)
-#define VSNPRINTF(str, size, fmt, a) _win_vsnprintf(str, size, fmt, a)
-#define _REAL_SNPRINTF(str, size, fmt, ...) _win_snprintf(str, size, fmt,
__VA_ARGS__)
-#define SPRINTF(d, f, ...) _win_sprintf(d, f, __VA_ARGS__)
-#define VSSCANF(s, f, a) _win_vsscanf(s, f, a)
-#define SSCANF(s, f, ...) _win_sscanf(s, f, __VA_ARGS__)
-#define VFSCANF(s, f, a) _win_vfscanf(s, f, a)
-#define VSCANF(f, a) _win_vscanf(f, a)
-#define SCANF(f, ...) _win_scanf(f, __VA_ARGS__)
-#define FSCANF(s, f, ...) _win_fscanf(s, f, __VA_ARGS__)
-#define WAITPID(p, s, o) _win_waitpid(p, s, o)
-#define ACCEPT(s, a, l) _win_accept(s, a, l)
-#define BIND(s, n, l) _win_bind(s, n, l)
-#define CONNECT(s, n, l) _win_connect(s, n, l)
-#define GETPEERNAME(s, n, l) _win_getpeername(s, n, l)
-#define GETSOCKNAME(s, n, l) _win_getsockname(s, n, l)
-#define GETSOCKOPT(s, l, o, v, p) _win_getsockopt(s, l, o, v, p)
-#define LISTEN(s, b) _win_listen(s, b)
-#define RECV(s, b, l, f) _win_recv(s, b, l, f)
-#define RECVFROM(s, b, l, f, r, o) _win_recvfrom(s, b, l, f, r, o)
-#define SELECT(n, r, w, e, t) _win_select(n, r, w, e, t)
-#define SEND(s, b, l, f) _win_send(s, b, l, f)
-#define SENDTO(s, b, l, f, o, n) _win_sendto(s, b, l, f, o, n)
-#define SETSOCKOPT(s, l, o, v, n) _win_setsockopt(s, l, o, v, n)
-#define SHUTDOWN(s, h) _win_shutdown(s, h)
-#define SOCKET(a, t, p) _win_socket(a, t, p)
-#define GETHOSTBYADDR(a, l, t) _win_gethostbyname(a, l, t)
-#define GETHOSTBYNAME(n) _win_gethostbyname(n)
-#endif /*
- */
-
-
-#ifdef __cplusplus
-}
-#endif /*
- */
-
-
-#endif //_PLIBC_H_
-
-/* end of plibc.h */
+
+#endif /* */
+
+#define strcasecmp(a, b) stricmp(a, b)
+#define strncasecmp(a, b, c) strnicmp(a, b, c)
+
+#endif /* WINDOWS */
+
+#ifndef WINDOWS
+#define DIR_SEPARATOR '/'
+#define DIR_SEPARATOR_STR "/"
+#define PATH_SEPARATOR ';'
+#define PATH_SEPARATOR_STR ";"
+#define NEWLINE "\n"
+
+#ifdef ENABLE_NLS
+#define BINDTEXTDOMAIN(d, n) bindtextdomain(d, n)
+#endif /* */
+#define CREAT(p, m) creat(p, m)
+#undef FOPEN
+#define FOPEN(f, m) fopen(f, m)
+#define FTRUNCATE(f, l) ftruncate(f, l)
+#define OPENDIR(d) opendir(d)
+#define OPEN open
+#define CHDIR(d) chdir(d)
+#define CLOSE(f) close(f)
+#define LSEEK(f, o, w) lseek(f, o, w)
+#define RMDIR(f) rmdir(f)
+#define ACCESS(p, m) access(p, m)
+#define CHMOD(f, p) chmod(f, p)
+#define FSTAT(h, b) fstat(h, b)
+#define PLIBC_KILL(p, s) kill(p, s)
+#define PIPE(h) pipe(h)
+#define REMOVE(p) remove(p)
+#define RENAME(o, n) rename(o, n)
+#define STAT(p, b) stat(p, b)
+#define STAT64(p, b) stat64(p, b)
+#define UNLINK(f) unlink(f)
+#define WRITE(f, b, n) write(f, b, n)
+#define READ(f, b, n) read(f, b, n)
+#define GN_FREAD(b, s, c, f) fread(b, s, c, f)
+#define GN_FWRITE(b, s, c, f) fwrite(b, s, c, f)
+#define SYMLINK(a, b) symlink(a, b)
+#define MMAP(s, l, p, f, d, o) mmap(s, l, p, f, d, o)
+#define MUNMAP(s, l) munmap(s, l)
+#define STRERROR(i) strerror(i)
+#define RANDOM() random()
+#define READLINK(p, b, s) readlink(p, b, s)
+#define LSTAT(p, b) lstat(p, b)
+#define LSTAT64(p, b) lstat64(p, b)
+#define PRINTF printf
+#define FPRINTF fprintf
+#define VPRINTF(f, a) vprintf(f, a)
+#define VFPRINTF(s, f, a) vfprintf(s, f, a)
+#define VSPRINTF(d, f, a) vsprintf(d, f, a)
+#define VSNPRINTF(str, size, fmt, a) vsnprintf(str, size, fmt, a)
+#define _REAL_SNPRINTF snprintf
+#define SPRINTF sprintf
+#define VSSCANF(s, f, a) vsscanf(s, f, a)
+#define SSCANF sscanf
+#define VFSCANF(s, f, a) vfscanf(s, f, a)
+#define VSCANF(f, a) vscanf(f, a)
+#define SCANF scanf
+#define FSCANF fscanf
+#define WAITPID(p, s, o) waitpid(p, s, o)
+#define ACCEPT(s, a, l) accept(s, a, l)
+#define BIND(s, n, l) bind(s, n, l)
+#define CONNECT(s, n, l) connect(s, n, l)
+#define GETPEERNAME(s, n, l) getpeername(s, n, l)
+#define GETSOCKNAME(s, n, l) getsockname(s, n, l)
+#define GETSOCKOPT(s, l, o, v, p) getsockopt(s, l, o, v, p)
+#define LISTEN(s, b) listen(s, b)
+#define RECV(s, b, l, f) recv(s, b, l, f)
+#define RECVFROM(s, b, l, f, r, o) recvfrom(s, b, l, f, r, o)
+#define SELECT(n, r, w, e, t) select(n, r, w, e, t)
+#define SEND(s, b, l, f) send(s, b, l, f)
+#define SENDTO(s, b, l, f, o, n) sendto(s, b, l, f, o, n)
+#define SETSOCKOPT(s, l, o, v, n) setsockopt(s, l, o, v, n)
+#define SHUTDOWN(s, h) shutdown(s, h)
+#define SOCKET(a, t, p) socket(a, t, p)
+#define GETHOSTBYADDR(a, l, t) gethostbyname(a, l, t)
+#define GETHOSTBYNAME(n) gethostbyname(n)
+#else /* */
+#define DIR_SEPARATOR '\\'
+#define DIR_SEPARATOR_STR "\\"
+#define PATH_SEPARATOR ':'
+#define PATH_SEPARATOR_STR ":"
+#define NEWLINE "\r\n"
+
+#ifdef ENABLE_NLS
+#define BINDTEXTDOMAIN(d, n) _win_bindtextdomain(d, n)
+#endif /* */
+#define CREAT(p, m) _win_creat(p, m)
+#define FOPEN(f, m) _win_fopen(f, m)
+#define FTRUNCATE(f, l) _win_ftruncate(f, l)
+#define OPENDIR(d) _win_opendir(d)
+#define OPEN _win_open
+#define CHDIR(d) _win_chdir(d)
+#define CLOSE(f) _win_close(f)
+#define PLIBC_KILL(p, s) _win_kill(p, s)
+#define LSEEK(f, o, w) _win_lseek(f, o, w)
+#define FSTAT(h, b) _win_fstat(h, b)
+#define RMDIR(f) _win_rmdir(f)
+#define ACCESS(p, m) _win_access(p, m)
+#define CHMOD(f, p) _win_chmod(f, p)
+#define PIPE(h) _win_pipe(h)
+#define RANDOM() _win_random()
+#define REMOVE(p) _win_remove(p)
+#define RENAME(o, n) _win_rename(o, n)
+#define STAT(p, b) _win_stat(p, b)
+#define STAT64(p, b) _win_stat64(p, b)
+#define UNLINK(f) _win_unlink(f)
+#define WRITE(f, b, n) _win_write(f, b, n)
+#define READ(f, b, n) _win_read(f, b, n)
+#define GN_FREAD(b, s, c, f) _win_fread(b, s, c, f)
+#define GN_FWRITE(b, s, c, f) _win_fwrite(b, s, c, f)
+#define SYMLINK(a, b) _win_symlink(a, b)
+#define MMAP(s, l, p, f, d, o) _win_mmap(s, l, p, f, d, o)
+#define MUNMAP(s, l) _win_munmap(s, l)
+#define STRERROR(i) _win_strerror(i)
+#define READLINK(p, b, s) _win_readlink(p, b, s)
+#define LSTAT(p, b) _win_lstat(p, b)
+#define LSTAT64(p, b) _win_lstat64(p, b)
+#define PRINTF(f, ...) _win_printf(f , __VA_ARGS__)
+#define FPRINTF(fil, fmt, ...) _win_fprintf(fil, fmt, __VA_ARGS__)
+#define VPRINTF(f, a) _win_vprintf(f, a)
+#define VFPRINTF(s, f, a) _win_vfprintf(s, f, a)
+#define VSPRINTF(d, f, a) _win_vsprintf(d, f, a)
+#define VSNPRINTF(str, size, fmt, a) _win_vsnprintf(str, size, fmt, a)
+#define _REAL_SNPRINTF(str, size, fmt, ...) _win_snprintf(str, size, fmt,
__VA_ARGS__)
+#define SPRINTF(d, f, ...) _win_sprintf(d, f, __VA_ARGS__)
+#define VSSCANF(s, f, a) _win_vsscanf(s, f, a)
+#define SSCANF(s, f, ...) _win_sscanf(s, f, __VA_ARGS__)
+#define VFSCANF(s, f, a) _win_vfscanf(s, f, a)
+#define VSCANF(f, a) _win_vscanf(f, a)
+#define SCANF(f, ...) _win_scanf(f, __VA_ARGS__)
+#define FSCANF(s, f, ...) _win_fscanf(s, f, __VA_ARGS__)
+#define WAITPID(p, s, o) _win_waitpid(p, s, o)
+#define ACCEPT(s, a, l) _win_accept(s, a, l)
+#define BIND(s, n, l) _win_bind(s, n, l)
+#define CONNECT(s, n, l) _win_connect(s, n, l)
+#define GETPEERNAME(s, n, l) _win_getpeername(s, n, l)
+#define GETSOCKNAME(s, n, l) _win_getsockname(s, n, l)
+#define GETSOCKOPT(s, l, o, v, p) _win_getsockopt(s, l, o, v, p)
+#define LISTEN(s, b) _win_listen(s, b)
+#define RECV(s, b, l, f) _win_recv(s, b, l, f)
+#define RECVFROM(s, b, l, f, r, o) _win_recvfrom(s, b, l, f, r, o)
+#define SELECT(n, r, w, e, t) _win_select(n, r, w, e, t)
+#define SEND(s, b, l, f) _win_send(s, b, l, f)
+#define SENDTO(s, b, l, f, o, n) _win_sendto(s, b, l, f, o, n)
+#define SETSOCKOPT(s, l, o, v, n) _win_setsockopt(s, l, o, v, n)
+#define SHUTDOWN(s, h) _win_shutdown(s, h)
+#define SOCKET(a, t, p) _win_socket(a, t, p)
+#define GETHOSTBYADDR(a, l, t) _win_gethostbyname(a, l, t)
+#define GETHOSTBYNAME(n) _win_gethostbyname(n)
+#endif /* */
+
+#ifdef __cplusplus
+}
+#endif /* */
+
+#endif //_PLIBC_H_
+
+/* end of plibc.h */
Modified: GNUnet/src/libs/mysql/lmysql.c
===================================================================
--- GNUnet/src/libs/mysql/lmysql.c 2008-12-27 07:49:35 UTC (rev 8031)
+++ GNUnet/src/libs/mysql/lmysql.c 2008-12-27 07:50:06 UTC (rev 8032)
@@ -490,8 +490,7 @@
if (mysql_stmt_prepare (ret->statement, ret->query, strlen (ret->query)))
{
LOG_MYSQL (GNUNET_GE_ERROR | GNUNET_GE_BULK | GNUNET_GE_USER,
- "mysql_stmt_prepare",
- ret->db);
+ "mysql_stmt_prepare", ret->db);
mysql_stmt_close (ret->statement);
ret->statement = NULL;
iclose ();
Modified: GNUnet/src/server/connection.c
===================================================================
--- GNUnet/src/server/connection.c 2008-12-27 07:49:35 UTC (rev 8031)
+++ GNUnet/src/server/connection.c 2008-12-27 07:50:06 UTC (rev 8032)
@@ -741,8 +741,8 @@
if (root->session.tsession != NULL)
GNUNET_GE_ASSERT (NULL,
GNUNET_OK ==
- transport->assert_associated (root->
- session.tsession,
+ transport->assert_associated (root->session.
+ tsession,
__FILE__));
root = root->overflowChain;
}
@@ -1939,8 +1939,8 @@
stats->change (stat_transmitted, p);
be->available_send_window -= p;
be->lastSequenceNumberSend++;
- GNUNET_CORE_connection_reserve_downstream_bandwidth (&be->
- session.sender, 0);
+ GNUNET_CORE_connection_reserve_downstream_bandwidth (&be->session.
+ sender, 0);
if (be->idealized_limit > be->max_transmitted_limit)
be->max_transmitted_limit = be->idealized_limit;
else /* age */
@@ -2520,8 +2520,8 @@
{
IF_GELOG (ectx,
GNUNET_GE_INFO | GNUNET_GE_BULK | GNUNET_GE_USER,
- GNUNET_hash_to_enc (&entries[u]->session.
- sender.hashPubKey, &enc));
+ GNUNET_hash_to_enc (&entries[u]->session.sender.
+ hashPubKey, &enc));
GNUNET_GE_LOG (ectx,
GNUNET_GE_INFO | GNUNET_GE_BULK | GNUNET_GE_USER,
"peer `%s' transmitted above limit: %llu bpm > %u
bpm\n",
@@ -2544,8 +2544,8 @@
#if DEBUG_CONNECTION
IF_GELOG (ectx,
GNUNET_GE_INFO | GNUNET_GE_BULK | GNUNET_GE_DEVELOPER,
- GNUNET_hash_to_enc (&entries[u]->session.
- sender.hashPubKey, &enc));
+ GNUNET_hash_to_enc (&entries[u]->session.sender.
+ hashPubKey, &enc));
GNUNET_GE_LOG (ectx,
GNUNET_GE_INFO | GNUNET_GE_BULK |
GNUNET_GE_DEVELOPER,
@@ -2606,8 +2606,8 @@
for (u = 0; u < activePeerCount; u++)
{
GNUNET_CORE_connection_reserve_downstream_bandwidth (&entries
- [u]->session.
- sender, 0);
+ [u]->
+ session.sender, 0);
entries[u]->idealized_limit = 0;
}
while ((schedulableBandwidth > activePeerCount * 100) &&
@@ -2941,8 +2941,8 @@
IF_GELOG (ectx,
GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
GNUNET_GE_DEVELOPER,
- GNUNET_hash_to_enc (&root->session.
- sender.hashPubKey, &enc));
+ GNUNET_hash_to_enc (&root->session.sender.
+ hashPubKey, &enc));
GNUNET_GE_LOG (ectx,
GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
GNUNET_GE_DEVELOPER,
@@ -3045,8 +3045,8 @@
IF_GELOG (ectx,
GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
GNUNET_GE_DEVELOPER,
- GNUNET_hash_to_enc (&root->session.
- sender.hashPubKey, &enc));
+ GNUNET_hash_to_enc (&root->session.sender.
+ hashPubKey, &enc));
GNUNET_GE_LOG (ectx,
GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
GNUNET_GE_DEVELOPER,
Modified: GNUnet/src/setup/cocoa/GNUNETSetupView.h
===================================================================
--- GNUnet/src/setup/cocoa/GNUNETSetupView.h 2008-12-27 07:49:35 UTC (rev
8031)
+++ GNUnet/src/setup/cocoa/GNUNETSetupView.h 2008-12-27 07:50:06 UTC (rev
8032)
@@ -31,49 +31,45 @@
@class GNUNETSetupTreeNode;
address@hidden GNUNETSetupView : NSView
address@hidden GNUNETSetupView:NSView
{
- struct GNUNET_GC_Configuration *gnunetConfig;
- struct GNUNET_GNS_Context *gnunetGNSCtx;
- struct GNUNET_GE_Context *gnunetGECtx;
- struct P2W *pws;
- NSMutableArray *controlDelegates;
+ struct GNUNET_GC_Configuration *gnunetConfig;
+ struct GNUNET_GNS_Context *gnunetGNSCtx;
+ struct GNUNET_GE_Context *gnunetGECtx;
+ struct P2W *pws;
+ NSMutableArray *controlDelegates;
- PackingBoxContainer *rootView;
- NSTabView *rootTabView;
- NSTextField *rootTitle;
- GNUNETSetupTreeNode *rootNode;
+ PackingBoxContainer *rootView;
+ NSTabView *rootTabView;
+ NSTextField *rootTitle;
+ GNUNETSetupTreeNode *rootNode;
}
-- (id) init;
-- (id) initWithConfig:(struct GNUNET_GC_Configuration *)config
- setupContext:(struct GNUNET_GNS_Context *)gns
- errorContext:(struct GNUNET_GE_Context *)ectx
- maxWidth:(float)maxWidth;
-- (void) dealloc;
-- (struct GNUNET_GC_Configuration *) gnunetGCConfiguration;
-- (struct GNUNET_GE_Context *) gnunetGEContext;
-- (void) updateVisibility;
-- (void) linkVisibilityNode:(struct GNUNET_GNS_TreeNode *)pos view:(NSView *)w;
-- (int) addNodeToTreeWithTabView:(NSTabView *)tabView
- parent:(GNUNETSetupTreeNode *)parent
- pos:(struct GNUNET_GNS_TreeNode *)pos;
-- (int) addLeafToTreeWithContainer:(PackingBoxContainer *)parent
- pos:(struct GNUNET_GNS_TreeNode *)pos;
-- (void) repackViewTreeFrom:(NSView *)v;
-- (void) alertDidEnd:(NSAlert *)alert
- returnCode:(int)returnCode
- contextInfo:(void *)contextInfo;
-- (void) tabView:(NSTabView *)tabView
- didSelectTabViewItem:(NSTabViewItem *)tabViewItem;
+-(id) init;
+-(id) initWithConfig: (struct GNUNET_GC_Configuration *) config setupContext:
(struct GNUNET_GNS_Context *) gns errorContext: (struct GNUNET_GE_Context *)
ectx maxWidth:(float)
+ maxWidth;
+-(void) dealloc;
+-(struct GNUNET_GC_Configuration *) gnunetGCConfiguration;
+-(struct GNUNET_GE_Context *) gnunetGEContext;
+-(void) updateVisibility;
+-(void) linkVisibilityNode:(struct GNUNET_GNS_TreeNode *)
+ pos view:(NSView *) w;
+-(int) addNodeToTreeWithTabView: (NSTabView *) tabView parent:
(GNUNETSetupTreeNode *) parent pos:(struct GNUNET_GNS_TreeNode *)
+ pos;
+-(int) addLeafToTreeWithContainer: (PackingBoxContainer *) parent pos:(struct
GNUNET_GNS_TreeNode *)
+ pos;
+-(void) repackViewTreeFrom:(NSView *) v;
+-(void) alertDidEnd: (NSAlert *) alert returnCode: (int) returnCode
contextInfo:(void *)
+ contextInfo;
+-(void) tabView: (NSTabView *) tabView didSelectTabViewItem:(NSTabViewItem *)
+ tabViewItem;
// NSOutlineView data source
-- (int)outlineView:(NSOutlineView *)outlineView
numberOfChildrenOfItem:(id)item;
-- (BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item;
-- (id)outlineView:(NSOutlineView *)outlineView
- child:(int)index
- ofItem:(id)item;
-- (id)outlineView:(NSOutlineView *)outlineView
- objectValueForTableColumn:(NSTableColumn *)tableColumn
- byItem:(id)item;
+-(int) outlineView:(NSOutlineView *)
+ outlineView numberOfChildrenOfItem:(id) item;
+-(BOOL) outlineView:(NSOutlineView *)
+ outlineView isItemExpandable:(id) item;
+-(id) outlineView: (NSOutlineView *) outlineView child: (int) index ofItem:(id)
+ item;
+-(id) outlineView: (NSOutlineView *) outlineView objectValueForTableColumn:
(NSTableColumn *) tableColumn byItem:(id)
+ item;
@end
-
Modified: GNUnet/src/setup/cocoa/PackingBoxContainer.h
===================================================================
--- GNUnet/src/setup/cocoa/PackingBoxContainer.h 2008-12-27 07:49:35 UTC
(rev 8031)
+++ GNUnet/src/setup/cocoa/PackingBoxContainer.h 2008-12-27 07:50:06 UTC
(rev 8032)
@@ -11,29 +11,30 @@
#import <Foundation/NSArray.h>
#import <AppKit/NSView.h>
address@hidden PackingBoxContainer : NSView
+@ interface PackingBoxContainer:NSView
{
- NSMutableArray *subviewArray;
- float itemSpacing;
- float horizontalMargins;
- float verticalMargins;
- float maxWidth;
- float maxHeight;
- BOOL isHorizontal;
- BOOL isReversed;
+ NSMutableArray *subviewArray;
+ float itemSpacing;
+ float horizontalMargins;
+ float verticalMargins;
+ float maxWidth;
+ float maxHeight;
+ BOOL isHorizontal;
+ BOOL isReversed;
}
-- (id) init;
-- (id) initWithSpacing:(float)spacing horizontal:(BOOL)horizontal;
-- (void) setReversedPacking:(BOOL)value;
-- (void) setHorizontalMargins:(float)value;
-- (float) horizontalMargins;
-- (void) setVerticalMargins:(float)value;
-- (float) verticalMargins;
-- (void) setMaxWidth:(float)maxWidth;
-- (void) setMaxHeight:(float)maxHeight;
-- (void) dealloc;
-- (void) addSubview:(NSView *)subview;
-- (void) willRemoveSubview:(NSView *)subview;
-- (void) repack;
+
+-(id) init;
+-(id) initWithSpacing:(float)
+ spacing horizontal:(BOOL) horizontal;
+-(void) setReversedPacking:(BOOL) value;
+-(void) setHorizontalMargins:(float) value;
+-(float) horizontalMargins;
+-(void) setVerticalMargins:(float) value;
+-(float) verticalMargins;
+-(void) setMaxWidth:(float) maxWidth;
+-(void) setMaxHeight:(float) maxHeight;
+-(void) dealloc;
+-(void) addSubview:(NSView *) subview;
+-(void) willRemoveSubview:(NSView *) subview;
+-(void) repack;
@end
-
Modified: GNUnet/src/setup/cocoa/config_cocoa.h
===================================================================
--- GNUnet/src/setup/cocoa/config_cocoa.h 2008-12-27 07:49:35 UTC (rev
8031)
+++ GNUnet/src/setup/cocoa/config_cocoa.h 2008-12-27 07:50:06 UTC (rev
8032)
@@ -27,11 +27,10 @@
#define GNUNET_SETUP_COCOA_H
int config_cocoa_mainsetup_cocoa (int argc, const char **argv,
- struct GNUNET_PluginHandle *selfHandle,
- struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- struct GNUNET_GNS_Context *gns,
- const char *filename,
- int is_daemon);
+ struct GNUNET_PluginHandle *selfHandle,
+ struct GNUNET_GE_Context *ectx,
+ struct GNUNET_GC_Configuration *cfg,
+ struct GNUNET_GNS_Context *gns,
+ const char *filename, int is_daemon);
#endif
Modified: GNUnet/src/setup/gnunet-setup.c
===================================================================
--- GNUnet/src/setup/gnunet-setup.c 2008-12-27 07:49:35 UTC (rev 8031)
+++ GNUnet/src/setup/gnunet-setup.c 2008-12-27 07:50:06 UTC (rev 8032)
@@ -211,7 +211,8 @@
#endif
"";
-static const char *INFO_CLIENT_ONLY = "gnunet-setup [OPTIONS]
config|generate-defaults"
+static const char *INFO_CLIENT_ONLY =
+ "gnunet-setup [OPTIONS] config|generate-defaults"
#if HAVE_DIALOG
"|menuconfig"
#endif
@@ -266,8 +267,8 @@
int i;
struct stat buf;
int have_files;
- const char ** modules;
-
+ const char **modules;
+
ectx = GNUNET_GE_create_context_stderr (GNUNET_NO,
GNUNET_GE_WARNING | GNUNET_GE_ERROR
| GNUNET_GE_FATAL | GNUNET_GE_USER |
@@ -300,11 +301,11 @@
GNUNET_malloc (strlen (dirname) + strlen ("config-daemon.scm") + 1);
strcpy (specname, dirname);
strcat (specname, "config-daemon.scm");
- if (0 == ACCESS(specname, R_OK))
+ if (0 == ACCESS (specname, R_OK))
have_files = 1;
strcpy (specname, dirname);
strcat (specname, "config-client.scm");
- if (0 == ACCESS(specname, R_OK))
+ if (0 == ACCESS (specname, R_OK))
have_files |= 2;
GNUNET_free (specname);
GNUNET_free (dirname);
@@ -315,8 +316,9 @@
i = GNUNET_parse_options ((have_files == 2) ? INFO_CLIENT_ONLY : INFO,
ectx,
cfg,
- (have_files == 3) ? gnunetsetupOptions :
gnunetsetupNoDOptions,
- (unsigned int) argc, argv);
+ (have_files ==
+ 3) ? gnunetsetupOptions : gnunetsetupNoDOptions,
+ (unsigned int) argc, argv);
if (i < 0)
{
GNUNET_GC_free (cfg);
@@ -475,9 +477,9 @@
else
{
if (have_files == 2)
- modules = modules_client_only;
+ modules = modules_client_only;
else
- modules = modules_all;
+ modules = modules_all;
done = GNUNET_NO;
i = 0;
while ((done == GNUNET_NO) && (modules[i] != NULL))
Modified: GNUnet/src/setup/lib/gns.c
===================================================================
--- GNUnet/src/setup/lib/gns.c 2008-12-27 07:49:35 UTC (rev 8031)
+++ GNUnet/src/setup/lib/gns.c 2008-12-27 07:50:06 UTC (rev 8032)
@@ -122,8 +122,8 @@
val = GNUNET_GC_get_configuration_value_yesno (cfg,
section,
option,
- pos->value.
- Boolean.def);
+ pos->value.Boolean.
+ def);
if (val == GNUNET_SYSERR)
{
return GNUNET_SYSERR;
@@ -138,9 +138,18 @@
if (GNUNET_SYSERR == GNUNET_GC_get_configuration_value_number (cfg,
section,
option,
-
pos->value.UInt64.min,
-
pos->value.UInt64.max,
-
pos->value.UInt64.def,
+ pos->
+ value.
+ UInt64.
+ min,
+ pos->
+ value.
+ UInt64.
+ max,
+ pos->
+ value.
+ UInt64.
+ def,
&val))
{
return GNUNET_SYSERR;
@@ -185,7 +194,10 @@
if (GNUNET_SYSERR == GNUNET_GC_get_configuration_value_string (cfg,
section,
option,
-
pos->value.String.def,
+ pos->
+ value.
+ String.
+ def,
&val))
return GNUNET_SYSERR;
GNUNET_free (pos->value.String.val);
@@ -202,8 +214,14 @@
(const
char
**)
-
pos->value.String.legalRange,
-
pos->value.String.def,
+ pos->
+ value.
+ String.
+
legalRange,
+ pos->
+ value.
+ String.
+ def,
&ival))
return GNUNET_SYSERR;
GNUNET_free (pos->value.String.val);
Modified: GNUnet/src/setup/lib/tree.c
===================================================================
--- GNUnet/src/setup/lib/tree.c 2008-12-27 07:49:35 UTC (rev 8031)
+++ GNUnet/src/setup/lib/tree.c 2008-12-27 07:50:06 UTC (rev 8032)
@@ -296,10 +296,11 @@
tree = GNUNET_malloc (sizeof (struct GNUNET_GNS_TreeNode));
tree->section = scm_to_locale_string (section);
tree->option = scm_to_locale_string (option);
- tree->untranslatedDescription = scm_to_locale_string
(untranslatedDescription);
- tree->description = _ (tree->untranslatedDescription);
+ tree->untranslatedDescription =
+ scm_to_locale_string (untranslatedDescription);
+ tree->description = _(tree->untranslatedDescription);
tree->untranslatedHelp = scm_to_locale_string (untranslatedHelp);
- tree->help = _ (tree->untranslatedHelp);
+ tree->help = _(tree->untranslatedHelp);
tree->children =
GNUNET_malloc (sizeof (struct GNUNET_GNS_TreeNode *) * (clen + 1));
for (i = 0; i < clen; i++)
Modified: GNUnet/src/setup/ncurses/mconf.c
===================================================================
--- GNUnet/src/setup/ncurses/mconf.c 2008-12-27 07:49:35 UTC (rev 8031)
+++ GNUnet/src/setup/ncurses/mconf.c 2008-12-27 07:50:06 UTC (rev 8032)
@@ -171,16 +171,17 @@
switch (pos->type & GNUNET_GNS_TYPE_MASK)
{
case GNUNET_GNS_TYPE_BOOLEAN:
- st = dialog_yesno (pos->option,
- pos->description, 5, 60);
+ st = dialog_yesno (pos->option, pos->description, 5, 60);
switch (st)
{
case DLG_EXIT_OK:
case DLG_EXIT_CANCEL:
if (0 != GNUNET_GC_set_configuration_value_string (cfg,
ectx,
-
pos->section,
-
pos->option,
+ pos->
+ section,
+ pos->
+ option,
st ==
DLG_EXIT_OK
? "YES" :
@@ -214,9 +215,12 @@
case DLG_EXIT_OK:
if (0 != GNUNET_GC_set_configuration_value_string (cfg,
ectx,
-
pos->section,
-
pos->option,
-
fitem.text))
+ pos->
+ section,
+ pos->
+ option,
+ fitem.
+ text))
{
show_help (pos->option,
_("Internal error! (Value invalid?)"));
@@ -277,9 +281,13 @@
case DLG_EXIT_OK:
if (0 != GNUNET_GC_set_configuration_value_choice (cfg,
ectx,
-
pos->section,
-
pos->option,
-
val->String.legalRange
+ pos->
+ section,
+ pos->
+ option,
+ val->
+ String.
+ legalRange
[msel]))
{
show_help (pos->option,
@@ -357,8 +365,10 @@
tmp[strlen (tmp) - 1] = '\0';
if (0 != GNUNET_GC_set_configuration_value_choice (cfg,
ectx,
-
pos->section,
-
pos->option,
+ pos->
+ section,
+ pos->
+ option,
tmp))
{
GNUNET_free (tmp);
@@ -395,14 +405,18 @@
if (1 != sscanf (fitem.text, "%lf", &dval))
{
show_help (pos->option,
- _("Invalid input, expecting floating point
value."));
+ _
+ ("Invalid input, expecting floating point
value."));
break;
}
if (0 != GNUNET_GC_set_configuration_value_string (cfg,
ectx,
-
pos->section,
-
pos->option,
-
fitem.text))
+ pos->
+ section,
+ pos->
+ option,
+ fitem.
+ text))
{
show_help (pos->option,
_("Internal error! (Value invalid?)"));
@@ -448,8 +462,10 @@
}
if (0 != GNUNET_GC_set_configuration_value_number (cfg,
ectx,
-
pos->section,
-
pos->option,
+ pos->
+
section,
+ pos->
+
option,
lval))
{
show_help (pos->option,
Modified: GNUnet/src/transports/http.c
===================================================================
--- GNUnet/src/transports/http.c 2008-12-27 07:49:35 UTC (rev 8031)
+++ GNUnet/src/transports/http.c 2008-12-27 07:50:06 UTC (rev 8032)
@@ -1006,9 +1006,8 @@
cpy = sizeof (GNUNET_MessageHeader) - httpSession->cs.client.rpos1;
if (cpy > have)
cpy = have;
- memcpy (&httpSession->cs.
- client.rbuff1[httpSession->cs.client.rpos1], &inbuf[poff],
- cpy);
+ memcpy (&httpSession->cs.client.
+ rbuff1[httpSession->cs.client.rpos1], &inbuf[poff], cpy);
httpSession->cs.client.rpos1 += cpy;
have -= cpy;
poff += cpy;
@@ -1028,9 +1027,8 @@
httpSession->cs.client.rpos2;
if (cpy > have)
cpy = have;
- memcpy (&httpSession->cs.
- client.rbuff2[httpSession->cs.client.rpos2], &inbuf[poff],
- cpy);
+ memcpy (&httpSession->cs.client.
+ rbuff2[httpSession->cs.client.rpos2], &inbuf[poff], cpy);
have -= cpy;
poff += cpy;
httpSession->cs.client.rpos2 += cpy;
Modified: GNUnet/src/util/containers/maptest.c
===================================================================
--- GNUnet/src/util/containers/maptest.c 2008-12-27 07:49:35 UTC (rev
8031)
+++ GNUnet/src/util/containers/maptest.c 2008-12-27 07:50:06 UTC (rev
8032)
@@ -39,56 +39,54 @@
GNUNET_HashCode k2;
int j;
- CHECK(NULL != (m = GNUNET_multi_hash_map_create (i)));
- memset(&k1, 0, sizeof(k1));
- memset(&k2, 1, sizeof(k2));
- CHECK(GNUNET_NO == GNUNET_multi_hash_map_contains(m, &k1));
- CHECK(GNUNET_NO == GNUNET_multi_hash_map_contains(m, &k2));
- CHECK(GNUNET_NO == GNUNET_multi_hash_map_remove(m, &k1, NULL));
- CHECK(GNUNET_NO == GNUNET_multi_hash_map_remove(m, &k2, NULL));
- CHECK(NULL == GNUNET_multi_hash_map_get(m, &k1));
- CHECK(NULL == GNUNET_multi_hash_map_get(m, &k2));
- CHECK(0 == GNUNET_multi_hash_map_remove_all(m, &k1));
- CHECK(0 == GNUNET_multi_hash_map_size(m));
- CHECK(0 == GNUNET_multi_hash_map_iterate(m, NULL, NULL));
- CHECK(0 == GNUNET_multi_hash_map_get_multiple(m, &k1, NULL, NULL));
+ CHECK (NULL != (m = GNUNET_multi_hash_map_create (i)));
+ memset (&k1, 0, sizeof (k1));
+ memset (&k2, 1, sizeof (k2));
+ CHECK (GNUNET_NO == GNUNET_multi_hash_map_contains (m, &k1));
+ CHECK (GNUNET_NO == GNUNET_multi_hash_map_contains (m, &k2));
+ CHECK (GNUNET_NO == GNUNET_multi_hash_map_remove (m, &k1, NULL));
+ CHECK (GNUNET_NO == GNUNET_multi_hash_map_remove (m, &k2, NULL));
+ CHECK (NULL == GNUNET_multi_hash_map_get (m, &k1));
+ CHECK (NULL == GNUNET_multi_hash_map_get (m, &k2));
+ CHECK (0 == GNUNET_multi_hash_map_remove_all (m, &k1));
+ CHECK (0 == GNUNET_multi_hash_map_size (m));
+ CHECK (0 == GNUNET_multi_hash_map_iterate (m, NULL, NULL));
+ CHECK (0 == GNUNET_multi_hash_map_get_multiple (m, &k1, NULL, NULL));
- CHECK(GNUNET_OK == GNUNET_multi_hash_map_put(m,
- &k1,
- "v1",
-
GNUNET_MultiHashMapOption_REPLACE));
- CHECK(1 == GNUNET_multi_hash_map_size(m));
- CHECK(0 == strcmp("v1", GNUNET_multi_hash_map_get(m, &k1)));
- CHECK(GNUNET_NO == GNUNET_multi_hash_map_put(m,
- &k1,
- "v1",
-
GNUNET_MultiHashMapOption_REPLACE));
- CHECK(1 == GNUNET_multi_hash_map_size(m));
- CHECK(GNUNET_OK == GNUNET_multi_hash_map_put(m,
- &k1,
- "v2",
-
GNUNET_MultiHashMapOption_MULTIPLE));
- CHECK(GNUNET_OK == GNUNET_multi_hash_map_put(m,
- &k1,
- "v3",
-
GNUNET_MultiHashMapOption_MULTIPLE));
- CHECK(3 == GNUNET_multi_hash_map_size(m));
- CHECK(GNUNET_OK == GNUNET_multi_hash_map_remove(m,
- &k1,
- "v3"));
- CHECK(2 == GNUNET_multi_hash_map_size(m));
- CHECK(GNUNET_YES == GNUNET_multi_hash_map_contains(m, &k1));
- CHECK(GNUNET_NO == GNUNET_multi_hash_map_contains(m, &k2));
- CHECK(2 == GNUNET_multi_hash_map_get_multiple(m, &k1, NULL, NULL));
- CHECK(0 == GNUNET_multi_hash_map_get_multiple(m, &k2, NULL, NULL));
- CHECK(2 == GNUNET_multi_hash_map_iterate(m, NULL, NULL));
- CHECK(2 == GNUNET_multi_hash_map_remove_all(m, &k1));
- for (j=0;j<1024;j++)
- CHECK(GNUNET_OK == GNUNET_multi_hash_map_put(m,
- &k1,
- "v2",
-
GNUNET_MultiHashMapOption_MULTIPLE));
- GNUNET_multi_hash_map_destroy(m);
+ CHECK (GNUNET_OK == GNUNET_multi_hash_map_put (m,
+ &k1,
+ "v1",
+
GNUNET_MultiHashMapOption_REPLACE));
+ CHECK (1 == GNUNET_multi_hash_map_size (m));
+ CHECK (0 == strcmp ("v1", GNUNET_multi_hash_map_get (m, &k1)));
+ CHECK (GNUNET_NO == GNUNET_multi_hash_map_put (m,
+ &k1,
+ "v1",
+
GNUNET_MultiHashMapOption_REPLACE));
+ CHECK (1 == GNUNET_multi_hash_map_size (m));
+ CHECK (GNUNET_OK == GNUNET_multi_hash_map_put (m,
+ &k1,
+ "v2",
+
GNUNET_MultiHashMapOption_MULTIPLE));
+ CHECK (GNUNET_OK == GNUNET_multi_hash_map_put (m,
+ &k1,
+ "v3",
+
GNUNET_MultiHashMapOption_MULTIPLE));
+ CHECK (3 == GNUNET_multi_hash_map_size (m));
+ CHECK (GNUNET_OK == GNUNET_multi_hash_map_remove (m, &k1, "v3"));
+ CHECK (2 == GNUNET_multi_hash_map_size (m));
+ CHECK (GNUNET_YES == GNUNET_multi_hash_map_contains (m, &k1));
+ CHECK (GNUNET_NO == GNUNET_multi_hash_map_contains (m, &k2));
+ CHECK (2 == GNUNET_multi_hash_map_get_multiple (m, &k1, NULL, NULL));
+ CHECK (0 == GNUNET_multi_hash_map_get_multiple (m, &k2, NULL, NULL));
+ CHECK (2 == GNUNET_multi_hash_map_iterate (m, NULL, NULL));
+ CHECK (2 == GNUNET_multi_hash_map_remove_all (m, &k1));
+ for (j = 0; j < 1024; j++)
+ CHECK (GNUNET_OK == GNUNET_multi_hash_map_put (m,
+ &k1,
+ "v2",
+
GNUNET_MultiHashMapOption_MULTIPLE));
+ GNUNET_multi_hash_map_destroy (m);
return 0;
}
Modified: GNUnet/src/util/network_client/tcpio.c
===================================================================
--- GNUnet/src/util/network_client/tcpio.c 2008-12-27 07:49:35 UTC (rev
8031)
+++ GNUnet/src/util/network_client/tcpio.c 2008-12-27 07:50:06 UTC (rev
8032)
@@ -334,7 +334,7 @@
_
("Error connecting to %s:%u. Is the daemon
running?\n"),
host, port);
- GNUNET_free (host);
+ GNUNET_free (host);
return GNUNET_SYSERR;
}
soaddr = NULL;
Modified: GNUnet/src/util/os/installpath.c
===================================================================
--- GNUnet/src/util/os/installpath.c 2008-12-27 07:49:35 UTC (rev 8031)
+++ GNUnet/src/util/os/installpath.c 2008-12-27 07:50:06 UTC (rev 8032)
@@ -113,9 +113,10 @@
int ret;
path = NULL;
- func = (MyNSGetExecutablePathProto) dlsym (RTLD_DEFAULT,
"_NSGetExecutablePath");
- if (! func)
- return NULL;
+ func =
+ (MyNSGetExecutablePathProto) dlsym (RTLD_DEFAULT, "_NSGetExecutablePath");
+ if (!func)
+ return NULL;
path = &zero;
len = 0;
/* get the path len, including the trailing \0 */
Modified: GNUnet/src/util/os/osconfig.c
===================================================================
--- GNUnet/src/util/os/osconfig.c 2008-12-27 07:49:35 UTC (rev 8031)
+++ GNUnet/src/util/os/osconfig.c 2008-12-27 07:50:06 UTC (rev 8032)
@@ -58,7 +58,8 @@
if (ifa_ptr->ifa_addr->sa_family != AF_INET)
continue;
if (GNUNET_OK != proc (ifa_ptr->ifa_name, strcmp
- (ifa_ptr->ifa_name, GNUNET_DEFAULT_INTERFACE) == 0, cls))
+ (ifa_ptr->ifa_name,
+ GNUNET_DEFAULT_INTERFACE) == 0, cls))
break;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r8032 - in GNUnet: contrib src/applications/datastore src/applications/dht/module src/applications/dht/tools src/applications/dstore_mysql src/applications/dstore_sqlite src/applications/dv/module src/applications/fs/collection src/applications/fs/ecrs src/applications/fs/fsui src/applications/fs/gap src/applications/fs/tools src/applications/testing src/applications/topology_default src/include src/libs/mysql src/server src/setup src/setup/cocoa src/setup/lib src/setup/ncurses src/transports src/util/containers src/util/network_client src/util/os,
gnunet <=