Skip to contentSkip to conversation

PATCH 1/2: Make gotoxy & siblings use unsigned variables

DISCUSSION Bill Davidsen 2 participants 2 messages Jan 16, 2004 4 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 6 lines · Andries Brouwer
Quoted 4 lines
Quoted 1 line

Shouldn't we be using "size_t" for unsigned int

You might be right. I was just being consistent with the other definitions.

Quoted 6 lines

These are character positions on a screen.
When did you last see a console in text mode with a line length of more than 2^31 ?

If you go for a minimal patch then you should replace "char" in one or two places by "unsigned char" and that is all.

Are these screen positions or offsets into the string for the line? The reason I ask is that with a 2-byte character set no char is going to do the latter reliably, not only do people run 132 col mode with vt100 windows, just hitting the "full screen" button with most WM will give you >127 columns.

Signature · 3 lines
bill davidsen <[email protected]>
  CTO TMR Associates, Inc
  Doing interesting things with small computers since 1979
#5 lore raw

Hi.

Since we discussed this, I've produced a cut down patch and sent it to my wide-console users. I can confirm that it is all that is needed. I'll be posting a new patch for Andrew shortly.

Regards,

Nigel

Quoted 19 lines · Bill Davidsen
Quoted 6 lines · Andries Brouwer
Quoted 4 lines
Quoted 1 line

Shouldn't we be using "size_t" for unsigned int

You might be right. I was just being consistent with the other definitions.

Quoted 6 lines

These are character positions on a screen.
When did you last see a console in text mode with a line length of more than 2^31 ?

If you go for a minimal patch then you should replace "char" in one or two places by "unsigned char" and that is all.

Are these screen positions or offsets into the string for the line? The reason I ask is that with a 2-byte character set no char is going to do the latter reliably, not only do people run 132 col mode with vt100 windows, just hitting the "full screen" button with most WM will give you >127 columns.

Signature · 2 lines
My work on Software Suspend is graciously brought to you by
LinuxFund.org.