3 * Copyright (c) 2001-2002, Biswapesh Chattopadhyay
5 * This source code is released for free distribution under the terms of the
6 * GNU General Public License.
10 #ifndef TM_SOURCE_FILE_H
11 #define TM_SOURCE_FILE_H
16 #ifndef LIBCTAGS_DEFINED
18 typedef void tagEntryInfo
;
21 #if !defined(tagEntryInfo)
29 /* Casts a pointer to a pointer to a TMSourceFile structure */
30 #define TM_SOURCE_FILE(source_file) ((TMSourceFile *) source_file)
32 /* Evaluates to X is X is defined, else evaluates to Y */
33 #define FALLBACK(X,Y) (X)?(X):(Y)
37 The TMSourceFile structure represents the source file and its tags in the tag manager.
41 langType lang
; /**< Programming language used */
42 char *file_name
; /**< Full file name (inc. path) */
43 char *short_name
; /**< Just the name of the file (without the path) */
44 GPtrArray
*tags_array
; /**< Sorted tag array obtained by parsing the object */
47 TMSourceFile
*tm_source_file_new(const char *file_name
, const char *name
);
49 void tm_source_file_free(TMSourceFile
*source_file
);
51 gchar
*tm_get_real_path(const gchar
*file_name
);
56 const gchar
*tm_source_file_get_lang_name(gint lang
);
58 gint
tm_source_file_get_named_lang(const gchar
*name
);
60 gboolean
tm_source_file_parse(TMSourceFile
*source_file
, guchar
* text_buf
, gsize buf_size
,
63 #endif /* GEANY_PRIVATE */
69 #endif /* TM_SOURCE_FILE_H */