Code:
void print_usage(FILE* stream, int exit_code) {
const char* progname;
const char* bYl;
const char* nRd;
const char* uGn;
const char* nWh;
const char* rcl;
char* frArgm_sv;
progname = "getveltest";
bYl = "\e[1;33m";
nRd = "\e[0;31m";
uGn = "\e[4;32m";
nWh = "\e[0;37m";
rcl = "\e[0m";
fprintf (stream,"%s%s%s\n",bYl,"USAGE",rcl);
fprintf (stream," %s%s %s%s%s\n\n",nRd,progname,uGn,"ACTIONS",rcl);
fprintf (stream,"%s%s%s\n",bYl,"ACTIONS",rcl);
fprintf (stream," %s%s%s%s%s%s%s",nRd,"--cmod",nWh,"=",uGn,"FILE",rcl);
fprintf (stream," %s\n"," sound speed model (mandatory)");
fprintf (stream," %s%s%s%s%s%s%s",nRd,"--vdx",nWh,"=",uGn,"DX",rcl);
fprintf (stream," %s\n"," interval in x direction in velocity file");
fprintf (stream," %s%s%s%s%s%s%s",nRd,"--nx",nWh,"=",uGn,"NUM",rcl);
fprintf (stream," %s\n"," interval calculated with vdx = Lx / Nx (default: 20)");
fprintf (stream," %s%s%s%s%s%s%s",nRd,"--vdz",nWh,"=",uGn,"DZ",rcl);
fprintf (stream," %s\n"," interval in z direction in velocity file");
fprintf (stream," %s%s%s%s%s%s%s",nRd,"--nz",nWh,"=",uGn,"NUM",rcl);
fprintf (stream," %s\n"," interval calculated with vdz = Lz / Nz (default: 20)");
fprintf (stream," %s%s%s%s%s%s%s",nRd,"--vdi",nWh,"=",uGn,"DI",rcl);
fprintf (stream," %s\n"," interval along interface");
fprintf (stream," %s%s%s%s%s%s%s",nRd,"--ni",nWh,"=",uGn,"NUM",rcl);
fprintf (stream," %s\n"," interval calculated with vdi = Li / Ni (default: 20)");
fprintf (stream," %s%s%s%s%s%s%s",nRd,"--vel",nWh,"=",uGn,"FILE",rcl);
fprintf (stream," %s\n"," file with P wave velocity in 'x z v' format");
fprintf (stream," %s%s%s%s%s%s%s",nRd,"--velp",nWh,"=",uGn,"FILE",rcl);
fprintf (stream," %s\n"," file with P wave velocity in 'x z v' format");
fprintf (stream," %s%s%s%s%s%s%s",nRd,"--vels",nWh,"=",uGn,"FILE",rcl);
fprintf (stream," %s\n"," file with S wave velocity in 'x z v' format");
fprintf (stream," %s%s%s%s%s%s%s",nRd,"--lay",nWh,"=",uGn,"ON/OFF",rcl);
fprintf (stream," %s\n","if --lay=ON, output files are in 'x z v l' format");
fprintf (stream," %s%s%s%s%s%s%s",nRd,"--intf",nWh,"=",uGn,"FILE",rcl);
fprintf (stream," %s\n"," output file for interfaces in 'x z' format, separated by '>'");
fprintf (stream," %s%s%s%s%s%s%s",nRd,"--vb",nWh,"=",uGn,"LEVEL",rcl);
fprintf (stream," %s\n"," print verbose messages");
fprintf (stream," %s%s%s%s%s%s%s",nRd,"-u",nWh," ",nRd,"--usage",rcl);
fprintf (stream," %s\n"," displays usage");
fprintf (stream," %s%s%s%s%s%s%s",nRd,"-h",nWh," ",nRd,"--help",rcl);
fprintf (stream," %s\n"," display this usage information");
exit (exit_code);
}