FORM 4.3
minos.c File Reference
#include "form3.h"
#include "minos.h"

Go to the source code of this file.

Macros

#define CFD(y, s, type, x, j)
 
#define CTD(y, s, type, x, j)
 

Functions

int minosread (FILE *f, char *buffer, MLONG size)
 
int minoswrite (FILE *f, char *buffer, MLONG size)
 
char * str_dup (char *str)
 
void convertblock (INDEXBLOCK *in, INDEXBLOCK *out, int mode)
 
void convertnamesblock (NAMESBLOCK *in, NAMESBLOCK *out, int mode)
 
void convertiniinfo (INIINFO *in, INIINFO *out, int mode)
 
FILE * LocateBase (char **name, char **newname)
 
int ReadIndex (DBASE *d)
 
int WriteIndexBlock (DBASE *d, MLONG num)
 
int WriteNamesBlock (DBASE *d, MLONG num)
 
int WriteIndex (DBASE *d)
 
int WriteIniInfo (DBASE *d)
 
int ReadIniInfo (DBASE *d)
 
DBASEGetDbase (char *filename)
 
DBASENewDbase (char *name, MLONG number)
 
void FreeTableBase (DBASE *d)
 
int ComposeTableNames (DBASE *d)
 
DBASEOpenDbase (char *filename)
 
MLONG AddTableName (DBASE *d, char *name, TABLES T)
 
MLONG GetTableName (DBASE *d, char *name)
 
int PutTableNames (DBASE *d)
 
int AddToIndex (DBASE *d, MLONG number)
 
MLONG AddObject (DBASE *d, MLONG tablenumber, char *arguments, char *rhs)
 
MLONG FindTableNumber (DBASE *d, char *name)
 
int WriteObject (DBASE *d, MLONG tablenumber, char *arguments, char *rhs, MLONG number)
 
char * ReadObject (DBASE *d, MLONG tablenumber, char *arguments)
 
char * ReadijObject (DBASE *d, MLONG i, MLONG j, char *arguments)
 
int ExistsObject (DBASE *d, MLONG tablenumber, char *arguments)
 
int DeleteObject (DBASE *d, MLONG tablenumber, char *arguments)
 

Variables

int withoutflush = 0
 

Detailed Description

These are the low level functions for the database part of the tablebases. These routines have been copied (and then adapted) from the minos database program. This file goes together with minos.h

Definition in file minos.c.

Macro Definition Documentation

◆ CFD

#define CFD ( y,
s,
type,
x,
j )
Value:
for(x=0,j=0;j<((int)sizeof(type));j++) \
x=(x<<8)+((*s++)&0x00FF); y=x;

Definition at line 55 of file minos.c.

◆ CTD

#define CTD ( y,
s,
type,
x,
j )
Value:
x=y;for(j=sizeof(type)-1;j>=0;j--){s[j]=x&0xFF; \
x>>=8;} s += sizeof(type);

Definition at line 57 of file minos.c.

Function Documentation

◆ minosread()

int minosread ( FILE * f,
char * buffer,
MLONG size )

Definition at line 66 of file minos.c.

◆ minoswrite()

int minoswrite ( FILE * f,
char * buffer,
MLONG size )

Definition at line 83 of file minos.c.

◆ str_dup()

char * str_dup ( char * str)

Definition at line 101 of file minos.c.

◆ convertblock()

void convertblock ( INDEXBLOCK * in,
INDEXBLOCK * out,
int mode )

Definition at line 120 of file minos.c.

◆ convertnamesblock()

void convertnamesblock ( NAMESBLOCK * in,
NAMESBLOCK * out,
int mode )

Definition at line 171 of file minos.c.

◆ convertiniinfo()

void convertiniinfo ( INIINFO * in,
INIINFO * out,
int mode )

Definition at line 197 of file minos.c.

◆ LocateBase()

FILE * LocateBase ( char ** name,
char ** newname )

Definition at line 225 of file minos.c.

◆ ReadIndex()

int ReadIndex ( DBASE * d)

Definition at line 287 of file minos.c.

◆ WriteIndexBlock()

int WriteIndexBlock ( DBASE * d,
MLONG num )

Definition at line 400 of file minos.c.

◆ WriteNamesBlock()

int WriteNamesBlock ( DBASE * d,
MLONG num )

Definition at line 421 of file minos.c.

◆ WriteIndex()

int WriteIndex ( DBASE * d)

Definition at line 444 of file minos.c.

◆ WriteIniInfo()

int WriteIniInfo ( DBASE * d)

Definition at line 507 of file minos.c.

◆ ReadIniInfo()

int ReadIniInfo ( DBASE * d)

Definition at line 524 of file minos.c.

◆ GetDbase()

DBASE * GetDbase ( char * filename)

Definition at line 547 of file minos.c.

◆ NewDbase()

DBASE * NewDbase ( char * name,
MLONG number )

Definition at line 591 of file minos.c.

◆ FreeTableBase()

void FreeTableBase ( DBASE * d)

Definition at line 725 of file minos.c.

◆ ComposeTableNames()

int ComposeTableNames ( DBASE * d)

Definition at line 757 of file minos.c.

◆ OpenDbase()

DBASE * OpenDbase ( char * filename)

Definition at line 806 of file minos.c.

◆ AddTableName()

MLONG AddTableName ( DBASE * d,
char * name,
TABLES T )

Definition at line 840 of file minos.c.

◆ GetTableName()

MLONG GetTableName ( DBASE * d,
char * name )

Definition at line 923 of file minos.c.

◆ PutTableNames()

int PutTableNames ( DBASE * d)

Definition at line 955 of file minos.c.

◆ AddToIndex()

int AddToIndex ( DBASE * d,
MLONG number )

Definition at line 1051 of file minos.c.

◆ AddObject()

MLONG AddObject ( DBASE * d,
MLONG tablenumber,
char * arguments,
char * rhs )

Definition at line 1138 of file minos.c.

◆ FindTableNumber()

MLONG FindTableNumber ( DBASE * d,
char * name )

Definition at line 1152 of file minos.c.

◆ WriteObject()

int WriteObject ( DBASE * d,
MLONG tablenumber,
char * arguments,
char * rhs,
MLONG number )

Definition at line 1180 of file minos.c.

◆ ReadObject()

char * ReadObject ( DBASE * d,
MLONG tablenumber,
char * arguments )

Definition at line 1271 of file minos.c.

◆ ReadijObject()

char * ReadijObject ( DBASE * d,
MLONG i,
MLONG j,
char * arguments )

Definition at line 1352 of file minos.c.

◆ ExistsObject()

int ExistsObject ( DBASE * d,
MLONG tablenumber,
char * arguments )

Definition at line 1404 of file minos.c.

◆ DeleteObject()

int DeleteObject ( DBASE * d,
MLONG tablenumber,
char * arguments )

Definition at line 1436 of file minos.c.

Variable Documentation

◆ withoutflush

int withoutflush = 0

Definition at line 45 of file minos.c.