Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1811 yogev_ezra 1
 
2
3
 
4
5
 
6
{
7
8
 
9
FILE *fout;
10
unsigned i;
11
int num;
12
13
 
14
	{
15
	printf ("file2c v0.2 by O.Bogomaz (albom85@yandex.ru)\nfile2c.exe file.in file.out\n\n");
16
	return -1;
17
	}
18
19
 
20
fout = fopen (argv[2], "wt");
21
22
 
23
24
 
25
	{
26
	if ( 0 == i%16)
27
		fprintf(fout, "\n");
28
	num = getc(fin);
29
	if (feof(fin))
30
		break;
31
	fprintf (fout, "0x%c%c,", (int)hextable[(num >> 4)], (int)hextable[(num & 0x0f)]);
32
	}
33
34
 
35
36
 
37
}
38