Annotation of 43BSDReno/contrib/isode-beta/others/quipu/photo/hexphoto.c, revision 1.1

1.1     ! root        1: /* hexphoto.c - your comments here */
        !             2: 
        !             3: #ifndef        lint
        !             4: static char *rcsid = "$Header: /f/osi/others/quipu/photo/RCS/hexphoto.c,v 7.0 89/11/23 22:01:42 mrose Rel $";
        !             5: #endif
        !             6: 
        !             7: /* 
        !             8:  * $Header: /f/osi/others/quipu/photo/RCS/hexphoto.c,v 7.0 89/11/23 22:01:42 mrose Rel $
        !             9:  *
        !            10:  *
        !            11:  * $Log:       hexphoto.c,v $
        !            12:  * Revision 7.0  89/11/23  22:01:42  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: #include "quipu/util.h"
        !            29: #include "quipu/photo.h"
        !            30: #include "psap.h"
        !            31: 
        !            32: decode_t4 (picture,persons_name, len)
        !            33: char    *picture;
        !            34: char    *persons_name;
        !            35: {
        !            36: int i;
        !            37: 
        !            38:        if (len == 0) len = photolen (picture);
        !            39:        
        !            40:        for (i=0; i<len; i++)
        !            41:                (void) fprintf (stderr,"%02x",*picture++ & 255);
        !            42: 
        !            43: 
        !            44: }
        !            45: photolen (s1)
        !            46: char * s1;
        !            47: {
        !            48: int length=0,cnt,i;
        !            49: char * temp;
        !            50: 
        !            51:        if (*s1 == 0x03) {
        !            52:        /* we have a coded picture */
        !            53: 
        !            54:            temp = s1;
        !            55:            temp++;
        !            56:            cnt = *temp++ & 0x7f;  /*assume len > 127 for now */
        !            57:            for (i=0; i<cnt; i++) 
        !            58:                length = (length << 8) | (*temp++ & 0xff) ;
        !            59: 
        !            60:            length += 2 + cnt;
        !            61:            return (length);
        !            62: 
        !            63:        } else 
        !            64:            return (-1);
        !            65: 
        !            66: }

unix.superglobalmegacorp.com

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