home *** CD-ROM | disk | FTP | other *** search
- /* *
- * *
- * 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: array\server\rproc.c
- *
- * This example runs in the following environment:
- * NetWare RPC 1.0, NetWare 2.1 or higher, DOS 3.3
- *
- * This file contains the remote procedures for the array example.
- */
-
- #include <stdio.h>
- #include "array.h" /* server header file, created by RPC compiler */
-
- /* add_vec1 adds the array elements and returns the sum to the client */
-
- int
- add_vec1( size, vec)
- int size; /* number of array elements */
- int vec[]; /* array of integers */
- {
- int i, sum;
-
- printf("SERVER: add_vec1() with %d elements\n", size);
- sum = 0;
-
- for(i=0; i<size; i++) {
- sum += vec[i];
- }
-
- return (sum);
- }
-
- /* add_vec2 adds the array elements and returns the sum to the client */
-
- add_vec2( size, vec)
- int size;
- int vec[];
- {
- int i, sum;
-
- printf("SERVER: add_vec2() with %d elements\n", size);
- sum = 0;
-
- for(i=0; i<size; i++) {
- sum += vec[i];
- }
-
- return (sum);
- }
-