diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2015-04-25 12:45:11 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2015-05-02 21:36:45 +0200 |
commit | 77000430fe564ecaffef84a7027553f6d342b0b2 (patch) | |
tree | 1878ab4f0607cee53719cd544a8d2c929d92a27f | |
parent | e8829540a072684055949679dcd190f4273c6350 (diff) | |
download | pucket-77000430fe564ecaffef84a7027553f6d342b0b2.tar.gz pucket-77000430fe564ecaffef84a7027553f6d342b0b2.tar.bz2 pucket-77000430fe564ecaffef84a7027553f6d342b0b2.zip |
random: Add --max-var
-rw-r--r-- | main.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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"; |