third_party/inchi/INCHI_BASE/src/ichi_io.c
int inchi_ios_getsTab( char *szLine,
                       int len,
                       INCHI_IOSTREAM *f,
                       int *bTooLongLine )
{
    int  length;
    char *p;
    do
    {

        p = inchi_ios_str_getsTab( szLine, len - 1, f );
        if (!p)
        {
            *bTooLongLine = 0;
            return -1; /* end of file or cannot read */
        }
        szLine[len - 1] = '\0';
        /*
        *bTooLongLine = !strchr( szLine, '\n' );
        */
        p = strchr( szLine, '\n' );
        *bTooLongLine = ( !p && ( (int) strlen( szLine ) ) == len - 2 );
        lrtrim( szLine, &length );

    } while (!length);

    return length;
}
/****************************************************************************
    Read up to tab or LF but not more than len chars;
    if empty line, read further until a non-empty line;
    remove leading and trailing white spaces;
    keep zero termination
****************************************************************************/
Read up to tab or LF but not more than len chars;
if empty line, read further until a non-empty line;
remove leading and trailing white spaces;
keep zero termination
Read up to tab or LF but not more than len chars ; if empty line read further until a non - empty line ; remove leading and trailing white spaces ; keep zero termination
int inchi_ios_getsTab( char *szLine,
                       int len,
                       INCHI_IOSTREAM *f,
                       int *bTooLongLine )
{
    int  length;
    char *p;
    do
    {
        p = inchi_ios_str_getsTab( szLine, len - 1, f );
        if (!p)
        {
            *bTooLongLine = 0;
            return -1; 
        }
        szLine[len - 1] = '\0';
        p = strchr( szLine, '\n' );
        *bTooLongLine = ( !p && ( (int) strlen( szLine ) ) == len - 2 );
        lrtrim( szLine, &length );
    } while (!length);
    return length;
}
int inchi_ios_getsTab ( char * szLine , int len , INCHI_IOSTREAM * f , int * bTooLongLine ) { int length ; char * p ; do { p = inchi_ios_str_getsTab ( szLine , len - 1 , f ) ; if ( ! p ) { * bTooLongLine = 0 ; return -1 ; } szLine [ len - 1 ] = ' \0 ' ; p = strchr ( szLine , ' \n ' ) ; * bTooLongLine = ( ! p && ( ( int ) strlen ( szLine ) ) == len - 2 ) ; lrtrim ( szLine , & length ) ; } while ( ! length ) ; return length ; }
Read up to tab or LF but not more than len chars;
if empty line, read further until a non-empty line;
remove leading and trailing white spaces;
keep zero termination
Read up to tab or LF but not more than len chars ; if empty line read further until a non - empty line ; remove leading and trailing white spaces ; keep zero termination
/* end of file or cannot read */ /*
        *bTooLongLine = !strchr( szLine, '\n' );
        */