
/****************************************************************************/

/*  Module PNLTDSPC.C 

    Copyright 1986 Roundhill Computer Systems Limited
    All rights reserved

    Use and disclosure of this code are prohibited unless in accordance
    with the terms of the PANEL software licence.

    ************************************************************************
    *** THE OBJECT CODE VERSION OF THIS MODULE IS INCLUDED IN THE PANEL  ***
    *** LIBRARY.  IF YOU AMEND AND COMPILE THIS MODULE AND LINK IT WITH  ***
    *** YOUR APPLICATION IT WILL SUPERSEDE THE LIBRARY VERSION.          ***
    ************************************************************************

    PANEL:  Type 4          : Validation / Miscellaneous
            Source Language : C

    Modification History (Push-Down List):  

            27.12.85        : Convert to table-driven operation

******************************************************************************/

#include <pnl4.h>

/*****************************************************************************/

int PATDSP(n)

/*  This routine tests bit N in PADSP and returns its setting (0 or 1).  This
    is used to determine whether a character is 'displayable'.

******************************************************************************/

int n;

{          
    uchar msk;                  /* single byte mask */

    n &= 0xff;                  /* filter passed high byte */
    msk = 1 << (7 - (n%8));     /* create appropriate byte mask */
    return (int) ((PAECB.padsp[(n/8)] & msk) != 0); /* calculate byte do mask */
}

