11#include "../include/var_struc.h"
26void arg_preprocess(
const int argc_least,
const int argc,
char *argv[],
char * scheme)
30 for (k = 0; k < argc; k++)
31 printf(
"%s ", argv[k]);
34 printf(
"TEST:\n %s\n", argv[1]);
36 printf(
"\x1b[47;34mTEST:\x1b[0m\n \x1b[1;31m%s\x1b[0m\n", argv[1]);
41 printf(
"Test Beginning: ARGuments Counter %d is less than %d\n", argc, argc_least);
43 printf(
"Test Beginning: \x1b[43;37mARGuments Counter %d is less than %d\x1b[0m\n", argc, argc_least);
49 printf(
"Test Beginning: ARGuments Counter = %d\n", argc);
51 printf(
"Test Beginning: \x1b[43;37mARGuments Counter = %d\x1b[0m\n", argc);
57 printf(
"Order[_Scheme]: %s\n",argv[3]);
59 printf(
"Order[_Scheme]: \x1b[41;37m%s\x1b[0m\n",argv[3]);
62 order = strtoul(argv[3], &scheme, 10);
65 else if (*scheme !=
'\0' || errno == ERANGE)
67 printf(
"No order or Wrog scheme!\n");
73 printf(
"Configurating:\n");
75 printf(
"\x1b[42;36mConfigurating:\x1b[0m\n");
79 for (k = argc_least+1; k < argc; k++)
82 j = strtoul(argv[k], &endptr, 10);
83 if (errno != ERANGE && *endptr ==
'=')
87 conf_tmp = strtod(endptr, &endptr);
88 if (errno != ERANGE && *endptr ==
'\0')
91 printf(
"%3d-th configuration: %g (ARGument)\n", j, conf_tmp);
95 printf(
"Configuration error in ARGument variable %d! ERROR after '='!\n", k);
101 printf(
"Configuration error in ARGument variable %d! ERROR before '='!\n", k);
double config[N_CONF]
Initial configuration data array.
void arg_preprocess(const int argc_least, const int argc, char *argv[], char *scheme)
This is a functions preprocesses ARGuments.