definitions again (Developers)
> I have another question.
>
> In order to support EBCDIC ANSI X3.64 terminals on a mainframe
> (theoretically they could exist, but I created an emulator
> to do it instead), I need to know the ESC character. So in all
> my code I need to put #define ESC 0x1b for ASCII, and 0x27
> for EBCDIC (from memory).
>
> I think this should instead be in a header file, as:
>
> #define ESC_CHAR 0x1b
>
> #define ESC_STRING "\x1b"
>
Definitively NO. There is no reason *ever* to have a C90 program output
ESC_CHAR.
What you have probably in mind is something similar to
switch (terminal_detected())
{
case VT_100:
cursor_up_string = "\x1b[A";
cursor_down_string = "\x1b[B";
cursor_left_string = "\x1b[A";
break;
case EBCDIC_ANSI_X3.64:
cursor_up_string = "\x27(J";
...
> rather than burdening the compiler to recognize '\e' or whatever.
if your compiler is burdened by this, change compiler.
> Do you agree that this should be in an "extended C90",
NO.
> along with those findfirst/findnext functions, and
> if so, should there be a generic header file called
> nonc90.h or something, rather than io.h plus whatever?
call it PAUL.H or KERRAVON.H or WHATEVER.H
the idea that a single person could set a standard is hilarious.
the idea that YOU could set a standard is more sad than hilarious.
Tom
Complete thread:
- definitions again - kerravon, 19.03.2024, 07:28
- definitions again - samwdpckr, 19.03.2024, 13:15
- definitions again - ecm, 19.03.2024, 14:15
- definitions again - kerravon, 19.03.2024, 15:52
- definitions again - marcov, 19.03.2024, 20:11
- definitions again - kerravon, 20.03.2024, 09:39
- definitions again - marcov, 20.03.2024, 12:53
- definitions again - kerravon, 20.03.2024, 13:36
- definitions again - marcov, 20.03.2024, 12:53
- definitions again - kerravon, 20.03.2024, 09:39
- definitions again - Oso2k, 21.03.2024, 01:00
- definitions again - Oso2k, 21.03.2024, 01:06
- definitions again - kerravon, 21.03.2024, 10:53
- definitions again - Oso2k, 22.03.2024, 18:30
- definitions again - marcov, 22.03.2024, 22:49
- definitions again - Rugxulo, 11.04.2024, 02:48
- definitions again - kerravon, 11.04.2024, 04:03
- definitions again - Rugxulo, 13.04.2024, 05:55
- definitions again - kerravon, 13.04.2024, 08:53
- definitions again - boeckmann, 14.04.2024, 16:12
- definitions again - kerravon, 20.04.2024, 03:09
- definitions again - tom, 20.04.2024, 09:50
- definitions again - kerravon, 20.04.2024, 10:57
- definitions again - tom, 21.04.2024, 11:27
- definitions again - kerravon, 21.04.2024, 15:18
- definitions again - tom, 21.04.2024, 21:20
- definitions again - kerravon, 22.04.2024, 02:48
- definitions again - kerravon, 22.04.2024, 03:37
- definitions again - Rugxulo, 23.04.2024, 02:13
- definitions again - kerravon, 23.04.2024, 10:04
- definitions again - Rugxulo, 23.04.2024, 02:13
- definitions again - tom, 21.04.2024, 21:20
- definitions again - kerravon, 23.04.2024, 11:50
- definitions again - Rugxulo, 23.04.2024, 13:03
- definitions again - kerravon, 21.04.2024, 15:18
- definitions again - tom, 21.04.2024, 11:27
- definitions again - kerravon, 20.04.2024, 10:57
- definitions again - tom, 20.04.2024, 09:50
- definitions again - kerravon, 20.04.2024, 03:09
- definitions again - boeckmann, 14.04.2024, 16:12
- definitions again - kerravon, 13.04.2024, 08:53
- definitions again - Rugxulo, 13.04.2024, 05:55
- definitions again - bretjohn, 11.04.2024, 16:34
- definitions again - glennmcc, 11.04.2024, 18:15
- definitions again - kerravon, 11.04.2024, 04:03
- definitions again - Oso2k, 22.03.2024, 18:30
- definitions again - kerravon, 21.03.2024, 10:53
- definitions again - samwdpckr, 19.03.2024, 13:15