mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-25 13:37:02 +03:00
Make arexx_obj private to arexx.c
This commit is contained in:
parent
26acc5d5c7
commit
ccccf76ff8
@ -68,6 +68,7 @@ enum
|
|||||||
RX_HOTLIST
|
RX_HOTLIST
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Object *arexx_obj = NULL;
|
||||||
STATIC char result[100];
|
STATIC char result[100];
|
||||||
|
|
||||||
STATIC VOID rx_open(struct ARexxCmd *, struct RexxMsg *);
|
STATIC VOID rx_open(struct ARexxCmd *, struct RexxMsg *);
|
||||||
@ -141,6 +142,12 @@ void ami_arexx_handle(void)
|
|||||||
RA_HandleRexx(arexx_obj);
|
RA_HandleRexx(arexx_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ami_arexx_command(const char *cmd)
|
||||||
|
{
|
||||||
|
if(arexx_obj == NULL) return;
|
||||||
|
IDoMethod(arexx_obj, AM_EXECUTE, cmd, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
void ami_arexx_execute(char *script)
|
void ami_arexx_execute(char *script)
|
||||||
{
|
{
|
||||||
char full_script_path[1025];
|
char full_script_path[1025];
|
||||||
@ -149,7 +156,7 @@ void ami_arexx_execute(char *script)
|
|||||||
if((lock = Lock(script, ACCESS_READ))) {
|
if((lock = Lock(script, ACCESS_READ))) {
|
||||||
DevNameFromLock(lock, full_script_path, 1024, DN_FULLPATH);
|
DevNameFromLock(lock, full_script_path, 1024, DN_FULLPATH);
|
||||||
LOG("Executing script: %s", full_script_path);
|
LOG("Executing script: %s", full_script_path);
|
||||||
IDoMethod(arexx_obj, AM_EXECUTE, full_script_path, NULL, NULL, NULL, NULL, NULL);
|
ami_arexx_command(full_script_path);
|
||||||
UnLock(lock);
|
UnLock(lock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
BOOL ami_arexx_init(void);
|
BOOL ami_arexx_init(void);
|
||||||
void ami_arexx_handle(void);
|
void ami_arexx_handle(void);
|
||||||
void ami_arexx_execute(char *);
|
void ami_arexx_execute(char *);
|
||||||
|
void ami_arexx_command(const char *cmd);
|
||||||
void ami_arexx_cleanup(void);
|
void ami_arexx_cleanup(void);
|
||||||
|
|
||||||
Object *arexx_obj;
|
|
||||||
ULONG rxsig;
|
ULONG rxsig;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1055,16 +1055,13 @@ static void gui_init2(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
STRPTR sendcmd = NULL;
|
STRPTR sendcmd = NULL;
|
||||||
|
|
||||||
if(temp_homepage_url)
|
if(temp_homepage_url) {
|
||||||
{
|
|
||||||
sendcmd = ASPrintf("OPEN \"%s\" NEW",temp_homepage_url);
|
sendcmd = ASPrintf("OPEN \"%s\" NEW",temp_homepage_url);
|
||||||
free(temp_homepage_url);
|
free(temp_homepage_url);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
sendcmd = ASPrintf("OPEN \"%s\" NEW",nsoption_charp(homepage_url));
|
sendcmd = ASPrintf("OPEN \"%s\" NEW",nsoption_charp(homepage_url));
|
||||||
}
|
}
|
||||||
IDoMethod(arexx_obj,AM_EXECUTE,sendcmd,"NETSURF",NULL,NULL,NULL,NULL);
|
ami_arexx_command(sendcmd);
|
||||||
FreeVec(sendcmd);
|
FreeVec(sendcmd);
|
||||||
|
|
||||||
ami_quit=true;
|
ami_quit=true;
|
||||||
|
Loading…
Reference in New Issue
Block a user