X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Ffastbuf.h;h=9878beeb1593580664f27b5be370e8b088bba60c;hb=ec085c955731db594926666e9bc6bdbbc1f5be9e;hp=0de3484a2d374450a211b69df6637d2d1e874d47;hpb=7119957a2df57af617f432dd429e1d6ae5cbe0fd;p=libucw.git diff --git a/lib/fastbuf.h b/lib/fastbuf.h index 0de3484a..9878beeb 100644 --- a/lib/fastbuf.h +++ b/lib/fastbuf.h @@ -63,7 +63,7 @@ struct fastbuf { byte is_fastbuf[0]; /* Dummy field for checking of type casts */ byte *bptr, *bstop; /* Access pointers */ byte *buffer, *bufend; /* Start and end of the buffer */ - byte *name; /* File name for error messages */ + char *name; /* File name for error messages */ sh_off_t pos; /* Position of bstop in the file */ int (*refill)(struct fastbuf *); /* Get a buffer with new data */ void (*spout)(struct fastbuf *); /* Write buffer data to the file */ @@ -101,7 +101,7 @@ struct fastbuf *bopen_file_try(const char *name, int mode, struct fb_params *par struct fastbuf *bopen_tmp_file(struct fb_params *params); struct fastbuf *bopen_fd(int fd, struct fb_params *params); -/* FastIO on standard files (specify buffer size 0 to enable mmaping) */ +/* FastIO on standard files */ struct fastbuf *bfdopen_internal(int fd, const char *name, uns buflen); struct fastbuf *bopen(const char *name, uns mode, uns buflen); @@ -113,6 +113,7 @@ void bfilesync(struct fastbuf *b); #define TEMP_FILE_NAME_LEN 256 void temp_file_name(char *name); +void bfix_tmp_file(struct fastbuf *fb, const char *name); /* Internal functions of some file back-ends */