/***************************************************************************
 *                                                                         *
 *   PADFLD.C                                                              *
 *                                                                         *
 *   Copyright (C) 1987-1997 Galacticomm, Inc.    All Rights Reserved.     *
 *                                                                         *
 *   This is the GCOMM.LIB routine for padding a string with blanks out    *
 *   to a certain field length (the length includes the '\0', so it can    *
 *   be just the sizeof(stg) if desired).                                  *
 *                                                                         *
 *                                            - T. Stryker 2/18/92         *
 *                                                                         *
 ***************************************************************************/

#include "gcomm.h"

#define FILREV "$Revision: 4 $"

VOID
padfld(                            /* pad stg with blanks for len          */
CHAR *stg,                         /*   string to pad                      */
INT len)                           /*   length to pad                      */
{
     CHAR *cp;

     len--;
     for (cp=stg+strlen(stg) ; cp-stg < len ; cp++) {
          *cp=' ';
     }
     *cp='\0';
}
