Changeset 2540


Ignore:
Timestamp:
2001-06-13T11:59:40+12:00 (23 years ago)
Author:
jrm21
Message:

we now print out the system error message if the first pass cannot create the
index file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/packages/mg/src/text/text.pass1.c

    r439 r2540  
    3838#include "hash.h"
    3939#include "local_strings.h"
    40 
     40/* for more meaningful messages - jrm21 (gsdl) */
     41#ifdef HAVE_STRERROR
     42#include <string.h>
     43#include <errno.h>
     44#endif
    4145
    4246/*
    4347   $Log$
     48   Revision 1.2  2001/06/12 23:59:40  jrm21
     49   we now print out the system error message if the first pass cannot create the
     50   index file.
     51
    4452   Revision 1.1  1999/08/10 21:18:25  sjboddie
    4553   renamed mg-1.3d directory mg
     
    406414  if (!(fp = create_file (file_name, TEXT_STATS_DICT_SUFFIX, "wb",
    407415              MAGIC_STATS_DICT, MG_MESSAGE)))  /* [RPAP - Feb 97: WIN32 Port] */
    408     return COMPERROR;
     416    {
     417#ifdef HAVE_STRERROR
     418      fprintf(stderr,"Couldn't create file %s:%s\n",
     419          file_name,
     420          strerror(errno)
     421          );
     422#endif
     423      return COMPERROR;
     424    }
    409425
    410426  temp_str = msg_prefix;
Note: See TracChangeset for help on using the changeset viewer.