From d5b8cf89da0552129c9a88e93cbc25aab61ae25e Mon Sep 17 00:00:00 2001 From: Chris Young Date: Fri, 23 Jul 2010 17:59:46 +0000 Subject: Ensure RC is 0 unless we actually have a fatal error. svn path=/trunk/netsurf/; revision=10659 --- amiga/arexx.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'amiga/arexx.c') diff --git a/amiga/arexx.c b/amiga/arexx.c index e7b31dd65..59e9b1035 100755 --- a/amiga/arexx.c +++ b/amiga/arexx.c @@ -186,6 +186,8 @@ STATIC VOID rx_open(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unu struct dlnode *dln; struct browser_window *bw = curbw; + cmd->ac_RC = 0; + if((cmd->ac_ArgList[4]) && (cmd->ac_ArgList[5])) bw = ami_find_tab(*(ULONG *)cmd->ac_ArgList[4], *(ULONG *)cmd->ac_ArgList[5]); @@ -228,6 +230,8 @@ STATIC VOID rx_save(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unu char *source_data; struct browser_window *bw = curbw; + cmd->ac_RC = 0; + if((cmd->ac_ArgList[1]) && (cmd->ac_ArgList[2])) bw = ami_find_tab(*(ULONG *)cmd->ac_ArgList[1], *(ULONG *)cmd->ac_ArgList[2]); @@ -248,11 +252,13 @@ STATIC VOID rx_save(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unu STATIC VOID rx_quit(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unused))) { + cmd->ac_RC = 0; ami_quit_netsurf(); } STATIC VOID rx_tofront(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unused))) { + cmd->ac_RC = 0; ScreenToFront(scrn); } @@ -260,6 +266,8 @@ STATIC VOID rx_geturl(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((u { struct browser_window *bw = curbw; + cmd->ac_RC = 0; + if((cmd->ac_ArgList[0]) && (cmd->ac_ArgList[1])) bw = ami_find_tab(*(ULONG *)cmd->ac_ArgList[0], *(ULONG *)cmd->ac_ArgList[1]); @@ -279,6 +287,8 @@ STATIC VOID rx_gettitle(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__( { struct browser_window *bw = curbw; + cmd->ac_RC = 0; + if((cmd->ac_ArgList[0]) && (cmd->ac_ArgList[1])) bw = ami_find_tab(*(ULONG *)cmd->ac_ArgList[0], *(ULONG *)cmd->ac_ArgList[1]); @@ -299,6 +309,8 @@ STATIC VOID rx_gettitle(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__( STATIC VOID rx_version(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unused))) { + cmd->ac_RC = 0; + if(cmd->ac_ArgList[2]) { if(cmd->ac_ArgList[1]) @@ -363,6 +375,8 @@ STATIC VOID rx_version(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__(( STATIC VOID rx_pubscreen(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unused))) { + cmd->ac_RC = 0; + if(!option_use_pubscreen || option_use_pubscreen[0] == '\0') { strcpy(result,"NetSurf"); @@ -379,6 +393,8 @@ STATIC VOID rx_back(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unu { struct browser_window *bw = curbw; + cmd->ac_RC = 0; + if((cmd->ac_ArgList[0]) && (cmd->ac_ArgList[1])) bw = ami_find_tab(*(ULONG *)cmd->ac_ArgList[0], *(ULONG *)cmd->ac_ArgList[1]); @@ -395,6 +411,8 @@ STATIC VOID rx_forward(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__(( { struct browser_window *bw = curbw; + cmd->ac_RC = 0; + if((cmd->ac_ArgList[0]) && (cmd->ac_ArgList[1])) bw = ami_find_tab(*(ULONG *)cmd->ac_ArgList[0], *(ULONG *)cmd->ac_ArgList[1]); @@ -411,6 +429,8 @@ STATIC VOID rx_home(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unu { struct browser_window *bw = curbw; + cmd->ac_RC = 0; + if((cmd->ac_ArgList[0]) && (cmd->ac_ArgList[1])) bw = ami_find_tab(*(ULONG *)cmd->ac_ArgList[0], *(ULONG *)cmd->ac_ArgList[1]); @@ -421,6 +441,8 @@ STATIC VOID rx_reload(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((u { struct browser_window *bw = curbw; + cmd->ac_RC = 0; + if((cmd->ac_ArgList[1]) && (cmd->ac_ArgList[2])) bw = ami_find_tab(*(ULONG *)cmd->ac_ArgList[1], *(ULONG *)cmd->ac_ArgList[2]); @@ -443,6 +465,8 @@ STATIC VOID rx_windows(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__(( struct nsObject *node, *nnode; struct gui_window_2 *gwin; + cmd->ac_RC = 0; + if(!IsMinListEmpty(window_list)) { node = (struct nsObject *)GetHead((struct List *)window_list); -- cgit v1.2.3