]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/write_entry.c
ncurses 6.2 - patch 20210626
[ncurses.git] / ncurses / tinfo / write_entry.c
index 1949f0702110549e99161e1a8305157c79d62f23..763ddd72d82e468a41e7556c589e4d1e586f43a1 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *
+ * Copyright 2018-2020,2021 Thomas E. Dickey                                *
+ * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -50,7 +51,7 @@
 #define TRACE_NUM(n)           /* nothing */
 #endif
 
 #define TRACE_NUM(n)           /* nothing */
 #endif
 
-MODULE_ID("$Id: write_entry.c,v 1.114 2019/06/29 23:07:18 tom Exp $")
+MODULE_ID("$Id: write_entry.c,v 1.117 2021/06/26 20:43:19 tom Exp $")
 
 static int total_written;
 static int total_parts;
 
 static int total_written;
 static int total_parts;
@@ -70,7 +71,7 @@ write_file(char *filename, TERMTYPE2 *tp)
        _nc_warning("entry is larger than %u bytes", limit);
     } else {
        FILE *fp = ((_nc_access(filename, W_OK) == 0)
        _nc_warning("entry is larger than %u bytes", limit);
     } else {
        FILE *fp = ((_nc_access(filename, W_OK) == 0)
-                   ? fopen(filename, BIN_W)
+                   ? safe_fopen(filename, BIN_W)
                    : 0);
        size_t actual;
 
                    : 0);
        size_t actual;
 
@@ -191,7 +192,7 @@ make_db_root(const char *path)
 
        if ((rc = stat(path, &statbuf)) < 0) {
            rc = mkdir(path
 
        if ((rc = stat(path, &statbuf)) < 0) {
            rc = mkdir(path
-#if !defined(_WIN32)
+#ifndef _NC_WINDOWS
                       ,0777
 #endif
                );
                       ,0777
 #endif
                );