src/experiments/k4/K4ClientPIC/ClientPIC.cpp
void CClientPIC::EatLine (FILE *fp)
{
  // check if line begins with '//'
  for (;;)
    {
      char c1, c2;
      fread (&c1, 1, 1, fp);
      fread (&c2, 1, 1, fp);
      
      if (c1 == '/' && c2 == '/')
	{
	  do
	    {
	      fread (&c1, 1, 1, fp);
	    }
	  while (c1 != '\n' && !feof(fp));
	}
      else
	{
	  fseek (fp, -2, SEEK_CUR);
	  return;         // exit from here.
	}
    }
}
/* this is a utility function used in ReadConfig to eat all char until a \n 
   is encountered */
this is a utility function used in ReadConfig to eat all char until a \n
is encountered
this is a utility function used in ReadConfig to eat all char until a \ n is encountered
void CClientPIC::EatLine (FILE *fp)
{
  for (;;)
    {
      char c1, c2;
      fread (&c1, 1, 1, fp);
      fread (&c2, 1, 1, fp);
      if (c1 == '/' && c2 == '/')
	{
	  do
	    {
	      fread (&c1, 1, 1, fp);
	    }
	  while (c1 != '\n' && !feof(fp));
	}
      else
	{
	  fseek (fp, -2, SEEK_CUR);
	  return;         
	}
    }
}
void CClientPIC :: EatLine ( FILE * fp ) { for ( ; ; ) { char c1 , c2 ; fread ( & c1 , 1 , 1 , fp ) ; fread ( & c2 , 1 , 1 , fp ) ; if ( c1 == ' ' && c2 == ' ' ) { do { fread ( & c1 , 1 , 1 , fp ) ; } while ( c1 != ' \n ' && ! feof ( fp ) ) ; } else { fseek ( fp , -2 , SEEK_CUR ) ; return ; } } }
this is a utility function used in ReadConfig to eat all char until a \n
is encountered
this is a utility function used in ReadConfig to eat all char until a \ n is encountered
// check if line begins with '//' // exit from here.