Remove unused function mystrtol()
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
parent
efa3589f78
commit
ef961f4927
@ -971,7 +971,6 @@ void item_in_popup(const char *, const char *, const char *, const char *);
|
||||
long get_today(void);
|
||||
long now(void);
|
||||
char *nowstr(void);
|
||||
long mystrtol(const char *);
|
||||
void print_bool_option_incolor(WINDOW *, unsigned, int, int);
|
||||
const char *get_tempdir(void);
|
||||
char *new_tempfile(const char *, int);
|
||||
|
15
src/utils.c
15
src/utils.c
@ -561,21 +561,6 @@ char *nowstr(void)
|
||||
return buf;
|
||||
}
|
||||
|
||||
long mystrtol(const char *str)
|
||||
{
|
||||
char *ep;
|
||||
long lval;
|
||||
|
||||
errno = 0;
|
||||
lval = strtol(str, &ep, 10);
|
||||
if (str[0] == '\0' || *ep != '\0')
|
||||
EXIT(_("could not convert string"));
|
||||
if (errno == ERANGE && (lval == LONG_MAX || lval == LONG_MIN))
|
||||
EXIT(_("out of range"));
|
||||
|
||||
return lval;
|
||||
}
|
||||
|
||||
/* Print the given option value with appropriate color. */
|
||||
void
|
||||
print_bool_option_incolor(WINDOW * win, unsigned option, int pos_y, int pos_x)
|
||||
|
Loading…
x
Reference in New Issue
Block a user