Changes in lib/misc.c [578e5b0:73f0a01]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/misc.c
r578e5b0 r73f0a01 427 427 } 428 428 429 int is_bool(c onst char *value)429 int is_bool(char *value) 430 430 { 431 431 if (*value == 0) { … … 453 453 } 454 454 455 int bool2int(c onst char *value)455 int bool2int(char *value) 456 456 { 457 457 int i; … … 751 751 return end - string; 752 752 } 753 754 /* Parses a guint64 from string, returns TRUE on success */ 755 gboolean parse_int64(char *string, int base, guint64 *number) 756 { 757 guint64 parsed; 758 char *endptr; 759 760 errno = 0; 761 parsed = g_ascii_strtoull(string, &endptr, base); 762 if (errno || endptr == string || *endptr != '\0') { 763 return FALSE; 764 } 765 *number = parsed; 766 return TRUE; 767 } 768
Note: See TracChangeset
for help on using the changeset viewer.