main.c (221381) | main.c (221533) |
---|---|
1/**************************************************************** 2Copyright (C) Lucent Technologies 1997 3All Rights Reserved 4 5Permission to use, copy, modify, and distribute this software and 6its documentation for any purpose and without fee is hereby 7granted, provided that the above copyright notice appear in all 8copies and that both that the copyright notice and this --- 9 unchanged lines hidden (view full) --- 18SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 19WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 20IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 21ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 22THIS SOFTWARE. 23****************************************************************/ 24 25#include <sys/cdefs.h> | 1/**************************************************************** 2Copyright (C) Lucent Technologies 1997 3All Rights Reserved 4 5Permission to use, copy, modify, and distribute this software and 6its documentation for any purpose and without fee is hereby 7granted, provided that the above copyright notice appear in all 8copies and that both that the copyright notice and this --- 9 unchanged lines hidden (view full) --- 18SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 19WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 20IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 21ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 22THIS SOFTWARE. 23****************************************************************/ 24 25#include <sys/cdefs.h> |
26__FBSDID("$FreeBSD: head/contrib/one-true-awk/main.c 221381 2011-05-03 11:47:19Z ru $"); | 26__FBSDID("$FreeBSD: head/contrib/one-true-awk/main.c 221533 2011-05-06 14:21:46Z ru $"); |
27 | 27 |
28const char *version = "version 20110501 (FreeBSD)"; | 28const char *version = "version 20110506 (FreeBSD)"; |
29 30#define DEBUG 31#include <stdio.h> 32#include <ctype.h> 33#include <locale.h> 34#include <stdlib.h> 35#include <string.h> 36#include <signal.h> --- 53 unchanged lines hidden (view full) --- 90 break; 91 } 92 switch (argv[1][1]) { 93 case 's': 94 if (strcmp(argv[1], "-safe") == 0) 95 safe = 1; 96 break; 97 case 'f': /* next argument is program filename */ | 29 30#define DEBUG 31#include <stdio.h> 32#include <ctype.h> 33#include <locale.h> 34#include <stdlib.h> 35#include <string.h> 36#include <signal.h> --- 53 unchanged lines hidden (view full) --- 90 break; 91 } 92 switch (argv[1][1]) { 93 case 's': 94 if (strcmp(argv[1], "-safe") == 0) 95 safe = 1; 96 break; 97 case 'f': /* next argument is program filename */ |
98 if (argv[1][2] != 0) { /* arg is -fsomething */ | 98 if (argv[1][2] != 0) { /* arg is -fsomething */ |
99 if (npfile >= MAX_PFILE - 1) 100 FATAL("too many -f options"); 101 pfile[npfile++] = &argv[1][2]; 102 } else { /* arg is -f something */ 103 argc--; argv++; 104 if (argc <= 1) 105 FATAL("no program filename"); 106 if (npfile >= MAX_PFILE - 1) --- 102 unchanged lines hidden --- | 99 if (npfile >= MAX_PFILE - 1) 100 FATAL("too many -f options"); 101 pfile[npfile++] = &argv[1][2]; 102 } else { /* arg is -f something */ 103 argc--; argv++; 104 if (argc <= 1) 105 FATAL("no program filename"); 106 if (npfile >= MAX_PFILE - 1) --- 102 unchanged lines hidden --- |