delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/21/17:36:34

From: Richard Dawe <richdawe AT bigfoot DOT com>
Newsgroups: comp.os.msdos.djgpp,comp.os.msdos.programmer
Subject: Re: Detecting Windows and Windows directory from DOS
Date: Tue, 21 Mar 2000 21:13:25 +0000
Organization: Customer of Planet Online
Lines: 40
Message-ID: <38D7E5F5.ED6FB969@bigfoot.com>
References: <8am5ub$o0v$1 AT news6 DOT svr DOT pol DOT co DOT uk> <38D108E3 DOT D9821E3B AT americasm01 DOT nt DOT com> <8arkm8$m3h$1 AT newsg2 DOT svr DOT pol DOT co DOT uk> <qft2dsk6mso6suit8q0aikucnffq0cb77q AT 4ax DOT com> <38D1EFAA DOT 7A48D29D AT is DOT elta DOT co DOT il> <38D6844B DOT 876E5631 AT bigfoot DOT com> <MPG DOT 134160c4f0a1f29b98ae44 AT news DOT mindspring DOT com>
NNTP-Posting-Host: modem-17.angainor.dialup.pol.co.uk
Mime-Version: 1.0
X-Trace: news6.svr.pol.co.uk 953673843 7614 62.136.110.145 (21 Mar 2000 21:24:03 GMT)
NNTP-Posting-Date: 21 Mar 2000 21:24:03 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.14 i586)
X-Accept-Language: de,fr
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello.

Stan Brown wrote:
> > Regdos seems to have vanished, reappeared and then vanished again - or
> > rather, the author's home page has disappeared. Anyway, I just
> > discovered that I put a copy of it here:
> >
> >http://www.phekda.freeserve.co.uk/richdawe/mysoft.html#homeless
> 
> I just downloaded it out of curiosity, and in the very first
> header file I examined I found illegal C:
> 
>         #define __DOSX_H
> 
> All identifiers beginning with an underscore and followed by a
> capital letter or another underscore are reserved to the
> implementation (compiler and library), and in user code they lead
> to undefined behavior.

So is Regdos user code or library code? In essence it provides an API
which is part of the Win32 standard libraries. By "library" do you mean
the standard C libraries? Looking at the draft of C99 (or is it C1999
now?) that I have, I believe that double underscores are reserved for
standard C libraries only. So, Regdos does violate this.

BTW I'm not the maintainer of this library. If you want to fix it up,
please do. I'd be happy to host an updated version.

By the way, I think you mean "in user code they _may_ lead to undefined
behavior" rather than "in user code they lead to undefined behavior",
which is a bit harsh. ;)

Anyhow, thanks for pointing this out. I'll put a little note on the web
page.

Bye,

-- 
Richard Dawe
richdawe AT bigfoot DOT com ICQ 47595498 http://www.bigfoot.com/~richdawe/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019