From ec3c37d1d40d7b288584c234f4c3e7a600f2353d Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Thu, 3 Apr 2025 12:30:34 -0400 Subject: new libs --- lib/cvtdec.c | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 lib/cvtdec.c (limited to 'lib/cvtdec.c') diff --git a/lib/cvtdec.c b/lib/cvtdec.c deleted file mode 100644 index e95e910..0000000 --- a/lib/cvtdec.c +++ /dev/null @@ -1,44 +0,0 @@ -/** -** @file cvtdec.c -** -** @author Numerous CSCI-452 classes -** -** @brief C implementations of common library functions -*/ - -#ifndef CVTDEC_SRC_INC -#define CVTDEC_SRC_INC - -#include - -#include - -/** -** cvtdec(buf,value) -** -** convert a 32-bit signed value into a NUL-terminated character string -** -** @param buf Destination buffer -** @param value Value to convert -** -** @return The number of characters placed into the buffer -** (not including the NUL) -** -** NOTE: assumes buf is large enough to hold the resulting string -*/ -int cvtdec(char *buf, int32_t value) -{ - char *bp = buf; - - if (value < 0) { - *bp++ = '-'; - value = -value; - } - - bp = cvtdec0(bp, value); - *bp = '\0'; - - return (bp - buf); -} - -#endif -- cgit v1.2.3-freya