summaryrefslogtreecommitdiff
path: root/readfile.c
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-25 19:29:15 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-25 19:29:15 +0000
commit9ba02b5d7b34eba8356dfcb83694698dbc550073 (patch)
tree9df4cb951aa1ca966fc79a550d73bbc2637f65f5 /readfile.c
parent6dcad3b7ba5983633e4303c22446c3de8922c003 (diff)
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_903_specialxf86-4_3_99_902xf86-4_3_99_901xf86-4_3_99_16xf86-012804-2330
Diffstat (limited to 'readfile.c')
-rw-r--r--readfile.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/readfile.c b/readfile.c
index f8683be..77016d2 100644
--- a/readfile.c
+++ b/readfile.c
@@ -28,20 +28,21 @@ other dealings in this Software without prior written authorization
from the X Consortium.
*/
-/* $XFree86: xc/programs/xmessage/readfile.c,v 1.2 2000/02/14 19:21:04 dawes Exp $ */
+/* $XFree86: xc/programs/xmessage/readfile.c,v 1.3 2003/04/14 23:03:13 herrb Exp $ */
#include <X11/Xos.h> /* for types.h */
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
+#include "readfile.h"
+
/*
* get_data_from_file - read data from a file into a single buffer; meant
* for small files containing messages.
*/
-static char *get_data_from_file (filename, len_return)
- char *filename;
- int *len_return;
+static char *
+get_data_from_file (char *filename, int *len_return)
{
FILE *fp;
struct stat statbuf;
@@ -83,8 +84,8 @@ static char *get_data_from_file (filename, len_return)
/*
* get_data_from_stdin - read data from stdin into a single buffer.
*/
-static char *get_data_from_stdin (len_return)
- int *len_return;
+static char *
+get_data_from_stdin (int *len_return)
{
char *cp;
int count;
@@ -122,9 +123,8 @@ static char *get_data_from_stdin (len_return)
* read_file - read data from indicated file and return pointer to malloced
* buffer. Returns NULL on error or if no such file.
*/
-char *read_file (filename, len)
- char *filename;
- int *len; /* returned */
+char *
+read_file (char *filename, int *len /* returned */)
{
if (filename[0] == '-' && filename[1] == '\0') {
return (get_data_from_stdin (len));