#include "layers.h"

char* getfirst(char* word, char* line) {

  int n=0, start,stop;
  char* next;

  while(isblank((int)line[n]) && line[n]!='\n' && n<198) n++;
  start = n;
  while(!isblank((int)line[n]) && line[n]!='\n' && n<198) n++;
  stop = n;
  strncpy(word,&(line[start]),stop-start);
  next = &(line[stop+1]);
  word[stop-start] = '\0';

  if(stop>start && stop<198) return(next);
  else return(NULL);
}
