
#include <rpcrts.h>

typedef    rpc_char rpc_stype_0[81];

program_index p_cback2;

extern display_line();
/*  Parameters: 
    rpc_stype_0 line;
    */

static rpc_message *rpc_p_buf;

r_display_line()
{
    rpc_stype_0 line;
    register rpc_integer rpc_a;
    register rpc_integer rpc_b;

   upk_integer(rpc_p_buf, rpc_b);
   for (rpc_a = 0; rpc_a < rpc_b; rpc_a++) {
   upk_char(rpc_p_buf, line[rpc_a]);
   }
   line[rpc_b] = '\0';
    if (rpc_p_buf->m_index%2) rpc_p_buf->m_index++;
    c_turn(rpc_p_buf);
    display_line(line);
    }

r_cback2(rpc_a) rpc_message **rpc_a;
{   rpc_short request;

    rpc_p_buf = *rpc_a;
    rpc_p_buf->m_index = CALL_HEADER_LENGTH - 4;
    upk_short(rpc_p_buf, request);
    if (request != 0 && request != 4565)
         rpc_p_buf->m_status = RPC_S_UNSUPPORTED_VERSION;
    else {
     upk_short(rpc_p_buf, request);
     switch (request)
     {   case  1 : r_display_line();
                  break;
        default : rpc_p_buf->m_status = RPC_S_BAD_PROCEDURE_NUMBER;
        }
     }
    }

attach_cback2()
{   rpc_status      status;

    c_attach_stub(status, r_cback2, 
        "cback2                                  ", p_cback2);
    c_report_error(status);
    }
