home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 11 / 11.iso / n / n001 / 2.ddi / EXAMPLES / ARRAY / COMMON / ARRAY.RPC
Encoding:
Text File  |  1989-12-11  |  2.4 KB  |  58 lines

  1. %h{
  2. /*                                                                            *
  3.  *                                                                            *
  4.  *                  Copyright 1987, 1988, 1989 Netwise, Inc.                  *
  5.  *                              All Rights Reserved                           *
  6.  *   This software contains information which is proprietary to and a trade   *
  7.  *   secret of Netwise, Inc. It is not to be used, reproduced, or disclosed   *
  8.  *   except as authorized in your license agreement.                          *
  9.  *                                                                            *
  10.  *                          Restricted Rights Legend                          *
  11.  *   Use, duplication,  or  disclosure  by the  Government  is  subject  to   *
  12.  *   restrictions as set forth in subparagraph (c)(1)(ii) of the Rights  in   *
  13.  *   Technical Data and  Computer Software clause  at 252.227-7013, or  the   *
  14.  *   equivalent Government clause for other agencies.                         *
  15.  *   Contractor: Netwise, Inc., Boulder, CO 80301 USA                         *
  16.  *                                                                            *
  17.  */ 
  18. %}
  19.  
  20. /*
  21.  * File: array\common\array.rpc
  22.  *
  23.  * This RPC file runs in the following environment:
  24.  *    NetWare RPC 1.0, NetWare 2.1 or higher, DOS 3.3
  25.  *
  26.  * This is the RPC Specification file for the array example.
  27.  */
  28.  
  29. /*
  30.  * A global variable called sname is identified as the variable containing
  31.  * process binding information.  Because this variable is only
  32.  * used for input process binding information and because no
  33.  * output process binding information is specified, the client
  34.  * stubs open and close connections for each remote procedure
  35.  * call (i.e., this is a non-persistent connection).
  36.  */
  37. extern server_name [bind in] sname;    /* server_name is a predefined binding
  38.                        type (typedef char *server_name) */
  39.  
  40. /* The following procedures use the global variable sname implicitly
  41.  * for obtaining process binding information. The procedures add the
  42.  * elements of vec and return the sum.
  43.  */
  44.  
  45. int
  46. add_vec1( 
  47.     int size,        /* number of elements to add */ 
  48.     int vec[size]        /* array of integers */
  49. );        
  50.  
  51. /* Note that the add_vec1 procedure could also be declared as follows: */
  52.  
  53. int
  54. add_vec2( 
  55.     int size, 
  56.     int vec[] (#0 + 1 >= size)
  57. );                      
  58.