Annotation of 43BSDReno/contrib/isode-beta/compat/explode.c, revision 1.1.1.1

1.1       root        1: /* explode.c - explode octets into ascii */
                      2: 
                      3: #ifndef        lint
                      4: static char *rcsid = "$Header: /f/osi/compat/RCS/explode.c,v 7.0 89/11/23 21:22:59 mrose Rel $";
                      5: #endif
                      6: 
                      7: /* 
                      8:  * $Header: /f/osi/compat/RCS/explode.c,v 7.0 89/11/23 21:22:59 mrose Rel $
                      9:  *
                     10:  *
                     11:  * $Log:       explode.c,v $
                     12:  * Revision 7.0  89/11/23  21:22:59  mrose
                     13:  * Release 6.0
                     14:  * 
                     15:  */
                     16: 
                     17: /*
                     18:  *                               NOTICE
                     19:  *
                     20:  *    Acquisition, use, and distribution of this module and related
                     21:  *    materials are subject to the restrictions of a license agreement.
                     22:  *    Consult the Preface in the User's Manual for the full terms of
                     23:  *    this agreement.
                     24:  *
                     25:  */
                     26: 
                     27: 
                     28: /* LINTLIBRARY */
                     29: 
                     30: #include <stdio.h>
                     31: #include "general.h"
                     32: #include "manifest.h"
                     33: 
                     34: /*    DATA */
                     35: 
                     36: static char nib2hex[0x10] = {
                     37:     '0', '1', '2', '3', '4', '5', '6', '7',
                     38:     '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
                     39: };
                     40: 
                     41: /*  */
                     42: 
                     43: int    explode (a, b, n)
                     44: register char  *a;
                     45: register u_char *b;
                     46: register int    n;
                     47: {
                     48:     register int    i;
                     49:     register u_char c;
                     50: 
                     51:     for (i = 0; i < n; i++) {
                     52:        c = *b++;
                     53:        *a++ = nib2hex[(c & 0xf0) >> 4];
                     54:        *a++ = nib2hex[(c & 0x0f)];
                     55:     }
                     56:     *a = NULL;
                     57: 
                     58:     return (n * 2);
                     59: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.