File:  [CSRG BSD Unix] / 41BSD / cmd / cifplot / text.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:53 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD41
BSD 4.1

/*******************************************************************
*                                                                  *
*    File: CIFPLOT/text.c                                          *
*    Written by Dan Fitzpatrick                                    *
*    copyright 1980 -- Regents of the University of California     *
*                                                                  *
********************************************************************/

#include <stdio.h>
#include "defs.h"
#include "globals.h"
#include "parser_defs.h"
#include "structs.h"
#include "out_structs.h"
#include "alloc.h"

IMPORT GetList();
FORWARD real TCompare();

Text(xcurrent)
int xcurrent;
{
    TextStruct *p;

    p = (TextStruct *) TextList.Link;
    while(p != NIL && p->xpos-xcurrent < -TextDown-1) {
	p = (TextStruct *) GetList(&TextList);
	p = (TextStruct *) TextList.Link;
	}
    for(; p != NIL; p = (TextStruct *) p->Link) {
	if(p->xpos-xcurrent > TextUp+1) return;
	DrawText(p->str,p->xpos-xcurrent,p->ypos,xcurrent);
	}
    }

real
TCompare(t1,t2)
TextStruct *t1,*t2;
{
    return((float) (t1->xpos - t2->xpos));
    }

unix.superglobalmegacorp.com

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