35 #define MISCTEST_VERSION \ 36 "MISCTEST V1.0 test miscellaneous functions and modules" 39 #include <tfxx/commandline.h> 40 #include <tfxx/hexdump.h> 46 int main(
int iargc,
char* argv[])
53 "usage: misctest [--hexdump]" "\n" 54 " or: misctest --help|-h" "\n" 60 "--hexdump test hex dump function" 79 cerr << usage_text << endl;
89 cerr << usage_text << endl;
90 cerr << help_text << endl;
123 char q[]=
"Hi there. This is a quite long character sequence.";
125 std::cout << std::endl;
127 std::cout << std::endl;
128 std::cout <<
"raw output of 30 bytes of q:" << std::endl;
130 std::cout << std::endl;
bool optset(const int &iopt) const
true if option # iopt was set on commandline
#define TFXX_hexdump(V)
produce hexdump to stdout, preceeded by object name.
Namespace containing all components of module commandline. ,.
Evaluates commandline by calling long_getopt. ,You may instantiate a Commandline object by passing th...
std::ostream & hexdump(const void *pp, const unsigned int &size, std::ostream &os, const char &c, const unsigned int &n)
output hex dump of memory area.
int main(int iargc, char *argv[])
struct to define options ,This struct is used to define a list of options. An example is: ...