Loading...
Searching...
No Matches
feOptGen.cc File Reference
`#include "kernel/mod2.h"`
`#include "feOptGen.h"`
`#include "fehelp.h"`
`#include <stdio.h>`
`#include <stdlib.h>`

Go to the source code of this file.

## Macros

#define | FE_OPT_STRUCTURE

## Functions

int | main ()

## Variables

const char | SHORT_OPTS_STRING [] = "bdhqstvxec:r:u:"

## Macro Definition Documentation

## FE_OPT_STRUCTURE

#define FE_OPT_STRUCTURE

Definition at line 11 of file feOptGen.cc.

## Function Documentation

## main()

int main | ( |  | ) |

Definition at line 25 of file feOptGen.cc.

{
FILE* fd;
#ifdef ESINGULAR
fd = fopen("feOptES.xx", "w");
#elif defined(TSINGULAR)
fd = fopen("feOptTS.xx", "w");
#else
fd = fopen("feOpt.xx", "w");
#endif
if (fd == NULL) exit(1);
int i = 0;
fputs("typedef enum\n{\n", fd);
while (feOptSpec[i].name != NULL)
{
const char* name = feOptSpec[i].name;
fputs("FE_OPT_", fd);
while (*name != 0)
{
if (*name == '-')
{
putc('_', fd);
}
else if (*name >= 97 && *name <= 122)
{
putc(*name - 32, fd);
}
else
{
putc(*name, fd);
}
name++;
}
if (i == 0)
{
fputs("=0", fd);
}
i++;
fputs(",\n ", fd);
}
fprintf(fd, "FE_OPT_UNDEF\n} feOptIndex;\n");
fclose(fd);
#ifdef ESINGULAR
rename("feOptES.xx", "feOptES.inc");
#elif defined(TSINGULAR)
rename("feOptTS.xx", "feOptTS.inc");
#else
rename("feOpt.xx", "feOpt.inc");
#endif
return(0);
}
i
int i
Definition cfEzgcd.cc:132
name
char name(const Variable &v)
Definition factory.h:189
feOptSpec
EXTERN_VAR struct fe_option feOptSpec[]
Definition feOpt.h:17
NULL
#define NULL
Definition omList.c:12
fd
int status int fd
Definition si_signals.h:69

## Variable Documentation

## SHORT_OPTS_STRING

const char SHORT_OPTS_STRING[] = "bdhqstvxec:r:u:"

Definition at line 17 of file feOptGen.cc.