Annotation of researchv10no/cmd/basic/bite/src/postb.c, revision 1.1.1.1

1.1       root        1: /* Copyright Bell Telephone Laboratories Whippany, N.J.
                      2: 
                      3:  *     //////////////////////////////////////////////////////////
                      4:  *     //////////////////////////////////////////////////////////
                      5:  *     /// ATTACH A .b POSTFIX ON STRING IF NOT ALREADY THERE ///
                      6:  *     ///////////// J. P. Hawkins WH X4610 8C-001 //////////////
                      7:  *     //////////////// Tue Sep 11 14:55:49 1979 ////////////////
                      8:  *     //////////////////////////////////////////////////////////
                      9:  *     //////////////////////////////////////////////////////////
                     10: 
                     11: */
                     12: /*   "@(#) postb.c:  V 1.1  12/21/80" */
                     13: #include       "bas.h"
                     14: 
                     15: postb(name)
                     16: char   name[];
                     17: {
                     18:        register int    i;
                     19:        i = 0;
                     20: 
                     21:        for(i=0; name[i] != '\0' && name[i] != '\n'; i++);
                     22:        name[i] = '\0';         /* insure terminating character is a null */
                     23:        if(name[i-2] != '.' || name[i-1] != 'b')
                     24:                strcat(name,".b");
                     25:        return(0);
                     26: }

unix.superglobalmegacorp.com

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