PIPS
main_fpips.c File Reference

Go to the source code of this file.

Functions

char * pips_thanks (char *, char *)
 This file contains the main for fpips. More...
 
int fpips_main (int, char **)
 
int main (int argc, char **argv)
 

Function Documentation

◆ fpips_main()

int fpips_main ( int  argc,
char **  argv 
)

should not happen

According to the shell or the debugger, the path may be complete or not... RK.

parsing of options may be continuate by called version.

else try tpips...

Definition at line 130 of file fpips.c.

131 {
132  int opt;
133 
134  debug_on("FPIPS_DEBUG_LEVEL");
135  pips_debug(1, "considering %s for execution\n", argv[0]);
136  debug_off();
137 
138  if (argc<1) return TPIPS(argc, argv); /* should not happen */
139 
140  /* According to the shell or the debugger, the path may be
141  complete or not... RK. */
142  if (name_end_p(argv[0], "gpips"))
143  return GPIPS(argc, argv);
144  if (name_end_p(argv[0], "tpips"))
145  return TPIPS(argc, argv);
146  if (name_end_p(argv[0], "wpips"))
147  return WPIPS(argc, argv);
148  if (name_end_p(argv[0], "/pips") || same_string_p(argv[0], "pips"))
149  return PIPS(argc, argv);
150 
151  /* parsing of options may be continuate by called version.
152  */
153  while ((opt = getopt(argc, argv, "hvGPTW"))!=-1)
154  {
155  switch (opt)
156  {
157  case 'h': fpips_usage(0); break;
158  case 'v': fpips_version(0); break;
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);
163  default: return fpips_version(1);
164  }
165  }
166 
167  /* else try tpips...
168  */
169  fprintf(stderr, "[fpips] default: running as tpips\n\n");
170  return TPIPS(argc, argv);
171 }
static int fpips_version(int ret)
print out fpips version.
Definition: fpips.c:100
#define PIPS(c, v)
Definition: fpips.c:54
static int name_end_p(char *name, char *ref)
returns whether name ends with ref
Definition: fpips.c:118
static int fpips_usage(int ret)
print out usage informations.
Definition: fpips.c:92
#define TPIPS(c, v)
Definition: fpips.c:61
#define GPIPS(c, v)
Definition: fpips.c:75
#define WPIPS(c, v)
Definition: fpips.c:68
#define debug_on(env)
Definition: misc-local.h:157
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
Definition: misc-local.h:145
#define debug_off()
Definition: misc-local.h:160
#define same_string_p(s1, s2)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...

References debug_off, debug_on, fpips_usage(), fpips_version(), fprintf(), GPIPS, name_end_p(), PIPS, pips_debug, same_string_p, TPIPS, and WPIPS.

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 35 of file main_fpips.c.

36 {
37  pips_thanks("fpips", argv[0]);
38  return fpips_main(argc, argv);
39 }
char * pips_thanks(char *, char *)
This file contains the main for fpips.
Definition: message.c:265
int fpips_main(int, char **)
Definition: fpips.c:130

References fpips_main(), and pips_thanks().

+ Here is the call graph for this function:

◆ pips_thanks()

char* pips_thanks ( string  name,
string  path 
)

This file contains the main for fpips.

Please, do not change anything! do any change to fpips_main().

This file contains the main for fpips.

Parameters
nameame
pathath

Definition at line 265 of file message.c.

266 {
267  if (isatty(fileno(stdout)))
268  {
269  fprintf(stdout, PIPS_THANKS_STRING(STRINGIFY(SOFT_ARCH)), name, path);
270  fflush(stdout);
271  }
272 }
#define PIPS_THANKS_STRING(arch)
The # "stringificator" only works in a macro expansion...
Definition: message.c:247
#define STRINGIFY(symbol)
If not using this 2-stage macro evaluation, the generated string is not the value of the macro but th...
Definition: misc-local.h:50

Referenced by main().

+ Here is the caller graph for this function: