projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
expand GNUNET_OS_ProjectData API to also enable de-duplcation of logic for --help
[oweals/gnunet.git]
/
src
/
util
/
test_configuration.c
diff --git
a/src/util/test_configuration.c
b/src/util/test_configuration.c
index 2d280695658b63432351cca0ceed0f0d31f2377b..80ae01c683227dccd760149e1a679292d8ba167d 100644
(file)
--- a/
src/util/test_configuration.c
+++ b/
src/util/test_configuration.c
@@
-1,6
+1,6
@@
/*
This file is part of GNUnet.
/*
This file is part of GNUnet.
- (C) 2003, 2004, 2005, 2006, 2007 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2003, 2004, 2005, 2006, 2007 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
@@
-14,8
+14,8
@@
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 5
9 Temple Place - Suite 330
,
- Boston, MA 0211
1-1307
, USA.
+ Free Software Foundation, Inc., 5
1 Franklin Street, Fifth Floor
,
+ Boston, MA 0211
0-1301
, USA.
*/
/**
* @file util/test_configuration.c
*/
/**
* @file util/test_configuration.c
@@
-37,12
+37,12
@@
enum
ADD_NEW_ENTRY,
REMOVE_SECTION,
REMOVE_ENTRY,
ADD_NEW_ENTRY,
REMOVE_SECTION,
REMOVE_ENTRY,
- COMPARE,
+ COMPARE,
PRINT
};
static struct GNUNET_CONFIGURATION_Handle *cfg;
PRINT
};
static struct GNUNET_CONFIGURATION_Handle *cfg;
-static struct GNUNET_CONFIGURATION_Handle *cfg
D
efault;
+static struct GNUNET_CONFIGURATION_Handle *cfg
_d
efault;
struct DiffsCBData
{
struct DiffsCBData
{
@@
-199,7
+199,7
@@
editConfiguration (struct GNUNET_CONFIGURATION_Handle *cfg, int option)
* Checking configuration diffs
*/
static int
* Checking configuration diffs
*/
static int
-checkDiffs (struct GNUNET_CONFIGURATION_Handle *cfg
D
efault, int option)
+checkDiffs (struct GNUNET_CONFIGURATION_Handle *cfg
_d
efault, int option)
{
struct GNUNET_CONFIGURATION_Handle *cfg;
struct GNUNET_CONFIGURATION_Handle *cfgDiffs;
{
struct GNUNET_CONFIGURATION_Handle *cfg;
struct GNUNET_CONFIGURATION_Handle *cfgDiffs;
@@
-223,7
+223,7
@@
checkDiffs (struct GNUNET_CONFIGURATION_Handle *cfgDefault, int option)
GNUNET_CONFIGURATION_destroy (cfgDiffs);
return 1;
}
GNUNET_CONFIGURATION_destroy (cfgDiffs);
return 1;
}
- GNUNET_CONFIGURATION_write_diffs (cfg
D
efault, cfg, diffsFileName);
+ GNUNET_CONFIGURATION_write_diffs (cfg
_d
efault, cfg, diffsFileName);
GNUNET_CONFIGURATION_destroy (cfg);
/* Compare the dumped configuration with modifications done */
GNUNET_CONFIGURATION_destroy (cfg);
/* Compare the dumped configuration with modifications done */
@@
-236,14
+236,14
@@
checkDiffs (struct GNUNET_CONFIGURATION_Handle *cfgDefault, int option)
GNUNET_CONFIGURATION_iterate (cfg, diffsCallBack, &cbData);
if (1 == (ret = cbData.status))
{
GNUNET_CONFIGURATION_iterate (cfg, diffsCallBack, &cbData);
if (1 == (ret = cbData.status))
{
- FPRINTF (stderr, "%s",
+ FPRINTF (stderr, "%s",
"Incorrect Configuration Diffs: Diffs may contain data not actually edited\n");
goto housekeeping;
}
cbData.cfgDiffs = cfg;
GNUNET_CONFIGURATION_iterate (cfgDiffs, diffsCallBack, &cbData);
if ((ret = cbData.status) == 1)
"Incorrect Configuration Diffs: Diffs may contain data not actually edited\n");
goto housekeeping;
}
cbData.cfgDiffs = cfg;
GNUNET_CONFIGURATION_iterate (cfgDiffs, diffsCallBack, &cbData);
if ((ret = cbData.status) == 1)
- FPRINTF (stderr, "%s",
+ FPRINTF (stderr, "%s",
"Incorrect Configuration Diffs: Data may be missing in diffs\n");
housekeeping:
"Incorrect Configuration Diffs: Data may be missing in diffs\n");
housekeeping:
@@
-514,30
+514,30
@@
main (int argc, char *argv[])
GNUNET_CONFIGURATION_destroy (cfg);
/* Testing configuration diffs */
GNUNET_CONFIGURATION_destroy (cfg);
/* Testing configuration diffs */
- cfg
D
efault = GNUNET_CONFIGURATION_create ();
- if (GNUNET_OK != GNUNET_CONFIGURATION_load (cfg
D
efault, NULL))
+ cfg
_d
efault = GNUNET_CONFIGURATION_create ();
+ if (GNUNET_OK != GNUNET_CONFIGURATION_load (cfg
_d
efault, NULL))
{
GNUNET_break (0);
{
GNUNET_break (0);
- GNUNET_CONFIGURATION_destroy (cfg
D
efault);
+ GNUNET_CONFIGURATION_destroy (cfg
_d
efault);
return 1;
}
/* Nothing changed in the new configuration */
return 1;
}
/* Nothing changed in the new configuration */
- failureCount += checkDiffs (cfg
D
efault, EDIT_NOTHING);
+ failureCount += checkDiffs (cfg
_d
efault, EDIT_NOTHING);
/* Modify all entries of the last section */
/* Modify all entries of the last section */
- failureCount += checkDiffs (cfg
D
efault, EDIT_SECTION);
+ failureCount += checkDiffs (cfg
_d
efault, EDIT_SECTION);
/* Add a new section */
/* Add a new section */
- failureCount += checkDiffs (cfg
D
efault, ADD_NEW_SECTION);
+ failureCount += checkDiffs (cfg
_d
efault, ADD_NEW_SECTION);
/* Add a new entry to the last section */
/* Add a new entry to the last section */
- failureCount += checkDiffs (cfg
D
efault, ADD_NEW_ENTRY);
+ failureCount += checkDiffs (cfg
_d
efault, ADD_NEW_ENTRY);
/* Modify all entries in the configuration */
/* Modify all entries in the configuration */
- failureCount += checkDiffs (cfg
D
efault, EDIT_ALL);
+ failureCount += checkDiffs (cfg
_d
efault, EDIT_ALL);
- GNUNET_CONFIGURATION_destroy (cfg
D
efault);
+ GNUNET_CONFIGURATION_destroy (cfg
_d
efault);
error:
if (failureCount != 0)
error:
if (failureCount != 0)