Commit 2e79f8be authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Make OS_GSTrans be more sensible about what it treats as system variables

Detail:
  s/Arthur2 - OS_GSTrans now uses the same rules as OS_SetVarValue when deciding whether text within angle brackets is a valid system variable name or not. In particular spaces in the middle of a variable name are no longer considered valid, so expressions such as "*If 0<1 AND 1>0 then echo true" now have the expected result
  Also replaced the magic constant used for the name buffer length with a proper symbolic value, and tweaked its handling a bit in order to increase the maximum permissible variable name length from 253 chars to 255 (although OS_SetVarVal allows longer)
Admin:
  Tested on Iyonix
  Fixes issue reported on forums:
  https://www.riscosopen.org/forum/forums/4/topics/2912


Version 5.35, 4.79.2.245. Tagged as 'Kernel-5_35-4_79_2_245'
parent bc954604
......@@ -13,11 +13,11 @@
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.35"
Module_Version SETA 535
Module_MinorVersion SETS "4.79.2.244"
Module_Date SETS "27 Oct 2014"
Module_ApplicationDate SETS "27-Oct-14"
Module_MinorVersion SETS "4.79.2.245"
Module_Date SETS "04 Nov 2014"
Module_ApplicationDate SETS "04-Nov-14"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel"
Module_FullVersion SETS "5.35 (4.79.2.244)"
Module_HelpVersion SETS "5.35 (27 Oct 2014) 4.79.2.244"
Module_FullVersion SETS "5.35 (4.79.2.245)"
Module_HelpVersion SETS "5.35 (04 Nov 2014) 4.79.2.245"
END
......@@ -5,19 +5,19 @@
*
*/
#define Module_MajorVersion_CMHG 5.35
#define Module_MinorVersion_CMHG 4.79.2.244
#define Module_Date_CMHG 27 Oct 2014
#define Module_MinorVersion_CMHG 4.79.2.245
#define Module_Date_CMHG 04 Nov 2014
#define Module_MajorVersion "5.35"
#define Module_Version 535
#define Module_MinorVersion "4.79.2.244"
#define Module_Date "27 Oct 2014"
#define Module_MinorVersion "4.79.2.245"
#define Module_Date "04 Nov 2014"
#define Module_ApplicationDate "27-Oct-14"
#define Module_ApplicationDate "04-Nov-14"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "castle/RiscOS/Sources/Kernel"
#define Module_FullVersion "5.35 (4.79.2.244)"
#define Module_HelpVersion "5.35 (27 Oct 2014) 4.79.2.244"
#define Module_FullVersion "5.35 (4.79.2.245)"
#define Module_HelpVersion "5.35 (04 Nov 2014) 4.79.2.245"
#define Module_LibraryVersionInfo "5:35"
......@@ -612,20 +612,23 @@ GSREAD_XPandGetNextByte
BEQ GSREAD_AngleBraDaftSoIsnt ; <> and < > are silly.
; Copy angle bracketed thing checking for correct termination
; OS_SetVarValue requires system variable names to be space or control
; terminated, so we shall discard anything which violates that rule
GSVarGetWSpace
ADD R12, R12, #GSNameBuff
MOV R11, #0
20 LDRB R1, [R0], #1
STRB R1, [R12], #1
ADD R11, R11, #1
CMP R11, #255
CMPNE R1, #13
CMPNE R1, #10
CMPNE R1, #0
BEQ GSREAD_AngleBraDaftSoIsnt
CMP R1, #">"
BEQ %FT25
CMP R11, #?GSNameBuff
CMPNE R1, #" "
TSTNE R1, #&E0 ; i.e. EQ if <32
BNE %BT20
B GSREAD_AngleBraDaftSoIsnt
25
; Check for number first
MOV R1, #0
STRB R1, [R12, #-1] ; terminate it
......
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