Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
b420577e
Commit
b420577e
authored
Feb 16, 1999
by
Bob Halley
Browse files
add consume macros
parent
e8b21314
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/isc/include/isc/region.h
View file @
b420577e
/*
* Copyright (C) 1998 Internet Software Consortium.
* Copyright (C) 1998
, 1999
Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
...
...
@@ -29,8 +29,26 @@ typedef struct isc_textregion {
}
isc_textregion_t
;
/*
* There
are no methods which operate on regions. The structure is not
*
opaque, and must be directly manipulated by applications
.
* The
re
gion structure is not opaque, and is usually directly manipulated.
*
Some macros are defined below for convenience
.
*/
#define isc_region_consume(r,l) \
do { \
isc_region_t *__r = (r); \
unsigned int __l = (l); \
INSIST(__r->length >= __l); \
__r->base += __l; \
__r->length -= __l; \
} while (0)
#define isc_textregion_consume(r,l) \
do { \
isc_textregion_t *__r = (r); \
unsigned int __l = (l); \
INSIST(__r->length >= __l); \
__r->base += __l; \
__r->length -= __l; \
} while (0)
#endif
/* ISC_REGION_H */
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment