diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-10-04 15:31:18 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-10-04 15:31:18 +0000 |
commit | 2b241b7a6d8f07adc58ab738ab8da8ec74a3ed3b (patch) | |
tree | 27e19e2b415ee227889e067f588d537b7d58754a /usr.bin/indent | |
parent | f09387f94fec9aac0c08cfba8ac96249b35ada12 (diff) |
some formatting from mickey.
From: Maxim Tsyplakov <tm@openbsd.ru>
indent -i0 somefile.c dumps core in
indent.c line 276
ps.ind_level = ps.i_l_follow = col / ps.ind_size;
Diffstat (limited to 'usr.bin/indent')
-rw-r--r-- | usr.bin/indent/args.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/indent/args.c b/usr.bin/indent/args.c index b63c81cbbdb..839822acf79 100644 --- a/usr.bin/indent/args.c +++ b/usr.bin/indent/args.c @@ -1,4 +1,4 @@ -/* $OpenBSD: args.c,v 1.9 2002/02/16 21:27:47 millert Exp $ */ +/* $OpenBSD: args.c,v 1.10 2002/10/04 15:31:17 mickey Exp $ */ /* * Copyright (c) 1980, 1993 @@ -38,7 +38,7 @@ #ifndef lint /*static char sccsid[] = "@(#)args.c 8.1 (Berkeley) 6/6/93";*/ -static char rcsid[] = "$OpenBSD: args.c,v 1.9 2002/02/16 21:27:47 millert Exp $"; +static char rcsid[] = "$OpenBSD: args.c,v 1.10 2002/10/04 15:31:17 mickey Exp $"; #endif /* not lint */ /* @@ -293,8 +293,7 @@ found: break; default: - errx(1, "set_option: internal error: p_special %d", - p->p_special); + errx(1, "set_option: internal error: p_special %d", p->p_special); } break; @@ -308,18 +307,19 @@ found: case PRO_INT: if (!isdigit(*param_start)) { need_param: - errx(1, "%s: ``%s'' requires a parameter", - option_source, arg - 1); + errx(1, "%s: ``%s'' requires a parameter", option_source, arg - 1); } *p->p_obj = atoi(param_start); break; + if (*p->p_name == 'i' && *p->p_obj <= 0) + errx(1, "%s: ``%s must be greater of zero''", + option_source, arg - 1); case PRO_FONT: parsefont((struct fstate *) p->p_obj, param_start); break; default: - errx(1, "set_option: internal error: p_type %d", - p->p_type); + errx(1, "set_option: internal error: p_type %d", p->p_type); } } |