mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 16:44:49 +01:00
Added isopen_handler
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5662 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
9fe532eaaf
commit
9201846ce1
43
PHRQ_io.cpp
43
PHRQ_io.cpp
@ -475,6 +475,49 @@ open_handler(const int type, const char *file_name)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
bool PHRQ_io::
|
||||
isopen_handler(const int type)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case OUTPUT_ERROR:
|
||||
return (error_file != NULL);
|
||||
break;
|
||||
case OUTPUT_WARNING:
|
||||
return (error_file != NULL || output_file != NULL);
|
||||
break;
|
||||
case OUTPUT_MESSAGE:
|
||||
return (output_file != NULL);
|
||||
break;
|
||||
case OUTPUT_PUNCH:
|
||||
return (punch_file != NULL);
|
||||
break;
|
||||
case OUTPUT_SCREEN:
|
||||
return (error_file != NULL);
|
||||
break;
|
||||
case OUTPUT_LOG:
|
||||
return (log_file != NULL);
|
||||
break;
|
||||
case OUTPUT_DUMP:
|
||||
return (dump_file != NULL);
|
||||
break;
|
||||
case OUTPUT_STDERR:
|
||||
return (stderr != NULL);
|
||||
break;
|
||||
case OUTPUT_CHECKLINE:
|
||||
case OUTPUT_GUI_ERROR:
|
||||
case OUTPUT_BASIC:
|
||||
case OUTPUT_CVODE:
|
||||
case OUTPUT_SEND_MESSAGE:
|
||||
case OUTPUT_ECHO:
|
||||
case OUTPUT_PUNCH_END_ROW:
|
||||
return (output_file != NULL);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/* ---------------------------------------------------------------------- */
|
||||
int PHRQ_io::
|
||||
fileop_handler(const int type, int (*PFN) (FILE *))
|
||||
|
||||
@ -42,7 +42,7 @@ typedef enum
|
||||
|
||||
int phreeqc_handler(const int action, const int type, const char *err_str, const bool stop, const char *, va_list args);
|
||||
int open_handler(const int type, const char *file_name);
|
||||
|
||||
bool isopen_handler(const int type);
|
||||
int fileop_handler(const int type, int (*PFN) (FILE *));
|
||||
int output_handler(const int type, const char *err_str,
|
||||
const bool stop, const char *format,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user