#include "request.h"
#include <string.h>

char *strupr( char *in )
{
  char out[255];
  int counter = 0;

  while( in[counter] != '\0' )
  {
    out[counter] = toupper( in[counter] );
    counter++;
  }

  return out;
}

long search( char *pattern )
{
  struct file_pos *help;
  
  help = line;
  
  while(((line=line->next)!=NULL) && (strstr(strupr(line->string),pattern)==NULL ));

  if ( strstr(line->string, pattern) != NULL )
    {
      beep();
      flash();
      curr_pos = 0;
      return( 0L );
    }
  line = help;
  return (-1L);
}









