25 #include "pips_config.h"
50 #if defined(FPIPS_WITHOUT_PIPS)
51 #define PIPS(c, v) fpips_error("pips", c, v)
54 #define PIPS(c, v) pips_main(c, v)
57 #if defined(FPIPS_WITHOUT_TPIPS)
58 #define TPIPS(c, v) fpips_error("tpips", c, v)
61 #define TPIPS(c, v) tpips_main(c, v)
64 #if defined(FPIPS_WITHOUT_WPIPS)
65 #define WPIPS(c, v) fpips_error("wpips", c, v)
68 #define WPIPS(c, v) wpips_main(c, v)
71 #if defined(FPIPS_WITHOUT_GPIPS)
72 #define GPIPS(c, v) fpips_error("gpips", c, v)
75 #define GPIPS(c, v) gpips_main(c, v)
79 "Usage: fpips [-hvGPTW] (other options and arguments...)\n" \
80 "\t-h: this help...\n" \
86 "\tdefault: run as tpips\n\n"
112 fprintf(stderr,
"[fpips] sorry, %s not available (" STRINGIFY(SOFT_ARCH)
")\n", what);
120 int nlen = strlen(name), rlen = strlen(
ref);
121 if (nlen<rlen)
return false;
123 if (
ref[--rlen]!=name[--nlen])
135 pips_debug(1,
"considering %s for execution\n", argv[0]);
138 if (argc<1)
return TPIPS(argc, argv);
143 return GPIPS(argc, argv);
145 return TPIPS(argc, argv);
147 return WPIPS(argc, argv);
149 return PIPS(argc, argv);
153 while ((opt = getopt(argc, argv,
"hvGPTW"))!=-1)
159 case 'G':
return GPIPS(argc, argv);
160 case 'P':
return PIPS(argc, argv);
161 case 'T':
return TPIPS(argc, argv);
162 case 'W':
return WPIPS(argc, argv);
169 fprintf(stderr,
"[fpips] default: running as tpips\n\n");
170 return TPIPS(argc, argv);
float a2sf[2] __attribute__((aligned(16)))
USER generates a user error (i.e., non fatal) by printing the given MSG according to the FMT.
static reference ref
Current stmt (an integer)
#define ret(why, what)
true if not a remapping for old.
int gpips_main(int, char **)
static int fpips_version(int ret)
print out fpips version.
int pips_main(int, char **)
static int name_end_p(char *name, char *ref)
returns whether name ends with ref
int wpips_main(int, char **)
static int fpips_usage(int ret)
print out usage informations.
int fpips_error(char *what, int __attribute__((unused)) argc, char __attribute__((unused)) **argv)
non static to avoid a gcc warning if not called.
int tpips_main(int, char **)
int fpips_main(int argc, char **argv)
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define STRINGIFY(symbol)
If not using this 2-stage macro evaluation, the generated string is not the value of the macro but th...
#define same_string_p(s1, s2)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...