OpenIndiana and Solaris port
This commit is contained in:
committed by
Jon Trulson
parent
42e891d9e7
commit
01d6c363fa
@@ -1,4 +1,4 @@
|
||||
XCOMM $TOG: Imakefile /main/27 1997/04/30 15:38:09 kaleb $
|
||||
XCOMM $tog: Imakefile /main/27 1997/04/30 15:38:09 kaleb $
|
||||
|
||||
SRCS = include.c main.c parse.c pr.c cppsetup.c ifparser.c
|
||||
OBJS = include.o main.o parse.o pr.o cppsetup.o ifparser.o
|
||||
@@ -28,6 +28,7 @@ INC_DEFINES = $(PREINC_DEFINES) $(STDINC_DEFINES) $(POSTINC_DEFINES)
|
||||
OSUF = .Osuf
|
||||
OSUF_DEFINES = -DOBJSUFFIX=\"$(OSUF)\"
|
||||
MAIN_DEFINES = $(INC_DEFINES) $(SIGNAL_DEFINES) $(OSUF_DEFINES)
|
||||
DEPEND_DEFINES = $(DEPENDDEFINES)
|
||||
INCLUDES = -I$(IMAKESRC) -I$(TOP)/include $(TOP_X_INCLUDES)/X11
|
||||
|
||||
DEPLIBS =
|
||||
|
||||
@@ -81,7 +81,6 @@
|
||||
|
||||
#include "ifparser.h"
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
* ParseIfExpression parse a string for #if
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define const /**/
|
||||
|
||||
@@ -525,7 +525,8 @@ char *our_getline(filep)
|
||||
lineno = filep->f_line;
|
||||
|
||||
for(bol = p--; ++p < eof; ) {
|
||||
if (*p == '/' && *(p+1) == '*') { /* consume comments */
|
||||
if (*p == '/' && (p+1) < eof && *(p+1) == '*') {
|
||||
/* consume C comments */
|
||||
*p++ = ' ', *p++ = ' ';
|
||||
while (*p) {
|
||||
if (*p == '*' && *(p+1) == '/') {
|
||||
@@ -538,15 +539,31 @@ char *our_getline(filep)
|
||||
}
|
||||
continue;
|
||||
}
|
||||
#ifdef WIN32
|
||||
else if (*p == '/' && *(p+1) == '/') { /* consume comments */
|
||||
*p++ = ' ', *p++ = ' ';
|
||||
while (*p && *p != '\n')
|
||||
*p++ = ' ';
|
||||
lineno++;
|
||||
continue;
|
||||
else if (*p == '/' && (p+1) < eof && *(p+1) == '/') {
|
||||
/* consume C++ comments */
|
||||
*p++ = ' ';
|
||||
*p++ = ' ';
|
||||
while (p < eof && *p) {
|
||||
if (*p == '\\' && (p+1) < eof &&
|
||||
*(p+1) == '\n') {
|
||||
*(p++) = ' ';
|
||||
lineno++;
|
||||
}
|
||||
else if (*p == '?' && (p+3) < eof &&
|
||||
*(p+1) == '?' &&
|
||||
*(p+2) == '/' &&
|
||||
*(p+3) == '\n') {
|
||||
*(p++) = ' ';
|
||||
*(p++) = ' ';
|
||||
*(p++) = ' ';
|
||||
lineno++;
|
||||
}
|
||||
else if (*p == '\n')
|
||||
break; /* to process end of line */
|
||||
*(p++) = ' ';
|
||||
}
|
||||
--p;
|
||||
}
|
||||
#endif
|
||||
else if (*p == '\\') {
|
||||
if (*(p+1) == '\n') {
|
||||
*p = ' ';
|
||||
|
||||
@@ -60,6 +60,7 @@ add_include(filep, file, file_red, include, dot, failOK)
|
||||
struct inclist *file, *file_red;
|
||||
char *include;
|
||||
boolean dot;
|
||||
boolean failOK;
|
||||
{
|
||||
register struct inclist *newfile;
|
||||
register struct filepointer *content;
|
||||
|
||||
Reference in New Issue
Block a user