├── .travis.yml ├── CMakeLists.txt ├── License.txt ├── README ├── SciTE.properties ├── bin ├── .cvsignore └── empty.txt ├── boundscheck ├── .cvsignore ├── SciTE.dsp ├── SciTE.sln ├── SciTE.vcproj └── vcproj.gen ├── cmake ├── FindLua.cmake ├── dist.cmake └── lua.cmake ├── delbin.bat ├── delcvs.bat ├── dist.info ├── doc ├── CommandValues.html ├── PaneAPI.html ├── PrintHi.png ├── SciBreak2.jpg ├── SciTE.html ├── SciTEDirector.html ├── SciTEDoc.html ├── SciTEDownload.html ├── SciTEExtension.html ├── SciTEExternalLexer.html ├── SciTEExtras.html ├── SciTEFAQ.html ├── SciTEIco.png ├── SciTEImage.html ├── SciTELexer.html ├── SciTELua.html ├── SciTERegEx.html ├── SciTEWord.jpg ├── ScriptLexer.html ├── demo.png └── scite.1 ├── gtk ├── DirectorExtension.cxx ├── DirectorExtension.h ├── GTKMutex.cxx ├── GUIGTK.cxx ├── Sci48M.png ├── SciIcon.h ├── SciTE.desktop ├── SciTEGTK.cxx ├── Widget.cxx ├── Widget.h ├── deps.mak ├── lua.vers ├── makefile └── pixmapsGNOME.h ├── lua ├── COPYRIGHT ├── HISTORY ├── README ├── include │ ├── lauxlib.h │ ├── lua.h │ ├── luaconf.h │ └── lualib.h └── src │ ├── lapi.c │ ├── lapi.h │ ├── lcode.c │ ├── lcode.h │ ├── ldebug.c │ ├── ldebug.h │ ├── ldo.c │ ├── ldo.h │ ├── ldump.c │ ├── lfunc.c │ ├── lfunc.h │ ├── lgc.c │ ├── lgc.h │ ├── lib │ ├── lauxlib.c │ ├── lbaselib.c │ ├── ldblib.c │ ├── linit.c │ ├── liolib.c │ ├── lmathlib.c │ ├── loadlib.c │ ├── loslib.c │ ├── lstrlib.c │ └── ltablib.c │ ├── llex.c │ ├── llex.h │ ├── llimits.h │ ├── lmem.c │ ├── lmem.h │ ├── lobject.c │ ├── lobject.h │ ├── lopcodes.c │ ├── lopcodes.h │ ├── lparser.c │ ├── lparser.h │ ├── lstate.c │ ├── lstate.h │ ├── lstring.c │ ├── lstring.h │ ├── ltable.c │ ├── ltable.h │ ├── ltm.c │ ├── ltm.h │ ├── lundump.c │ ├── lundump.h │ ├── lvm.c │ ├── lvm.h │ ├── lzio.c │ └── lzio.h ├── output.pdf ├── scripts ├── CheckMentioned.py ├── CheckPropsDoc.py ├── IFaceTableGen.py ├── ba ├── ba.bat ├── checkbuildlinux.sh ├── checkbuilds.bat ├── clearboth.bat ├── commandsdoc.py ├── makerpms.py ├── scite.spec └── tags2api.py ├── src ├── Cookie.cxx ├── Cookie.h ├── Credits.cxx ├── Embedded.properties ├── Exporters.cxx ├── Extender.h ├── FilePath.cxx ├── FilePath.h ├── FileWorker.cxx ├── FileWorker.h ├── GUI.h ├── IFaceTable.cxx ├── IFaceTable.h ├── JobQueue.cxx ├── JobQueue.h ├── LuaExtension.cxx ├── LuaExtension.h ├── MultiplexExtension.cxx ├── MultiplexExtension.h ├── Mutex.h ├── PropSetFile.cxx ├── PropSetFile.h ├── SString.h ├── SciTE.h ├── SciTE.properties ├── SciTEBase.cxx ├── SciTEBase.h ├── SciTEBuffers.cxx ├── SciTEGlobal.properties ├── SciTEIO.cxx ├── SciTEKeys.h ├── SciTEProps.cxx ├── StringHelpers.cxx ├── StringHelpers.h ├── StringList.cxx ├── StringList.h ├── StripDefinition.h ├── StyleWriter.cxx ├── StyleWriter.h ├── Utf8_16.cxx ├── Utf8_16.h ├── Worker.h ├── abaqus.properties ├── abbrev.properties ├── ada.properties ├── asm.properties ├── asn1.properties ├── au3.properties ├── ave.properties ├── avs.properties ├── baan.properties ├── blitzbasic.properties ├── bullant.properties ├── caml.properties ├── cmake.properties ├── cobol.properties ├── conf.properties ├── cpp.properties ├── csound.properties ├── css.properties ├── d.properties ├── ecl.properties ├── eiffel.properties ├── erlang.properties ├── escript.properties ├── flagship.properties ├── forth.properties ├── fortran.properties ├── freebasic.properties ├── gap.properties ├── haskell.properties ├── html.properties ├── inno.properties ├── kix.properties ├── latex.properties ├── lisp.properties ├── lot.properties ├── lout.properties ├── lua.properties ├── matlab.properties ├── metapost.properties ├── mmixal.properties ├── modula3.properties ├── nimrod.properties ├── nncrontab.properties ├── nsis.properties ├── opal.properties ├── oscript.properties ├── others.properties ├── pascal.properties ├── perl.properties ├── pov.properties ├── powerpro.properties ├── powershell.properties ├── ps.properties ├── purebasic.properties ├── python.properties ├── r.properties ├── rebol.properties ├── ruby.properties ├── scite_lua_win.h ├── scriptol.properties ├── smalltalk.properties ├── sorcins.properties ├── specman.properties ├── spice.properties ├── sql.properties ├── tacl.properties ├── tal.properties ├── tcl.properties ├── tex.properties ├── txt2tags.properties ├── vb.properties ├── verilog.properties ├── vhdl.properties └── yaml.properties ├── tgzgscite ├── tgzsrc ├── upxsc1.bat ├── win32 ├── DirectorExtension.cxx ├── DirectorExtension.h ├── DragDrop.cur ├── GUIWin.cxx ├── SciBall.ico ├── SciTE.exe.manifest ├── SciTERes.rc ├── SciTEWin.cxx ├── SciTEWin.h ├── SciTEWinBar.cxx ├── SciTEWinDlg.cxx ├── UniqueInstance.cxx ├── UniqueInstance.h ├── WinMutex.cxx ├── around.bmp ├── backslash.bmp ├── case.bmp ├── closefile.bmp ├── deps.mak ├── locale.properties ├── makefile ├── regex.bmp ├── scite.mak ├── up.bmp └── word.bmp ├── zipsrc.bat ├── zipwscite.bat └── zipwscited.bat /.travis.yml: -------------------------------------------------------------------------------- 1 | # 2 | # LuaDist Travis-CI Hook 3 | # 4 | 5 | # We assume C build environments 6 | language: C 7 | 8 | # Try using multiple Lua Implementations 9 | env: 10 | - TOOL="gcc" # Use native compiler (GCC usually) 11 | - TOOL="clang" # Use clang 12 | - TOOL="i686-w64-mingw32" # 32bit MinGW 13 | - TOOL="x86_64-w64-mingw32" # 64bit MinGW 14 | - TOOL="arm-linux-gnueabihf" # ARM hard-float (hf), linux 15 | 16 | # Crosscompile builds may fail 17 | matrix: 18 | allow_failures: 19 | - env: TOOL="i686-w64-mingw32" 20 | - env: TOOL="x86_64-w64-mingw32" 21 | - env: TOOL="arm-linux-gnueabihf" 22 | 23 | # Install dependencies 24 | install: 25 | - git clone git://github.com/LuaDist/Tools.git ~/_tools 26 | - ~/_tools/travis/travis install 27 | 28 | # Bootstap 29 | before_script: 30 | - ~/_tools/travis/travis bootstrap 31 | 32 | # Build the module 33 | script: 34 | - ~/_tools/travis/travis build 35 | 36 | # Execute additional tests or commands 37 | after_script: 38 | - ~/_tools/travis/travis test 39 | 40 | # Only watch the master branch 41 | branches: 42 | only: 43 | - master 44 | 45 | # Notify the LuaDist Dev group if needed 46 | notifications: 47 | recipients: 48 | - luadist-dev@googlegroups.com 49 | email: 50 | on_success: change 51 | on_failure: always 52 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2007-2012 LuaDist. 2 | # Submitted by David Manura, Peter Drahos 3 | # Redistribution and use of this file is allowed according to the terms of the MIT license. 4 | # For details see the COPYRIGHT file distributed with LuaDist. 5 | # Please note that the package source code is licensed under its own license. 6 | 7 | # warning: compilation options might not be optical 8 | 9 | project ( scite CXX ) 10 | cmake_minimum_required ( VERSION 2.8 ) 11 | include ( cmake/dist.cmake ) 12 | 13 | find_package ( Lua REQUIRED ) 14 | find_library ( SCINTILLA_LIBRARY NAMES scintilla ) 15 | find_path ( SCINTILLA_INCLUDE_DIR Scintilla.h ) 16 | 17 | include_directories ( ${SCINTILLA_INCLUDE_DIR} ${LUA_INCLUDE_DIR} include src ) 18 | file ( GLOB SRC_SCITE src/*.cxx ) 19 | file ( GLOB PROPERTIES src/*.properties ) 20 | 21 | if ( WIN32 ) 22 | include_directories ( win32 ) 23 | add_definitions ( -DUNICODE -D_UNICODE ) 24 | file ( GLOB SRC_WIN32 win32/*.cxx ) 25 | list ( APPEND SRC_SCITE ${SRC_WIN32} win32/SciTERes.rc ) 26 | set ( LIB -lmsimg32 -lcomctl32 -limm32 -lole32 -luuid -luxtheme ) 27 | set ( EXE_TYPE WIN32 ) 28 | endif () 29 | 30 | add_executable ( scite ${EXE_TYPE} ${SRC_SCITE} ) 31 | target_link_libraries ( scite ${SCINTILLA_LIBRARY} ${LUA_LIBRARIES} ${LIB} ) 32 | 33 | install_executable ( scite ) 34 | 35 | # Install properties 36 | install ( FILES SciTE.properties DESTINATION ${INSTALL_BIN} COMPONENT Data ) 37 | install_data ( ${PROPERTIES} INTO properties ) 38 | install_data ( scripts/ INTO scripts ) 39 | install_doc ( doc/ ) 40 | install_data ( README License.txt ) 41 | -------------------------------------------------------------------------------- /License.txt: -------------------------------------------------------------------------------- 1 | License for Scintilla and SciTE 2 | 3 | Copyright 1998-2003 by Neil Hodgson 4 | 5 | All Rights Reserved 6 | 7 | Permission to use, copy, modify, and distribute this software and its 8 | documentation for any purpose and without fee is hereby granted, 9 | provided that the above copyright notice appear in all copies and that 10 | both that copyright notice and this permission notice appear in 11 | supporting documentation. 12 | 13 | NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 14 | SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 15 | AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY 16 | SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 17 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 18 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE 20 | OR PERFORMANCE OF THIS SOFTWARE. -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | README for building of Scintilla and SciTE 2 | 3 | Scintilla can be built by itself. 4 | To build SciTE, Scintilla must first be built. 5 | 6 | 7 | *** GTK+/Linux version *** 8 | 9 | You must first have GTK+ 2.0 or later and GCC (4.1 or better) installed. 10 | GTK+ 1.x will not work. 11 | Other C++ compilers may work but may require tweaking the make file. 12 | 13 | To build Scintilla, use the makefile located in the scintilla/gtk directory 14 | cd scintilla/gtk 15 | make 16 | cd ../.. 17 | 18 | To build and install SciTE, use the makefile located in the scite/gtk directory 19 | cd scite/gtk 20 | make 21 | make install 22 | 23 | This installs SciTE into $prefix/bin. The value of $prefix is determined from 24 | the location of Gnome if it is installed. This is usually /usr if installed 25 | with Linux or /usr/local if built from source. If Gnome is not installed 26 | /usr/bin is used as the prefix. The prefix can be overridden on the command 27 | line like "make prefix=/opt" but the same value should be used for both make 28 | and make install as this location is compiled into the executable. The global 29 | properties file is installed at $prefix/share/scite/SciTEGlobal.properties. 30 | The language specific properties files are also installed into this directory. 31 | 32 | To remove SciTE 33 | make uninstall 34 | 35 | To clean the object files which may be needed to change $prefix 36 | make clean 37 | 38 | The current make file only supports static linking between SciTE and Scintilla. 39 | 40 | 41 | *** Windows version *** 42 | 43 | A C++ compiler is required. Visual Studio .NET 2008 is the development system 44 | used for most development although TDM Mingw32 4.4.1 is also supported. 45 | 46 | To build Scintilla, make in the scintilla/win32 directory 47 | cd scintilla\win32 48 | GCC: mingw32-make 49 | VS .NET: nmake -f scintilla.mak 50 | cd ..\.. 51 | 52 | To build SciTE, use the makefiles located in the scite/win32 directory 53 | cd scite\win32 54 | GCC: mingw32-make 55 | VS .NET: nmake -f scite.mak 56 | 57 | An executable SciTE will now be in scite\bin. 58 | 59 | The Visual C++ 6.0 project (.dsp) and make files are no longer supported but are left 60 | in the download for people that are prepared to update them. 61 | 62 | *** GTK+/Windows version *** 63 | 64 | Mingw32 is known to work. Other compilers will probably not work. 65 | 66 | Only Scintilla will build with GTK+ on Windows. SciTE will not work. 67 | 68 | To build Scintilla, make in the scintilla/gtk directory 69 | cd scintilla\gtk 70 | mingw32-make 71 | -------------------------------------------------------------------------------- /SciTE.properties: -------------------------------------------------------------------------------- 1 | # Imports 2 | import $(SciteDefaultHome)\..\share\scite\properties\* 3 | 4 | # LuaDist specific 5 | command.compile.*.lua=luac -o "$(FileName).luc" "$(FileNameExt)" 6 | command.go.*.lua=lua "$(FileNameExt)" -------------------------------------------------------------------------------- /bin/.cvsignore: -------------------------------------------------------------------------------- 1 | .cvsignore 2 | *.properties 3 | *.dll 4 | -------------------------------------------------------------------------------- /bin/empty.txt: -------------------------------------------------------------------------------- 1 | This empty files ensures that the directory is created. -------------------------------------------------------------------------------- /boundscheck/.cvsignore: -------------------------------------------------------------------------------- 1 | .cvsignore 2 | SciTE.plg 3 | SciTE.opt 4 | SciTE.ncb 5 | SciTE.dsw 6 | SciTE.sln 7 | SciTE.suo 8 | SciTE.vcproj 9 | Release 10 | Debug -------------------------------------------------------------------------------- /boundscheck/SciTE.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 8.00 2 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SciTE", "SciTE.vcproj", "{620BEA1D-631C-43F3-9C57-E3855682D13D}" 3 | ProjectSection(ProjectDependencies) = postProject 4 | EndProjectSection 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfiguration) = preSolution 8 | Debug = Debug 9 | Release = Release 10 | EndGlobalSection 11 | GlobalSection(ProjectConfiguration) = postSolution 12 | {620BEA1D-631C-43F3-9C57-E3855682D13D}.Debug.ActiveCfg = Debug|Win32 13 | {620BEA1D-631C-43F3-9C57-E3855682D13D}.Debug.Build.0 = Debug|Win32 14 | {620BEA1D-631C-43F3-9C57-E3855682D13D}.Release.ActiveCfg = Release|Win32 15 | {620BEA1D-631C-43F3-9C57-E3855682D13D}.Release.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(ExtensibilityGlobals) = postSolution 18 | DPBuild = 5 19 | EndGlobalSection 20 | GlobalSection(ExtensibilityAddIns) = postSolution 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /delbin.bat: -------------------------------------------------------------------------------- 1 | del /S /Q *.a *.aps *.bsc *.dll *.dsw *.exe *.idb *.ilc *.ild *.ilf *.ilk *.ils *.lib *.map *.ncb *.obj *.o *.opt *.pdb *.plg *.res *.sbr *.tds *.exp >NUL: 2 | -------------------------------------------------------------------------------- /delcvs.bat: -------------------------------------------------------------------------------- 1 | del /S /Q .cvsignore 2 | -------------------------------------------------------------------------------- /dist.info: -------------------------------------------------------------------------------- 1 | --- This file is part of LuaDist project 2 | 3 | name = "scite" 4 | version = "3.2.1" 5 | 6 | desc = "SciTE is a SCIntilla based Text Editor." 7 | author = "Neil Hodgson" 8 | license = "MIT style" 9 | url = "http://www.scintilla.org/SciTE.html" 10 | maintainer = "Peter Drahoš" 11 | 12 | depends = { 13 | "lua ~> 5.1", 14 | "scintilla >= 3.2.1", 15 | } 16 | -- WARNING: Minor modifications include default SciTE_HOME path set to ../share/scite/properties and rename of SciLexer.DLL to libscilexer.dll in LuaDist installation 17 | -------------------------------------------------------------------------------- /doc/PrintHi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/doc/PrintHi.png -------------------------------------------------------------------------------- /doc/SciBreak2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/doc/SciBreak2.jpg -------------------------------------------------------------------------------- /doc/SciTEExternalLexer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 13 | 14 |
7 | Scintilla icon 8 | 10 | 11 | Add an external lexer to SciTE 12 |
15 |

16 | Lexer addition. 17 |

18 |

This document has been superceded by the new 19 | lexer object design 20 |

21 | 22 | -------------------------------------------------------------------------------- /doc/SciTEIco.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/doc/SciTEIco.png -------------------------------------------------------------------------------- /doc/SciTEImage.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Scintilla and SciTE 11 | 12 | 13 | 14 | 15 | 16 | 19 | 23 | 24 |
17 | Scintilla icon 18 | 20 | Scintilla 21 | and SciTE 22 |
25 |
26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /doc/SciTEWord.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/doc/SciTEWord.jpg -------------------------------------------------------------------------------- /doc/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/doc/demo.png -------------------------------------------------------------------------------- /doc/scite.1: -------------------------------------------------------------------------------- 1 | .TH SCITE 1 "2001 February 26" 2 | .SH NAME 3 | SciTE \- a programmers text editor 4 | .SH SYNOPSIS 5 | .br 6 | .B SciTE 7 | [file ..] 8 | .SH DESCRIPTION 9 | .B SciTE 10 | is a graphical GTK+ based editor. It has support 11 | for indenting, highlighting, and shortcuts in a myriad 12 | of languages and can be extended by editing object-oriented 13 | configuration files. 14 | .PP 15 | Support is included for Java, C, C++, C#, Shell, Apache. 16 | .SH ON-LINE HELP 17 | Type Alt-H or Click the Help Pulldown menu. 18 | .SH AUTHOR 19 | Most of 20 | .B SciTE 21 | was made by Neil Hodgson, with a lot of help from others. 22 | See Help 23 | .br 24 | .SH BUGS 25 | Probably. 26 | -------------------------------------------------------------------------------- /gtk/DirectorExtension.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file DirectorExtension.h 3 | ** Extension for communicating with a director program. 4 | **/ 5 | // Copyright 1998-2001 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | class DirectorExtension : public Extension { 9 | private: 10 | DirectorExtension() : inputWatcher(-1), inputChannel(0) {} // Singleton 11 | DirectorExtension(const DirectorExtension &); // Disable copy ctor 12 | void operator=(const DirectorExtension &); // Disable operator= 13 | 14 | public: 15 | static DirectorExtension &Instance(); 16 | 17 | // Implement the Extension interface 18 | virtual bool Initialise(ExtensionAPI *host_); 19 | virtual bool Finalise(); 20 | virtual bool Clear(); 21 | virtual bool Load(const char *filename); 22 | 23 | virtual bool OnOpen(const char *path); 24 | virtual bool OnSwitchFile(const char *path); 25 | virtual bool OnSave(const char *path); 26 | virtual bool OnChar(char ch); 27 | virtual bool OnExecute(const char *s); 28 | virtual bool OnSavePointReached(); 29 | virtual bool OnSavePointLeft(); 30 | virtual bool OnStyle(unsigned int startPos, int lengthDoc, int initStyle, StyleWriter *styler); 31 | virtual bool OnDoubleClick(); 32 | virtual bool OnUpdateUI(); 33 | virtual bool OnMarginClick(); 34 | virtual bool OnMacro(const char *command, const char *params); 35 | 36 | virtual bool SendProperty(const char *prop); 37 | virtual bool OnClose(const char *path); 38 | 39 | // Allow messages through to extension 40 | void HandleStringMessage(const char *message); 41 | 42 | void CreatePipe(bool forceNew = false); 43 | private: 44 | int inputWatcher; 45 | GIOChannel *inputChannel; 46 | }; 47 | 48 | -------------------------------------------------------------------------------- /gtk/GTKMutex.cxx: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file GTKMutex.cxx 3 | ** Define mutex 4 | **/ 5 | // SciTE & Scintilla copyright 1998-2003 by Neil Hodgson 6 | // Copyright 2007 by Neil Hodgson , from April White 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | // http://www.microsoft.com/msj/0797/win320797.aspx 10 | 11 | #include "Mutex.h" 12 | 13 | class GTKMutex : public Mutex { 14 | private: 15 | virtual void Lock() {} 16 | virtual void Unlock() {} 17 | GTKMutex() {} 18 | virtual ~GTKMutex() {} 19 | friend class Mutex; 20 | }; 21 | 22 | Mutex *Mutex::Create() { 23 | return new GTKMutex(); 24 | } 25 | -------------------------------------------------------------------------------- /gtk/Sci48M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/gtk/Sci48M.png -------------------------------------------------------------------------------- /gtk/SciIcon.h: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * SciIcon_xpm[] = { 3 | "16 16 17 1", 4 | " c None", 5 | ". c #666666", 6 | "+ c #424242", 7 | "@ c #4D4D4D", 8 | "# c #777777", 9 | "$ c #555555", 10 | "% c #868686", 11 | "& c #333333", 12 | "* c #292929", 13 | "= c #A0A0A4", 14 | "- c #808080", 15 | "; c #C0C0C0", 16 | "> c #999999", 17 | ", c #E3E3E3", 18 | "' c #161616", 19 | ") c #B2B2B2", 20 | "! c #D7D7D7", 21 | " .+@@+# ", 22 | " $+$$@+@+@$ ", 23 | " $@+%&.@@@++@ ", 24 | " $@*=@-@-&.+&&@ ", 25 | " #+@;*>#&>&@+*+ ", 26 | ".$*;*,*=='..'++&", 27 | "+&.%#.,*$;&*.&*&", 28 | "*@)*,$+,@&=.'&.'", 29 | "*$&;*,$*!=*+%$''", 30 | "**@$)*;%*.;$***'", 31 | "*&&&&$*#-&*@+&''", 32 | " **&@*$**@+*''' ", 33 | " &*&+.'++*'*&** ", 34 | " **&*+&*&&*'' ", 35 | " ********'' ", 36 | " *''''' "}; 37 | -------------------------------------------------------------------------------- /gtk/SciTE.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Version=1.0 4 | Name=SciTE Text Editor 5 | Name[es]=Editor de textos SciTE 6 | Name[fr]=Éditeur de texte SciTE 7 | Name[ru]=Текстовый редактор SciTE 8 | Comment=Edit your source files 9 | Comment[es]=Edita especializado para programación 10 | Comment[fr]=Éditer des fichiers sources 11 | Comment[ru]=Редактор исходных кодов 12 | GenericName=Text Editor 13 | Type=Application 14 | Exec=SciTE %F 15 | Icon=Sci48M 16 | Terminal=false 17 | StartupNotify=true 18 | Categories=TextEditor;Development;GTK;Application; 19 | MimeType=text/plain; 20 | -------------------------------------------------------------------------------- /lua/COPYRIGHT: -------------------------------------------------------------------------------- 1 | Lua License 2 | ----------- 3 | 4 | Lua is licensed under the terms of the MIT license reproduced below. 5 | This means that Lua is free software and can be used for both academic 6 | and commercial purposes at absolutely no cost. 7 | 8 | For details and rationale, see http://www.lua.org/license.html . 9 | 10 | =============================================================================== 11 | 12 | Copyright (C) 1994-2008 Lua.org, PUC-Rio. 13 | 14 | Permission is hereby granted, free of charge, to any person obtaining a copy 15 | of this software and associated documentation files (the "Software"), to deal 16 | in the Software without restriction, including without limitation the rights 17 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 18 | copies of the Software, and to permit persons to whom the Software is 19 | furnished to do so, subject to the following conditions: 20 | 21 | The above copyright notice and this permission notice shall be included in 22 | all copies or substantial portions of the Software. 23 | 24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 25 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 26 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 27 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 28 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 29 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 30 | THE SOFTWARE. 31 | 32 | =============================================================================== 33 | 34 | (end of COPYRIGHT) 35 | -------------------------------------------------------------------------------- /lua/README: -------------------------------------------------------------------------------- 1 | README for Lua 5.1 2 | 3 | See INSTALL for installation instructions. 4 | See HISTORY for a summary of changes since the last released version. 5 | 6 | * What is Lua? 7 | ------------ 8 | Lua is a powerful, light-weight programming language designed for extending 9 | applications. Lua is also frequently used as a general-purpose, stand-alone 10 | language. Lua is free software. 11 | 12 | For complete information, visit Lua's web site at http://www.lua.org/ . 13 | For an executive summary, see http://www.lua.org/about.html . 14 | 15 | Lua has been used in many different projects around the world. 16 | For a short list, see http://www.lua.org/uses.html . 17 | 18 | * Availability 19 | ------------ 20 | Lua is freely available for both academic and commercial purposes. 21 | See COPYRIGHT and http://www.lua.org/license.html for details. 22 | Lua can be downloaded at http://www.lua.org/download.html . 23 | 24 | * Installation 25 | ------------ 26 | Lua is implemented in pure ANSI C, and compiles unmodified in all known 27 | platforms that have an ANSI C compiler. In most Unix-like platforms, simply 28 | do "make" with a suitable target. See INSTALL for detailed instructions. 29 | 30 | * Origin 31 | ------ 32 | Lua is developed at Lua.org, a laboratory of the Department of Computer 33 | Science of PUC-Rio (the Pontifical Catholic University of Rio de Janeiro 34 | in Brazil). 35 | For more information about the authors, see http://www.lua.org/authors.html . 36 | 37 | (end of README) 38 | -------------------------------------------------------------------------------- /lua/include/lualib.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** Lua standard libraries 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lualib_h 9 | #define lualib_h 10 | 11 | #include "lua.h" 12 | 13 | 14 | /* Key to file-handle type */ 15 | #define LUA_FILEHANDLE "FILE*" 16 | 17 | 18 | #define LUA_COLIBNAME "coroutine" 19 | LUALIB_API int (luaopen_base) (lua_State *L); 20 | 21 | #define LUA_TABLIBNAME "table" 22 | LUALIB_API int (luaopen_table) (lua_State *L); 23 | 24 | #define LUA_IOLIBNAME "io" 25 | LUALIB_API int (luaopen_io) (lua_State *L); 26 | 27 | #define LUA_OSLIBNAME "os" 28 | LUALIB_API int (luaopen_os) (lua_State *L); 29 | 30 | #define LUA_STRLIBNAME "string" 31 | LUALIB_API int (luaopen_string) (lua_State *L); 32 | 33 | #define LUA_MATHLIBNAME "math" 34 | LUALIB_API int (luaopen_math) (lua_State *L); 35 | 36 | #define LUA_DBLIBNAME "debug" 37 | LUALIB_API int (luaopen_debug) (lua_State *L); 38 | 39 | #define LUA_LOADLIBNAME "package" 40 | LUALIB_API int (luaopen_package) (lua_State *L); 41 | 42 | 43 | /* open all previous libraries */ 44 | LUALIB_API void (luaL_openlibs) (lua_State *L); 45 | 46 | 47 | 48 | #ifndef lua_assert 49 | #define lua_assert(x) ((void)0) 50 | #endif 51 | 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /lua/src/lapi.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** Auxiliary functions from Lua API 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lapi_h 8 | #define lapi_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | LUAI_FUNC void luaA_pushobject (lua_State *L, const TValue *o); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /lua/src/lcode.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** Code generator for Lua 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lcode_h 8 | #define lcode_h 9 | 10 | #include "llex.h" 11 | #include "lobject.h" 12 | #include "lopcodes.h" 13 | #include "lparser.h" 14 | 15 | 16 | /* 17 | ** Marks the end of a patch list. It is an invalid value both as an absolute 18 | ** address, and as a list link (would link an element to itself). 19 | */ 20 | #define NO_JUMP (-1) 21 | 22 | 23 | /* 24 | ** grep "ORDER OPR" if you change these enums 25 | */ 26 | typedef enum BinOpr { 27 | OPR_ADD, OPR_SUB, OPR_MUL, OPR_DIV, OPR_MOD, OPR_POW, 28 | OPR_CONCAT, 29 | OPR_NE, OPR_EQ, 30 | OPR_LT, OPR_LE, OPR_GT, OPR_GE, 31 | OPR_AND, OPR_OR, 32 | OPR_NOBINOPR 33 | } BinOpr; 34 | 35 | 36 | typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_LEN, OPR_NOUNOPR } UnOpr; 37 | 38 | 39 | #define getcode(fs,e) ((fs)->f->code[(e)->u.s.info]) 40 | 41 | #define luaK_codeAsBx(fs,o,A,sBx) luaK_codeABx(fs,o,A,(sBx)+MAXARG_sBx) 42 | 43 | #define luaK_setmultret(fs,e) luaK_setreturns(fs, e, LUA_MULTRET) 44 | 45 | LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx); 46 | LUAI_FUNC int luaK_codeABC (FuncState *fs, OpCode o, int A, int B, int C); 47 | LUAI_FUNC void luaK_fixline (FuncState *fs, int line); 48 | LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n); 49 | LUAI_FUNC void luaK_reserveregs (FuncState *fs, int n); 50 | LUAI_FUNC void luaK_checkstack (FuncState *fs, int n); 51 | LUAI_FUNC int luaK_stringK (FuncState *fs, TString *s); 52 | LUAI_FUNC int luaK_numberK (FuncState *fs, lua_Number r); 53 | LUAI_FUNC void luaK_dischargevars (FuncState *fs, expdesc *e); 54 | LUAI_FUNC int luaK_exp2anyreg (FuncState *fs, expdesc *e); 55 | LUAI_FUNC void luaK_exp2nextreg (FuncState *fs, expdesc *e); 56 | LUAI_FUNC void luaK_exp2val (FuncState *fs, expdesc *e); 57 | LUAI_FUNC int luaK_exp2RK (FuncState *fs, expdesc *e); 58 | LUAI_FUNC void luaK_self (FuncState *fs, expdesc *e, expdesc *key); 59 | LUAI_FUNC void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k); 60 | LUAI_FUNC void luaK_goiftrue (FuncState *fs, expdesc *e); 61 | LUAI_FUNC void luaK_storevar (FuncState *fs, expdesc *var, expdesc *e); 62 | LUAI_FUNC void luaK_setreturns (FuncState *fs, expdesc *e, int nresults); 63 | LUAI_FUNC void luaK_setoneret (FuncState *fs, expdesc *e); 64 | LUAI_FUNC int luaK_jump (FuncState *fs); 65 | LUAI_FUNC void luaK_ret (FuncState *fs, int first, int nret); 66 | LUAI_FUNC void luaK_patchlist (FuncState *fs, int list, int target); 67 | LUAI_FUNC void luaK_patchtohere (FuncState *fs, int list); 68 | LUAI_FUNC void luaK_concat (FuncState *fs, int *l1, int l2); 69 | LUAI_FUNC int luaK_getlabel (FuncState *fs); 70 | LUAI_FUNC void luaK_prefix (FuncState *fs, UnOpr op, expdesc *v); 71 | LUAI_FUNC void luaK_infix (FuncState *fs, BinOpr op, expdesc *v); 72 | LUAI_FUNC void luaK_posfix (FuncState *fs, BinOpr op, expdesc *v1, expdesc *v2); 73 | LUAI_FUNC void luaK_setlist (FuncState *fs, int base, int nelems, int tostore); 74 | 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /lua/src/ldebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** Auxiliary functions from Debug Interface module 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ldebug_h 8 | #define ldebug_h 9 | 10 | 11 | #include "lstate.h" 12 | 13 | 14 | #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) 15 | 16 | #define getline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0) 17 | 18 | #define resethookcount(L) (L->hookcount = L->basehookcount) 19 | 20 | 21 | LUAI_FUNC void luaG_typeerror (lua_State *L, const TValue *o, 22 | const char *opname); 23 | LUAI_FUNC void luaG_concaterror (lua_State *L, StkId p1, StkId p2); 24 | LUAI_FUNC void luaG_aritherror (lua_State *L, const TValue *p1, 25 | const TValue *p2); 26 | LUAI_FUNC int luaG_ordererror (lua_State *L, const TValue *p1, 27 | const TValue *p2); 28 | LUAI_FUNC void luaG_runerror (lua_State *L, const char *fmt, ...); 29 | LUAI_FUNC void luaG_errormsg (lua_State *L); 30 | LUAI_FUNC int luaG_checkcode (const Proto *pt); 31 | LUAI_FUNC int luaG_checkopenop (Instruction i); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /lua/src/ldo.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** Stack and Call structure of Lua 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ldo_h 8 | #define ldo_h 9 | 10 | 11 | #include "lobject.h" 12 | #include "lstate.h" 13 | #include "lzio.h" 14 | 15 | 16 | #define luaD_checkstack(L,n) \ 17 | if ((char *)L->stack_last - (char *)L->top <= (n)*(int)sizeof(TValue)) \ 18 | luaD_growstack(L, n); \ 19 | else condhardstacktests(luaD_reallocstack(L, L->stacksize - EXTRA_STACK - 1)); 20 | 21 | 22 | #define incr_top(L) {luaD_checkstack(L,1); L->top++;} 23 | 24 | #define savestack(L,p) ((char *)(p) - (char *)L->stack) 25 | #define restorestack(L,n) ((TValue *)((char *)L->stack + (n))) 26 | 27 | #define saveci(L,p) ((char *)(p) - (char *)L->base_ci) 28 | #define restoreci(L,n) ((CallInfo *)((char *)L->base_ci + (n))) 29 | 30 | 31 | /* results from luaD_precall */ 32 | #define PCRLUA 0 /* initiated a call to a Lua function */ 33 | #define PCRC 1 /* did a call to a C function */ 34 | #define PCRYIELD 2 /* C funtion yielded */ 35 | 36 | 37 | /* type of protected functions, to be ran by `runprotected' */ 38 | typedef void (*Pfunc) (lua_State *L, void *ud); 39 | 40 | LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name); 41 | LUAI_FUNC void luaD_callhook (lua_State *L, int event, int line); 42 | LUAI_FUNC int luaD_precall (lua_State *L, StkId func, int nresults); 43 | LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults); 44 | LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u, 45 | ptrdiff_t oldtop, ptrdiff_t ef); 46 | LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult); 47 | LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize); 48 | LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize); 49 | LUAI_FUNC void luaD_growstack (lua_State *L, int n); 50 | 51 | LUAI_FUNC void luaD_throw (lua_State *L, int errcode); 52 | LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud); 53 | 54 | LUAI_FUNC void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop); 55 | 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /lua/src/ldump.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** save precompiled Lua chunks 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #include 8 | 9 | #define ldump_c 10 | #define LUA_CORE 11 | 12 | #include "lua.h" 13 | 14 | #include "lobject.h" 15 | #include "lstate.h" 16 | #include "lundump.h" 17 | 18 | typedef struct { 19 | lua_State* L; 20 | lua_Writer writer; 21 | void* data; 22 | int strip; 23 | int status; 24 | } DumpState; 25 | 26 | #define DumpMem(b,n,size,D) DumpBlock(b,(n)*(size),D) 27 | #define DumpVar(x,D) DumpMem(&x,1,sizeof(x),D) 28 | 29 | static void DumpBlock(const void* b, size_t size, DumpState* D) 30 | { 31 | if (D->status==0) 32 | { 33 | lua_unlock(D->L); 34 | D->status=(*D->writer)(D->L,b,size,D->data); 35 | lua_lock(D->L); 36 | } 37 | } 38 | 39 | static void DumpChar(int y, DumpState* D) 40 | { 41 | char x=(char)y; 42 | DumpVar(x,D); 43 | } 44 | 45 | static void DumpInt(int x, DumpState* D) 46 | { 47 | DumpVar(x,D); 48 | } 49 | 50 | static void DumpNumber(lua_Number x, DumpState* D) 51 | { 52 | DumpVar(x,D); 53 | } 54 | 55 | static void DumpVector(const void* b, int n, size_t size, DumpState* D) 56 | { 57 | DumpInt(n,D); 58 | DumpMem(b,n,size,D); 59 | } 60 | 61 | static void DumpString(const TString* s, DumpState* D) 62 | { 63 | if (s==NULL || getstr(s)==NULL) 64 | { 65 | size_t size=0; 66 | DumpVar(size,D); 67 | } 68 | else 69 | { 70 | size_t size=s->tsv.len+1; /* include trailing '\0' */ 71 | DumpVar(size,D); 72 | DumpBlock(getstr(s),size,D); 73 | } 74 | } 75 | 76 | #define DumpCode(f,D) DumpVector(f->code,f->sizecode,sizeof(Instruction),D) 77 | 78 | static void DumpFunction(const Proto* f, const TString* p, DumpState* D); 79 | 80 | static void DumpConstants(const Proto* f, DumpState* D) 81 | { 82 | int i,n=f->sizek; 83 | DumpInt(n,D); 84 | for (i=0; ik[i]; 87 | DumpChar(ttype(o),D); 88 | switch (ttype(o)) 89 | { 90 | case LUA_TNIL: 91 | break; 92 | case LUA_TBOOLEAN: 93 | DumpChar(bvalue(o),D); 94 | break; 95 | case LUA_TNUMBER: 96 | DumpNumber(nvalue(o),D); 97 | break; 98 | case LUA_TSTRING: 99 | DumpString(rawtsvalue(o),D); 100 | break; 101 | default: 102 | lua_assert(0); /* cannot happen */ 103 | break; 104 | } 105 | } 106 | n=f->sizep; 107 | DumpInt(n,D); 108 | for (i=0; ip[i],f->source,D); 109 | } 110 | 111 | static void DumpDebug(const Proto* f, DumpState* D) 112 | { 113 | int i,n; 114 | n= (D->strip) ? 0 : f->sizelineinfo; 115 | DumpVector(f->lineinfo,n,sizeof(int),D); 116 | n= (D->strip) ? 0 : f->sizelocvars; 117 | DumpInt(n,D); 118 | for (i=0; ilocvars[i].varname,D); 121 | DumpInt(f->locvars[i].startpc,D); 122 | DumpInt(f->locvars[i].endpc,D); 123 | } 124 | n= (D->strip) ? 0 : f->sizeupvalues; 125 | DumpInt(n,D); 126 | for (i=0; iupvalues[i],D); 127 | } 128 | 129 | static void DumpFunction(const Proto* f, const TString* p, DumpState* D) 130 | { 131 | DumpString((f->source==p || D->strip) ? NULL : f->source,D); 132 | DumpInt(f->linedefined,D); 133 | DumpInt(f->lastlinedefined,D); 134 | DumpChar(f->nups,D); 135 | DumpChar(f->numparams,D); 136 | DumpChar(f->is_vararg,D); 137 | DumpChar(f->maxstacksize,D); 138 | DumpCode(f,D); 139 | DumpConstants(f,D); 140 | DumpDebug(f,D); 141 | } 142 | 143 | static void DumpHeader(DumpState* D) 144 | { 145 | char h[LUAC_HEADERSIZE]; 146 | luaU_header(h); 147 | DumpBlock(h,LUAC_HEADERSIZE,D); 148 | } 149 | 150 | /* 151 | ** dump Lua function as precompiled chunk 152 | */ 153 | int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip) 154 | { 155 | DumpState D; 156 | D.L=L; 157 | D.writer=w; 158 | D.data=data; 159 | D.strip=strip; 160 | D.status=0; 161 | DumpHeader(&D); 162 | DumpFunction(f,NULL,&D); 163 | return D.status; 164 | } 165 | -------------------------------------------------------------------------------- /lua/src/lfunc.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** Auxiliary functions to manipulate prototypes and closures 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lfunc_h 8 | #define lfunc_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | #define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \ 15 | cast(int, sizeof(TValue)*((n)-1))) 16 | 17 | #define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \ 18 | cast(int, sizeof(TValue *)*((n)-1))) 19 | 20 | 21 | LUAI_FUNC Proto *luaF_newproto (lua_State *L); 22 | LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e); 23 | LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e); 24 | LUAI_FUNC UpVal *luaF_newupval (lua_State *L); 25 | LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level); 26 | LUAI_FUNC void luaF_close (lua_State *L, StkId level); 27 | LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f); 28 | LUAI_FUNC void luaF_freeclosure (lua_State *L, Closure *c); 29 | LUAI_FUNC void luaF_freeupval (lua_State *L, UpVal *uv); 30 | LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number, 31 | int pc); 32 | 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /lua/src/lgc.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** Garbage Collector 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lgc_h 8 | #define lgc_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | /* 15 | ** Possible states of the Garbage Collector 16 | */ 17 | #define GCSpause 0 18 | #define GCSpropagate 1 19 | #define GCSsweepstring 2 20 | #define GCSsweep 3 21 | #define GCSfinalize 4 22 | 23 | 24 | /* 25 | ** some userful bit tricks 26 | */ 27 | #define resetbits(x,m) ((x) &= cast(lu_byte, ~(m))) 28 | #define setbits(x,m) ((x) |= (m)) 29 | #define testbits(x,m) ((x) & (m)) 30 | #define bitmask(b) (1<<(b)) 31 | #define bit2mask(b1,b2) (bitmask(b1) | bitmask(b2)) 32 | #define l_setbit(x,b) setbits(x, bitmask(b)) 33 | #define resetbit(x,b) resetbits(x, bitmask(b)) 34 | #define testbit(x,b) testbits(x, bitmask(b)) 35 | #define set2bits(x,b1,b2) setbits(x, (bit2mask(b1, b2))) 36 | #define reset2bits(x,b1,b2) resetbits(x, (bit2mask(b1, b2))) 37 | #define test2bits(x,b1,b2) testbits(x, (bit2mask(b1, b2))) 38 | 39 | 40 | 41 | /* 42 | ** Layout for bit use in `marked' field: 43 | ** bit 0 - object is white (type 0) 44 | ** bit 1 - object is white (type 1) 45 | ** bit 2 - object is black 46 | ** bit 3 - for userdata: has been finalized 47 | ** bit 3 - for tables: has weak keys 48 | ** bit 4 - for tables: has weak values 49 | ** bit 5 - object is fixed (should not be collected) 50 | ** bit 6 - object is "super" fixed (only the main thread) 51 | */ 52 | 53 | 54 | #define WHITE0BIT 0 55 | #define WHITE1BIT 1 56 | #define BLACKBIT 2 57 | #define FINALIZEDBIT 3 58 | #define KEYWEAKBIT 3 59 | #define VALUEWEAKBIT 4 60 | #define FIXEDBIT 5 61 | #define SFIXEDBIT 6 62 | #define WHITEBITS bit2mask(WHITE0BIT, WHITE1BIT) 63 | 64 | 65 | #define iswhite(x) test2bits((x)->gch.marked, WHITE0BIT, WHITE1BIT) 66 | #define isblack(x) testbit((x)->gch.marked, BLACKBIT) 67 | #define isgray(x) (!isblack(x) && !iswhite(x)) 68 | 69 | #define otherwhite(g) (g->currentwhite ^ WHITEBITS) 70 | #define isdead(g,v) ((v)->gch.marked & otherwhite(g) & WHITEBITS) 71 | 72 | #define changewhite(x) ((x)->gch.marked ^= WHITEBITS) 73 | #define gray2black(x) l_setbit((x)->gch.marked, BLACKBIT) 74 | 75 | #define valiswhite(x) (iscollectable(x) && iswhite(gcvalue(x))) 76 | 77 | #define luaC_white(g) cast(lu_byte, (g)->currentwhite & WHITEBITS) 78 | 79 | 80 | #define luaC_checkGC(L) { \ 81 | condhardstacktests(luaD_reallocstack(L, L->stacksize - EXTRA_STACK - 1)); \ 82 | if (G(L)->totalbytes >= G(L)->GCthreshold) \ 83 | luaC_step(L); } 84 | 85 | 86 | #define luaC_barrier(L,p,v) { if (valiswhite(v) && isblack(obj2gco(p))) \ 87 | luaC_barrierf(L,obj2gco(p),gcvalue(v)); } 88 | 89 | #define luaC_barriert(L,t,v) { if (valiswhite(v) && isblack(obj2gco(t))) \ 90 | luaC_barrierback(L,t); } 91 | 92 | #define luaC_objbarrier(L,p,o) \ 93 | { if (iswhite(obj2gco(o)) && isblack(obj2gco(p))) \ 94 | luaC_barrierf(L,obj2gco(p),obj2gco(o)); } 95 | 96 | #define luaC_objbarriert(L,t,o) \ 97 | { if (iswhite(obj2gco(o)) && isblack(obj2gco(t))) luaC_barrierback(L,t); } 98 | 99 | LUAI_FUNC size_t luaC_separateudata (lua_State *L, int all); 100 | LUAI_FUNC void luaC_callGCTM (lua_State *L); 101 | LUAI_FUNC void luaC_freeall (lua_State *L); 102 | LUAI_FUNC void luaC_step (lua_State *L); 103 | LUAI_FUNC void luaC_fullgc (lua_State *L); 104 | LUAI_FUNC void luaC_link (lua_State *L, GCObject *o, lu_byte tt); 105 | LUAI_FUNC void luaC_linkupval (lua_State *L, UpVal *uv); 106 | LUAI_FUNC void luaC_barrierf (lua_State *L, GCObject *o, GCObject *v); 107 | LUAI_FUNC void luaC_barrierback (lua_State *L, Table *t); 108 | 109 | 110 | #endif 111 | -------------------------------------------------------------------------------- /lua/src/lib/linit.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** Initialization of libraries for lua.c 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #define linit_c 9 | #define LUA_LIB 10 | 11 | #include "lua.h" 12 | 13 | #include "lualib.h" 14 | #include "lauxlib.h" 15 | 16 | 17 | static const luaL_Reg lualibs[] = { 18 | {"", luaopen_base}, 19 | {LUA_LOADLIBNAME, luaopen_package}, 20 | {LUA_TABLIBNAME, luaopen_table}, 21 | {LUA_IOLIBNAME, luaopen_io}, 22 | {LUA_OSLIBNAME, luaopen_os}, 23 | {LUA_STRLIBNAME, luaopen_string}, 24 | {LUA_MATHLIBNAME, luaopen_math}, 25 | {LUA_DBLIBNAME, luaopen_debug}, 26 | {NULL, NULL} 27 | }; 28 | 29 | 30 | LUALIB_API void luaL_openlibs (lua_State *L) { 31 | const luaL_Reg *lib = lualibs; 32 | for (; lib->func; lib++) { 33 | lua_pushcfunction(L, lib->func); 34 | lua_pushstring(L, lib->name); 35 | lua_call(L, 1, 0); 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /lua/src/llex.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** Lexical Analyzer 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef llex_h 8 | #define llex_h 9 | 10 | #include "lobject.h" 11 | #include "lzio.h" 12 | 13 | 14 | #define FIRST_RESERVED 257 15 | 16 | /* maximum length of a reserved word */ 17 | #define TOKEN_LEN (sizeof("function")/sizeof(char)) 18 | 19 | 20 | /* 21 | * WARNING: if you change the order of this enumeration, 22 | * grep "ORDER RESERVED" 23 | */ 24 | enum RESERVED { 25 | /* terminal symbols denoted by reserved words */ 26 | TK_AND = FIRST_RESERVED, TK_BREAK, 27 | TK_DO, TK_ELSE, TK_ELSEIF, TK_END, TK_FALSE, TK_FOR, TK_FUNCTION, 28 | TK_IF, TK_IN, TK_LOCAL, TK_NIL, TK_NOT, TK_OR, TK_REPEAT, 29 | TK_RETURN, TK_THEN, TK_TRUE, TK_UNTIL, TK_WHILE, 30 | /* other terminal symbols */ 31 | TK_CONCAT, TK_DOTS, TK_EQ, TK_GE, TK_LE, TK_NE, TK_NUMBER, 32 | TK_NAME, TK_STRING, TK_EOS 33 | }; 34 | 35 | /* number of reserved words */ 36 | #define NUM_RESERVED (cast(int, TK_WHILE-FIRST_RESERVED+1)) 37 | 38 | 39 | /* array with token `names' */ 40 | LUAI_DATA const char *const luaX_tokens []; 41 | 42 | 43 | typedef union { 44 | lua_Number r; 45 | TString *ts; 46 | } SemInfo; /* semantics information */ 47 | 48 | 49 | typedef struct Token { 50 | int token; 51 | SemInfo seminfo; 52 | } Token; 53 | 54 | 55 | typedef struct LexState { 56 | int current; /* current character (charint) */ 57 | int linenumber; /* input line counter */ 58 | int lastline; /* line of last token `consumed' */ 59 | Token t; /* current token */ 60 | Token lookahead; /* look ahead token */ 61 | struct FuncState *fs; /* `FuncState' is private to the parser */ 62 | struct lua_State *L; 63 | ZIO *z; /* input stream */ 64 | Mbuffer *buff; /* buffer for tokens */ 65 | TString *source; /* current source name */ 66 | char decpoint; /* locale decimal point */ 67 | } LexState; 68 | 69 | 70 | LUAI_FUNC void luaX_init (lua_State *L); 71 | LUAI_FUNC void luaX_setinput (lua_State *L, LexState *ls, ZIO *z, 72 | TString *source); 73 | LUAI_FUNC TString *luaX_newstring (LexState *ls, const char *str, size_t l); 74 | LUAI_FUNC void luaX_next (LexState *ls); 75 | LUAI_FUNC void luaX_lookahead (LexState *ls); 76 | LUAI_FUNC void luaX_lexerror (LexState *ls, const char *msg, int token); 77 | LUAI_FUNC void luaX_syntaxerror (LexState *ls, const char *s); 78 | LUAI_FUNC const char *luaX_token2str (LexState *ls, int token); 79 | 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /lua/src/llimits.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** Limits, basic types, and some other `installation-dependent' definitions 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef llimits_h 8 | #define llimits_h 9 | 10 | 11 | #include 12 | #include 13 | 14 | 15 | #include "lua.h" 16 | 17 | 18 | typedef LUAI_UINT32 lu_int32; 19 | 20 | typedef LUAI_UMEM lu_mem; 21 | 22 | typedef LUAI_MEM l_mem; 23 | 24 | 25 | 26 | /* chars used as small naturals (so that `char' is reserved for characters) */ 27 | typedef unsigned char lu_byte; 28 | 29 | 30 | #define MAX_SIZET ((size_t)(~(size_t)0)-2) 31 | 32 | #define MAX_LUMEM ((lu_mem)(~(lu_mem)0)-2) 33 | 34 | 35 | #define MAX_INT (INT_MAX-2) /* maximum value of an int (-2 for safety) */ 36 | 37 | /* 38 | ** conversion of pointer to integer 39 | ** this is for hashing only; there is no problem if the integer 40 | ** cannot hold the whole pointer value 41 | */ 42 | #define IntPoint(p) ((unsigned int)(lu_mem)(p)) 43 | 44 | 45 | 46 | /* type to ensure maximum alignment */ 47 | typedef LUAI_USER_ALIGNMENT_T L_Umaxalign; 48 | 49 | 50 | /* result of a `usual argument conversion' over lua_Number */ 51 | typedef LUAI_UACNUMBER l_uacNumber; 52 | 53 | 54 | /* internal assertions for in-house debugging */ 55 | #ifdef lua_assert 56 | 57 | #define check_exp(c,e) (lua_assert(c), (e)) 58 | #define api_check(l,e) lua_assert(e) 59 | 60 | #else 61 | 62 | #define lua_assert(c) ((void)0) 63 | #define check_exp(c,e) (e) 64 | #define api_check luai_apicheck 65 | 66 | #endif 67 | 68 | 69 | #ifndef UNUSED 70 | #define UNUSED(x) ((void)(x)) /* to avoid warnings */ 71 | #endif 72 | 73 | 74 | #ifndef cast 75 | #define cast(t, exp) ((t)(exp)) 76 | #endif 77 | 78 | #define cast_byte(i) cast(lu_byte, (i)) 79 | #define cast_num(i) cast(lua_Number, (i)) 80 | #define cast_int(i) cast(int, (i)) 81 | 82 | 83 | 84 | /* 85 | ** type for virtual-machine instructions 86 | ** must be an unsigned with (at least) 4 bytes (see details in lopcodes.h) 87 | */ 88 | typedef lu_int32 Instruction; 89 | 90 | 91 | 92 | /* maximum stack for a Lua function */ 93 | #define MAXSTACK 250 94 | 95 | 96 | 97 | /* minimum size for the string table (must be power of 2) */ 98 | #ifndef MINSTRTABSIZE 99 | #define MINSTRTABSIZE 32 100 | #endif 101 | 102 | 103 | /* minimum size for string buffer */ 104 | #ifndef LUA_MINBUFFER 105 | #define LUA_MINBUFFER 32 106 | #endif 107 | 108 | 109 | #ifndef lua_lock 110 | #define lua_lock(L) ((void) 0) 111 | #define lua_unlock(L) ((void) 0) 112 | #endif 113 | 114 | #ifndef luai_threadyield 115 | #define luai_threadyield(L) {lua_unlock(L); lua_lock(L);} 116 | #endif 117 | 118 | 119 | /* 120 | ** macro to control inclusion of some hard tests on stack reallocation 121 | */ 122 | #ifndef HARDSTACKTESTS 123 | #define condhardstacktests(x) ((void)0) 124 | #else 125 | #define condhardstacktests(x) x 126 | #endif 127 | 128 | #endif 129 | -------------------------------------------------------------------------------- /lua/src/lmem.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** Interface to Memory Manager 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #include 9 | 10 | #define lmem_c 11 | #define LUA_CORE 12 | 13 | #include "lua.h" 14 | 15 | #include "ldebug.h" 16 | #include "ldo.h" 17 | #include "lmem.h" 18 | #include "lobject.h" 19 | #include "lstate.h" 20 | 21 | 22 | 23 | /* 24 | ** About the realloc function: 25 | ** void * frealloc (void *ud, void *ptr, size_t osize, size_t nsize); 26 | ** (`osize' is the old size, `nsize' is the new size) 27 | ** 28 | ** Lua ensures that (ptr == NULL) iff (osize == 0). 29 | ** 30 | ** * frealloc(ud, NULL, 0, x) creates a new block of size `x' 31 | ** 32 | ** * frealloc(ud, p, x, 0) frees the block `p' 33 | ** (in this specific case, frealloc must return NULL). 34 | ** particularly, frealloc(ud, NULL, 0, 0) does nothing 35 | ** (which is equivalent to free(NULL) in ANSI C) 36 | ** 37 | ** frealloc returns NULL if it cannot create or reallocate the area 38 | ** (any reallocation to an equal or smaller size cannot fail!) 39 | */ 40 | 41 | 42 | 43 | #define MINSIZEARRAY 4 44 | 45 | 46 | void *luaM_growaux_ (lua_State *L, void *block, int *size, size_t size_elems, 47 | int limit, const char *errormsg) { 48 | void *newblock; 49 | int newsize; 50 | if (*size >= limit/2) { /* cannot double it? */ 51 | if (*size >= limit) /* cannot grow even a little? */ 52 | luaG_runerror(L, errormsg); 53 | newsize = limit; /* still have at least one free place */ 54 | } 55 | else { 56 | newsize = (*size)*2; 57 | if (newsize < MINSIZEARRAY) 58 | newsize = MINSIZEARRAY; /* minimum size */ 59 | } 60 | newblock = luaM_reallocv(L, block, *size, newsize, size_elems); 61 | *size = newsize; /* update only when everything else is OK */ 62 | return newblock; 63 | } 64 | 65 | 66 | void *luaM_toobig (lua_State *L) { 67 | luaG_runerror(L, "memory allocation error: block too big"); 68 | return NULL; /* to avoid warnings */ 69 | } 70 | 71 | 72 | 73 | /* 74 | ** generic allocation routine. 75 | */ 76 | void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) { 77 | global_State *g = G(L); 78 | lua_assert((osize == 0) == (block == NULL)); 79 | block = (*g->frealloc)(g->ud, block, osize, nsize); 80 | if (block == NULL && nsize > 0) 81 | luaD_throw(L, LUA_ERRMEM); 82 | lua_assert((nsize == 0) == (block == NULL)); 83 | g->totalbytes = (g->totalbytes - osize) + nsize; 84 | return block; 85 | } 86 | 87 | -------------------------------------------------------------------------------- /lua/src/lmem.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** Interface to Memory Manager 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lmem_h 8 | #define lmem_h 9 | 10 | 11 | #include 12 | 13 | #include "llimits.h" 14 | #include "lua.h" 15 | 16 | #define MEMERRMSG "not enough memory" 17 | 18 | 19 | #define luaM_reallocv(L,b,on,n,e) \ 20 | ((cast(size_t, (n)+1) <= MAX_SIZET/(e)) ? /* +1 to avoid warnings */ \ 21 | luaM_realloc_(L, (b), (on)*(e), (n)*(e)) : \ 22 | luaM_toobig(L)) 23 | 24 | #define luaM_freemem(L, b, s) luaM_realloc_(L, (b), (s), 0) 25 | #define luaM_free(L, b) luaM_realloc_(L, (b), sizeof(*(b)), 0) 26 | #define luaM_freearray(L, b, n, t) luaM_reallocv(L, (b), n, 0, sizeof(t)) 27 | 28 | #define luaM_malloc(L,t) luaM_realloc_(L, NULL, 0, (t)) 29 | #define luaM_new(L,t) cast(t *, luaM_malloc(L, sizeof(t))) 30 | #define luaM_newvector(L,n,t) \ 31 | cast(t *, luaM_reallocv(L, NULL, 0, n, sizeof(t))) 32 | 33 | #define luaM_growvector(L,v,nelems,size,t,limit,e) \ 34 | if ((nelems)+1 > (size)) \ 35 | ((v)=cast(t *, luaM_growaux_(L,v,&(size),sizeof(t),limit,e))) 36 | 37 | #define luaM_reallocvector(L, v,oldn,n,t) \ 38 | ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t)))) 39 | 40 | 41 | LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize, 42 | size_t size); 43 | LUAI_FUNC void *luaM_toobig (lua_State *L); 44 | LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size, 45 | size_t size_elem, int limit, 46 | const char *errormsg); 47 | 48 | #endif 49 | 50 | -------------------------------------------------------------------------------- /lua/src/lopcodes.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** See Copyright Notice in lua.h 4 | */ 5 | 6 | 7 | #define lopcodes_c 8 | #define LUA_CORE 9 | 10 | 11 | #include "lopcodes.h" 12 | 13 | 14 | /* ORDER OP */ 15 | 16 | const char *const luaP_opnames[NUM_OPCODES+1] = { 17 | "MOVE", 18 | "LOADK", 19 | "LOADBOOL", 20 | "LOADNIL", 21 | "GETUPVAL", 22 | "GETGLOBAL", 23 | "GETTABLE", 24 | "SETGLOBAL", 25 | "SETUPVAL", 26 | "SETTABLE", 27 | "NEWTABLE", 28 | "SELF", 29 | "ADD", 30 | "SUB", 31 | "MUL", 32 | "DIV", 33 | "MOD", 34 | "POW", 35 | "UNM", 36 | "NOT", 37 | "LEN", 38 | "CONCAT", 39 | "JMP", 40 | "EQ", 41 | "LT", 42 | "LE", 43 | "TEST", 44 | "TESTSET", 45 | "CALL", 46 | "TAILCALL", 47 | "RETURN", 48 | "FORLOOP", 49 | "FORPREP", 50 | "TFORLOOP", 51 | "SETLIST", 52 | "CLOSE", 53 | "CLOSURE", 54 | "VARARG", 55 | NULL 56 | }; 57 | 58 | 59 | #define opmode(t,a,b,c,m) (((t)<<7) | ((a)<<6) | ((b)<<4) | ((c)<<2) | (m)) 60 | 61 | const lu_byte luaP_opmodes[NUM_OPCODES] = { 62 | /* T A B C mode opcode */ 63 | opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_MOVE */ 64 | ,opmode(0, 1, OpArgK, OpArgN, iABx) /* OP_LOADK */ 65 | ,opmode(0, 1, OpArgU, OpArgU, iABC) /* OP_LOADBOOL */ 66 | ,opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_LOADNIL */ 67 | ,opmode(0, 1, OpArgU, OpArgN, iABC) /* OP_GETUPVAL */ 68 | ,opmode(0, 1, OpArgK, OpArgN, iABx) /* OP_GETGLOBAL */ 69 | ,opmode(0, 1, OpArgR, OpArgK, iABC) /* OP_GETTABLE */ 70 | ,opmode(0, 0, OpArgK, OpArgN, iABx) /* OP_SETGLOBAL */ 71 | ,opmode(0, 0, OpArgU, OpArgN, iABC) /* OP_SETUPVAL */ 72 | ,opmode(0, 0, OpArgK, OpArgK, iABC) /* OP_SETTABLE */ 73 | ,opmode(0, 1, OpArgU, OpArgU, iABC) /* OP_NEWTABLE */ 74 | ,opmode(0, 1, OpArgR, OpArgK, iABC) /* OP_SELF */ 75 | ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_ADD */ 76 | ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_SUB */ 77 | ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_MUL */ 78 | ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_DIV */ 79 | ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_MOD */ 80 | ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_POW */ 81 | ,opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_UNM */ 82 | ,opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_NOT */ 83 | ,opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_LEN */ 84 | ,opmode(0, 1, OpArgR, OpArgR, iABC) /* OP_CONCAT */ 85 | ,opmode(0, 0, OpArgR, OpArgN, iAsBx) /* OP_JMP */ 86 | ,opmode(1, 0, OpArgK, OpArgK, iABC) /* OP_EQ */ 87 | ,opmode(1, 0, OpArgK, OpArgK, iABC) /* OP_LT */ 88 | ,opmode(1, 0, OpArgK, OpArgK, iABC) /* OP_LE */ 89 | ,opmode(1, 1, OpArgR, OpArgU, iABC) /* OP_TEST */ 90 | ,opmode(1, 1, OpArgR, OpArgU, iABC) /* OP_TESTSET */ 91 | ,opmode(0, 1, OpArgU, OpArgU, iABC) /* OP_CALL */ 92 | ,opmode(0, 1, OpArgU, OpArgU, iABC) /* OP_TAILCALL */ 93 | ,opmode(0, 0, OpArgU, OpArgN, iABC) /* OP_RETURN */ 94 | ,opmode(0, 1, OpArgR, OpArgN, iAsBx) /* OP_FORLOOP */ 95 | ,opmode(0, 1, OpArgR, OpArgN, iAsBx) /* OP_FORPREP */ 96 | ,opmode(1, 0, OpArgN, OpArgU, iABC) /* OP_TFORLOOP */ 97 | ,opmode(0, 0, OpArgU, OpArgU, iABC) /* OP_SETLIST */ 98 | ,opmode(0, 0, OpArgN, OpArgN, iABC) /* OP_CLOSE */ 99 | ,opmode(0, 1, OpArgU, OpArgN, iABx) /* OP_CLOSURE */ 100 | ,opmode(0, 1, OpArgU, OpArgN, iABC) /* OP_VARARG */ 101 | }; 102 | 103 | -------------------------------------------------------------------------------- /lua/src/lparser.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** Lua Parser 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lparser_h 8 | #define lparser_h 9 | 10 | #include "llimits.h" 11 | #include "lobject.h" 12 | #include "lzio.h" 13 | 14 | 15 | /* 16 | ** Expression descriptor 17 | */ 18 | 19 | typedef enum { 20 | VVOID, /* no value */ 21 | VNIL, 22 | VTRUE, 23 | VFALSE, 24 | VK, /* info = index of constant in `k' */ 25 | VKNUM, /* nval = numerical value */ 26 | VLOCAL, /* info = local register */ 27 | VUPVAL, /* info = index of upvalue in `upvalues' */ 28 | VGLOBAL, /* info = index of table; aux = index of global name in `k' */ 29 | VINDEXED, /* info = table register; aux = index register (or `k') */ 30 | VJMP, /* info = instruction pc */ 31 | VRELOCABLE, /* info = instruction pc */ 32 | VNONRELOC, /* info = result register */ 33 | VCALL, /* info = instruction pc */ 34 | VVARARG /* info = instruction pc */ 35 | } expkind; 36 | 37 | typedef struct expdesc { 38 | expkind k; 39 | union { 40 | struct { int info, aux; } s; 41 | lua_Number nval; 42 | } u; 43 | int t; /* patch list of `exit when true' */ 44 | int f; /* patch list of `exit when false' */ 45 | } expdesc; 46 | 47 | 48 | typedef struct upvaldesc { 49 | lu_byte k; 50 | lu_byte info; 51 | } upvaldesc; 52 | 53 | 54 | struct BlockCnt; /* defined in lparser.c */ 55 | 56 | 57 | /* state needed to generate code for a given function */ 58 | typedef struct FuncState { 59 | Proto *f; /* current function header */ 60 | Table *h; /* table to find (and reuse) elements in `k' */ 61 | struct FuncState *prev; /* enclosing function */ 62 | struct LexState *ls; /* lexical state */ 63 | struct lua_State *L; /* copy of the Lua state */ 64 | struct BlockCnt *bl; /* chain of current blocks */ 65 | int pc; /* next position to code (equivalent to `ncode') */ 66 | int lasttarget; /* `pc' of last `jump target' */ 67 | int jpc; /* list of pending jumps to `pc' */ 68 | int freereg; /* first free register */ 69 | int nk; /* number of elements in `k' */ 70 | int np; /* number of elements in `p' */ 71 | short nlocvars; /* number of elements in `locvars' */ 72 | lu_byte nactvar; /* number of active local variables */ 73 | upvaldesc upvalues[LUAI_MAXUPVALUES]; /* upvalues */ 74 | unsigned short actvar[LUAI_MAXVARS]; /* declared-variable stack */ 75 | } FuncState; 76 | 77 | 78 | LUAI_FUNC Proto *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, 79 | const char *name); 80 | 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /lua/src/lstring.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** String table (keeps all strings handled by Lua) 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #include 9 | 10 | #define lstring_c 11 | #define LUA_CORE 12 | 13 | #include "lua.h" 14 | 15 | #include "lmem.h" 16 | #include "lobject.h" 17 | #include "lstate.h" 18 | #include "lstring.h" 19 | 20 | 21 | 22 | void luaS_resize (lua_State *L, int newsize) { 23 | GCObject **newhash; 24 | stringtable *tb; 25 | int i; 26 | if (G(L)->gcstate == GCSsweepstring) 27 | return; /* cannot resize during GC traverse */ 28 | newhash = luaM_newvector(L, newsize, GCObject *); 29 | tb = &G(L)->strt; 30 | for (i=0; isize; i++) { 33 | GCObject *p = tb->hash[i]; 34 | while (p) { /* for each node in the list */ 35 | GCObject *next = p->gch.next; /* save next */ 36 | unsigned int h = gco2ts(p)->hash; 37 | int h1 = lmod(h, newsize); /* new position */ 38 | lua_assert(cast_int(h%newsize) == lmod(h, newsize)); 39 | p->gch.next = newhash[h1]; /* chain it */ 40 | newhash[h1] = p; 41 | p = next; 42 | } 43 | } 44 | luaM_freearray(L, tb->hash, tb->size, TString *); 45 | tb->size = newsize; 46 | tb->hash = newhash; 47 | } 48 | 49 | 50 | static TString *newlstr (lua_State *L, const char *str, size_t l, 51 | unsigned int h) { 52 | TString *ts; 53 | stringtable *tb; 54 | if (l+1 > (MAX_SIZET - sizeof(TString))/sizeof(char)) 55 | luaM_toobig(L); 56 | ts = cast(TString *, luaM_malloc(L, (l+1)*sizeof(char)+sizeof(TString))); 57 | ts->tsv.len = l; 58 | ts->tsv.hash = h; 59 | ts->tsv.marked = luaC_white(G(L)); 60 | ts->tsv.tt = LUA_TSTRING; 61 | ts->tsv.reserved = 0; 62 | memcpy(ts+1, str, l*sizeof(char)); 63 | ((char *)(ts+1))[l] = '\0'; /* ending 0 */ 64 | tb = &G(L)->strt; 65 | h = lmod(h, tb->size); 66 | ts->tsv.next = tb->hash[h]; /* chain new entry */ 67 | tb->hash[h] = obj2gco(ts); 68 | tb->nuse++; 69 | if (tb->nuse > cast(lu_int32, tb->size) && tb->size <= MAX_INT/2) 70 | luaS_resize(L, tb->size*2); /* too crowded */ 71 | return ts; 72 | } 73 | 74 | 75 | TString *luaS_newlstr (lua_State *L, const char *str, size_t l) { 76 | GCObject *o; 77 | unsigned int h = cast(unsigned int, l); /* seed */ 78 | size_t step = (l>>5)+1; /* if string is too long, don't hash all its chars */ 79 | size_t l1; 80 | for (l1=l; l1>=step; l1-=step) /* compute hash */ 81 | h = h ^ ((h<<5)+(h>>2)+cast(unsigned char, str[l1-1])); 82 | for (o = G(L)->strt.hash[lmod(h, G(L)->strt.size)]; 83 | o != NULL; 84 | o = o->gch.next) { 85 | TString *ts = rawgco2ts(o); 86 | if (ts->tsv.len == l && (memcmp(str, getstr(ts), l) == 0)) { 87 | /* string may be dead */ 88 | if (isdead(G(L), o)) changewhite(o); 89 | return ts; 90 | } 91 | } 92 | return newlstr(L, str, l, h); /* not found */ 93 | } 94 | 95 | 96 | Udata *luaS_newudata (lua_State *L, size_t s, Table *e) { 97 | Udata *u; 98 | if (s > MAX_SIZET - sizeof(Udata)) 99 | luaM_toobig(L); 100 | u = cast(Udata *, luaM_malloc(L, s + sizeof(Udata))); 101 | u->uv.marked = luaC_white(G(L)); /* is not finalized */ 102 | u->uv.tt = LUA_TUSERDATA; 103 | u->uv.len = s; 104 | u->uv.metatable = NULL; 105 | u->uv.env = e; 106 | /* chain it on udata list (after main thread) */ 107 | u->uv.next = G(L)->mainthread->next; 108 | G(L)->mainthread->next = obj2gco(u); 109 | return u; 110 | } 111 | 112 | -------------------------------------------------------------------------------- /lua/src/lstring.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** String table (keep all strings handled by Lua) 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lstring_h 8 | #define lstring_h 9 | 10 | 11 | #include "lgc.h" 12 | #include "lobject.h" 13 | #include "lstate.h" 14 | 15 | 16 | #define sizestring(s) (sizeof(union TString)+((s)->len+1)*sizeof(char)) 17 | 18 | #define sizeudata(u) (sizeof(union Udata)+(u)->len) 19 | 20 | #define luaS_new(L, s) (luaS_newlstr(L, s, strlen(s))) 21 | #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ 22 | (sizeof(s)/sizeof(char))-1)) 23 | 24 | #define luaS_fix(s) l_setbit((s)->tsv.marked, FIXEDBIT) 25 | 26 | LUAI_FUNC void luaS_resize (lua_State *L, int newsize); 27 | LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e); 28 | LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); 29 | 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /lua/src/ltable.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** Lua tables (hash) 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ltable_h 8 | #define ltable_h 9 | 10 | #include "lobject.h" 11 | 12 | 13 | #define gnode(t,i) (&(t)->node[i]) 14 | #define gkey(n) (&(n)->i_key.nk) 15 | #define gval(n) (&(n)->i_val) 16 | #define gnext(n) ((n)->i_key.nk.next) 17 | 18 | #define key2tval(n) (&(n)->i_key.tvk) 19 | 20 | 21 | LUAI_FUNC const TValue *luaH_getnum (Table *t, int key); 22 | LUAI_FUNC TValue *luaH_setnum (lua_State *L, Table *t, int key); 23 | LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); 24 | LUAI_FUNC TValue *luaH_setstr (lua_State *L, Table *t, TString *key); 25 | LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); 26 | LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); 27 | LUAI_FUNC Table *luaH_new (lua_State *L, int narray, int lnhash); 28 | LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize); 29 | LUAI_FUNC void luaH_free (lua_State *L, Table *t); 30 | LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key); 31 | LUAI_FUNC int luaH_getn (Table *t); 32 | 33 | 34 | #if defined(LUA_DEBUG) 35 | LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key); 36 | LUAI_FUNC int luaH_isdummy (Node *n); 37 | #endif 38 | 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /lua/src/ltm.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** Tag methods 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #include 9 | 10 | #define ltm_c 11 | #define LUA_CORE 12 | 13 | #include "lua.h" 14 | 15 | #include "lobject.h" 16 | #include "lstate.h" 17 | #include "lstring.h" 18 | #include "ltable.h" 19 | #include "ltm.h" 20 | 21 | 22 | 23 | const char *const luaT_typenames[] = { 24 | "nil", "boolean", "userdata", "number", 25 | "string", "table", "function", "userdata", "thread", 26 | "proto", "upval" 27 | }; 28 | 29 | 30 | void luaT_init (lua_State *L) { 31 | static const char *const luaT_eventname[] = { /* ORDER TM */ 32 | "__index", "__newindex", 33 | "__gc", "__mode", "__eq", 34 | "__add", "__sub", "__mul", "__div", "__mod", 35 | "__pow", "__unm", "__len", "__lt", "__le", 36 | "__concat", "__call" 37 | }; 38 | int i; 39 | for (i=0; itmname[i] = luaS_new(L, luaT_eventname[i]); 41 | luaS_fix(G(L)->tmname[i]); /* never collect these names */ 42 | } 43 | } 44 | 45 | 46 | /* 47 | ** function to be used with macro "fasttm": optimized for absence of 48 | ** tag methods 49 | */ 50 | const TValue *luaT_gettm (Table *events, TMS event, TString *ename) { 51 | const TValue *tm = luaH_getstr(events, ename); 52 | lua_assert(event <= TM_EQ); 53 | if (ttisnil(tm)) { /* no tag method? */ 54 | events->flags |= cast_byte(1u<metatable; 66 | break; 67 | case LUA_TUSERDATA: 68 | mt = uvalue(o)->metatable; 69 | break; 70 | default: 71 | mt = G(L)->mt[ttype(o)]; 72 | } 73 | return (mt ? luaH_getstr(mt, G(L)->tmname[event]) : luaO_nilobject); 74 | } 75 | 76 | -------------------------------------------------------------------------------- /lua/src/ltm.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** Tag methods 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ltm_h 8 | #define ltm_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | /* 15 | * WARNING: if you change the order of this enumeration, 16 | * grep "ORDER TM" 17 | */ 18 | typedef enum { 19 | TM_INDEX, 20 | TM_NEWINDEX, 21 | TM_GC, 22 | TM_MODE, 23 | TM_EQ, /* last tag method with `fast' access */ 24 | TM_ADD, 25 | TM_SUB, 26 | TM_MUL, 27 | TM_DIV, 28 | TM_MOD, 29 | TM_POW, 30 | TM_UNM, 31 | TM_LEN, 32 | TM_LT, 33 | TM_LE, 34 | TM_CONCAT, 35 | TM_CALL, 36 | TM_N /* number of elements in the enum */ 37 | } TMS; 38 | 39 | 40 | 41 | #define gfasttm(g,et,e) ((et) == NULL ? NULL : \ 42 | ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e])) 43 | 44 | #define fasttm(l,et,e) gfasttm(G(l), et, e) 45 | 46 | LUAI_DATA const char *const luaT_typenames[]; 47 | 48 | 49 | LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename); 50 | LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, 51 | TMS event); 52 | LUAI_FUNC void luaT_init (lua_State *L); 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /lua/src/lundump.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** load precompiled Lua chunks 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lundump_h 8 | #define lundump_h 9 | 10 | #include "lobject.h" 11 | #include "lzio.h" 12 | 13 | /* load one chunk; from lundump.c */ 14 | LUAI_FUNC Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name); 15 | 16 | /* make header; from lundump.c */ 17 | LUAI_FUNC void luaU_header (char* h); 18 | 19 | /* dump one chunk; from ldump.c */ 20 | LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); 21 | 22 | #ifdef luac_c 23 | /* print one chunk; from print.c */ 24 | LUAI_FUNC void luaU_print (const Proto* f, int full); 25 | #endif 26 | 27 | /* for header of binary files -- this is Lua 5.1 */ 28 | #define LUAC_VERSION 0x51 29 | 30 | /* for header of binary files -- this is the official format */ 31 | #define LUAC_FORMAT 0 32 | 33 | /* size of header of binary files */ 34 | #define LUAC_HEADERSIZE 12 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /lua/src/lvm.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** Lua virtual machine 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lvm_h 8 | #define lvm_h 9 | 10 | 11 | #include "ldo.h" 12 | #include "lobject.h" 13 | #include "ltm.h" 14 | 15 | 16 | #define tostring(L,o) ((ttype(o) == LUA_TSTRING) || (luaV_tostring(L, o))) 17 | 18 | #define tonumber(o,n) (ttype(o) == LUA_TNUMBER || \ 19 | (((o) = luaV_tonumber(o,n)) != NULL)) 20 | 21 | #define equalobj(L,o1,o2) \ 22 | (ttype(o1) == ttype(o2) && luaV_equalval(L, o1, o2)) 23 | 24 | 25 | LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r); 26 | LUAI_FUNC int luaV_equalval (lua_State *L, const TValue *t1, const TValue *t2); 27 | LUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n); 28 | LUAI_FUNC int luaV_tostring (lua_State *L, StkId obj); 29 | LUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key, 30 | StkId val); 31 | LUAI_FUNC void luaV_settable (lua_State *L, const TValue *t, TValue *key, 32 | StkId val); 33 | LUAI_FUNC void luaV_execute (lua_State *L, int nexeccalls); 34 | LUAI_FUNC void luaV_concat (lua_State *L, int total, int last); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /lua/src/lzio.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** a generic input stream interface 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #include 9 | 10 | #define lzio_c 11 | #define LUA_CORE 12 | 13 | #include "lua.h" 14 | 15 | #include "llimits.h" 16 | #include "lmem.h" 17 | #include "lstate.h" 18 | #include "lzio.h" 19 | 20 | 21 | int luaZ_fill (ZIO *z) { 22 | size_t size; 23 | lua_State *L = z->L; 24 | const char *buff; 25 | lua_unlock(L); 26 | buff = z->reader(L, z->data, &size); 27 | lua_lock(L); 28 | if (buff == NULL || size == 0) return EOZ; 29 | z->n = size - 1; 30 | z->p = buff; 31 | return char2int(*(z->p++)); 32 | } 33 | 34 | 35 | int luaZ_lookahead (ZIO *z) { 36 | if (z->n == 0) { 37 | if (luaZ_fill(z) == EOZ) 38 | return EOZ; 39 | else { 40 | z->n++; /* luaZ_fill removed first byte; put back it */ 41 | z->p--; 42 | } 43 | } 44 | return char2int(*z->p); 45 | } 46 | 47 | 48 | void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, void *data) { 49 | z->L = L; 50 | z->reader = reader; 51 | z->data = data; 52 | z->n = 0; 53 | z->p = NULL; 54 | } 55 | 56 | 57 | /* --------------------------------------------------------------- read --- */ 58 | size_t luaZ_read (ZIO *z, void *b, size_t n) { 59 | while (n) { 60 | size_t m; 61 | if (luaZ_lookahead(z) == EOZ) 62 | return n; /* return number of missing bytes */ 63 | m = (n <= z->n) ? n : z->n; /* min. between n and z->n */ 64 | memcpy(b, z->p, m); 65 | z->n -= m; 66 | z->p += m; 67 | b = (char *)b + m; 68 | n -= m; 69 | } 70 | return 0; 71 | } 72 | 73 | /* ------------------------------------------------------------------------ */ 74 | char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n) { 75 | if (n > buff->buffsize) { 76 | if (n < LUA_MINBUFFER) n = LUA_MINBUFFER; 77 | luaZ_resizebuffer(L, buff, n); 78 | } 79 | return buff->buffer; 80 | } 81 | 82 | 83 | -------------------------------------------------------------------------------- /lua/src/lzio.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id$ 3 | ** Buffered streams 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lzio_h 9 | #define lzio_h 10 | 11 | #include "lua.h" 12 | 13 | #include "lmem.h" 14 | 15 | 16 | #define EOZ (-1) /* end of stream */ 17 | 18 | typedef struct Zio ZIO; 19 | 20 | #define char2int(c) cast(int, cast(unsigned char, (c))) 21 | 22 | #define zgetc(z) (((z)->n--)>0 ? char2int(*(z)->p++) : luaZ_fill(z)) 23 | 24 | typedef struct Mbuffer { 25 | char *buffer; 26 | size_t n; 27 | size_t buffsize; 28 | } Mbuffer; 29 | 30 | #define luaZ_initbuffer(L, buff) ((buff)->buffer = NULL, (buff)->buffsize = 0) 31 | 32 | #define luaZ_buffer(buff) ((buff)->buffer) 33 | #define luaZ_sizebuffer(buff) ((buff)->buffsize) 34 | #define luaZ_bufflen(buff) ((buff)->n) 35 | 36 | #define luaZ_resetbuffer(buff) ((buff)->n = 0) 37 | 38 | 39 | #define luaZ_resizebuffer(L, buff, size) \ 40 | (luaM_reallocvector(L, (buff)->buffer, (buff)->buffsize, size, char), \ 41 | (buff)->buffsize = size) 42 | 43 | #define luaZ_freebuffer(L, buff) luaZ_resizebuffer(L, buff, 0) 44 | 45 | 46 | LUAI_FUNC char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n); 47 | LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, 48 | void *data); 49 | LUAI_FUNC size_t luaZ_read (ZIO* z, void* b, size_t n); /* read next n bytes */ 50 | LUAI_FUNC int luaZ_lookahead (ZIO *z); 51 | 52 | 53 | 54 | /* --------- Private Part ------------------ */ 55 | 56 | struct Zio { 57 | size_t n; /* bytes still unread */ 58 | const char *p; /* current position in buffer */ 59 | lua_Reader reader; 60 | void* data; /* additional data */ 61 | lua_State *L; /* Lua state (for reader) */ 62 | }; 63 | 64 | 65 | LUAI_FUNC int luaZ_fill (ZIO *z); 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /output.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/output.pdf -------------------------------------------------------------------------------- /scripts/CheckMentioned.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # CheckMentioned.py 3 | # Find all the symbols in scintilla/include/Scintilla.h and check if they 4 | # are mentioned in scintilla/doc/ScintillaDoc.html. 5 | 6 | import string 7 | 8 | uninteresting = { 9 | "SCINTILLA_H", "SCI_START", "SCI_LEXER_START", "SCI_OPTIONAL_START", 10 | # These archaic names are #defined to the Sci_ prefixed modern equivalents. 11 | # They are not documented so they are not used in new code. 12 | "CharacterRange", "TextRange", "TextToFind", "RangeToFormat", 13 | } 14 | srcRoot = "../.." 15 | incFileName = srcRoot + "/scintilla/include/Scintilla.h" 16 | docFileName = srcRoot + "/scintilla/doc/ScintillaDoc.html" 17 | try: # Old Python 18 | identCharacters = "_" + string.letters + string.digits 19 | except AttributeError: # Python 3.x 20 | identCharacters = "_" + string.ascii_letters + string.digits 21 | 22 | # Convert all punctuation characters except '_' into spaces. 23 | def depunctuate(s): 24 | d = "" 25 | for ch in s: 26 | if ch in identCharacters: 27 | d = d + ch 28 | else: 29 | d = d + " " 30 | return d 31 | 32 | symbols = {} 33 | incFile = open(incFileName, "rt") 34 | for line in incFile.readlines(): 35 | if line.startswith("#define"): 36 | identifier = line.split()[1] 37 | symbols[identifier] = 0 38 | incFile.close() 39 | 40 | docFile = open(docFileName, "rt") 41 | for line in docFile.readlines(): 42 | for word in depunctuate(line).split(): 43 | if word in symbols.keys(): 44 | symbols[word] = 1 45 | docFile.close() 46 | 47 | identifiersSorted = list(symbols.keys()) 48 | identifiersSorted.sort() 49 | for identifier in identifiersSorted: 50 | if not symbols[identifier] and identifier not in uninteresting: 51 | print(identifier) 52 | -------------------------------------------------------------------------------- /scripts/ba: -------------------------------------------------------------------------------- 1 | sci_base=`pwd` 2 | cd $sci_base/scintilla/gtk 3 | make $* 4 | cd $sci_base/scite/gtk 5 | make $* 6 | #make install $* 7 | cd $sci_base/scintilla 8 | sh tgzsrc 9 | cd $sci_base/scite 10 | sh tgzsrc 11 | cd $sci_base/scite 12 | sh tgzgscite 13 | 14 | -------------------------------------------------------------------------------- /scripts/ba.bat: -------------------------------------------------------------------------------- 1 | rem ba.bat - download and build all of scintilla and scite 2 | rd /s/q scintilla scite 3 | cvs export -D NOW scintilla scite 4 | cd scintilla 5 | call delbin 6 | del/q bin\*.a 7 | call delcvs 8 | call zipsrc 9 | cd win32 10 | nmake -f scintilla.mak 11 | cd .. 12 | del/q bin\*.pdb 13 | cd .. 14 | cd scite 15 | del/q bin\*.properties 16 | del/q bin\SciTE 17 | call delbin 18 | call delcvs 19 | call zipsrc 20 | cd win32 21 | nmake -f scite.mak 22 | cd .. 23 | call upxsc1 24 | call zipwscite 25 | call delbin 26 | cd .. 27 | cd scintilla 28 | call delbin 29 | cd .. 30 | -------------------------------------------------------------------------------- /scripts/checkbuilds.bat: -------------------------------------------------------------------------------- 1 | rem Script to build SciTE for Windows with all the different 2 | rem compilers and exercise all the projects and makefiles. 3 | rem Current directory must be scite\scripts before running. 4 | rem Contains references to local install directories on Neil's 5 | rem machine so must be modified for other installations. 6 | rem Assumes environment set up so gcc and MSVC can be called. 7 | rem 8 | cd ..\.. 9 | set 10 | set MSDEV_BASE=C:\Program Files (x86)\Microsoft Visual Studio\Common\MSDev98\Bin 11 | set MSDEV71_BASE=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools 12 | set WINSDK_BASE=C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin 13 | rem 14 | rem ************************************************************ 15 | rem Target 1: basic unit tests with gcc 16 | call scite\scripts\clearboth 17 | cd scintilla\test\unit 18 | make -j 19 | if ERRORLEVEL 2 goto ERROR 20 | .\unitTest 21 | if ERRORLEVEL 2 goto ERROR 22 | cd ..\..\.. 23 | rem 24 | rem ************************************************************ 25 | rem Target 2: Normal gcc build 26 | call scite\scripts\clearboth 27 | cd scintilla\win32 28 | make -j 29 | if ERRORLEVEL 2 goto ERROR 30 | cd ..\test 31 | pythonw simpleTests.py 32 | pythonw lexTests.py 33 | pythonw performanceTests.py 34 | cd ..\..\scite\win32 35 | make -j 36 | if ERRORLEVEL 2 goto ERROR 37 | cd ..\.. 38 | rem 39 | rem ************************************************************ 40 | rem Target 3: Microsoft VC++ build 41 | call scite\scripts\clearboth 42 | cd scintilla\win32 43 | cl 44 | nmake -f scintilla.mak QUIET=1 45 | if ERRORLEVEL 2 goto ERROR 46 | cd ..\..\scite\win32 47 | nmake -f scite.mak QUIET=1 48 | if ERRORLEVEL 2 goto ERROR 49 | cd ..\.. 50 | rem 51 | rem ************************************************************ 52 | rem Target 4: Visual C++ Express using scite\boundscheck\SciTE.sln 53 | REM ~ call scite\scripts\clearboth 54 | REM ~ cd scite\boundscheck 55 | vcexpress scite.sln /rebuild release 56 | REM ~ if ERRORLEVEL 2 goto ERROR 57 | REM ~ cd ..\.. 58 | rem 59 | rem ************************************************************ 60 | rem Target 5: GTK+ version using gcc on scintilla\gtk\makefile 61 | call scite\scripts\clearboth 62 | cd scintilla\gtk 63 | make -j 64 | if ERRORLEVEL 2 goto ERROR 65 | cd ..\.. 66 | rem Visual C++ builds 67 | REM ~ call "%MSDEV_BASE%\..\..\..\VC98\bin\vcvars32.bat" 68 | REM ~ echo on 69 | rem 70 | rem ************************************************************ 71 | rem Target 6: Visual C++ 98 using scintilla\win32\scintilla_vc6.mak 72 | REM ~ call scite\scripts\clearboth 73 | REM ~ cd scintilla\win32 74 | REM ~ nmake -f scintilla_vc6.mak QUIET=1 75 | REM ~ if ERRORLEVEL 2 goto ERROR 76 | REM ~ cd ..\.. 77 | rem 78 | rem ************************************************************ 79 | rem Removed: Target 7 80 | rem 81 | rem ************************************************************ 82 | rem Removed: Target 8 83 | rem 84 | rem ************************************************************ 85 | rem Target 9: Visual C++ using scite\boundscheck\SciTE.dsp 86 | REM ~ call scite\scripts\clearboth 87 | REM ~ cd scite\boundscheck 88 | REM ~ msdev SciTE.dsp /MAKE "SciTE - Win32 Release" /REBUILD 89 | REM ~ if ERRORLEVEL 2 goto ERROR 90 | REM ~ cd ..\.. 91 | rem 92 | rem ************************************************************ 93 | rem Target 10: SDK 64 bit compiler 94 | rem Currently produces too many warnings so do not run 95 | call scite\scripts\clearboth 96 | call "%WINSDK_BASE%\SetEnv.Cmd" /Release /x64 /vista 97 | cd scintilla\win32 98 | nmake -f scintilla.mak 99 | if ERRORLEVEL 2 goto ERROR 100 | cd ..\..\scite\win32 101 | nmake -f scite.mak 102 | if ERRORLEVEL 2 goto ERROR 103 | cd ..\.. 104 | rem 105 | rem Finished 106 | call scite\scripts\clearboth 107 | goto CLEANUP 108 | :ERROR 109 | @echo checkbuilds.bat:1: Failed %ERRORLEVEL% 110 | :CLEANUP 111 | set SAVE_PATH= 112 | set SAVE_INCLUDE= 113 | set MSDEV_BASE= 114 | set 115 | -------------------------------------------------------------------------------- /scripts/clearboth.bat: -------------------------------------------------------------------------------- 1 | @rem clearboth.bat - script to clear both scintilla and scite 2 | @rem directory trees of all compiler output files. 3 | @rem Current directory must be parent of scintilla and scite before running. 4 | @cd scintilla 5 | @call delbin 6 | @cd .. 7 | @cd scite 8 | @call delbin 9 | @cd .. 10 | -------------------------------------------------------------------------------- /scripts/commandsdoc.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from __future__ import with_statement 5 | 6 | import os, sys 7 | 8 | scintillaDirectory = os.path.join("..", "..", "scintilla", "include") 9 | sys.path.append(scintillaDirectory) 10 | import Face 11 | 12 | def cell(s): 13 | return "%s" % s 14 | 15 | def faceFeatures(out): 16 | out.write("

Scintilla key commands

\n") 17 | out.write("\n") 18 | out.write("%s%s%s\n" % (cell("Command"), cell("Name"), cell("Explanation"))) 19 | face = Face.Face() 20 | face.ReadFromFile(os.path.join(scintillaDirectory, "Scintilla.iface")) 21 | texts = [] 22 | for name in face.features: 23 | #~ print name 24 | f = face.features[name] 25 | if f["FeatureType"] == "fun" and \ 26 | f["ReturnType"] == "void" and \ 27 | not (f["Param1Type"] or f["Param2Type"]): 28 | texts.append([name, f["Value"], " ".join(f["Comment"])]) 29 | texts.sort() 30 | for t in texts: 31 | out.write("%s%s%s\n" % (cell(t[1]), cell(t[0]), cell(t[2]))) 32 | out.write("
\n") 33 | 34 | def menuFeatures(out): 35 | out.write("

SciTE menu commands

\n") 36 | out.write("\n") 37 | out.write("%s%s\n" % (cell("Command"), cell("Menu text"))) 38 | with open(os.path.join("..", "win32", "SciTERes.rc"), "rt") as f: 39 | for l in f: 40 | l = l.strip() 41 | if l.startswith("MENUITEM") and "SEPARATOR" not in l: 42 | l = l.replace("MENUITEM", "").strip() 43 | text, symbol = l.split('",', 1) 44 | symbol = symbol.strip() 45 | text = text[1:].replace("&", "").replace("...", "") 46 | if "\\t" in text: 47 | text = text.split("\\t",1)[0] 48 | if text: 49 | out.write("\n" % (symbol, text)) 50 | out.write("
%s%s
\n") 51 | 52 | startFile = """ 53 | 54 | 56 | 57 | 58 | 64 | 65 | """ 66 | 67 | if __name__ == "__main__": 68 | with open(os.path.join("..", "doc", "CommandValues.html"), "w") as out: 69 | out.write(startFile) 70 | menuFeatures(out) 71 | faceFeatures(out) 72 | out.write("\n\n") 73 | -------------------------------------------------------------------------------- /scripts/makerpms.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # makerpms.py 3 | # Copy files all over the place build RPMs and copy to top level directory 4 | 5 | import os 6 | import shutil 7 | srcRoot = "../../" 8 | rpmRoot = "/usr/src/redhat/SOURCES/" 9 | rpmBin = "/usr/src/redhat/RPMS/i386/" 10 | rpmSource = "/usr/src/redhat/SRPMS/" 11 | 12 | verFileName = srcRoot + "scintilla/version.txt" 13 | vers = open(verFileName) 14 | #139 15 | vFull = vers.read().strip() 16 | vers.close() 17 | 18 | #1.39 19 | vPoint = vFull[0] + "." + vFull[1:] 20 | 21 | #1, 3, 9, 0 22 | vComma = vFull[0] + ", " + vFull[1] + ", " + vFull[2] + ", 0" 23 | 24 | print("[ %s | %s | %s ]" % (vFull, vPoint, vComma)) 25 | 26 | tgzV = "scite" + vFull + ".tgz" 27 | tgzFileName = srcRoot + "scite.tgz" 28 | tgzVFileName = srcRoot + tgzV 29 | 30 | print("[ %s | %s ]" % (tgzFileName, tgzVFileName)) 31 | 32 | if not os.access(tgzFileName, os.F_OK): 33 | print("Base file '" + tgzFileName + "' does not exist.") 34 | else: 35 | shutil.copyfile(tgzFileName, tgzVFileName) 36 | os.unlink(tgzFileName) 37 | 38 | rpmVFileName = rpmRoot + tgzV 39 | 40 | shutil.copyfile(tgzVFileName, rpmVFileName) 41 | 42 | # Run the rpm build command 43 | os.system("rpm -ba scite.spec") 44 | 45 | rpmB = "scite-" + vPoint + "-1.i386.rpm" 46 | shutil.copyfile(rpmBin + rpmB, srcRoot + rpmB) 47 | rpmS = "scite-" + vPoint + "-1.src.rpm" 48 | shutil.copyfile(rpmSource + rpmS, srcRoot + rpmS) 49 | 50 | -------------------------------------------------------------------------------- /scripts/scite.spec: -------------------------------------------------------------------------------- 1 | # 2 | # SciTE code editor using the Scintilla editing component 3 | # SciTE had syntax highlighting and support for building and running programs 4 | # 5 | # This package contains the gtk enabled varsion, distributed as a binary 6 | # tarball from http://www.scintilla.org/SciTE.html 7 | # 8 | # The tarball is named gscite???.tgz, however the actual name of the app 9 | # is still SciTE. 10 | # 11 | # This package name purposely uses all lower case letters in the its package 12 | # name so that one can issue the command "rpm -q scite" without having to 13 | # remember the exact case of all the letters. However, none of the files 14 | # contained in this package have been renamed. 15 | # 16 | # 17 | #### 18 | 19 | Name: scite 20 | Version: 1.39 21 | Release: 1 22 | Summary: SciTE code editor with syntax highlighting for building and running programs. 23 | Group: Applications/Editors 24 | Copyright: Python-Type License 25 | Vendor: Scintilla by Neil Hodgson 26 | URL: http://www.scintilla.org/SciTE.html 27 | Packager: AAP Victor Soroka 28 | Source0: http://www.scintilla.org/scite139.tgz 29 | BuildRoot: /var/tmp/scite-%{version}-rootdir 30 | Requires: gtk+ >= 1.2.0 31 | 32 | %description 33 | SciTE is a SCIntilla based Text Editor. Originally built to demonstrate Scintilla, it has grown to 34 | be a generally useful editor with facilities for building and running programs. It is best used for 35 | jobs with simple configurations - I use it for building test and demonstration programs as well 36 | as SciTE and Scintilla, themselves. 37 | 38 | SciTE is currently available for Intel Win32 and Linux compatible operating systems with 39 | GTK+. 40 | 41 | ########## 42 | # 43 | # The following environment variables are automatically defined for use 44 | # in any of the following shell scripts: 45 | # 46 | # RPM_SOURCE_DIR { where sources originally reside } 47 | # RPM_BUILD_DIR { where sources get unpacked into } 48 | # RPM_DOC_DIR 49 | # RPM_OPT_FLAGS 50 | # RPM_ARCH 51 | # RPM_OS 52 | # RPM_ROOT_DIR 53 | # RPM_BUILD_ROOT { where final images get placed before packaging } 54 | # RPM_PACKAGE_NAME 55 | # RPM_PACKAGE_VERSION 56 | # RPM_PACKAGE_RELEASE 57 | # 58 | ########## 59 | 60 | %prep 61 | %setup -q -c {name}-%{version} 62 | 63 | %build 64 | cd $RPM_BUILD_DIR/%{name}-%{version}/scintilla/gtk 65 | make 66 | cd $RPM_BUILD_DIR/%{name}-%{version}/scite/gtk 67 | make 68 | 69 | #### 70 | # Section: Install-After-Build Script (Often Just 'make install') 71 | #### 72 | %install 73 | rm -rf $RPM_BUILD_ROOT 74 | install -m0755 --directory $RPM_BUILD_ROOT/usr/bin 75 | install -m0755 --directory $RPM_BUILD_ROOT/usr/share/scite 76 | install -m0755 --directory $RPM_BUILD_ROOT/usr/share/man/man1 77 | install -m0755 --directory $RPM_BUILD_ROOT/usr/share/pixmaps 78 | install -m0755 --directory $RPM_BUILD_ROOT/usr/share/gnome/apps/Applications 79 | cd $RPM_BUILD_DIR/%{name}-%{version}/scite/gtk 80 | make gnomeprefix=$RPM_BUILD_ROOT/usr install 81 | install -m 0644 $RPM_BUILD_DIR/%{name}-%{version}/scite/doc/scite.1 $RPM_BUILD_ROOT/usr/share/man/man1 82 | mv $RPM_BUILD_ROOT/usr/share/gnome/apps/Applications $RPM_BUILD_ROOT/usr/share/gnome/apps/Development 83 | 84 | %clean 85 | rm -rf $RPM_BUILD_ROOT 86 | rm -rf ${RPM_BUILD_DIR}/%{name}-%{version} 87 | 88 | 89 | 90 | %files 91 | %defattr(-, root, root) 92 | %attr(0644,root,root) %doc scite/doc/*.html scite/doc/*.png scite/doc/*.jpg 93 | %attr(0755,root,root) %dir /usr/share/scite 94 | %attr(0755,root,root) /usr/bin/SciTE 95 | %attr(0644,root,root) /usr/share/scite/* 96 | %attr(0644,root,root) /usr/share/pixmaps/Sci48M.png 97 | %attr(0644,root,root) /usr/share/gnome/apps/Development/SciTE.desktop 98 | %attr(0644,root,root) /usr/share/man/man1/scite.1* 99 | -------------------------------------------------------------------------------- /src/Cookie.cxx: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file Cookie.cxx 3 | ** Examine start of files for coding cookies and type information. 4 | **/ 5 | // Copyright 2011 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #include 9 | #include 10 | 11 | #include "SString.h" 12 | #include "Cookie.h" 13 | 14 | SString ExtractLine(const char *buf, size_t length) { 15 | unsigned int endl = 0; 16 | if (length > 0) { 17 | while ((endl < length) && (buf[endl] != '\r') && (buf[endl] != '\n')) { 18 | endl++; 19 | } 20 | if (((endl + 1) < length) && (buf[endl] == '\r') && (buf[endl+1] == '\n')) { 21 | endl++; 22 | } 23 | if (endl < length) { 24 | endl++; 25 | } 26 | } 27 | return SString(buf, 0, endl); 28 | } 29 | 30 | static const char codingCookie[] = "coding"; 31 | 32 | static bool isEncodingChar(char ch) { 33 | return (ch == '_') || (ch == '-') || (ch == '.') || 34 | (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || 35 | (ch >= '0' && ch <= '9'); 36 | } 37 | 38 | static bool isSpaceChar(char ch) { 39 | return (ch == ' ') || (ch == '\t'); 40 | } 41 | 42 | static UniMode CookieValue(const SString &s) { 43 | int posCoding = s.search(codingCookie); 44 | if (posCoding >= 0) { 45 | posCoding += static_cast(strlen(codingCookie)); 46 | if ((s[posCoding] == ':') || (s[posCoding] == '=')) { 47 | posCoding++; 48 | if ((s[posCoding] == '\"') || (s[posCoding] == '\'')) { 49 | posCoding++; 50 | } 51 | while ((posCoding < static_cast(s.length())) && 52 | (isSpaceChar(s[posCoding]))) { 53 | posCoding++; 54 | } 55 | size_t endCoding = static_cast(posCoding); 56 | while ((endCoding < s.length()) && 57 | (isEncodingChar(s[endCoding]))) { 58 | endCoding++; 59 | } 60 | SString code(s.c_str(), posCoding, endCoding); 61 | code.lowercase(); 62 | if (code == "utf-8") { 63 | return uniCookie; 64 | } 65 | } 66 | } 67 | return uni8Bit; 68 | } 69 | 70 | UniMode CodingCookieValue(const char *buf, size_t length) { 71 | SString l1 = ExtractLine(buf, length); 72 | UniMode unicodeMode = CookieValue(l1); 73 | if (unicodeMode == uni8Bit) { 74 | SString l2 = ExtractLine(buf + l1.length(), length - l1.length()); 75 | unicodeMode = CookieValue(l2); 76 | } 77 | return unicodeMode; 78 | } 79 | 80 | -------------------------------------------------------------------------------- /src/Cookie.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file Cookie.h 3 | ** Examine start of files for coding cookies and type information. 4 | **/ 5 | // Copyright 2011 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | // Related to Utf8_16::encodingType but with additional values at end 9 | enum UniMode { 10 | uni8Bit = 0, uni16BE = 1, uni16LE = 2, uniUTF8 = 3, 11 | uniCookie = 4 12 | }; 13 | 14 | SString ExtractLine(const char *buf, size_t length); 15 | UniMode CodingCookieValue(const char *buf, size_t length); 16 | -------------------------------------------------------------------------------- /src/Embedded.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/src/Embedded.properties -------------------------------------------------------------------------------- /src/Exporters.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/src/Exporters.cxx -------------------------------------------------------------------------------- /src/Extender.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file Extender.h 3 | ** SciTE extension interface. 4 | **/ 5 | // Copyright 1998-2001 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef EXTENDER_H 9 | #define EXTENDER_H 10 | 11 | #include "Scintilla.h" 12 | 13 | class StyleWriter; 14 | 15 | class ExtensionAPI { 16 | public: 17 | virtual ~ExtensionAPI() { 18 | } 19 | enum Pane { paneEditor=1, paneOutput=2, paneFindOutput=3 }; 20 | virtual sptr_t Send(Pane p, unsigned int msg, uptr_t wParam=0, sptr_t lParam=0)=0; 21 | virtual char *Range(Pane p, int start, int end)=0; 22 | virtual void Remove(Pane p, int start, int end)=0; 23 | virtual void Insert(Pane p, int pos, const char *s)=0; 24 | virtual void Trace(const char *s)=0; 25 | virtual char *Property(const char *key)=0; 26 | virtual void SetProperty(const char *key, const char *val)=0; 27 | virtual void UnsetProperty(const char *key)=0; 28 | virtual uptr_t GetInstance()=0; 29 | virtual void ShutDown()=0; 30 | virtual void Perform(const char *actions)=0; 31 | virtual void DoMenuCommand(int cmdID)=0; 32 | virtual void UpdateStatusBar(bool bUpdateSlowData)=0; 33 | virtual void UserStripShow(const char *description)=0; 34 | virtual void UserStripSet(int control, const char *value)=0; 35 | virtual void UserStripSetList(int control, const char *value)=0; 36 | virtual const char *UserStripValue(int control)=0; 37 | }; 38 | 39 | /** 40 | * Methods in extensions return true if they have completely handled an event and 41 | * false if default processing is to continue. 42 | */ 43 | class Extension { 44 | public: 45 | virtual ~Extension() {} 46 | 47 | virtual bool Initialise(ExtensionAPI *host_)=0; 48 | virtual bool Finalise()=0; 49 | virtual bool Clear()=0; 50 | virtual bool Load(const char *filename)=0; 51 | 52 | virtual bool InitBuffer(int) { return false; } 53 | virtual bool ActivateBuffer(int) { return false; } 54 | virtual bool RemoveBuffer(int) { return false; } 55 | 56 | virtual bool OnOpen(const char *) { return false; } 57 | virtual bool OnSwitchFile(const char *) { return false; } 58 | virtual bool OnBeforeSave(const char *) { return false; } 59 | virtual bool OnSave(const char *) { return false; } 60 | virtual bool OnChar(char) { return false; } 61 | virtual bool OnExecute(const char *) { return false; } 62 | virtual bool OnSavePointReached() { return false; } 63 | virtual bool OnSavePointLeft() { return false; } 64 | virtual bool OnStyle(unsigned int, int, int, StyleWriter *) { 65 | return false; 66 | } 67 | virtual bool OnDoubleClick() { return false; } 68 | virtual bool OnUpdateUI() { return false; } 69 | virtual bool OnMarginClick() { return false; } 70 | virtual bool OnMacro(const char *, const char *) { return false; } 71 | virtual bool OnUserListSelection(int, const char *) { return false; } 72 | 73 | virtual bool SendProperty(const char *) { return false; } 74 | 75 | virtual bool OnKey(int, int) { return false; } 76 | virtual bool OnDwellStart(int, const char *) { return false; } 77 | virtual bool OnClose(const char *) { return false; } 78 | virtual bool OnUserStrip(int /* control */, int /* change */) { return false; } 79 | }; 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /src/FilePath.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file FilePath.h 3 | ** Definition of platform independent base class of editor. 4 | **/ 5 | // Copyright 1998-2005 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | extern const GUI::gui_char pathSepString[]; 9 | extern const GUI::gui_char pathSepChar; 10 | extern const GUI::gui_char listSepString[]; 11 | extern const GUI::gui_char configFileVisibilityString[]; 12 | extern const GUI::gui_char fileRead[]; 13 | extern const GUI::gui_char fileWrite[]; 14 | 15 | #if defined(__unix__) 16 | #include 17 | #ifdef PATH_MAX 18 | #define MAX_PATH PATH_MAX 19 | #else 20 | #define MAX_PATH 260 21 | #endif 22 | #endif 23 | 24 | #ifdef WIN32 25 | #ifdef _MSC_VER 26 | // Shut up level 4 warning: 27 | // warning C4710: function 'void whatever(...)' not inlined 28 | // warning C4800: forcing value to bool 'true' or 'false' (performance warning) 29 | #pragma warning(disable: 4710 4800) 30 | #endif 31 | #ifdef __DMC__ 32 | #include 33 | #endif 34 | #endif 35 | 36 | class FilePath; 37 | 38 | typedef std::vector FilePathSet; 39 | 40 | class FilePath { 41 | GUI::gui_string fileName; 42 | public: 43 | FilePath(const GUI::gui_char *fileName_ = GUI_TEXT("")); 44 | FilePath(const GUI::gui_string &fileName_); 45 | FilePath(FilePath const &directory, FilePath const &name); 46 | void Set(const GUI::gui_char *fileName_); 47 | void Set(FilePath const &other); 48 | void Set(FilePath const &directory, FilePath const &name); 49 | void SetDirectory(FilePath directory); 50 | void Init(); 51 | bool SameNameAs(const GUI::gui_char *other) const; 52 | bool SameNameAs(const FilePath &other) const; 53 | bool operator==(const FilePath &other) const; 54 | bool operator<(const FilePath &other) const; 55 | bool IsSet() const; 56 | bool IsUntitled() const; 57 | bool IsAbsolute() const; 58 | bool IsRoot() const; 59 | static int RootLength(); 60 | const GUI::gui_char *AsInternal() const; 61 | std::string AsUTF8() const; 62 | FilePath Name() const; 63 | FilePath BaseName() const; 64 | FilePath Extension() const; 65 | FilePath Directory() const; 66 | void FixName(); 67 | void LowerCaseExtension(); 68 | FilePath AbsolutePath() const; 69 | FilePath NormalizePath() const; 70 | static FilePath GetWorkingDirectory(); 71 | bool SetWorkingDirectory() const; 72 | void List(FilePathSet &directories, FilePathSet &files); 73 | FILE *Open(const GUI::gui_char *mode) const; 74 | void Remove() const; 75 | time_t ModifiedTime() const; 76 | long GetFileLength() const; 77 | bool Exists() const; 78 | bool IsDirectory() const; 79 | bool Matches(const GUI::gui_char *pattern) const; 80 | }; 81 | 82 | std::string CommandExecute(const GUI::gui_char *command, const GUI::gui_char *directoryForRun); 83 | -------------------------------------------------------------------------------- /src/FileWorker.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file FileWorker.h 3 | ** Definition of classes to perform background file tasks as threads. 4 | **/ 5 | // Copyright 2011 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | /// Base size of file I/O operations. 9 | const int blockSize = 131072; 10 | 11 | struct FileWorker : public Worker { 12 | WorkerListener *pListener; 13 | FilePath path; 14 | long size; 15 | int err; 16 | FILE *fp; 17 | GUI::ElapsedTime et; 18 | int sleepTime; 19 | double nextProgress; 20 | 21 | FileWorker(WorkerListener *pListener_, FilePath path_, long size_, FILE *fp_); 22 | virtual ~FileWorker(); 23 | virtual double Duration(); 24 | virtual void Cancel() { 25 | Worker::Cancel(); 26 | } 27 | virtual bool IsLoading() const = 0; 28 | }; 29 | 30 | #ifdef SCI_NAMESPACE 31 | using Scintilla::ILoader; 32 | #endif 33 | 34 | class FileLoader : public FileWorker { 35 | public: 36 | ILoader *pLoader; 37 | long readSoFar; 38 | UniMode unicodeMode; 39 | 40 | FileLoader(WorkerListener *pListener_, ILoader *pLoader_, FilePath path_, long size_, FILE *fp_); 41 | virtual ~FileLoader(); 42 | virtual void Execute(); 43 | virtual void Cancel(); 44 | virtual bool IsLoading() const { 45 | return true; 46 | } 47 | }; 48 | 49 | class FileStorer : public FileWorker { 50 | public: 51 | const char *documentBytes; 52 | long writtenSoFar; 53 | UniMode unicodeMode; 54 | bool visibleProgress; 55 | 56 | FileStorer(WorkerListener *pListener_, const char *documentBytes_, FilePath path_, 57 | long size_, FILE *fp_, UniMode unicodeMode_, bool visibleProgress_); 58 | virtual ~FileStorer(); 59 | virtual void Execute(); 60 | virtual void Cancel(); 61 | virtual bool IsLoading() const { 62 | return false; 63 | } 64 | }; 65 | 66 | enum { 67 | WORK_FILEREAD = 1, 68 | WORK_FILEWRITTEN = 2, 69 | WORK_FILEPROGRESS = 3, 70 | WORK_PLATFORM = 100 71 | }; 72 | -------------------------------------------------------------------------------- /src/IFaceTable.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file IFaceTable.h 3 | ** SciTE iface function and constant descriptors. 4 | **/ 5 | // Copyright 1998-2004 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef IFACETABLE_H 9 | #define IFACETABLE_H 10 | 11 | enum IFaceType { 12 | iface_void, 13 | iface_int, 14 | iface_length, 15 | iface_position, 16 | iface_colour, 17 | iface_bool, 18 | iface_keymod, 19 | iface_string, 20 | iface_stringresult, 21 | iface_cells, 22 | iface_textrange, 23 | iface_findtext, 24 | iface_formatrange 25 | }; 26 | 27 | struct IFaceConstant { 28 | const char *name; 29 | int value; 30 | }; 31 | 32 | struct IFaceFunction { 33 | const char *name; 34 | int value; 35 | IFaceType returnType; 36 | IFaceType paramType[2]; 37 | }; 38 | 39 | struct IFaceProperty { 40 | const char *name; 41 | int getter; 42 | int setter; 43 | IFaceType valueType; 44 | IFaceType paramType; 45 | 46 | IFaceFunction GetterFunction() const { 47 | IFaceFunction result = {"(property getter)",getter,valueType,{paramType,iface_void}}; 48 | return result; 49 | } 50 | 51 | IFaceFunction SetterFunction() const { 52 | IFaceFunction result = {"(property setter)",setter,iface_void,{valueType, iface_void}}; 53 | if (paramType != iface_void) { 54 | result.paramType[0] = paramType; 55 | if (valueType == iface_stringresult) 56 | result.paramType[1] = iface_string; 57 | else 58 | result.paramType[1] = valueType; 59 | } 60 | if ((paramType == iface_void) && ((valueType == iface_string) || (valueType == iface_stringresult))) { 61 | result.paramType[0] = paramType; 62 | if (valueType == iface_stringresult) 63 | result.paramType[1] = iface_string; 64 | else 65 | result.paramType[1] = valueType; 66 | } 67 | return result; 68 | } 69 | }; 70 | 71 | struct IFaceObject { 72 | const char *name; 73 | const char *prefix; 74 | IFaceType indexType; 75 | }; 76 | 77 | class IFaceTable { 78 | public: 79 | static const IFaceFunction * const functions; 80 | static const IFaceConstant * const constants; 81 | static const IFaceProperty * const properties; 82 | 83 | static const int functionCount; 84 | static const int constantCount; 85 | static const int propertyCount; 86 | 87 | static int FindConstant(const char *name); 88 | static int FindFunction(const char *name); 89 | static int FindFunctionByConstantName(const char *name); 90 | static int FindProperty(const char *name); 91 | 92 | static int GetConstantName(int value, char *nameOut, unsigned nameBufferLen); 93 | }; 94 | 95 | #endif 96 | -------------------------------------------------------------------------------- /src/JobQueue.cxx: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file JobQueue.cxx 3 | ** Define job queue 4 | **/ 5 | // SciTE & Scintilla copyright 1998-2003 by Neil Hodgson 6 | // Copyright 2007 by Neil Hodgson , from April White 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #include 18 | #include 19 | 20 | #include "Scintilla.h" 21 | 22 | #include "GUI.h" 23 | 24 | #include "SString.h" 25 | #include "FilePath.h" 26 | 27 | #include "SciTE.h" 28 | 29 | #include "Mutex.h" 30 | #include "JobQueue.h" 31 | 32 | void JobQueue::ClearJobs() { 33 | for (int ic = 0; ic < commandMax; ic++) { 34 | jobQueue[ic].Clear(); 35 | } 36 | commandCurrent = 0; 37 | } 38 | 39 | void JobQueue::AddCommand(const SString &command, const FilePath &directory, JobSubsystem jobType, const SString &input, int flags) { 40 | if ((commandCurrent < commandMax) && (command.length())) { 41 | if (commandCurrent == 0) 42 | jobUsesOutputPane = false; 43 | jobQueue[commandCurrent] = Job(command, directory, jobType, input, flags); 44 | commandCurrent++; 45 | if (jobType == jobCLI) 46 | jobUsesOutputPane = true; 47 | // For jobExtension, the Trace() method shows output pane on demand. 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/JobQueue.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file JobQueue.h 3 | ** Define job queue 4 | **/ 5 | // SciTE & Scintilla copyright 1998-2003 by Neil Hodgson 6 | // Copyright 2007 by Neil Hodgson , from April White 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | // TODO: see http://www.codeproject.com/threads/cppsyncstm.asp 10 | 11 | #ifndef JOBQUEUE_H 12 | #define JOBQUEUE_H 13 | 14 | enum JobSubsystem { 15 | jobCLI = 0, jobGUI = 1, jobShell = 2, jobExtension = 3, jobHelp = 4, jobOtherHelp = 5, jobGrep = 6}; 16 | 17 | enum JobFlags { 18 | jobForceQueue = 1, 19 | jobHasInput = 2, 20 | jobQuiet = 4, 21 | // 8 reserved for jobVeryQuiet 22 | jobRepSelMask = 48, 23 | jobRepSelYes = 16, 24 | jobRepSelAuto = 32, 25 | jobGroupUndo = 64 26 | }; 27 | 28 | class Job { 29 | public: 30 | SString command; 31 | FilePath directory; 32 | JobSubsystem jobType; 33 | SString input; 34 | int flags; 35 | 36 | Job() { 37 | Clear(); 38 | } 39 | 40 | Job(const SString &command_, const FilePath &directory_, JobSubsystem jobType_, const SString &input_, int flags_) 41 | : command(command_), directory(directory_), jobType(jobType_), input(input_), flags(flags_) { 42 | } 43 | 44 | void Clear() { 45 | command = ""; 46 | directory.Init(); 47 | jobType = jobCLI; 48 | input = ""; 49 | flags = 0; 50 | } 51 | }; 52 | 53 | class JobQueue { 54 | public: 55 | Mutex *mutex; 56 | bool clearBeforeExecute; 57 | bool isBuilding; 58 | bool isBuilt; 59 | bool executing; 60 | enum { commandMax = 2 }; 61 | int commandCurrent; 62 | Job jobQueue[commandMax]; 63 | bool jobUsesOutputPane; 64 | long cancelFlag; 65 | bool timeCommands; 66 | 67 | JobQueue() { 68 | mutex = Mutex::Create(); 69 | clearBeforeExecute = false; 70 | isBuilding = false; 71 | isBuilt = false; 72 | executing = false; 73 | commandCurrent = 0; 74 | jobUsesOutputPane = false; 75 | cancelFlag = 0L; 76 | timeCommands = false; 77 | } 78 | 79 | ~JobQueue() { 80 | delete mutex; 81 | mutex = 0; 82 | } 83 | 84 | bool TimeCommands() const { 85 | Lock lock(mutex); 86 | return timeCommands; 87 | } 88 | 89 | bool ClearBeforeExecute() const { 90 | Lock lock(mutex); 91 | return clearBeforeExecute; 92 | } 93 | 94 | bool ShowOutputPane() const { 95 | Lock lock(mutex); 96 | return jobUsesOutputPane; 97 | } 98 | 99 | bool IsExecuting() const { 100 | Lock lock(mutex); 101 | return executing; 102 | } 103 | 104 | void SetExecuting(bool state) { 105 | Lock lock(mutex); 106 | executing = state; 107 | } 108 | 109 | bool HasCommandToRun() const { 110 | return commandCurrent > 0; 111 | } 112 | 113 | long SetCancelFlag(long value) { 114 | Lock lock(mutex); 115 | long cancelFlagPrevious = cancelFlag; 116 | cancelFlag = value; 117 | return cancelFlagPrevious; 118 | } 119 | 120 | long Cancelled() { 121 | Lock lock(mutex); 122 | return cancelFlag; 123 | } 124 | 125 | void ClearJobs(); 126 | void AddCommand(const SString &command, const FilePath &directory, JobSubsystem jobType, const SString &input, int flags); 127 | }; 128 | 129 | #endif 130 | -------------------------------------------------------------------------------- /src/LuaExtension.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | // LuaExtension.h - Lua scripting extension 3 | // Copyright 1998-2000 by Neil Hodgson 4 | // The License.txt file describes the conditions under which this software may be distributed. 5 | 6 | class LuaExtension : public Extension { 7 | private: 8 | LuaExtension(); // Singleton 9 | LuaExtension(const LuaExtension &); // Disable copy ctor 10 | void operator=(const LuaExtension &); // Disable operator= 11 | 12 | public: 13 | static LuaExtension &Instance(); 14 | 15 | virtual ~LuaExtension(); 16 | 17 | virtual bool Initialise(ExtensionAPI *host_); 18 | virtual bool Finalise(); 19 | virtual bool Clear(); 20 | virtual bool Load(const char *filename); 21 | 22 | virtual bool InitBuffer(int); 23 | virtual bool ActivateBuffer(int); 24 | virtual bool RemoveBuffer(int); 25 | 26 | virtual bool OnOpen(const char *filename); 27 | virtual bool OnSwitchFile(const char *filename); 28 | virtual bool OnBeforeSave(const char *filename); 29 | virtual bool OnSave(const char *filename); 30 | virtual bool OnChar(char ch); 31 | virtual bool OnExecute(const char *s); 32 | virtual bool OnSavePointReached(); 33 | virtual bool OnSavePointLeft(); 34 | virtual bool OnStyle(unsigned int startPos, int lengthDoc, int initStyle, StyleWriter *styler); 35 | virtual bool OnDoubleClick(); 36 | virtual bool OnUpdateUI(); 37 | virtual bool OnMarginClick(); 38 | virtual bool OnUserListSelection(int listType, const char *selection); 39 | virtual bool OnKey(int keyval, int modifiers); 40 | virtual bool OnDwellStart(int pos, const char *word); 41 | virtual bool OnClose(const char *filename); 42 | virtual bool OnUserStrip(int control, int change); 43 | }; 44 | -------------------------------------------------------------------------------- /src/MultiplexExtension.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file MultiplexExtension.h 3 | ** Extension that manages / dispatches messages to multiple extensions. 4 | **/ 5 | // Copyright 1998-2003 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef MULTIPLEXEXTENSION_H 9 | #define MULTIPLEXEXTENSION_H 10 | 11 | #include "Extender.h" 12 | 13 | // MultiplexExtension manages multiple Extension objects, similar to 14 | // what is proposed in the SciTE Extension documentation. Each 15 | // message is sent to each contained extension object in turn until 16 | // one indicates that the message has been handled and does not need 17 | // to be processed further. Certain messages (Initialise, Finalise 18 | // Clear, and SendProperty) are sent to all contained extensions 19 | // regardless of return code. 20 | // 21 | // The Director extension incorrectly returns true for all messages, 22 | // meaning that other extensions will never see the message if 23 | // DirectorExtension comes before them in the list. This has been 24 | // fixed at source. 25 | // 26 | // Extensions are added to the multiplexer by calling RegisterExtension. 27 | // The extensions are prioritized with the first one added having the 28 | // highest priority. If more flexibility is needed in order to support 29 | // dynamic discovery of extensions and assignment of priority, that will 30 | // be added later. If the ability to remove extensions becomes important, 31 | // that can be added as well (later). 32 | // 33 | // The multiplexer does not manage the lifetime of the extension objects 34 | // that are registered with it. If that functionality later turns out 35 | // to be needed, it will be added at that time. (Broken record? Do the 36 | // simplest thing...) However, the option to "not" manage the lifecycle 37 | // is a valid one, since it often makes sense to implement extensions as 38 | // singletons. 39 | 40 | class MultiplexExtension: public Extension { 41 | public: 42 | MultiplexExtension(); 43 | virtual ~MultiplexExtension(); 44 | 45 | bool RegisterExtension(Extension &ext_); 46 | 47 | virtual bool Initialise(ExtensionAPI *host_); 48 | virtual bool Finalise(); 49 | virtual bool Clear(); 50 | virtual bool Load(const char *filename); 51 | 52 | virtual bool InitBuffer(int); 53 | virtual bool ActivateBuffer(int); 54 | virtual bool RemoveBuffer(int); 55 | 56 | virtual bool OnOpen(const char *); 57 | virtual bool OnSwitchFile(const char *); 58 | virtual bool OnBeforeSave(const char *); 59 | virtual bool OnSave(const char *); 60 | virtual bool OnChar(char); 61 | virtual bool OnExecute(const char *); 62 | virtual bool OnSavePointReached(); 63 | virtual bool OnSavePointLeft(); 64 | virtual bool OnStyle(unsigned int, int, int, StyleWriter *); 65 | virtual bool OnDoubleClick(); 66 | virtual bool OnUpdateUI(); 67 | virtual bool OnMarginClick(); 68 | virtual bool OnMacro(const char *, const char *); 69 | virtual bool OnUserListSelection(int, const char *); 70 | 71 | virtual bool SendProperty(const char *); 72 | 73 | virtual bool OnKey(int, int); 74 | virtual bool OnDwellStart(int, const char *); 75 | virtual bool OnClose(const char *); 76 | virtual bool OnUserStrip(int control, int change); 77 | 78 | private: 79 | Extension **extensions; 80 | int extensionCount; 81 | ExtensionAPI *host; 82 | 83 | // Copying is unsupported. 84 | MultiplexExtension(const MultiplexExtension & copy); 85 | MultiplexExtension & operator=(const MultiplexExtension & copy); 86 | }; 87 | 88 | #endif 89 | -------------------------------------------------------------------------------- /src/Mutex.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file Mutex.h 3 | ** Define mutex 4 | **/ 5 | // SciTE & Scintilla copyright 1998-2003 by Neil Hodgson 6 | // Copyright 2007 by Neil Hodgson , from April White 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | // TODO: see http://www.codeproject.com/threads/cppsyncstm.asp 10 | 11 | #ifndef MUTEX_H 12 | #define MUTEX_H 13 | 14 | class Mutex { 15 | public: 16 | virtual void Lock() = 0; 17 | virtual void Unlock() = 0; 18 | virtual ~Mutex() {} 19 | static Mutex *Create(); 20 | }; 21 | 22 | class Lock { 23 | Mutex *mute; 24 | public: 25 | Lock(Mutex *mute_) : mute(mute_) { 26 | mute->Lock(); 27 | } 28 | ~Lock() { 29 | mute->Unlock(); 30 | } 31 | }; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/PropSetFile.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file PropSetFile.h 3 | ** Definition of platform independent base class of editor. 4 | **/ 5 | // Copyright 1998-2009 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | /** 9 | */ 10 | 11 | typedef std::map mapss; 12 | 13 | class ImportFilter { 14 | public: 15 | std::set excludes; 16 | std::set includes; 17 | void SetFilter(std::string sExcludes, std::string sIncludes); 18 | bool IsValid(std::string name) const; 19 | }; 20 | 21 | class PropSetFile { 22 | bool lowerKeys; 23 | SString GetWildUsingStart(const PropSetFile &psStart, const char *keybase, const char *filename); 24 | static bool caseSensitiveFilenames; 25 | mapss props; 26 | public: 27 | PropSetFile *superPS; 28 | PropSetFile(bool lowerKeys_=false); 29 | PropSetFile(const PropSetFile ©); 30 | virtual ~PropSetFile(); 31 | PropSetFile &operator=(const PropSetFile &assign); 32 | void Set(const char *key, const char *val, ptrdiff_t lenKey=-1, ptrdiff_t lenVal=-1); 33 | void Set(const char *keyVal); 34 | void Unset(const char *key, int lenKey=-1); 35 | void SetMultiple(const char *s); 36 | bool Exists(const char *key) const; 37 | SString Get(const char *key) const; 38 | SString Evaluate(const char *key) const; 39 | SString GetExpanded(const char *key) const; 40 | SString Expand(const char *withVars, int maxExpands=100) const; 41 | int GetInt(const char *key, int defaultValue=0) const; 42 | void Clear(); 43 | char *ToString() const; // Caller must delete[] the return value 44 | 45 | bool ReadLine(const char *data, bool ifIsTrue, FilePath directoryForImports, const ImportFilter &filter, std::vector *imports=0); 46 | void ReadFromMemory(const char *data, size_t len, FilePath directoryForImports, const ImportFilter &filter, std::vector *imports=0); 47 | void Import(FilePath filename, FilePath directoryForImports, const ImportFilter &filter, std::vector *imports); 48 | bool Read(FilePath filename, FilePath directoryForImports, const ImportFilter &filter, std::vector *imports=0); 49 | void SetInteger(const char *key, int i); 50 | SString GetWild(const char *keybase, const char *filename); 51 | SString GetNewExpand(const char *keybase, const char *filename=""); 52 | bool GetFirst(const char *&key, const char *&val); 53 | bool GetNext(const char *&key, const char *&val); 54 | static void SetCaseSensitiveFilenames(bool caseSensitiveFilenames_) { 55 | caseSensitiveFilenames = caseSensitiveFilenames_; 56 | } 57 | }; 58 | 59 | #define PROPERTIES_EXTENSION ".properties" 60 | bool IsPropertiesFile(const FilePath &filename); 61 | -------------------------------------------------------------------------------- /src/SciTE.properties: -------------------------------------------------------------------------------- 1 | # SciTE.properties is the per directory local options file and can be used to 2 | # override settings made in SciTEGlobal.properties, SciTEUser.properties and 3 | # SciTEDirectory.properties. 4 | command.build.directory.*.cxx=..\win32 5 | command.build.directory.*.h=..\win32 6 | command.build.*.cxx=nmake -f scite.mak DEBUG=1 QUIET=1 7 | command.build.*.h=nmake -f scite.mak DEBUG=1 QUIET=1 8 | command.go.*.cxx=..\bin\SciTE 9 | command.go.*.h=..\bin\SciTE 10 | command.go.needs.*.cxx=cmd /c cd ..\win32 && nmake -f scite.mak DEBUG=1 QUIET=1 11 | -------------------------------------------------------------------------------- /src/SciTEGlobal.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/src/SciTEGlobal.properties -------------------------------------------------------------------------------- /src/SciTEKeys.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file SciTEKeys.h 3 | ** SciTE keyboard shortcut facilities. 4 | **/ 5 | // Copyright 1998-2004 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef SCITEKEYS_H 9 | #define SCITEKEYS_H 10 | 11 | class SciTEKeys { 12 | public: 13 | static long ParseKeyCode(const char *mnemonic); 14 | static bool MatchKeyCode(long parsedKeyCode, int key, int modifiers); 15 | }; 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/StringHelpers.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file StringHelpers.h 3 | ** Definition of widely useful string functions. 4 | **/ 5 | // Copyright 2010 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | bool StartsWith(GUI::gui_string const &s, GUI::gui_string const &end); 9 | bool EndsWith(GUI::gui_string const &s, GUI::gui_string const &end); 10 | int Substitute(GUI::gui_string &s, const GUI::gui_string &sFind, const GUI::gui_string &sReplace); 11 | 12 | char *Slash(const char *s, bool quoteQuotes); 13 | unsigned int UnSlash(char *s); 14 | unsigned int UnSlashLowOctal(char *s); 15 | 16 | class ILocalize { 17 | public: 18 | virtual GUI::gui_string Text(const char *s, bool retainIfNotFound=true) = 0; 19 | }; 20 | 21 | /** 22 | * This is a fixed length list of strings suitable for display in combo boxes 23 | * as a memory of user entries. 24 | */ 25 | template < int sz > 26 | class EntryMemory { 27 | std::string entries[sz]; 28 | public: 29 | void Insert(const std::string &s) { 30 | for (int i = 0; i < sz; i++) { 31 | if (entries[i] == s) { 32 | for (int j = i; j > 0; j--) { 33 | entries[j] = entries[j - 1]; 34 | } 35 | entries[0] = s; 36 | return; 37 | } 38 | } 39 | for (int k = sz - 1; k > 0; k--) { 40 | entries[k] = entries[k - 1]; 41 | } 42 | entries[0] = s; 43 | } 44 | void AppendIfNotPresent(const std::string &s) { 45 | for (int i = 0; i < sz; i++) { 46 | if (entries[i] == s) { 47 | return; 48 | } 49 | if (0 == entries[i].length()) { 50 | entries[i] = s; 51 | return; 52 | } 53 | } 54 | } 55 | void AppendList(const std::string &s, char sep = '|') { 56 | int start = 0; 57 | int end = 0; 58 | while (s[end] != '\0') { 59 | end = start; 60 | while ((s[end] != sep) && (s[end] != '\0')) 61 | ++end; 62 | AppendIfNotPresent(s.substr(start, end-start)); 63 | start = end + 1; 64 | } 65 | } 66 | int Length() const { 67 | int len = 0; 68 | for (int i = 0; i < sz; i++) 69 | if (entries[i].length()) 70 | len++; 71 | return len; 72 | } 73 | std::string At(int n) const { 74 | return entries[n]; 75 | } 76 | std::vectorAsVector() { 77 | std::vector ret; 78 | for (int i = 0; i < sz; i++) { 79 | if (entries[i].length()) 80 | ret.push_back(entries[i].c_str()); 81 | } 82 | return ret; 83 | } 84 | }; 85 | 86 | typedef EntryMemory < 10 > ComboMemory; 87 | -------------------------------------------------------------------------------- /src/StringList.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file StringList.h 3 | ** Definition of class holding a list of strings. 4 | **/ 5 | // Copyright 1998-2005 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | class StringList { 9 | public: 10 | // Each word contains at least one character - a empty word acts as sentinel at the end. 11 | char **words; 12 | char **wordsNoCase; 13 | char *list; 14 | int len; 15 | bool onlyLineEnds; ///< Delimited by any white space or only line ends 16 | bool sorted; 17 | bool sortedNoCase; 18 | int starts[256]; 19 | StringList(bool onlyLineEnds_ = false) : 20 | words(0), wordsNoCase(0), list(0), len(0), onlyLineEnds(onlyLineEnds_), 21 | sorted(false), sortedNoCase(false) {} 22 | ~StringList() { Clear(); } 23 | operator bool() const { return len ? true : false; } 24 | char *operator[](int ind) { return words[ind]; } 25 | void Clear(); 26 | void Set(const char *s); 27 | char *Allocate(int size); 28 | void SetFromAllocated(); 29 | bool InList(const char *s); 30 | //bool InListAbbreviated(const char *s, const char marker); 31 | const char *GetNearestWord(const char *wordStart, size_t searchLen, 32 | bool ignoreCase = false, SString wordCharacters="", int wordIndex = -1); 33 | char *GetNearestWords(const char *wordStart, size_t searchLen, 34 | bool ignoreCase=false, char otherSeparator='\0', bool exactLen=false); 35 | }; 36 | 37 | -------------------------------------------------------------------------------- /src/StyleWriter.cxx: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file StyleWriter.cxx 3 | ** Simple buffered interface to the text and styles of a document held by Scintilla. 4 | **/ 5 | // Copyright 1998-2010 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #include 9 | 10 | #include "Scintilla.h" 11 | #include "GUI.h" 12 | #include "StyleWriter.h" 13 | 14 | bool TextReader::InternalIsLeadByte(char ch) const { 15 | return GUI::IsDBCSLeadByte(codePage, ch); 16 | } 17 | 18 | void TextReader::Fill(int position) { 19 | if (lenDoc == -1) 20 | lenDoc = sw.Call(SCI_GETTEXTLENGTH, 0, 0); 21 | startPos = position - slopSize; 22 | if (startPos + bufferSize > lenDoc) 23 | startPos = lenDoc - bufferSize; 24 | if (startPos < 0) 25 | startPos = 0; 26 | endPos = startPos + bufferSize; 27 | if (endPos > lenDoc) 28 | endPos = lenDoc; 29 | 30 | Sci_TextRange tr = {{startPos, endPos}, buf}; 31 | sw.Call(SCI_GETTEXTRANGE, 0, reinterpret_cast(&tr)); 32 | } 33 | 34 | bool TextReader::Match(int pos, const char *s) { 35 | for (int i=0; *s; i++) { 36 | if (*s != SafeGetCharAt(pos+i)) 37 | return false; 38 | s++; 39 | } 40 | return true; 41 | } 42 | 43 | char TextReader::StyleAt(int position) { 44 | return static_cast(sw.Call( 45 | SCI_GETSTYLEAT, position, 0)); 46 | } 47 | 48 | int TextReader::GetLine(int position) { 49 | return sw.Call(SCI_LINEFROMPOSITION, position, 0); 50 | } 51 | 52 | int TextReader::LineStart(int line) { 53 | return sw.Call(SCI_POSITIONFROMLINE, line, 0); 54 | } 55 | 56 | int TextReader::LevelAt(int line) { 57 | return sw.Call(SCI_GETFOLDLEVEL, line, 0); 58 | } 59 | 60 | int TextReader::Length() { 61 | if (lenDoc == -1) 62 | lenDoc = sw.Call(SCI_GETTEXTLENGTH, 0, 0); 63 | return lenDoc; 64 | } 65 | 66 | int TextReader::GetLineState(int line) { 67 | return sw.Call(SCI_GETLINESTATE, line); 68 | } 69 | 70 | int StyleWriter::SetLineState(int line, int state) { 71 | return sw.Call(SCI_SETLINESTATE, line, state); 72 | } 73 | 74 | void StyleWriter::StartAt(unsigned int start, char chMask) { 75 | sw.Call(SCI_STARTSTYLING, start, chMask); 76 | } 77 | 78 | void StyleWriter::StartSegment(unsigned int pos) { 79 | startSeg = pos; 80 | } 81 | 82 | void StyleWriter::ColourTo(unsigned int pos, int chAttr) { 83 | // Only perform styling if non empty range 84 | if (pos != startSeg - 1) { 85 | if (validLen + (pos - startSeg + 1) >= bufferSize) 86 | Flush(); 87 | if (validLen + (pos - startSeg + 1) >= bufferSize) { 88 | // Too big for buffer so send directly 89 | sw.Call(SCI_SETSTYLING, pos - startSeg + 1, chAttr); 90 | } else { 91 | for (unsigned int i = startSeg; i <= pos; i++) { 92 | styleBuf[validLen++] = static_cast(chAttr); 93 | } 94 | } 95 | } 96 | startSeg = pos+1; 97 | } 98 | 99 | void StyleWriter::SetLevel(int line, int level) { 100 | sw.Call(SCI_SETFOLDLEVEL, line, level); 101 | } 102 | 103 | void StyleWriter::Flush() { 104 | startPos = extremePosition; 105 | lenDoc = -1; 106 | if (validLen > 0) { 107 | sw.SendPointer(SCI_SETSTYLINGEX, validLen, styleBuf); 108 | validLen = 0; 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /src/StyleWriter.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file StyleWriter.h 3 | ** Simple buffered interface to the text and styles of a document held by Scintilla. 4 | **/ 5 | // Copyright 1998-2010 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef STYLEWRITER_H 9 | #define STYLEWRITER_H 10 | 11 | // Read only access to a document, its styles and other data 12 | class TextReader { 13 | // Private so TextReader objects can not be copied 14 | TextReader(const TextReader &source); 15 | TextReader &operator=(const TextReader &); 16 | protected: 17 | enum {extremePosition=0x7FFFFFFF}; 18 | /** @a bufferSize is a trade off between time taken to copy the characters 19 | * and retrieval overhead. 20 | * @a slopSize positions the buffer before the desired position 21 | * in case there is some backtracking. */ 22 | enum {bufferSize=4000, slopSize=bufferSize/8}; 23 | char buf[bufferSize+1]; 24 | int startPos; 25 | int endPos; 26 | int codePage; 27 | 28 | GUI::ScintillaWindow &sw; 29 | int lenDoc; 30 | 31 | bool InternalIsLeadByte(char ch) const; 32 | void Fill(int position); 33 | public: 34 | TextReader(GUI::ScintillaWindow &sw_) : 35 | startPos(extremePosition), 36 | endPos(0), 37 | codePage(0), 38 | sw(sw_), 39 | lenDoc(-1) { 40 | } 41 | char operator[](int position) { 42 | if (position < startPos || position >= endPos) { 43 | Fill(position); 44 | } 45 | return buf[position - startPos]; 46 | } 47 | /** Safe version of operator[], returning a defined value for invalid position. */ 48 | char SafeGetCharAt(int position, char chDefault=' ') { 49 | if (position < startPos || position >= endPos) { 50 | Fill(position); 51 | if (position < startPos || position >= endPos) { 52 | // Position is outside range of document 53 | return chDefault; 54 | } 55 | } 56 | return buf[position - startPos]; 57 | } 58 | bool IsLeadByte(char ch) const { 59 | return codePage && InternalIsLeadByte(ch); 60 | } 61 | void SetCodePage(int codePage_) { 62 | codePage = codePage_; 63 | } 64 | bool Match(int pos, const char *s); 65 | char StyleAt(int position); 66 | int GetLine(int position); 67 | int LineStart(int line); 68 | int LevelAt(int line); 69 | int Length(); 70 | int GetLineState(int line); 71 | }; 72 | 73 | // Adds methods needed to write styles and folding 74 | class StyleWriter : public TextReader { 75 | // Private so StyleWriter objects can not be copied 76 | StyleWriter(const StyleWriter &source); 77 | StyleWriter &operator=(const StyleWriter &); 78 | protected: 79 | char styleBuf[bufferSize]; 80 | int validLen; 81 | unsigned int startSeg; 82 | public: 83 | StyleWriter(GUI::ScintillaWindow &sw_) : 84 | TextReader(sw_), 85 | validLen(0), 86 | startSeg(0) { 87 | } 88 | void Flush(); 89 | int SetLineState(int line, int state); 90 | 91 | void StartAt(unsigned int start, char chMask=31); 92 | unsigned int GetStartSegment() { return startSeg; } 93 | void StartSegment(unsigned int pos); 94 | void ColourTo(unsigned int pos, int chAttr); 95 | void SetLevel(int line, int level); 96 | }; 97 | 98 | #endif 99 | -------------------------------------------------------------------------------- /src/Utf8_16.h: -------------------------------------------------------------------------------- 1 | // Utf8_16.h 2 | // Copyright (C) 2002 Scott Kirkwood 3 | // 4 | // Permission to use, copy, modify, distribute and sell this code 5 | // and its documentation for any purpose is hereby granted without fee, 6 | // provided that the above copyright notice appear in all copies or 7 | // any derived copies. Scott Kirkwood makes no representations 8 | // about the suitability of this software for any purpose. 9 | // It is provided "as is" without express or implied warranty. 10 | // 11 | // Notes: Used the UTF information I found at: 12 | // http://www.cl.cam.ac.uk/~mgk25/unicode.html 13 | //////////////////////////////////////////////////////////////////////////////// 14 | 15 | #include 16 | #include 17 | 18 | #ifdef _MSC_VER 19 | #pragma warning(disable: 4514) // nreferenced inline function has been removed 20 | #endif 21 | 22 | class Utf8_16 { 23 | public: 24 | typedef unsigned short utf16; // 16 bits 25 | typedef unsigned char utf8; // 8 bits 26 | typedef unsigned char ubyte; 27 | enum encodingType { 28 | eUnknown, 29 | eUtf16BigEndian, 30 | eUtf16LittleEndian, // Default on Windows 31 | eUtf8, 32 | eLast 33 | }; 34 | static const utf8 k_Boms[eLast][3]; 35 | }; 36 | 37 | // Reads UTF-16 and outputs UTF-8 38 | class Utf16_Iter : public Utf8_16 { 39 | public: 40 | Utf16_Iter(); 41 | void reset(); 42 | void set(const ubyte* pBuf, size_t nLen, encodingType eEncoding); 43 | utf8 get() const { 44 | return m_nCur; 45 | } 46 | void operator++(); 47 | operator bool() { return m_pRead <= m_pEnd; } 48 | 49 | protected: 50 | enum eState { 51 | eStart, 52 | eSecondOf4Bytes, 53 | ePenultimate, 54 | eFinal 55 | }; 56 | protected: 57 | encodingType m_eEncoding; 58 | eState m_eState; 59 | utf8 m_nCur; 60 | int m_nCur16; 61 | const ubyte* m_pBuf; 62 | const ubyte* m_pRead; 63 | const ubyte* m_pEnd; 64 | }; 65 | 66 | // Reads UTF-8 and outputs UTF-16 67 | class Utf8_Iter : public Utf8_16 { 68 | public: 69 | Utf8_Iter(); 70 | void reset(); 71 | void set(const ubyte* pBuf, size_t nLen, encodingType eEncoding); 72 | int get() const { 73 | #ifdef _DEBUG 74 | assert(m_eState == eStart); 75 | #endif 76 | return m_nCur; 77 | } 78 | bool canGet() const { return m_eState == eStart; } 79 | void operator++(); 80 | operator bool() { return m_pRead <= m_pEnd; } 81 | 82 | protected: 83 | void toStart(); // Put to start state 84 | enum eState { 85 | eStart, 86 | eSecondOf4Bytes, 87 | ePenultimate, 88 | eFinal 89 | }; 90 | protected: 91 | encodingType m_eEncoding; 92 | eState m_eState; 93 | int m_nCur; 94 | const ubyte* m_pBuf; 95 | const ubyte* m_pRead; 96 | const ubyte* m_pEnd; 97 | }; 98 | 99 | // Reads UTF16 and outputs UTF8 100 | class Utf8_16_Read : public Utf8_16 { 101 | public: 102 | Utf8_16_Read(); 103 | ~Utf8_16_Read(); 104 | 105 | size_t convert(char* buf, size_t len); 106 | char* getNewBuf() { return reinterpret_cast(m_pNewBuf); } 107 | 108 | encodingType getEncoding() const { return m_eEncoding; } 109 | protected: 110 | int determineEncoding(); 111 | private: 112 | encodingType m_eEncoding; 113 | ubyte* m_pBuf; 114 | ubyte* m_pNewBuf; 115 | size_t m_nBufSize; 116 | bool m_bFirstRead; 117 | size_t m_nLen; 118 | Utf16_Iter m_Iter16; 119 | }; 120 | 121 | // Read in a UTF-8 buffer and write out to UTF-16 or UTF-8 122 | class Utf8_16_Write : public Utf8_16 { 123 | public: 124 | Utf8_16_Write(); 125 | ~Utf8_16_Write(); 126 | 127 | void setEncoding(encodingType eType); 128 | 129 | void setfile(FILE *pFile); 130 | size_t fwrite(const void* p, size_t _size); 131 | void fclose(); 132 | protected: 133 | encodingType m_eEncoding; 134 | FILE* m_pFile; 135 | utf16* m_pBuf; 136 | size_t m_nBufSize; 137 | bool m_bFirstWrite; 138 | }; 139 | -------------------------------------------------------------------------------- /src/Worker.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file Worker.h 3 | ** Definition of classes to perform background tasks as threads. 4 | **/ 5 | // Copyright 2011 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | struct Worker { 9 | volatile bool completed; 10 | volatile bool cancelling; 11 | volatile int jobSize; 12 | volatile int jobProgress; 13 | 14 | Worker() : completed(false), cancelling(false), jobSize(1), jobProgress(0) { 15 | } 16 | virtual ~Worker() {} 17 | virtual void Execute() {} 18 | bool FinishedJob() const { 19 | return completed; 20 | } 21 | virtual void Cancel() { 22 | cancelling = true; 23 | // Wait for writing thread to finish 24 | while (!completed) 25 | ; 26 | } 27 | }; 28 | 29 | struct WorkerListener { 30 | virtual void PostOnMainThread(int cmd, Worker *pWorker) = 0; 31 | }; 32 | -------------------------------------------------------------------------------- /src/abaqus.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for ABAQUS files. 2 | 3 | file.patterns.abaqus=*.inp;*.dat;*.msg 4 | filter.abaqus=ABAQUS input (inp)|$(file.patterns.abaqus)| 5 | 6 | #lexer.$(file.patterns.abaqus)=abaqus 7 | lexer.$(file.patterns.abaqus)=abaqus 8 | 9 | # keywords and input/output specifiers 10 | keywords=*amplitude *assembly \ 11 | *beam *boundary *buckle *bulk \ 12 | *cload *conditions *conductivity *contact \ 13 | *damping *density *dload *dsflux *dsload *dynamic \ 14 | *el *elastic *element *element output *elgen *elset *encastre *end step \ 15 | *expansion *explicit *equation *embedded element \ 16 | *field *freq *frequency *friction \ 17 | *generate \ 18 | *heading *heat transfer *history \ 19 | *imperfectio *import *include *initial *initial conditions *instance *interactio \ 20 | *internal *interval \ 21 | *marks *material *monitor *mpc \ 22 | *ncopy *nfill *ngen *nlgeom *node *node output *node print *nset *number \ 23 | *output \ 24 | *pair *parameter *part *physical constants *plastic *print *preprint \ 25 | *radiate *restart \ 26 | *shell *shell section *solid section *specific heat *sradiate *static *step \ 27 | *surface \ 28 | *temperature *time *type \ 29 | *variable *viscosity 30 | 31 | arguments=elset engineering inc input line material name nset pin tie type write generate field variable history \ 32 | stefan boltzmann absolute zero zero frequency steady state new old set change number shift \ 33 | model position newset oldset host 34 | 35 | keywords.$(file.patterns.abaqus)= 36 | keywords2.$(file.patterns.abaqus)=$(keywords) 37 | keywords3.$(file.patterns.abaqus)= 38 | keywords4.$(file.patterns.abaqus)= 39 | keywords5.$(file.patterns.abaqus)=$(arguments) 40 | keywords6.$(file.patterns.abaqus)= 41 | 42 | comment.block.abaqus=** 43 | 44 | # ABAQUS styles 45 | # Default 46 | style.abaqus.0=fore:#000000 47 | # Comment 48 | style.abaqus.1=fore:#999999,$(font.comment),italics 49 | # Comment-blocks 50 | style.abaqus.2=fore:#999999,$(font.comment),italics 51 | # Number 52 | style.abaqus.3=$(colour.number) 53 | # Quoted string 54 | style.abaqus.4=$(colour.string) 55 | # Ansys operator 56 | style.abaqus.5=fore:#990000 57 | # Ansys word 58 | style.abaqus.6=fore:#000000 59 | # Ansys processor 60 | style.abaqus.7=fore:#008888,bold 61 | # Ansys command 62 | style.abaqus.8=fore:#0000CC 63 | # Ansys slashcommand 64 | style.abaqus.9=fore:#0000CC,bold 65 | # Ansys starcommand 66 | style.abaqus.10=fore:#6600DD,bold 67 | # Ansys argument 68 | style.abaqus.11=fore:#0077FF 69 | # Ansys function 70 | style.abaqus.12=fore:#0077DD 71 | 72 | command.compile.*.inp= 73 | command.build.*.inp=abaqus job=$(FileName) cpus=4 74 | command.go.*.inp= 75 | 76 | autocomplete.abaqus.ignorecase=1 77 | calltip.abaqus.ignorecase=1 78 | -------------------------------------------------------------------------------- /src/abbrev.properties: -------------------------------------------------------------------------------- 1 | # Global abbreviations file for SciTE 2 | # Place this file in your home directory, that is, the same directory 3 | # as the user options file. 4 | # Contains a list of entries of the form abbreviation=expansion 5 | # Type the abbreviation and press Ctrl+B to insert the expansion 6 | # The '|' marks the position the caret will be after expansion. 7 | 8 | #main=int main(int argc, char *argv[]) {\n|\n} 9 | #i=if (|) {\n\n} 10 | -------------------------------------------------------------------------------- /src/ada.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for Ada files. 2 | 3 | filter.ada=Ada (ads adb)|*.ads;*.adb| 4 | 5 | file.patterns.ada=*.ads;*.adb 6 | 7 | lexer.$(file.patterns.ada)=ada 8 | 9 | #indent.size.$(file.patterns.ada)=3 10 | #use.tabs.$(file.patterns.ada)=0 11 | 12 | # Keyword except of operator keywords 13 | keywordclass.ada.main=abort abstract accept access aliased all array at begin body \ 14 | case constant declare delay delta digits do else elsif end entry exception exit for \ 15 | function generic goto if in is limited loop new null of others out package pragma \ 16 | private procedure protected raise range record renames requeue return reverse \ 17 | select separate subtype tagged task terminate then type until use when while with 18 | # Keywords for operators 19 | keywordclass.ada.operators=abs and mod not or rem xor 20 | 21 | keywordclass.ada=$(keywordclass.ada.main) $(keywordclass.ada.operators) 22 | 23 | keywords.$(file.patterns.ada)=$(keywordclass.ada) 24 | 25 | # Ada styles 26 | # Default 27 | style.ada.0=fore:#808080 28 | # Keyword 29 | style.ada.1=$(colour.keyword),bold 30 | # Identifiers 31 | style.ada.2= 32 | # Number 33 | style.ada.3=$(colour.number) 34 | # Operators (delimiters) 35 | style.ada.4=$(colour.operator),bold 36 | # Character 37 | style.ada.5=$(colour.char) 38 | # End of line where character is not closed 39 | style.ada.6=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled 40 | # String 41 | style.ada.7=$(colour.string) 42 | # End of line where string is not closed 43 | style.ada.8=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled 44 | # Label 45 | style.ada.9=fore:#7F0000 46 | # Comment 47 | style.ada.10=$(colour.code.comment.line),$(font.code.comment.line) 48 | # Illegal token 49 | style.ada.11=fore:#FF0000 50 | 51 | # Comments 52 | comment.block.ada=--~ 53 | 54 | braces.ada.style=4 55 | 56 | statement.indent.$(file.patterns.ada)=5 begin declare else elsif exception for if is loop while 57 | statement.lookback.$(file.patterns.ada)=20 58 | block.start.$(file.patterns.ada)=10 then is 59 | block.end.$(file.patterns.ada)=10 end 60 | 61 | calltip.ada.word.characters=._$(chars.alpha) 62 | 63 | adagcc=gcc -c $(FileNameExt) 64 | 65 | command.compile.*.ads=$(adagcc) 66 | command.build.*.ads=gnatmake 67 | command.go.*.ads=$(FileName) 68 | 69 | command.compile.*.adb=$(adagcc) 70 | command.build.*.adb=gnatmake 71 | command.go.*.adb=$(FileName) 72 | -------------------------------------------------------------------------------- /src/asn1.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for ASN.1 MIB definition files. 2 | 3 | filter.asn1=ASN.1 (asn1)|*.mib| 4 | 5 | file.patterns.asn1=*.mib 6 | 7 | lexer.$(file.patterns.asn1)=asn1 8 | 9 | # ASN.1 styles 10 | # Default 11 | style.asn1.0=fore:#000000 12 | # Comment 13 | style.asn1.1=fore:#007F00,$(font.comment) 14 | # Identifiers 15 | style.asn1.2=fore:#000000,bold 16 | # Double quoted string 17 | style.asn1.3=fore:#7F007F 18 | # Numeric OID definition 19 | style.asn1.4=fore:#007F7F,bold 20 | # Non OID numbers 21 | style.asn1.5=fore:#7F0000 22 | # Keywords 23 | style.asn1.6=fore:#00007F 24 | # Attributes 25 | style.asn1.7=fore:#F07800 26 | # Descriptors 27 | style.asn1.8=fore:#00007F 28 | # Types 29 | style.asn1.9=fore:#00007F 30 | # Operators 31 | style.asn1.10=fore:#222222 32 | 33 | # Keywords 34 | keywords.$(file.patterns.asn1)=\ 35 | ACCESS AGENT AUGMENTS \ 36 | BEGIN BITS \ 37 | CAPABILITIES CHOICE COMPLIANCE CONTACT CONVENTION \ 38 | DEFINITIONS DEFVAL DESCRIPTION DISPLAY \ 39 | END ENTERPRISE EXPORTS \ 40 | FALSE FROM \ 41 | GROUP GROUPS \ 42 | HINT \ 43 | IDENTITY IMPLIED IMPORTS INCLUDES INDEX INFO \ 44 | LAST \ 45 | MANDATORY MAX MIN MODULE \ 46 | NOTATION NOTIFICATION NULL \ 47 | OBJECTS OBJECT-TYPE OF ORGANIZATION \ 48 | PRODUCT \ 49 | RELEASE REFERENCE REQUIRES REVISION \ 50 | SEQUENCE SIZE STATUS SUPPORTS SYNTAX \ 51 | TEXTUAL TRAP TYPE TRAP-TYPE \ 52 | UPDATED \ 53 | VALUE VARIABLES VARIATION \ 54 | WRITE 55 | 56 | # Attributes 57 | keywords2.$(file.patterns.asn1)=\ 58 | accessible \ 59 | create current \ 60 | deprecated \ 61 | for \ 62 | mandatory \ 63 | not notify not-accessible \ 64 | obsolete only optional \ 65 | read read-only read-write \ 66 | write 67 | 68 | # Descriptors 69 | keywords3.$(file.patterns.asn1)=\ 70 | ABSENT ANY APPLICATION \ 71 | BIT BOOLEAN BY \ 72 | COMPONENT COMPONENTS \ 73 | DEFAULT DEFINED \ 74 | ENUMERATED EXPLICIT EXTERNAL \ 75 | IMPLICIT INIFINITY \ 76 | MAX MIN MINUS \ 77 | OPTIONAL \ 78 | PRESENT PRIVATE \ 79 | REAL \ 80 | SET \ 81 | TAGS TRUE 82 | 83 | # Types 84 | keywords4.$(file.patterns.asn1)=\ 85 | Counter Counter32 Counter64 \ 86 | DisplayString \ 87 | Gauge Gauge32 \ 88 | IDENTIFIER INTEGER Integer32 IpAddress \ 89 | NetworkAddress NsapAddress \ 90 | OBJECT OCTET Opaque \ 91 | PhysAddress \ 92 | STRING \ 93 | TimeTicks \ 94 | UInteger32 UNITS Unsigned32 95 | 96 | -------------------------------------------------------------------------------- /src/ave.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for Avenue files. 2 | 3 | filter.ave=AVE (ave)|*.ave| 4 | 5 | 6 | file.patterns.ave=*.ave 7 | 8 | lexer.*.ave=ave 9 | lexer.$(file.patterns.ave)=ave 10 | 11 | #################################################### 12 | # import classes and requests 13 | # files ave.classes & ave.funcs is to large 14 | #import ave.classes 15 | #import ave.funcs 16 | 17 | keywords.$(file.patterns.ave)=nil true false else for if while then elseif end av self in exit 18 | #keywords2.$(file.patterns.ave)=$(keywordclass.ave) 19 | #keywords3.$(file.patterns.ave)=$(keywordfunc.ave) 20 | word.chars.ave=$(chars.alpha)$(chars.numeric)_# 21 | word.characters.$(file.patterns.ave)=$(word.chars.ave) 22 | 23 | statement.indent.$(file.patterns.ave)=1 else for if while then 24 | statement.lookback.$(file.patterns.ave)=1 end 25 | 26 | #Avenue string not support tab symbol, if You use tabs in script all tabs automatic translated to space. 27 | #use.tabs=0 28 | 29 | #################################################### 30 | #Load user-defined api for current project. 31 | #api.$(file.patterns.ave)=ave.api 32 | #################################################### 33 | 34 | comment.block.ave='-- 35 | 36 | comment.box.start.ave='-- 37 | comment.box.middle.ave='-- 38 | comment.box.end.ave='-- 39 | #Avenue is not case-sensitive lang. 40 | autocomplete.ave.ignorecase=1 41 | calltip.ave.ignorecase=1 42 | autocomplete.ave.start.characters=. 43 | calltip.ave.word.characters=.$(word.chars.ave) 44 | 45 | # AVE styles 46 | ############################################################ 47 | # Default 48 | style.ave.32=$(font.code.base),fore:#000000 49 | # White space: Visible only in View Whitespace mode (or if it has a back colour) 50 | style.ave.0=fore:#FF0000 51 | # Comment 52 | style.ave.1=$(colour.code.comment.line),$(font.code.comment.line) 53 | # Number 54 | style.ave.2=$(colour.number),bold 55 | # Keyword 56 | style.ave.3=$(colour.keyword),bold 57 | # String 58 | style.ave.6=$(colour.string) 59 | # Enumeration 60 | style.ave.7=$(colour.preproc),bold 61 | # End of line where string is not closed 62 | style.ave.8=back:#E0C0E0,eolfilled 63 | # Operators 64 | style.ave.10=$(colour.operator) 65 | # Identifier (everything else...) 66 | style.ave.9=$(font.code.base),fore:#000000 67 | # Other keywords (bozo test colors :-) 68 | style.ave.12=$(font.code.base),fore:#003355,bold 69 | style.ave.13=$(font.code.base),fore:#005533,bold 70 | style.ave.14=$(colour.keyword) 71 | style.ave.15=$(colour.keyword) 72 | style.ave.16=$(colour.keyword) 73 | # Braces are only matched in operator style 74 | braces.ave.style=10 75 | ############################################################ 76 | 77 | 78 | avenue=ave "$(FilePath)" 79 | avenueGo=avego "$(FilePath)" 80 | avenueBuild=avebuild "$(FilePath)" 81 | 82 | ################################################################ 83 | #use winhlp32 system 84 | #if ArcView installed in other directory please correct path 85 | #command.help.$(file.patterns.ave)=$(CurrentWord)!C:\ESRI\AV_GIS30\ARCVIEW\HELP\ARCVIEW 86 | #command.help.subsystem.$(file.patterns.ave)=5 87 | 88 | 89 | #~ # compile 90 | #~ command.compile.$(file.patterns.ave)=$(avenue) 91 | #~ command.go.$(file.patterns.ave)=$(avenueGo) 92 | #~ #send to arcview 93 | #~ command.name.0.*.ave=Insert into project 94 | #~ command.0.*.ave=$(avenueBuild) 95 | #~ command.subsystem.0.*.ave=1 96 | 97 | #~ command.name.1.*.ave=Variables Report 98 | #~ command.1.*.ave=VarsReport.exe "$(FilePath)" 99 | -------------------------------------------------------------------------------- /src/baan.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for Baan files. 2 | 3 | file.patterns.baan=*.bc;*.cln 4 | 5 | filter.baan=Baan (baan)|$(file.patterns.baan)| 6 | 7 | lexer.$(file.patterns.baan)=baan 8 | 9 | word.characters.$(file.patterns.baan)=$(chars.alpha)$(chars.numeric)_#.$ 10 | calltip.baan.word.characters="._0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$" 11 | autocomplete.baan.ignorecase=1 12 | calltip.baan.ignorecase=1 13 | 14 | #styling.within.preprocessor=1 15 | preprocessor.symbol.$(file.patterns.baan)=# 16 | preprocessor.start.$(file.patterns.baan)=if ifdef ifndef 17 | preprocessor.middle.$(file.patterns.baan)=else elif 18 | preprocessor.end.$(file.patterns.baan)=endif 19 | 20 | keywordclass.baan= 21 | keywords.$(file.patterns.baan)=$(keywordclass.baan) 22 | 23 | # Comment blocks for Baan 24 | comment.block.baan=| 25 | comment.box.start.baan=| 26 | comment.box.middle.baan=| 27 | comment.box.end.baan=| 28 | # Doesnot work too good for Baan use block or box commands 29 | comment.stream.start.baan=DllUsage 30 | comment.stream.end.baan=EndDllUsage 31 | 32 | 33 | # Baan styles 34 | 35 | colour.baan.operator=fore:#B06000 36 | 37 | # Default 38 | style.baan.32=$(font.monospace) 39 | # White space 40 | style.baan.0=fore:#808080,$(font.monospace) 41 | # Comment 42 | style.baan.1=$(colour.code.comment.line),$(font.monospace) 43 | # Doc comment 44 | style.baan.2=fore:#007F7F,$(font.comment) 45 | # Number 46 | style.baan.3=$(colour.number),$(font.monospace) 47 | # Keyword 48 | style.baan.4=$(colour.keyword),bold,$(font.monospace) 49 | # Double quoted string 50 | style.baan.5=$(colour.string),$(font.monospace) 51 | # Preprocessor 52 | style.baan.6=$(colour.preproc),$(font.monospace) 53 | # Operators 54 | style.baan.7=$(colour.operator),bold,$(font.monospace) 55 | # Identifiers 56 | style.baan.8=$(font.monospace) 57 | # End of line where string is not closed 58 | style.baan.9=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled 59 | # Keywords2 60 | style.baan.10=fore:#B00040,$(font.monospace) 61 | # Braces are only matched in operator style 62 | braces.baan.style=10 63 | 64 | #Indent properties 65 | statement.indent.$(file.patterns.baan)=5 after.choice after.commit.transaction after.delete \ 66 | after.display after.field \ 67 | after.form after.input after.program after.read after.rewrite \ 68 | after.group after.skip.delete after.skip.rewrite after.skip.write \ 69 | after.update.db.commit after.write after.zoom \ 70 | before.checks before.choice before.delete before.display \ 71 | before.display.object before.field before.form before.input before.layout \ 72 | before.group before.program before.read before.rewrite before.write before.zoom \ 73 | case check.input declaration default dllusage \ 74 | else elseif functions if on.input on.entry on.exit \ 75 | read.view ref.input ref.display selectdo selectempty selecteos \ 76 | when.field.changes while 77 | 78 | #Unindent properties 79 | statement.lookback.$(file.patterns.baan)=1 endif endwhile endfor endselect return -------------------------------------------------------------------------------- /src/bullant.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for Bullant files. 2 | 3 | filter.bullant=Bullant (.ant)|*.ant| 4 | 5 | file.patterns.bullant=*.ant 6 | 7 | lexer.$(file.patterns.bullant)=bullant 8 | 9 | keywordclass.bullant=abstract all ancestor and application \ 10 | assert attributes author \ 11 | begin \ 12 | callback class concrete config constants construct continue \ 13 | depends description downcast driver \ 14 | elif else ensures error exception exposure extension \ 15 | false fatal final function \ 16 | generics glyph \ 17 | help hidden host \ 18 | immutable in inherits is \ 19 | kernel \ 20 | label leave library locals \ 21 | mutable \ 22 | none not null \ 23 | obsolete options or other \ 24 | parameters peer private public \ 25 | raise reason restricted retry return \ 26 | returns rollback route \ 27 | security self settings severity step \ 28 | task test transaction true \ 29 | unknown \ 30 | varying \ 31 | warning when \ 32 | method end if until while trap case debug for foreach lock \ 33 | boolean \ 34 | character character$ \ 35 | date date$ datetime datetime$ \ 36 | float \ 37 | hex$ \ 38 | identifier identifier$ integer interval interval$ \ 39 | money money$ \ 40 | raw raw$ \ 41 | string \ 42 | tick tick$ time time$ \ 43 | version version$ 44 | 45 | 46 | keywords.$(file.patterns.bullant)=$(keywordclass.bullant) 47 | 48 | # Bullant styles 49 | # White space 50 | style.bullant.0=fore:#000000,$(font.monospace) 51 | # Comment 52 | style.bullant.1=fore:#007F00,$(font.monospace) 53 | # Line Comment 54 | style.bullant.2=fore:#007F00,$(font.monospace) 55 | # Doc comment 56 | style.bullant.3=fore:#7F7F7F 57 | # Number 58 | style.bullant.4=fore:#007F7F 59 | 60 | 61 | # Keyword 62 | style.bullant.5=fore:#00007F,bold 63 | # Double quoted string 64 | style.bullant.6=fore:#7F007F,$(font.monospace) 65 | # Single quoted string 66 | style.bullant.7=fore:#7F007F,$(font.monospace) 67 | # Symbols 68 | style.bullant.8=fore:#007F7F 69 | # Preprocessor 70 | style.bullant.9=fore:#7F7F00 71 | 72 | # compile 73 | command.compile.*.ant= 74 | 75 | # normal execute 76 | command.go.*.ant= 77 | command.go.subsystem.*.ant= 78 | 79 | #build=compile ... 80 | command.build.*.ant= 81 | command.build.subsystem.*.ant= 82 | 83 | -------------------------------------------------------------------------------- /src/css.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/src/css.properties -------------------------------------------------------------------------------- /src/eiffel.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for Eiffel files. 2 | 3 | filter.eiffel=Eiffel (e)|*.e| 4 | 5 | file.patterns.eiffel=*.e 6 | 7 | # Main Eiffel lexer dows indentation based folding 8 | lexer.$(file.patterns.eiffel)=eiffel 9 | # Alternative key word based folding has trouble with redefine and rename clauses 10 | #lexer.$(file.patterns.eiffel)=eiffelkw 11 | 12 | # These keywords are case insensitive although Eiffel has conventions for 13 | # keywords, predefined names and predefined classes: alias, Current, BOOLEAN 14 | # Could differentiate between these 15 | keywordclass.eiffel=\ 16 | alias all and any as bit boolean \ 17 | check class character clone create creation current \ 18 | debug deferred div do double \ 19 | else elseif end ensure equal expanded export external \ 20 | false feature forget from frozen general \ 21 | if implies indexing infix inherit inspect integer invariant is \ 22 | language like local loop mod name nochange none not \ 23 | obsolete old once or platform pointer prefix precursor \ 24 | real redefine rename require rescue result retry \ 25 | select separate string strip then true undefine unique until \ 26 | variant void when xor 27 | 28 | keywords.$(file.patterns.eiffel)=$(keywordclass.eiffel) 29 | 30 | # Eiffel styles 31 | # Default 32 | style.eiffel.0=fore:#808080 33 | style.eiffelkw.0=$(style.eiffel.0) 34 | # Line comment 35 | style.eiffel.1=$(colour.code.comment.line),$(font.code.comment.line) 36 | style.eiffelkw.1=$(style.eiffel.1) 37 | # Number 38 | style.eiffel.2=$(colour.number) 39 | style.eiffelkw.2=$(style.eiffel.2) 40 | # Keyword 41 | style.eiffel.3=$(colour.keyword),bold 42 | style.eiffelkw.3=$(style.eiffel.3) 43 | # String 44 | style.eiffel.4=$(colour.string),$(font.monospace) 45 | style.eiffelkw.4=$(style.eiffel.4) 46 | # Character 47 | style.eiffel.5=$(colour.char),$(font.monospace) 48 | style.eiffelkw.5=$(style.eiffel.5) 49 | # Operators 50 | style.eiffel.6=$(colour.operator),bold 51 | style.eiffelkw.6=$(style.eiffel.6) 52 | # Identifier 53 | style.eiffel.7= 54 | style.eiffelkw.7=$(style.eiffel.7) 55 | # End of line where string is not closed 56 | style.eiffel.8=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled 57 | style.eiffelkw.8=$(style.eiffel.8) 58 | # Braces are only matched in operator style 59 | braces.eiffel.style=6 60 | braces.eiffelkw.style=$(braces.eiffel.style) 61 | 62 | statement.indent.$(file.patterns.eiffel)=5 do else elsif rescue if is loop 63 | statement.end.$(file.patterns.eiffel)=10 ; 64 | statement.lookback.$(file.patterns.eiffel)=20 65 | block.start.$(file.patterns.eiffel)=10 check debug deferred do from if inspect once 66 | block.end.$(file.patterns.eiffel)=10 end 67 | 68 | command.compile.*.e=compile $(FileName) -------------------------------------------------------------------------------- /src/freebasic.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for FreeBasic files. 2 | 3 | file.patterns.freebasic=*.bas;*.bi 4 | 5 | filter.freebasic=FreeBasic (bb bi)|$(file.patterns.freebasic)| 6 | 7 | lexer.$(file.patterns.freebasic)=freebasic 8 | 9 | # keywords must be all lowercase 10 | 11 | keywordclass.freebasic=\ 12 | append as asc asin asm atan2 atn beep bin binary bit bitreset bitset bload \ 13 | bsave byref byte byval call callocate case cbyte cdbl cdecl chain chdir chr \ 14 | cint circle clear clng clngint close cls color command common cons const \ 15 | continue cos cshort csign csng csrlin cubyte cuint culngint cunsg curdir \ 16 | cushort custom cvd cvi cvl cvlongint cvs cvshort data date deallocate declare \ 17 | defbyte defdbl defined defint deflng deflngint defshort defsng defstr defubyte \ 18 | defuint defulngint defushort dim dir do double draw dylibload dylibsymbol else \ 19 | elseif end enum environ environ$ eof eqv erase err error exec exepath exit exp \ 20 | export extern field fix flip for fre freefile function get getjoystick getkey \ 21 | getmouse gosub goto hex hibyte hiword if iif imagecreate imagedestroy imp \ 22 | inkey inp input instr int integer is kill lbound lcase left len let lib line \ 23 | lobyte loc local locate lock lof log long longint loop loword lset ltrim \ 24 | mid mkd mkdir mki mkl mklongint mks mkshort mod multikey mutexcreate \ 25 | mutexdestroy mutexlock mutexunlock name next not oct on once open option or out \ 26 | output overload paint palette pascal pcopy peek peeki peeks pipe pmap point \ 27 | pointer poke pokei pokes pos preserve preset print private procptr pset ptr \ 28 | public put random randomize read reallocate redim rem reset restore resume \ 29 | resume next return rgb rgba right rmdir rnd rset rtrim run sadd screen \ 30 | screencopy screeninfo screenlock screenptr screenres screenset screensync \ 31 | screenunlock seek statement seek function selectcase setdate setenviron \ 32 | setmouse settime sgn shared shell shl short shr sin single sizeof sleep space \ 33 | spc sqr static stdcall step stop str string string strptr sub swap system tab \ 34 | tan then threadcreate threadwait time time timer to trans trim type ubound \ 35 | ubyte ucase uinteger ulongint union unlock unsigned until ushort using va_arg \ 36 | va_first va_next val val64 valint varptr view viewprint wait wend while width \ 37 | window windowtitle with write xor zstring 38 | 39 | keywordclass.preprocessor=\ 40 | #define #dynamic #else #endif #error #if #ifdef #ifndef #inclib #include \ 41 | #print #static #undef 42 | 43 | keywords.$(file.patterns.freebasic)=$(keywordclass.freebasic) 44 | keywords2.$(file.patterns.freebasic)=$(keywordclass.preprocessor) 45 | 46 | # FB styles 47 | # Default 48 | style.freebasic.0=fore:#000000 49 | # Comment 50 | style.freebasic.1=$(colour.code.comment.line),$(font.code.comment.line) 51 | # Number 52 | style.freebasic.2=$(colour.number) 53 | # Keyword1 54 | style.freebasic.3=$(colour.keyword),bold 55 | # String 56 | style.freebasic.4=$(colour.string) 57 | # Preprocessor 58 | style.freebasic.5=$(colour.preproc) 59 | # Operator 60 | style.freebasic.6=$(colour.operator) 61 | # Identifier 62 | style.freebasic.7=$(style.freebasic.0) 63 | # Date 64 | # style.freebasic.8=$(colour.error) 65 | # StringEOL 66 | # style.freebasic.9=$(colour.error) 67 | # Keyword2 68 | style.freebasic.10=$(colour.keyword) 69 | # Keyword3 70 | style.freebasic.11=$(colour.keyword) 71 | # Keyword4 72 | style.freebasic.12=$(colour.keyword) 73 | # Constant 74 | # style.freebasic.13=$(colour.error) 75 | # Asm 76 | # style.freebasic.14=$(colour.error) 77 | # Label 78 | style.freebasic.15=$(colour.preproc) 79 | # Error 80 | style.freebasic.16=$(colour.error) 81 | # HexNumber 82 | style.freebasic.17=$(colour.number) 83 | # BinNumber 84 | style.freebasic.18=$(colour.number) 85 | 86 | -------------------------------------------------------------------------------- /src/gap.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for GAP files. 2 | 3 | file.patterns.gap=*.g;*.gd;*.gi 4 | 5 | # GAP files 6 | filter.gap=Gap (g gi gd)|$(file.patterns.gap)| 7 | 8 | lexer.$(file.patterns.gap)=gap 9 | 10 | keywords.$(file.patterns.gap)=and break continue do elif else end fi for function \ 11 | if in local mod not od or quit rec repeat return then until while QUIT 12 | 13 | keywords2.$(file.patterns.gap)=false true IsBound Unbind TryNextMethod \ 14 | Info Assert SaveWorkspace fail 15 | 16 | #keywords3.$(file.patterns.gap) 17 | 18 | comment.block.gap=#~ 19 | 20 | # GAP styles 21 | # White space 22 | style.gap.0=fore:#808080 23 | # Identifiers 24 | style.gap.1= 25 | # Keywords 26 | style.gap.2=$(colour.keyword),bold 27 | # Keywords 2 28 | style.gap.3=$(colour.keyword) 29 | # Keywords 3 30 | style.gap.4=$(colour.keyword) 31 | # Keywords 4 32 | style.gap.5=$(colour.keyword) 33 | # Strings 34 | style.gap.6=$(colour.string) 35 | # Characters 36 | style.gap.7=$(colour.char) 37 | # Operators 38 | style.gap.8=$(colour.operator),bold 39 | # Comment 40 | style.gap.9=$(colour.code.comment.line) 41 | # Numbers 42 | style.gap.10=$(colour.number) 43 | # End of line where string is not closed 44 | style.gap.11=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled 45 | 46 | # Braces are only matched in operator style 47 | braces.gap.style=8 -------------------------------------------------------------------------------- /src/haskell.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for Haskell. 2 | 3 | lexer.*.hs=haskell 4 | filter.hs=Haskell (hs)|*.hs| 5 | 6 | # white space 7 | style.haskell.0=fore:#808080 8 | # identifier 9 | style.haskell.1= 10 | # keyword 11 | style.haskell.2=$(colour.keyword),bold 12 | # numbers 13 | style.haskell.3=$(colour.number) 14 | # string 15 | style.haskell.4=$(colour.string) 16 | # character 17 | style.haskell.5=$(colour.char) 18 | # module 19 | style.haskell.7= 20 | # capital 21 | style.haskell.8= 22 | # operator 23 | style.haskell.11=$(colour.operator),bold 24 | # line comment 25 | style.haskell.13=$(colour.code.comment.line),$(font.code.comment.line) 26 | # block comment 27 | style.haskell.14=$(colour.code.comment.box),$(font.code.comment.box) 28 | 29 | # keywords for Haskell 98 30 | keywordclass.haskell98=case class data default deriving do else hiding if \ 31 | import in infix infixl infixr instance let module \ 32 | newtype of then type where forall foreign 33 | 34 | # keywords for FFI 35 | keywordclass.ffi=export label dynamic safe threadsafe \ 36 | unsafe stdcall ccall prim 37 | 38 | keywords.*.hs=$(keywordclass.haskell98) 39 | 40 | keywords2.*.hs=$(keywordclass.ffi) 41 | -------------------------------------------------------------------------------- /src/kix.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for Assembler files 2 | # Black Horus blackhorus@gmx.net 3 | 4 | # Masm files 5 | file.patterns.kix=*.kix 6 | filter.kix=Kix-Script (kix)|$(file.patterns.kix)| 7 | 8 | #lexer.$(file.patterns.kix)=asm 9 | lexer.$(file.patterns.kix)=kix 10 | 11 | # These keywords are commands 12 | keywords.$(file.patterns.kix)=? and beep big break call cd cls color cookie1 copy \ 13 | debug del dim display do until exit flushkb for each next function endfunction \ 14 | get gets global go gosub goto if else endif md or password play quit \ 15 | rd redim return run select case endselect set setl setm settime \ 16 | shell sleep small use while loop 17 | 18 | # This keywords are functions 19 | keywords2.$(file.patterns.kix)=abs addkey addprinterconnection addprogramgroup \ 20 | addprogramitem asc ascan at backupeventlog box cdbl chr cint cleareventlog \ 21 | close comparefiletimes createobject cstr dectohex delkey delprinterconnection \ 22 | delprogramgroup delprogramitem deltree delvalue dir enumgroup enumipinfo enumkey \ 23 | enumlocalgroup enumvalue execute exist existkey expandenvironmentvars fix \ 24 | formatnumber freefilehandle getdiskspace getfileattr getfilesize getfiletime \ 25 | getfileversion getobject iif ingroup instr instrrev int isdeclared join \ 26 | kbhit keyexist lcase left len loadhive loadkey logevent logoff ltrim \ 27 | memorysize messagebox open readline readprofilestring readtype readvalue \ 28 | redirectoutput right rnd round rtrim savekey sendkeys sendmessage setascii \ 29 | setconsole setdefaultprinter setfileattr setfocus setoption setsystemstate \ 30 | settitle setwallpaper showprogramgroup shutdown sidtoname split srnd substr \ 31 | trim ubound ucase unloadhive val vartype vartypename writeline \ 32 | writeprofilestring writevalue 33 | 34 | # This keywords are macros if preceeded by @ 35 | keywords3.$(file.patterns.kix)=address build color comment cpu crlf csd curdir \ 36 | date day domain dos error fullname homedir homedrive homeshr hostname \ 37 | inwin ipaddress0 ipaddress1 ipaddress2 ipaddress3 kix lanroot ldomain \ 38 | ldrive lm logonmode longhomedir lserver maxpwage mdayno mhz monthno \ 39 | month msecs pid primarygroup priv productsuite producttype pwage ras \ 40 | result rserver scriptdir scriptexe scriptname serror sid site startdir \ 41 | syslang ticks time userid userlang wdayno wksta wuserid ydayno year 42 | 43 | # Comments 44 | comment.block.kix=; 45 | comment.block.at.line.start.kix=1 46 | 47 | # Kix Styles 48 | # White space 49 | style.kix.0=fore:#000000,$(font.vbs) 50 | # Comment 51 | style.kix.1=$(colour.code.comment.line),$(font.code.comment.line) 52 | # String 53 | style.kix.2=$(colour.string) 54 | style.kix.3=$(colour.string) 55 | # Number 56 | style.kix.4=$(colour.number) 57 | # Variables 58 | style.kix.5=fore:#B00040 59 | # Macro 60 | style.kix.6=$(colour.preproc) 61 | # Keyword 62 | style.kix.7=$(colour.keyword),bold 63 | # Function 64 | style.kix.8=$(colour.keyword) 65 | # Operator 66 | style.kix.9=$(colour.operator),bold 67 | 68 | # Commands 69 | command.go.*.kix=kix32 $(FileName) 70 | 71 | # Indenting 72 | tab.size.$(file.patterns.kix)=6 73 | indent.size.$(file.patterns.kix)=3 74 | use.tabs.$(file.patterns.kix)=1 75 | 76 | statement.indent.$(file.patterns.kix)=7 if else for do while function case 77 | -------------------------------------------------------------------------------- /src/latex.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for LaTeX files. 2 | 3 | file.patterns.latex=*.tex;*.sty 4 | 5 | filter.latex=LaTeX (tex sty)|$(file.patterns.latex)| 6 | 7 | lexer.$(file.patterns.latex)=latex 8 | 9 | # LaTeX styles 10 | # White space 11 | style.latex.0=fore:#000000 12 | # Command 13 | style.latex.1=fore:#AA0000,bold 14 | # Tag Opening 15 | style.latex.2=fore:#880088,bold 16 | # Math Inline 17 | style.latex.3=fore:#0000FF 18 | # Comment 19 | style.latex.4=fore:#00AA00 20 | # Tag Closing 21 | style.latex.5=fore:#880088,bold 22 | # Math Block 23 | style.latex.6=fore:#0000AA 24 | # Comment Block 25 | style.latex.7=fore:#00AA00 26 | # Verbatim Segment 27 | style.latex.8=fore:#666666 28 | # Short Command 29 | style.latex.9=fore:#AA6600,bold 30 | # Special Char 31 | style.latex.10=fore:#AAAA00 32 | # Command optional argument 33 | style.latex.11=fore:#FF9900 34 | # Syntax error 35 | style.latex.12=fore:#ffffff,back:#ff0000 36 | 37 | command.compile.*.tex=latex $(FileNameExt) 38 | command.build.*.tex=dvips -f $(FileName).dvi > $(FileName).ps 39 | command.go.*.tex=dvips $(FileName).dvi 40 | 41 | command.name.0.*.tex=View 42 | command.0.*.tex=xdvi $(FileName).dvi 43 | command.name.1.*.tex=View PS 44 | command.1.*.tex=gv $(FileName).ps 45 | -------------------------------------------------------------------------------- /src/lot.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for lot files. 2 | file.patterns.lot=*.lot 3 | 4 | filter.lot=Lot (lot)|$(file.patterns.lot)| 5 | 6 | lexer.$(file.patterns.lot)=lot 7 | 8 | word.characters.$(file.patterns.lot)=$(chars.alpha)$(chars.numeric) 9 | 10 | # LOT FileStyles 11 | # Default 12 | style.lot.0=fore:#000000 13 | # header 14 | style.lot.1=back:#00F0FF,eolfilled 15 | # break 16 | style.lot.2=back:#FFFF00,eolfilled 17 | # set 18 | style.lot.3=fore:#FFFFFF,back:#0000FF,bold,eolfilled 19 | # pass 20 | style.lot.4=back:#00FF00,eolfilled 21 | # fail 22 | style.lot.5=back:#FF0000,eolfilled,bold 23 | # abort 24 | style.lot.6=back:#0000FF,bold,eolfilled 25 | -------------------------------------------------------------------------------- /src/lout.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for Basser Lout files. 2 | # Based on Lout 3.35 [April 2007] 3 | # * to update keywords, see or diff externs.h 4 | 5 | file.patterns.lout=*.lt 6 | 7 | filter.lout=Lout (lt)|*.lt| 8 | 9 | lexer.$(file.patterns.lout)=lout 10 | 11 | # @-prefixed keywords 12 | keywords.$(file.patterns.lout)= \ 13 | @OptGall @FontDef @Family @Face @Name @Metrics @ExtraMetrics \ 14 | @Mapping @Recode @Filter @FilterIn @FilterOut @FilterErr \ 15 | @Common @Rump @Meld @Insert @OneOf @Next @Plus @Minus @Wide \ 16 | @High @HShift @VShift @BeginHeaderComponent @EndHeaderComponent \ 17 | @SetHeaderComponent @ClearHeaderComponent @OneCol @OneRow \ 18 | @HMirror @VMirror @HScale @VScale @HCover @VCover @Scale \ 19 | @KernShrink @HContract @VContract @HLimited @VLimited @HExpand \ 20 | @VExpand @StartHVSpan @StartHSpan @StartVSpan @HSpan @VSpan \ 21 | @PAdjust @HAdjust @VAdjust @Rotate @Background @IncludeGraphic \ 22 | @SysIncludeGraphic @Graphic @LinkSource @LinkDest @URLLink \ 23 | @PlainGraphic @Verbatim @RawVerbatim @Case @Yield @BackEnd \ 24 | @Char @Font @Space @YUnit @ZUnit @Break @Underline @SetColour \ 25 | @SetColor @SetUnderlineColour @SetUnderlineColor @SetTexture \ 26 | @Outline @Language @CurrLang @CurrFamily @CurrFace @CurrYUnit \ 27 | @CurrZUnit @LEnv @@A @@B @@C @@D @@E @LClos @@V @LUse @LEO \ 28 | @Open @Use @NotRevealed @Tagged @Database @SysDatabase \ 29 | @Include @SysInclude @IncludeGraphicRepeated \ 30 | @SysIncludeGraphicRepeated @PrependGraphic @SysPrependGraphic \ 31 | @Target @Null @PageLabel @Galley @ForceGalley @LInput @Split \ 32 | @Tag @Key @Optimize @Merge @Enclose @Begin @End @Moment \ 33 | @Second @Minute @Hour @Day @Month @Year @Century @WeekDay \ 34 | @YearDay @DaylightSaving @SetContext @GetContext 35 | 36 | # symbols that are keywords (excluding braces) 37 | keywords2.$(file.patterns.lout)= &&& && & ^// ^/ ^|| ^| ^& // / || | 38 | 39 | # non-@-prefixed keywords 40 | keywords3.$(file.patterns.lout)= def langdef force horizontally into \ 41 | extend import export precedence associativity left right body macro \ 42 | named compulsory following preceding foll_or_prec now 43 | 44 | comment.block.lout=#~ 45 | 46 | indent.maintain.$(file.patterns.lout)=1 47 | 48 | # Lout styles 49 | 50 | # Default 51 | style.lout.32=$(font.base) 52 | # White space 53 | style.lout.0=fore:#808080 54 | # Comment 55 | style.lout.1=$(colour.code.comment.line),$(font.code.comment.line) 56 | # Number 57 | style.lout.2=$(colour.number) 58 | # Keyword (@-prefixed keywords) 59 | style.lout.3=$(colour.keyword),bold 60 | # Keyword2 (symbol keywords) 61 | style.lout.4=$(colour.keyword),bold 62 | # Keyword3 (non-@ keywords) 63 | style.lout.5=$(colour.keyword),bold 64 | # Keyword4 (user or library symbols) 65 | style.lout.6=$(colour.keyword) 66 | # Double quoted string 67 | style.lout.7=$(colour.string) 68 | # Operators 69 | style.lout.8=$(colour.operator),bold 70 | # Identifiers 71 | style.lout.9= 72 | # End of line where string is not closed 73 | style.lout.10=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled 74 | # Braces are only matched in operator style 75 | braces.lout.style=8 76 | 77 | command.compile.$(file.patterns.lout)=lout "$(FileNameExt)" > "$(FileName).ps" 78 | command.build.$(file.patterns.lout)=make 79 | 80 | if PLAT_WIN 81 | command.go.$(file.patterns.lout)=gview "$(FileName).ps" 82 | 83 | if PLAT_GTK 84 | command.go.$(file.patterns.lout)=gview32 "$(FileName).ps" 85 | 86 | -------------------------------------------------------------------------------- /src/matlab.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for Octave and Matlab (see below) files. 2 | 3 | # set the default lexer for .m files 4 | DEFAULT_M_LEXER_OCTAVE=1 5 | DEFAULT_M_LEXER_MATLAB=0 6 | 7 | #----------------------------------------------------------------------- 8 | # Octave 9 | #----------------------------------------------------------------------- 10 | 11 | # M: Octave M-Files (we nee .m.octave for distinguishing it from matlab) 12 | file.patterns.octave=*.m.octave 13 | #~ if DEFAULT_M_LEXER_OCTAVE 14 | #~ file.patterns.octave=*.m;$(file.patterns.octave) 15 | file.patterns.matlab=*.m;*.m.octave 16 | 17 | # M: Octave M-Files 18 | filter.octave=Octave (m)|$(file.patterns.octave)| 19 | 20 | lexer.$(file.patterns.octave)=octave 21 | 22 | keywordclass.octave=\ 23 | break \ 24 | case \ 25 | catch \ 26 | continue \ 27 | do \ 28 | else \ 29 | elseif \ 30 | end \ 31 | end_unwind_protect \ 32 | endfor \ 33 | endif \ 34 | endswitch \ 35 | endwhile \ 36 | for \ 37 | function endfunction \ 38 | global \ 39 | if \ 40 | otherwise \ 41 | persistent \ 42 | return \ 43 | switch \ 44 | try \ 45 | until \ 46 | unwind_protect \ 47 | unwind_protect_cleanup \ 48 | while 49 | 50 | keywords.$(file.patterns.octave)=$(keywordclass.octave) 51 | 52 | comment.block.octave=# 53 | 54 | # Octave styles 55 | # White space 56 | style.octave.0=fore:#000000 57 | # Comment 58 | style.octave.1=$(colour.code.comment.line),$(font.code.comment.line) 59 | # Command 60 | style.octave.2=$(colour.preproc) 61 | # Number 62 | style.octave.3=$(colour.number) 63 | # Keyword 64 | style.octave.4=$(colour.keyword),bold 65 | # String (5: single quoted, 8: double quoted) 66 | style.octave.5=$(colour.string) 67 | style.octave.8=$(colour.string) 68 | # Operator 69 | style.octave.6=$(colour.operator),bold 70 | # Identifier 71 | style.octave.7= 72 | 73 | #----------------------------------------------------------------------- 74 | # Matlab 75 | #----------------------------------------------------------------------- 76 | 77 | # M: Matlab M-Files (we need .m.matlab to distinguish it from octave) 78 | file.patterns.matlab=*.m.matlab 79 | #~ if DEFAULT_M_LEXER_MATLAB 80 | #~ file.patterns.matlab=*.m;$(file.patterns.matlab) 81 | # M: Matlab M-Files 82 | filter.matlab=Matlab (m)|$(file.patterns.matlab)| 83 | 84 | lexer.$(file.patterns.matlab)=matlab 85 | 86 | keywordclass.matlab=break case catch continue else elseif end for function \ 87 | global if otherwise persistent return switch try while 88 | 89 | keywords.$(file.patterns.matlab)=$(keywordclass.matlab) 90 | 91 | comment.block.matlab=%~ 92 | 93 | # Matlab styles 94 | # White space 95 | style.matlab.0=fore:#000000 96 | # Comment 97 | style.matlab.1=$(colour.code.comment.line),$(font.code.comment.line) 98 | # Command 99 | style.matlab.2=$(colour.preproc) 100 | # Number 101 | style.matlab.3=$(colour.number) 102 | # Keyword 103 | style.matlab.4=$(colour.keyword),bold 104 | # String (5=single quoted, 8=double quoted) 105 | style.matlab.5=$(colour.string) 106 | style.matlab.8=$(colour.string) 107 | # Operator 108 | style.matlab.6=$(colour.operator),bold 109 | # Identifier 110 | style.matlab.7= 111 | 112 | -------------------------------------------------------------------------------- /src/mmixal.properties: -------------------------------------------------------------------------------- 1 | 2 | # Define SciTE settings for MMIXAL files. 3 | 4 | file.patterns.mmixal=*.mms 5 | filter.mmixal=MMIXAL (mms)|$(file.patterns.mmixal)| 6 | 7 | lexer.$(file.patterns.mmixal)=mmixal 8 | 9 | opcodes=2ADDU 4ADDU 8ADDU 16ADDU ADD ADDU AND ANDNH ANDNL ANDNMH ANDNML \ 10 | BDIF BEV BN BNN BNP BNZ BOD BP BSPEC BYTE BZ CMP CMPU CSEV CSN CSNN CSNP CSNZ CSOD CSP CSWAP CSZ \ 11 | DIV DIVU ESPEC EXPR FADD FCMP FCMPE FDIV FEQL FEQLE FIX FIXU FLOT FLOTU FMUL FREM FSQRT FSUB FUN FUNE \ 12 | GET GETA GO GREG I_BIT INCH INCL INCMH INCML IS JMP LDA LDB LDBU LDHT LDO LDOU LDSF LDT LDTU LDUNC LDVTS LDW LDWU LOC LOCAL \ 13 | MOR MUL MULU MUX MXOR NAND NEG NEGU NNIX NOR NXOR O_BIT OCTA ODIF OR ORH ORL ORMH ORML ORN \ 14 | PBEV PBN PBNN PBNP PBNZ PBOD PBP PBZ POP PREFIX PREGO PRELD PREST PUSHGO PUSHJ PUT \ 15 | RESUME SAVE SET SETH SETL SETMH SETML SFLOT SFLOTU SL SLU SR SRU \ 16 | STB STBU STCO STHT STO STOU STSF STT STTU STUNC STW STWU SUB SUBU SWYM SYNC SYNCD TDIF TETRA TRAP TRIP UNSAVE \ 17 | WDIF WYDEXOR ZSEV ZSN ZSNN ZSNP ZSNZ ZSOD ZSP ZSZ 18 | 19 | special_register=rA rB rC rD rE rF rG rH rI rJ rK rL rM rN rO rP rQ rR rS rT rU rV rW rX rY rZ rBB rTT rWW rXX rYY rZZ 20 | 21 | predef_symbols=@ Text_Segment Data_Segment Pool_Segment Stack_Segment \ 22 | StdErr StdIn StdOut \ 23 | Fopen Fclose Fread Fwrite Fgets Fputs Fgetws Fputws Ftell Fseek \ 24 | TextRead TextWrite BinaryRead BinaryWrite BinaryReadWrite 25 | 26 | keywords.$(file.patterns.mmixal)=$(opcodes) 27 | keywords2.$(file.patterns.mmixal)=$(special_register) 28 | keywords3.$(file.patterns.mmixal)=$(predef_symbols) 29 | 30 | # Divsion of leading whitespace in line 31 | style.mmixal.0= 32 | # Comment 33 | style.mmixal.1=$(colour.code.comment.line),$(font.code.comment.line) 34 | # Label 35 | style.mmixal.2=$(font.base) 36 | # Opcode (not validated) 37 | style.mmixal.3= 38 | # Division between Label and Opcode 39 | style.mmixal.4= 40 | # Valid Opcode (as defined in opcodes above) 41 | style.mmixal.5=$(colour.keyword),bold 42 | # Unknown Opcode 43 | style.mmixal.6=$(colour.error) 44 | # Division between Opcode and Operands 45 | style.mmixal.7= 46 | # Division of Operands 47 | style.mmixal.8= 48 | # Number 49 | style.mmixal.9=$(colour.number) 50 | # Reference (to a Label) 51 | style.mmixal.10=$(font.base) 52 | # Char 53 | style.mmixal.11=$(colour.char) 54 | # String 55 | style.mmixal.12=$(colour.string) 56 | # Register (also special_register as defined above) 57 | style.mmixal.13=fore:#7F007F 58 | # Hexadecimal Number 59 | style.mmixal.14=fore:#7F0000 60 | # Operator 61 | style.mmixal.15=bold 62 | # Symbol (as defined in predef_symbols above) 63 | style.mmixal.16=fore:#FF7777 64 | # Include for those who use the preprocessor mmixali written by R. Loos. 65 | # Comment otherwise. 66 | #~ style.mmixal.17=$(colour.preproc) 67 | style.mmixal.17=$(colour.code.comment.line),$(font.code.comment.line) 68 | 69 | comment.block.mmixal=% 70 | 71 | tab.size.$(file.patterns.mmixal)=16 72 | indent.size.$(file.patterns.mmixal)=16 73 | 74 | command.compile.$(file.patterns.mmixal)=mmixal -l $(FileName).map -b 200 $(FilePath) 75 | command.go.$(file.patterns.mmixal)=mmix $(1) $(FileName).mmo 76 | #~ mmotype 77 | command.name.2.$(file.patterns.mmixal)=mmotype 78 | command.2.$(file.patterns.mmixal)=mmotype $(FileName).mmo $(FileName).out 79 | -------------------------------------------------------------------------------- /src/modula3.properties: -------------------------------------------------------------------------------- 1 | # 2 | # -*- coding: utf-8 -*- 3 | # File : modula3.properties 4 | # Author : Dariusz Knociński 5 | # Date : 2010/11/07 - 2010/12/11 6 | # Notes : Define SciTE settings for Modula-3. 7 | # 8 | 9 | file.patterns.m3=*.m3;*.mg;*.i3;*.ig 10 | 11 | filter.modula3=Modula-3 (m3 i3 mg ig)|$(file.patterns.m3)| 12 | lexer.$(file.patterns.m3)=modula 13 | 14 | # Keywords 15 | # 16 | keywords.$(file.patterns.m3)=AND ANY ARRAY AS BEGIN BITS BRANDED BY CASE CONST\ 17 | DIV DO ELSE ELSIF END EVAL EXCEPT EXCEPTION EXIT EXPORTS FINALLY FOR FROM\ 18 | GENERIC IF IMPORT IN INTERFACE LOCK LOOP METHODS MOD MODULE NOT OBJECT OF\ 19 | OR OVERRIDES PROCEDURE RAISE RAISES READONLY RECORD REF REPEAT RETURN\ 20 | REVEAL ROOT SET THEN TO TRY TYPE TYPECASE UNSAFE UNTIL UNTRACED VALUE VAR\ 21 | WHILE WITH 22 | 23 | # Reserved identifiers 24 | # 25 | keywords2.$(file.patterns.m3)=ABS ADDRESS ADR ADRSIZE BITSIZE BOOLEAN BYTESIZE\ 26 | CARDINAL CEILING CHAR DEC DISPOSE EXTENDED FALSE FIRST FLOAT FLOOR INC\ 27 | INTEGER ISTYPE LAST LONGINT LONGREAL LOOPHOLE MAX MIN MUTEX NARROW NEW NIL\ 28 | NULL NUMBER ORD REAL REFANY ROUND SUBARRAY TEXT TRUE TRUNC TYPECODE VAL\ 29 | WIDECHAR 30 | 31 | # Operators 32 | # 33 | keywords3.$(file.patterns.m3)= + < # = ; .. : - > { } | := <: * <= ( ) ^ , =>\ 34 | / >= [ ] . & 35 | 36 | # Pragmas keywords 37 | # 38 | keywords4.$(file.patterns.m3)= EXTERNAL INLINE ASSERT TRACE FATAL UNUSED\ 39 | OBSOLETE NOWARN LINE PRAGMA 40 | 41 | # Escape sequences 42 | # 43 | keywords5.$(file.patterns.m3)= f n r t \ " ' 44 | 45 | # Doxygene keywords 46 | # 47 | keywords6.$(file.patterns.m3)= author authors file brief date proc param result 48 | 49 | # Default fonts 50 | # 51 | #font.module.base=!Monaco # The best font for programmers, in my opinion of course :) 52 | font.module.base=$(font.base) 53 | font.modula.code=font:$(font.module.base),size:10 54 | font.modula.comment=font:$(font.module.base),size:10,italics 55 | font.modula.doxykey=font:$(font.module.base),size:10,bold,italics 56 | font.modula.keywords=font:$(font.module.base),size:10,bold 57 | font.modula.reserved=font:$(font.module.base),size:10 58 | font.modula.strings=font:$(font.module.base),size:10,italics 59 | font.modula.strspec=font:$(font.module.base),size:10,bold,italics 60 | font.modula.char=font:$(font.module.base),size:10,italics 61 | font.modula.charspec=font:$(font.module.base),size:10,bold,italics 62 | font.modula.badstr=font:$(font.module.base),size:10,bold 63 | 64 | # Default 65 | # 66 | style.modula.0=fore:#383838,$(font.modula.code) 67 | 68 | # Comments 69 | # 70 | style.modula.1=fore:#008000,$(font.modula.comment) 71 | 72 | # Doxygen comments 73 | # 74 | style.modula.2=fore:#3F5FBF,$(font.modula.comment) 75 | 76 | # Doxygene keywords 77 | # 78 | style.modula.3=fore:#3F5FBF,$(font.modula.doxykey) 79 | 80 | # Keywords 81 | # 82 | style.modula.4=fore:#000080,$(font.modula.keywords) 83 | 84 | # Reserved words 85 | # 86 | style.modula.5=fore:#0000C0,$(font.modula.reserved) 87 | 88 | # Numbers 89 | # 90 | style.modula.6=fore:#006600,$(font.modula.code) 91 | 92 | # Based numbers / #{#}_#{#} base 2-16 93 | # 94 | style.modula.7=fore:#3F0066,$(font.modula.code) 95 | 96 | # Float numbers / #{#}.#{#}Exp 97 | # 98 | style.modula.8=fore:#006665,$(font.modula.code) 99 | 100 | # Strings 101 | # 102 | style.modula.9=fore:#FE9800,$(font.modula.strings) 103 | 104 | # Strings special (escape sequences) 105 | # 106 | style.modula.10=fore:#E38800,$(font.modula.strspec) 107 | 108 | # Char 109 | # 110 | style.modula.11=fore:#FE9800,$(font.modula.char) 111 | 112 | # Char special (escape sequences and octal numbers) 113 | # 114 | style.modula.12=fore:#E38800,$(font.modula.charspec) 115 | 116 | # Procedures 117 | # 118 | style.modula.13=fore:#BF00B0,$(font.modula.code) 119 | 120 | # Pragmas 121 | # 122 | style.modula.14=fore:#BF00B0,$(font.modula.code) 123 | 124 | # Pragmas keywords 125 | # 126 | style.modula.15=fore:#BF00B0,$(font.modula.keywords) 127 | 128 | # Operators 129 | # 130 | style.modula.16=fore:#000080,$(font.modula.code) 131 | 132 | # Bad strings 133 | # 134 | style.modula.17=fore:#FF0000,$(font.modula.badstr) 135 | 136 | # 137 | # EOF 138 | # 139 | -------------------------------------------------------------------------------- /src/nimrod.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for Nimrod files. 2 | 3 | file.patterns.nimrod=*.nim 4 | 5 | shbang.nimrod=nim 6 | 7 | filter.nimrod=Nimrod (nim)|$(file.patterns.nimrod)| 8 | 9 | lexer.$(file.patterns.nimrod)=nimrod 10 | 11 | keywordclass.nimrod=addr and as asm \ 12 | block break \ 13 | case cast const continue converter \ 14 | discard div \ 15 | elif else end enum except exception \ 16 | finally for from generic \ 17 | if implies import in include is isnot iterator \ 18 | lambda \ 19 | macro method mod \ 20 | nil not notin \ 21 | object of or out \ 22 | proc ptr \ 23 | raise ref return \ 24 | shl shr \ 25 | template try tuple type \ 26 | var \ 27 | when where while with without \ 28 | xor \ 29 | yield 30 | 31 | keywords.$(file.patterns.nimrod)=$(keywordclass.nimrod) 32 | 33 | #~ statement.indent.$(file.patterns.nimrod)=10 : 34 | statement.indent.$(file.patterns.nimrod)=5 elif else except finally of \ 35 | for if try while 36 | 37 | statement.lookback.$(file.patterns.nimrod)=0 38 | block.start.$(file.patterns.nimrod)= 39 | block.end.$(file.patterns.nimrod)= 40 | 41 | view.indentation.examine.*.nim=2 42 | 43 | #fold.quotes.nimrod=1 44 | 45 | comment.block.nimrod=#~ 46 | 47 | # nimrod styles 48 | # White space 49 | style.nimrod.0=fore:#808080 50 | # Comment 51 | style.nimrod.1=fore:#007F00,$(font.comment) 52 | # Number 53 | style.nimrod.2=fore:#007F7F 54 | # String 55 | style.nimrod.3=fore:#7F007F,$(font.monospace) 56 | # Single quoted string 57 | style.nimrod.4=fore:#7F007F,$(font.monospace) 58 | # Keyword 59 | style.nimrod.5=fore:#00007F,bold 60 | # Triple quotes 61 | style.nimrod.6=fore:#7F0000 62 | # Triple double quotes 63 | style.nimrod.7=fore:#7F0000 64 | # Class name definition 65 | style.nimrod.8=fore:#0000FF,bold 66 | # Function or method name definition 67 | style.nimrod.9=fore:#007F7F,bold 68 | # Operators 69 | style.nimrod.10=bold 70 | # Identifiers 71 | style.nimrod.11= 72 | # Comment-blocks 73 | style.nimrod.12=fore:#7F7F7F 74 | # End of line where string is not closed 75 | style.nimrod.13=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled 76 | # Highlighted identifiers 77 | style.nimrod.14=fore:#407090 78 | # Decorators 79 | style.nimrod.15=fore:#805000 80 | # Matched Operators 81 | style.nimrod.34=fore:#0000FF,bold 82 | style.nimrod.35=fore:#FF0000,bold 83 | # Braces are only matched in operator style 84 | braces.nimrod.style=10 85 | 86 | if PLAT_WIN 87 | command.go.*.nim=nimrod c -r "$(FileNameExt)" 88 | command.go.subsystem.*.nim=1 89 | 90 | if PLAT_GTK 91 | command.go.*.nim=nimrod c -r "$(FileNameExt)" 92 | 93 | command.name.1.*.nim=Syntax Check 94 | command.1.*.nim=nimrod check $(FilePath) 95 | 96 | # compile 97 | command.compile.*.nim=nimrod c "$(FilePath)" 98 | 99 | # build 100 | command.build.*.nim=nimrod --forcebuild "$(FilePath)" 101 | command.build.subsystem.*.nim=1 102 | 103 | 104 | -------------------------------------------------------------------------------- /src/opal.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for Opal files. 2 | 3 | filter.opal=OPAL (impl sign)|*.impl;*.sign| 4 | 5 | file.patterns.opal=*.impl;*.sign 6 | lexer.$(file.patterns.opal)=opal 7 | 8 | keywordclass.opal_keywords=ALL AND ANDIF ANY AS ASSERT AXM COMPLETELY DATA DEF DERIVE \ 9 | DFD DISCRIMINATORS ELSE EX EXTERNAL FI FIX FUN IF IMPLEMENTATION IMPLIES IMPORT \ 10 | IN INHERIT INJECTIONS INTERFACE INTERNAL LAW LAZY LEFTASSOC LET MODULE NOT ONLY \ 11 | OR ORIF OTHERWISE POST PRE PRED PRIORITY PROPERTIES REALIZES REQUIRE RIGHTASSOC \ 12 | SELECTORS SIGNATURE SORT SPC SPEC SPECIFICATION STRUCTURE THE THEN THEORY THM \ 13 | TYPE UNIQ WHERE 14 | 15 | keywordclass.opal_sorts=aEntry agent align anchor ans arg arg1 arg2 array \ 16 | arrowWhere bag bitmap bool bstree byte callback canvasEditor capStyle channel \ 17 | char childstat codom codomFrom codomTo color colorModel com composeOp config \ 18 | configCom cursor dArray data data1 data11 data2 data21 data3 data31 data4 \ 19 | data41 dataFrom dataTo defaultPrio denotation device dist distOut dom domFrom \ 20 | domTo drawing dyn emitter env event eventInfo file filemode filestat filetype \ 21 | first first1 first2 first3 fission fmt font from from1 from2 funct group groupid \ 22 | heap iconfig image in inData index inode input int inter interdom interpreter \ 23 | iseq items joinStyle justifyHow long manager managerRequest map mapEntry mark \ 24 | mid modifier nat natMap OBJECT option orient out outData output packOp pair \ 25 | parser permission point positionRequest process procstat quad range real \ 26 | regulator rel relief res res1 res2 result role sap script scroller scrollView \ 27 | scrollWindow searchOpt second seekMode selector semaphor seq seqEntry set \ 28 | setEntry short sigaction sighandler sigmask signal size sizeRequest some \ 29 | sreal state stateId stateRequest string subrel tag textEditor time to tree \ 30 | triple union user userid version view void wconfig wconfigCom wday widget \ 31 | window wrapStyle 32 | 33 | keywords.$(file.patterns.opal)=$(keywordclass.opal_keywords) 34 | keywords2.$(file.patterns.opal)=$(keywordclass.opal_sorts) 35 | 36 | 37 | # Opal styles 38 | # White space 39 | style.opal.0=fore:#000000,$(font.opal) 40 | # Comment block 41 | style.opal.1=fore:#007F00,italics,$(font.comment) 42 | # Comment line 43 | style.opal.2=fore:#007F00,italics,$(font.comment) 44 | # Integer 45 | style.opal.3=fore:#007F7F 46 | # Keyword 47 | style.opal.4=fore:#00007F,bold 48 | # Sort 49 | style.opal.5=fore:#007F7F 50 | # Double quoted string 51 | style.opal.6=fore:#7F007F,italics,$(font.comment) 52 | # Brace normal 53 | style.opal.7=fore:#000000 54 | # Bool const 55 | style.opal.8=fore:#A00000 56 | 57 | # Default/Identifiers 58 | style.opal.32=fore:#000000 59 | # Brace highlight 60 | style.opal.34=fore:#FF0000,back:#FFFF00,bold 61 | # Brace incomplete highlight 62 | style.opal.35=fore:#FF0000,back:#00FF00,bold 63 | -------------------------------------------------------------------------------- /src/powerpro.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for powerpro files. 2 | file.patterns.powerpro=*.powerpro 3 | 4 | filter.powerpro=PowerPro (powerpro)|$(file.patterns.powerpro)| 5 | lexer.$(file.patterns.powerpro)=powerpro 6 | 7 | keywordclass.control=\ 8 | break do else elseif endfor endif for function global gt if ifelse \ 9 | ifx jump local lt quit static 10 | 11 | keywords.$(file.patterns.powerpro)=$(keywordclass.control) 12 | 13 | keywordclass.plugins=\ 14 | win.debug win.debugshow win.exists win.getdisplayrect win.getfocus win.gethandle win.getrect \ 15 | win.getsystemmetrics win.gettext win.maximize win.minimize win.move win.sendkeys win.setdebug \ 16 | win.setfocus win.setrect win.settext win.show 17 | 18 | keywordclass.functions=\ 19 | bar case clip env exec fill flag floattostring format formattime ftos \ 20 | index input inputcancel inputdefault inputdialog join length messagebox mouse \ 21 | not note readline remove replace replacechars replaceg revindex select \ 22 | stof validpath visiblewindow wait wait.activity wait.for wait.forinterval wait.message \ 23 | wait.quit wait.ready wait.sleep wait.until wallpaper window window word 24 | 25 | keywords2.$(file.patterns.powerpro)=$(keywordclass.plugins)|$(keywordclass.functions) 26 | 27 | calltip.powerpro.word.characters=$(chars.alpha)$(chars.numeric)_ 28 | comment.block.powerpro=//~ 29 | comment.stream.start.powerpro=/* 30 | comment.stream.end.powerpro=*/ 31 | comment.box.start.powerpro=/* 32 | comment.box.middle.powerpro= * 33 | comment.box.end.powerpro= */ 34 | 35 | # Autocomplete and call tip settings 36 | #api.*.powerpro=$(SciteDefaultHome)\api\powerpro.api 37 | word.characters.*.powerpro=$(chars.alpha)$(chars.numeric)@$_ 38 | 39 | # Default 40 | style.powerpro.32=$(font.base) 41 | # Default text color 42 | style.powerpro.0=#fore:$(font.base) 43 | # Comment: /* */ 44 | style.powerpro.1=$(colour.code.comment.box),$(font.code.comment.box) 45 | # Line Comment: // ;; ; 46 | style.powerpro.2=$(colour.code.comment.line),$(font.code.comment.line) 47 | # Number 48 | style.powerpro.3=$(colour.number) 49 | # Keywords1 50 | #style.powerpro.4=$(colour.keyword),bold 51 | style.powerpro.4=fore:#0000FF 52 | # Keywords2 53 | style.powerpro.5=fore:#B00040 54 | # Keywords3 55 | style.powerpro.6=fore:#0000FF 56 | # Keywords4 57 | style.powerpro.7=fore:#0000FF 58 | # Double quoted string 59 | style.powerpro.8=$(colour.string) 60 | # Single quoted string 61 | style.powerpro.9=$(colour.char) 62 | # Line continuation 63 | style.powerpro.10=$(colour.preproc) 64 | # Operators 65 | style.powerpro.11=$(colour.operator),bold 66 | # Braces are only matched in operator style 67 | braces.powerpro.style=11 68 | # Identifiers 69 | style.powerpro.12=#0000FF 70 | # End of line where string is not closed 71 | style.powerpro.13=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled 72 | # Verbatim strings 73 | style.powerpro.14=$(colour.char) 74 | #alternate quote style (#) 75 | style.powerpro.15=$(colour.string) 76 | #function style 77 | style.powerpro.16=fore:#B00040,bold 78 | 79 | 80 | command.go.$(file.patterns.powerpro)="$(FilePath)" 81 | command.go.subsystem.$(file.patterns.powerpro)=2 82 | 83 | command.help.$(file.patterns.powerpro)=$(CurrentWord)!C:\Program Files\PowerPro\powerpro.chm 84 | command.help.subsystem.$(file.patterns.powerpro)=4 85 | -------------------------------------------------------------------------------- /src/purebasic.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for PureBasic files. 2 | 3 | file.patterns.purebasic=*.pb 4 | 5 | filter.purebasic=PureBasic (pb)|$(file.patterns.purebasic)| 6 | 7 | lexer.$(file.patterns.purebasic)=purebasic 8 | 9 | # keywords must be all lowercase 10 | 11 | #Language 12 | keywords.$(file.patterns.purebasic)=and break case continue data \ 13 | datasection declare declarecdll declaredll default deftype dim else \ 14 | elseif end enddatasection endenumeration endif endinterface endprocedure \ 15 | endselect endstructure endstructureunion enumeration extends fakereturn \ 16 | for foreach forever global gosub goto if includebinary includefile \ 17 | includepath interface newlist next or procedure procedurecdll \ 18 | proceduredll procedurereturn protected read repeat restore return select \ 19 | shared static step structure structureunion to until wend while xincludefile 20 | 21 | #preprocessor 22 | keywords2.$(file.patterns.purebasic)=compilercase compilerdefault \ 23 | compilerelse compilerendif compilerendselect compilerif compilerselect 24 | 25 | # PB styles 26 | # Default 27 | style.purebasic.0=fore:#000000 28 | # Comment 29 | style.purebasic.1=$(colour.code.comment.line),$(font.code.comment.line) 30 | # Number 31 | style.purebasic.2=$(colour.number) 32 | # Keyword1 33 | style.purebasic.3=$(colour.keyword) 34 | # String 35 | style.purebasic.4=$(colour.string) 36 | # Preprocessor 37 | # style.purebasic.5=$(colour.error) 38 | # Operator 39 | style.purebasic.6=$(colour.operator) 40 | # Identifier 41 | style.purebasic.7=$(style.purebasic.0) 42 | # Date 43 | # style.purebasic.8=$(colour.error) 44 | # StringEOL 45 | # style.purebasic.9=$(colour.error) 46 | # Keyword2 47 | style.purebasic.10=$(colour.preproc) 48 | # Keyword3 49 | style.purebasic.11=$(colour.keyword) 50 | # Keyword4 51 | style.purebasic.12=$(colour.keyword) 52 | # Constant 53 | style.purebasic.13=$(colour.number) 54 | # Asm 55 | # style.purebasic.14=$(colour.error) 56 | # Label 57 | style.purebasic.15=$(colour.preproc) 58 | # Error 59 | style.purebasic.16=$(colour.error) 60 | # HexNumber 61 | style.purebasic.17=$(colour.number) 62 | # BinNumber 63 | style.purebasic.18=$(colour.number) 64 | 65 | -------------------------------------------------------------------------------- /src/python.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for Python files. 2 | 3 | file.patterns.py=*.py;*.pyw 4 | file.patterns.scons=SConstruct;SConscript 5 | 6 | shbang.python=py 7 | 8 | filter.python=Python (py pyw)|$(file.patterns.py)| 9 | 10 | lexer.$(file.patterns.py)=python 11 | lexer.$(file.patterns.scons)=python 12 | 13 | keywordclass.python2=and as assert break class continue def del elif \ 14 | else except exec finally for from global if import in is lambda not \ 15 | or pass print raise return try while with yield 16 | 17 | keywordclass.python3=False None True and as assert break class continue \ 18 | def del elif else except finally for from global if import in is lambda \ 19 | nonlocal not or pass raise return try while with yield 20 | 21 | keywordclass.python=$(keywordclass.python2) 22 | 23 | # Extra keywords for cython 24 | keywordclass.cython=cdef cimport cpdef 25 | 26 | keywords.$(file.patterns.py)=$(keywordclass.python) $(keywordclass.cython) 27 | keywords.$(file.patterns.scons)=$(keywordclass.python) 28 | 29 | # If you uncomment the 3 lines below, 30 | # and put some words after "keywordclass2.python=", 31 | # those words will be styled by style.python.14 32 | 33 | #keywordclass2.python= 34 | #keywords2.$(file.patterns.py)=$(keywordclass2.python) 35 | #keywords2.$(file.patterns.scons)=$(keywordclass2.python) 36 | 37 | #~ statement.indent.$(file.patterns.py)=10 : 38 | statement.indent.$(file.patterns.py)=5 class def elif else except finally \ 39 | for if try while with 40 | 41 | statement.lookback.$(file.patterns.py)=0 42 | block.start.$(file.patterns.py)= 43 | block.end.$(file.patterns.py)= 44 | 45 | view.indentation.examine.*.py=2 46 | 47 | tab.timmy.whinge.level=1 48 | 49 | #fold.quotes.python=1 50 | 51 | comment.block.python=#~ 52 | 53 | indent.python.colon=1 54 | 55 | # Python styles 56 | # White space 57 | style.python.0=fore:#808080 58 | # Comment 59 | style.python.1=fore:#007F00,$(font.comment) 60 | # Number 61 | style.python.2=fore:#007F7F 62 | # String 63 | style.python.3=fore:#7F007F,$(font.monospace) 64 | # Single quoted string 65 | style.python.4=fore:#7F007F,$(font.monospace) 66 | # Keyword 67 | style.python.5=fore:#00007F,bold 68 | # Triple quotes 69 | style.python.6=fore:#7F0000 70 | # Triple double quotes 71 | style.python.7=fore:#7F0000 72 | # Class name definition 73 | style.python.8=fore:#0000FF,bold 74 | # Function or method name definition 75 | style.python.9=fore:#007F7F,bold 76 | # Operators 77 | style.python.10=bold 78 | # Identifiers 79 | style.python.11= 80 | # Comment-blocks 81 | style.python.12=fore:#7F7F7F 82 | # End of line where string is not closed 83 | style.python.13=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled 84 | # Highlighted identifiers 85 | style.python.14=fore:#407090 86 | # Decorators 87 | style.python.15=fore:#805000 88 | # Matched Operators 89 | style.python.34=fore:#0000FF,bold 90 | style.python.35=fore:#FF0000,bold 91 | # Braces are only matched in operator style 92 | braces.python.style=10 93 | 94 | if PLAT_WIN 95 | command.go.*.py=pythonw -u "$(FileNameExt)" 96 | command.go.subsystem.*.py=1 97 | command.go.*.pyw=pythonw -u "$(FileNameExt)" 98 | command.go.subsystem.*.pyw=1 99 | command.build.SConscript=scons.bat --up . 100 | command.build.SConstruct=scons.bat . 101 | 102 | if PLAT_GTK 103 | command.go.*.py=python -u "$(FileNameExt)" 104 | command.build.SConscript=scons --up . 105 | command.build.SConstruct=scons . 106 | 107 | if PLAT_MAC 108 | command.go.*.py=python -u "$(FileNameExt)" 109 | command.build.SConscript=scons --up . 110 | command.build.SConstruct=scons . 111 | 112 | command.name.1.*.py=Syntax Check 113 | command.1.*.py=python -c "import py_compile; py_compile.compile(r'$(FilePath)')" 114 | -------------------------------------------------------------------------------- /src/rebol.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/src/rebol.properties -------------------------------------------------------------------------------- /src/ruby.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for Ruby files. 2 | 3 | file.patterns.rb=*.rb;*.rbw;*.rake;*.rjs;Rakefile 4 | 5 | shbang.ruby=rb 6 | 7 | filter.ruby=Ruby (rb rbw)|$(file.patterns.rb)| 8 | 9 | lexer.$(file.patterns.rb)=ruby 10 | 11 | keywordclass.ruby=__FILE__ and def end in or self unless __LINE__ begin \ 12 | defined? ensure module redo super until BEGIN break do false next rescue \ 13 | then when END case else for nil retry true while alias class elsif if \ 14 | not return undef yield 15 | keywords.$(file.patterns.rb)=$(keywordclass.ruby) 16 | 17 | statement.indent.$(file.patterns.rb)=5 def class if do elsif else case while for 18 | 19 | block.start.$(file.patterns.rb)=5 do 20 | block.end.$(file.patterns.rb)=5 end 21 | 22 | indent.opening.$(file.patterns.rb)=1 23 | indent.closing.$(file.patterns.rb)=1 24 | 25 | comment.block.ruby=#~ 26 | 27 | # ruby styles 28 | # White space 29 | style.ruby.0=fore:#808080 30 | # Error 31 | style.ruby.1=back:#FF0000 32 | # Comment line 33 | style.ruby.2=fore:#007F00,$(font.comment) 34 | # POD 35 | style.ruby.3=fore:#004000,back:#C0FFC0,$(font.monospace),eolfilled 36 | # Number 37 | style.ruby.4=fore:#007F7F 38 | # Word 39 | style.ruby.5=fore:#00007F,bold 40 | # String 41 | style.ruby.6=fore:#7F007F,$(font.monospace) 42 | # Character 43 | style.ruby.7=fore:#7F007F,$(font.monospace) 44 | # Class name 45 | style.ruby.8=fore:#0000FF,bold 46 | # Def name 47 | style.ruby.9=fore:#007F7F,bold 48 | # Operator 49 | style.ruby.10=bold 50 | # Identifier 51 | style.ruby.11= 52 | # Regex 53 | style.ruby.12=fore:#000000,back:#A0FFA0 54 | # Global 55 | style.ruby.13=fore:#800080 56 | # Symbol 57 | style.ruby.14=fore:#C0A030 58 | # MODULE_NAME 59 | style.ruby.15=fore:#A000A0,bold 60 | # INSTANCE_VAR 61 | style.ruby.16=fore:#B00080 62 | # CLASS_VAR 63 | style.ruby.17=fore:#8000B0 64 | # BACKTICKS 65 | style.ruby.18=fore:#FFFF00,back:#A08080 66 | # DATASECTION 67 | style.ruby.19=fore:#600000,back:#FFF0D8,eolfilled 68 | # HERE_DELIM 69 | style.ruby.20=fore:#000000,back:#DDD0DD 70 | # HERE_Q 71 | style.ruby.21=fore:#7F007F,back:#DDD0DD,eolfilled,notbold 72 | # HERE_QQ 73 | style.ruby.22=fore:#7F007F,back:#DDD0DD,eolfilled,bold 74 | # HERE_QX 75 | style.ruby.23=fore:#7F007F,back:#DDD0DD,eolfilled,italics 76 | # STRING_Q 77 | style.ruby.24=fore:#7F007F,$(font.monospace),notbold 78 | # STRING_QQ 79 | style.ruby.25=$(colour.string),$(font.monospace) 80 | # STRING_QX 81 | style.ruby.26=fore:#FFFF00,back:#A08080 82 | # STRING_QR 83 | style.ruby.27=fore:#000000,back:#A0FFA0 84 | # STRING_QW 85 | style.ruby.28=fore:#000000,back:#FFFFE0 86 | # Demoted Keyword 87 | style.ruby.29=$(style.ruby.5) 88 | # STDIN 89 | style.ruby.30=back:#FF8080 90 | # STDOUT 91 | style.ruby.31=back:#FF8080 92 | # STDERR 93 | style.ruby.40=back:#FF8080 94 | 95 | # Matched Operators 96 | style.ruby.34=fore:#0000FF,bold 97 | style.ruby.35=fore:#FF0000,bold 98 | # Braces are only matched in operator style 99 | braces.ruby.style=10 100 | 101 | if PLAT_WIN 102 | command.go.*.rb=ruby $(FileNameExt) 103 | command.go.subsystem.*.rb=1 104 | command.go.*.rbw=rubyw $(FileNameExt) 105 | command.go.subsystem.*.rbw=1 106 | command.help.*.rb=$(CurrentWord)!c:\apps\ruby\ProgrammingRuby.chm 107 | command.help.subsystem.*.rb=4 108 | 109 | if PLAT_GTK 110 | command.go.*.rb=ruby $(FileNameExt) 111 | 112 | command.name.1.*.rb=Check Syntax 113 | command.1.*.rb=ruby -cw $(FileNameExt) 114 | 115 | command.name.2.*.rb=Code Profiler 116 | command.2.*.rb=ruby -r profile $(FileNameExt) 117 | -------------------------------------------------------------------------------- /src/scite_lua_win.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file scite_lua_win.h 3 | ** SciTE Lua scripting interface. 4 | **/ 5 | // Copyright 2010 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | /* Modifications for Windows to allow UTF-8 file names and command lines */ 9 | /* 10 | Imported into Lua build with -DLUA_USER_H=\"scite_lua_win.h\" 11 | Redirect fopen and _popen to functions that treat their arguments as UTF-8. 12 | If UTF-8 does not work then retry with the original strings as may be in locale characters. 13 | */ 14 | #if defined(LUA_WIN) 15 | #include 16 | FILE *scite_lua_fopen(const char *filename, const char *mode); 17 | #define fopen scite_lua_fopen 18 | FILE *scite_lua_popen(const char *filename, const char *mode); 19 | #define _popen scite_lua_popen 20 | #endif 21 | -------------------------------------------------------------------------------- /src/scriptol.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for scriptol files. 2 | 3 | filter.scriptol=Scriptol (sol)|*.sol| 4 | 5 | lexer.*.sol=scriptol 6 | 7 | file.patterns.sol=*.sol 8 | 9 | keywordclass.scriptol= act action alias always and array as \ 10 | bool boolean break by byte \ 11 | class case catch const constant continue \ 12 | dyn def define dict do double \ 13 | echo else elsif end enum error false file for float forever function \ 14 | globak gtk \ 15 | in if ifdef import include int integer java javax \ 16 | let long match mod nil not natural null number \ 17 | or print protected public real return redo \ 18 | scan script scriptol sol short super static step until using \ 19 | var text then this true try \ 20 | void volatile while when \ 21 | undef zero 22 | keywords.$(file.patterns.sol)=$(keywordclass.scriptol) 23 | 24 | statement.indent.*.sol= 25 | statement.lookback.*.sol=1 26 | block.start.*.sol=10 27 | 28 | comment.block.scriptol=`~ 29 | 30 | # scriptol styles 31 | # Default 32 | style.scriptol.0=fore:#000000 33 | # White space 34 | style.scriptol.1=fore:#808080 35 | # Scriptol style comment line 36 | style.scriptol.2=fore:#007F00,$(font.comment) 37 | # Persistent comment line 38 | style.scriptol.3=fore:#007F00,$(font.comment) 39 | # C style comment line 40 | style.scriptol.4=fore:#007F00 41 | # Comment-blocks 42 | style.scriptol.5=fore:#007F00,$(font.comment) 43 | # Number 44 | style.scriptol.6=fore:#007F7F 45 | # String 46 | style.scriptol.7=fore:#7F007F,$(font.monospace) 47 | # Character/Single quoted string 48 | style.scriptol.8=fore:#7F007F,$(font.monospace) 49 | # End of line where string is not closed 50 | style.scriptol.9=fore:#FF0000,$(font.monospace),back:#E0C0E0,eolfilled 51 | # Keyword 52 | style.scriptol.10=fore:#00007F,bold 53 | # Operators 54 | style.scriptol.11=bold 55 | # Identifiers 56 | style.scriptol.12=fore:#333333 57 | # Triple quotes 58 | # style.scriptol.13=fore:#007F00 59 | # Class name definition 60 | style.scriptol.14=fore:#0000FF,bold 61 | # Preprocessor 62 | # style.scriptol.15=fore:#7F0000 63 | 64 | 65 | if PLAT_WIN 66 | command.help.$(file.patterns.sol)="file://$(SciteDefaultHome)\manual.html" 67 | command.help.subsystem.$(file.patterns.sol)=2 68 | 69 | if PLAT_GTK 70 | command.help.$(file.patterns.sol)=man $(CurrentWord) | col -b 71 | 72 | command.compile.*.sol=solc -c $(FileNameExt) 73 | command.build.*.sol=solc -be $(FileNameExt) 74 | command.go.*.sol=$(FileName) 75 | command.go.subsystem.*.sol=1 76 | 77 | command.name.0.*.sol=XSolP 78 | command.0.*.sol =xsolp -be $(FileNameExt) 79 | command.is.filter.0.*.sol=1 80 | 81 | command.name.1.*.sol=XSolC 82 | command.1.*.sol =xsolc -be $(FileNameExt) 83 | command.is.filter.1.*.sol=1 84 | 85 | command.name.2.*.sol=Compile to Php 86 | command.2.*.sol=solp -b $(FileNameExt) 87 | command.is.filter.2.*.sol=1 88 | 89 | command.name.3.*.sol=Compile Web page 90 | command.3.*.sol=solp -b -w $(FileNameExt) 91 | command.is.filter.3.*.sol=1 92 | 93 | command.name.4.*.sol=Interpret 94 | command.4.*.sol=solp $(FileNameExt) 95 | command.is.filter.4.*.sol=1 96 | 97 | -------------------------------------------------------------------------------- /src/smalltalk.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for Smalltalk files. 2 | 3 | file.patterns.smalltalk=*.st 4 | 5 | filter.smalltalk=Smalltalk (.st)|$(file.patterns.smalltalk)| 6 | 7 | lexer.$(file.patterns.smalltalk)=smalltalk 8 | 9 | keywords.$(file.patterns.smalltalk)=\ 10 | ifTrue: ifFalse: whileTrue: whileFalse: ifNil: ifNotNil: whileTrue whileFalse repeat isNil notNil 11 | 12 | # Styles 13 | 14 | # Default 15 | style.smalltalk.0= 16 | # String 17 | style.smalltalk.1=$(colour.string),eolfilled 18 | # Number 19 | style.smalltalk.2=$(colour.number) 20 | # Comment 21 | style.smalltalk.3=$(colour.code.comment.box) 22 | # Symbol 23 | style.smalltalk.4=fore:#800080 24 | # Binary 25 | style.smalltalk.5=$(colour.operator) 26 | # Boolean 27 | style.smalltalk.6=$(colour.keyword),bold 28 | # self 29 | style.smalltalk.7=$(colour.keyword),bold 30 | # super 31 | style.smalltalk.8=$(colour.keyword),bold 32 | # nil 33 | style.smalltalk.9=$(colour.keyword),bold 34 | # Global 35 | style.smalltalk.10=bold 36 | # Return 37 | style.smalltalk.11=fore:#A00000,bold 38 | # Special 39 | style.smalltalk.12=bold 40 | # KwSend 41 | style.smalltalk.13=fore:#008000 42 | # Assignment 43 | style.smalltalk.14=bold 44 | # Character 45 | style.smalltalk.15=$(colour.char) 46 | # Special selector 47 | style.smalltalk.16=$(colour.keyword),bold -------------------------------------------------------------------------------- /src/sorcins.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for SORCUS Installation Files 2 | # Originally by Christoph Baumann cb@sorcus.com 3 | 4 | # SORCUS Installation files end with .ins 5 | file.patterns.sorcins=*.ins 6 | filter.sorcins=SORCUS Installation File|$(file.patterns.sorcins)| 7 | 8 | lexer.$(file.patterns.sorcins)=sorcins 9 | 10 | commands=ARGUSCONNECTCHANNELS \ 11 | M2DEVICE M2INST M2PAR M2PROC M2FUNC M2CMD M2LOADMODUL \ 12 | M6DEVICE M6INST M6PAR M6PROC M6FUNC M6CMD M6LOADMODUL \ 13 | M7DEVICE M7INST M7PAR M7PROC M7FUNC M7CMD M7LOADMODUL \ 14 | M8DEVICE M8INST M8PAR M8PROC M8FUNC M8CMD M8LOADMODUL \ 15 | MAXRESET MAXCONNECTCPU MAXLOADOSX MAXINST MAXPROC \ 16 | MAXFUNC MAXPAR MAXLOADMDD MAXFLASHFILE 17 | 18 | parameter=board slot layer osx file no usage task tasktype level irq flags \ 19 | datasize func para start progno name count index TIMEOUT RESET 20 | 21 | constants=MAX_NI_TASK MAX_TI_TASK MAX_II_TASK MAX_DI_TASK 22 | 23 | keywords.$(file.patterns.sorcins)=$(commands) 24 | keywords2.$(file.patterns.sorcins)=$(parameter) 25 | keywords3.$(file.patterns.sorcins)=$(constants) 26 | 27 | comment.block.sorcins=; 28 | 29 | # Default 30 | style.sorcins.0= 31 | # Command 32 | style.sorcins.1=fore:#0000ff 33 | # Parameter 34 | style.sorcins.2=fore:#808080 35 | # Comment line 36 | style.sorcins.3=fore:#008000 37 | # String 38 | style.sorcins.4=fore:#ff0000 39 | # Constant 40 | style.sorcins.9=fore:#ff00ff 41 | -------------------------------------------------------------------------------- /src/spice.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for spice files. 2 | 3 | file.patterns.spice=*.scp;*.out 4 | filter.spice=Spice (out scp)|$(file.patterns.spice)| 5 | lexer.$(file.patterns.spice)=spice 6 | 7 | #indent.size.$(file.patterns.spice)=3 8 | #use.tabs.$(file.patterns.spice)=0 9 | 10 | # Keyword for script commands 11 | keywordclass.spice.command=\ 12 | ac alias alter alterparam append askvalues assertvalid autoscale \ 13 | break compose copy copytodoc dc delete destroy destroyvec diff display \ 14 | disto dowhile echo else end errorstop fftinit filter foreach fourier \ 15 | freqtotime function functionundef goto homecursors if isdisplayed label \ 16 | let linearize listing load loadaccumulator makelabel movelabel makesmithplot \ 17 | movecursorleft movecursorright msgbox nameplot newplot nextparam noise \ 18 | nopoints op plot plotf plotref poly print printcursors printevent printname \ 19 | printplot printstatus printtext printtol printunits printval printvector \ 20 | pwl pz quit removesmithplot rename repeat resume rotate runs rusage \ 21 | save sendplot sendscript sens set setcursor setdoc setlabel setlabeltype \ 22 | setmargins setnthtrigger setunits setvec setparam setplot setquery \ 23 | setscaletype settracecolor settracestyle setsource settrigger setvec \ 24 | setxlimits setylimits show showmod sort status step stop switch \ 25 | tf timetofreq timetowave tran unalias unlet unset unalterparam \ 26 | update version view wavefilter wavetotime where while write 27 | # Keywords for script functions 28 | keywordclass.spice.functions=\ 29 | abs askvalue atan average ceil cos db differentiate differentiatex \ 30 | exp finalvalue floor getcursorx getcursory getcursory0 getcursory1 \ 31 | getparam im ln initialvalue integrate integratex interpolate isdef \ 32 | isdisplayed j log length mag, max maxscale mean meanpts min minscale \ 33 | nextplot nextvector norm operatingpoint ph phase phaseextend pk_pk \ 34 | pos pulse re rms rmspts rnd sameplot sin sqrt stddev stddevpts tan \ 35 | tfall tolerance trise unitvec vector 36 | # Keywords for spice parameters 37 | keywordclass.spice.params=param nodeset include options dcconv subckt ends model 38 | 39 | 40 | keywordclass.spice=$(keywordclass.spice.command) $(keywordclass.spice.functions) $(keywordclass.spice.params) 41 | 42 | keywords.$(file.patterns.spice)=$(keywordclass.spice.command) 43 | keywords2.$(file.patterns.spice)=$(keywordclass.spice.functions) 44 | keywords3.$(file.patterns.spice)=$(keywordclass.spice.params) 45 | 46 | # spice styles 47 | # Default 48 | style.spice.0=fore:#808080 49 | # Identifiers 50 | style.spice.1= 51 | # Keyword 52 | style.spice.2=$(colour.keyword) 53 | # Keyword2 54 | style.spice.3=$(colour.keyword),bold 55 | # Keyword3 56 | style.spice.4=fore:#0040E0 57 | # Number 58 | style.spice.5=$(colour.number) 59 | # Operators (delimiters) 60 | style.spice.6=$(colour.operator),bold 61 | # Value 62 | style.spice.7=$(colour.char) 63 | # Comment 64 | style.spice.8=$(colour.code.comment.line),$(font.code.comment.line) 65 | 66 | # Comments 67 | comment.block.spice=*~ 68 | 69 | braces.spice.style=4 70 | 71 | statement.indent.$(file.patterns.spice)=5 begin declare else elsif exception for if is loop while 72 | statement.lookback.$(file.patterns.spice)=20 73 | block.start.$(file.patterns.spice)=10 then is 74 | block.end.$(file.patterns.spice)=10 end 75 | 76 | calltip.spice.word.characters=._$(chars.alpha) 77 | -------------------------------------------------------------------------------- /src/tacl.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for TACL files. 2 | 3 | file.patterns.TACL=*.tacl 4 | filter.tacl=TACL (TACL)|$(file.patterns.TACL)| 5 | 6 | lexer.$(file.patterns.TACL)=TACL 7 | 8 | # These keywords are case insensitive 9 | keywords.$(file.patterns.TACL)=activate add adddsttransition adduser alter altpri assign attachseg backupcpu break builtins buscmd clear columnize comment compute copy dump copyvar create createseg debug debugnow default delete deluser detachseg env exit fileinfo filenames files filetovar help history home info initterm inlecho inleof inlout inlprefix inlto join keep keys lights load loaded files logoff logon o obey outvar param password pause pmsearch pmsg pop ppd purge push rcvdump receivedump reload remotepassword rename reset rpasswrd run rund seginfo set setprompt settime show sink status stop suspend switch system systimes time timestamp_to_text useusers variables varinfo vartofile vchange vcopy vdelete vfind vinsert vlist vmove volume vtree wakeup who xbusdown xbusup ybusdown ybusup _comparev _contime_to_text _contime_to_text_date _contime_to_text_time _debugger _execute _longest _month3 10 | 11 | comment.block.TACL=== 12 | 13 | # TACL styles 14 | # 1,Comment|2,Line Comment|3,Doc Comment|4,Number|5,Builtin|6,String|7,Character|8,Command|9,Preprocessor|10,Operator 15 | # 11,Identifier|16,Label| 16 | style.TACL.0=fore:#808080,$(font.monospace) 17 | 18 | # Comment 19 | style.TACL.1=$(colour.text.comment),$(font.code.comment) 20 | # Line comment 21 | style.TACL.2=$(colour.code.comment.line),$(font.code.comment.line) 22 | # Doc comment 23 | style.TACL.3=$(colour.code.comment.document),$(font.code.comment.document) 24 | # Number 25 | style.TACL.4=$(colour.number),$(font.monospace) 26 | # Builtin 27 | style.TACL.5=$(colour.keyword),bold,$(font.monospace) 28 | # String 29 | style.TACL.6=$(colour.string),$(font.monospace),$(font.monospace) 30 | # Character 31 | style.TACL.7=$(colour.char),$(font.monospace),$(font.monospace) 32 | # Command 33 | style.TACL.8=back:#C0C0C0,bold,$(font.monospace) 34 | # Preprocessor 35 | style.TACL.9=$(colour.preproc),$(font.preproc),$(font.monospace) 36 | # Operators 37 | style.TACL.10=$(colour.operator),bold,$(font.monospace) 38 | # Identifier 39 | style.TACL.11=$(colour.identifier),$(font.identifier),$(font.monospace) 40 | # Label 41 | style.TACL.16=fore:#0020F0,$(font.monospace) 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/tal.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for TAL files. 2 | file.patterns.TAL=*.TAL 3 | filter.tal=TAL (TAL)|$(file.patterns.TAL)| 4 | 5 | lexer.$(file.patterns.TAL)=TAL 6 | 7 | # These keywords are case insensitive 8 | keywords.$(file.patterns.TAL)=and assert baddr begin by call callable case cbaddr code cwaddr define do downto drop else end entry external fixed for forward goto if int interrupt label land literal lor main not of or otherwise priv proc procaddr real resident return rscan scan sgbaddr sgwaddr sgxbaddr sgxwaddr stack store string struct subproc then to unsigned until use variable waddr while xor 9 | keywords2.$(file.patterns.TAL)=at below bit_filler block bytes c cobol elements ext extensible filler fortran language name pascal private unspecified words 10 | 11 | comment.block.TAL=-- 12 | 13 | # TAL styles 14 | # 1,Comment|2,Line Comment|3,Doc Comment|4,Number|5,Keyword|6,String|7,Character|8,Unreserved keyword|9,Preprocessor|10,Operator 15 | # 11,Identifier 16 | style.TAL.0=fore:#808080 17 | 18 | # Comment 19 | style.TAL.1=fore:#008000,$(font.code.comment) 20 | # Line comment 21 | style.TAL.2=$(colour.code.comment.line),$(font.code.comment.line) 22 | # Doc comment 23 | style.TAL.3=$(colour.code.comment.document),$(font.code.comment.document) 24 | # Number 25 | style.TAL.4=$(colour.number) 26 | # Keyword 27 | style.TAL.5=$(colour.keyword),bold 28 | # String 29 | style.TAL.6=$(colour.string),$(font.monospace) 30 | # Character 31 | style.TAL.7=$(colour.char),$(font.monospace) 32 | # Unreserved keyword 33 | style.TAL.8=$(colour.keyword),bold 34 | # Preprocessor 35 | style.TAL.9=$(colour.preproc),$(font.preproc) 36 | # Operators 37 | style.TAL.10=$(colour.operator),bold 38 | # Identifier 39 | style.TAL.11=$(colour.identifier),$(font.identifier) 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/txt2tags.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for txt2tags. 2 | 3 | file.patterns.txt2tags=*.t2t 4 | 5 | shbang.txt2tags=txt2tags 6 | 7 | filter.txt2tags=Txt2tags (t2t)|$(file.patterns.txt2tags)| 8 | 9 | lexer.$(file.patterns.txt2tags)=txt2tags 10 | 11 | # Default 12 | style.txt2tags.0=fore:#000000 13 | 14 | # Special 15 | style.txt2tags.1=fore:#000000 16 | 17 | # STRONG 18 | style.txt2tags.2=fore:#445675,bold 19 | 20 | # STRONG 2 (not used) 21 | style.txt2tags.3=fore:#445675 22 | 23 | # EM1 (italic) 24 | style.txt2tags.4=fore:#653A39,italics 25 | 26 | # EM2 (underline) 27 | style.txt2tags.5=fore:#386742 28 | 29 | # H1 30 | style.txt2tags.6=fore:#E20700,bold 31 | 32 | # H2 33 | style.txt2tags.7=fore:#E20700,bold 34 | 35 | # H3 36 | style.txt2tags.8=fore:#A81D05,bold 37 | 38 | # H4 39 | style.txt2tags.9=fore:#871704,bold 40 | 41 | # H5 42 | style.txt2tags.10=fore:#871704,bold 43 | 44 | # H6 45 | style.txt2tags.11=fore:#871704,bold 46 | 47 | # prechar (not used) 48 | style.txt2tags.12=fore:#871704,bold 49 | 50 | # list 51 | style.txt2tags.13=fore:#E300EE 52 | 53 | # list 54 | style.txt2tags.14=fore:#E300EE 55 | 56 | # BLOCKQUOTE 57 | style.txt2tags.15=fore:#015F52 58 | 59 | # STRIKEOUT 60 | style.txt2tags.16=fore:#644A9B 61 | 62 | # HRULE 63 | style.txt2tags.17=fore:#ff901e 64 | 65 | # LINK 66 | style.txt2tags.18=fore:#0930DE,italics 67 | 68 | # CODE 69 | style.txt2tags.19=fore:#009f00 70 | 71 | # CODE2 72 | style.txt2tags.20=fore:#009f00 73 | 74 | # CODEBLOCK 75 | style.txt2tags.21=fore:#005f00 76 | 77 | # COMMENT 78 | style.txt2tags.22=fore:#777777 79 | 80 | # OPTION 81 | style.txt2tags.23=fore:#C0036E 82 | 83 | # PREPROC 84 | style.txt2tags.24=fore:#848B00 85 | 86 | # POSTPROC 87 | style.txt2tags.25=fore:#C05600 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/yaml.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for YAML files. 2 | 3 | # associate YAML file patter with the YAML lexer 4 | file.patterns.yaml=*.yaml;*.yml 5 | filter.yaml=YAML (yaml)|$(file.patterns.yaml)| 6 | lexer.$(file.patterns.yaml)=yaml 7 | 8 | # YAML requires spaces for tabs 9 | tabsize.$(file.patterns.yaml)=2 10 | indent.size.$(file.patterns.yaml)=2 11 | use.tabs.$(file.patterns.yaml)=0 12 | 13 | # YAML comment character 14 | comment.block.yaml=#~ 15 | 16 | # YAML convertible values 17 | keywords.$(file.patterns.yaml)=true false yes no 18 | 19 | # YAML font styles 20 | # default 21 | style.yaml.0=$(font.text),fore:#000000 22 | # comment line 23 | style.yaml.1=$(font.comment),fore:#008800 24 | # value identifier 25 | style.yaml.2=$(font.base),fore:#000088,bold 26 | # keyword value 27 | style.yaml.3=$(font.base),fore:#880088 28 | # numerical value 29 | style.yaml.4=$(font.base),fore:#880000 30 | # reference/repeating value 31 | style.yaml.5=$(font.base),fore:#008888 32 | # document delimiting line 33 | style.yaml.6=$(font.comment),fore:#FFFFFF,bold,back:#000088,eolfilled 34 | # text block marker 35 | style.yaml.7=$(font.text),fore:#333366 36 | # syntax error marker 37 | style.yaml.8=$(font.text),fore:#FFFFFF,italics,bold,back:#FF0000,eolfilled 38 | -------------------------------------------------------------------------------- /tgzgscite: -------------------------------------------------------------------------------- 1 | cd .. 2 | rm -f gscite.tgz 3 | mkdir gscite 4 | cp scite/*.txt gscite 5 | cp scite/bin/SciTE gscite 6 | strip gscite/SciTE 7 | cp scite/src/*.properties gscite 8 | rm -f gscite/Embedded.properties 9 | cp scite/doc/*.html gscite 10 | cp scite/doc/*.png gscite 11 | cp scite/gtk/*.png gscite 12 | cp scite/doc/*.jpg gscite 13 | cp scite/doc/*.1 gscite 14 | tar --create gscite/* | gzip -c >gscite.tgz 15 | rm -f gscite/* 16 | rmdir gscite 17 | -------------------------------------------------------------------------------- /tgzsrc: -------------------------------------------------------------------------------- 1 | cd .. 2 | rm -f scite.tgz 3 | rm -f scite/bin/*.properties 4 | tar --create --exclude=*.o --exclude=*.obj --exclude=*.dll --exclude=*.exe --exclude=*.a --exclude=SciTE \ 5 | scintilla/* scite/* \ 6 | | gzip -c >scite.tgz 7 | -------------------------------------------------------------------------------- /upxsc1.bat: -------------------------------------------------------------------------------- 1 | del/q ..\Sc1.exe 2 | upx --best --force -o ..\Sc1.exe bin\Sc1.exe 3 | -------------------------------------------------------------------------------- /win32/DirectorExtension.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file DirectorExtension.h 3 | ** Extension for communicating with a director program. 4 | **/ 5 | // Copyright 1998-2001 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | class DirectorExtension : public Extension { 9 | private: 10 | DirectorExtension() {} // Singleton 11 | DirectorExtension(const DirectorExtension &); // Disable copy ctor 12 | void operator=(const DirectorExtension &); // Disable operator= 13 | 14 | public: 15 | static DirectorExtension &Instance(); 16 | 17 | // Implement the Extension interface 18 | virtual bool Initialise(ExtensionAPI *host_); 19 | virtual bool Finalise(); 20 | virtual bool Clear(); 21 | virtual bool Load(const char *filename); 22 | 23 | virtual bool OnOpen(const char *path); 24 | virtual bool OnSwitchFile(const char *path); 25 | virtual bool OnSave(const char *path); 26 | virtual bool OnChar(char ch); 27 | virtual bool OnExecute(const char *s); 28 | virtual bool OnSavePointReached(); 29 | virtual bool OnSavePointLeft(); 30 | virtual bool OnStyle(unsigned int startPos, int lengthDoc, int initStyle, StyleWriter *styler); 31 | virtual bool OnDoubleClick(); 32 | virtual bool OnUpdateUI(); 33 | virtual bool OnMarginClick(); 34 | virtual bool OnMacro(const char *command, const char *params); 35 | 36 | virtual bool SendProperty(const char *prop); 37 | virtual bool OnClose(const char *path); 38 | 39 | // Allow messages through to extension 40 | void HandleStringMessage(const char *message); 41 | }; 42 | 43 | -------------------------------------------------------------------------------- /win32/DragDrop.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/win32/DragDrop.cur -------------------------------------------------------------------------------- /win32/SciBall.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/win32/SciBall.ico -------------------------------------------------------------------------------- /win32/SciTE.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | SciTE 11 | 12 | 13 | true 14 | 15 | 16 | 17 | 18 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /win32/UniqueInstance.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file UniqueInstance.h 3 | ** Header of the class to ensure a unique instance of the editor. 4 | **/ 5 | // Copyright 1998-2003 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | class SciTEWin; 9 | 10 | /** 11 | */ 12 | class UniqueInstance { 13 | 14 | private: 15 | SciTEWin *stw; ///< Access to SciTEWin interface 16 | UINT identityMessage; ///< Registered message to identify SciTE instances 17 | HANDLE mutex; ///< Mutex to avoid concurrent running 18 | SString mutexName; ///< Name of the above 19 | bool bAlreadyRunning; ///< true if another instance accepting files is found 20 | HWND hOtherWindow; ///< Handle of the window of the found other instance 21 | 22 | public: 23 | UniqueInstance(); 24 | ~UniqueInstance(); 25 | 26 | void Init(SciTEWin *stw_); ///< To set the access to the SciTEWin interface 27 | bool AcceptToOpenFiles(bool bAccept); ///< Set mutex and see if succeed 28 | void ToggleOpenFilesHere(); ///< Change the option to open files in this instance and ask other instance to give up this option 29 | LRESULT CopyData(COPYDATASTRUCT *pcds); ///< Send command line to existing instance 30 | LRESULT CheckMessage(UINT message, WPARAM wParam, LPARAM lParam); ///< Test if a given message is the identity message 31 | void CheckOtherInstance(); ///< Create mutex name and try to set it 32 | bool FindOtherInstance(); ///< Find another instance answering to the identity message 33 | void SendCommands(const char *cmdLine); ///< Send the command line to the other instance 34 | static BOOL CALLBACK SearchOtherInstance(HWND hWnd, LPARAM lParam); ///< Callback in the window enumeration 35 | }; 36 | -------------------------------------------------------------------------------- /win32/WinMutex.cxx: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file WinMutex.cxx 3 | ** Define mutex 4 | **/ 5 | // SciTE & Scintilla copyright 1998-2003 by Neil Hodgson 6 | // Copyright 2007 by Neil Hodgson , from April White 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | // http://www.microsoft.com/msj/0797/win320797.aspx 10 | 11 | #include 12 | #include "Mutex.h" 13 | 14 | class WinMutex : public Mutex { 15 | private: 16 | CRITICAL_SECTION cs; 17 | virtual void Lock() { ::EnterCriticalSection(&cs); } 18 | virtual void Unlock() { ::LeaveCriticalSection(&cs); } 19 | WinMutex() { ::InitializeCriticalSection(&cs); } 20 | virtual ~WinMutex() { ::DeleteCriticalSection(&cs); } 21 | friend class Mutex; 22 | }; 23 | 24 | Mutex *Mutex::Create() { 25 | return new WinMutex(); 26 | } 27 | -------------------------------------------------------------------------------- /win32/around.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/win32/around.bmp -------------------------------------------------------------------------------- /win32/backslash.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/win32/backslash.bmp -------------------------------------------------------------------------------- /win32/case.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/win32/case.bmp -------------------------------------------------------------------------------- /win32/closefile.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/win32/closefile.bmp -------------------------------------------------------------------------------- /win32/regex.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/win32/regex.bmp -------------------------------------------------------------------------------- /win32/up.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/win32/up.bmp -------------------------------------------------------------------------------- /win32/word.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LuaDist/scite/fab4a6321c52c6ea8d1e1eab9c4fee86f7388697/win32/word.bmp -------------------------------------------------------------------------------- /zipsrc.bat: -------------------------------------------------------------------------------- 1 | cd .. 2 | del/q scite.zip 3 | zip scite.zip scintilla\*.* scintilla\*\*.* scintilla\*\*\*.* scintilla\*\*\*\*.* scintilla\*\*\*\*\*.* scite\*.* scite\*\*.* scite\*\*\*.* scite\*\*\*\*.* -x *.o -x *.obj -x *.lib -x *.dll -x *.exe -x *.pdb -x *.i -x *.d -x *.res -x *.exp -x *.ncb -x *.sbr -x *.bsc -x *.tlog -x *.ilk -x *.ipch -x *.idb -x *.sdf -x *.dpsession -x *.bak 4 | cd scite 5 | -------------------------------------------------------------------------------- /zipwscite.bat: -------------------------------------------------------------------------------- 1 | cd .. 2 | del/q wscite.zip 3 | mkdir wscite 4 | copy scite\license.txt wscite 5 | copy scite\bin\SciTE.exe wscite 6 | copy scite\bin\SciLexer.dll wscite 7 | copy scite\src\*.properties wscite 8 | copy scite\lua\COPYRIGHT wscite\luaCOPYRIGHT 9 | del/q wscite\Embedded.properties 10 | copy scite\doc\*.html wscite 11 | copy scite\doc\*.png wscite 12 | copy scite\doc\*.jpg wscite 13 | copy scite\doc\*.1 wscite 14 | zip wscite.zip wscite\*.* 15 | del/q wscite\*.* 16 | rmdir wscite 17 | cd scite 18 | -------------------------------------------------------------------------------- /zipwscited.bat: -------------------------------------------------------------------------------- 1 | cd .. 2 | del/q wscite.zip 3 | mkdir wscite 4 | copy scite\license.txt wscite 5 | copy scite\bin\SciTE.exe wscite 6 | copy scite\bin\SciTE.pdb wscite 7 | copy scite\bin\SciLexer.dll wscite 8 | copy scite\bin\SciLexer.pdb wscite 9 | copy scite\src\*.properties wscite 10 | copy scite\lua\COPYRIGHT wscite\luaCOPYRIGHT 11 | del/q wscite\Embedded.properties 12 | copy scite\doc\*.html wscite 13 | copy scite\doc\*.png wscite 14 | copy scite\doc\*.jpg wscite 15 | copy scite\doc\*.1 wscite 16 | zip wscite.zip wscite\*.* 17 | del/q wscite\*.* 18 | rmdir wscite 19 | cd scite 20 | --------------------------------------------------------------------------------