]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/fb-temp.c
Merge branch 'master' into dev-sizet
[libucw.git] / ucw / fb-temp.c
index 05fb655b3f65934afa6a1d40c59ad75e6992d20b..3ffa08c3fec99644ba1efac9cc5283e17093e99d 100644 (file)
@@ -8,8 +8,8 @@
  *     of the GNU Lesser General Public License.
  */
 
  *     of the GNU Lesser General Public License.
  */
 
-#include "ucw/lib.h"
-#include "ucw/fastbuf.h"
+#include <ucw/lib.h>
+#include <ucw/fastbuf.h>
 
 #include <stdio.h>
 #include <fcntl.h>
 
 #include <stdio.h>
 #include <fcntl.h>
@@ -25,7 +25,7 @@ bopen_tmp_file(struct fb_params *params)
 }
 
 struct fastbuf *
 }
 
 struct fastbuf *
-bopen_tmp(uns buflen)
+bopen_tmp(uint buflen)
 {
   return bopen_tmp_file(&(struct fb_params){ .type = FB_STD, .buffer_size = buflen });
 }
 {
   return bopen_tmp_file(&(struct fb_params){ .type = FB_STD, .buffer_size = buflen });
 }
@@ -35,13 +35,13 @@ void bfix_tmp_file(struct fastbuf *fb, const char *name)
   int was_temp = bconfig(fb, BCONFIG_IS_TEMP_FILE, 0);
   ASSERT(was_temp == 1);
   if (rename(fb->name, name))
   int was_temp = bconfig(fb, BCONFIG_IS_TEMP_FILE, 0);
   ASSERT(was_temp == 1);
   if (rename(fb->name, name))
-    die("Cannot rename %s to %s: %m", fb->name, name);
+    bthrow(fb, "tmp", "Cannot rename %s to %s: %m", fb->name, name);
   bclose(fb);
 }
 
 #ifdef TEST
 
   bclose(fb);
 }
 
 #ifdef TEST
 
-#include "ucw/getopt.h"
+#include <ucw/getopt.h>
 
 int main(int argc, char **argv)
 {
 
 int main(int argc, char **argv)
 {