Commit | Line | Data |
---|---|---|
4c77a6d3 KM |
1 | /* Copyright (c) 1979 Regents of the University of California */ |
2 | ||
3 | static char sccsid[] = "@(#)SUCC.c 1.1 %G%"; | |
4 | ||
5 | #include "h01errs.h" | |
6 | ||
7 | SUCC(value, lower, upper) | |
8 | ||
9 | int value; | |
10 | int lower; | |
11 | int upper; | |
12 | { | |
13 | value++; | |
14 | if (value < lower || value > upper) { | |
15 | ERROR(ERANGE, value); | |
16 | return; | |
17 | } | |
18 | return value; | |
19 | } |