mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@4447 1feff8c3-07ed-0310-ac33-dd36852eb9cd
35 lines
595 B
C
35 lines
595 B
C
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <IPhreeqc.h>
|
|
|
|
int main(void)
|
|
{
|
|
int id, i;
|
|
|
|
id = CreateIPhreeqc();
|
|
if (id < 0) {
|
|
return EXIT_FAILURE;
|
|
}
|
|
|
|
if (LoadDatabase(id, "phreeqc.dat") != 0) {
|
|
OutputErrorString(id);
|
|
return EXIT_FAILURE;
|
|
}
|
|
|
|
if (RunFile(id, "ex2") != 0) {
|
|
OutputErrorString(id);
|
|
return EXIT_FAILURE;
|
|
}
|
|
|
|
for (i=0; i < GetComponentCount(id); ++i) {
|
|
printf("comp %d = %s\n", i, GetComponent(id, i));
|
|
}
|
|
|
|
if (DestroyIPhreeqc(id) != IPQ_OK) {
|
|
OutputErrorString(id);
|
|
return EXIT_FAILURE;
|
|
}
|
|
|
|
return EXIT_SUCCESS;
|
|
}
|