astropy/io/ascii/src/tokenizer.c
/*
  If we are tokenizing the header, end after the first line.
  Handle the possibility of insufficient columns appropriately;
  if fill_extra_cols=1, then append empty fields, but otherwise
  return an error. Increment our row count and possibly end if
  all the necessary rows have already been parsed.
*/
If we are tokenizing the header, end after the first line.
Handle the possibility of insufficient columns appropriately;
if fill_extra_cols=1, then append empty fields, but otherwise
return an error. Increment our row count and possibly end if
all the necessary rows have already been parsed.
If we are tokenizing the header end after the first line . Handle the possibility of insufficient columns appropriately ; if fill_extra_cols = 1 then append empty fields but otherwise return an error . Increment our row count and possibly end if all the necessary rows have already been parsed .
static inline int end_line(tokenizer_t *self, int col, int header, int end,
                           tokenizer_state *old_state)
{
    if (header)
    {
        ++self->source_pos;
        RETURN(NO_ERROR);
    }
    else if (self->fill_extra_cols)
    {
        while (col < self->num_cols)
        {
                PUSH('\x01');
            END_FIELD();
        }
    }
    else if (col < self->num_cols)
    {
        RETURN(NOT_ENOUGH_COLS);
    }
    ++self->num_rows;
    *old_state = START_LINE;
    if (end != -1 && self->num_rows == end)
    {
        ++self->source_pos;
        RETURN(NO_ERROR);
    }
    return -1;
}
static inline int end_line ( tokenizer_t * self , int col , int header , int end , tokenizer_state * old_state ) { if ( header ) { ++ self -> source_pos ; RETURN ( NO_ERROR ) ; } else if ( self -> fill_extra_cols ) { while ( col < self -> num_cols ) { PUSH ( ' \x01 ' ) ; END_FIELD ( ) ; } } else if ( col < self -> num_cols ) { RETURN ( NOT_ENOUGH_COLS ) ; } ++ self -> num_rows ; * old_state = START_LINE ; if ( end != -1 && self -> num_rows == end ) { ++ self -> source_pos ; RETURN ( NO_ERROR ) ; } return -1 ; }
If we are tokenizing the header, end after the first line.
If we are tokenizing the header end after the first line .