ROOL Forum: Recent Posts

Partition Manager

Mon, 25 Jan 2021 00:22:52 -0000

Edit: It seems that it’s part of RFC 5987. I’m guessing that NetSurf doesn’t know how to handle this.

That bit certainly seems to be the answer to the question “What do we have wrong”

@John Williams
It looks like we just keep on dragging the file to SparkFS

Today's ROM, 24/01/21

Mon, 25 Jan 2021 00:17:48 -0000

Yes, I think the expression evaluation needs to be looked at (if possible/feasible), not just removing the quotes from the command.

So I change the expression evaluator to follow the documentation and only GSTrans strings, only to find this in !StrongED.StartUp.SetupCfg:

If "<StrED_cfg$Dir>" = "" AND <Ctrl$Pressed> = 0 Then IfThere <Choices$Write>.!StrED_cfg Then Set StrED_cfg$Dir <Choices$Write>.!StrED_cfg
If "<StrED_cfg$Dir>" = "" AND <Ctrl$Pressed> = 0 Then IfThere <StrongED$SettingsDir>.!StrED_cfg Then Set StrED_cfg$Dir <StrongED$SettingsDir>.!StrED_cfg

And !ZapFonts.!Boot contains:

If "<Zap$OSVsn>" <> "" Then SetEval ZapFonts$OSVsn <Zap$OSVsn>

I am trying applying a GSTrans like transformation to the expression without expanding anything in quotes.

Partition Manager

Sun, 24 Jan 2021 23:56:19 -0000

filename*=UTF-8''partmgr043.zip

That looks a bit odd! It may be valid, but it’s certainly weird.

Edit: It seems that it’s part of RFC 5987. I’m guessing that NetSurf doesn’t know how to handle this.

Partition Manager

Sun, 24 Jan 2021 23:42:01 -0000

Perhaps some kind soul will tell us what we have wrong and maybe even how to put it right.

I’m going to suggest “not much”.

steve@ullscarf:~$ wget -S <a href="https://forums.jaspp.org.uk/forum/download/file.php?id=388">https://forums.jaspp.org.uk/forum/download/file.php?id=388</a>
--2021-01-24 23:37:13--  <a href="https://forums.jaspp.org.uk/forum/download/file.php?id=388">https://forums.jaspp.org.uk/forum/download/file.php?id=388</a>
Resolving forums.jaspp.org.uk (forums.jaspp.org.uk)... 109.156.19.89
Connecting to forums.jaspp.org.uk (forums.jaspp.org.uk)|109.156.19.89|:443... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 200 OK
  Date: Sun, 24 Jan 2021 23:37:13 GMT
  Server: Apache/2.4.38 (Raspbian)
  Set-Cookie: phpbb3_pw5ls_u=1; expires=Mon, 24-Jan-2022 23:37:14 GMT; path=/; domain=forums.jaspp.org.uk; secure; HttpOnly
  Set-Cookie: phpbb3_pw5ls_k=; expires=Mon, 24-Jan-2022 23:37:14 GMT; path=/; domain=forums.jaspp.org.uk; secure; HttpOnly
  Set-Cookie: phpbb3_pw5ls_sid=3bff666cdaa6ca6307b1d3bbcb079e0f; expires=Mon, 24-Jan-2022 23:37:14 GMT; path=/; domain=forums.jaspp.org.uk; secure; HttpOnly
  Cache-Control: private
  Content-Disposition: attachment; filename*=UTF-8''partmgr043.zip
  Last-Modified: Sun, 24 Jan 2021 18:05:18 GMT
  Content-Length: 40050
  Keep-Alive: timeout=5, max=100
  Connection: Keep-Alive
  Content-Type: application/octet-stream
Length: 40050 (39K) [application/octet-stream]
Saving to: ‘file.php?id=388’

file.php?id=388                  100%[==========================================================>]  39.11K  --.-KB/s    in 0.03s   

2021-01-24 23:37:14 (1.29 MB/s) - ‘file.php?id=388’ saved [40050/40050]

steve@ullscarf:~$

The server is saying that the file is “application/octet-stream”, which is data; were it typed for a Zip file, it would be “application/zip”.

Setting the type as “application/octet-stream” isn’t wrong, but it doesn’t help browsers which don’t then look at the filename extension and make a guess as to what the type might be.

ETA: It’s complicated because the actual filename is buried in the ContentDisposition header, and differs from the one in the URL. That’s another layer for the browser to decode.

Partition Manager

Sun, 24 Jan 2021 23:22:27 -0000

Jon,

One minor detail which has been present since V0.?? is that in the text descriptions at the bottom of the main Window, the layout text E+, Boot, Big ma| does not quite fit in the field width. I am using RO5.28 on a Pi4.
Line 820 could be    partition_columns%(C_volume%,1)=480-15
with line 840 being   partition_columns%(C_layout%,1)=200+15

Otherwise v0.43 is looking good to me.

Today's ROM, 24/01/21

Sun, 24 Jan 2021 23:18:33 -0000

if you add “/S” to the end of “load=quit/K”, I think you’ll find it works.

So it does. (Note that I tried first just adding the S, which did not work, but I then added /S as you said and it was indeed ok.)

I agree that the RunType would have been better without the added quotes, but I cannot yet see how we can avoid breaking things – some of which will be difficult to mend.

sharing a PS/2 keyboard

Sun, 24 Jan 2021 23:14:07 -0000

I would recommend one of the legacy Belkin KVM switches that use PS/2 for console (mouse and keyboard) but can do either USB or PS/2 for the machines connected. I used an 8 port variant for a very long time and happily switched between all kind of machines including Risc PCs and IYONIX and Omega and various PCs.

Partition Manager

Sun, 24 Jan 2021 23:05:34 -0000

don’t know, either you’re missing the mime type, or the browser can’t cope with modern standards? Which browser are you using?

I suspect that John’s answer is Netsurf. It certainly is in my case.

but why does each of your updates, referenced as PartMan0.xx.zip or whatever, download as “file” with a type data

I suspect that you and I have something wrong wiith our configuation of file Mime types, but I do not know what. The problem is with our Netsurf configurations on RO 5.28 because the file downloads correctly when I use Firefox on a PC.

Perhaps some kind soul will tell us what we have wrong and maybe even how to put it right.

In the meantime we can carry on dragging the file to SparkFS or manually setting the file type of the downloaded file to “Zip”

Today's ROM, 24/01/21

Sun, 24 Jan 2021 22:49:54 -0000

Please define parsing correctly.

Treating it as a command line…?

If it is burned into ROM that BASIC run actions are “this has quotes around it”, […]

That’s until someone does

Set Alias$@RunType_FFB ...

as part of their boot sequence, because they want to do something clever when BASIC files are run?

Thus, if there isn’t a quote, consider ChangeFSI to be broken too, because it expects to see one.

Having spent some of the day staring at bits of the FormEd code, I’m afraid that I’m not necessarily going to accept “what Acorn did in the 1980s” as an arbiter of “not broken”. :)

Today's ROM, 24/01/21

Sun, 24 Jan 2021 22:38:34 -0000

not parsing the BASIC command line correctly in their BASIC programs

Please define parsing correctly.

If it is burned into ROM that BASIC run actions are “this has quotes around it”, then it is perfectly acceptable to search for the start of parameters either by looking for a quote character, or, safer, looking for “-quit” and advancing seven places from that. Which is, I should point out, exactly how ChangeFSI does it.
Thus, if there isn’t a quote, consider ChangeFSI to be broken too, because it expects to see one.
Likewise, if you are only looking for one thing (like a filename), you might not even think to call a SWI to parse that. Just get the command line, INSTR for the quote, MID$ out that, and hack off the last character (the closing quote). There’s nothing ickier about that than all the block%!offset% rubbish that is required to do Wimp stuff in BASIC.

In my life hacking code, it always seems to me that the simple fixes cause the biggest amount of damage. Rewrite the Obey module in C? Yeah, no probs. Remove two simple quotes? Kabluey. ;-)

Today's ROM, 24/01/21

Sun, 24 Jan 2021 22:37:35 -0000

Unfortunately, what this change has revealed is that a lot of people are not parsing the BASIC command line correctly in their BASIC programs, but are doing icky stuff involving looking for quotes and other specific bits which depend a lot on how Alias$@RunType_FFB happens to have been set for the past 30 years…

Is it just me or does anyone else see parallels with the thousand-and-one “undocumented API” items in Windows, which were actually security flaws and when fixed the change broke various programs that were “not doing it the right way”

Or more locally – zero page abuse.