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 m

⟦49e7a19cc⟧ TextFile

    Length: 1061 (0x425)
    Types: TextFile
    Names: »main.c«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/Sun/Mines/main.c« 

TextFile

/*
 * main part of the mines program
 *
 * Copyright (c) 1987 Tom Anderson; 20831 Frank Waters Road;
 * Stanwood, WA  98282.   All rights reserved.
 */
static char copyright[] = "Copyright 1987 Tom Anderson";

#include <stdio.h>
#include <strings.h>
#include <errno.h>
#include <suntool/tool_hs.h>
#include <pwd.h>

#include "mines.h"

int errno;				/* global error number */

main(argc, argv)
    int argc;
    char ** argv;
{
    register int i, j;
    char * cp;

    /* randomize things a bit */
    (void) srandom((long) getpid());
    /* parse and strip out the tool-related arguments */
    ParseToolArgs(&argc, argv);
    for (i = 1 ; i < argc ; i++) {
	if (argv[i][0] == '-') {
	    switch(argv[i][1]) {
	    /* small (16 x 16) version */
	    case 's':
		IconOffset.x = IconOffset.y = 0;
		SquareWidth = SquareHeight = 16;
		break;
	    }
	}
    }
    /* initialize the board state */
    InitBoard(DEFAULT_MINE_QTY);
    /* initialize and install the tool */
    InitTool();
    tool_install(MinesTool);
    /* now play the game */
    RunTool();
}