~ubuntu-branches/ubuntu/natty/geany/natty

« back to all changes in this revision

Viewing changes to scintilla/LexAsm.cxx

  • Committer: Bazaar Package Importer
  • Author(s): Gauvain Pocentek
  • Date: 2009-01-01 18:40:50 UTC
  • mfrom: (1.1.8 upstream) (3.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20090101184050-u635kualu7amyt4a
Tags: 0.15-1ubuntu1
* Merge from debian experimental, remaining change:
  - patches/20_add_debdiff_as_diff_type.dpatch: Also recognize .dpatch files
    as diff's
  - debian/geany.xpm: Replace icon with a .xpm of the new one

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
                ch == '%' || ch == '@' || ch == '$' || ch == '?');
38
38
}
39
39
 
40
 
static inline bool IsAsmOperator(char ch) {
41
 
        if (isalnum(ch))
 
40
static inline bool IsAsmOperator(const int ch) {
 
41
        if ((ch < 0x80) && (isalnum(ch)))
42
42
                return false;
43
43
        // '.' left out as it is used to make up numbers
44
44
        if (ch == '*' || ch == '/' || ch == '-' || ch == '+' ||
89
89
 
90
90
                // Determine if the current state should terminate.
91
91
                if (sc.state == SCE_ASM_OPERATOR) {
92
 
                        if (!IsAsmOperator(static_cast<char>(sc.ch))) {
 
92
                        if (!IsAsmOperator(sc.ch)) {
93
93
                            sc.SetState(SCE_ASM_DEFAULT);
94
94
                        }
95
95
                }else if (sc.state == SCE_ASM_NUMBER) {
149
149
                if (sc.state == SCE_ASM_DEFAULT) {
150
150
                        if (sc.ch == ';'){
151
151
                                sc.SetState(SCE_ASM_COMMENT);
152
 
                        } else if (isdigit(sc.ch) || (sc.ch == '.' && isdigit(sc.chNext))) {
 
152
                        } else if (isascii(sc.ch) && (isdigit(sc.ch) || (sc.ch == '.' && isascii(sc.chNext) && isdigit(sc.chNext)))) {
153
153
                                sc.SetState(SCE_ASM_NUMBER);
154
154
                        } else if (IsAWordStart(sc.ch)) {
155
155
                                sc.SetState(SCE_ASM_IDENTIFIER);
157
157
                                sc.SetState(SCE_ASM_STRING);
158
158
                        } else if (sc.ch == '\'') {
159
159
                                sc.SetState(SCE_ASM_CHARACTER);
160
 
                        } else if (IsAsmOperator(static_cast<char>(sc.ch))) {
 
160
                        } else if (IsAsmOperator(sc.ch)) {
161
161
                                sc.SetState(SCE_ASM_OPERATOR);
162
162
                        }
163
163
                }