|
|
1.1 ! root 1: /*----------------------------------------------------------------------*/ ! 2: /* */ ! 3: /* PACMAN for BBN BitGraphs */ ! 4: /* */ ! 5: /* File: hostscore.c68 */ ! 6: /* Contents: routines for host score file support */ ! 7: /* Author: Rich Fortier (rwf) */ ! 8: /* Bolt Beranek & Newman */ ! 9: /* Date: May, 1982 */ ! 10: /* Description: support for keeping a high score file on the */ ! 11: /* host. */ ! 12: /* */ ! 13: /*----------------------------------------------------------------------*/ ! 14: ! 15: #include "style.h" ! 16: #include "host.h" ! 17: ! 18: /***************************************************************************** ! 19: * encrypt: trivial encryption routine. * ! 20: * * ! 21: * Arguments: num, the number to encrypt. * ! 22: * * ! 23: * Returns: the encrypted number. * ! 24: * * ! 25: * Remarks: this routine is in no way intended to provide any * ! 26: * security in the numbers transmitted back to the host. It's sole * ! 27: * purpose is to make is sufficiently tedious to type in a bogus * ! 28: * number to the host that most people won't bother. * ! 29: * * ! 30: *****************************************************************************/ ! 31: ! 32: encrypt (num) ! 33: register int num; ! 34: { ! 35: return num ^= 0xA5A5; ! 36: } ! 37: ! 38: ! 39: /***************************************************************************** ! 40: * sndhost: formatted print routine. * ! 41: * * ! 42: * Arguments: fmt, the print format. * ! 43: * x1, the first argument. * ! 44: * * ! 45: * Returns: nothing. * ! 46: * * ! 47: * Remarks: simply invoke lower level routine with proper display routine. * ! 48: * * ! 49: *****************************************************************************/ ! 50: ! 51: /*VARARGS1*/ ! 52: sndhost (fmt, x1) ! 53: char *fmt; ! 54: unsigned x1; ! 55: { ! 56: extern int hstput (); ! 57: ! 58: #ifndef BLIT ! 59: prf(fmt, &x1, hstput); ! 60: #endif ! 61: } ! 62: ! 63: ! 64: ! 65: ! 66: /***************************************************************************** ! 67: * hstput: host put a character routine. * ! 68: * * ! 69: * Arguments: c, the character to put. * ! 70: * * ! 71: * Returns: nothing. * ! 72: * * ! 73: * Remarks: simply invoke the queue put routine, looping until success. * ! 74: * * ! 75: *****************************************************************************/ ! 76: ! 77: hstput (c) ! 78: register int c; ! 79: { ! 80: extern int hstputc(); ! 81: extern int hostpc(); ! 82: ! 83: #ifdef V2_0 ! 84: while (hstputc (c) == -1); ! 85: #endif ! 86: ! 87: #ifdef V1_25 ! 88: while (hostpc (c) == -1); ! 89: #endif ! 90: } ! 91: ! 92: ! 93: ! 94: ! 95:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.