]> mj.ucw.cz Git - libucw.git/blobdiff - lib/stkstring.c
Allow typed configuration items. (This is the only way to get constructs
[libucw.git] / lib / stkstring.c
index 30cff4c864b6f99aeac28db8ba776ee7ea1d8dda..a8593215ea71d478eba5232dd204340f28f2a844 100644 (file)
@@ -51,6 +51,18 @@ stk_printf_internal(char *fmt, ...)
     }
 }
 
+void
+stk_hexdump_internal(char *dst, byte *src, uns n)
+{
+  for (uns i=0; i<n; i++)
+    {
+      if (i)
+       *dst++ = ' ';
+      dst += sprintf(dst, "%02x", *src++);
+    }
+  *dst = 0;
+}
+
 #ifdef TEST
 
 int main(void)
@@ -62,6 +74,7 @@ int main(void)
   a = stk_strarraycat(arr, 2);
   a = stk_printf("Bew%s!", a);
   puts(a);
+  puts(stk_hexdump(a, 3));
   return 0;
 }