Mercurial > repos > blastem
diff tern.c @ 744:fc68992cf18d
Merge windows branch with latest changes
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 28 May 2015 21:19:55 -0700 |
parents | de6f00204fa2 |
children | 1b2f8280ba81 |
line wrap: on
line diff
--- a/tern.c Thu May 28 21:09:33 2015 -0700 +++ b/tern.c Thu May 28 21:19:55 2015 -0700 @@ -122,4 +122,14 @@ return tern_insert(head, key, val); } - +char * tern_int_key(uint32_t key, char * buf) +{ + char * cur = buf; + while (key) + { + *(cur++) = (key & 0x7F) + 1; + key >>= 7; + } + *cur = 0; + return buf; +}