2 * (c) Oleg Puchinin (aka GrayCardinal) 2006
3 * graycardinalster@gmail.com
18 /*** ./got_tag.cpp ***/
19 EArray
* got_tag_ctags (char * d_tag
) ;
21 void make_ctags (EArray
* d_files
);
22 void mk_tags (char *f_name
, DArray
*d_in
= NULL
);
23 bool local_define_test (char * d_op
);
24 char * cts (struct c_word
* d_word
);
25 DArray
* split_to_words (char * d_op
);
26 char * ww_last_word (char *d_op
);
27 int ww_begin_line (struct tt_state_t
* d_tt_state
, char *d_out
, int d_offset
);
28 void mk_tag_macro (char * d_op
, char * d_file
, int t_line
);
29 void mk_tag (char * d_op
, char * d_file
, int line
, int d_found_type
);
30 void mk_tag_structtail (char * S
, char * d_file
, int t_line
);
31 void tags (DArray
* d_names
, char * d_file_output
= NULL
);
32 void nogui_tagsdump (char * f_name
, int n_trip
);
33 void tree_echo (int n_trip
, char *S
);
34 struct tt_state_t
* get_onett_tag (char * f_name
, char ** d_tt_buf
);
35 struct hash_t
* parse_variable (char *OP
);
36 int fdecl_parse (char * d_out
, DArray
* d_vars
);
37 char * sstrkill (char *OP
);
40 #define GLOBAL_TYPE_VARIABLE (1<<0)
41 #define GLOBAL_TYPE_TYPEDEF (1<<1)
42 #define GLOBAL_TYPE_EXTERN (1<<2)
43 #define GLOBAL_TYPE_FUNCTION (1<<3)
44 #define GLOBAL_TYPE_STRUCT (1<<4)
47 #define OP_TYPE_VARIABLE GLOBAL_TYPE_VARIABLE
48 #define OP_TYPE_TYPEDEF GLOBAL_TYPE_TYPEDEF
49 #define OP_TYPE_EXTERN GLOBAL_TYPE_EXTERN
50 #define OP_TYPE_FUNCTION GLOBAL_TYPE_FUNCTION
51 #define OP_TYPE_STRUCT GLOBAL_TYPE_STRUCT
52 #define OP_TYPE_MACRO (1<<5)
54 #define OP_TYPE_OP (1<<6)
55 #define OP_TYPE_CALL (1<<7)
56 #define OP_TYPE_DEFINE (1<<8)
57 #define OP_TYPE_NOP (1<<9)
58 #define OP_TYPE_OTHER (1<<31)
59 #define GLOBAL_TYPE_DEFINE OP_TYPE_DEFINE
61 #define GLOBAL_TYPE_CLASS (1<<10)
62 #define OP_TYPE_CLASS GLOBAL_TYPE_CLASS
63 #define GLOBAL_TYPE_NAMESPACE (1<<11)
64 #define OP_TYPE_NAMESPACE GLOBAL_TYPE_NAMESPACE
66 char * sstrend (char * d_ptr
);
67 int words_count (char *S
);
68 int what_is_this (char * d_op
, char ch
);
70 /*** ./nogui_fdump.cpp ***/
71 void nogui_fdump (fdump_param_t
* d_param
);
73 /*** ./the_tt.cpp ***/
77 int the_tt_main (char * f_name
) ;
78 char * do_tt_file (tt_state_t
* d_tt_state
);
79 void free_tt_state (struct tt_state_t
* S
);
81 #define do_tt THE_TT::do_tt_file
83 void skip_macro (char ** d_ptr
, char ** d_out
, char ch
);
84 char * macro_name (char * d_op
, char * mname
);
85 char t_op (char ** d_in
, char ** d_out
, bool b_no_operator
= false) ;
87 // Informational functions
88 void bug_longmacro ();
89 void bug_nosuch_tag (char *);
90 void bug_nocalltags ();
92 inline bool abc_test (char * ptr
)
102 // Hmm. It's not globals. It's environments.
105 #define __EXTERN extern
110 __EXTERN
uint32_t sb_flags
;
130 #define SB_FLSET(arg) (sb_flags |= (1<<arg))
131 #define SB_FLGET(arg) (sb_flags & (1<<arg))
133 __EXTERN EArray
* d_tags_file
;
134 __EXTERN
bool d_dbg_SDBG_active
;
135 __EXTERN
int t_op_no
;
136 __EXTERN
FILE *cscope_in
, *cscope_out
;
137 __EXTERN
FILE *d_stream_dbg
;
138 __EXTERN pid_t gvim_pid
;
139 __EXTERN EArray
* immune_list
;
140 __EXTERN EArray
* full_list
;
141 __EXTERN
int d_depth
;
143 inline bool tree_immune (char * m_fname
)
145 return immune_list
->sfind (m_fname
) == -1 ? false : true;
148 // Initial constants.
149 __EXTERN EArray
* d_cops
;