main.c (256281) | main.c (272918) |
---|---|
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: stable/10/contrib/one-true-awk/main.c 244988 2013-01-03 07:25:30Z delphij $"); | 26__FBSDID("$FreeBSD: stable/10/contrib/one-true-awk/main.c 272918 2014-10-10 23:18:44Z pfg $"); |
27 28const char *version = "version 20121220 (FreeBSD)"; 29 30#define DEBUG 31#include <stdio.h> 32#include <ctype.h> 33#include <locale.h> 34#include <stdlib.h> --- 34 unchanged lines hidden (view full) --- 69 fprintf(stderr, 70 "usage: %s [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]\n", 71 cmdname); 72 exit(1); 73 } 74 signal(SIGFPE, fpecatch); 75 76 srand_seed = 1; | 27 28const char *version = "version 20121220 (FreeBSD)"; 29 30#define DEBUG 31#include <stdio.h> 32#include <ctype.h> 33#include <locale.h> 34#include <stdlib.h> --- 34 unchanged lines hidden (view full) --- 69 fprintf(stderr, 70 "usage: %s [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]\n", 71 cmdname); 72 exit(1); 73 } 74 signal(SIGFPE, fpecatch); 75 76 srand_seed = 1; |
77 srand(srand_seed); | 77 srandom((unsigned long) srand_seed); |
78 79 yyin = NULL; 80 symtab = makesymtab(NSYMTAB/NSYMTAB); 81 while (argc > 1 && argv[1][0] == '-' && argv[1][1] != '\0') { 82 if (strcmp(argv[1],"-version") == 0 || strcmp(argv[1],"--version") == 0) { 83 printf("awk %s\n", version); 84 exit(0); 85 break; --- 133 unchanged lines hidden --- | 78 79 yyin = NULL; 80 symtab = makesymtab(NSYMTAB/NSYMTAB); 81 while (argc > 1 && argv[1][0] == '-' && argv[1][1] != '\0') { 82 if (strcmp(argv[1],"-version") == 0 || strcmp(argv[1],"--version") == 0) { 83 printf("awk %s\n", version); 84 exit(0); 85 break; --- 133 unchanged lines hidden --- |