Ticket #44153

Make DIR aware of 40-columns mode

Eröffnet am: 2022-03-19 20:16 Letztes Update: 2023-08-03 23:46

Auswertung:
Verantwortlicher:
(Keine)
Status:
Geschlossen
Komponente:
Meilenstein:
(Keine)
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Postponed
Datei:
Keine

Details

MS-DOS 6.22 command.com:

1234567890123456789012345678901234567890 <-- ruler added by me
 Volume in drive C is SVARDOS
 Volume Serial Number is 1B5B-1C0B
 Directory of C:\

AUTOEXEC BAT       963 13.03.22   14:33
AUTOEXEC DEF       616 05.02.22   20:37
COMMAND  COM     27606 13.03.22   10:45
CONFIG   DEF       220 05.02.22   20:37
CONFIG   SYS       421 13.03.22   14:31
FREECOM  COM     66597 09.03.17   13:52
KERNEL   SYS     45329 24.11.16   12:43
        7 file(s)     141752 bytes
                   472989696 bytes free

  1. Look, how it all fits into 39 columns max.
  2. MS-DOS command.com uses 'yy' only.
  3. And disables usage of thousands separator, when there are < 80 columns available.

SvarCOM 2022.3:

1234567890123456789012345678901234567890 <-- ruler added by me
Volume in drive C is SVARDOS
Volume Serial Number is 1B5B-1C0B
Directory of C:\

KERNEL   SYS      45329  24.11.2016 12:4
3
FREECOM  COM      66597  09.03.2017 13:5
2
AUTOEXEC DEF        616  05.02.2022 20:3
7
CONFIG   DEF        220  05.02.2022 20:3
7
AUTOEXEC BAT        963  13.03.2022 14:3
3
COMMAND  COM      27606  13.03.2022 10:4
5
CONFIG   SYS        421  13.03.2022 14:3
1
            7 file(s)       141.752 byte
s
                        472.989.696 byte
s free

  1. SvarCOM always displays 'yyyy' currently.
  2. SvarCOM display is to wide in general, e.g., 'bytes' and 'bytes free' wrap.

Ticket-Verlauf (3/6 Historien)

2022-03-19 20:16 Aktualisiert von: bttr
  • New Ticket "Make DIR aware of 40-columns mode" created
2022-03-23 05:22 Aktualisiert von: mateuszviste
Kommentar

rev 1141 brings a couple of improvements in this subject

2022-04-01 18:46 Aktualisiert von: bttr
Kommentar

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.

2022-04-01 20:36 Aktualisiert von: mateuszviste
Kommentar

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.

2022-04-03 01:43 Aktualisiert von: bttr
Kommentar

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.

2023-08-03 23:46 Aktualisiert von: mateuszviste
  • Status Update from Offen to Geschlossen
  • Lösung Update from Keine to Postponed

Dateianhangliste

Keine Anhänge

Bearbeiten

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Anmelden