/***************************************************************************
 *                                                                         *
 *   DEPAD.C                                                               *
 *                                                                         *
 *   Copyright (c) 1987-1997 Galacticomm, Inc.    All Rights Reserved.     *
 *                                                                         *
 *   This is the GCOMM.LIB routine for stripping blanks off the end of     *
 *   a string.                                                             *
 *                                                                         *
 *                                            - R. Stein   2/7/92          *
 *                                                                         *
 ***************************************************************************/

#include "gcomm.h"

#define FILREV "$Revision: 4 $"

SHORT                              /*   returns number of blanks removed   */
depad(                             /* strip trailing whitespace & ^Z       */
CHAR *string)                      /*   string to depad                    */
{
     SHORT before,after;

     before=strlen(string);
     string[after=strpln(string)]='\0';
     return(before-after);
}
