summaryrefslogtreecommitdiff
path: root/lib/ZMakeAscii.c
diff options
context:
space:
mode:
authorGravatar John F. Carr <jfc@mit.edu>1991-06-20 10:25:50 +0000
committerGravatar John F. Carr <jfc@mit.edu>1991-06-20 10:25:50 +0000
commit24fd5a626db7f847c67a35f6c3efabcf105d23d2 (patch)
treee008b9099ff377f02fb73a678f756cfd1e2b1cca /lib/ZMakeAscii.c
parent081eb4ad3295ad292f839fb72bc930e9600193e6 (diff)
Change itox_chars from extern to local variable.
Use &3 instead of %4 (VAX pcc won't optimize the latter).
Diffstat (limited to 'lib/ZMakeAscii.c')
-rw-r--r--lib/ZMakeAscii.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/lib/ZMakeAscii.c b/lib/ZMakeAscii.c
index 62992d8..da88fdd 100644
--- a/lib/ZMakeAscii.c
+++ b/lib/ZMakeAscii.c
@@ -13,30 +13,23 @@
/* $Header$ */
#ifndef lint
-static char rcsid_ZMakeAscii_c[] = "$Header$";
-#endif lint
-
-#include <zephyr/mit-copyright.h>
+static char rcsid_ZMakeAscii_c[] = "$Id$";
+#endif
#include <zephyr/zephyr_internal.h>
-static
-#ifdef __STDC__
- const
-#endif
- char itox_chars[] = "0123456789ABCDEF";
-
Code_t ZMakeAscii(ptr, len, field, num)
- char *ptr;
+ register char *ptr;
int len;
unsigned char *field;
int num;
{
int i;
+ register char *itox_chars = "0123456789ABCDEF";
for (i=0;i<num;i++) {
/* we need to add "0x" if we are between 4 byte pieces */
- if (i%4 == 0) {
+ if ((i & 3) == 0) {
if (len < (i?4:3))
return ZERR_FIELDLEN;
/* except at the beginning, put a space in before the "0x" */