From: Bruno Haible Date: Tue, 15 Jun 2021 11:07:51 +0000 (+0200) Subject: xfreopen: Improve module description. X-Git-Tag: v1.0~2810 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=8275fa2ec57ea275ca35b003866d62f817650961;p=gnulib.git xfreopen: Improve module description. * modules/xfreopen (Description): Improve. * lib/xfreopen.h: Add comments. Make includable from C++. * lib/xfreopen.c: Update comment. --- diff --git a/ChangeLog b/ChangeLog index 4e8242adea..fc91284430 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2021-06-15 Bruno Haible + + 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 idx: new printf/scanf length modifier macro diff --git a/lib/xfreopen.c b/lib/xfreopen.c index dd60f13f86..b9e3883508 100644 --- a/lib/xfreopen.c +++ b/lib/xfreopen.c @@ -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 diff --git a/lib/xfreopen.h b/lib/xfreopen.h index 945b9b913f..adfb9b9a51 100644 --- a/lib/xfreopen.h +++ b/lib/xfreopen.h @@ -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 @@ -15,4 +16,14 @@ #include +#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 diff --git a/modules/xfreopen b/modules/xfreopen index dfd3d9ef57..b71efde111 100644 --- a/modules/xfreopen +++ b/modules/xfreopen @@ -1,5 +1,5 @@ Description: -a wrapper for freopen +Open a file, reusing a given stream, with error checking. Files: lib/xfreopen.c