Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added two pass-through functions for ENopen and ENclose #12

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/solver/include/epanetmsx.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
** LAST UPDATE: 11/01/10
*******************************************************************************/

#include "epanet2.h" // EPANET toolkit header file

#ifndef EPANETMSX_H
#define EPANETMSX_H

Expand Down Expand Up @@ -53,6 +55,8 @@ extern "C" {

// --- declare MSX functions

int MSXDLLEXPORT MSXENopen(const char *inpFile, const char *rptFile,
const char *outFile);
int MSXDLLEXPORT MSXopen(char *fname);
int MSXDLLEXPORT MSXsolveH(void);
int MSXDLLEXPORT MSXusehydfile(char *fname);
Expand All @@ -63,6 +67,7 @@ int MSXDLLEXPORT MSXsaveoutfile(char *fname);
int MSXDLLEXPORT MSXsavemsxfile(char *fname);
int MSXDLLEXPORT MSXreport(void);
int MSXDLLEXPORT MSXclose(void);
int MSXDLLEXPORT MSXENclose(void);

int MSXDLLEXPORT MSXgetindex(int type, char *id, int *index);
int MSXDLLEXPORT MSXgetIDlen(int type, int index, int *len);
Expand Down
32 changes: 32 additions & 0 deletions src/solver/msxtoolkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,38 @@ int MSXfile_save(FILE *f);

//=============================================================================

int MSXDLLEXPORT MSXENopen(const char *inpFile, const char *rptFile, const char *outFile)
/*
** Purpose:
** pass-thru to open the EPANET toolkit system
**
** Input:
** inpFile = name of the EPANET input file
** rptFile = name of the EPANET report file
** outFile = name of the EPANET binary file
**
** Returns:
** an error code (or 0 for no error);
*/
{
int err = 0;
err = ENopen(inpFile, rptFile, outFile);
return err;
}

int MSXDLLEXPORT MSXENclose(void)
/*
** Purpose:
** pass-thru to open the EPANET toolkit system
**
*/
{
int err = 0;
err = ENclose();
return err;
}


int MSXDLLEXPORT MSXopen(char *fname)
/*
** Purpose:
Expand Down
Loading