1 /* COPYING ******************************************************************
2 For copyright and licensing terms, see the file named COPYING.
3 // **************************************************************************
4 */
5 
6 #include <iostream>
7 #include <iomanip>
8 #include <cstring>
9 #include <cstdlib>
10 #include <cctype>
11 
12 #include "popt.h"
13 
14 using namespace popt;
15 
~signed_number_definition()16 signed_number_definition::~signed_number_definition() {}
action(processor &,const char * text)17 void signed_number_definition::action(processor &, const char * text)
18 {
19 	const char * old(text);
20 	value = std::strtol(text, const_cast<char **>(&text), base);
21 	if (text == old || *text)
22 		throw error(old, "not a number");
23 	set = true;
24 }
25