Plan 9 from Bell Labs’s /usr/web/sources/contrib/paurea/goban/tryifc.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#include <u.h>
#include <libc.h>
#include <thread.h>
#include <draw.h>
#include <keyboard.h>
#include <mouse.h>
#include <igo.h>

extern char goban[Bansz+1][Bansz+1];
int verbose;
int      mainstacksize = 2*Stacksz;

extern Channel *ifcchan;
extern Keyboardctl 	*keyboardctl;
extern Mousectl		*mousectl;


void
threadmain(int argc, char **argv)
{

	verbose=0;

	ARGBEGIN {
 	case 'v':
		verbose=1;
	break;

	default:
		fprint(2," badflag('%c')", ARGC());
		sysfatal("Bad args");
    } ARGEND
	ifcchan=chancreate(sizeof(Move*),0);



	keyboardctl = initkeyboard(nil);
	if ( keyboardctl == nil )
		sysfatal("initkeyboard");

	mousectl = initmouse(nil, screen);
	if ( mousectl == nil )
		sysfatal("initmouse");

	threadcreate(ifcthread, nil, Stacksz);
	threadcreate(inthread, nil, Stacksz);
	threadexits(0);

}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].