Code:
#ifndef clorfncs_hh
#define clorfncs_hh
#include <stdlib.h>
void prNwln (
FILE* stream ) {
fprintf ( stream, "\n", "" );
}
void prTitl (
FILE* stream,
const char* titl ) {
const char* frTitl;
frTitl = "\e[1;33m%s\e[0m\n";
fprintf ( stream, frTitl, titl );
}
void prTitl4 (
FILE* stream,
const char* titl ) {
const char* frTitl;
frTitl = "\e[1;33m%s\e[0m\n";
fprintf ( stream, frTitl, titl );
}
void prUsge_sv (
FILE* stream,
const char* prog,
const char* value ) {
const char* frUsge_sv;
frUsge_sv = "\e[0;31m%s\e[0m \e[4;32m%s\e[0m\n";
fprintf ( stream, frUsge_sv, prog, value );
}
void prUsge4_sv (
FILE* stream,
const char* prog,
const char* value ) {
const char* frUsge4_sv;
frUsge4_sv = " \e[0;31m%s\e[0m \e[4;32m%s\e[0m\n";
fprintf ( stream, frUsge4_sv, prog, value );
}
void prUsge_s2v (
FILE* stream,
const char* prog,
const char* value1,
const char* value2 ) {
const char* frUsge_s2v;
frUsge_s2v = "\e[0;31m%s\e[0m \e[4;32m%s\e[0m \e[4;32m%s\e[0m\n";
fprintf ( stream, frUsge_s2v, prog, value1, value2 );
}
void prUsge4_s2v (
FILE* stream,
const char* prog,
const char* value1,
const char* value2 ) {
const char* frUsge4_s2v;
frUsge4_s2v = " \e[0;31m%s\e[0m \e[4;32m%s\e[0m \e[4;32m%s\e[0m\n";
fprintf ( stream, frUsge4_s2v, prog, value1, value2 );
}
void prArgm_sv (
FILE* stream,
const char* actn,
const char* value ) {
const char* frArgm_sv;
frArgm_sv = "\e[0;31m%s\e[0m\e[0;37m=\e[4;32m%s\e[0m\n";
fprintf ( stream, frArgm_sv, actn, value );
}
void prArgm4_sv (
FILE* stream,
const char* actn,
const char* value ) {
const char* frArgm4_sv;
frArgm4_sv = " \e[0;31m%s\e[0m\e[0;37m=\e[4;32m%s\e[0m\n";
fprintf ( stream, frArgm4_sv, actn, value );
}
void prArgm_2s (
FILE* stream,
const char* actn1,
const char* actn2 ) {
const char* frArgm_2s;
frArgm_2s = "\e[0;31m%s\e[0;37m, \e[0;31m%s\e[0m\n";
fprintf ( stream, frArgm_2s, actn1, actn2 );
}
void prArgm4_2s (
FILE* stream,
const char* actn1,
const char* actn2 ) {
const char* frArgm4_2s;
frArgm4_2s = " \e[0;31m%s\e[0;37m, \e[0;31m%s\e[0m\n";
fprintf ( stream, frArgm4_2s, actn1, actn2 );
}
void prArgm_2sd (
FILE* stream,
const char* actn1,
const char* actn2,
const char* desc ) {
const char* frArgm_2sd;
frArgm_2sd = "\e[0;31m%s\e[0;37m, \e[0;31m%s\e[0m \e[0;37m%s\e[0m\n";
fprintf ( stream, frArgm_2sd, actn1, actn2, desc );
}
void prArgm4_2sd (
FILE* stream,
const char* actn1,
const char* actn2,
const char* desc ) {
const char* frArgm4_2sd;
frArgm4_2sd = " \e[0;31m%s\e[0;37m, \e[0;31m%s\e[0m \e[0;37m%s\e[0m\n";
fprintf ( stream, frArgm4_2sd, actn1, actn2, desc );
}
void prArgm_svd (
FILE* stream,
const char* actn,
const char* value,
const char* desc ) {
const char* frArgm_svd;
frArgm_svd = "\e[0;31m%s\e[0m\e[0;37m=\e[4;32m%s\e[0m \e[0;37m%s\e[0m\n";
fprintf ( stream, frArgm_svd, actn, value, desc );
}
void prArgm4_svd (
FILE* stream,
const char* actn,
const char* value,
const char* desc ) {
const char* frArgm4_svd;
frArgm4_svd = " \e[0;31m%s\e[0m\e[0;37m=\e[4;32m%s\e[0m \e[0;37m%s\e[0m\n";
fprintf ( stream, frArgm4_svd, actn, value, desc );
}
void prArgm8_svd (
FILE* stream,
const char* actn,
const char* value,
const char* desc ) {
const char* frArgm8_svd;
frArgm8_svd = " \e[0;31m%s\e[0m\e[0;37m=\e[4;32m%s\e[0m \e[0;37m%s\e[0m\n";
fprintf ( stream, frArgm8_svd, actn, value, desc );
}
void prDesc (
FILE* stream,
const char* desc ) {
const char* frDesc;
frDesc = "\e[0;37m%s\e[0m\n";
fprintf ( stream, frDesc, desc );
}
void prDesc4 (
FILE* stream,
const char* desc ) {
const char* frDesc4;
frDesc4 = " \e[0;37m%s\e[0m\n";
fprintf ( stream, frDesc4, desc );
}
void prUsgeMscl (
FILE* stream ) {
const char* desc;
prNwln ( stream );
prTitl ( stream, "MISCELLANEOUS" );
desc="print verbose messages";
prArgm8_svd ( stream, "--vb", "LEVEL", desc );
desc=" displays usage";
prArgm4_2sd ( stream, "-u", "--usage", desc );
desc=" prints some examples using getveltest";
prArgm4_2sd ( stream, "-e", "--examples", desc );
desc=" display this usage information";
prArgm4_2sd ( stream, "-h", "--help", desc );
}
#endif