uniq.c (54401) | uniq.c (87303) |
---|---|
1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Case Larsen. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 31 unchanged lines hidden (view full) --- 40 The Regents of the University of California. All rights reserved.\n"; 41#endif /* not lint */ 42 43#ifndef lint 44#if 0 45static char sccsid[] = "@(#)uniq.c 8.3 (Berkeley) 5/4/95"; 46#endif 47static const char rcsid[] = | 1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Case Larsen. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 31 unchanged lines hidden (view full) --- 40 The Regents of the University of California. All rights reserved.\n"; 41#endif /* not lint */ 42 43#ifndef lint 44#if 0 45static char sccsid[] = "@(#)uniq.c 8.3 (Berkeley) 5/4/95"; 46#endif 47static const char rcsid[] = |
48 "$FreeBSD: head/usr.bin/uniq/uniq.c 54401 1999-12-10 13:06:53Z ache $"; | 48 "$FreeBSD: head/usr.bin/uniq/uniq.c 87303 2001-12-03 21:37:35Z dwmalone $"; |
49#endif /* not lint */ 50 51#include <ctype.h> 52#include <err.h> 53#include <limits.h> 54#include <locale.h> 55#include <stdio.h> 56#include <stdlib.h> 57#include <string.h> 58#include <unistd.h> 59 60#define MAXLINELEN (LINE_MAX + 1) 61 62int cflag, dflag, uflag; 63int numchars, numfields, repeats; 64 | 49#endif /* not lint */ 50 51#include <ctype.h> 52#include <err.h> 53#include <limits.h> 54#include <locale.h> 55#include <stdio.h> 56#include <stdlib.h> 57#include <string.h> 58#include <unistd.h> 59 60#define MAXLINELEN (LINE_MAX + 1) 61 62int cflag, dflag, uflag; 63int numchars, numfields, repeats; 64 |
65FILE *file __P((char *, char *)); | 65FILE *file __P((const char *, const char *)); |
66void show __P((FILE *, char *)); 67char *skip __P((char *)); 68void obsolete __P((char *[])); 69static void usage __P((void)); 70int stricoll __P((char *, char*)); 71 72int 73main (argc, argv) --- 137 unchanged lines hidden (view full) --- 211 } else if (!infield) 212 infield = 1; 213 for (nchars = numchars; nchars-- && *str; ++str); 214 return(str); 215} 216 217FILE * 218file(name, mode) | 66void show __P((FILE *, char *)); 67char *skip __P((char *)); 68void obsolete __P((char *[])); 69static void usage __P((void)); 70int stricoll __P((char *, char*)); 71 72int 73main (argc, argv) --- 137 unchanged lines hidden (view full) --- 211 } else if (!infield) 212 infield = 1; 213 for (nchars = numchars; nchars-- && *str; ++str); 214 return(str); 215} 216 217FILE * 218file(name, mode) |
219 char *name, *mode; | 219 const char *name, *mode; |
220{ 221 FILE *fp; 222 223 if ((fp = fopen(name, mode)) == NULL) 224 err(1, "%s", name); 225 return(fp); 226} 227 --- 52 unchanged lines hidden --- | 220{ 221 FILE *fp; 222 223 if ((fp = fopen(name, mode)) == NULL) 224 err(1, "%s", name); 225 return(fp); 226} 227 --- 52 unchanged lines hidden --- |