mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Next round of minor tweaks and cleanups
Notable changes: - Tie up some loose ends re:3de4da5aand7ba2c685. - comp/omitted.c: Header include fix for Cygwin. - misc/optget.c: - args(): When printing options for the uage line, use a local pointer for the 'if' block instead of reusing the 'b' pointer. That variable is used to output blanks later. - The above fix allows re-enabling the AST translation-aware macros and deleting the astsa fallback without causing usage message corruption in multibyte locales. Maybe someday we'll make ksh actually translatable. - Remove code to reinitialise _error_infop_ and _opt_info_ 'because these are not initialised by all DLLs'. In 2022, hopefully the buggy dynamic linkers are fixed. If not, we're not going to find out by keeping the workaround. I suspect that those bugs may have been triggered by the Microsoft/Cygwin import/export obfuscation removed in3de4da5a. - ksh93: - Remove unused sh.st.var_local variable. This was a leftover of a 93v- attempt to implement the bash 'local' command. It used static scoping, so it's not actually compatible. - Add a few regression tests for miscellaneous breakage that I caused in experiments (the breakage never made it to git; the tests are just to keep it that way).
This commit is contained in:
parent
3de4da5afb
commit
ce3cc66d58
15 changed files with 55 additions and 89 deletions
|
|
@ -97,7 +97,7 @@ static const char usage[] =
|
|||
#define elementsof(x) (sizeof(x)/sizeof(x[0]))
|
||||
#define newof(p,t,n,x) ((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)calloc(1,sizeof(t)*(n)+(x)))
|
||||
|
||||
#define NiL ((char*)0)
|
||||
#define NiL 0
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -267,7 +267,15 @@ extern char** environ;
|
|||
static void
|
||||
usage()
|
||||
{
|
||||
fprintf(stderr, "Usage: %s [-iknFKNV] [-f mamfile] [-r pattern] [-C directory] [-D level] [target ...] [name=value ...]\n", state.id);
|
||||
fprintf(stderr, "Usage: %s"
|
||||
" [-iknFKNV]"
|
||||
" [-f Mamfile]"
|
||||
" [-r pattern]"
|
||||
" [-C directory]"
|
||||
" [-D level]"
|
||||
" [target ...]"
|
||||
" [name=value ...]"
|
||||
"\n", state.id);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
|
|
@ -1834,7 +1842,7 @@ update(register Rule_t* r)
|
|||
}
|
||||
|
||||
/*
|
||||
* scan makefile prereqs
|
||||
* scan Mamfile prereqs
|
||||
*/
|
||||
|
||||
static int
|
||||
|
|
@ -2123,7 +2131,7 @@ recurse(char* pattern)
|
|||
search(state.vars, "MAMAKEARGS", duplicate(use(state.opt) + 1));
|
||||
|
||||
/*
|
||||
* scan the makefile and descend
|
||||
* scan the Mamfile and descend
|
||||
*/
|
||||
|
||||
walk(state.rules, scan, NiL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue