Revision: 1226 http://svn.sourceforge.net/geany/?rev=1226&view=rev Author: eht16 Date: 2007-01-24 11:52:12 -0800 (Wed, 24 Jan 2007)
Log Message: ----------- Allow \section*{} and other commands with *.
Modified Paths: -------------- trunk/ChangeLog trunk/tagmanager/latex.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-01-24 19:20:12 UTC (rev 1225) +++ trunk/ChangeLog 2007-01-24 19:52:12 UTC (rev 1226) @@ -10,6 +10,7 @@ Made Insert Special HTML characters insensitive if there are no open tabs. Removed Zoom items from popup menu. + * tagmanager/latex.c: Allow \section*{} and other commands with *.
2007-01-24 Nick Treleaven nick.treleaven@btinternet.com
Modified: trunk/tagmanager/latex.c =================================================================== --- trunk/tagmanager/latex.c 2007-01-24 19:20:12 UTC (rev 1225) +++ trunk/tagmanager/latex.c 2007-01-24 19:52:12 UTC (rev 1226) @@ -54,18 +54,22 @@ * FUNCTION DEFINITIONS */
-static int getWord(const char * ref, const char **pointer) +static int getWord(const char * ref, const char **ptr) { - const char * p = *pointer; + const char *p = *ptr;
- while ((*ref != '\0') && (*p != '\0') && (*ref == *p)) - ref++, p++; + while ((*ref != '\0') && (*p != '\0') && (*ref == *p)) + ref++, p++;
- if (*ref) - return FALSE;
- *pointer = p; - return TRUE; + if (*ref) + return FALSE; + + if (*p == '*') // to allow something like \section*{foobar} + p++; + + *ptr = p; + return TRUE; }
static void createTag(int flags, TeXKind kind, const char * l) @@ -92,7 +96,8 @@ ++l; } while ((*l != '\0') && (*l != '}')); vStringTerminate(name); - makeSimpleTag(name, TeXKinds, kind); + if (name->buffer[0] != '}') + makeSimpleTag(name, TeXKinds, kind); } else if (isalpha((int) *l) || *l == '@') { @@ -127,7 +132,7 @@ for (; *cp != '\0'; cp++) { if (*cp == '%') - break; + break; if (*cp == '\') { cp++;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.