From d90e784ab457e12e9c49bfae42544434b5840c1e Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sat, 4 Jul 2009 12:16:22 +0000 Subject: Add GETSCREENNAME command svn path=/trunk/netsurf/; revision=8303 --- amiga/arexx.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'amiga/arexx.c') diff --git a/amiga/arexx.c b/amiga/arexx.c index e9329d1ec..f96a1c97f 100755 --- a/amiga/arexx.c +++ b/amiga/arexx.c @@ -25,6 +25,7 @@ #include #include #include "amiga/download.h" +#include "amiga/options.h" const char * const verarexx; const int verver; @@ -41,7 +42,8 @@ enum RX_GETURL, RX_GETTITLE, RX_VERSION, - RX_SAVE + RX_SAVE, + RX_PUBSCREEN }; STATIC char result[100]; @@ -53,6 +55,7 @@ STATIC VOID rx_geturl(struct ARexxCmd *, struct RexxMsg *); STATIC VOID rx_gettitle(struct ARexxCmd *, struct RexxMsg *); STATIC VOID rx_version(struct ARexxCmd *, struct RexxMsg *); STATIC VOID rx_save(struct ARexxCmd *, struct RexxMsg *); +STATIC VOID rx_pubscreen(struct ARexxCmd *, struct RexxMsg *); STATIC struct ARexxCmd Commands[] = { @@ -63,6 +66,7 @@ STATIC struct ARexxCmd Commands[] = {"GETTITLE",RX_GETTITLE,rx_gettitle,NULL, 0, NULL, 0, 0, NULL }, {"VERSION",RX_VERSION,rx_version,"VERSION/N,SVN=REVISION/N,RELEASE/S", 0, NULL, 0, 0, NULL }, {"SAVE",RX_SAVE,rx_save,"FILENAME/A", 0, NULL, 0, 0, NULL }, + {"GETSCREENNAME",RX_PUBSCREEN,rx_pubscreen,NULL, 0, NULL, 0, 0, NULL }, { NULL, 0, NULL, NULL, 0, NULL, 0, 0, NULL } }; @@ -249,3 +253,17 @@ STATIC VOID rx_version(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__(( cmd->ac_Result = result; } + +STATIC VOID rx_pubscreen(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unused))) +{ + if(!option_use_pubscreen || option_use_pubscreen[0] == '\0') + { + strcpy(result,"NetSurf"); + } + else + { + strcpy(result,option_use_pubscreen); + } + + cmd->ac_Result = result; +} -- cgit v1.2.3