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 h

⟦60a970c95⟧ TextFile

    Length: 1142 (0x476)
    Types: TextFile
    Names: »help.c«

Derivation

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

TextFile

/* help.c */

#include "externs.h"
#include <signal.h>

help (longmessage)
	int longmessage;
{
	int y, x, trap_sigint ();

	signal (SIGINT, SIG_IGN);
	getyx (stdscr, y, x);
	overwrite (stdscr, backupscreen);
	overwrite (blankscreen, stdscr);
	move (0,0);
	refresh ();
	wrefresh (curscr);
	switch (vfork ()) {
	case -1:
		perror ("Sorry, couldn't fork");
		break;
	case 0:
		if (longmessage)
			execle (PRINT_FILE, PRINT_FILE, HELP_FILE, 0, envp);
		else
			execle (PRINT_FILE, PRINT_FILE,
				SHORT_HELP_FILE, 0, envp);
		perror ("Sorry, couldn't exec");
		_exit (-1);
	default:
		if (wait(0) < 0)
			perror ("wait in help");
	}
	if (option [ANNOUNCETAKES]
	|| option [ANNOUNCEPAWNS]
	|| (option [REVERSE] && ourcolor == BLACK)) {
		printf ("Options set:");
		if (option [ANNOUNCETAKES])
			printf (" announcetakes");
		if (option [ANNOUNCEPAWNS])
			printf (" announcepawns");
		if (option [REVERSE] && ourcolor == BLACK)
			printf (" reverse");
		printf ("\n");
	}
	printf ("* Type any character to continue *");
	getchar ();
	overwrite (backupscreen, stdscr);
	move (y, x);
	wrefresh (curscr);
	redraw ();
	signal (SIGINT, trap_sigint);
}