Deleted Added
full compact
atob8.c (59118) atob8.c (92906)
1/* atob8.c: The opieatob8() library function.
2
3%%% portions-copyright-cmetz-96
1/* atob8.c: The opieatob8() library function.
2
3%%% portions-copyright-cmetz-96
4Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights
4Portions of this software are Copyright 1996-1999 by Craig Metz, All Rights
5Reserved. The Inner Net License Version 2 applies to these portions of
6the software.
7You should have received a copy of the license with this software. If
8you didn't get a copy, you may request one from <license@inner.net>.
9
10Portions of this software are Copyright 1995 by Randall Atkinson and Dan
11McDonald, All Rights Reserved. All Rights under this copyright are assigned
12to the U.S. Naval Research Laboratory (NRL). The NRL Copyright Notice and
13License Agreement applies to this software.
14
15 History:
16
5Reserved. The Inner Net License Version 2 applies to these portions of
6the software.
7You should have received a copy of the license with this software. If
8you didn't get a copy, you may request one from <license@inner.net>.
9
10Portions of this software are Copyright 1995 by Randall Atkinson and Dan
11McDonald, All Rights Reserved. All Rights under this copyright are assigned
12to the U.S. Naval Research Laboratory (NRL). The NRL Copyright Notice and
13License Agreement applies to this software.
14
15 History:
16
17 Modified by cmetz for OPIE 2.4. Use struct opie_otpkey for binary arg.
17 Modified by cmetz for OPIE 2.3. Return the output variable.
18 Don't check parameters.
19 Modified by cmetz for OPIE 2.2. Use FUNCTION declaration et al.
20 Inlined and obseleted opieskipspace(). Inlined and obseleted
21 opiehtoi().
22 Created at NRL for OPIE 2.2 from opiesubr2.c
23*/
24#include "opie_cfg.h"
25#include <stdio.h>
26#include "opie.h"
27
28/* Convert 8-byte hex-ascii string to binary array
29 */
18 Modified by cmetz for OPIE 2.3. Return the output variable.
19 Don't check parameters.
20 Modified by cmetz for OPIE 2.2. Use FUNCTION declaration et al.
21 Inlined and obseleted opieskipspace(). Inlined and obseleted
22 opiehtoi().
23 Created at NRL for OPIE 2.2 from opiesubr2.c
24*/
25#include "opie_cfg.h"
26#include <stdio.h>
27#include "opie.h"
28
29/* Convert 8-byte hex-ascii string to binary array
30 */
30char *opieatob8 FUNCTION((out, in), char *out AND char *in)
31char *opieatob8 FUNCTION((out, in), struct opie_otpkey *outkey AND char *in)
31{
32 register int i;
33 register int val;
32{
33 register int i;
34 register int val;
35 unsigned char *out = (unsigned char *)outkey;
34
35 for (i = 0; i < 8; i++) {
36 while (*in == ' ' || *in == '\t')
37 in++;
38 if (!*in)
39 return NULL;
40
41 if ((*in >= '0') && (*in <= '9'))

--- 33 unchanged lines hidden ---
36
37 for (i = 0; i < 8; i++) {
38 while (*in == ' ' || *in == '\t')
39 in++;
40 if (!*in)
41 return NULL;
42
43 if ((*in >= '0') && (*in <= '9'))

--- 33 unchanged lines hidden ---