summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2015-04-25 12:45:11 +0200
committerLars-Dominik Braun <lars@6xq.net>2015-05-02 21:36:45 +0200
commit77000430fe564ecaffef84a7027553f6d342b0b2 (patch)
tree1878ab4f0607cee53719cd544a8d2c929d92a27f
parente8829540a072684055949679dcd190f4273c6350 (diff)
downloadpucket-77000430fe564ecaffef84a7027553f6d342b0b2.tar.gz
pucket-77000430fe564ecaffef84a7027553f6d342b0b2.tar.bz2
pucket-77000430fe564ecaffef84a7027553f6d342b0b2.zip
random: Add --max-var
-rw-r--r--main.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/main.c b/main.c
index ce9999f..d3c5ea8 100644
--- a/main.c
+++ b/main.c
@@ -181,6 +181,16 @@ static error_t parse_random_opt (int key, char *arg,
break;
}
+ case 'v': {
+ int i = atoi (arg);
+ if (i <= 0) {
+ argp_error (state, "Max variations must be > 0");
+ } else {
+ arguments->max_var = i;
+ }
+ break;
+ }
+
case ARGP_KEY_ARG:
if (state->arg_num > 0) {
return ARGP_ERR_UNKNOWN;
@@ -567,6 +577,7 @@ int main (int argc, char **argv) {
{"height", 'h', "pixels", 0, "Output flame height (1000)" },
{"width", 'w', "pixels", 0, "Output flame width (1000)" },
{"max-xforms", 'x', "number", 0, "Max number of xforms (6)" },
+ {"max-var", 'v', "number", 0, "Max number of variations per xform (unlimited)" },
{ 0 },
};
const char doc[] = PACKAGE "-random -- a fractal flame generator";