home *** CD-ROM | disk | FTP | other *** search
- %h{
- /* *
- * *
- * Copyright 1987, 1988, 1989 Netwise, Inc. *
- * All Rights Reserved *
- * This software contains information which is proprietary to and a trade *
- * secret of Netwise, Inc. It is not to be used, reproduced, or disclosed *
- * except as authorized in your license agreement. *
- * *
- * Restricted Rights Legend *
- * Use, duplication, or disclosure by the Government is subject to *
- * restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in *
- * Technical Data and Computer Software clause at 252.227-7013, or the *
- * equivalent Government clause for other agencies. *
- * Contractor: Netwise, Inc., Boulder, CO 80301 USA *
- * *
- */
- %}
-
- /*
- * File: tutorial\common\database.rpc
- *
- * This example runs in the following environment:
- * NetWare RPC 1.0, NetWare 2.1 or higher, DOS 3.3
- *
- * This is the RPC Specification file for the tutorial example.
- */
-
- /* Set interface variables */
- interface {
- set INTERFACE_NAME dbase; /* Name the dispatcher procedure */
- };
-
- /* Include defined values from standalone program */
- %h {
- #define TRUE 1
- #define FALSE 0
- #define SUCCESS 0
- #define ERROR -1
- #define PERMANENT '0'
- #define TEMPORARY '1'
- #define OLDNAME 1
- #define OLDNUM 2
- #define DBFULL 3
- #define MAXREC 50
- #define FIRSTNAME 30
- #define LASTNAME 30
- #define NAMESIZE (FIRSTNAME + LASTNAME)
- #define AGCYSIZE 60
- %}
-
- /* Include definition of structure type from standalone program */
- struct employee_record {
- /* the employee_name param uses a termination expression */
- char employee_name[NAMESIZE] (*$0 == '\0');
- char employee_type;
- /* each element of a union has a choice expression,
- and the temp_agency param has a termination expression */
- union {
- ($$->employee_type == PERMANENT) int employee_id;
- ($$->employee_type == TEMPORARY)
- char temp_agency[AGCYSIZE] (*$0 == '\0');
- } employee_info;
- };
-
- /* process binding variable */
- extern server_name [bind in] sname;
-
- int
- get_record(
- /* the name param uses a termination expression */
- char [in] name[NAMESIZE] (*$0 == '\0'),
- struct employee_record [out] **record_ptr
- );
-
- int
- append_record(struct employee_record [in] *record_ptr)
- {
- /* external output variable */
- extern int [out] recerr;
- }
-
- int
- shut_down_server();
- /* Routine added to allow client program to
- * terminate server program when user exits
- */
-