/*
 * Sample Program for microVIEW-G(x)
 * <<< samp4.c >>>
 * 1995,1996 @ advice Yokogawa Digital Computer Corp.
 */

/*
 * Include Files
 */

#include        "samp0.h"
#include        "samp1.h"
#include        "samp2.h"

/*
 * Data Definition
 */

#define         PDGCHR0         'Y'
#define         PDGCHR1         'U'

static void S_samp()
{
    char    buf[6];

    buf[0] = 0x0;
    buf[1] = 0x0;
    buf[2] = 0x0;
    buf[3] = 0x0;
    buf[4] = 0x0;
    buf[5] = 0x0;
}

void Fill(int     code)
{
    long        cnt;
    char        pdgchr;

    if (code==0) {
	pdgchr = PDGCHR0;
    }
    else if (code == 1) {
	pdgchr = PDGCHR1;
    }
    else {
	pdgchr = 0x20;
    }

    S_samp();
    for (cnt=0;cnt<STRSIZ;cnt++) {
	MasterStr[cnt] = pdgchr;
    }
}

char *MemClr(char *s, long l)
                                /* Target Buffer */
                                /* Buffer length */
{
    long  i;
    char  *p;

    for (i=0; i<l; i++) {
	*(s+i) = NULL;
    }
    p = (s+i);

    return(p);
}
/* EOF */
