Remove filetype O-Matrix (probably unused for years).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3482 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2009-01-18 18:18:38 +00:00
parent 91ba3a12da
commit 60e751eaf2
15 changed files with 14 additions and 781 deletions

View File

@ -1,3 +1,13 @@
2009-01-18 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* data/filetype_extensions.conf, data/filetypes.oms,
scintilla/include/SciLexer.h, scintilla/include/Scintilla.iface,
scintilla/KeyWords.cxx, scintilla/LexOMS.cxx, scintilla/Makefile.am,
scintilla/makefile.win32, src/editor.c, src/filetypes.c,
src/filetypes.h, src/highlighting.c, src/templates.c, wscript:
Remove filetype O-Matrix (probably unused for years).
2009-01-17 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* geany.nsi:

View File

@ -26,7 +26,6 @@ Javascript=*.js;
Lua=*.lua;
Make=*.mak;*.mk;GNUmakefile;makefile;Makefile;makefile.*;Makefile.*;
Matlab=*.m;
O-Matrix=*.oms;
Perl=*.pl;*.perl;*.pm;*.agi;*.pod;
PHP=*.php;*.php3;*.php4;*.php5;*.phtml;
Python=*.py;*.pyw;

View File

@ -1,41 +0,0 @@
# For complete documentation of this file, please see Geany's main documentation
[styling]
# foreground;background;bold;italic
default=0x000000;0xffffff;false;false
commentline=0x909090;0xffffff;false;false
number=0x007f00;0xffffff;false;false
word=0x991111;0xffffff;false;false
string=0xff901e;0xffffff;false;false
character=0x404000;0xffffff;false;false
operator=0x000000;0xffffff;false;false
identifier=0x000000;0xffffff;false;false
backticks=0x000000;0xe0c0e0;false;false
param=0x991111;0x0000ff;false;false
scalar=0x0000ff;0xffffff;false;false
[keywords]
# all items must be in one line
primary=clear seq fillcols fillrowsgaspect gaddview gtitle gxaxis gyaxis max contour gcolor gplot gaddview gxaxis gyaxis gcolor fill coldim gplot gtitle clear arcov dpss fspec cos gxaxis gyaxis gtitle gplot gupdate rowdim fill print for to begin end write cocreate coinvoke codispsave cocreate codispset copropput colsum sqrt adddialog addcontrol addcontrol delwin fillrows gaspect function conjdir
[settings]
# default extension used when saving files
#extension=oms
# the following characters are these which a "word" can contains, see documentation
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
# if only single comment char is supported like # in this file, leave comment_close blank
comment_open=#
comment_close=
# set to false if a comment character/string should start at column 0 of a line, true uses any
# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d
#command_example();
# setting to false would generate this
# command_example();
# This setting works only for single line comments
comment_use_indent=true
# context action command (please see Geany's main documentation for details)
context_action_cmd=

View File

@ -161,7 +161,6 @@ int Scintilla_LinkLexers() {
LINK_LEXER(lmMatlab);
LINK_LEXER(lmNsis);
LINK_LEXER(lmNull);
LINK_LEXER(lmOMS);
LINK_LEXER(lmPascal);
LINK_LEXER(lmPerl);
LINK_LEXER(lmPo);

View File

@ -1,663 +0,0 @@
// Scintilla source code edit control
/** @file LexBash.cxx
** Lexer for Bash.
**/
// Copyright 2004-2005 by Neil Hodgson <neilh@scintilla.org>
// Adapted from LexPerl by Kein-Hong Man <mkh@pl.jaring.my> 2004
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include <stdarg.h>
#include "Platform.h"
#include "PropSet.h"
#include "Accessor.h"
#include "KeyWords.h"
#include "Scintilla.h"
#include "SciLexer.h"
#define BASH_BASE_ERROR 65
#define BASH_BASE_DECIMAL 66
#define BASH_BASE_HEX 67
#define BASH_BASE_OCTAL 68
#define BASH_BASE_OCTAL_ERROR 69
#define HERE_DELIM_MAX 256
static inline int translateBashDigit(char ch) {
if (ch >= '0' && ch <= '9') {
return ch - '0';
} else if (ch >= 'a' && ch <= 'z') {
return ch - 'a' + 10;
} else if (ch >= 'A' && ch <= 'Z') {
return ch - 'A' + 36;
} else if (ch == '@') {
return 62;
} else if (ch == '_') {
return 63;
}
return BASH_BASE_ERROR;
}
static inline bool isEOLChar(char ch) {
return (ch == '\r') || (ch == '\n');
}
static bool isSingleCharOp(char ch) {
char strCharSet[2];
strCharSet[0] = ch;
strCharSet[1] = '\0';
return (NULL != strstr("rwxoRWXOezsfdlpSbctugkTBMACahGLNn", strCharSet));
}
static inline bool isBashOperator(char ch) {
if (ch == '^' || ch == '&' || ch == '\\' || ch == '%' ||
ch == '(' || ch == ')' || ch == '-' || ch == '+' ||
ch == '=' || ch == '|' || ch == '{' || ch == '}' ||
ch == '[' || ch == ']' || ch == ':' || ch == ';' ||
ch == '>' || ch == ',' || ch == '/' || ch == '<' ||
ch == '?' || ch == '!' || ch == '.' || ch == '~' ||
ch == '@')
return true;
return false;
}
static int classifyWordBash(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
char s[100];
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
s[i] = styler[start + i];
s[i + 1] = '\0';
}
char chAttr = SCE_SH_IDENTIFIER;
if (keywords.InList(s))
chAttr = SCE_SH_WORD;
styler.ColourTo(end, chAttr);
return chAttr;
}
static inline int getBashNumberBase(unsigned int start, unsigned int end, Accessor &styler) {
int base = 0;
for (unsigned int i = 0; i < end - start + 1 && i < 10; i++) {
base = base * 10 + (styler[start + i] - '0');
}
if (base > 64 || (end - start) > 1) {
return BASH_BASE_ERROR;
}
return base;
}
static inline bool isEndVar(char ch) {
return !isalnum(ch) && ch != '$' && ch != '_';
}
static inline bool isNonQuote(char ch) {
return isalnum(ch) || ch == '_';
}
static bool isMatch(Accessor &styler, int lengthDoc, int pos, const char *val) {
if ((pos + static_cast<int>(strlen(val))) >= lengthDoc) {
return false;
}
while (*val) {
if (*val != styler[pos++]) {
return false;
}
val++;
}
return true;
}
static char opposite(char ch) {
if (ch == '(')
return ')';
if (ch == '[')
return ']';
if (ch == '{')
return '}';
if (ch == '<')
return '>';
return ch;
}
static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
WordList *keywordlists[], Accessor &styler) {
// Lexer for bash often has to backtrack to start of current style to determine
// which characters are being used as quotes, how deeply nested is the
// start position and what the termination string is for here documents
WordList &keywords = *keywordlists[0];
class HereDocCls {
public:
int State; // 0: '<<' encountered
// 1: collect the delimiter
// 2: here doc text (lines after the delimiter)
char Quote; // the char after '<<'
bool Quoted; // true if Quote in ('\'','"','`')
bool Indent; // indented delimiter (for <<-)
int DelimiterLength; // strlen(Delimiter)
char *Delimiter; // the Delimiter, 256: sizeof PL_tokenbuf
HereDocCls() {
State = 0;
Quote = 0;
Quoted = false;
Indent = 0;
DelimiterLength = 0;
Delimiter = new char[HERE_DELIM_MAX];
Delimiter[0] = '\0';
}
~HereDocCls() {
delete []Delimiter;
}
};
HereDocCls HereDoc;
class QuoteCls {
public:
int Rep;
int Count;
char Up;
char Down;
QuoteCls() {
this->New(1);
}
void New(int r) {
Rep = r;
Count = 0;
Up = '\0';
Down = '\0';
}
void Open(char u) {
Count++;
Up = u;
Down = opposite(Up);
}
};
QuoteCls Quote;
int state = initStyle;
int numBase = 0;
unsigned int lengthDoc = startPos + length;
// If in a long distance lexical state, seek to the beginning to find quote characters
// Bash strings can be multi-line with embedded newlines, so backtrack.
// Bash numbers have additional state during lexing, so backtrack too.
if (state == SCE_SH_HERE_Q) {
while ((startPos > 1) && (styler.StyleAt(startPos) != SCE_SH_HERE_DELIM)) {
startPos--;
}
startPos = styler.LineStart(styler.GetLine(startPos));
state = styler.StyleAt(startPos - 1);
}
if (state == SCE_SH_STRING
|| state == SCE_SH_BACKTICKS
|| state == SCE_SH_CHARACTER
|| state == SCE_SH_NUMBER
|| state == SCE_SH_IDENTIFIER
|| state == SCE_SH_COMMENTLINE
) {
while ((startPos > 1) && (styler.StyleAt(startPos - 1) == state)) {
startPos--;
}
state = SCE_SH_DEFAULT;
}
styler.StartAt(startPos);
char chPrev = styler.SafeGetCharAt(startPos - 1);
if (startPos == 0)
chPrev = '\n';
char chNext = styler[startPos];
styler.StartSegment(startPos);
for (unsigned int i = startPos; i < lengthDoc; i++) {
char ch = chNext;
// if the current character is not consumed due to the completion of an
// earlier style, lexing can be restarted via a simple goto
restartLexer:
chNext = styler.SafeGetCharAt(i + 1);
char chNext2 = styler.SafeGetCharAt(i + 2);
if (styler.IsLeadByte(ch)) {
chNext = styler.SafeGetCharAt(i + 2);
chPrev = ' ';
i += 1;
continue;
}
if ((chPrev == '\r' && ch == '\n')) { // skip on DOS/Windows
styler.ColourTo(i, state);
chPrev = ch;
continue;
}
if (HereDoc.State == 1 && isEOLChar(ch)) {
// Begin of here-doc (the line after the here-doc delimiter):
// Lexically, the here-doc starts from the next line after the >>, but the
// first line of here-doc seem to follow the style of the last EOL sequence
HereDoc.State = 2;
if (HereDoc.Quoted) {
if (state == SCE_SH_HERE_DELIM) {
// Missing quote at end of string! We are stricter than bash.
// Colour here-doc anyway while marking this bit as an error.
state = SCE_SH_ERROR;
}
styler.ColourTo(i - 1, state);
// HereDoc.Quote always == '\''
state = SCE_SH_HERE_Q;
} else {
styler.ColourTo(i - 1, state);
// always switch
state = SCE_SH_HERE_Q;
}
}
if (state == SCE_SH_DEFAULT) {
if (ch == '\\') { // escaped character
i++;
ch = chNext;
chNext = chNext2;
styler.ColourTo(i, SCE_SH_IDENTIFIER);
} else if (isdigit(ch)) {
state = SCE_SH_NUMBER;
numBase = BASH_BASE_DECIMAL;
if (ch == '0') { // hex,octal
if (chNext == 'x' || chNext == 'X') {
numBase = BASH_BASE_HEX;
i++;
ch = chNext;
chNext = chNext2;
} else if (isdigit(chNext)) {
numBase = BASH_BASE_OCTAL;
}
}
} else if (iswordstart(ch)) {
state = SCE_SH_WORD;
if (!iswordchar(chNext) && chNext != '+' && chNext != '-') {
// We need that if length of word == 1!
// This test is copied from the SCE_SH_WORD handler.
classifyWordBash(styler.GetStartSegment(), i, keywords, styler);
state = SCE_SH_DEFAULT;
}
} else if (ch == '#') {
state = SCE_SH_COMMENTLINE;
} else if (ch == '\"') {
state = SCE_SH_STRING;
Quote.New(1);
Quote.Open(ch);
/* } else if (ch == '\'') {
state = SCE_SH_CHARACTER;
Quote.New(1);
Quote.Open(ch);
*/ } else if (ch == '`') {
state = SCE_SH_BACKTICKS;
Quote.New(1);
Quote.Open(ch);
} else if (ch == '$') {
if (chNext == '{') {
state = SCE_SH_PARAM;
goto startQuote;
/* } else if (chNext == '\'') {
state = SCE_SH_CHARACTER;
goto startQuote;
*/ } else if (chNext == '"') {
state = SCE_SH_STRING;
goto startQuote;
} else if (chNext == '(' && chNext2 == '(') {
styler.ColourTo(i, SCE_SH_OPERATOR);
state = SCE_SH_DEFAULT;
goto skipChar;
} else if (chNext == '(' || chNext == '`') {
state = SCE_SH_BACKTICKS;
startQuote:
Quote.New(1);
Quote.Open(chNext);
goto skipChar;
} else {
state = SCE_SH_SCALAR;
skipChar:
i++;
ch = chNext;
chNext = chNext2;
}
} else if (ch == '*') {
if (chNext == '*') { // exponentiation
i++;
ch = chNext;
chNext = chNext2;
}
styler.ColourTo(i, SCE_SH_OPERATOR);
} else if (ch == '<' && chNext == '<') {
state = SCE_SH_HERE_DELIM;
HereDoc.State = 0;
HereDoc.Indent = false;
} else if (ch == '-' // file test operators
&& isSingleCharOp(chNext)
&& !isalnum((chNext2 = styler.SafeGetCharAt(i+2)))) {
styler.ColourTo(i + 1, SCE_SH_WORD);
state = SCE_SH_DEFAULT;
i++;
ch = chNext;
chNext = chNext2;
} else if (isBashOperator(ch)) {
styler.ColourTo(i, SCE_SH_OPERATOR);
} else {
// keep colouring defaults to make restart easier
styler.ColourTo(i, SCE_SH_DEFAULT);
}
} else if (state == SCE_SH_NUMBER) {
int digit = translateBashDigit(ch);
if (numBase == BASH_BASE_DECIMAL) {
if (ch == '#') {
numBase = getBashNumberBase(styler.GetStartSegment(), i - 1, styler);
if (numBase == BASH_BASE_ERROR) // take the rest as comment
goto numAtEnd;
} else if (!isdigit(ch))
goto numAtEnd;
} else if (numBase == BASH_BASE_HEX) {
if ((digit < 16) || (digit >= 36 && digit <= 41)) {
// hex digit 0-9a-fA-F
} else
goto numAtEnd;
} else if (numBase == BASH_BASE_OCTAL ||
numBase == BASH_BASE_OCTAL_ERROR) {
if (digit > 7) {
if (digit <= 9) {
numBase = BASH_BASE_OCTAL_ERROR;
} else
goto numAtEnd;
}
} else if (numBase == BASH_BASE_ERROR) {
if (digit > 9)
goto numAtEnd;
} else { // DD#DDDD number style handling
if (digit != BASH_BASE_ERROR) {
if (numBase <= 36) {
// case-insensitive if base<=36
if (digit >= 36) digit -= 26;
}
if (digit >= numBase) {
if (digit <= 9) {
numBase = BASH_BASE_ERROR;
} else
goto numAtEnd;
}
} else {
numAtEnd:
if (numBase == BASH_BASE_ERROR ||
numBase == BASH_BASE_OCTAL_ERROR)
state = SCE_SH_ERROR;
styler.ColourTo(i - 1, state);
state = SCE_SH_DEFAULT;
goto restartLexer;
}
}
} else if (state == SCE_SH_WORD) {
if (!iswordchar(chNext) && chNext != '+' && chNext != '-') {
// "." never used in Bash variable names
// but used in file names
classifyWordBash(styler.GetStartSegment(), i, keywords, styler);
state = SCE_SH_DEFAULT;
ch = ' ';
}
} else if (state == SCE_SH_IDENTIFIER) {
if (!iswordchar(chNext) && chNext != '+' && chNext != '-') {
styler.ColourTo(i, SCE_SH_IDENTIFIER);
state = SCE_SH_DEFAULT;
ch = ' ';
}
} else {
if (state == SCE_SH_COMMENTLINE) {
if (ch == '\\' && isEOLChar(chNext)) {
// comment continuation
if (chNext == '\r' && chNext2 == '\n') {
i += 2;
ch = styler.SafeGetCharAt(i);
chNext = styler.SafeGetCharAt(i + 1);
} else {
i++;
ch = chNext;
chNext = chNext2;
}
} else if (isEOLChar(ch)) {
styler.ColourTo(i - 1, state);
state = SCE_SH_DEFAULT;
goto restartLexer;
} else if (isEOLChar(chNext)) {
styler.ColourTo(i, state);
state = SCE_SH_DEFAULT;
}
} else if (state == SCE_SH_HERE_DELIM) {
//
// From Bash info:
// ---------------
// Specifier format is: <<[-]WORD
// Optional '-' is for removal of leading tabs from here-doc.
// Whitespace acceptable after <<[-] operator
//
if (HereDoc.State == 0) { // '<<' encountered
HereDoc.State = 1;
HereDoc.Quote = chNext;
HereDoc.Quoted = false;
HereDoc.DelimiterLength = 0;
HereDoc.Delimiter[HereDoc.DelimiterLength] = '\0';
//if (chNext == '\'' || chNext == '\"') { // a quoted here-doc delimiter (' or ")
if (chNext == '\"') { // a quoted here-doc delimiter (' or ")
i++;
ch = chNext;
chNext = chNext2;
HereDoc.Quoted = true;
} else if (!HereDoc.Indent && chNext == '-') { // <<- indent case
HereDoc.Indent = true;
HereDoc.State = 0;
} else if (isalpha(chNext) || chNext == '_' || chNext == '\\'
|| chNext == '-' || chNext == '+' || chNext == '!') {
// an unquoted here-doc delimiter, no special handling
// TODO check what exactly bash considers part of the delim
} else if (chNext == '<') { // HERE string <<<
i++;
ch = chNext;
chNext = chNext2;
styler.ColourTo(i, SCE_SH_HERE_DELIM);
state = SCE_SH_DEFAULT;
HereDoc.State = 0;
} else if (isspacechar(chNext)) {
// eat whitespace
HereDoc.State = 0;
} else if (isdigit(chNext) || chNext == '=' || chNext == '$') {
// left shift << or <<= operator cases
styler.ColourTo(i, SCE_SH_OPERATOR);
state = SCE_SH_DEFAULT;
HereDoc.State = 0;
} else {
// symbols terminates; deprecated zero-length delimiter
}
} else if (HereDoc.State == 1) { // collect the delimiter
if (HereDoc.Quoted) { // a quoted here-doc delimiter
if (ch == HereDoc.Quote) { // closing quote => end of delimiter
styler.ColourTo(i, state);
state = SCE_SH_DEFAULT;
} else {
if (ch == '\\' && chNext == HereDoc.Quote) { // escaped quote
i++;
ch = chNext;
chNext = chNext2;
}
HereDoc.Delimiter[HereDoc.DelimiterLength++] = ch;
HereDoc.Delimiter[HereDoc.DelimiterLength] = '\0';
}
} else { // an unquoted here-doc delimiter
if (isalnum(ch) || ch == '_' || ch == '-' || ch == '+' || ch == '!') {
HereDoc.Delimiter[HereDoc.DelimiterLength++] = ch;
HereDoc.Delimiter[HereDoc.DelimiterLength] = '\0';
} else if (ch == '\\') {
// skip escape prefix
} else {
styler.ColourTo(i - 1, state);
state = SCE_SH_DEFAULT;
goto restartLexer;
}
}
if (HereDoc.DelimiterLength >= HERE_DELIM_MAX - 1) {
styler.ColourTo(i - 1, state);
state = SCE_SH_ERROR;
goto restartLexer;
}
}
} else if (HereDoc.State == 2) {
// state == SCE_SH_HERE_Q
if (isMatch(styler, lengthDoc, i, HereDoc.Delimiter)) {
if (!HereDoc.Indent && isEOLChar(chPrev)) {
endHereDoc:
// standard HERE delimiter
i += HereDoc.DelimiterLength;
chPrev = styler.SafeGetCharAt(i - 1);
ch = styler.SafeGetCharAt(i);
if (isEOLChar(ch)) {
styler.ColourTo(i - 1, state);
state = SCE_SH_DEFAULT;
HereDoc.State = 0;
goto restartLexer;
}
chNext = styler.SafeGetCharAt(i + 1);
} else if (HereDoc.Indent) {
// indented HERE delimiter
unsigned int bk = (i > 0)? i - 1: 0;
while (i > 0) {
ch = styler.SafeGetCharAt(bk--);
if (isEOLChar(ch)) {
goto endHereDoc;
} else if (!isspacechar(ch)) {
break; // got leading non-whitespace
}
}
}
}
} else if (state == SCE_SH_SCALAR) { // variable names
if (isEndVar(ch)) {
if ((state == SCE_SH_SCALAR)
&& i == (styler.GetStartSegment() + 1)) {
// Special variable: $(, $_ etc.
styler.ColourTo(i, state);
state = SCE_SH_DEFAULT;
} else {
styler.ColourTo(i - 1, state);
state = SCE_SH_DEFAULT;
goto restartLexer;
}
}
} else if (state == SCE_SH_STRING
|| state == SCE_SH_CHARACTER
|| state == SCE_SH_BACKTICKS
|| state == SCE_SH_PARAM
) {
if (!Quote.Down && !isspacechar(ch)) {
Quote.Open(ch);
} else if (ch == '\\' && Quote.Up != '\\') {
i++;
ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
} else if (ch == Quote.Down) {
Quote.Count--;
if (Quote.Count == 0) {
Quote.Rep--;
if (Quote.Rep <= 0) {
styler.ColourTo(i, state);
state = SCE_SH_DEFAULT;
ch = ' ';
}
if (Quote.Up == Quote.Down) {
Quote.Count++;
}
}
} else if (ch == Quote.Up) {
Quote.Count++;
}
}
}
if (state == SCE_SH_ERROR) {
break;
}
chPrev = ch;
}
styler.ColourTo(lengthDoc - 1, state);
}
static bool IsCommentLine(int line, Accessor &styler) {
int pos = styler.LineStart(line);
int eol_pos = styler.LineStart(line + 1) - 1;
for (int i = pos; i < eol_pos; i++) {
char ch = styler[i];
if (ch == '#')
return true;
else if (ch != ' ' && ch != '\t')
return false;
}
return false;
}
static void FoldBashDoc(unsigned int startPos, int length, int, WordList *[],
Accessor &styler) {
bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
unsigned int endPos = startPos + length;
int visibleChars = 0;
int lineCurrent = styler.GetLine(startPos);
int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;
int levelCurrent = levelPrev;
char chNext = styler[startPos];
int styleNext = styler.StyleAt(startPos);
for (unsigned int i = startPos; i < endPos; i++) {
char ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
int style = styleNext;
styleNext = styler.StyleAt(i + 1);
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
// Comment folding
if (foldComment && atEOL && IsCommentLine(lineCurrent, styler))
{
if (!IsCommentLine(lineCurrent - 1, styler)
&& IsCommentLine(lineCurrent + 1, styler))
levelCurrent++;
else if (IsCommentLine(lineCurrent - 1, styler)
&& !IsCommentLine(lineCurrent+1, styler))
levelCurrent--;
}
if (style == SCE_C_OPERATOR) {
if (ch == '{') {
levelCurrent++;
} else if (ch == '}') {
levelCurrent--;
}
}
if (atEOL) {
int lev = levelPrev;
if (visibleChars == 0 && foldCompact)
lev |= SC_FOLDLEVELWHITEFLAG;
if ((levelCurrent > levelPrev) && (visibleChars > 0))
lev |= SC_FOLDLEVELHEADERFLAG;
if (lev != styler.LevelAt(lineCurrent)) {
styler.SetLevel(lineCurrent, lev);
}
lineCurrent++;
levelPrev = levelCurrent;
visibleChars = 0;
}
if (!isspacechar(ch))
visibleChars++;
}
// Fill in the real level of the next line, keeping the current flags as they will be filled in later
int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;
styler.SetLevel(lineCurrent, levelPrev | flagsNext);
}
static const char * const bashWordListDesc[] = {
"Keywords",
0
};
LexerModule lmOMS(SCLEX_OMS, ColouriseBashDoc, "bash", FoldBashDoc, bashWordListDesc);

View File

@ -22,7 +22,6 @@ LexHTML.cxx \
LexYAML.cxx \
LexLua.cxx \
LexNsis.cxx \
LexOMS.cxx \
LexMatlab.cxx \
LexOthers.cxx \
LexPascal.cxx \

View File

@ -101,7 +101,7 @@
#define SCLEX_R 86
#define SCLEX_MAGIK 87
#define SCLEX_POWERSHELL 88
#define SCLEX_OMS 89
#define SCLEX_MYSQL 89
#define SCLEX_PO 90
#define SCLEX_AUTOMATIC 1000
#define SCE_P_DEFAULT 0

View File

@ -2007,7 +2007,7 @@ val SCLEX_ASYMPTOTE=85
val SCLEX_R=86
val SCLEX_MAGIK=87
val SCLEX_POWERSHELL=88
val SCLEX_OMS=89
val SCLEX_MYSQL=89
val SCLEX_PO=90
# When a lexer specifies its language as SCLEX_AUTOMATIC it receives a

View File

@ -61,7 +61,7 @@ MARSHALLER=scintilla-marshal.o
#**LEXOBJS=\\\n\(\*.o \)
LEXOBJS=\
LexAda.o LexBash.o LexAsm.o LexCSS.o LexCPP.o LexCrontab.o LexHTML.o LexOthers.o LexPascal.o \
LexPerl.o LexPython.o LexSQL.o LexCaml.o LexOMS.o LexTCL.o LexRuby.o LexFortran.o LexVHDL.o LexMatlab.o \
LexPerl.o LexPython.o LexSQL.o LexCaml.o LexTCL.o LexRuby.o LexFortran.o LexVHDL.o LexMatlab.o \
LexD.o LexLua.o LexHaskell.o LexBasic.o LexR.o LexYAML.o LexCmake.o LexNsis.o
#--Autogenerated -- end of automatically generated section

View File

@ -4369,7 +4369,6 @@ void editor_set_indentation_guides(GeanyEditor *editor)
case SCLEX_VHDL:
case SCLEX_FREEBASIC:
case SCLEX_D:
case SCLEX_OMS:
case SCLEX_MATLAB:
mode = SC_IV_LOOKBOTH;
break;

View File

@ -416,17 +416,6 @@ static void init_builtin_filetypes(void)
ft->comment_close = NULL;
ft->group = GEANY_FILETYPE_GROUP_MISC;
#define OMS
ft = filetypes[GEANY_FILETYPES_OMS];
ft->lang = -2;
ft->name = g_strdup("O-Matrix");
ft->title = g_strdup_printf(_("%s source file"), "O-Matrix");
ft->extension = g_strdup("oms");
ft->pattern = utils_strv_new("*.oms", NULL);
ft->comment_open = g_strdup("#");
ft->comment_close = NULL;
ft->group = GEANY_FILETYPE_GROUP_SCRIPT;
#define VHDL
ft = filetypes[GEANY_FILETYPES_VHDL];
ft->lang = 21;
@ -1228,7 +1217,6 @@ gchar *filetypes_get_conf_extension(gint filetype_idx)
case GEANY_FILETYPES_CPP: result = g_strdup("cpp"); break;
case GEANY_FILETYPES_CS: result = g_strdup("cs"); break;
case GEANY_FILETYPES_MAKE: result = g_strdup("makefile"); break;
case GEANY_FILETYPES_OMS: result = g_strdup("oms"); break;
default: result = g_ascii_strdown(filetypes[filetype_idx]->name, -1); break;
}
return result;

View File

@ -60,7 +60,6 @@ typedef enum
GEANY_FILETYPES_LUA,
GEANY_FILETYPES_MAKE,
GEANY_FILETYPES_MATLAB,
GEANY_FILETYPES_OMS,
GEANY_FILETYPES_PERL,
GEANY_FILETYPES_PHP,
GEANY_FILETYPES_PYTHON,

View File

@ -2656,59 +2656,6 @@ static void styleset_caml(ScintillaObject *sci)
}
static void styleset_oms_init(gint ft_id, GKeyFile *config, GKeyFile *config_home)
{
new_style_array(GEANY_FILETYPES_OMS, 11);
get_keyfile_hex(config, config_home, "styling", "default", "0x000000", "0xffffff", "false", &style_sets[GEANY_FILETYPES_OMS].styling[0]);
get_keyfile_hex(config, config_home, "styling", "commentline", "0x909090", "0xffffff", "false", &style_sets[GEANY_FILETYPES_OMS].styling[1]);
get_keyfile_hex(config, config_home, "styling", "number", "0x007f00", "0xffffff", "false", &style_sets[GEANY_FILETYPES_OMS].styling[2]);
get_keyfile_hex(config, config_home, "styling", "word", "0x991111", "0xffffff", "false", &style_sets[GEANY_FILETYPES_OMS].styling[3]);
get_keyfile_hex(config, config_home, "styling", "string", "0xff901e", "0xffffff", "false", &style_sets[GEANY_FILETYPES_OMS].styling[4]);
get_keyfile_hex(config, config_home, "styling", "character", "0x404000", "0xffffff", "false", &style_sets[GEANY_FILETYPES_OMS].styling[5]);
get_keyfile_hex(config, config_home, "styling", "operator", "0x000000", "0xffffff", "false", &style_sets[GEANY_FILETYPES_OMS].styling[6]);
get_keyfile_hex(config, config_home, "styling", "identifier", "0x000000", "0xffffff", "false", &style_sets[GEANY_FILETYPES_OMS].styling[7]);
get_keyfile_hex(config, config_home, "styling", "backticks", "0x000000", "0xe0c0e0", "false", &style_sets[GEANY_FILETYPES_OMS].styling[8]);
get_keyfile_hex(config, config_home, "styling", "param", "0x991111", "0x0000ff", "false", &style_sets[GEANY_FILETYPES_OMS].styling[9]);
get_keyfile_hex(config, config_home, "styling", "scalar", "0x0000ff", "0xffffff", "false", &style_sets[GEANY_FILETYPES_OMS].styling[10]);
style_sets[GEANY_FILETYPES_OMS].keywords = g_new(gchar*, 2);
get_keyfile_keywords(config, config_home, "keywords", "primary", GEANY_FILETYPES_OMS, 0, "clear seq fillcols fillrowsgaspect gaddview \
gtitle gxaxis gyaxis max contour gcolor gplot gaddview gxaxis gyaxis gcolor fill coldim gplot \
gtitle clear arcov dpss fspec cos gxaxis gyaxis gtitle gplot gupdate rowdim fill print for to begin \
end write cocreate coinvoke codispsave cocreate codispset copropput colsum sqrt adddialog \
addcontrol addcontrol delwin fillrows function gaspect conjdir");
style_sets[GEANY_FILETYPES_OMS].keywords[1] = NULL;
get_keyfile_wordchars(config, config_home,
&style_sets[GEANY_FILETYPES_OMS].wordchars);
}
static void styleset_oms(ScintillaObject *sci)
{
const filetype_id ft_id = GEANY_FILETYPES_OMS;
apply_filetype_properties(sci, SCLEX_OMS, ft_id);
SSM(sci, SCI_SETKEYWORDS, 0, (sptr_t) style_sets[GEANY_FILETYPES_OMS].keywords[0]);
set_sci_style(sci, STYLE_DEFAULT, GEANY_FILETYPES_OMS, 0);
set_sci_style(sci, SCE_SH_DEFAULT, GEANY_FILETYPES_OMS, 0);
set_sci_style(sci, SCE_SH_COMMENTLINE, GEANY_FILETYPES_OMS, 1);
set_sci_style(sci, SCE_SH_NUMBER, GEANY_FILETYPES_OMS, 2);
set_sci_style(sci, SCE_SH_WORD, GEANY_FILETYPES_OMS, 3);
set_sci_style(sci, SCE_SH_STRING, GEANY_FILETYPES_OMS, 4);
set_sci_style(sci, SCE_SH_CHARACTER, GEANY_FILETYPES_OMS, 5);
set_sci_style(sci, SCE_SH_OPERATOR, GEANY_FILETYPES_OMS, 6);
set_sci_style(sci, SCE_SH_IDENTIFIER, GEANY_FILETYPES_OMS, 7);
set_sci_style(sci, SCE_SH_BACKTICKS, GEANY_FILETYPES_OMS, 8);
set_sci_style(sci, SCE_SH_PARAM, GEANY_FILETYPES_OMS, 9);
set_sci_style(sci, SCE_SH_SCALAR, GEANY_FILETYPES_OMS, 10);
}
static void styleset_tcl_init(gint ft_id, GKeyFile *config, GKeyFile *config_home)
{
new_style_array(GEANY_FILETYPES_TCL, 16);
@ -3427,7 +3374,6 @@ void highlighting_init_styles(gint filetype_idx, GKeyFile *config, GKeyFile *con
init_styleset_case(GEANY_FILETYPES_MAKE, makefile);
init_styleset_case(GEANY_FILETYPES_MATLAB, matlab);
init_styleset_case(GEANY_FILETYPES_NSIS, nsis);
init_styleset_case(GEANY_FILETYPES_OMS, oms);
init_styleset_case(GEANY_FILETYPES_PASCAL, pascal);
init_styleset_case(GEANY_FILETYPES_PERL, perl);
init_styleset_case(GEANY_FILETYPES_PHP, php);
@ -3489,7 +3435,6 @@ void highlighting_set_styles(ScintillaObject *sci, gint filetype_idx)
styleset_case(GEANY_FILETYPES_MAKE, makefile);
styleset_case(GEANY_FILETYPES_MATLAB, matlab);
styleset_case(GEANY_FILETYPES_NSIS, nsis);
styleset_case(GEANY_FILETYPES_OMS, oms);
styleset_case(GEANY_FILETYPES_PASCAL, pascal);
styleset_case(GEANY_FILETYPES_PERL, perl);
styleset_case(GEANY_FILETYPES_PHP, php);

View File

@ -584,7 +584,6 @@ static gchar *make_comment_block(const gchar *comment_text, gint filetype_idx, g
case GEANY_FILETYPES_PERL:
case GEANY_FILETYPES_DIFF:
case GEANY_FILETYPES_TCL:
case GEANY_FILETYPES_OMS:
case GEANY_FILETYPES_CONF:
case GEANY_FILETYPES_PO:
case GEANY_FILETYPES_YAML:

View File

@ -76,7 +76,7 @@ scintilla_sources = [
'scintilla/LexBasic.cxx', 'scintilla/LexCaml.cxx', 'scintilla/LexCmake.cxx', 'scintilla/LexCPP.cxx',
'scintilla/LexCrontab.cxx', 'scintilla/LexCSS.cxx', 'scintilla/LexD.cxx',
'scintilla/LexFortran.cxx', 'scintilla/LexHaskell.cxx', 'scintilla/LexHTML.cxx',
'scintilla/LexLua.cxx', 'scintilla/LexNsis.cxx', 'scintilla/LexOMS.cxx', 'scintilla/LexOthers.cxx',
'scintilla/LexLua.cxx', 'scintilla/LexNsis.cxx', 'scintilla/LexOthers.cxx',
'scintilla/LexPascal.cxx', 'scintilla/LexPerl.cxx', 'scintilla/LexPython.cxx',
'scintilla/LexR.cxx', 'scintilla/LexMatlab.cxx', 'scintilla/LexYAML.cxx',
'scintilla/LexRuby.cxx', 'scintilla/LexSQL.cxx', 'scintilla/LexTCL.cxx',