Category : C Source Code
Archive   : C-TOOLBX.ZIP
Filename : DOMERGE.C

 
Output of file : DOMERGE.C contained in archive : C-TOOLBX.ZIP
/* domerge.c - merge parts of external sort */
#include "stdio.h"
#include "merge1.h"


int domerge(scra,scrb,tofile,nruns)
char scra[] ; /* input scratch files on 1st pass */
char scrb[] ; /* output scratch files on 1st pass */
char tofile[] ; /* put final output here */
int nruns ; /* number of runs on 1st pass */
{
while( nruns > 1 )
{ if( nruns <= MAX_MERGE )
strcpy(scrb,tofile) ; /* last pass - output to file */
nruns = dopass(scra,scrb,nruns) ; /* do merge pass */
swap_str(scra,scrb) ; /* swap input and output */
}
}





  3 Responses to “Category : C Source Code
Archive   : C-TOOLBX.ZIP
Filename : DOMERGE.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/