123456789101112131415161718192021222324252627282930313233343536373839 |
- #ifndef STRDECR_SOURCE
- #define STRDECR_SOURCE
- #include "../tools/memory.h"
- signed strdecr (void * memory, register size_t extent, register byte min, register byte max)
- {
- register byte * offset = (byte *) (memory);
- while (extent--)
- {
- if (-- offset [extent] >= min)
- {
- return (0);
- }
- offset [extent] = max;
- }
- return (- 1);
- }
- #endif
|