From 0b64df140c87c81d5046c0a97b5a655ca7af170b Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 16 Oct 2014 09:55:01 +0100 Subject: Update amiga frontend for split operation table header changes --- amiga/arexx.c | 50 ++++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 26 deletions(-) (limited to 'amiga/arexx.c') diff --git a/amiga/arexx.c b/amiga/arexx.c index 4130dbb6d..7a367e893 100644 --- a/amiga/arexx.c +++ b/amiga/arexx.c @@ -16,17 +16,6 @@ * along with this program. If not, see . */ -#include "amiga/os3support.h" - -#include "amiga/arexx.h" -#include "amiga/download.h" -#include "amiga/gui.h" -#include "amiga/hotlist.h" -#include "amiga/theme.h" -#include "utils/nsoption.h" - -#include "desktop/browser_private.h" -#include "desktop/version.h" #include #include @@ -38,11 +27,20 @@ #include #include +#include "utils/nsoption.h" +#include "desktop/browser_private.h" +#include "desktop/gui_window.h" +#include "desktop/version.h" + +#include "amiga/os3support.h" +#include "amiga/arexx.h" +#include "amiga/download.h" +#include "amiga/gui.h" +#include "amiga/hotlist.h" +#include "amiga/theme.h" + extern const char * const verarexx; -extern const char * const netsurf_version; extern const char * const wt_revid; -extern const int netsurf_version_major; -extern const int netsurf_version_minor; enum { @@ -106,13 +104,13 @@ STATIC struct ARexxCmd Commands[] = BOOL ami_arexx_init(void) { - if(arexx_obj = ARexxObject, + if((arexx_obj = ARexxObject, AREXX_HostName,"NETSURF", AREXX_Commands,Commands, AREXX_NoSlot,TRUE, AREXX_ReplyHook,NULL, AREXX_DefExtension,"nsrx", - End) + End)) { GetAttr(AREXX_SigMask, arexx_obj, &rxsig); return true; @@ -147,7 +145,7 @@ void ami_arexx_cleanup(void) if(arexx_obj) DisposeObject(arexx_obj); } -struct browser_window *ami_find_tab_gwin(struct gui_window_2 *gwin, int tab) +static struct browser_window *ami_find_tab_gwin(struct gui_window_2 *gwin, int tab) { int tabs = 0; struct Node *ctab; @@ -166,12 +164,12 @@ struct browser_window *ami_find_tab_gwin(struct gui_window_2 *gwin, int tab) TNA_UserData, &bw, TAG_DONE); if(tabs == tab) return bw; - } while(ctab=ntab); + } while((ctab=ntab)); return NULL; } -int ami_find_tab_bw(struct gui_window_2 *gwin, struct browser_window *bw) +static int ami_find_tab_bw(struct gui_window_2 *gwin, struct browser_window *bw) { int tabs = 0; struct Node *ctab; @@ -190,12 +188,12 @@ int ami_find_tab_bw(struct gui_window_2 *gwin, struct browser_window *bw) TNA_UserData, &tbw, TAG_DONE); if(tbw == bw) return tabs; - } while(ctab=ntab); + } while((ctab=ntab)); return 0; } -struct browser_window *ami_find_tab(int window, int tab) +static struct browser_window *ami_find_tab(int window, int tab) { struct nsObject *node, *nnode; @@ -215,7 +213,7 @@ struct browser_window *ami_find_tab(int window, int tab) if(windows == window) return ami_find_tab_gwin(node->objstruct, tab); } - } while(node = nnode); + } while((node = nnode)); } return NULL; } @@ -563,8 +561,8 @@ STATIC VOID rx_windows(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__(( } while(node = nnode); } - if(cmd->ac_ArgList[0]) sprintf(result, "%ld", tabs); - else sprintf(result, "%ld", windows); + if(cmd->ac_ArgList[0]) sprintf(result, "%d", tabs); + else sprintf(result, "%d", windows); cmd->ac_Result = result; } @@ -606,8 +604,8 @@ STATIC VOID rx_active(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((u tab = ami_find_tab_bw(gwin, bw); } - if(cmd->ac_ArgList[0]) sprintf(result, "%ld", tab); - else sprintf(result, "%ld", window); + if(cmd->ac_ArgList[0]) sprintf(result, "%d", tab); + else sprintf(result, "%d", window); cmd->ac_Result = result; } -- cgit v1.2.3