updated on Wed Jan 11 00:07:16 UTC 2012
[aur-mirror.git] / pic30-gcc / resource.diff
blob2ab778474a00ab1e71c3fc25ab46b3deec2fe595
1 --- ./c30_resource/src/generator/resource.c.~1~ 2008-02-20 18:19:36.000000000 +0100
2 +++ ./c30_resource/src/generator/resource.c 2009-01-31 07:30:30.000000000 +0100
3 @@ -65,29 +65,7 @@
4 unsigned int i;
6 buffer_size = 80;
7 - if (stat(name,&fileinfo) == -1) {
8 - /* name cannot be statted */
9 - /* this could be because of the reoganization of the install directory
10 - * some of the binaries are in the same directory as the resource file,
11 - * some are one directory below it... try moving one up and looking again
12 - */
13 - char *c;
14 - char *ultimate = (char *)name,
15 - *penultimate = (char *)name;
16 - char *temp;
18 - for (c = (char *)name; *c; c++) {
19 - if ((*c == '/') || (*c == '\\')) {
20 - penultimate = ultimate;
21 - ultimate = c;
22 - while (c[1] == *c) c++; /* ignore duplicate slashes */
23 - }
24 - }
25 - temp = (char *)xcalloc(strlen(ultimate)+1,1);
26 - strcpy(temp, ultimate);
27 - strcpy(penultimate,ultimate);
28 - stat(name,&fileinfo);
29 - }
30 + stat(name,&fileinfo);
31 /* under WINDOZE, the "b" is required because text files are subject to
32 translation and ftell and fseek might not agree */
33 input_file = fopen(name,"rb");