]> mj.ucw.cz Git - libucw.git/blobdiff - lib/fastbuf.h
Implemented bfix_tmp_file(), which turns a temporary file fastbuf
[libucw.git] / lib / fastbuf.h
index 0de3484a2d374450a211b69df6637d2d1e874d47..9878beeb1593580664f27b5be370e8b088bba60c 100644 (file)
@@ -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 */