URI:
       thexify.c - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
       thexify.c (274B)
       ---
            1 #include <u.h>
            2 #include <libc.h>
            3 #include <bio.h>
            4 #include <mach.h>
            5 
            6 char *
            7 _hexify(char *buf, u64int p, int zeros)
            8 {
            9         ulong d;
           10 
           11         d = p/16;
           12         if(d)
           13                 buf = _hexify(buf, d, zeros-1);
           14         else
           15                 while(zeros--)
           16                         *buf++ = '0';
           17         *buf++ = "0123456789abcdef"[p&0x0f];
           18         return buf;
           19 }