URI:
       tstrdup.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
       ---
       tstrdup.c (200B)
       ---
            1 #include <u.h>
            2 #include <libc.h>
            3 #include <venti.h>
            4 
            5 char*
            6 vtstrdup(char *s)
            7 {
            8         int n;
            9         char *ss;
           10 
           11         if(s == nil)
           12                 return nil;
           13         n = strlen(s) + 1;
           14         ss = vtmalloc(n);
           15         memmove(ss, s, n);
           16         return ss;
           17 }