diff options
| -rw-r--r-- | macosx/ScintillaMacOSX.h | 2 | ||||
| -rw-r--r-- | macosx/makefile | 28 | ||||
| -rw-r--r-- | src/LexR.cxx | 3 | ||||
| -rw-r--r-- | src/LexTeX.cxx | 6 | 
4 files changed, 27 insertions, 12 deletions
| diff --git a/macosx/ScintillaMacOSX.h b/macosx/ScintillaMacOSX.h index ebeda834d..1b386b48b 100644 --- a/macosx/ScintillaMacOSX.h +++ b/macosx/ScintillaMacOSX.h @@ -26,11 +26,11 @@  #include "Accessor.h"  #include "KeyWords.h"  #endif -#include "ContractionState.h"  #include "SVector.h"  #include "SplitVector.h"  #include "Partitioning.h"  #include "RunStyles.h" +#include "ContractionState.h"  #include "CellBuffer.h"  #include "CallTip.h"  #include "KeyMap.h" diff --git a/macosx/makefile b/macosx/makefile index aa1d32e68..425456856 100644 --- a/macosx/makefile +++ b/macosx/makefile @@ -6,7 +6,7 @@  # GNU make does not like \r\n line endings so should be saved to CVS in binary form.  .SUFFIXES: .cxx .c .o .h .a -CC = c++ +CC = g++  CCOMP = gcc  LIBTOOL = libtool @@ -15,7 +15,8 @@ GCC_MAJOR    := $(shell $(CC) -v 2>&1 | \  # We call it "libscintilla" so when you add it to a Project Builder project,  # Project Builder will link it correctly. -COMPLIB=../bin/libscintilla.a +STATICLIB=../bin/libscintilla.a +DYNAMICLIB=../bin/libscintilla.dylib  vpath %.h ../src ../include  vpath %.cxx ../src @@ -27,8 +28,12 @@ ifeq ($(GCC_MAJOR),3)  # on a 10.3 or older PPC box  ARCHFLAGS=-arch ppc -faltivec -mcpu=7400 -mtune=7400 -mpowerpc -mpowerpc-gfxopt  else -ARCHFLAGS=-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -LDFLAGS=/usr/include/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 +ifndef NATIVE +ARCH_BASE_FLAGS=/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 +ARCHFLAGS=-isysroot $(ARCH_BASE_FLAGS) +LINK_FLAGS=-Wl,-syslibroot,$(ARCH_BASE_FLAGS) +DYN_FLAGS=$(LINK_FLAGS) -framework Carbon -bundle +endif  endif  OPTIONS=-Wall -Wno-missing-braces -Wno-char-subscripts -DSCI_NAMESPACE -DMACOSX -DSCI_LEXER @@ -67,22 +72,29 @@ LexVB.o LexVerilog.o LexVHDL.o LexYAML.o  # The LEXOBJS have to be treated specially as the functions in them are not called from external code -all: $(COMPLIB) $(LEXOBJS) +all: $(STATICLIB) $(LEXOBJS) + +shared: $(DYNAMICLIB) $(LEXOBJS)  clean:  	rm -f *.o $(COMPLIB)  deps: -	$(CC) -MM $(CXXFLAGS) *.cxx ../src/*.cxx >deps.mak +	$(CC) -MM -DSCI_NAMESPACE -DMACOSX -DSCI_LEXER  $(CXXFLAGS) $(INCLUDEDIRS) *.cxx ../src/*.cxx >deps.mak -$(COMPLIB): DocumentAccessor.o WindowAccessor.o KeyWords.o StyleContext.o \ +COMPLIB=DocumentAccessor.o WindowAccessor.o KeyWords.o StyleContext.o \  	CharClassify.o Decoration.o Document.o CallTip.o PositionCache.o \  	ScintillaBase.o ContractionState.o Editor.o ExternalLexer.o PropSet.o PlatMacOSX.o \  	KeyMap.o LineMarker.o ScintillaMacOSX.o CellBuffer.o ViewStyle.o \  	RESearch.o RunStyles.o Style.o Indicator.o AutoComplete.o UniConversion.o XPM.o \          TCarbonEvent.o TView.o ScintillaCallTip.o \  	$(LEXOBJS) -	$(LIBTOOL) -o $@ $^ + +$(STATICLIB): $(COMPLIB)  +	$(LIBTOOL) -static -o $@ $^ + +$(DYNAMICLIB): $(COMPLIB)  +	$(CC) -dynamic -o $@ $(DYN_FLAGS) $^  # Generate header files from Scintilla.iface  ../include/Scintilla_gen.h: ../include/HFacer.py ../include/Face.py ../include/Scintilla.iface diff --git a/src/LexR.cxx b/src/LexR.cxx index 439e3e56f..0ca45cfd0 100644 --- a/src/LexR.cxx +++ b/src/LexR.cxx @@ -21,6 +21,9 @@  #include "Scintilla.h"  #include "SciLexer.h" +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif  static inline bool IsAWordChar(const int ch) {  	return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_'); diff --git a/src/LexTeX.cxx b/src/LexTeX.cxx index fb1df2423..e28857a35 100644 --- a/src/LexTeX.cxx +++ b/src/LexTeX.cxx @@ -280,14 +280,14 @@ static void ColouriseTeXDoc(  } -static inline bool isnumber(int ch) { +static inline bool isNumber(int ch) {  	return        (ch == '0') || (ch == '1') || (ch == '2') ||         (ch == '3') || (ch == '4') || (ch == '5') ||         (ch == '6') || (ch == '7') || (ch == '8') || (ch == '9');  } -static inline bool iswordchar(int ch) { +static inline bool isWordChar(int ch) {  	return ((ch >= 'a') && (ch <= 'z')) || ((ch >= 'A') && (ch <= 'Z'));  } @@ -303,7 +303,7 @@ static int ParseTeXCommand(unsigned int pos, Accessor &styler, char *command)    }    // find end -     while(iswordchar(ch) && !isnumber(ch) && ch!='_' && ch!='.' && length<100){ +     while(isWordChar(ch) && !isNumber(ch) && ch!='_' && ch!='.' && length<100){            command[length]=ch;            length++;            ch=styler.SafeGetCharAt(pos+length+1); | 
