aboutsummaryrefslogtreecommitdiff
path: root/lib/lib.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-01-17 17:16:03 -0600
committerRob Landley <rob@landley.net>2016-01-17 17:16:03 -0600
commitba86864699997b0da780e15fd6be33c8a556e927 (patch)
treea8dea4dcbac3ba9c075ef2df54a77f36ddc2d4d9 /lib/lib.c
parent3b17f66c10af679f7ce3cd7b17af3b13664cde0c (diff)
downloadtoybox-ba86864699997b0da780e15fd6be33c8a556e927.tar.gz
Extend utf8 fontmetrics so ps can use them.
Also, I forgot to check in uuid_show() last time.
Diffstat (limited to 'lib/lib.c')
-rw-r--r--lib/lib.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/lib.c b/lib/lib.c
index 871eda7e..955960ca 100644
--- a/lib/lib.c
+++ b/lib/lib.c
@@ -988,3 +988,14 @@ void create_uuid(char *uuid)
// should never collide with anybody actually using a macaddr.
uuid[11] |= 128;
}
+
+char *show_uuid(char *uuid)
+{
+ char *out = libbuf;
+ int i;
+
+ for (i=0; i<16; i++) out+=sprintf(out, "-%02x"+!(0x550&(1<<i)), uuid[i]);
+ *out = 0;
+
+ return libbuf;
+}