~ubuntu-branches/ubuntu/utopic/geany/utopic

« back to all changes in this revision

Viewing changes to tagmanager/sql.c

  • Committer: Package Import Robot
  • Author(s): Chow Loong Jin
  • Date: 2011-12-10 07:43:26 UTC
  • mfrom: (3.3.7 sid)
  • Revision ID: package-import@ubuntu.com-20111210074326-s8yqbew5i20h33tf
Tags: 0.21-1ubuntu1
* Merge from Debian Unstable, remaining changes:
  - debian/patches/20_use_evince_viewer.patch:
     + use evince as viewer for pdf and dvi files
  - debian/patches/20_use_x_terminal_emulator.patch:
     + use x-terminal-emulator as terminal
  - debian/control
     + Add breaks on geany-plugins-common << 0.20
* Also fixes bugs:
  - Filter for MATLAB/Octave files filters everythign (LP: 885505)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
*   $Id: sql.c 3184 2008-11-07 14:37:17Z eht16 $
 
2
*   $Id: sql.c 5856 2011-06-17 22:52:43Z colombanw $
3
3
*
4
4
*   Copyright (c) 2002-2003, Darren Hiebert
5
5
*
137
137
    vString *   string;
138
138
    vString *   scope;
139
139
    unsigned long lineNumber;
140
 
    fpos_t filePosition;
141
 
    int bufferPosition; /* buffer position of line containing name */
 
140
    MIOPos filePosition;
142
141
} tokenInfo;
143
142
 
144
143
/*
183
182
    { FALSE, 'l', "local",        "local variables"        },
184
183
    { TRUE,  'L', "label",        "block label"            },
185
184
    { TRUE,  'P', "package",      "packages"               },
186
 
    { TRUE,  'p', "procedure",    "procedures"             },
 
185
    { TRUE,  'n', "namespace",    "procedures"             },
187
186
    { FALSE, 'r', "record",       "records"                },
188
187
    { TRUE,  's', "subtype",      "subtypes"               },
189
 
    { TRUE,  't', "table",        "tables"                 },
190
 
    { TRUE,  'T', "trigger",      "triggers"               },
 
188
    { TRUE,  't', "class",        "tables"                 },
 
189
    { TRUE,  'T', "macro",        "triggers"               },
191
190
    { TRUE,  'v', "variable",     "variables"              },
192
 
    { TRUE,  'i', "index",        "indexes"                },
 
191
    { TRUE,  'i', "struct",       "indexes"                },
193
192
    { TRUE,  'e', "event",        "events"                 },
194
193
    { TRUE,  'U', "publication",  "publications"           },
195
194
    { TRUE,  'R', "service",      "services"               },
196
195
    { TRUE,  'D', "domain",       "domains"                },
197
 
    { TRUE,  'V', "view",         "views"                  },
 
196
    { TRUE,  'm', "member",       "views"                  },
198
197
    { TRUE,  'n', "synonym",      "synonyms"               },
199
198
    { TRUE,  'x', "mltable",      "MobiLink Table Scripts" },
200
199
    { TRUE,  'y', "mlconn",       "MobiLink Conn Scripts"  }
268
267
*   DEBUG function
269
268
*/
270
269
 
271
 
static void dispToken (tokenInfo *const token, char * location)
 
270
static void dispToken (tokenInfo *const token, const char * location)
272
271
{
273
272
#ifdef DEBUG
274
273
    if ( isKeyword(token, KEYWORD_NONE) )
392
391
        initTagEntry (&e, name);
393
392
 
394
393
        e.lineNumber   = token->lineNumber;
395
 
        if (useFile())
396
 
            e.filePosition      = token->filePosition;
397
 
        else
398
 
            e.bufferPosition    = token->bufferPosition;
 
394
        e.filePosition = token->filePosition;
399
395
        e.kindName     = SqlKinds [kind].name;
400
396
        e.kind         = SqlKinds [kind].letter;
401
397
 
495
491
            token->type = TOKEN_STRING;
496
492
            parseString (token->string, c);
497
493
            token->lineNumber = getSourceLineNumber ();
498
 
            if (useFile())
499
 
                token->filePosition     = getInputFilePosition ();
500
 
            else
501
 
                token->bufferPosition = getInputBufferPosition ();
 
494
            token->filePosition = getInputFilePosition ();
502
495
            break;
503
496
 
504
497
        case '-':
564
557
            {
565
558
                parseIdentifier (token->string, c);
566
559
                token->lineNumber = getSourceLineNumber ();
567
 
                if (useFile())
568
 
                    token->filePosition = getInputFilePosition ();
569
 
                else
570
 
                    token->bufferPosition = getInputBufferPosition ();
 
560
                token->filePosition = getInputFilePosition ();
571
561
                token->keyword = analyzeToken (token->string);
572
562
                if (isKeyword (token, KEYWORD_rem))
573
563
                {