SF.net SVN: geany:[3409] trunk/tagmanager/rest.c
ntrel at users.sourceforge.net
ntrel at xxxxx
Fri Dec 19 18:11:54 UTC 2008
Revision: 3409
http://geany.svn.sourceforge.net/geany/?rev=3409&view=rev
Author: ntrel
Date: 2008-12-19 18:11:54 +0000 (Fri, 19 Dec 2008)
Log Message:
-----------
Fix indentation.
Modified Paths:
--------------
trunk/tagmanager/rest.c
Modified: trunk/tagmanager/rest.c
===================================================================
--- trunk/tagmanager/rest.c 2008-12-19 17:31:59 UTC (rev 3408)
+++ trunk/tagmanager/rest.c 2008-12-19 18:11:54 UTC (rev 3409)
@@ -24,8 +24,8 @@
* DATA DEFINITIONS
*/
typedef enum {
- K_CHAPTER,
- K_SECTION,
+ K_CHAPTER,
+ K_SECTION,
K_SUBSECTION,
K_SUBSUBSECTION
} restKind;
@@ -44,28 +44,28 @@
static void makeRestTag (const vString* const name,
kindOption* const kinds, const int kind)
{
- if (name != NULL && vStringLength (name) > 0)
- {
- tagEntryInfo e;
- initTagEntry (&e, vStringValue (name));
+ if (name != NULL && vStringLength (name) > 0)
+ {
+ tagEntryInfo e;
+ initTagEntry (&e, vStringValue (name));
- e.lineNumber--; /* we want the line before the '---' underline chars */
- e.kindName = kinds [kind].name;
- e.kind = kinds [kind].letter;
+ e.lineNumber--; /* we want the line before the '---' underline chars */
+ e.kindName = kinds [kind].name;
+ e.kind = kinds [kind].letter;
- makeTagEntry (&e);
- }
+ makeTagEntry (&e);
+ }
}
/* TODO: Parse any section with ispunct() underlining, in the order of first use.
* Also parse overlining & underlining as higher-level sections. */
static void findRestTags (void)
{
- vString *name = vStringNew ();
- const unsigned char *line;
+ vString *name = vStringNew ();
+ const unsigned char *line;
- while ((line = fileReadLine ()) != NULL)
- {
+ while ((line = fileReadLine ()) != NULL)
+ {
int line_len = strlen((const char*) line);
if (line_len >= 3 && vStringLength(name) > 0 &&
@@ -96,21 +96,22 @@
if (! isspace(*line))
vStringCatS(name, (const char*) line);
vStringTerminate(name);
- }
- vStringDelete (name);
+ }
+ vStringDelete (name);
}
extern parserDefinition* RestParser (void)
{
- static const char *const patterns [] = { "*.rest", "*.reST", NULL };
- static const char *const extensions [] = { "rest", NULL };
- parserDefinition* const def = parserNew ("reStructuredText");
- def->kinds = RestKinds;
- def->kindCount = KIND_COUNT (RestKinds);
- def->patterns = patterns;
- def->extensions = extensions;
- def->parser = findRestTags;
- return def;
+ static const char *const patterns [] = { "*.rest", "*.reST", NULL };
+ static const char *const extensions [] = { "rest", NULL };
+ parserDefinition* const def = parserNew ("reStructuredText");
+
+ def->kinds = RestKinds;
+ def->kindCount = KIND_COUNT (RestKinds);
+ def->patterns = patterns;
+ def->extensions = extensions;
+ def->parser = findRestTags;
+ return def;
}
/* vi:set tabstop=8 shiftwidth=4: */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list