Changeset e4f08bf for lib/misc.c


Ignore:
Timestamp:
2015-06-08T18:25:08Z (9 years ago)
Author:
dequis <dx@…>
Children:
29ff5c2
Parents:
c720890 (diff), 61e7e02 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'develop' into feat/hip-cat

Conflicts:

configure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/misc.c

    rc720890 re4f08bf  
    751751        return end - string;
    752752}
     753
     754/* Parses a guint64 from string, returns TRUE on success */
     755gboolean 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.