Hi, firstly I forgot to thank you in some thread about allocating the struct... So I thank everyone who helped me improve my code...
It will be very similiar right now, cause my program have to run under unix and I have some serious problems with my Putty right now... (should install some linux)
Point is all functions are valid, its just all about the while cycle... cause I am afraid of memory leaks
Code:
//void* SQLgetLineFromTable(&listOfTables->table); returns null if end of file
//void SQLinsertLineToTable(SQLtable* table,*void,t_size);
void* d_data= SQLgetLineFromTable(&listOfTables->table); SQLtable* tabulka = SQLcreateTable();
while (d_data!=NULL){
SQLinsertLineToTable(tabulka,d_data,SQL_DATA_SIZE);
d_data = SQLgetLineFromTable(&listOfTables->table);
}
Should I allocate d_data and still reallocate them or its fine like this? Or is there any other way so I can controll end of file through SQLgetLineFromTable(&listOfTables->table); which returns null when reaches the EOF