X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/blobdiff_plain/cb53166758c12a09e9911769ce89c94cee4cc0f0..d02adaeecaf5e03a84fecc369105cb618a3eb046:/src/blocksorting/bs.c diff --git a/src/blocksorting/bs.c b/src/blocksorting/bs.c index fb13e55..93b7bb5 100644 --- a/src/blocksorting/bs.c +++ b/src/blocksorting/bs.c @@ -139,3 +139,18 @@ void bs_destroy(t_BlockSort *bs) free(bs->array); free(bs); } + +int bs_readblock(FILE *fp, char *data, Uint32 pagesize) +{ + Uint32 i=0; + + while ((!feof(fp)) && (i < pagesize)) { + data[i++] = fgetc(fp); + } + + /* Saco un EOF que lee de mas */ + if (i