Vendor import of bwk's 6-May-2011 release.
This commit is contained in:
parent
f11de29169
commit
e2f76e526c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/vendor/one-true-awk/dist/; revision=221530 svn path=/vendor/one-true-awk/20110506/; revision=221531; tag=vendor/one-true-awk/20110506
5
FIXES
5
FIXES
@ -25,6 +25,11 @@ THIS SOFTWARE.
|
||||
This file lists all bug fixes, changes, etc., made since the AWK book
|
||||
was sent to the printers in August, 1987.
|
||||
|
||||
May 6, 2011:
|
||||
added #ifdef for isblank.
|
||||
now allows -ffoo as well as -f foo arguments.
|
||||
(thanks, ruslan)
|
||||
|
||||
May 1, 2011:
|
||||
after advice from todd miller, kevin lo, ruslan ermilov,
|
||||
and arnold robbins, changed srand() to return the previous
|
||||
|
4
b.c
4
b.c
@ -748,7 +748,11 @@ struct charclass {
|
||||
} charclasses[] = {
|
||||
{ "alnum", 5, isalnum },
|
||||
{ "alpha", 5, isalpha },
|
||||
#ifndef HAS_ISBLANK
|
||||
{ "blank", 5, isspace }, /* was isblank */
|
||||
#else
|
||||
{ "blank", 5, isblank },
|
||||
#endif
|
||||
{ "cntrl", 5, iscntrl },
|
||||
{ "digit", 5, isdigit },
|
||||
{ "graph", 5, isgraph },
|
||||
|
21
main.c
21
main.c
@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
||||
THIS SOFTWARE.
|
||||
****************************************************************/
|
||||
|
||||
const char *version = "version 20110501";
|
||||
const char *version = "version 20110506";
|
||||
|
||||
#define DEBUG
|
||||
#include <stdio.h>
|
||||
@ -91,13 +91,18 @@ int main(int argc, char *argv[])
|
||||
safe = 1;
|
||||
break;
|
||||
case 'f': /* next argument is program filename */
|
||||
argc--;
|
||||
argv++;
|
||||
if (argc <= 1)
|
||||
FATAL("no program filename");
|
||||
if (npfile >= MAX_PFILE - 1)
|
||||
FATAL("too many -f options");
|
||||
pfile[npfile++] = argv[1];
|
||||
if (argv[1][2] != 0) { /* arg is -fsomething */
|
||||
if (npfile >= MAX_PFILE - 1)
|
||||
FATAL("too many -f options");
|
||||
pfile[npfile++] = &argv[1][2];
|
||||
} else { /* arg is -f something */
|
||||
argc--; argv++;
|
||||
if (argc <= 1)
|
||||
FATAL("no program filename");
|
||||
if (npfile >= MAX_PFILE - 1)
|
||||
FATAL("too many -f options");
|
||||
pfile[npfile++] = argv[1];
|
||||
}
|
||||
break;
|
||||
case 'F': /* set field separator */
|
||||
if (argv[1][2] != 0) { /* arg is -Fsomething */
|
||||
|
Loading…
Reference in New Issue
Block a user