summaryrefslogtreecommitdiffstats
path: root/usr.bin/cut
diff options
context:
space:
mode:
authorwill <will@FreeBSD.org>2001-01-28 00:34:29 +0000
committerwill <will@FreeBSD.org>2001-01-28 00:34:29 +0000
commitbb6c08b6c424a3ed78901df643c8c08c3ea48835 (patch)
tree3b858dfd8f87d6398a682416ea416b3ccd61a9e5 /usr.bin/cut
parentf175b29e06aee5787c55ef79b2cfd76f3d7a4c1f (diff)
downloadFreeBSD-src-bb6c08b6c424a3ed78901df643c8c08c3ea48835.zip
FreeBSD-src-bb6c08b6c424a3ed78901df643c8c08c3ea48835.tar.gz
BDECFLAGS: constify; use proper types. Add $FreeBSD$, clean up #ifndef lint.
Reviewed by: markm
Diffstat (limited to 'usr.bin/cut')
-rw-r--r--usr.bin/cut/cut.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/usr.bin/cut/cut.c b/usr.bin/cut/cut.c
index 1dfd3b0..89000d5 100644
--- a/usr.bin/cut/cut.c
+++ b/usr.bin/cut/cut.c
@@ -32,16 +32,18 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ *
*/
#ifndef lint
static const char copyright[] =
"@(#) Copyright (c) 1989, 1993\n\
The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
static const char sccsid[] = "@(#)cut.c 8.3 (Berkeley) 5/4/95";
+static const char rcsid[] =
+ "$FreeBSD$";
#endif /* not lint */
#include <ctype.h>
@@ -60,8 +62,8 @@ int dflag;
int fflag;
int sflag;
-void c_cut __P((FILE *, char *));
-void f_cut __P((FILE *, char *));
+void c_cut __P((FILE *, const char *));
+void f_cut __P((FILE *, const char *));
void get_list __P((char *));
int main __P((int, char **));
static void usage __P((void));
@@ -72,7 +74,7 @@ main(argc, argv)
char *argv[];
{
FILE *fp;
- void (*fcn) __P((FILE *, char *)) = NULL;
+ void (*fcn) __P((FILE *, const char *)) = NULL;
int ch;
fcn = NULL;
@@ -129,7 +131,7 @@ main(argc, argv)
exit(0);
}
-int autostart, autostop, maxval;
+size_t autostart, autostop, maxval;
char positions[_POSIX2_LINE_MAX + 1];
@@ -137,7 +139,7 @@ void
get_list(list)
char *list;
{
- int setautostart, start, stop;
+ size_t setautostart, start, stop;
char *pos;
char *p;
@@ -194,10 +196,11 @@ get_list(list)
void
c_cut(fp, fname)
FILE *fp;
- char *fname;
+ const char *fname;
{
int ch, col;
char *pos;
+ fname = NULL;
ch = 0;
for (;;) {
@@ -224,7 +227,7 @@ c_cut(fp, fname)
void
f_cut(fp, fname)
FILE *fp;
- char *fname;
+ const char *fname;
{
int ch, field, isdelim;
char *pos, *p, sep;
OpenPOWER on IntegriCloud