summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/indent/args.c16
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);
}
}