From 20f2c86a511f7913cf858e7bd3668b0b59663ba0 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 28 May 2015 09:11:32 +0100 Subject: Clean up atari source linendings, whitespace damage and executable status --- atari/history.c | 64 ++++++++++++++++++++++++++------------------------------- 1 file changed, 29 insertions(+), 35 deletions(-) (limited to 'atari/history.c') diff --git a/atari/history.c b/atari/history.c index 329328a29..cb2ba9e17 100644 --- a/atari/history.c +++ b/atari/history.c @@ -16,8 +16,6 @@ * along with this program. If not, see . */ - - #include #include #include @@ -50,16 +48,16 @@ struct atari_global_history_s atari_global_history; /* Setup Atari Treeview Callbacks: */ static nserror atari_global_history_init_phase2(struct core_window *cw, - struct core_window_callback_table * default_callbacks); + struct core_window_callback_table * default_callbacks); static void atari_global_history_finish(struct core_window *cw); static void atari_global_history_keypress(struct core_window *cw, - uint32_t ucs4); + uint32_t ucs4); static void atari_global_history_mouse_action(struct core_window *cw, - browser_mouse_state mouse, - int x, int y); + browser_mouse_state mouse, + int x, int y); static void atari_global_history_draw(struct core_window *cw, int x, - int y, struct rect *clip, - const struct redraw_context *ctx); + int y, struct rect *clip, + const struct redraw_context *ctx); static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8]); static struct atari_treeview_callbacks atari_global_history_treeview_callbacks = { @@ -72,7 +70,7 @@ static struct atari_treeview_callbacks atari_global_history_treeview_callbacks = }; static nserror atari_global_history_init_phase2(struct core_window *cw, - struct core_window_callback_table *cb_t) + struct core_window_callback_table *cb_t) { LOG(("")); return(global_history_init(cb_t, cw)); @@ -85,8 +83,8 @@ static void atari_global_history_finish(struct core_window *cw) } static void atari_global_history_draw(struct core_window *cw, int x, - int y, struct rect *clip, - const struct redraw_context *ctx) + int y, struct rect *clip, + const struct redraw_context *ctx) { global_history_redraw(x, y, clip, ctx); } @@ -98,8 +96,8 @@ static void atari_global_history_keypress(struct core_window *cw, uint32_t ucs4) } static void atari_global_history_mouse_action(struct core_window *cw, - browser_mouse_state mouse, - int x, int y) + browser_mouse_state mouse, + int x, int y) { LOG(("x: %d, y: %d\n", x, y)); @@ -115,14 +113,14 @@ static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8]) LOG(("")); - if(ev_out->emo_events & MU_MESAG){ + if (ev_out->emo_events & MU_MESAG) { switch (msg[0]) { - case WM_CLOSED: - atari_global_history_close(); - retval = 1; + case WM_CLOSED: + atari_global_history_close(); + retval = 1; break; - default: break; + default: break; } } @@ -134,9 +132,7 @@ static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8]) void atari_global_history_init(void) { if (atari_global_history.init == false) { - - - if( atari_global_history.window == NULL ){ + if( atari_global_history.window == NULL ) { int flags = ATARI_TREEVIEW_WIDGETS; short handle = -1; OBJECT * tree = gemtk_obj_get_tree(TOOLBAR_HISTORY); @@ -146,7 +142,7 @@ void atari_global_history_init(void) atari_global_history.window = gemtk_wm_add(handle, GEMTK_WM_FLAG_DEFAULTS, NULL); if( atari_global_history.window == NULL ) { gemtk_msg_box_show(GEMTK_MSG_BOX_ALERT, - "Failed to allocate History"); + "Failed to allocate History"); return; } wind_set_str(handle, WF_NAME, (char*)messages_get("History")); @@ -154,18 +150,15 @@ void atari_global_history_init(void) gemtk_wm_unlink(atari_global_history.window); atari_global_history.tv = atari_treeview_create( - atari_global_history.window, - &atari_global_history_treeview_callbacks, - NULL, flags); + atari_global_history.window, + &atari_global_history_treeview_callbacks, + NULL, flags); if (atari_global_history.tv == NULL) { /* handle it properly, clean up previous allocs */ LOG(("Failed to allocate treeview")); return; } - - } else { - } } atari_global_history.init = true; @@ -181,11 +174,11 @@ void atari_global_history_open(void) if (atari_treeview_is_open(atari_global_history.tv) == false) { - GRECT pos; - pos.g_x = desk_area.g_w - desk_area.g_w / 4; - pos.g_y = desk_area.g_y; - pos.g_w = desk_area.g_w / 4; - pos.g_h = desk_area.g_h; + GRECT pos; + pos.g_x = desk_area.g_w - desk_area.g_w / 4; + pos.g_y = desk_area.g_y; + pos.g_w = desk_area.g_w / 4; + pos.g_h = desk_area.g_h; atari_treeview_open(atari_global_history.tv, &pos); } else { @@ -201,10 +194,11 @@ void atari_global_history_close(void) void atari_global_history_destroy(void) { - if( atari_global_history.init == false) { + if ( atari_global_history.init == false) { return; } - if( atari_global_history.window != NULL ) { + + if ( atari_global_history.window != NULL ) { if (atari_treeview_is_open(atari_global_history.tv)) atari_global_history_close(); wind_delete(gemtk_wm_get_handle(atari_global_history.window)); -- cgit v1.2.3