Skip to content

Commit

Permalink
debugger: Add header guards
Browse files Browse the repository at this point in the history
  • Loading branch information
b4n committed Jun 8, 2012
1 parent 097f70d commit 86f0d94
Show file tree
Hide file tree
Showing 23 changed files with 117 additions and 11 deletions.
6 changes: 5 additions & 1 deletion debugger/src/atree.h
Expand Up @@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/


#ifndef ATREE_H
#define ATREE_H

GtkWidget* atree_init(watch_expanded_callback expanded, watch_button_pressed buttonpressed);

#endif /* guard */
5 changes: 5 additions & 0 deletions debugger/src/bptree.h
Expand Up @@ -19,6 +19,9 @@
* MA 02110-1301, USA.
*/

#ifndef BPTREE_H
#define BPTREE_H

gboolean bptree_init(move_to_line_cb callback);
void bptree_destroy(void);
void bptree_add_breakpoint(breakpoint* bp);
Expand All @@ -30,3 +33,5 @@ void bptree_set_enabled(breakpoint* bp);
gchar* bptree_get_condition(breakpoint* bp);
void bptree_set_readonly(gboolean readonly);
void bptree_update_file_nodes(void);

#endif /* guard */
7 changes: 6 additions & 1 deletion debugger/src/breakpoint.h
Expand Up @@ -18,7 +18,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/


#ifndef BREAKPOINT_H
#define BREAKPOINT_H

/* maximum condition length */
#define CONDITION_MAX_LENGTH 1024

Expand All @@ -34,3 +37,5 @@ typedef struct _breakpoint {

breakpoint* break_new(void);
breakpoint* break_new_full(const char* file, int line, const char* condition, int enabled, int hitscount);

#endif /* guard */
5 changes: 5 additions & 0 deletions debugger/src/breakpoints.h
Expand Up @@ -19,6 +19,9 @@
* MA 02110-1301, USA.
*/

#ifndef BREAKPOINTS_H
#define BREAKPOINTS_H

#include "breakpoint.h"

typedef enum _break_state {
Expand All @@ -45,3 +48,5 @@ break_state breaks_get_state(const char* file, int line);
GList* breaks_get_for_document(const char* file);
GList* breaks_get_all(void);
breakpoint* breaks_lookup_breakpoint(const gchar* file, int line);

#endif /* guard */
5 changes: 5 additions & 0 deletions debugger/src/btnpanel.h
Expand Up @@ -19,7 +19,12 @@
* MA 02110-1301, USA.
*/

#ifndef BTNPANEL_H
#define BTNPANEL_H

typedef void (*on_toggle)(GtkToggleButton *button, gpointer user_data);

GtkWidget* btnpanel_create(on_toggle cb);
void btnpanel_set_debug_state(enum dbs state);

#endif /* guard */
5 changes: 5 additions & 0 deletions debugger/src/callbacks.h
Expand Up @@ -19,8 +19,13 @@
* MA 02110-1301, USA.
*/

#ifndef CALLBACKS_H
#define CALLBACKS_H

void on_document_open(GObject *obj, GeanyDocument *doc, gpointer user_data);
void on_document_save(GObject *obj, GeanyDocument *doc, gpointer user_data);
void on_document_before_save(GObject *obj, GeanyDocument *doc, gpointer user_data);
gboolean on_editor_notify(GObject *object, GeanyEditor *editor, SCNotification *nt, gpointer data);
gboolean keys_callback(guint key_id);

#endif /* guard */
7 changes: 6 additions & 1 deletion debugger/src/calltip.h
Expand Up @@ -18,8 +18,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/


#ifndef CALLTIP_H
#define CALLTIP_H

#define MAX_CALLTIP_LENGTH 140
#define MAX_CALLTIP_HEIGHT 20

GString* get_calltip_line(variable *var, gboolean firstline);

#endif /* guard */
5 changes: 5 additions & 0 deletions debugger/src/dconfig.h
Expand Up @@ -19,6 +19,9 @@
* MA 02110-1301, USA.
*/

#ifndef DCOFIG_H
#define DCOFIG_H

#include <stdarg.h>

/* panel config parts */
Expand Down Expand Up @@ -65,3 +68,5 @@ void config_on_project_save(GObject *obj, GKeyFile *config, gpointer user_data)
void config_update_project_keyfile(void);

GtkWidget *config_plugin_configure(GtkDialog *dialog);

#endif /* guard */
6 changes: 5 additions & 1 deletion debugger/src/debug.h
Expand Up @@ -18,7 +18,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/


#ifndef DEBUG_H
#define DEBUG_H

#include "debug_module.h"
#include "markers.h"

Expand Down Expand Up @@ -50,3 +53,4 @@ GList* debug_get_stack(void);
void debug_restart(void);
int debug_get_active_frame(void);

#endif /* guard */
7 changes: 6 additions & 1 deletion debugger/src/debug_module.h
Expand Up @@ -18,7 +18,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/


#ifndef DEBUG_MODULE_H
#define DEBUG_MODULE_H

/* debug states enumeration */
enum dbs {
DBS_IDLE,
Expand Down Expand Up @@ -165,3 +168,5 @@ void variable_reset(variable *var);

frame* frame_new(void);
void frame_free(frame* f);

#endif /* guard */
5 changes: 5 additions & 0 deletions debugger/src/dpaned.h
Expand Up @@ -20,7 +20,12 @@
* MA 02110-1301, USA.
*/

#ifndef DPANED_H
#define DPANED_H

void dpaned_init(void);
void dpaned_destroy(void);
GtkWidget* dpaned_get_paned(void);
void dpaned_set_tabbed(gboolean paned);

#endif /* guard */
5 changes: 5 additions & 0 deletions debugger/src/envtree.h
Expand Up @@ -19,9 +19,14 @@
* MA 02110-1301, USA.
*/

#ifndef ENVTREE_H
#define ENVTREE_H

GtkWidget* envtree_init(void);
void envtree_destroy(void);
void envtree_clear(void);
void envtree_set_readonly(gboolean readonly);
void envtree_add_environment(const gchar *name, const gchar *value);
GList* envpage_get_environment(void);

#endif /* guard */
5 changes: 5 additions & 0 deletions debugger/src/gui.h
Expand Up @@ -19,8 +19,13 @@
* MA 02110-1301, USA.
*/

#ifndef GUI_H
#define GUI_H

GtkWidget* create_button(const gchar *icon, const gchar *tooltip);
GtkWidget* create_stock_button(const gchar *stockid, const gchar *tooltip);
GtkWidget* create_toggle_button(const gchar *stockid, const gchar *tooltip);

void set_button_image(GtkWidget *btn, const gchar *icon);

#endif /* guard */
5 changes: 5 additions & 0 deletions debugger/src/keys.h
Expand Up @@ -19,6 +19,9 @@
* MA 02110-1301, USA.
*/

#ifndef KEYS_H
#define KEYS_H

/* hotkeys enumeration */
enum KEYS
{
Expand All @@ -34,3 +37,5 @@ enum KEYS
};

gboolean keys_init(void);

#endif /* guard */
7 changes: 5 additions & 2 deletions debugger/src/markers.h
Expand Up @@ -18,7 +18,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/


#ifndef MARKERS_H
#define MARKERS_H

void markers_init(void);
void markers_set_for_document(ScintillaObject *sci);
void markers_add_breakpoint(breakpoint* bp);
Expand All @@ -29,4 +32,4 @@ void markers_add_frame(char* file, int line);
void markers_remove_frame(char* file, int line);
void markers_remove_all(GeanyDocument *doc);


#endif /* guard */
5 changes: 5 additions & 0 deletions debugger/src/pixbuf.h
Expand Up @@ -19,6 +19,9 @@
* MA 02110-1301, USA.
*/

#ifndef PIXBUF_H
#define PIXBUF_H

extern GdkPixbuf *break_pixbuf;
extern GdkPixbuf *break_disabled_pixbuf;
extern GdkPixbuf *break_condition_pixbuf;
Expand All @@ -32,3 +35,5 @@ extern GdkPixbuf *frame_current_pixbuf;

void pixbufs_init(void);
void pixbufs_destroy(void);

#endif /* guard */
5 changes: 5 additions & 0 deletions debugger/src/stree.h
Expand Up @@ -19,6 +19,9 @@
* MA 02110-1301, USA.
*/

#ifndef STREE_H
#define STREE_H

GtkWidget* stree_init(move_to_line_cb ml, select_frame_cb sf);
void stree_destroy(void);

Expand All @@ -32,3 +35,5 @@ void stree_select_first_frame(gboolean make_active);
void stree_remove_frames(void);

void stree_set_active_thread_id(int thread_id);

#endif /* guard */
4 changes: 4 additions & 0 deletions debugger/src/tabs.h
Expand Up @@ -20,6 +20,9 @@
* MA 02110-1301, USA.
*/

#ifndef TABS_H
#define TABS_H

typedef enum _tab_id
{
TID_TARGET,
Expand All @@ -43,3 +46,4 @@ GtkWidget* tabs_get_tab(tab_id id);
tab_id tabs_get_tab_id(GtkWidget* tab);
const gchar* tabs_get_label(tab_id id);

#endif /* guard */
4 changes: 4 additions & 0 deletions debugger/src/tpage.h
Expand Up @@ -19,6 +19,9 @@
* MA 02110-1301, USA.
*/

#ifndef TPAGE_H
#define TPAGE_H

void tpage_init(void);

gchar* tpage_get_target(void);
Expand All @@ -40,3 +43,4 @@ void tpage_clear(void);

void tpage_pack_widgets(gboolean tabbed);

#endif /* guard */
5 changes: 5 additions & 0 deletions debugger/src/utils.h
Expand Up @@ -18,6 +18,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/

#ifndef UTILS_H
#define UTILS_H

void editor_open_position(const char* file, int line);
GString* get_word_at_position(ScintillaObject *sci, int position);

#endif /* guard */
8 changes: 6 additions & 2 deletions debugger/src/vtree.h
Expand Up @@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/

GtkWidget* vtree_create(watch_render_name on_render_name, watch_expression_changed on_expression_changed);

#ifndef VTREE_H
#define VTREE_H

GtkWidget* vtree_create(watch_render_name on_render_name, watch_expression_changed on_expression_changed);

#endif /* guard */
5 changes: 5 additions & 0 deletions debugger/src/watch_model.h
Expand Up @@ -19,6 +19,9 @@
* MA 02110-1301, USA.
*/

#ifndef WATCH_MODEL_H
#define WATCH_MODEL_H

/* tree view columns */
enum
{
Expand Down Expand Up @@ -49,3 +52,5 @@ void change_watch(GtkTreeView *tree, GtkTreeIter *iter, gpointer var);
void free_variables_list(GList *vars);
void variable_set_name_only(GtkTreeStore *store, GtkTreeIter *iter, gchar *name);
void expand_stub(GtkTreeView *tree, GtkTreeIter *parent, GList *vars);

#endif /* guard */
7 changes: 5 additions & 2 deletions debugger/src/wtree.h
Expand Up @@ -18,7 +18,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/


#ifndef WTREE_H
#define WTREE_H

GtkWidget* wtree_init(watch_expanded_callback expanded,
new_watch_dragged dragged,
watch_key_pressed keypressed,
Expand All @@ -30,4 +33,4 @@ GList* wtree_get_watches(void);
void wtree_remove_all(void);
void wtree_add_watch(gchar *watch);


#endif /* guard */

0 comments on commit 86f0d94

Please sign in to comment.