comparison src/pass1.c @ 89:11d38c9e5095

Made reading input files use binary mode to avoid newline translation since we handle it ourselves manually
author lost
date Sat, 17 Jan 2009 04:38:32 +0000
parents 918be0c02239
children
comparison
equal deleted inserted replaced
88:6460a1fb5f1f 89:11d38c9e5095
81 // add filename to list 81 // add filename to list
82 as -> filelist = lwasm_realloc(as -> filelist, sizeof(char *) * (as -> filelistlen + 1)); 82 as -> filelist = lwasm_realloc(as -> filelist, sizeof(char *) * (as -> filelistlen + 1));
83 fnref = as -> filelist[as -> filelistlen] = lwasm_strdup(filename); 83 fnref = as -> filelist[as -> filelistlen] = lwasm_strdup(filename);
84 as -> filelistlen += 1; 84 as -> filelistlen += 1;
85 85
86 f = fopen(filename, "r"); 86 f = fopen(filename, "rb");
87 if (!f) 87 if (!f)
88 return -1; 88 return -1;
89 89
90 for (;;) 90 for (;;)
91 { 91 {