/*---------------------------------------------------------------*/
/*   Copyright (c) 1993 Regents of the University of California  */
/*                 All Rights Reserved                           */
/*---------------------------------------------------------------*/
/*
            @(#) GetLine.c      1.0 (UCLA/IGPP) 3/16/93
*/
#include <stdio.h>
#include <string.h>
#include "pattern.h"

int	trimspc();	/* In parserc */

static char str[2048];

char*
GetLine(fptr, len)
FILE *fptr;
int  len;
{
  if (fptr == NULL)                        return(NULL);
  if (fgets(str, (len *2), fptr) == NULL)  return(NULL);
  trimspc(str);
  if (strlen(str) > (unsigned int) len) str[len] = '\0';
  return(str);
}  /* end of GetLine() */
  
