shithub: scc

Download patch

ref: d4565f079cfff9680439f8b0c2b82d7a01167498
parent: 71bd895b5dcedc3e24e2a0b5710b1ba01a955cfc
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Feb 8 15:37:13 EST 2019

[libscc] Remove unused lpack.c

--- a/src/libscc/lpack.c
+++ /dev/null
@@ -1,64 +1,0 @@
-#include <ctype.h>
-#include <stdarg.h>
-
-#include <scc/scc.h>
-
-int
-lpack(unsigned char *dst, char *fmt, ...)
-{
-	unsigned char *bp, *cp;
-	unsigned s;
-	unsigned long l;
-	unsigned long long q;
-	size_t n;
-	int d;
-	va_list va;
-
-	bp = dst;
-	va_start(va, fmt);
-	while (*fmt) {
-		switch (*fmt++) {
-		case '\'':
-			for (n = 0; isdigit(*fmt); n += d) {
-				n *= 10;
-				d = *fmt++ - '0';
-			}
-			cp = va_arg(va, unsigned char *);
-			while (n--)
-				*bp++ = *cp++;
-			break;
-		case 'c':
-			*bp++ = va_arg(va, unsigned);
-			break;
-		case 's':
-			s = va_arg(va, unsigned);
-			*bp++ = s;
-			*bp++ = s >> 8;
-			break;
-		case 'l':
-			l = va_arg(va, unsigned long);
-			*bp++ = l;
-			*bp++ = l >> 8;
-			*bp++ = l >> 16;
-			*bp++ = l >> 24;
-			break;
-		case 'q':
-			q = va_arg(va, unsigned long long);
-			*bp++ = q;
-			*bp++ = q >> 8;
-			*bp++ = q >> 16;
-			*bp++ = q >> 24;
-			*bp++ = q >> 32;
-			*bp++ = q >> 40;
-			*bp++ = q >> 48;
-			*bp++ = q >> 56;
-			break;
-		default:
-			va_end(va);
-			return -1;
-		}
-	}
-	va_end(va);
-
-	return bp - dst;
-}