Commit 97c92ee5 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Extend rlib xferrecv API

Add xferrecv_last_ref to get hold of the Wimp message id of the request for a scrap file data save, when the RAM transfer gets no reply. This is useful to allow the data save to be distinguished from a file being dragged to an application, without having to resort to string compares against <wimp$scrap>.
SWIOptions:
 Also add RTC to SWI exports, and remove redundant ones.
armsys.c:
 Treat cmd_string as a pointer.
xferrecv.c/.h/rl_entries:
 New function xferrecv_last_ref.

Version 5.84. Tagged as 'RISC_OSLib-5_84'
parent 98a04ed1
......@@ -18,10 +18,8 @@ Echo <32> ; Automatically generated file <Sys$Date> { > s.swioptions }
IfThere Hdr:ADFS Then Echo <32> GET Hdr:ADFS { >> s.swioptions }
IfThere Hdr:ATAPI Then Echo <32> GET Hdr:ATAPI { >> s.swioptions }
IfThere Hdr:BasicTrans Then Echo <32> GET Hdr:BasicTrans { >> s.swioptions }
IfThere Hdr:BlendTable Then Echo <32> GET Hdr:BlendTable { >> s.swioptions }
IfThere Hdr:Buffer Then Echo <32> GET Hdr:Buffer { >> s.swioptions }
IfThere Hdr:ARM3Cache Then Echo <32> GET Hdr:ARM3Cache { >> s.swioptions }
IfThere Hdr:CDROM Then Echo <32> GET Hdr:CDROM { >> s.swioptions }
IfThere Hdr:CDFS Then Echo <32> GET Hdr:CDFS { >> s.swioptions }
IfThere Hdr:ColourPick Then Echo <32> GET Hdr:ColourPick { >> s.swioptions }
......@@ -61,6 +59,7 @@ IfThere Hdr:Portable Then Echo <32> GET Hdr:Portable { >> s.swioptions }
IfThere Hdr:RAMFS Then Echo <32> GET Hdr:RAMFS { >> s.swioptions }
IfThere Hdr:RemotePrin Then Echo <32> GET Hdr:RemotePrin { >> s.swioptions }
IfThere Hdr:ResourceFS Then Echo <32> GET Hdr:ResourceFS { >> s.swioptions }
IfThere Hdr:RTC Then Echo <32> GET Hdr:RTC { >> s.swioptions }
IfThere Hdr:ScrBlank Then Echo <32> GET Hdr:ScrBlank { >> s.swioptions }
IfThere Hdr:ScrModes Then Echo <32> GET Hdr:ScrModes { >> s.swioptions }
IfThere Hdr:SCSI Then Echo <32> GET Hdr:SCSI { >> s.swioptions }
......
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.83"
Module_Version SETA 583
Module_MajorVersion SETS "5.84"
Module_Version SETA 584
Module_MinorVersion SETS ""
Module_Date SETS "23 Aug 2014"
Module_ApplicationDate SETS "23-Aug-14"
Module_Date SETS "03 Apr 2015"
Module_ApplicationDate SETS "03-Apr-15"
Module_ComponentName SETS "RISC_OSLib"
Module_ComponentPath SETS "castle/RiscOS/Sources/Lib/RISC_OSLib"
Module_FullVersion SETS "5.83"
Module_HelpVersion SETS "5.83 (23 Aug 2014)"
Module_FullVersion SETS "5.84"
Module_HelpVersion SETS "5.84 (03 Apr 2015)"
END
/* (5.83)
/* (5.84)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 5.83
#define Module_MajorVersion_CMHG 5.84
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 23 Aug 2014
#define Module_Date_CMHG 03 Apr 2015
#define Module_MajorVersion "5.83"
#define Module_Version 583
#define Module_MajorVersion "5.84"
#define Module_Version 584
#define Module_MinorVersion ""
#define Module_Date "23 Aug 2014"
#define Module_Date "03 Apr 2015"
#define Module_ApplicationDate "23-Aug-14"
#define Module_ApplicationDate "03-Apr-15"
#define Module_ComponentName "RISC_OSLib"
#define Module_ComponentPath "castle/RiscOS/Sources/Lib/RISC_OSLib"
#define Module_FullVersion "5.83"
#define Module_HelpVersion "5.83 (23 Aug 2014)"
#define Module_LibraryVersionInfo "5:83"
#define Module_FullVersion "5.84"
#define Module_HelpVersion "5.84 (03 Apr 2015)"
#define Module_LibraryVersionInfo "5:84"
......@@ -666,7 +666,7 @@ int system(const char *string)
}
}
#ifdef DDE
cmd_string = 0;
cmd_string = NULL;
if (strlen(string) >= _cli_limit) {
s = (char *)string;
while (*s == ' ') s++;
......@@ -693,7 +693,7 @@ int system(const char *string)
if (type == CHAIN)
_lib_shutdown();
rc = _kernel_system(string, type);
if (cmd_string)
if (cmd_string != NULL)
free(cmd_string);
#else
rc = _kernel_system(string, CALL);
......
......@@ -291,7 +291,8 @@ int xferrecv_doimport(char *buf, int size, xferrecv_buffer_processor p)
{
/* Receives data into the buffer; calls the buffer processor if the buffer
given becomes full. Returns TRUE if the transaction completed sucessfully.
given becomes full. Returns -1 if the transaction failed, else the size
of the final buffer that was transferred.
*/
win_add_unknown_event_processor(xferrecv_unknown_events, 0) ;
......@@ -319,4 +320,9 @@ BOOL xferrecv_file_is_safe(void)
return xferrecv__fileissafe ;
}
int xferrecv_last_ref(void)
{
return scrap_ref ;
}
/* end */
......@@ -143,7 +143,7 @@ int xferrecv_doimport(char *buf, int size, xferrecv_buffer_processor);
/* ---------------------- xferrecv_file_is_safe ----------------------------
* Description: Informs caller if file was recieved from a "safe" source
* Description: Informs caller if file was received from a "safe" source
* (see below for definition of "safe").
*
* Parameters: void
......@@ -155,6 +155,20 @@ int xferrecv_doimport(char *buf, int size, xferrecv_buffer_processor);
BOOL xferrecv_file_is_safe(void);
/* ---------------------- xferrecv_last_ref -------------------------------
* Description: Informs caller of the last wimp_sendmessage() reference
* when an xferrecv_doimport() fails and is now awaiting
* using <Wimp$Scrap> instead.
*
* Parameters: void
* Returns: message reference.
*
*/
int xferrecv_last_ref(void);
#endif
/* end xferrecv.h */
......@@ -596,5 +596,6 @@
Entry menu_setcolours, imported, , , ,
Entry font_readdef, imported, , , ,
Entry xfersend_pipe, imported, , , ,
Entry xferrecv_last_ref, imported, , , ,
; __va_illegal_arg 0
END
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment