1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
|
/*-----------------------------------------------------------------------
File : cio_initio.c
Author: Stephan Schulz (schulz@eprover.org)
Contents
Trivial initialization code.
Copyright 2005 by the author.
This code is released under the GNU General Public Licence and
the GNU Lesser General Public License.
See the file COPYING in the main E directory for details..
Run "eprover -h" for contact information.
Changes
<1> Thu Mar 17 11:27:30 UYT 2005
New
-----------------------------------------------------------------------*/
#include "cio_initio.h"
/*---------------------------------------------------------------------*/
/* Global Variables */
/*---------------------------------------------------------------------*/
char* TPTP_dir = NULL;
/*---------------------------------------------------------------------*/
/* Forward Declarations */
/*---------------------------------------------------------------------*/
/*---------------------------------------------------------------------*/
/* Internal Functions */
/*---------------------------------------------------------------------*/
/*---------------------------------------------------------------------*/
/* Exported Functions */
/*---------------------------------------------------------------------*/
/*-----------------------------------------------------------------------
//
// Function: InitIO()
//
// Initialize I/O. Bundles a number of other initializations in one
// call.
//
// Global Variables: TPTP_dir
//
// Side Effects : -
//
/----------------------------------------------------------------------*/
void InitIO(char* progname)
{
char* tmp;
InitOutput();
InitError(progname);
tmp = getenv("TPTP");
if(tmp)
{
DStr_p tmpstr = DStrAlloc();
DStrAppendStr(tmpstr, tmp);
if(DStrLen(tmpstr) && DStrLastChar(tmpstr)!='/')
{
DStrAppendChar(tmpstr, '/');
}
TPTP_dir = DStrCopy(tmpstr);
DStrFree(tmpstr);
}
}
/*-----------------------------------------------------------------------
//
// Function: ExitIO()
//
// Clear up (variables)
//
// Global Variables: TPTP_dir
//
// Side Effects : -
//
/----------------------------------------------------------------------*/
void ExitIO(void)
{
if(TPTP_dir)
{
FREE(TPTP_dir);
TPTP_dir = NULL;
}
}
/*---------------------------------------------------------------------*/
/* End of File */
/*---------------------------------------------------------------------*/
|