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 [1003.1(2016/18)/Issue7+TC2] System Interfaces Editorial Error 2021-10-09 14:42 2022-02-04 10:07
Reporter rillig View Status public  
Assigned To
Priority normal Resolution Accepted As Marked  
Status Applied  
Name Roland Illig
Organization
User Reference
Section DESCRIPTION
Page Number (page or range of pages)
Line Number (Line or range of lines)
Interp Status ---
Final Accepted Text Note: 0005599
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 tc3-2008
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).

(0005599)
geoffclare (manager)
2022-01-13 16:48

Two-part resolution:
    
1. Action on Andrew to change the HTML translation so it better resembles the PDF

2. In the next update to the standard (PDF/troff), make the following changes:
    
On page 1061 line 36094 section getopt(), change:
If, when getopt( ) is called:
to:
If, when getopt( ) is called, any of the following is true:

On page 1061 line 36096 section getopt(), change:
is not the character −
to:
is not the character '−'
(0005608)
ajosey (manager)
2022-01-14 18:07

The html edition has been updated both online and in gitlab, the bundles have been updated.

- 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
2022-01-13 16:48 geoffclare Note Added: 0005599
2022-01-13 16:52 geoffclare Project Online Pubs => 1003.1(2016/18)/Issue7+TC2
2022-01-13 16:52 geoffclare Page Number => (page or range of pages)
2022-01-13 16:52 geoffclare Line Number => (Line or range of lines)
2022-01-13 16:52 geoffclare Interp Status => ---
2022-01-13 16:52 geoffclare Final Accepted Text => Note: 0005599
2022-01-13 16:52 geoffclare Status New => Resolved
2022-01-13 16:52 geoffclare Resolution Open => Accepted As Marked
2022-01-13 16:52 geoffclare Tag Attached: tc3-2008
2022-01-14 18:07 ajosey Note Added: 0005608
2022-02-04 10:07 geoffclare Status Resolved => Applied


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