]> Savannah Git Hosting - gnulib.git/commitdiff
xfreopen: Improve module description.
authorBruno Haible <bruno@clisp.org>
Tue, 15 Jun 2021 11:07:51 +0000 (13:07 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 15 Jun 2021 11:07:51 +0000 (13:07 +0200)
* modules/xfreopen (Description): Improve.
* lib/xfreopen.h: Add comments. Make includable from C++.
* lib/xfreopen.c: Update comment.

ChangeLog
lib/xfreopen.c
lib/xfreopen.h
modules/xfreopen

index 4e8242adeabf10ef18ddc4df97ad901a05e1d1fa..fc91284430dd70f4fc8753d69220dbd08a693bcb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-06-15  Bruno Haible  <bruno@clisp.org>
+
+       xfreopen: Improve module description.
+       * modules/xfreopen (Description): Improve.
+       * lib/xfreopen.h: Add comments. Make includable from C++.
+       * lib/xfreopen.c: Update comment.
+
 2021-06-14  Paul Eggert  <eggert@cs.ucla.edu>
 
        idx: new printf/scanf length modifier macro
index dd60f13f86d48b3e0c290458cc0192d8952575ff..b9e388350822b40daf7dff7bba75a5579c3f9935 100644 (file)
@@ -1,4 +1,4 @@
-/* a wrapper for freopen
+/* Open a file, reusing a given stream, with error checking.
    Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index 945b9b913f5a52ceaddd023466d22daa263187c4..adfb9b9a5148416466ba5544a232e4066412df33 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 2009-2021 Free Software Foundation, Inc.
+/* Open a file, reusing a given stream, with error checking.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published
 
 #include <stdio.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Opens the file FILENAME with mode MODE, reusing the given stream FP.
+   Upon failure, emits an error message and exits the program.  */
 void xfreopen (char const *filename, char const *mode, FILE *fp);
+
+#ifdef __cplusplus
+}
+#endif
index dfd3d9ef57d31951262a9b11820d498b0046a17b..b71efde111949997f2b49cc7c7c264317b2654f0 100644 (file)
@@ -1,5 +1,5 @@
 Description:
-a wrapper for freopen
+Open a file, reusing a given stream, with error checking.
 
 Files:
 lib/xfreopen.c