* Copyright (c) 1982 Regents of the University of California.
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and that due credit is given
* to the University of California at Berkeley. The name of the University
* may not be used to endorse or promote products derived from this
* software without specific prior written permission. This software
* is provided ``as is'' without express or implied warranty.
static char sccsid
[] = "@(#)varpush.c 5.3 (Berkeley) %G%";
* @(#)varpush.c 1.1 (Berkeley) 4/1/82
* push variables around via the routine func() on the file
* channel file. func() is either read or write.
(*func
)(file
, (char *) &Debug
, sizeof Debug
);
(*func
)(file
, (char *) &Finished
, sizeof Finished
);
(*func
)(file
, (char *) &Order
, sizeof Order
);
(*func
)(file
, (char *) &End
, sizeof End
);
(*func
)(file
, (char *) &On_exit
, sizeof On_exit
);
(*func
)(file
, (char *) &Handstart
, sizeof Handstart
);
(*func
)(file
, (char *) &Numgos
, sizeof Numgos
);
(*func
)(file
, (char *) Numseen
, sizeof Numseen
);
(*func
)(file
, (char *) &Play
, sizeof Play
);
(*func
)(file
, (char *) &Window
, sizeof Window
);
(*func
)(file
, (char *) Deck
, sizeof Deck
);
(*func
)(file
, (char *) &Discard
, sizeof Discard
);
(*func
)(file
, (char *) Player
, sizeof Player
);
read(file
, (char *) &temp
, sizeof temp
);
if ((outf
= fopen(buf
, "w")) == NULL
) {
if (strcmp(buf
, "/dev/null") != 0)
setbuf(outf
, (char *)NULL
);
write(file
, (char *) &temp
, sizeof temp
);