FreeCalypso > hg > fc-rfcal-tools
changeset 78:1d3dd589a857
fc-rfcal-txband: implemented check for increasing basis points
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 15 Jul 2017 20:47:31 +0000 |
parents | 3f63e71b6422 |
children | 394daa4ad6e8 |
files | autocal/txcalconf.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/autocal/txcalconf.c Sat Jul 15 20:25:31 2017 +0000 +++ b/autocal/txcalconf.c Sat Jul 15 20:47:31 2017 +0000 @@ -47,6 +47,12 @@ exit(ERROR_USAGE); } tx_basis[n].apc = atoi(cp); + if (n && tx_basis[n].apc <= tx_basis[n-1].apc) { + fprintf(stderr, + "%s line %d: basis points must be increasing\n", + filename_for_errs, lineno); + exit(ERROR_USAGE); + } while (isdigit(*cp)) cp++; }