-
-/*
- * snprintb.c -- snprintf a %b string
+/* snprintb.c -- snprintf a %b string
*
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information.
*/
-#include <h/mh.h>
+#include "h/mh.h"
+#include "snprintb.h"
char *
snprintb (char *buffer, size_t n, unsigned v, char *bits)
{
size_t len;
- register int i, j;
- register char c, *bp;
+ int i, j;
+ char c, *bp;
snprintf (buffer, n, bits && *bits == 010 ? "0%o" : "0x%x", v);
len = strlen(buffer);