1f9f848faSopenharmony_ci/**************************************************************** 2f9f848faSopenharmony_ci 3f9f848faSopenharmony_ciThe author of this software is David M. Gay. 4f9f848faSopenharmony_ci 5f9f848faSopenharmony_ciCopyright (C) 2000 by Lucent Technologies 6f9f848faSopenharmony_ciAll Rights Reserved 7f9f848faSopenharmony_ci 8f9f848faSopenharmony_ciPermission to use, copy, modify, and distribute this software and 9f9f848faSopenharmony_ciits documentation for any purpose and without fee is hereby 10f9f848faSopenharmony_cigranted, provided that the above copyright notice appear in all 11f9f848faSopenharmony_cicopies and that both that the copyright notice and this 12f9f848faSopenharmony_cipermission notice and warranty disclaimer appear in supporting 13f9f848faSopenharmony_cidocumentation, and that the name of Lucent or any of its entities 14f9f848faSopenharmony_cinot be used in advertising or publicity pertaining to 15f9f848faSopenharmony_cidistribution of the software without specific, written prior 16f9f848faSopenharmony_cipermission. 17f9f848faSopenharmony_ci 18f9f848faSopenharmony_ciLUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 19f9f848faSopenharmony_ciINCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. 20f9f848faSopenharmony_ciIN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY 21f9f848faSopenharmony_ciSPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 22f9f848faSopenharmony_ciWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 23f9f848faSopenharmony_ciIN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 24f9f848faSopenharmony_ciARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 25f9f848faSopenharmony_ciTHIS SOFTWARE. 26f9f848faSopenharmony_ci 27f9f848faSopenharmony_ci****************************************************************/ 28f9f848faSopenharmony_ci 29f9f848faSopenharmony_ci/* Please send bug reports to David M. Gay (dmg at acm dot org, 30f9f848faSopenharmony_ci * with " at " changed at "@" and " dot " changed to "."). */ 31f9f848faSopenharmony_ci 32f9f848faSopenharmony_ci#include "gdtoaimp.h" 33f9f848faSopenharmony_ci 34f9f848faSopenharmony_ci unsigned char hexdig[256]; 35f9f848faSopenharmony_ci 36f9f848faSopenharmony_ci static void 37f9f848faSopenharmony_ci#ifdef KR_headers 38f9f848faSopenharmony_cihtinit(h, s, inc) unsigned char *h; unsigned char *s; int inc; 39f9f848faSopenharmony_ci#else 40f9f848faSopenharmony_cihtinit(unsigned char *h, unsigned char *s, int inc) 41f9f848faSopenharmony_ci#endif 42f9f848faSopenharmony_ci{ 43f9f848faSopenharmony_ci int i, j; 44f9f848faSopenharmony_ci for(i = 0; (j = s[i]) !=0; i++) 45f9f848faSopenharmony_ci h[j] = i + inc; 46f9f848faSopenharmony_ci } 47f9f848faSopenharmony_ci 48f9f848faSopenharmony_ci void 49f9f848faSopenharmony_cihexdig_init_D2A(Void) 50f9f848faSopenharmony_ci{ 51f9f848faSopenharmony_ci#define USC (unsigned char *) 52f9f848faSopenharmony_ci htinit(hexdig, USC "0123456789", 0x10); 53f9f848faSopenharmony_ci htinit(hexdig, USC "abcdef", 0x10 + 10); 54f9f848faSopenharmony_ci htinit(hexdig, USC "ABCDEF", 0x10 + 10); 55f9f848faSopenharmony_ci } 56