Make DIR aware of 40-columns mode
rev 1141 brings a couple of improvements in this subject
Looks much better now. :-)
1234567890123456789012345678901234567890 <-- ruler added by me
C:\>dir /a:-d Volume in drive C is SVARDOS Volume Serial Number is 1B5B-1C0B Directory of C:\ KERNEL SYS 45329 24.11.16 12:43 FREECOM COM 66597 09.03.17 13:52 AUTOEXEC DEF 616 05.02.22 20:37 CONFIG DEF 220 05.02.22 20:37 AUTOEXEC BAT 963 13.03.22 14:33 COMMAND COM 27715 01.04.22 11:16 CONFIG SYS 474 21.03.22 21:47 7 file(s) 141914 bytes 472858624 bytes free C:\>
But a minor issue when SET LANG=DE is used:
1234567890123456789012345678901234567890 <-- ruler added by me
C:\>dir /a:-d Datenträger in Laufwerk C ist SVARDOS Datenträgerseriennummer: 1B5B-1C0B Verzeichnis von C:\ KERNEL SYS 45329 24.11.16 12:43 FREECOM COM 66597 09.03.17 13:52 AUTOEXEC DEF 616 05.02.22 20:37 CONFIG DEF 220 05.02.22 20:37 AUTOEXEC BAT 963 13.03.22 14:33 COMMAND COM 27715 01.04.22 11:16 CONFIG SYS 474 21.03.22 21:47 7 Datei(en) 141914 Byte 472858624 Byte frei C:\>
The summary is 1 too far to the right and thus, the lines breaks.
Reply To bttr
The summary is 1 too far to the right and thus, the lines breaks.
The fields are placed so they allow outputting 10 digits, that is: the maximum length of a 32 bit number, and the last summary line ("xxx bytes free") is placed so the value is aligned consistently with the value above it.
MS-DOS leaves only 9 places for the number of files. Maybe it's a good compromise, at least for 40-columns system, but I wonder what happens when the amount of files reaches 1'000'000'000 - even though it's probably not a concern for the vast majority of users.
Reply To mateuszviste
Reply To bttr
The summary is 1 too far to the right and thus, the lines breaks.
The fields are placed so they allow outputting 10 digits, that is: the maximum length of a 32 bit number, and the last summary line ("xxx bytes free") is placed so the value is aligned consistently with the value above it.
I see. The root cause is 'Datei(en)' being too long.
Same for 'fichier(s)' in French.
And Google Translate tells me Turkish 'dosya' might be singular only. Plural would be 'dosyalar', which results in 'dosya(lar)' for this topic.
To be honest, 'file(s)' is a bad label, because the number also includes directories. Maybe a relict from when MS-DOS didn't support directories at all.
MS-DOS leaves only 9 places for the number of files. Maybe it's a good compromise, at least for 40-columns system, but I wonder what happens when the amount of files reaches 1'000'000'000 - even though it's probably not a concern for the vast majority of users.
I agree. And until SvarCOM supports DIR /S it also doesn't matter in SvarCOM. ;-)
If DIR /S is implemented in SvarCOM, you could just output 999'999'999 and put an additional line showing the real number.
MS-DOS 6.22 command.com:
SvarCOM 2022.3: