
#include <stdio.h>

int main(int argc, char **argv)
{
	char *symbol = "test";
	unsigned char uc;
	int s;
		

	if (argc > 1) {
		symbol = argv[1];
	}

	printf("unsigned char %s[] = {\n", symbol);

	while (1) {
		s = fread(&uc, 1, 1, stdin);

		if (s == 0) {
			if (feof(stdin)) {
				break;
			}
			
			fprintf(stderr, "read error from stdin\n");
			return 1;
		}

		printf("0x%02x,\n", uc);
	}
	printf("};\n");

	return 0;
}
