CCL Home Page
Up Directory CCL gfield
#include "utility.h"

char *gfield(line,field_start,field_length,field)
/*============================================================================*/
/* PURPOSE: EXTRACT A FIELD FROM A LINE.  A FIELD IS ANY CONTIGUOUS SPAN OF
/*	CHARACTERS STARTING AT AN ARBITRARY POINT.  THE RETURNED FIELD IS
/*	NULL TERMINATED.
/* WRITTEN: M.V.GRIESHABER
/* LAST MODIFICATION: 2 JUNE 1993 MVG
*/
   char line[];		/* ORIGINAL LINE CONTAINING FIELD. */
   int field_start;	/* STARTING CHARACTER POSITION OF FIELD. */
   int field_length;	/* NUMBER OF CHARACTERS IN FIELD. */
   char field[];	/* RETURNED FIELD, NULL TERMINATED. */
   {
   strncpy(field,&line[field_start],field_length);
   field[field_length]='\0';

   return(field);
   }
Modified: Fri Feb 11 17:00:00 1994 GMT
Page accessed 5221 times since Sat Apr 17 21:58:56 1999 GMT