X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fread-file.c;h=3bf9b846326e1cdb9f9268c4bec810d47131ad34;hb=38a06045a37da92e99e9c75e2cfc298312fd00ed;hp=ba3f172575fccc2b3070625a66639ac9d44a110c;hpb=5c84fa529cdf9f76cdc538d9a2113a6bb05afc40;p=gnulib.git diff --git a/lib/read-file.c b/lib/read-file.c index ba3f17257..3bf9b8463 100644 --- a/lib/read-file.c +++ b/lib/read-file.c @@ -1,5 +1,5 @@ /* read-file.c -- read file contents into a string - Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. Written by Simon Josefsson and Bruno Haible. This program is free software; you can redistribute it and/or modify @@ -41,7 +41,7 @@ *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; @@ -136,7 +136,7 @@ fread_file (FILE * stream, size_t * length) } 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; @@ -170,7 +170,7 @@ internal_read_file (const char *filename, size_t * length, const char *mode) 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"); } @@ -183,7 +183,7 @@ read_file (const char *filename, size_t * length) 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"); }