1 /* PSPP - a program for statistical analysis.
2 Copyright (C) 1997-9, 2000, 2007, 2009, 2010 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17 #ifndef OUTPUT_OPTIONS_H
18 #define OUTPUT_OPTIONS_H 1
20 /* Helper functions for driver option parsing. */
23 #include "libpspp/compiler.h"
28 /* An option being parsed. */
31 char *driver_name; /* Driver's name, for use in error messages. */
32 char *name; /* Option name, for use in error messages. */
33 char *value; /* Value supplied by user (NULL if none). */
34 char *default_value; /* Default value supplied by driver. */
37 struct driver_option *driver_option_get (const char *driver_name,
40 const char *default_value);
41 void driver_option_destroy (struct driver_option *);
43 void parse_paper_size (struct driver_option *, int *h, int *v);
44 bool parse_boolean (struct driver_option *);
45 int parse_enum (struct driver_option *, ...) SENTINEL(0);
46 int parse_int (struct driver_option *, int min_value, int max_value);
47 int parse_dimension (struct driver_option *);
48 char *parse_string (struct driver_option *);
49 char *parse_chart_file_name (struct driver_option *);
51 struct cell_color parse_color (struct driver_option *);
52 bool parse_color__ (const char *, struct cell_color *);
54 #endif /* output/options.h */