mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
FS-2216 partial with renaming
This commit is contained in:
@@ -2921,6 +2921,20 @@ SWITCH_DECLARE(char *) switch_format_number(const char *num)
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(unsigned int) switch_atoui(const char *nptr)
|
||||
{
|
||||
int tmp = atoi(nptr);
|
||||
if (tmp < 0) return 0;
|
||||
else return (unsigned int) tmp;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(unsigned long) switch_atoul(const char *nptr)
|
||||
{
|
||||
long tmp = atol(nptr);
|
||||
if (tmp < 0) return 0;
|
||||
else return (unsigned long) tmp;
|
||||
}
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
|
Reference in New Issue
Block a user