1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #ifndef HEXOFFSET_SOURCE
- #define HEXOFFSET_SOURCE
- #include <memory.h>
- #include "../tools/number.h"
- #include "../tools/memory.h"
- char const * hexoffset (char buffer [], size_t length, off_t offset)
- {
- char * string = buffer + length - 1;
- memset (buffer, 0, length);
- while (string > buffer)
- {
- * -- string = DIGITS_HEX [offset & 0x0F];
- offset >>= 4;
- }
- return (buffer);
- }
- #endif
|