14bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes/**************************************************************** 24bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes 34bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesThe author of this software is David M. Gay. 44bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes 54bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesCopyright (C) 2000 by Lucent Technologies 64bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesAll Rights Reserved 74bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes 84bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesPermission to use, copy, modify, and distribute this software and 94bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughesits documentation for any purpose and without fee is hereby 104bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughesgranted, provided that the above copyright notice appear in all 114bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughescopies and that both that the copyright notice and this 124bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughespermission notice and warranty disclaimer appear in supporting 134bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughesdocumentation, and that the name of Lucent or any of its entities 144bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughesnot be used in advertising or publicity pertaining to 154bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughesdistribution of the software without specific, written prior 164bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughespermission. 174bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes 184bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesLUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 194bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesINCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. 204bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesIN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY 214bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesSPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 224bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 234bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesIN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 244bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 254bd97cee28dd815fff54fc97560be60d566c1fa5Elliott HughesTHIS SOFTWARE. 264bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes 274bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes****************************************************************/ 284bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes 294bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes/* Please send bug reports to David M. Gay (dmg at acm dot org, 304bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes * with " at " changed at "@" and " dot " changed to "."). */ 314bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes 324bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes#include "gdtoaimp.h" 334bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes 344bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes unsigned char hexdig[256]; 354bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes 364bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes static void 374bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes#ifdef KR_headers 384bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hugheshtinit(h, s, inc) unsigned char *h; unsigned char *s; int inc; 394bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes#else 404bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hugheshtinit(unsigned char *h, unsigned char *s, int inc) 414bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes#endif 424bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes{ 434bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes int i, j; 444bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes for(i = 0; (j = s[i]) !=0; i++) 454bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes h[j] = i + inc; 464bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes } 474bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes 484bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes void 49b364683ea65e24070c77f1673a8c155665eb894eElliott Hughes__hexdig_init_D2A(Void) 504bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes{ 514bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes#define USC (unsigned char *) 524bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes htinit(hexdig, USC "0123456789", 0x10); 534bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes htinit(hexdig, USC "abcdef", 0x10 + 10); 544bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes htinit(hexdig, USC "ABCDEF", 0x10 + 10); 554bd97cee28dd815fff54fc97560be60d566c1fa5Elliott Hughes } 56