Annotation of coherent/d/bin/uucheck/uucheckname/lookup.c, revision 1.1.1.1

1.1       root        1: /* lookup.c - search a list of well known names for a proposed name.
                      2:  * part of uucheckname, part of uucheck
                      3:  */
                      4: #include <stdio.h>
                      5: #include "uucheckname.h"
                      6: 
                      7: char *
                      8: lookup(aname, table)
                      9:        char *aname;
                     10:        char *table[];
                     11: {
                     12:        int i;
                     13: 
                     14:        for(i = 0; table[i] != NULL; ++i) {
                     15:                if (strcmp(table[i], aname) == 0) {
                     16:                        break;
                     17:                } /* if aname matches a table entry  */
                     18:        } /* for i = 0 to last table entry */
                     19: 
                     20:        /* Return value will be NULL iff we didn't find the name.  */
                     21:        return(table[i]);
                     22: } /* lookup() */

unix.superglobalmegacorp.com

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