X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=sources%2FFortuneParse.c;h=2312167b82bb28bd9db943b71d13a64432a57175;hp=24dabd1a51c2cbd0e873a8612b264cbb30d475e9;hb=d451ac30382ae398b9a2242a4f82b3438affc8a7;hpb=7463fc5258c5afb139286c2509f5161bc0d76290 diff --git a/sources/FortuneParse.c b/sources/FortuneParse.c index 24dabd1..2312167 100644 --- a/sources/FortuneParse.c +++ b/sources/FortuneParse.c @@ -28,20 +28,18 @@ * Read n fortunes from fortune file file, and put it into the * string array fortune * - * $Id: FortuneParse.c,v 1.2 2002/08/18 14:38:04 piccardi Exp $ - * ****************************************************************/ /* * Include needed headers */ -#include /* predefined types */ -#include /* */ -#include /* include unix standard library */ -#include /* include standard I/O library */ -#include /* standard library */ -#include /* ANSI C standard string */ -#include /* error definitions */ -#include /* */ +#include /* primitive system data types */ +#include /* file characteristics constants and functions */ +#include /* unix standard library */ +#include /* standard I/O library */ +#include /* C standard library */ +#include /* C strings library */ +#include /* error definitions and routines */ +#include /* file control functions */ #include "macros.h" @@ -59,7 +57,8 @@ int FortuneParse(char *file, char **fortune, int n) */ fortunefile = fopen(file,"r"); if (fortunefile == NULL) { /* on open error exit */ - perror("Opening fortune file"); + printf("On file %s\n", file); + perror("Cannot open file"); exit(-1); } i = 0;