🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #158

Re: does "always append" apply to "a+" mode?

#158
From: T. William Wells
Date: Wed, 29 Jul 1992 15:17
28 lines
1527 bytes
In article <24992@dog.ee.lbl.gov> torek@horse.ee.lbl.gov (Chris Torek) writes:
:                       There is some dissent, however, on the grounds
: that the second paragraph `overrides' the first, i.e., that the first
: paragraph does not apply because of the '+' character.

Suggest that they take a remedial reading course before bothering
you further. See:

# Opening a file with append mode (|'a'| as the first character
...                                             ^^^^^
# When a file is opened with update mode (|'+'| as the second or
						       ^^^^^^
# third character in the above list of |mode| argument values), both
  ^^^^^
The first paragraph applies whenever the first character is an
`a'; the second paragraph applies whenever the second or third
character is a `+'. When the first and second characters are `a+'
both paragraphs apply. There is no other reading possible.

:                   A number of existing implementations that claim POSIX
: conformance (and hence ANSI X3.159-1989 conformance) do NOT always
: append with "a+" mode; are they broken?

Yes.

---
Bill                            { uunet | decwrl | telesci }!twwells!bill
bill@twwells.com
Technical Details
Message-ID: <Bs5p54.3L7@twwells.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!twwells!bill
References: <24992@dog.ee.lbl.gov>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c
Path: arc1-ca.pugleaf.net!sparky!uunet!twwells!bill
From: bill@twwells.com (T. William Wells)
Subject: Re: does "always append" apply to "a+" mode?
Organization: None, Mt. Laurel, NJ
References: <24992@dog.ee.lbl.gov>
Message-ID: <Bs5p54.3L7@twwells.com>
Date: Wed, 29 Jul 1992 15:17:25 GMT
Lines: 28