Skip to content. | Skip to navigation

Personal tools

remote/ini.h

remote/ini.h

remote/ini.h

/////////////////////////////////////////////////////////////////////////////
// INI.H
//
//  Last updated: 05/12/2002
//
//  Part of the source code for the remote M3 Program
//
//  Contains routines for reading and editing REMM3.INI
/////////////////////////////////////////////////////////////////////////////

char INIText[200][80]; // This is a buffer that holds all text in M3.INI

/////////////////////////////////////////////////////////////////////////////
// ScanFloat - Reads a float from M3.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

/////////////////////////////////////////////////////////////////////////////
// ScanInt - Read an int from M3.INI
int ScanInt(int *data,FILE* f);
// This procedure reads an integer from a line in the M3.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 an 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

/////////////////////////////////////////////////////////////////////////////
// ScanHex - Read a hex int from M3.INI
int ScanHex(int *data,FILE* f);
// This procedure reads an integer from a line in the M3.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 an int.
// Example of a valid set of lines:
//
//
//              ;Always obey the speed limit. (48 is hex for 75)
//              Speed limit in the desert = 48
//
// 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 M3.INI
int ScanChar(char *data,FILE* f);
// This procedure reads a character from a line in the M3.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 M3.INI) to initialize global variables */
// Returns a 0 on success, >0 on failure



Generated by GNU Enscript 1.6.5.2.
Document Actions