1 /* atou.c: like atoi, but if the number is negative, abort. */ 2 3 #ifdef HAVE_CONFIG_H 4 #include "config.h" 5 #endif /* Def: HAVE_CONFIG_H */ 6 7 #include "message.h" 8 #include "atou.h" 9 10 unsigned atou(at_string s)11atou (at_string s) 12 { 13 int i = atoi (s); 14 15 if (i < 0) 16 FATAL1 ("I expected a positive number, not %d", i); 17 18 return (unsigned) i; 19 } 20 21