8#include "tpcclibConfig.h"
19static char *info[] = {
20 "Reports the byte order of the current platform.",
21 "Big endian computers include Sun Sparc, Motorola, and PowerPC,",
22 "while PC/Intel computers are little endian.",
23 "Programs return code is either 1 (big endian) or 0 (little endian),",
24 "and, by default, either one of the following is printed on screen:",
26 " byte_order := little",
28 "Usage: @P [Options]",
33 "See also: convend, img2flat, flat2img, anabyteo",
35 "Keywords: image, byte order, big endian, little endian",
54int main(
int argc,
char **argv)
56 int ai, help=0, version=0, verbose=1;
65 for(ai=1; ai<argc; ai++)
if(*argv[ai]==
'-') {
66 cptr=argv[ai]+1;
if(*cptr==
'-') cptr++;
if(cptr==NULL)
continue;
68 fprintf(stderr,
"Error: invalid option '%s'\n", argv[ai]);
73 if(help==2) {
tpcHtmlUsage(argv[0], info,
"");
return(0);}
79 fprintf(stderr,
"Error: invalid argument '%s'\n", argv[ai]);
84 if(verbose>0) printf(
"byte_order := little\n");
87 if(verbose>0) printf(
"byte_order := big\n");
Header file for libtpcmisc.
int tpcProcessStdOptions(const char *s, int *print_usage, int *print_version, int *verbose_level)
int tpcHtmlUsage(const char *program, char *text[], const char *path)
void tpcPrintBuild(const char *program, FILE *fp)
void tpcPrintUsage(const char *program, char *text[], FILE *fp)