Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0001523 [Online Pubs] System Interfaces Editorial Error 2021-10-09 14:42 2021-10-09 16:20
Reporter rillig View Status public  
Assigned To
Priority normal Resolution Open  
Status New  
Name Roland Illig
Organization
User Reference
URL https://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html [^]
Section DESCRIPTION
Summary 0001523: Wrong layout of getopt "-"
Description > If, when getopt() is called:
>
> argv[optind] is a null pointer*argv[optind] is not the character -
> argv[optind] points to the string "-"

I didn't understand the above excerpt, even after reading it multiple times.

My misunderstanding was due to the missing line break before the first '*' and by the additional space before the last line.
Desired Action Change the rendered HTML text to be:

> If, when getopt() is called:
>
> argv[optind] is a null pointer
> argv[optind][0] is not the character '-'
> argv[optind] points to the string "-"

The changes are:
* additional line break between line 1 and line 2
* postfix array index in line 2 to make the lines look more similar
* single quotes around the character '-' in line 2
* no leading space in line 3

Having the HTML markup <tt> inside of
 looks strange, as if the text outside the <tt> was intended to be displayed in proportional font. That may or may not be an entirely different issue though.

While here, I'd prefer it if at the end of the
 sections, there were no additional newline, so that the continuation of the sentence "getopt() shall return -1" is closer to the list of conditions.	
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0005499)
rillig (reporter)
2021-10-09 14:52

I just saw that Mantis didn't render the description as intended, so here is my second try, after reading the provided documentation that answered exactly my questions. :)

Change the rendered HTML text to be:

> If, when getopt() is called:
>
> argv[optind] is a null pointer
> argv[optind][0] is not the character '-'
> argv[optind] points to the string "-"

The changes are:
* additional line break between line 1 and line 2
* postfix array index in line 2 to make the lines look more similar
* single quotes around the character '-' in line 2
* no leading space in line 3

Having the HTML markup <tt> inside of <_pre> looks strange, as if the text outside the <tt> was intended to be displayed in proportional font. That may or may not be an entirely different issue though.

While here, I'd prefer it if at the end of the <_pre> sections, there were no additional newline, so that the continuation of the sentence "getopt() shall return -1" is closer to the list of conditions.
(0005500)
kre (reporter)
2021-10-09 16:20
edited on: 2021-10-09 16:25

Of those proposed changes, the missing newline is clearly a
rendering into HTML issue, it isn't like that in the PDF version,
and should be easily fixed (says me who knows nothing about that process!)

The changes from *argv[optind] to argv[optind][0] and to put
quotes areound the minus sign on that line would require changes to
the PDF as well, and so need to be a bug report (editorial) against
issue7-TC2 - the first of those I see no point for, it is fine as it is
(when correctly rendered, as in the PDF), the second just maybe (it
is clear enough as it is, but single quotes wouldn't hurt).

The leading space in line 3 should also occur in line 1, and serves to
cause the three instances of argv[optind] to line up one above the other
(the 2nd line has the '*' in that position), and I see no reason to change
that either. In the HTML those should perhaps be &nbsp; rather than
just a space.

The blank line after the conditions also matches the PDF, and I see no
issue with that either.

One thing I might alter, if editorial (as aside from just rendering)
changes are considered, is to make it explicit that the three conditions
are "any of" choices, not "all of" (even though it is obvious that the
latter cannot possibly be intended upon careful reading), perhaps by
changing "If, when getopt() is called:" to "If, when getopt() is called any of:"
(to avoid needing to insert "or" somewhere, which would look ugly).


- Issue History
Date Modified Username Field Change
2021-10-09 14:42 rillig New Issue
2021-10-09 14:42 rillig Name => Roland Illig
2021-10-09 14:42 rillig URL => https://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html [^]
2021-10-09 14:42 rillig Section => DESCRIPTION
2021-10-09 14:52 rillig Note Added: 0005499
2021-10-09 16:20 kre Note Added: 0005500
2021-10-09 16:23 kre Note Edited: 0005500
2021-10-09 16:25 kre Note Edited: 0005500


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker