MCPcopy Create free account
hub / github.com/Gecode/gecode / parseInt

Function parseInt

gecode/flatzinc/lexer.yy.cpp:654–662  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

652int stringbufpos;
653
654bool parseInt(const char* text, int& value) {
655 long int result = strtol(text,NULL,0);
656 if ( (result == LONG_MAX || result == LONG_MIN) && errno == ERANGE )
657 return false;
658 if (result < Gecode::Int::Limits::min || result > Gecode::Int::Limits::max)
659 return false;
660 value = static_cast<int>(result);
661 return true;
662}
663
664int yy_input_proc(char* buf, int size, yyscan_t yyscanner);
665#define YY_INPUT(buf, result, max_size) \

Callers 1

lexer.yy.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected