From: Alan Cox Date: Thu, 16 Nov 2017 23:54:02 +0000 (+0000) Subject: preproc: fix silly bug X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=a7c411f24b53afa136dda89a1a6d0a8fd364f7b4;p=FUZIX.git preproc: fix silly bug --- diff --git a/Applications/SmallC/preproc.c b/Applications/SmallC/preproc.c index a18875d6..60f077cd 100644 --- a/Applications/SmallC/preproc.c +++ b/Applications/SmallC/preproc.c @@ -33,13 +33,13 @@ int fix_include_name (void) { } *(--ibp) = 0; fp = -1; - if (c1 == '<' || ((fp = open(buf, O_RDONLY)) != -1)) { + if (c1 == '<' || ((fp = open(buf, O_RDONLY)) == -1)) { #ifndef __linux__ strcpy(buf2, DEFLIB); strlcat(buf2, buf, sizeof(buf2)); #else snprintf(buf2, sizeof(buf2), "%s%s", DEFLIB, buf); -#endif +#endif fp = open(buf2, O_RDONLY); } return (fp); @@ -266,6 +266,7 @@ int cpp(void) lptr = mptr = 0; while((line[lptr++] = mline[mptr++]) != 0); lptr = 0; + printf(">%s\n", line); return(cpped); }