Kaydet (Commit) 12104026 authored tarafından Enrico Tröger's avatar Enrico Tröger

Backport changes from CTags SVN to fix parse problems in the Ruby parser.

Add filetype extension "*.ruby".


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1563 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst bd205a73
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
* geany.glade, src/dialogs.c, src/geany.h, src/interface.c, * geany.glade, src/dialogs.c, src/geany.h, src/interface.c,
src/keyfile.c, src/main.c, src/prefs.c: src/keyfile.c, src/main.c, src/prefs.c:
Add default startup directory option (closes #1704988). Add default startup directory option (closes #1704988).
* tagmanager/ruby.c, tagmanager/strlist.c, tagmanager/strlist.h:
Backport changes from CTags SVN to fix parse problems in the Ruby
parser.
* data/filetype_extensions.conf, src/filetypes.c:
Add filetype extension "*.ruby".
2007-05-23 Nick Treleaven <nick.treleaven@btinternet.com> 2007-05-23 Nick Treleaven <nick.treleaven@btinternet.com>
......
...@@ -14,7 +14,7 @@ Perl=*.pl;*.perl;*.pm;*.agi;*.pod; ...@@ -14,7 +14,7 @@ Perl=*.pl;*.perl;*.pm;*.agi;*.pod;
PHP=*.php;*.php3;*.php4;*.php5;*.phtml; PHP=*.php;*.php3;*.php4;*.php5;*.phtml;
Javascript=*.js; Javascript=*.js;
Python=*.py;*.pyw; Python=*.py;*.pyw;
Ruby=*.rb;*.rhtml; Ruby=*.rb;*.rhtml;*.ruby;
Tcl=*.tcl;*.tk;*.wish; Tcl=*.tcl;*.tk;*.wish;
Lua=*.lua; Lua=*.lua;
Ferite=*.fe; Ferite=*.fe;
......
...@@ -301,7 +301,7 @@ void filetypes_init_types() ...@@ -301,7 +301,7 @@ void filetypes_init_types()
filetypes[GEANY_FILETYPES_RUBY]->has_tags = TRUE; filetypes[GEANY_FILETYPES_RUBY]->has_tags = TRUE;
filetypes[GEANY_FILETYPES_RUBY]->title = g_strdup(_("Ruby source file")); filetypes[GEANY_FILETYPES_RUBY]->title = g_strdup(_("Ruby source file"));
filetypes[GEANY_FILETYPES_RUBY]->extension = g_strdup("rb"); filetypes[GEANY_FILETYPES_RUBY]->extension = g_strdup("rb");
filetypes[GEANY_FILETYPES_RUBY]->pattern = utils_strv_new("*.rb", "*.rhtml", NULL); filetypes[GEANY_FILETYPES_RUBY]->pattern = utils_strv_new("*.rb", "*.rhtml", "*.ruby", NULL);
filetypes[GEANY_FILETYPES_RUBY]->style_func_ptr = styleset_ruby; filetypes[GEANY_FILETYPES_RUBY]->style_func_ptr = styleset_ruby;
filetypes[GEANY_FILETYPES_RUBY]->comment_open = g_strdup("#"); filetypes[GEANY_FILETYPES_RUBY]->comment_open = g_strdup("#");
filetypes[GEANY_FILETYPES_RUBY]->comment_close = NULL; filetypes[GEANY_FILETYPES_RUBY]->comment_close = NULL;
......
This diff is collapsed.
This diff is collapsed.
/* /*
* $Id$
* *
* Copyright (c) 1999-2001, Darren Hiebert * Copyright (c) 1999-2002, Darren Hiebert
* *
* This source code is released for free distribution under the terms of the * This source code is released for free distribution under the terms of the
* GNU General Public License. * GNU General Public License.
...@@ -13,7 +14,7 @@ ...@@ -13,7 +14,7 @@
/* /*
* INCLUDE FILES * INCLUDE FILES
*/ */
#include "general.h" /* must always come first */ #include "general.h" /* must always come first */
#include "vstring.h" #include "vstring.h"
...@@ -21,9 +22,9 @@ ...@@ -21,9 +22,9 @@
* DATA DECLARATIONS * DATA DECLARATIONS
*/ */
typedef struct sStringList { typedef struct sStringList {
unsigned int max; unsigned int max;
unsigned int count; unsigned int count;
vString **list; vString **list;
} stringList; } stringList;
/* /*
...@@ -31,20 +32,23 @@ typedef struct sStringList { ...@@ -31,20 +32,23 @@ typedef struct sStringList {
*/ */
extern stringList *stringListNew (void); extern stringList *stringListNew (void);
extern void stringListAdd (stringList *const current, vString *string); extern void stringListAdd (stringList *const current, vString *string);
extern void stringListRemoveLast (stringList *const current);
extern void stringListCombine (stringList *const current, stringList *const from); extern void stringListCombine (stringList *const current, stringList *const from);
extern stringList* stringListNewFromArgv (const char* const* const list); extern stringList* stringListNewFromArgv (const char* const* const list);
extern stringList* stringListNewFromFile (const char* const fileName); extern stringList* stringListNewFromFile (const char* const fileName);
extern void stringListClear (stringList *const current); extern void stringListClear (stringList *const current);
extern unsigned int stringListCount (const stringList *const current); extern unsigned int stringListCount (const stringList *const current);
extern vString* stringListItem (const stringList *const current, const unsigned int indx); extern vString* stringListItem (const stringList *const current, const unsigned int indx);
extern vString* stringListLast (const stringList *const current);
extern void stringListDelete (stringList *const current); extern void stringListDelete (stringList *const current);
extern boolean stringListHasInsensitive (const stringList *const current, const char *const string); extern boolean stringListHasInsensitive (const stringList *const current, const char *const string);
extern boolean stringListHas (const stringList *const current, const char *const string); extern boolean stringListHas (const stringList *const current, const char *const string);
extern boolean stringListHasFile (const stringList *const current, const char *const file); extern boolean stringListHasTest (const stringList *const current, boolean (*test)(const char *s));
extern boolean stringListRemoveExtension (stringList* const current, const char* const extension);
extern boolean stringListExtensionMatched (const stringList* const list, const char* const extension); extern boolean stringListExtensionMatched (const stringList* const list, const char* const extension);
extern boolean stringListFileMatched (const stringList* const list, const char* const str); extern boolean stringListFileMatched (const stringList* const list, const char* const str);
extern void stringListPrint (const stringList *const current); extern void stringListPrint (const stringList *const current);
#endif /* _STRLIST_H */ #endif /* _STRLIST_H */
/* vi:set tabstop=8 shiftwidth=4: */ /* vi:set tabstop=4 shiftwidth=4: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment