| 1 /* This file is part of the Project Athena Zephyr Notification System. |
1 /* This file is part of the Project Athena Zephyr Notification System. |
| 2 * It contains source for the ZReadAscii function. |
2 * It contains source for the ZReadAscii function. |
| 3 * |
3 * |
| 4 * Created by: Robert French |
4 * Created by: Robert French |
| 5 * |
5 * |
| 6 * $Source$ |
|
| 7 * $Author: chipx86 $ |
|
| 8 * |
|
| 9 * Copyright (c) 1987, 1990 by the Massachusetts Institute of Technology. |
6 * Copyright (c) 1987, 1990 by the Massachusetts Institute of Technology. |
| 10 * For copying and distribution information, see the file |
7 * For copying and distribution information, see the file |
| 11 * "mit-copyright.h". |
8 * "mit-copyright.h". |
| 12 */ |
9 */ |
| 13 /* $Header$ */ |
|
| 14 |
|
| 15 #ifndef lint |
|
| 16 static char rcsid_ZReadAscii_c[] = "$Header$"; |
|
| 17 #endif /* lint */ |
|
| 18 |
10 |
| 19 #include "internal.h" |
11 #include "internal.h" |
| 20 #include <assert.h> |
12 #include <assert.h> |
| 21 |
|
| 22 #if 0 |
|
| 23 static __inline__ |
|
| 24 int |
|
| 25 Z_cnvt_xtoi (char c) |
|
| 26 { |
|
| 27 c -= '0'; |
|
| 28 if (c < 10) |
|
| 29 return c; |
|
| 30 c -= 'A'-'9'-1; |
|
| 31 if (c < 16) |
|
| 32 return c; |
|
| 33 return -1; |
|
| 34 } |
|
| 35 #endif |
|
| 36 |
13 |
| 37 #define Z_cnvt_xtoi(c) ((temp=(c)-'0'),(temp<10)?temp:((temp-='A'-'9'-1),(temp<16)?temp:-1)) |
14 #define Z_cnvt_xtoi(c) ((temp=(c)-'0'),(temp<10)?temp:((temp-='A'-'9'-1),(temp<16)?temp:-1)) |
| 38 |
15 |
| 39 Code_t ZReadAscii(ptr, len, field, num) |
16 Code_t ZReadAscii(ptr, len, field, num) |
| 40 char *ptr; |
17 char *ptr; |