1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

More misc. tweaks and cleanups

Notable changes:

.github/workflows/ci.yml:
- Run 'bin/package test' on the github runner so we test iffe too.

src/cmd/ksh93/sh/subshell.c:
- sh_assignok was usually called like 'np = sh_assignok(np,0)'. But
  the function never changes np, it just returns the np value
  passed to it, so the assignment is pointless and that function
  can be changed to a void.

src/cmd/ksh93/sh/fault.c: sh_fault():
- Remove check for sh.subshell after sh_isstate(SH_INTERACTIVE). As
  of 48ba6964, it is never set in subshells.
This commit is contained in:
Martijn Dekker 2022-07-14 07:54:53 +02:00
parent adc6a64b82
commit 064baa372e
24 changed files with 47 additions and 51 deletions

View file

@ -6,7 +6,6 @@ note * Mamfiles are processed by mamake (src/cmd/INIT/mamake.c); we added
note * indentation to improve readability. The language is documented in
note * src/cmd/INIT/README-mamake.md.
note *
note component level :MAKE: equivalent
make test
make install
make all

View file

@ -25,10 +25,10 @@ tst ptr_void note{ standard C void* ok }end compile{
cat{
#pragma clang diagnostic ignored "-Wdeprecated-register"
#pragma clang diagnostic ignored "-Wmacro-redefined"
#pragma clang diagnostic ignored "-Wparentheses"
#pragma clang diagnostic ignored "-Wstring-plus-int"
#pragma clang diagnostic ignored "-Wunused-value"
#pragma GCC diagnostic ignored "-Wunused-result"
/* AST backwards compatibility macros */
#undef _NIL_

View file

@ -242,19 +242,26 @@ ERROR_OPTIONS="system"
provides debugging message macros when
.L DEBUG
or
.L _TRACE_
.L _BLD_DEBUG
are defined
.RL ( _TRACE_
.RL ( _BLD_DEBUG
is defined by
.I makerules
when
.L CCFLAGS
contains
.LR \-g ).
the
.IR Mamfile s
when the
.L \-G
a.k.a.
.L \-\-debug\-symbols
option is passed to
.BR mamake (1),
which the
.BR package (1)
command does automatically when given the argument
.LR debug=1 ).
All of the macros expand to nothing when both
.L DEBUG
and
.L _TRACE_
.L _BLD_DEBUG
are not defined.
Otherwise
.L debug

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1985-2012 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -76,7 +76,8 @@ pathpath_20100601(const char* p, const char* a, int mode, register char* path, s
{
if (*p != '/' && (mode & PATH_ABSOLUTE))
{
getcwd(buf, sizeof(buf));
if(!getcwd(buf, sizeof(buf)))
return (char*)0;
s = buf + strlen(buf);
sfsprintf(s, sizeof(buf) - (s - buf), "/%s", p);
if (path != buf)

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1992-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -52,7 +52,6 @@
#define eol(c) ((c)&WC_NL)
#define mbc(c) ((c)&WC_MB)
#define spc(c) ((c)&WC_SP)
#define mb2wc(w,p,n) (*ast.mb_towc)(&w,(char*)p,n)
Wc_t* wc_init(int mode)
{