diff options
author | Micksha <ms-shaman@gmx.de> | 2019-01-04 21:37:34 +0100 |
---|---|---|
committer | Micksha <ms-shaman@gmx.de> | 2019-04-13 19:53:49 +0000 |
commit | 168ad9d6c730e93d76c801da607df84355187a39 (patch) | |
tree | b771ad105e5a73733ede7559e22467f13a2880a8 /saedit/common.c | |
parent | 8c75e651f00048dda32db85b2bff34e131960864 (diff) | |
download | evol-tools-168ad9d6c730e93d76c801da607df84355187a39.tar.gz evol-tools-168ad9d6c730e93d76c801da607df84355187a39.tar.bz2 evol-tools-168ad9d6c730e93d76c801da607df84355187a39.tar.xz evol-tools-168ad9d6c730e93d76c801da607df84355187a39.zip |
update saedit to saedit2
Diffstat (limited to 'saedit/common.c')
-rw-r--r-- | saedit/common.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/saedit/common.c b/saedit/common.c new file mode 100644 index 0000000..9bb8a30 --- /dev/null +++ b/saedit/common.c @@ -0,0 +1,22 @@ +#include "common.h" + +#include <stdlib.h> +#include <errno.h> + +gboolean +try_strtoint ( + const gchar *str, + gint *result +) { + gchar *endptr; + gint retval; + + errno = 0; + retval = strtol (str, &endptr, 10); + + if (*endptr != 0 || errno != 0) + return FALSE; + + *result = retval; + return TRUE; +} |