fplayer
C99 Falcon Sequence (fseq) file player for Light-O-Rama hardware (like xLights)
|
String parsing function implementations. More...
Functions | |
int | strtolb (const char *const str, const long min, const long max, void *const p, const int ps) |
Attempts to parse the given string as a long using strtol . If the parsed value is within the given range, it is stored in the given pointer using memcpy, which results in a type-agnostic function. The size of the destination type must be provided in bytes. The destination is only updated if the parsed value is within the given range. The caller should take care to ensure the destination type is large enough to store the parsed value. | |
String parsing function implementations.
int strtolb | ( | const char * | str, |
long | min, | ||
long | max, | ||
void * | p, | ||
int | ps ) |
Attempts to parse the given string as a long using strtol
. If the parsed value is within the given range, it is stored in the given pointer using memcpy, which results in a type-agnostic function. The size of the destination type must be provided in bytes. The destination is only updated if the parsed value is within the given range. The caller should take care to ensure the destination type is large enough to store the parsed value.
str | string to parse |
min | minimum value (inclusive) supported by the destination type |
max | maximum value (inclusive) supported by the destination type |
p | pointer to store the parsed value |
ps | size of the destination type in bytes |