geany
1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
![]() ![]() |
#include <stdlib.h>
#include <string.h>
#include <glib-object.h>
#include "tm_tag.h"
#include "tm_ctags.h"
Go to the source code of this file.
Classes | |
struct | TMSortOptions |
Macros | |
#define | TAG_NEW(T) ((T) = g_slice_new0(TMTag)) |
#define | TAG_FREE(T) g_slice_free(TMTag, (T)) |
Functions | |
GType | tm_tag_get_type (void) |
Gets the GType for a TMTag. More... | |
TMTag * | tm_tag_new (void) |
static void | tm_tag_destroy (TMTag *tag) |
void | tm_tag_unref (TMTag *tag) |
TMTag * | tm_tag_ref (TMTag *tag) |
static gint | tm_tag_compare (gconstpointer ptr1, gconstpointer ptr2, gpointer user_data) |
gboolean | tm_tags_equal (const TMTag *a, const TMTag *b) |
void | tm_tags_prune (GPtrArray *tags_array) |
void | tm_tags_dedup (GPtrArray *tags_array, TMTagAttrType *sort_attributes, gboolean unref_duplicates) |
void | tm_tags_sort (GPtrArray *tags_array, TMTagAttrType *sort_attributes, gboolean dedup, gboolean unref_duplicates) |
void | tm_tags_remove_file_tags (TMSourceFile *source_file, GPtrArray *tags_array) |
static GPtrArray * | merge (GPtrArray *big_array, GPtrArray *small_array, TMSortOptions *sort_options, gboolean unref_duplicates) |
GPtrArray * | tm_tags_merge (GPtrArray *big_array, GPtrArray *small_array, TMTagAttrType *sort_attributes, gboolean unref_duplicates) |
GPtrArray * | tm_tags_extract (GPtrArray *tags_array, TMTagType tag_types) |
void | tm_tags_array_free (GPtrArray *tags_array, gboolean free_all) |
static gpointer | binary_search (gpointer key, gpointer base, size_t nmemb, GCompareDataFunc compar, gpointer user_data) |
static gint | tag_search_cmp (gconstpointer ptr1, gconstpointer ptr2, gpointer user_data) |
TMTag ** | tm_tags_find (const GPtrArray *tags_array, const char *name, gboolean partial, guint *tagCount) |
const TMTag * | tm_get_current_tag (GPtrArray *file_tags, const gulong line, const TMTagType tag_types) |
gboolean | tm_tag_is_anon (const TMTag *tag) |
|
static |
|
static |
Definition at line 380 of file tm_tag.c.
References if(), tm_tag_compare(), and tm_tag_unref().
Referenced by styleset_from_mapping(), and tm_tags_merge().
|
static |
Definition at line 570 of file tm_tag.c.
References TMSortOptions::first, TMSortOptions::tags_array, and tm_tag_compare().
Referenced by tm_tags_find().
const TMTag * tm_get_current_tag | ( | GPtrArray * | file_tags, |
const gulong | line, | ||
const TMTagType | tag_types | ||
) |
Definition at line 646 of file tm_tag.c.
References line, TMTag::line, NULL, TM_TAG, and TMTag::type.
Referenced by get_current_tag_name().
|
static |
Definition at line 161 of file tm_tag.c.
References TMTag::arglist, FALLBACK, TMTag::file, TMTag::line, TMTag::name, NULL, TMSortOptions::partial, TMTag::scope, TMSortOptions::sort_attrs, tm_tag_attr_arglist_t, tm_tag_attr_file_t, tm_tag_attr_line_t, tm_tag_attr_name_t, tm_tag_attr_none_t, tm_tag_attr_scope_t, tm_tag_attr_type_t, tm_tag_attr_vartype_t, TMTag::type, and TMTag::var_type.
Referenced by merge(), tag_search_cmp(), tm_tags_dedup(), and tm_tags_sort().
|
static |
Definition at line 121 of file tm_tag.c.
References TMTag::arglist, TMTag::inheritance, TMTag::name, TMTag::scope, and TMTag::var_type.
Referenced by tm_tag_unref().
GType tm_tag_get_type | ( | void | ) |
Gets the GType for a TMTag.
Definition at line 91 of file tm_tag.c.
References tm_tag_ref(), and tm_tag_unref().
gboolean tm_tag_is_anon | ( | const TMTag * | tag | ) |
Definition at line 668 of file tm_tag.c.
References dummy, TMTag::lang, and TMTag::name.
Referenced by fill_find_tags_array_prefix(), find_scope_members(), and find_scope_members_tags().
TMTag * tm_tag_new | ( | void | ) |
Definition at line 106 of file tm_tag.c.
References TMTag::refcount, and TAG_NEW.
Referenced by new_tag_from_tags_file(), and write_entry().
Definition at line 152 of file tm_tag.c.
References TMTag::refcount.
Referenced by show_goto_popup(), and tm_tag_get_type().
void tm_tag_unref | ( | TMTag * | tag | ) |
Definition at line 136 of file tm_tag.c.
References NULL, TMTag::refcount, TAG_FREE, and tm_tag_destroy().
Referenced by merge(), new_tag_from_tags_file(), on_find_usage(), rescan_failed(), show_goto_popup(), taglist_go_to_selection(), tm_tag_get_type(), tm_tags_array_free(), tm_tags_dedup(), tree_sort_func(), update_tree_tags(), and write_entry().
void tm_tags_array_free | ( | GPtrArray * | tags_array, |
gboolean | free_all | ||
) |
Definition at line 529 of file tm_tag.c.
References tm_tag_unref().
Referenced by tm_source_file_destroy(), tm_source_file_parse(), and tm_workspace_free().
void tm_tags_dedup | ( | GPtrArray * | tags_array, |
TMTagAttrType * | sort_attributes, | ||
gboolean | unref_duplicates | ||
) |
Definition at line 267 of file tm_tag.c.
References NULL, TMSortOptions::partial, TMSortOptions::sort_attrs, tm_tag_compare(), tm_tag_unref(), and tm_tags_prune().
Referenced by tm_tags_sort(), and tm_workspace_find_scope_members().
Definition at line 221 of file tm_tag.c.
References TMTag::access, TMTag::arglist, FALLBACK, TMTag::file, TMTag::impl, TMTag::inheritance, TMTag::lang, TMTag::line, TMTag::local, TMTag::name, TMTag::pointerOrder, TMTag::scope, TMTag::type, and TMTag::var_type.
Referenced by update_tree_tags().
GPtrArray * tm_tags_extract | ( | GPtrArray * | tags_array, |
TMTagType | tag_types | ||
) |
Definition at line 505 of file tm_tag.c.
References NULL.
Referenced by merge_extracted_tags(), tm_workspace_load_global_tags(), and tm_workspace_update().
TMTag ** tm_tags_find | ( | const GPtrArray * | tags_array, |
const char * | name, | ||
gboolean | partial, | ||
guint * | tagCount | ||
) |
Definition at line 603 of file tm_tag.c.
References binary_search(), TMSortOptions::first, name, TMTag::name, NULL, TMSortOptions::partial, TMSortOptions::sort_attrs, tag_search_cmp(), and TMSortOptions::tags_array.
Referenced by fill_find_tags_array(), fill_find_tags_array_prefix(), and tm_tags_remove_file_tags().
GPtrArray * tm_tags_merge | ( | GPtrArray * | big_array, |
GPtrArray * | small_array, | ||
TMTagAttrType * | sort_attributes, | ||
gboolean | unref_duplicates | ||
) |
Definition at line 482 of file tm_tag.c.
References merge(), TMSortOptions::partial, and TMSortOptions::sort_attrs.
Referenced by tm_workspace_load_global_tags(), and tm_workspace_merge_tags().
void tm_tags_prune | ( | GPtrArray * | tags_array | ) |
Definition at line 246 of file tm_tag.c.
Referenced by find_calltip(), tm_tags_dedup(), and tm_tags_remove_file_tags().
void tm_tags_remove_file_tags | ( | TMSourceFile * | source_file, |
GPtrArray * | tags_array | ||
) |
Definition at line 311 of file tm_tag.c.
References TMTag::file, TMTag::name, NULL, TMSourceFile::tags_array, tm_tags_find(), and tm_tags_prune().
Referenced by tm_workspace_remove_source_file(), and update_source_file().
void tm_tags_sort | ( | GPtrArray * | tags_array, |
TMTagAttrType * | sort_attributes, | ||
gboolean | dedup, | ||
gboolean | unref_duplicates | ||
) |
Definition at line 297 of file tm_tag.c.
References TMSortOptions::partial, TMSortOptions::sort_attrs, tm_tag_compare(), and tm_tags_dedup().
Referenced by find_calltip(), tm_workspace_create_global_tags(), tm_workspace_find(), tm_workspace_find_prefix(), tm_workspace_load_global_tags(), tm_workspace_update(), and update_source_file().