summaryrefslogtreecommitdiff
path: root/options.c
diff options
context:
space:
mode:
authorSergiu Ivanov <unlimitedscolobb@gmail.com>2008-10-31 21:35:21 +0200
committerSergiu Ivanov <unlimitedscolobb@gmail.com>2008-10-31 21:35:21 +0200
commit2ae0853fb2def22b8554d2bc26db8bcf35413415 (patch)
tree245375cdfbd2c2c1bd9f339f3ab853729508f426 /options.c
parent2ac5d9b16bd758906bbe5555c4f11801509ef2bf (diff)
Made the filter accept the name of the translator as a command line argument
The filter can now be invoked as filter <translator-to-filter-out>
Diffstat (limited to 'options.c')
-rw-r--r--options.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/options.c b/options.c
index 736a8589a..e5fea4d61 100644
--- a/options.c
+++ b/options.c
@@ -38,8 +38,9 @@
/*----------------------------------------------------------------------------*/
/*--------Macros--------------------------------------------------------------*/
/*Short documentation for argp*/
-#define ARGS_DOC ""
-#define DOC "Filters the translator stack of the node it is set upon."
+#define ARGS_DOC "TARGET-NAME"
+#define DOC "Finds the bottommost translator called TARGET-NAME in the \
+static stack of translators and reads and write to it."
/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/
@@ -147,8 +148,18 @@ argp_parse_common_options
}
else
{
-/*TODO: Take care of runtime calls modifying the property*/
}
+
+ break;
+ }
+ case ARGP_KEY_ARG: // the translator to filter out;
+ {
+ target_name = strdup(arg);
+ if(!target_name)
+ error(EXIT_FAILURE, ENOMEM, "argp_parse_common_options: "
+ "Could not strdup the translator name");
+
+ break;
}
/*If the option could not be recognized*/
default: