Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Rename afb-config to afb-args
[src/app-framework-binder.git]
/
src
/
afs-args.c
diff --git
a/src/afs-config.c
b/src/afs-args.c
similarity index 96%
rename from
src/afs-config.c
rename to
src/afs-args.c
index
2d42968
..
1606b33
100644
(file)
--- a/
src/afs-config.c
+++ b/
src/afs-args.c
@@
-25,7
+25,7
@@
#include <unistd.h>
#include "verbose.h"
#include <unistd.h>
#include "verbose.h"
-#include "afs-
config
.h"
+#include "afs-
args
.h"
#if !defined(AFB_VERSION)
# error "you should define AFB_VERSION"
#if !defined(AFB_VERSION)
# error "you should define AFB_VERSION"
@@
-240,7
+240,7
@@
static void noarg(int optc)
| Parse option and launch action
+--------------------------------------------------------- */
| Parse option and launch action
+--------------------------------------------------------- */
-static void parse_arguments(int argc, char **argv, struct afs_
config
*config)
+static void parse_arguments(int argc, char **argv, struct afs_
args
*config)
{
char *programName = argv[0];
int optc, ind;
{
char *programName = argv[0];
int optc, ind;
@@
-346,7
+346,7
@@
static void parse_arguments(int argc, char **argv, struct afs_config *config)
free(gnuOptions);
}
free(gnuOptions);
}
-static void fulfill_config(struct afs_
config
*config)
+static void fulfill_config(struct afs_
args
*config)
{
// default HTTP port
if (config->httpdPort == 0)
{
// default HTTP port
if (config->httpdPort == 0)
@@
-389,7
+389,7
@@
static void fulfill_config(struct afs_config *config)
config->token = AFS_SUPERVISOR_TOKEN;
}
config->token = AFS_SUPERVISOR_TOKEN;
}
-
void afs_config_dump(struct afs_config
*config)
+
static void dump(struct afs_args
*config)
{
#define NN(x) (x)?:""
#define P(...) fprintf(stderr, __VA_ARGS__)
{
#define NN(x) (x)?:""
#define P(...) fprintf(stderr, __VA_ARGS__)
@@
-428,13
+428,13
@@
void afs_config_dump(struct afs_config *config)
#undef NN
}
#undef NN
}
-static void parse_environment(struct afs_
config
*config)
+static void parse_environment(struct afs_
args
*config)
{
}
{
}
-struct afs_
config *afs_config_parse_arguments
(int argc, char **argv)
+struct afs_
args *afs_args_parse
(int argc, char **argv)
{
{
- struct afs_
config
*result;
+ struct afs_
args
*result;
result = calloc(1, sizeof *result);
result = calloc(1, sizeof *result);
@@
-442,7
+442,7
@@
struct afs_config *afs_config_parse_arguments(int argc, char **argv)
parse_arguments(argc, argv, result);
fulfill_config(result);
if (verbose_wants(Log_Level_Info))
parse_arguments(argc, argv, result);
fulfill_config(result);
if (verbose_wants(Log_Level_Info))
-
afs_config_
dump(result);
+ dump(result);
return result;
}
return result;
}