View Issue Details

IDProjectCategoryView StatusLast Update
00013061003.1(2016/18)/Issue7+TC2Shell and Utilitiespublic2024-06-11 09:08
Reportersteffen Assigned To 
PrioritynormalSeverityEditorialTypeEnhancement Request
Status ClosedResolutionAccepted 
NameSteffen Nurpmeso
Organization
User Reference
SectionVol. 3: Shell and Utilities, mailx
Page Number2951
Line Number97809
Interp StatusApproved
Final Accepted TextSee 0001306:0004716.
Summary0001306: Documented folder= behaviour contradicts implementations (of folders command)
DescriptionPOSIX documents

  If folder is unset or set to null, user-specified filenames beginning with '+' shall refer to files in the current directory that begin with the literal '+' character.

This does not reflect behaviour of BSD Mail (since introduction in 1982-03-15), which simply calls getfold() of same commit, and here NOSTR is NULL indeed:

<code>
+ if (name[0] == '+' && getfold(cmdbuf) >= 0) {
+ sprintf(xname, "%s/%s", cmdbuf, name + 1);
+ return(expand(savestr(xname)));
+ }

+getfold(name)
+ char *name;
+{
+ char *folder;
+
+ if ((folder = value("folder")) == NOSTR)
+ return(-1);
+ if (*folder == '/')
+ strcpy(name, folder);
+ else
+ sprintf(name, "%s/%s", homedir, folder);
+ return(0);
+}
</code>

Unix V10 (V8 has not any of this) derives from the above, but .. maybe has had time pressure and did the false

<code>
        if (name[0] == '+') {
                cp = expand(++name);
                if (*cp != '/' && getfold(cmdbuf) >= 0) {
                        sprintf(xname, "%s/%s", cmdbuf, cp);
                        cp = savestr(xname);
                }
                if (debug) fprintf(stderr, "%s\n", cp);
                return cp;
</code>

Since the folders command simply provides a listing of the directory represented by folder= a.k.a. getfold()>=0 (done like that by all), i see no ground for POSIX's "or set to null".
Desired ActionOn line 97814, change

  nofolder. If folder is unset or set to null, user-specified filenames

to

  nofolder. If folder is unset, user-specified filenames
Tagstc3-2008

Activities

Don Cragun

2020-01-09 17:32

manager   bugnote:0004716

Interpretation response
------------------------
The standard states that a null option-argument to the folders command must produce an error, and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor.

Rationale:
-------------
This is not the way existing implementations behave.

Notes to the Editor (not part of this interpretation):
    Make the changes suggested in the Desired Action.

agadmin

2020-01-10 17:43

administrator   bugnote:0004717

Interpretation proposed: 10 January 2020

ajosey

2020-02-19 17:27

manager   bugnote:0004785

Interpretation approved: 19 Feb 2020

Issue History

Date Modified Username Field Change
2019-12-16 22:38 steffen New Issue
2019-12-16 22:38 steffen Name => Steffen Nurpmeso
2019-12-16 22:38 steffen Section => Vol. 3: Shell and Utilities, mailx
2019-12-16 22:38 steffen Page Number => 2951
2019-12-16 22:38 steffen Line Number => 97809
2020-01-09 17:32 Don Cragun Interp Status => ---
2020-01-09 17:32 Don Cragun Note Added: 0004716
2020-01-09 17:32 Don Cragun Status New => Interpretation Required
2020-01-09 17:32 Don Cragun Resolution Open => Accepted
2020-01-09 17:33 Don Cragun Final Accepted Text => See 0001306:0004716.
2020-01-09 17:33 Don Cragun Tag Attached: tc3-2008
2020-01-10 17:43 agadmin Interp Status --- => Proposed
2020-01-10 17:43 agadmin Note Added: 0004717
2020-02-19 17:27 ajosey Interp Status Proposed => Approved
2020-02-19 17:27 ajosey Note Added: 0004785
2020-02-26 11:45 geoffclare Status Interpretation Required => Applied
2024-06-11 09:08 agadmin Status Applied => Closed