mobile: cosmetic: rename gsm48_rr_tx_{voice->traffic}()
[osmocom-bb.git] / src / target / ui-experiment / png2tiny.c
blobd314b9a2a728d7570ee3c8d00a4ab4df42fc1967
2 #include <stdlib.h>
4 #include <SDL_image.h>
6 enum {
7 FORMAT_NONE,
8 FORMAT_C
9 };
11 void
12 version(const char *name) {
13 puts(name);
14 //printf("%s rev %s\n", name, REVISION);
15 exit(2);
18 void
19 usage(const char *name) {
20 printf("Usage: %s [-hv] [-f outfmt] [-s outsym] <infile> <outfile>\n");
21 exit(2);
24 int
25 main(int argc, char **argv) {
26 int opt, outfmt;
27 const char *outsym = NULL;
28 SDL_Surface *img;
30 while((opt = getopt(argc, argv, "f:s:hv")) != -1) {
31 switch(opt) {
32 case 'f':
33 if(!strcmp(optarg, "c")) {
34 outfmt = FORMAT_C;
36 break;
37 case 's':
38 outsym = optarg;
39 break;
40 case 'v':
41 version(argv[0]);
42 break;
43 case 'h':
44 default:
45 usage(argv[0]);
46 break;
50 return 0;