changeset 159:2557012666ea

libutil: pack_reversed_nibbles() moved to revnibbles.c
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 26 Feb 2021 20:45:17 +0000
parents 3698c8192d2d
children b86b3f8890ba
files libutil/decimal_str.c libutil/revnibbles.c
diffstat 2 files changed, 15 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/libutil/decimal_str.c	Fri Feb 26 20:41:31 2021 +0000
+++ b/libutil/decimal_str.c	Fri Feb 26 20:45:17 2021 +0000
@@ -39,18 +39,3 @@
 		dest[n++] = 0xF;
 	return ndig;
 }
-
-pack_reversed_nibbles(nibbles, bytes, nbytes)
-	u_char *nibbles, *bytes;
-	unsigned nbytes;
-{
-	u_char *sp, *dp;
-	unsigned n;
-
-	sp = nibbles;
-	dp = bytes;
-	for (n = 0; n < nbytes; n++) {
-		*dp++ = sp[0] | (sp[1] << 4);
-		sp += 2;
-	}
-}
--- a/libutil/revnibbles.c	Fri Feb 26 20:41:31 2021 +0000
+++ b/libutil/revnibbles.c	Fri Feb 26 20:45:17 2021 +0000
@@ -23,3 +23,18 @@
 		sp++;
 	}
 }
+
+pack_reversed_nibbles(nibbles, bytes, nbytes)
+	u_char *nibbles, *bytes;
+	unsigned nbytes;
+{
+	u_char *sp, *dp;
+	unsigned n;
+
+	sp = nibbles;
+	dp = bytes;
+	for (n = 0; n < nbytes; n++) {
+		*dp++ = sp[0] | (sp[1] << 4);
+		sp += 2;
+	}
+}