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: pointer\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 pointer example.
- */
-
- #include <stdio.h>
- #include "pointer.h" /* server header file, created by the RPC compiler */
-
- int
- rm_blanks(initial, final)
- string initial;
- string *final;
- {
- int i, j;
- string tmp;
- extern char *malloc();
-
- if (initial == (string)0) {
- printf("SERVER: rm_blanks() called with no string\n");
- return(1);
- } else {
- printf("SERVER: rm_blanks() called with string '%s'\n",initial);
- }
-
- if ((tmp=(string)malloc(strlen(initial))) == (string)NULL) {
- printf ("malloc failed! execution aborted\n");
- exit (1);
- }
- j=0;
- for(i=0; i<=strlen(initial); i++) {
- if (initial[i] != ' ') {
- tmp[j] = initial[i];
- j++;
- }
- }
- *final=tmp;
- return (0);
- }
-