delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/03/01/03:39:18

Date: Thu, 1 Mar 2001 10:36:56 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Mark E." <snowball3 AT bigfoot DOT com>
cc: djgpp-workers AT delorie DOT com
Subject: Re: O_TEMPORARY v3
In-Reply-To: <3A9D30A6.22494.7A725@localhost>
Message-ID: <Pine.SUN.3.91.1010301103636.4534F-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 28 Feb 2001, Mark E. wrote:

> >> > however I'm not sure about one change I made:
> > > 
> > > *************** open(const char* filename, int oflag, .. *** 107,113 ****
> > > }  
> > > 
> > >     if (should_create)
> > > !     fd = _creatnew(real_name, dmode, oflag & 0xff);
> > >     else
> > >     {
> > >       fd = _open(real_name, oflag);
> > > --- 109,115 ----
> > >       }
> > > 
> > >     if (should_create)
> > > !     fd = _creatnew(real_name, dmode, oflag);
> > >     else
> > >     {
> > >       fd = _open(real_name, oflag);
> > > 
> > > 
> > > If the masking with 0xff is neccessary, I can rework that part.
> > 
> > What is the value of O_TEMPORARY?  (Btw, I don't see the diffs for
> > fcntl.h in the patches.)
> 
> Here it is:
> *** fcntl.h	2001/02/01 19:17:17	1.5
> --- fcntl.h	2001/02/28 22:04:12
> *************** int	fcntl(int _fildes, int _cmd, ...);
> *** 77,82 ****
> --- 77,84 ----
>   #define O_NOLINK        0x4000
>   #define O_NOFOLLOW      0x8000
>   
> + #define O_TEMPORARY	0x10000 /* Delete file after closing.  */
> + 

In that case, you will need to reset all the bits in oflag except the
lowest byte and the O_TEMPORARY bit, because DOS gives a different
meaning to the other bits, and _creatnew plugs its last argument more
or less directly into the BX register.

> > > + See also @ref{__set_fd_properties} and @ref{__dup_fd_properties}.
> > 
> > You cannot use "@ref" on its own, you have to say "see" or something
> > else.
> 
> I'm confused here. Are you saying the phrase "See also" isn't enough?

It is enough for the first @ref, but not for the second.

I'm thinking about the printed version (the Info output doesn't care
if there's a "See" before "*Note").  In the printed version, @ref
generates a bare-bones reference, like "[Foo Bar], p.123" (where ``Foo
Bar'' is a name of a section).  So the above will look like this:

  See also [__set_fd_prperties], p. 123 and [__dup_fd_properties],
  p. 234.

This IMHO only marginally legible.  I suggest to rephrase like this:

  For more info, look in @ref{__set_fd_prperties} and in
  @ref{__dup_fd_properties}.

But if you think the first wording is okay in print, I guess I won't
argue.

- Raw text -


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