File:  [CSRG BSD Unix] / 43BSD / contrib / B / src / bed / term.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:54 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43
BSD 4.3

/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1984. */
/* $Header: /var/lib/cvsd/repos/CSRG/43BSD/contrib/B/src/bed/term.c,v 1.1.1.1 2018/04/24 16:12:54 root Exp $ */

/*
 * B editor -- Init/end terminal-related modules.
 *
 * This file should be wiped out completely.
 */


#include "b.h"
#include "erro.h"

extern bool dflag;

extern bool nosense;


/*
 * Call initialization code of other terminal-dependent modules.
 * N.B. the order of initializations is determined by black magic.
 *	Don't change!
 */

Visible Procedure
initterm()
{
#ifndef NDEBUG
	if (dflag)
		fprintf(stderr, "*** initterm();\n\r");
#endif NDEBUG
	/* initshow(); */
	initgetc();
}


/*
 * Extermination code, reverse of initterm().
 * N.B. the order of exterminations is determined by black magic.
 *      Don't change!
 */

Visible Procedure
endterm()
{
#ifndef NDEBUG
	if (dflag)
		fprintf(stderr, "*** endterm();\n\r");
#endif NDEBUG
	/* endshow(); */
	endgetc();
}


/*
 * Compatible interface with trmsense; return No if not sensed.
 */

Visible bool
sense(py, px)
	int *py;
	int *px;
{
	trmsense(py, px);
	if (*py >= 0 && *px >= 0)
		return Yes;
	if (nosense)
		error(GOTO_NO);
	else
		error(GOTO_BAD);
	return No;
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.