Logo Search packages:      
Sourcecode: plib version File versions

char * ObjLoader::getline ( char *  line,
size_t  n,
FILE *  fp 
) [private]

Read the next non-blank line. Returns pointer to first non-whitespace character or NULL on error or EOF.

Definition at line 163 of file ssgLoadXPlaneObj.cxx.

References fgets().

{
    for (;;)
    {
      char* p = fgets( line, n, fp );
      if (p == 0)
          return 0;

      // Skip leading whitespace.
      while (*p != 0 && isspace(*p))
          ++p;

      if (*p != 0)
          return p;
    }
}


Generated by  Doxygen 1.6.0   Back to index