~ubuntu-branches/ubuntu/jaunty/geany/jaunty

« back to all changes in this revision

Viewing changes to tagmanager/latex.c

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc
  • Date: 2007-02-25 21:12:13 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070225211213-jk4d4vxtgji0rj74
Tags: 0.10.2-0ubuntu1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
*   FUNCTION DEFINITIONS
55
55
*/
56
56
 
57
 
static int getWord(const char * ref, const char **pointer)
 
57
static int getWord(const char * ref, const char **ptr)
58
58
{
59
 
     const char * p = *pointer;
60
 
 
61
 
     while ((*ref != '\0') && (*p != '\0') && (*ref == *p))
62
 
        ref++, p++;
63
 
 
64
 
     if (*ref)
65
 
        return FALSE;
66
 
 
67
 
     *pointer = p;
68
 
     return TRUE;
 
59
    const char *p = *ptr;
 
60
 
 
61
        while ((*ref != '\0') && (*p != '\0') && (*ref == *p))
 
62
                ref++, p++;
 
63
 
 
64
 
 
65
    if (*ref)
 
66
                return FALSE;
 
67
 
 
68
        if (*p == '*') // to allow something like \section*{foobar}
 
69
                p++;
 
70
 
 
71
    *ptr = p;
 
72
        return TRUE;
69
73
}
70
74
 
71
75
static void createTag(int flags, TeXKind kind, const char * l)
92
96
            ++l;
93
97
        } while ((*l != '\0') && (*l != '}'));
94
98
        vStringTerminate(name);
95
 
        makeSimpleTag(name, TeXKinds, kind);
 
99
        if (name->buffer[0] != '}')
 
100
                makeSimpleTag(name, TeXKinds, kind);
96
101
     }
97
102
     else if (isalpha((int) *l) || *l == '@')
98
103
     {
127
132
        for (; *cp != '\0'; cp++)
128
133
        {
129
134
            if (*cp == '%')
130
 
                break;
 
135
                        break;
131
136
            if (*cp == '\\')
132
137
            {
133
138
                cp++;