The following issue has been SUBMITTED. 
====================================================================== 
https://austingroupbugs.net/view.php?id=1687 
====================================================================== 
Reported By:                geoffclare
Assigned To:                
====================================================================== 
Project:                    Issue 8 drafts
Issue ID:                   1687
Category:                   Base Definitions and Headers
Type:                       Clarification Requested
Severity:                   Objection
Priority:                   normal
Status:                     New
Name:                       Geoff Clare 
Organization:               The Open Group 
User Reference:              
Section:                    5 File Format Notation 
Page Number:                115 
Line Number:                3632 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2023-05-03 10:30 UTC
Last Modified:              2023-05-03 10:30 UTC
====================================================================== 
Summary:                    Mismatch between blanks in file formats and default
IFS
Description: 
In the resolution of bug https://austingroupbugs.net/view.php?id=1532 the stty
example code for restoring the
terminal size uses awk because the stty utility is allowed to include
blanks from the current locale (not just blank from the portable character
set) around the numeric fields.  It was mentioned in
https://austingroupbugs.net/view.php?id=1532#c5661 that if
we change XBD chapter 5 so that it allows implementations to add blanks
only from the portable character set, then the example code could be
changed back to using shell field splitting instead of using awk.

I believe the reason for allowing blanks around numeric fields was because
of implementation differences noted during work on the original POSIX.2
drafts, such as the output of "wc -l" including leading blanks on some
systems but not others.  These differences at the time would only have
involved space and tab characters, no other blanks, so there was no reason
to allow other blanks in the original POSIX.2-1992 standard.

There are likely a large number of applications that expect to be able to
use the default IFS to do field splitting on such output, and at the moment
this is not guaranteed to work (in locales other than C and POSIX).  We
should change that.

For consistency, the other use of <blank> in XBD chapter 5 should change to
match.

Desired Action: 
On page 113 line 3543 section 5, change:<blockquote>' ' (An empty character
position.) Represents one or more <blank>
characters.</blockquote>to:<blockquote>' ' (An empty character position.)
Represents one or more <blank> characters from the portable character
set.</blockquote>
On page 115 line 3632 section 5, change:<blockquote>with <blank>
characters</blockquote>to:<blockquote>with <blank> characters from the
portable character set</blockquote>
On page 3379 line 115321 section stty, change:<blockquote><pre>stty size |
awk '{printf "stty rows %d cols %d", $1,
$2}'</pre></blockquote>to:<blockquote><pre>printf "stty rows %d cols %d"
$(stty size)</pre></blockquote>

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2023-05-03 10:30 geoffclare     New Issue                                    
2023-05-03 10:30 geoffclare     Name                      => Geoff Clare     
2023-05-03 10:30 geoffclare     Organization              => The Open Group  
2023-05-03 10:30 geoffclare     Section                   => 5 File Format
Notation
2023-05-03 10:30 geoffclare     Page Number               => 115             
2023-05-03 10:30 geoffclare     Line Number               => 3632            
======================================================================


  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [Issue ... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [Issue ... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [Issue ... Austin Group Bug Tracker via austin-group-l at The Open Group

Reply via email to