diff options
author | midipix <writeonce@midipix.org> | 2016-11-16 00:07:52 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-16 00:07:52 -0500 |
commit | 8c0fd2dddcdfe366b960fa2e16b670f7c3a47c7a (patch) | |
tree | 9aea00d809d34bbb7a6dcb3867635d3d1283113e /src | |
parent | 7d80bbf952b4b4f31e8e4baef76769c2078aca28 (diff) | |
download | perk-8c0fd2dddcdfe366b960fa2e16b670f7c3a47c7a.tar.bz2 perk-8c0fd2dddcdfe366b960fa2e16b670f7c3a47c7a.tar.xz |
driver: removed --output support (no longer needed).
Diffstat (limited to 'src')
-rw-r--r-- | src/driver/pe_driver_ctx.c | 16 | ||||
-rw-r--r-- | src/internal/perk_driver_impl.h | 1 | ||||
-rw-r--r-- | src/skin/pe_skin_default.c | 3 |
3 files changed, 1 insertions, 19 deletions
diff --git a/src/driver/pe_driver_ctx.c b/src/driver/pe_driver_ctx.c index 32faa7d..8bc1706 100644 --- a/src/driver/pe_driver_ctx.c +++ b/src/driver/pe_driver_ctx.c @@ -121,7 +121,6 @@ int pe_get_driver_ctx( size_t nunits; const char * program; const char * pretty; - int fdout; (void)envp; @@ -132,7 +131,6 @@ int pe_get_driver_ctx( pretty = 0; nunits = 0; - fdout = 0; program = argv_program_name(argv[0]); memset(&cctx,0,sizeof(cctx)); cctx.drvflags = flags; @@ -152,10 +150,6 @@ int pe_get_driver_ctx( cctx.drvflags |= PERK_DRIVER_VERSION; break; - case TAG_OUTPUT: - cctx.output = entry->arg; - break; - case TAG_PRETTY: pretty = entry->arg; break; @@ -184,20 +178,12 @@ int pe_get_driver_ctx( nunits++; } - if (cctx.output && ((fdout = open(cctx.output, - O_CREAT|O_TRUNC|O_WRONLY|O_NOCTTY|O_NOFOLLOW, - S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)) < 0)) - return pe_get_driver_ctx_fail(meta); - if (pretty && !strcmp(pretty,"yaml")) cctx.fmtflags |= PERK_PRETTY_YAML; else if (pretty && !strcmp(pretty,"dlltool")) cctx.fmtflags |= PERK_PRETTY_DLLTOOL; - if (!(ctx = pe_driver_ctx_alloc(meta,&cctx,nunits)) && cctx.output) - close(fdout); - - if (!ctx) + if (!(ctx = pe_driver_ctx_alloc(meta,&cctx,nunits))) return pe_get_driver_ctx_fail(meta); ctx->ctx.program = program; diff --git a/src/internal/perk_driver_impl.h b/src/internal/perk_driver_impl.h index f52e328..0386d81 100644 --- a/src/internal/perk_driver_impl.h +++ b/src/internal/perk_driver_impl.h @@ -14,7 +14,6 @@ extern const struct argv_option pe_default_options[]; enum app_tags { TAG_HELP, TAG_VERSION, - TAG_OUTPUT, TAG_PRETTY, TAG_CATEGORY, TAG_SECTIONS, diff --git a/src/skin/pe_skin_default.c b/src/skin/pe_skin_default.c index baafc8a..f958404 100644 --- a/src/skin/pe_skin_default.c +++ b/src/skin/pe_skin_default.c @@ -8,9 +8,6 @@ const struct argv_option pe_default_options[] = { {"help", 'h',TAG_HELP,ARGV_OPTARG_OPTIONAL,0,"short|long",0, "show usage information [listing %s options only]"}, - {"output", 'o',TAG_OUTPUT,ARGV_OPTARG_REQUIRED,0,0,"<file>", - "write output to %s"}, - {"pretty", 'p',TAG_PRETTY,ARGV_OPTARG_REQUIRED,0,"yaml|dlltool",0, "format output for parsing by %s"}, |