DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T c

⟦a219799e9⟧ TextFile

    Length: 841 (0x349)
    Types: TextFile
    Names: »cnumb.c«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/General/Empire.V/V1.1/EMPSUBS/cnumb.c« 

TextFile

#define D_NATSTR
#include        "empdef.h"

cnumb(string)
char *string;
{
        register char   *cnp, *sp;
        register int    cno;
        int     pmatch, pmcnt;

        pmcnt = 0;
        for (cno = 0; getnat(cno) != -1; cno++) {
                cnp = nat.nat_cnam;
                sp = string;
                while (*sp++ == *cnp++) {
                        if (*sp == 0)
                                if (*cnp == 0) {
                                        return (cno);
                                } else {
                                        pmatch = cno;
                                        pmcnt++;
                                        break;
                                }
                }
        }

        if (pmcnt == 1)
                return(pmatch);
        else
                return(-1);
}