Added error handling for failed config-file open.

This patch adds error handling to the code that opens the
configuration file.  When you specify an argument to the flood
program, it attempts to open it to read in configuration
information.  Previously, there was no error handling, so
the code proceeded to use an invalid file handle when the
file open fails.  The code now detects the failure and displays
an error message.

The standard error and output file-opens were moved earlier
in the program in case we need to display error messages
to standard error.

On Windows, using the invalid file handle results in an
access violation.  The program now displays a message like
  Error opening configuration file: The system cannot find
  the file specified.  .

Submitted by: Phi-Long Tran <>
Reviewed by: Justin Erenkrantz (minor formatting tweak)

git-svn-id: 13f79535-47bb-0310-9956-ffa450edef68
2 files changed