File:  [CSRG BSD Unix] / 43BSDReno / contrib / isode-beta / others / quipu / photo / t4014.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:56 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43reno
BSD 4.3reno

/* t4014.c - display on tetronix 4014 terminals */

#ifndef	lint
static char *rcsid = "$Header: /var/lib/cvsd/repos/CSRG/43BSDReno/contrib/isode-beta/others/quipu/photo/t4014.c,v 1.1.1.1 2018/04/24 16:12:56 root Exp $";
#endif

/* 
 * $Header: /var/lib/cvsd/repos/CSRG/43BSDReno/contrib/isode-beta/others/quipu/photo/t4014.c,v 1.1.1.1 2018/04/24 16:12:56 root Exp $
 *
 *
 * $Log: t4014.c,v $
 * Revision 1.1.1.1  2018/04/24 16:12:56  root
 * BSD 4.3reno
 *
 * Revision 7.0  89/11/23  22:01:47  mrose
 * Release 6.0
 * 
 */

/*
 *				  NOTICE
 *
 *    Acquisition, use, and distribution of this module and related
 *    materials are subject to the restrictions of a license agreement.
 *    Consult the Preface in the User's Manual for the full terms of
 *    this agreement.
 *
 */



#include "stdio.h"
#include "quipu/photo.h"
#include "signal.h"
extern int NUMLINES,PIC_LINESIZE;
extern unsigned position;

/* Any errors should be written to *stdout* */
/* if the process exits, with out giving an error message, quipu may hang */

#define SCALE 5
#define Y_OFFSET 2700
#define X_OFFSET 3000
#define X_SKIP 8

int y = Y_OFFSET;

photo_quit ()
{
	putch (030);	/* Return to non-graphic mode */
	exit (0);
}

photo_start (name)
char * name;
{
	putch (035);	/* Enter graphic mode */

	openpl ();
	erase ();
	linemod ("solid");

	signal (SIGTERM,photo_quit);
	/* return 0 if sucessful -1 if not */

	return (0);
}


photo_end (name)
char * name;
{
	/* Decoding has finished - display the photo */
	move (0,Y_OFFSET - 100);
	closepl();

	(void) printf ("\n");
	(void) fflush (stdout);
	(void) close (1);	/* this is needed for QUIPU */
	/* wait until signalled to Terminate */
	for (;;)
		;
}

photo_black (length)
int length;
{
}

photo_white (length)
int length;
{
	line ((position*SCALE)+X_OFFSET,y,((length+position-1)*SCALE)+X_OFFSET,y);
}


photo_line_end (line)
bit_string * line;
{
	y -= SCALE;
}

unix.superglobalmegacorp.com

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