X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/d85375b5ea6773eb12e86e630961034cd5df1e96..229842d4d97388eadad57699de5ea570ee5cb949:/emufs/external_sort/mergefile.h diff --git a/emufs/external_sort/mergefile.h b/emufs/external_sort/mergefile.h index 221a055..bab305b 100644 --- a/emufs/external_sort/mergefile.h +++ b/emufs/external_sort/mergefile.h @@ -42,23 +42,23 @@ typedef struct { - FILE* fp; - int next; - int more; + FILE* fp; + size_t reg_size; + void* next; } MERGEFILE; -MERGEFILE* mergefile_new(); +MERGEFILE* mergefile_new(size_t reg_size); void mergefile_delete(MERGEFILE* mf); int mergefile_switch_to_input(MERGEFILE* mf); -int mergefile_push(MERGEFILE* mf, int data); +int mergefile_push(MERGEFILE* mf, void* data); -int mergefile_pop(MERGEFILE* mf); +void* mergefile_pop(MERGEFILE* mf); -int mergefile_peek(MERGEFILE* mf); +void* mergefile_peek(MERGEFILE* mf); int mergefile_has_more(MERGEFILE* mf);