+2019-09-23 Paul Eggert <eggert@cs.ucla.edu>
+
+ Update URLs and associated text
+ (Thanks to Bruno Haible for proofreading this patch.)
+ Prefer https: to http: in URLs where either will do, for the usual
+ security reasons. I also updated broken and/or moved URLs
+ discovered during the process. In a few places I had to resort to
+ archive.org, since I didn't find the originals elsewhere.
+
2019-09-15 Paul Smith <psmith@gnu.org>
Bruno Haible <bruno@clisp.org>
html_epilog = "<hr color=\"black\" size=\"2\"/> \
Copyright (c) 2007, 2008 Free Software Foundation, Inc."
html_doctype = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \
-\"https://www.w3.org/TR/html401/loose.dtd\">"
+\"http://www.w3.org/TR/html401/loose.dtd\">"
html_comment = "<!-- Generated by gnulib's pmccabe2html at " epoch_time " -->"
html_title = "Cyclomatic Complexity report for " package_name
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en">
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>%%TITLE%% - GNU Project - Free Software Foundation</title>
creat (const char *filename, mode_t mode)
{
#if OPEN_TRAILING_SLASH_BUG
- /* If the filename ends in a slash, then fail.
- Rationale: POSIX <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html>
+ /* Fail if the filename ends in a slash,
+ as POSIX says such a filename must name a directory
+ <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13>.
creat() is defined as being equivalent to open() with flags
O_CREAT | O_TRUNC | O_WRONLY. Therefore:
If the named file already exists as a directory, then creat() must fail
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/ungetc.html>
"The file-position indicator is decremented by each successful
call to ungetc()..."
- 2) <https://pubs.opengroup.org/onlinepubs/9699919799/functions/ungetc.html> says:
- "The value of the file-position indicator for the stream
- after all pushed-back bytes have been read, or discarded
- by calling fseek(), fseeko(), fsetpos(), or rewind() (but
- not fflush()), shall be the same as it was before the
- bytes were pushed back."
- Here we are discarding all pushed-back bytes. */
+ 2) fflush discards bytes pushed back by ungetc:
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/fflush.html>
+ "...any characters pushed back onto the stream by ungetc()
+ or ungetwc() that have not subsequently been read from the
+ stream shall be discarded (without further changing the
+ file offset)." */
/* POSIX does not specify fflush behavior for non-seekable input
streams. Some implementations purge unread data, some return
#endif
#if FOPEN_TRAILING_SLASH_BUG
- /* If the filename ends in a slash and a mode that requires write access is
- specified, then fail.
- Rationale: POSIX <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html>
+ /* Fail if the mode requires write access and the filename ends in a slash,
+ as POSIX says such a filename must name a directory
+ <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13>.
If the named file already exists as a directory, then if a mode that
requires write access is specified, fopen() must fail because POSIX
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/fopen.html>
#endif
#if OPEN_TRAILING_SLASH_BUG
- /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR
- is specified, then fail.
- Rationale: POSIX <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html>
+ /* Fail if one of O_CREAT, O_WRONLY, O_RDWR is specified and the filename
+ ends in a slash, as POSIX says such a filename must name a directory
+ <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13>.
If the named file already exists as a directory, then
- if O_CREAT is specified, open() must fail because of the semantics
of O_CREAT,
}
# if OPEN_TRAILING_SLASH_BUG
- /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR
- is specified, then fail.
+ /* Fail if one of O_CREAT, O_WRONLY, O_RDWR is specified and the filename
+ ends in a slash, as POSIX says such a filename must name a directory
+ <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13>.
If the named file already exists as a directory, then
- if O_CREAT is specified, open() must fail because of the semantics
of O_CREAT,
according to the Austin Group's resolution on 2009-01-08. */
/* Check that fflush after a non-backup ungetc() call discards the
ungetc buffer. This is mandated by POSIX
- <https://pubs.opengroup.org/onlinepubs/9699919799/functions/ungetc.html> */
+ <https://pubs.opengroup.org/onlinepubs/9699919799/functions/fflush.html> */
c = fgetc (stdin);
ASSERT (c == '#');