Skip to content. | Skip to navigation

Personal tools

ini.h

ini.h

ini.h

/////////////////////////////////////////////////////////////////////////////
// INI.H
//
//  Last updated: 5/21/1998
//
//  Part of the source code for the Vane End Actuator Control System
//
//  Contains routines for reading and editing VANE.INI
/////////////////////////////////////////////////////////////////////////////

char VaneText[500][100]; // This is a buffer that holds all text in VANE.INI
int UseEditedINI = 0; 	// This flag is set to 1 if an edited VANE.INI is in use

/////////////////////////////////////////////////////////////////////////////
// ScanFloat: Reads a float from VANE.INI
int ScanFloat(float *data,FILE* f);
// This procedure reads a floating point value from a line in the VANE.INI
// file. Lines that begin with a ";" are ignored as a comment.
// Characters on regular lines are ignored until an "=" is found, and all
// later characters on the line are read into a float.
// Example of a valid set of lines:
//
//
//              ;Meteors are very interesting!
//              Bacteria per meteor ratio = 34.7
//
// Pass it the file being read in "f", and a pointer to the variable that
// will be set with the read value in "*data".
// Returns a 0 on success, 1 on failure

/////////////////////////////////////////////////////////////////////////////
// ScanLong: Read a long int from VANE.INI
int ScanInt(int *data,FILE* f);
// This procedure reads a long integer from a line in the VANE.INI
// file. Lines that begin with a ";" are ignored as a comment.
// Characters on regular lines are ignored until an "=" is found, and all
// later characters on the line are read into a long int.
// Example of a valid set of lines:
//
//
//              ;Always obey the speed limit.
//              Speed limit in the desert = 75
//
// Pass it the file being read in "f", and a pointer to the variable that
// will be set with the read value in "*data".
// Returns a 0 on success, 1 on failure

/////////////////////////////////////////////////////////////////////////////
// ScanChar: Read a single character form VANE.INI
int ScanChar(char *data,FILE* f);
// This procedure reads a character from a line in the VANE.INI
// file. Lines that begin with a ";" are ignored as a comment.
// Characters on regular lines are ignored until an "=" is found, and the
// character between quotes is read.
// Example of a valid set of lines:
//
//
//              ;What grade did you get
//              Grade = "F"
//
// Pass it the file being read in "f", and a pointer to the variable that
// will be set with the read value in "*data".
// Returns a 0 on success, 1 on failure

/////////////////////////////////////////////////////////////////////////////
// ReadINI: Loads an INI file
int ReadINI(char filename[12]);
// Reads the file filename (typically VANE.INI) to initialize global variables */
// Returns a 0 on success, 1 on failure

/////////////////////////////////////////////////////////////////////////////
// UpdateEditDisplay: Update the VANE.INI editing screen
void UpdateEditDisplay(int top,int y,int VaneCount);

/////////////////////////////////////////////////////////////////////////////
// EditINILine: Edit a line in VANE.INI
void EditINILine(int y);

/////////////////////////////////////////////////////////////////////////////
// EditVane: Edit VANE.INI on the fly
void EditVane();

/////////////////////////////////////////////////////////////////////////////
// WriteZero: Write current encoders as zero point to VANE.INI
void WriteZero();

/////////////////////////////////////////////////////////////////////////////
// WriteTension: Write a new tension value to VANE.INI
void WriteTension(int Dist);
// The value in Dist is written on the VANE.INI line "TensionAmount = "


Generated by GNU Enscript 1.6.5.2.
Document Actions