nl.c (81586) | nl.c (92921) |
---|---|
1/*- 2 * Copyright (c) 1999 The NetBSD Foundation, Inc. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to The NetBSD Foundation 6 * by Klaus Klein. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 25 unchanged lines hidden (view full) --- 34 * POSSIBILITY OF SUCH DAMAGE. 35 */ 36 37#include <sys/cdefs.h> 38#ifndef lint 39__COPYRIGHT( 40"@(#) Copyright (c) 1999\ 41 The NetBSD Foundation, Inc. All rights reserved."); | 1/*- 2 * Copyright (c) 1999 The NetBSD Foundation, Inc. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to The NetBSD Foundation 6 * by Klaus Klein. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 25 unchanged lines hidden (view full) --- 34 * POSSIBILITY OF SUCH DAMAGE. 35 */ 36 37#include <sys/cdefs.h> 38#ifndef lint 39__COPYRIGHT( 40"@(#) Copyright (c) 1999\ 41 The NetBSD Foundation, Inc. All rights reserved."); |
42__RCSID("$FreeBSD: head/usr.bin/nl/nl.c 81586 2001-08-13 14:06:34Z ru $"); | 42__RCSID("$FreeBSD: head/usr.bin/nl/nl.c 92921 2002-03-22 01:33:25Z imp $"); |
43#endif 44 45#include <sys/types.h> 46 47#include <errno.h> 48#include <limits.h> 49#include <locale.h> 50#include <regex.h> --- 35 unchanged lines hidden (view full) --- 86 87/* 88 * Maximum number of characters required for a decimal representation of a 89 * (signed) int; courtesy of tzcode. 90 */ 91#define INT_STRLEN_MAXIMUM \ 92 ((sizeof (int) * CHAR_BIT - 1) * 302 / 1000 + 2) 93 | 43#endif 44 45#include <sys/types.h> 46 47#include <errno.h> 48#include <limits.h> 49#include <locale.h> 50#include <regex.h> --- 35 unchanged lines hidden (view full) --- 86 87/* 88 * Maximum number of characters required for a decimal representation of a 89 * (signed) int; courtesy of tzcode. 90 */ 91#define INT_STRLEN_MAXIMUM \ 92 ((sizeof (int) * CHAR_BIT - 1) * 302 / 1000 + 2) 93 |
94static void filter __P((void)); 95int main __P((int, char *[])); 96static void parse_numbering __P((const char *, int)); 97static void usage __P((void)); | 94static void filter(void); 95int main(int, char *[]); 96static void parse_numbering(const char *, int); 97static void usage(void); |
98 99/* 100 * Pointer to dynamically allocated input line buffer, and its size. 101 */ 102static char *buffer; 103static size_t buffersize; 104 105/* --- 337 unchanged lines hidden --- | 98 99/* 100 * Pointer to dynamically allocated input line buffer, and its size. 101 */ 102static char *buffer; 103static size_t buffersize; 104 105/* --- 337 unchanged lines hidden --- |