/* read-file.c -- read file contents into a string
- Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
Written by Simon Josefsson and Bruno Haible.
This program is free software; you can redistribute it and/or modify
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
*LENGTH. On errors, *LENGTH is undefined, errno preserves the
values set by system functions (if any), and NULL is returned. */
char *
-fread_file (FILE * stream, size_t * length)
+fread_file (FILE *stream, size_t *length)
{
char *buf = NULL;
size_t alloc = BUFSIZ;
}
static char *
-internal_read_file (const char *filename, size_t * length, const char *mode)
+internal_read_file (const char *filename, size_t *length, const char *mode)
{
FILE *stream = fopen (filename, mode);
char *out;
undefined, errno preserves the values set by system functions (if
any), and NULL is returned. */
char *
-read_file (const char *filename, size_t * length)
+read_file (const char *filename, size_t *length)
{
return internal_read_file (filename, length, "r");
}
preserves the values set by system functions (if any), and NULL is
returned. */
char *
-read_binary_file (const char *filename, size_t * length)
+read_binary_file (const char *filename, size_t *length)
{
return internal_read_file (filename, length, "rb");
}