/* This file is part of Eclat.
Copyright (C) 2012-2018 Sergey Poznyakoff.
Eclat is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
Eclat is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Eclat. If not, see . */
#ifdef HAVE_GETOPT_H
# include
#endif
static char *pp_cmd_buffer;
static size_t pp_cmd_bufsize;
static size_t pp_cmd_buflevel;
struct replvar {
union {
char **strptr;
int *intptr;
} r_pointer;
#define s_ptr r_pointer.strptr
#define i_ptr r_pointer.intptr
union {
char *strval;
int intval;
} r_value;
#define s_val r_value.strval
#define i_val r_value.intval
};
int
replace_string_var(void *p)
{
struct replvar *rv = p;
*rv->s_ptr = rv->s_val;
return 0;
}
int
replace_int_var(void *p)
{
struct replvar *rv = p;
*rv->i_ptr = rv->i_val;
return 0;
}
OPTIONS_BEGIN("eclat",
[],
[],
[],
[],
[],
[],[])
GROUP(Selecting program mode)
OPTION(lint,t,,
[])
BEGIN
lint_mode = 1;
END
OPTION(,E,,
[])
BEGIN
preprocess_only = 1;
END
OPTION(match-commands,m,,
[])
BEGIN
match_command_mode = 1;
END
OPTION(list-commands,l,FMT,
[])
BEGIN
listcmd(optarg);
exit(0);
END
GROUP(Modifiers)
OPTION(config-file,c,FILE,
[