Add tm_source_file_get_lang_name() as a wrapper for getLanguageName()

in parse.c.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1479 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2007-04-27 10:58:41 +00:00
parent 4a7d4da2be
commit 3489b63b7d
2 changed files with 19 additions and 0 deletions

View File

@ -123,6 +123,12 @@ gboolean tm_source_file_write(TMWorkObject *source_file, FILE *fp, guint attrs);
*/ */
extern guint source_file_class_id; extern guint source_file_class_id;
/*! Gets the name associated with the language index.
\param lang The language index.
\return The language name, or NULL.
*/
const gchar *tm_source_file_get_lang_name(gint lang);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -200,3 +200,16 @@ gboolean tm_source_file_write(TMWorkObject *source_file, FILE *fp, guint attrs)
} }
return TRUE; return TRUE;
} }
const gchar *tm_source_file_get_lang_name(gint lang)
{
if (NULL == LanguageTable)
{
initializeParsing();
installLanguageMapDefaults();
if (NULL == TagEntryFunction)
TagEntryFunction = tm_source_file_tags;
}
return getLanguageName(lang);
}