errx(0, "Version: $KTH: gensysname.c,v 1.13 1998/08/23 22:50:24 assar Exp $");
errx(0, "Version: $KTH: gensysname.c,v 1.24 1999/01/04 23:21:29 lha Exp $");
main(int argc, char **argv){    const char *cpu    = ARLACPU;    const char *vendor = ARLAVENDOR;    const char *os     = ARLAOS;    struct sysname *sysname = sysnames;    int found = 0;    int optind = 0;    set_progname (argv[0]);    if (getarg (args, argc, argv, &optind, ARG_GNUSTYLE)) 	usage();    argc -= optind;    argv += optind;    if (helpflag)	usage();    if (versionflag)	errx(0, "Version: $KTH: gensysname.c,v 1.13 1998/08/23 22:50:24 assar Exp $");    if (ccodeflag)	output = O_C;    if (humanflag)	output = O_TEXT;    if (machineflag)	output = O_MACHINE;    if (sysnameflag) {	printf ("%s-%s-%s\n", cpu, vendor, os);	return 0;    }    if (allflag) {	while (sysname->sysname) {	    printf("%-20s == %s %s %s\n",		   sysname->sysname,		   sysname->cpu,		   sysname->vendor,		   sysname->os);	    sysname++;	}	return 0;    }        try_parsing (&argc, &argv, &cpu);    try_parsing (&argc, &argv, &vendor);    try_parsing (&argc, &argv, &os);    while (sysname->sysname && !found) {	if (!strmatch(sysname->cpu, cpu) &&	    !strmatch(sysname->vendor, vendor) &&	    !strmatch(sysname->os, os) &&	    (sysname->atest == NULL || ((*(sysname->atest))()))) {	    	    found = 1;	    printsysname(sysname->sysname);   	}	sysname++;    }    /* XXX need some better here? */    if (!found) {	fprintf(stderr, "our host was not found using generic\n"); 	printsysname("arlahost");    }        return 0;}