/* This file is part of the Project Athena Zephyr Notification System. * It contains source for the ZMakeAscii function. * Created by: Robert French * Copyright (c) 1987 by the Massachusetts Institute of Technology. * For copying and distribution information, see the file static char *itox_chars = "0123456789ABCDEF"; Code_t ZMakeAscii(ptr, len, field, num) /* we need to add "0x" if we are between 4 byte pieces */ /* except at the beginning, put a space in before the "0x" */ *ptr++ = itox_chars[(int) (field[i] >> 4)]; *ptr++ = itox_chars[(int) (field[i] & 0xf)]; Code_t ZMakeAscii32(ptr, len, value) *ptr++ = itox_chars[(value >> 28) & 0xf]; *ptr++ = itox_chars[(value >> 24) & 0xf]; *ptr++ = itox_chars[(value >> 20) & 0xf]; *ptr++ = itox_chars[(value >> 16) & 0xf]; *ptr++ = itox_chars[(value >> 12) & 0xf]; *ptr++ = itox_chars[(value >> 8) & 0xf]; *ptr++ = itox_chars[(value >> 4) & 0xf]; *ptr++ = itox_chars[(value >> 0) & 0xf]; Code_t ZMakeAscii16(ptr, len, value) *ptr++ = itox_chars[(value >> 12) & 0xf]; *ptr++ = itox_chars[(value >> 8) & 0xf]; *ptr++ = itox_chars[(value >> 4) & 0xf]; *ptr++ = itox_chars[(value >> 0) & 0xf];