| Deutsch English Français Italiano |
|
<101q6h4$10q3q$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: "Paul Edwards" <mutazilah@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: encapsulating directory operations
Date: Thu, 5 Jun 2025 05:24:17 +1000
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <101q6h4$10q3q$1@dont-email.me>
References: <100h650$23r5l$1@dont-email.me> <87bjrkxonr.fsf@nosuchdomain.example.com> <b7fb8fc41d43807641e673e1ca1d3baf69f5766f@i2pn2.org> <87iklrtcys.fsf@nosuchdomain.example.com> <20250523132019.763@kylheku.com> <100qm76$7shk$2@dont-email.me> <20250523140729.787@kylheku.com> <100qru0$9mjb$2@dont-email.me> <101929h$3olom$4@dont-email.me> <10196gn$3pd33$1@dont-email.me> <101aca9$me2$3@dont-email.me> <101afvt$1sm1$1@dont-email.me> <871ps7f8o3.fsf@nosuchdomain.example.com> <101aif2$1sm2$3@dont-email.me> <Qb4_P.377135$vvyf.313049@fx18.iad> <101bpl8$d1n8$1@dont-email.me> <101dac8$mkpm$3@dont-email.me> <101p3b3$o3pc$1@dont-email.me> <101poqm$t350$1@dont-email.me> <101q50i$10dbg$1@dont-email.me> <20250604121550.286@kylheku.com>
Injection-Date: Wed, 04 Jun 2025 21:24:21 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="2337719333bf35f61fa4edc299522788";
logging-data="1075322"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1823WYNjfYXYDGZd/0aEVz/JzRQiwRLWsY="
Cancel-Lock: sha1:ApNkxVCsZDCyuSue1SfGNJiszr8=
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
X-MSMail-Priority: Normal
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
"Kaz Kylheku" <643-408-1753@kylheku.com> wrote in message
news:20250604121550.286@kylheku.com...
> On 2025-06-04, Paul Edwards <mutazilah@gmail.com> wrote:
> > If I have existing C code that does:
> >
> > fopen("test1.dat", "rb");
> > fread into buf
> > if (memcmp(buf + 5, "XYZ", 3) == 0)
> >
> > and test1.dat is in EBCDIC, the above program on the 80386
> > has been compiled with EBCDIC strings, so it works, and then
> > now you do:
> >
> > printf("It matches!\n");
> >
> > where do you expect those characters in the printf string - all
> > currently EBCDIC - to be translated to ASCII on a modern
> > Windows 10/11 system?
>
> I think that in this case you would ideally want the EBCDIC-enabled
> compiler to have extensions for working with both character sets.
>
> For isntance E"foo" would specify a string object that is
> encoded in EBCDIC in the execution environment, whereas
> "foo" is ASCII.
>
> You could develop a textual preprocesor which implements
> this transformation: tokenizes the C well enough to recognize
> string literals preceded by E, and translates them to
> string literals without E, whose content is EBCDIC bytes.
>
> It wouldn't have to be absoultely perfect; only to work
> correctly on your small amount of private code.
Even assuming the above was technically possible - what's
wrong with just having a pseudo-bios and OS so that
everything is totally clean?
BFN. Paul.