#include <stdio.h>
#include <stdlib.h>
unsigned char data[][] ={
//0 1 2 3 4 5 6 7 8 9
0,0,0,0,1,1,1,0,0,0, // 0
0,0,0,1,0,0,0,1,0,0, // 1
0,0,1,0,0,0,0,0,1,0, // 2
0,0,1,0,0,0,0,0,1,0, // 3
0,0,1,1,1,1,1,1,1,0, // 4
0,1,0,0,0,0,0,0,0,1, // 5
0,1,0,0,0,0,0,0,0,1, // 6
0,1,0,0,0,0,0,0,0,1, // 7
0,1,0,0,0,0,0,0,0,1, // 8
0,0,0,0,0,0,0,0,0,0, // 9
};
void usage(void)
{
printf("command [option] [arg]");
exit(0);
}
enum{
TRUE = 1,
FALSE = 0
MIN_X = 0,
MAX_X = 10,
MIN_Y = 0,
MAX_Y = 10,
ON = 0x1,
};
int main(int argc, char*argv[])
{
if (argc <= 1) usage();
int i;
int debug = FALSE;
int bold = FALSE;
int white = FALSE;
for (i = 1; i < argc; i++)
{
if (argv[i][0] == \'-\') {
switch(argv[i][1])
{
case \'d\': debug = TRUE; break;
case \'b\': bold = TRUE; break;
case \'w\': white = TRUE; break;
default: usage();
}
}
}
if (debug == TRUE)
{
if (debug == TRUE) printf("debug = ON");
if (bold == TRUE) printf("bold = ON");
if (reverse == TRUE) printf("reverse = ON");
}
for (y = MIN_Y; y < MAX_Y; y++)
for (x = MIN_X; x < MAX_X; x++)
{
if (reverse == TRUE)
{
if (data[y][x] == 0x1) {
printf("_");
} else {
printf("X");
}
} else {
if (data[y][x] == 0x1) {
printf("X");
} else {
printf("_");
}
}
}
}
}