• remove strcasestr.c, use home-grown implementation¹, call it stricmp,
and have it return an API-correct const char * • enhance and stylify comments • a little KNF and simplifications • #ifdef DEBUG: replace strchr and strstr with ucstrchr and ucstrstr that take and return a non-const char *, and fix the violations • new cstrchr, cstrstr (take and give const char *) • new vstrchr, vstrstr (take const or not, give boolean value) • new afreechk(x) = afreechv(x,x) = if (x1) afree(x2, ATEMP) • new ksh_isdash(str) = (str != NULL) && !strcmp(str, "-") • replace the only use of strrchr with inlined code to shrink • minor man page fixes • Minix 3 signames are autogenerated with gcc • rename strlfun.c to strlcpy.c since we don't do strlcat(3) anyway, only strlcpy(3), and shorten it • dot.mkshrc: move MKSH=… down to the export line to not disturb the PS1 visual impression ☺ • dot.mkshrc: Lstripcom(): optimise • bump version ¹) side effect from creating API-correct cstrchr, cstrstr, etc. uses goto so it must be better ☻ tested on mirbsd-current via both Makefile and Build.sh
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
$MirOS: src/bin/mksh/copyright,v 1.19 2007/01/17 01:24:29 tg Exp $
|
||||
$MirOS: src/bin/mksh/copyright,v 1.20 2007/03/04 03:04:23 tg Rel $
|
||||
|
||||
The MirBSD Korn Shell (mksh) is
|
||||
|
||||
Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007
|
||||
Thorsten Glaser <tg@mirbsd.de>
|
||||
Thorsten "mirabilos" Glaser <tg@mirbsd.de>
|
||||
|
||||
Provided that these terms and disclaimer and all copyright notices
|
||||
are retained or reproduced in an accompanying document, permission
|
||||
@@ -33,4 +33,4 @@ A number of files that are either always or conditionally included
|
||||
during compilation, depending on the target operating environment,
|
||||
are covered by different (2/3-clause BSD or similar) licences; re-
|
||||
fer to the individual files for details: alloc.c (always included)
|
||||
and setmode.c, strcasestr.c, strlfun.c
|
||||
and setmode.c, strlcpy.c
|
||||
|
Reference in New Issue
Block a user