Update errormanager

Make error_handle_t "private".  Update headers.
This commit is contained in:
Michael Tryby
2019-04-02 17:01:35 -04:00
parent ea5d2894b1
commit 0e30d57d4e
2 changed files with 31 additions and 23 deletions

View File

@@ -1,14 +1,15 @@
//----------------------------------------------------------------------------- /*
// ******************************************************************************
// errormanager.c Project: OWA EPANET
// Version: 2.2
// Purpose: Provides a simple interface for managing runtime error messages. Module: util/errormanager.c
// Description: Provides a simple interface for managing files
// Date: 08/25/2017 Authors: see AUTHORS
// Copyright: see AUTHORS
// Author: Michael E. Tryby License: see LICENSE
// US EPA - ORD/NRMRL Last Updated: 04/02/2019
//----------------------------------------------------------------------------- ******************************************************************************
*/
//#ifdef _WIN32 //#ifdef _WIN32
//#define _CRTDBG_MAP_ALLOC //#define _CRTDBG_MAP_ALLOC
@@ -22,6 +23,12 @@
#include "errormanager.h" #include "errormanager.h"
typedef struct error_s {
int error_status;
void (*p_msg_lookup)(int, char*, int);
} error_handle_t;
error_handle_t *create_error_manager(void (*p_error_message)(int, char*, int)) error_handle_t *create_error_manager(void (*p_error_message)(int, char*, int))
// //
// Purpose: Constructs a new error handle. // Purpose: Constructs a new error handle.

View File

@@ -1,11 +1,15 @@
/* /*
* errormanager.h ******************************************************************************
* Project: OWA EPANET
* Created on: Aug 25, 2017 Version: 2.2
* Module: util/errormanager.h
* Author: Michael E. Tryby Description: Provides a simple interface for managing files
* US EPA - ORD/NRMRL Authors: see AUTHORS
*/ Copyright: see AUTHORS
License: see LICENSE
Last Updated: 04/02/2019
******************************************************************************
*/
#ifndef ERRORMANAGER_H_ #ifndef ERRORMANAGER_H_
#define ERRORMANAGER_H_ #define ERRORMANAGER_H_
@@ -17,11 +21,8 @@
extern "C" { extern "C" {
#endif #endif
// Forward declaration
typedef struct error_s { typedef struct error_s error_handle_t;
int error_status;
void (*p_msg_lookup)(int, char*, int);
} error_handle_t;
error_handle_t* create_error_manager(void (*p_error_message)(int, char*, int)); error_handle_t* create_error_manager(void (*p_error_message)(int, char*, int));
void delete_error_manager(error_handle_t* error_handle); void delete_error_manager(error_handle_t* error_handle);