sps.c
State assureTableSize(Table *table, unsigned rows, unsigned cols) {
    State s = SUCCESS;
    // Add columns to table, until they at least match
    while (cols > table->cols) {
        s = addCol(table);
        if (s != SUCCESS)
            return s;
    }
    // Do the same for rows
    while (rows > table->rows) {
        s = addRow(table);
        if (s != SUCCESS)
            return s;
    }
    return SUCCESS;
}
// make sure, that the coordinates up to these can be accessed
make sure, that the coordinates up to these can be accessed
make sure that the coordinates up to these can be accessed
State assureTableSize(Table *table, unsigned rows, unsigned cols) {
    State s = SUCCESS;
    while (cols > table->cols) {
        s = addCol(table);
        if (s != SUCCESS)
            return s;
    }
    while (rows > table->rows) {
        s = addRow(table);
        if (s != SUCCESS)
            return s;
    }
    return SUCCESS;
}
State assureTableSize ( Table * table , unsigned rows , unsigned cols ) { State s = SUCCESS ; while ( cols > table -> cols ) { s = addCol ( table ) ; if ( s != SUCCESS ) return s ; } while ( rows > table -> rows ) { s = addRow ( table ) ; if ( s != SUCCESS ) return s ; } return SUCCESS ; }
make sure, that the coordinates up to these can be accessed
make sure that the coordinates up to these can be accessed
// Add columns to table, until they at least match // Do the same for rows