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);