diff options
author | midipix <writeonce@midipix.org> | 2015-12-16 02:16:23 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2015-12-16 02:16:23 -0500 |
commit | bbc20f9c01d0a523a6b637f1b154d62cf45e72b1 (patch) | |
tree | 83dd4e4f4ed2ba8e1274b35b01c7d0309221b192 /src | |
parent | fb7de2f3f9eaf09efc83a727957ce74ebd976abb (diff) | |
download | sofort-bbc20f9c01d0a523a6b637f1b154d62cf45e72b1.tar.bz2 sofort-bbc20f9c01d0a523a6b637f1b154d62cf45e72b1.tar.xz |
C headers and source files: mark dummy interfaces and related code.
Diffstat (limited to 'src')
-rw-r--r-- | src/driver/sfrt_driver_ctx.c | 28 | ||||
-rw-r--r-- | src/internal/sofort_driver_impl.h | 4 | ||||
-rw-r--r-- | src/skin/sfrt_skin_default.c | 12 | ||||
-rw-r--r-- | src/sofort.c | 30 |
4 files changed, 37 insertions, 37 deletions
diff --git a/src/driver/sfrt_driver_ctx.c b/src/driver/sfrt_driver_ctx.c index 75afd0c..67834c0 100644 --- a/src/driver/sfrt_driver_ctx.c +++ b/src/driver/sfrt_driver_ctx.c @@ -92,7 +92,7 @@ int sfrt_get_driver_ctx( uint64_t dflags; uint64_t aflags; const char * program; - const char * astring; + const char * astring; /* dummy */ options = sfrt_default_options; @@ -102,7 +102,7 @@ int sfrt_get_driver_ctx( dflags = 0; aflags = 0; nunits = 0; - astring = 0; + astring = 0; /* dummy */ program = argv_program_name(argv[0]); if (!argv[1] && (flags & SFRT_DRIVER_VERBOSITY_USAGE)) @@ -119,17 +119,17 @@ int sfrt_get_driver_ctx( case TAG_VERSION: dflags |= SFRT_DRIVER_VERSION; break; - - case TAG_OUTPUT_DUMMY: - astring = entry->arg; - break; - - case TAG_OUTPUT_PROPERTY: - if (!(strcmp(entry->arg,"name"))) - aflags |= SFRT_OUTPUT_NAME; - else if (!(strcmp(entry->arg,"address"))) - aflags |= SFRT_OUTPUT_ADDRESS; - break; +/* dummy */ +/* dummy */ case TAG_OUTPUT_DUMMY: +/* dummy */ astring = entry->arg; +/* dummy */ break; +/* dummy */ +/* dummy */ case TAG_OUTPUT_PROPERTY: +/* dummy */ if (!(strcmp(entry->arg,"name"))) +/* dummy */ aflags |= SFRT_OUTPUT_NAME; +/* dummy */ else if (!(strcmp(entry->arg,"address"))) +/* dummy */ aflags |= SFRT_OUTPUT_ADDRESS; +/* dummy */ break; } } else nunits++; @@ -141,7 +141,7 @@ int sfrt_get_driver_ctx( ctx->ctx.program = program; ctx->cctx.drvflags = dflags; ctx->cctx.actflags = aflags; - ctx->cctx.anystring = astring; + ctx->cctx.anystring = astring; /* dummy */ ctx->ctx.cctx = &ctx->cctx; diff --git a/src/internal/sofort_driver_impl.h b/src/internal/sofort_driver_impl.h index f72d200..b901629 100644 --- a/src/internal/sofort_driver_impl.h +++ b/src/internal/sofort_driver_impl.h @@ -10,8 +10,8 @@ enum app_tags { TAG_HELP, TAG_VERSION, - TAG_OUTPUT_DUMMY, - TAG_OUTPUT_PROPERTY, + TAG_OUTPUT_DUMMY, /* dummy */ + TAG_OUTPUT_PROPERTY, /* dummy */ }; struct sfrt_driver_ctx_impl { diff --git a/src/skin/sfrt_skin_default.c b/src/skin/sfrt_skin_default.c index ef3f6b9..875fd54 100644 --- a/src/skin/sfrt_skin_default.c +++ b/src/skin/sfrt_skin_default.c @@ -8,11 +8,11 @@ const struct argv_option sfrt_default_options[] = { {"help", 'h',TAG_HELP,ARGV_OPTARG_OPTIONAL,"short|long",0, "show usage information [listing %s options only]"}, - {"output-dummy", 'o',TAG_OUTPUT_DUMMY,ARGV_OPTARG_REQUIRED,0,"<anystring>", - "output %s"}, - - {"output-property", 'p',TAG_OUTPUT_PROPERTY,ARGV_OPTARG_REQUIRED,"name|address",0, - "output %s"}, - + {"output-dummy", 'o',TAG_OUTPUT_DUMMY,ARGV_OPTARG_REQUIRED,0,"<anystring>", /* dummy */ + "output %s"}, /* dummy */ + /* dummy */ + {"output-property", 'p',TAG_OUTPUT_PROPERTY,ARGV_OPTARG_REQUIRED,"name|address",0, /* dummy */ + "output %s"}, /* dummy */ + /* dummy */ {0} }; diff --git a/src/sofort.c b/src/sofort.c index af04373..b12ddfd 100644 --- a/src/sofort.c +++ b/src/sofort.c @@ -17,17 +17,17 @@ static ssize_t sofort_version(struct sfrt_driver_ctx * dctx) static void sofort_perform_unit_actions(struct sfrt_unit_ctx * uctx) { - uint64_t flags = uctx->cctx->actflags; - - if (flags & SFRT_OUTPUT_NAME) { - uctx->status = sfrt_output_name(uctx,stdout); - uctx->nerrors += !!uctx->status; - } - - if (flags & SFRT_OUTPUT_ADDRESS) { - uctx->status = sfrt_output_address(uctx,stdout); - uctx->nerrors += !!uctx->status; - } + uint64_t flags = uctx->cctx->actflags; /* dummy */ + /* dummy */ + if (flags & SFRT_OUTPUT_NAME) { /* dummy */ + uctx->status = sfrt_output_name(uctx,stdout); /* dummy */ + uctx->nerrors += !!uctx->status; /* dummy */ + } /* dummy */ + /* dummy */ + if (flags & SFRT_OUTPUT_ADDRESS) { /* dummy */ + uctx->status = sfrt_output_address(uctx,stdout);/* dummy */ + uctx->nerrors += !!uctx->status; /* dummy */ + } /* dummy */ } static int sofort_exit(struct sfrt_driver_ctx * dctx, int nerrors) @@ -50,10 +50,10 @@ int sofort_main(int argc, const char ** argv, const char ** envp) if ((sofort_version(dctx)) < 0) return sofort_exit(dctx,2); - if (dctx->cctx->anystring) - if ((sfrt_output_dummy(dctx->cctx,stdout)) < 0) - return sofort_exit(dctx,2); - + if (dctx->cctx->anystring) /* dummy */ + if ((sfrt_output_dummy(dctx->cctx,stdout)) < 0) /* dummy */ + return sofort_exit(dctx,2); /* dummy */ + /* dummy */ for (unit=dctx->units; *unit; unit++) { if (!(sfrt_get_unit_ctx(dctx,*unit,&uctx))) { sofort_perform_unit_actions(uctx); |