Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

initool.cc File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "emc.hh"
#include "inifile.h"
#include "initool.hh"
#include "emcglb.h"

Include dependency graph for initool.cc:

Include dependency graph

Go to the source code of this file.

Functions

int loadTool ()
int iniTool (const char *filename)
int emcToolSetToolTableFile (const char *filename)

Variables

INIFILE * toolInifile = 0


Function Documentation

int emcToolSetToolTableFile const char *    filename
 

Definition at line 89 of file initool.cc.

Referenced by loadTool().

00090 {
00091   strcpy(TOOL_TABLE_FILE, filename);
00092 
00093   return 0;
00094 }

int iniTool const char *    filename
 

Definition at line 63 of file initool.cc.

00064 {
00065   int retval = 0;
00066 
00067   toolInifile = new INIFILE;
00068 
00069   if (-1 == toolInifile->open(filename))
00070     {
00071       return -1;
00072     }
00073 
00074   // load tool values
00075   if (0 != loadTool())
00076     {
00077       retval = -1;
00078     }
00079 
00080   // close the inifile
00081   toolInifile->close();
00082   delete toolInifile;
00083 
00084   return retval;
00085 }

int loadTool   [static]
 

Definition at line 40 of file initool.cc.

Referenced by iniTool().

00041 {
00042   int retval = 0;
00043   const char *inistring;
00044 
00045   if (NULL != (inistring = toolInifile->find("TOOL_TABLE", "EMCIO")))
00046     {
00047       if (0 != emcToolSetToolTableFile(inistring))
00048         {
00049           rcs_print("bad return value from emcToolSetToolTableFile\n");
00050           retval = -1;
00051         }
00052     }
00053   // else ignore omission
00054 
00055   return retval;
00056 }


Variable Documentation

INIFILE* toolInifile = 0 [static]
 

Definition at line 26 of file initool.cc.


Generated on Sun Dec 2 15:28:06 2001 for EMC by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001