view libutil/nibbles2asc.c @ 83:3055d5c9e7a3

fc-simtool update-rec* commands: check curfile_record_len and error out if it is not set
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 11 Apr 2021 02:38:31 +0000
parents 34bbb0585cab
children
line wrap: on
line source

/*
 * This module implements a function for turning a nibble array
 * into printable ASCII.
 */

#include <sys/types.h>

void
nibbles_to_ascii(nib, len, out)
	u_char *nib;
	unsigned len;
	char *out;
{
	unsigned n;

	for (n = 0; n < len; n++)
		*out++ = encode_hex_digit(*nib++);
	*out = '\0';
}