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

/*  Module PNLRSTCC.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>

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

VOID PARSTC()

/*  This routine restores the cursor if it has been moved other than during
    a 'recursive' call to PANELF for display (eg by PAMSGE, which calls PACURS
    after the message to display the cursor at the end of the message).  You
    only need this routine if you are using low-level routines to move the 
    cursor during a validation exit.  Call it before returning to PANEL.  

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

{
    int xpos;

    xpos = (UCI(PACRF.fi));
    if (xpos > (UCI(PACRF.sl) - 1) ) xpos = UCI(PACRF.sl) - 1;
    PACURS(UCI(PACRF.sx)+xpos,UCI(PACRF.sy)+UCI(PACRF.fj));
}

