summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-01-10 12:13:33 -0500
committermidipix <writeonce@midipix.org>2016-01-10 12:19:44 -0500
commit4a749a765f6f5a3998d9721e9be5ec3bc52d8a7b (patch)
tree919da5a8a9b8859b9debc1abbe440ccaf9a905d1 /src
parent35b2ffd19b71228f056deade21ac1d33027f5fee (diff)
downloadsofort-4a749a765f6f5a3998d9721e9be5ec3bc52d8a7b.tar.bz2
sofort-4a749a765f6f5a3998d9721e9be5ec3bc52d8a7b.tar.xz
argv.h: main(): fix signatures.
Diffstat (limited to 'src')
-rw-r--r--src/driver/sfrt_driver_ctx.c6
-rw-r--r--src/internal/argv/argv.h18
-rw-r--r--src/sofort.c4
3 files changed, 14 insertions, 14 deletions
diff --git a/src/driver/sfrt_driver_ctx.c b/src/driver/sfrt_driver_ctx.c
index f09fd14..0989d58 100644
--- a/src/driver/sfrt_driver_ctx.c
+++ b/src/driver/sfrt_driver_ctx.c
@@ -86,8 +86,8 @@ static int sfrt_get_driver_ctx_fail(struct argv_meta * meta)
}
int sfrt_get_driver_ctx(
- const char ** argv,
- const char ** envp,
+ char ** argv,
+ char ** envp,
uint32_t flags,
struct sfrt_driver_ctx ** pctx)
{
@@ -154,7 +154,7 @@ int sfrt_create_driver_ctx(
{
struct argv_meta * meta;
struct sfrt_driver_ctx_impl * ctx;
- const char * argv[] = {"sofort_driver",0};
+ char * argv[] = {"sofort_driver",0};
if (!(meta = argv_get(argv,sfrt_default_options,0)))
return -1;
diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h
index f40cf74..8ae6549 100644
--- a/src/internal/argv/argv.h
+++ b/src/internal/argv/argv.h
@@ -109,12 +109,12 @@ struct argv_entry {
};
struct argv_meta {
- const char ** argv;
+ char ** argv;
struct argv_entry * entries;
};
struct argv_meta_impl {
- const char ** argv;
+ char ** argv;
char * strbuf;
struct argv_meta meta;
};
@@ -140,7 +140,7 @@ static void argv_usage(
const char * mode);
static struct argv_meta * argv_get(
- const char **,
+ char **,
const struct argv_option[],
int flags);
@@ -270,12 +270,12 @@ static inline const struct argv_option * option_from_tag(
}
static void argv_scan(
- const char ** argv,
+ char ** argv,
const struct argv_option options[],
struct argv_ctx * ctx,
struct argv_meta * meta)
{
- const char ** parg;
+ char ** parg;
const char * ch;
const char * val;
const struct argv_option * option;
@@ -566,7 +566,7 @@ static void argv_show_status(
struct argv_meta * meta)
{
int argc;
- const char ** argv;
+ char ** argv;
struct argv_entry * entry;
const struct argv_option * option;
char short_name[2] = {0};
@@ -615,10 +615,10 @@ static struct argv_meta * argv_free_impl(struct argv_meta_impl * imeta)
return 0;
}
-static struct argv_meta * argv_alloc(const char ** argv, struct argv_ctx * ctx)
+static struct argv_meta * argv_alloc(char ** argv, struct argv_ctx * ctx)
{
struct argv_meta_impl * imeta;
- const char ** vector;
+ char ** vector;
char * dst;
size_t size;
int argc;
@@ -657,7 +657,7 @@ static struct argv_meta * argv_alloc(const char ** argv, struct argv_ctx * ctx)
}
static struct argv_meta * argv_get(
- const char * argv[],
+ char * argv[],
const struct argv_option options[],
int flags)
{
diff --git a/src/sofort.c b/src/sofort.c
index b12ddfd..52d9c27 100644
--- a/src/sofort.c
+++ b/src/sofort.c
@@ -36,7 +36,7 @@ static int sofort_exit(struct sfrt_driver_ctx * dctx, int nerrors)
return nerrors ? 2 : 0;
}
-int sofort_main(int argc, const char ** argv, const char ** envp)
+int sofort_main(int argc, char ** argv, char ** envp)
{
int ret;
struct sfrt_driver_ctx * dctx;
@@ -67,7 +67,7 @@ int sofort_main(int argc, const char ** argv, const char ** envp)
#ifndef SOFORT_IN_A_BOX
-int main(int argc, const char ** argv, const char ** envp)
+int main(int argc, char ** argv, char ** envp)
{
return sofort_main(argc,argv,envp);
}