diff options
author | Robert S. French <rfrench@mit.edu> | 1988-05-17 17:21:01 +0000 |
---|---|---|
committer | Robert S. French <rfrench@mit.edu> | 1988-05-17 17:21:01 +0000 |
commit | 031ec0f258f152c1e20905b381aa7f5974db1f3d (patch) | |
tree | 1c15619ec8a5192e2d5095c6efde5e9a47ddc7ce /lib/ZMakeAscii.c | |
parent | 4d21b4b5da809cdf4499190a1e27bff679a90422 (diff) |
All sorts of changes for ver 0.2
Diffstat (limited to 'lib/ZMakeAscii.c')
-rw-r--r-- | lib/ZMakeAscii.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/lib/ZMakeAscii.c b/lib/ZMakeAscii.c index a760b62..a5fcb68 100644 --- a/lib/ZMakeAscii.c +++ b/lib/ZMakeAscii.c @@ -1,5 +1,5 @@ /* This file is part of the Project Athena Zephyr Notification System. - * It contains source for the internal Zephyr routines. + * It contains source for the ZMakeAscii function. * * Created by: Robert French * @@ -20,28 +20,28 @@ static char rcsid_ZMakeAscii_c[] = "$Header$"; #include <zephyr/zephyr_internal.h> -Code_t ZMakeAscii(ptr,len,field,num) - char *ptr; - int len; - unsigned char *field; - int num; +Code_t ZMakeAscii(ptr, len, field, num) + char *ptr; + int len; + unsigned char *field; + int num; { - int i; + int i; - for (i=0;i<num;i++) { - if (!(i%4)) { - if (len < 3+(i!=0)) - return (ZERR_FIELDLEN); - (void) sprintf(ptr,"%s0x",i?" ":""); - ptr += 2+(i!=0); - len -= 2+(i!=0); - } - if (len < 3) - return (ZERR_FIELDLEN); - (void) sprintf(ptr,"%02x",field[i]); - ptr += 2; - len -= 2; - } + for (i=0;i<num;i++) { + if (!(i%4)) { + if (len < 3+(i!=0)) + return (ZERR_FIELDLEN); + (void) sprintf(ptr, "%s0x", i?" ":""); + ptr += 2+(i!=0); + len -= 2+(i!=0); + } + if (len < 3) + return (ZERR_FIELDLEN); + (void) sprintf(ptr, "%02x", field[i]); + ptr += 2; + len -= 2; + } - return (ZERR_NONE); + return (ZERR_NONE); } |