Since the argument is optional, we need a semicolon.
This commit accomplishes that by setting the OA_OPTIONAL flag for the
appropriate entries in PL_opargs. This should not affect anything
else, as ck_ftst (the check routine for [l]stat) doesn’t even look at
PL_opargs.
It also has to tweak the prototype-generation logic slightly, because
PL_opargs also has OA_DEFGV set.
I think this is insignificant enough not to warrant a delta entry.
defgv = PL_opargs[i] & OA_DEFGV;
oa = PL_opargs[i] >> OASHIFT;
while (oa) {
- if (oa & OA_OPTIONAL && !seen_question && (!defgv || n)) {
+ if (oa & OA_OPTIONAL && !seen_question && (
+ !defgv || n || (oa & (OA_OPTIONAL - 1)) == OA_FILEREF
+ )) {
seen_question = 1;
str[n++] = ';';
}
0x01116404, /* ssockopt */
0x00006b04, /* getsockname */
0x00006b04, /* getpeername */
- 0x00006c80, /* lstat */
- 0x00006c80, /* stat */
+ 0x0000ec80, /* lstat */
+ 0x0000ec80, /* stat */
0x00006c84, /* ftrread */
0x00006c84, /* ftrwrite */
0x00006c84, /* ftrexec */
# Stat calls. OP_IS_FILETEST wants them consecutive.
-lstat lstat ck_ftst u- F
-stat stat ck_ftst u- F
+lstat lstat ck_ftst u- F?
+stat stat ck_ftst u- F?
ftrread -R ck_ftst isu- F-+
ftrwrite -W ck_ftst isu- F-+
ftrexec -X ck_ftst isu- F-+
localtime (;$)
lock (\[$@%*])
log (_)
-lstat (*)
+lstat (;*)
lt undef
m undef
map undef
sprintf ($@)
sqrt (_)
srand (;$)
-stat (*)
+stat (;*)
state undef
study undef
sub undef