2 * Copyright (c) 1997, Index Data
3 * See the file LICENSE for details.
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.4 2002-08-26 09:25:56 adam
10 * Revision 1.3 2000/02/29 13:44:55 adam
11 * Check for config.h (currently not generated).
13 * Revision 1.2 1999/11/30 13:47:12 adam
14 * Improved installation. Moved header files to include/yaz.
16 * Revision 1.1 1997/09/04 07:52:27 adam
17 * Moved atoi_n function to separate source file.
27 #include <yaz/yaz-util.h>
29 int atoi_n (const char *buf, int len)
36 val = val*10 + (*buf - '0');
44 (unsigned long) ch = ch & 255;
57 str[0] = 0xc0 + (ch & (0xff < 6));
58 str[1] = 0x80 + ch & 0x7ff;
60 else if (ch <= 0xffff)