Changeset 56e8cb3
- Timestamp:
- Aug 11, 2020, 6:33:56 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- a5428bd
- Parents:
- 129674b
- Location:
- libcfa/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/parseargs.cfa
r129674b r56e8cb3 172 172 } 173 173 174 bool parse(const char * arg, size_t& value) {174 bool parse(const char * arg, unsigned long & value) { 175 175 char * end; 176 176 unsigned long long int r = strtoull(arg, &end, 10); 177 177 if(*end != '\0') return false; 178 if(r > ( size_t)MAX) return false;178 if(r > (unsigned long)MAX) return false; 179 179 180 180 value = r; 181 181 return true; 182 } 183 184 bool parse(const char * arg, unsigned long long & value) { 185 char * end; 186 unsigned long long int r = strtoull(arg, &end, 10); 187 if(*end != '\0') return false; 188 if(r > (unsigned long long)MAX) return false; 189 190 value = r; 191 return true; 182 192 } 183 193 -
libcfa/src/parseargs.hfa
r129674b r56e8cb3 39 39 bool parse(const char *, const char * & ); 40 40 bool parse(const char *, unsigned & ); 41 bool parse(const char *, size_t & ); 41 bool parse(const char *, unsigned long & ); 42 bool parse(const char *, unsigned long long & ); 42 43 bool parse(const char *, int & );
Note: See TracChangeset
for help on using the changeset viewer.