Skip to content

Commit

Permalink
add fr_bskip_whitespace macro
Browse files Browse the repository at this point in the history
  • Loading branch information
mcnewton committed Feb 21, 2020
1 parent 1aedd9a commit 918fecf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib/util/misc.h
Expand Up @@ -68,6 +68,13 @@ void fr_talloc_verify_cb(const void *ptr, int depth,
*/
#define fr_skip_whitespace(_p) while(isspace((int)*(_p))) _p++

/** Skip whitespace, stopping at end ('\\t', '\\n', '\\v', '\\f', '\\r', ' ')
*
* @param[in,out] _p string to skip over.
* @param[in] _e pointer to end of string.
*/
#define fr_bskip_whitespace(_p, _e) while((_p < _e) && isspace((int)*(_p))) _p++

/** Skip everything that's not whitespace ('\\t', '\\n', '\\v', '\\f', '\\r', ' ')
*
* @param[in,out] _p string to skip over.
Expand Down

0 comments on commit 918fecf

Please sign in to comment.