DataMuseum.dk

Presents historical artifacts from the history of:

Commodore CBM-900

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

See our Wiki for more about Commodore CBM-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦3e3112e0b⟧ TextFile

    Length: 359 (0x167)
    Types: TextFile
    Notes: UNIX file
    Names: »main.c«

Derivation

└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code
    └─⟦f4b8d8c84⟧ UNIX Filesystem
        └─ ⟦this⟧ »cmd/tsort/main.c« 

TextFile

#include <stdio.h>
#include "tsort.h"


main(argc, argv)
register int	argc;
register char	*argv[];
{
	register FILE *fp = stdin;

	if (argc > 2)
		usage();
	if (argc == 2) {
		fp = fopen(*++argv, "r");
		if (fp == NULL)
			die("Can't open %s", *argv);
	}
	getcon(fp);
	order();
	return (0);
}

usage()
{
	fprintf(stderr, "usage: tsort [file]\n");
	exit(1);
}