April 10, 2004

FreeBSD 4.9

MGrDbArray(3) i386/PRM


NAME

MGmDbArray - ( macro ) Assigns an array to a database for easy access.

MGrDbArray - ( routine ) Assigns an array to a database for easy access.


LIBRARY

mojave green software co's general utilities library libMG.so.0 ( -lMG )


SYNOPSIS

#include    <MGrDbArray.h>

void    MGmDbArray(
        MGsDb,      /* {db area name} */
        char*,      /* {db file name string} */,
        char* );    /* {db open file mode} */ 
       

DESCRIPTION


RETURN VALUES

None, void routine type.

Upon successful return the following values will be set:

  1. {dbName}.array: the array to be used for accessing the data base.

  2. {dbname}.buffer: address of the buffer containing the data base after it was read into memory

  3. {dbName}.eof: set to byte size of the data base.

  4. {dbName}.fieldQty: set to quanity of fields per record.

  5. {dbName}.recordQty: set to the number of records in the data base


FILES

MGrDbArray sources
Makefile html
MGrDbArray.c html .c
MGrDbArray.h html .h

EXAMPLES

/* To initialize a db area */

MGsDb           portI;  

MGmDbArray( portI, "/var/db/portI.db", "r" );   

/* to access a db record in "portI" */
portI.array[record_idx][field_idx]
        
/* set  each field in record 0 to it's field name */
       

DIAGNOSTICS


COMPATIBILITY


ERRORS


SEE ALSO


STANDARDS


HISTORY


AUTHORS

Mojave Green Software Co.
Landers Ca
Michael C. Shultz
copyright(c) March 2004
all rights reserved
       

BUGS