FORM v5.0.2-2-gfb12f2e
Macros | Functions | Variables
minos.c File Reference
#include "form3.h"
#include "minos.h"
Include dependency graph for minos.c:

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, char *iomode)
 
int ReadIndex (DBASE *d)
 
int WriteIndexBlock (DBASE *d, MLONG num)
 
int FlushDirtyIndexBlocks (DBASE *d)
 
int WriteNamesBlock (DBASE *d, MLONG num)
 
int WriteIndex (DBASE *d)
 
int WriteIniInfo (DBASE *d)
 
int ReadIniInfo (DBASE *d)
 
DBASE * GetDbase (char *filename, MLONG rwmode)
 
DBASE * NewDbase (char *name, MLONG number)
 
void FreeTableBase (DBASE *d)
 
int ComposeTableNames (DBASE *d)
 
DBASE * OpenDbase (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,
char *  iomode 
)

Definition at line 225 of file minos.c.

◆ ReadIndex()

int ReadIndex ( DBASE *  d)

Definition at line 288 of file minos.c.

◆ WriteIndexBlock()

int WriteIndexBlock ( DBASE *  d,
MLONG  num 
)

Definition at line 409 of file minos.c.

◆ FlushDirtyIndexBlocks()

int FlushDirtyIndexBlocks ( DBASE *  d)

Definition at line 436 of file minos.c.

◆ WriteNamesBlock()

int WriteNamesBlock ( DBASE *  d,
MLONG  num 
)

Definition at line 452 of file minos.c.

◆ WriteIndex()

int WriteIndex ( DBASE *  d)

Definition at line 479 of file minos.c.

◆ WriteIniInfo()

int WriteIniInfo ( DBASE *  d)

Definition at line 550 of file minos.c.

◆ ReadIniInfo()

int ReadIniInfo ( DBASE *  d)

Definition at line 569 of file minos.c.

◆ GetDbase()

DBASE * GetDbase ( char *  filename,
MLONG  rwmode 
)

Definition at line 596 of file minos.c.

◆ NewDbase()

DBASE * NewDbase ( char *  name,
MLONG  number 
)

Definition at line 652 of file minos.c.

◆ FreeTableBase()

void FreeTableBase ( DBASE *  d)

Definition at line 799 of file minos.c.

◆ ComposeTableNames()

int ComposeTableNames ( DBASE *  d)

Definition at line 831 of file minos.c.

◆ OpenDbase()

DBASE * OpenDbase ( char *  filename)

Definition at line 880 of file minos.c.

◆ AddTableName()

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

Definition at line 914 of file minos.c.

◆ GetTableName()

MLONG GetTableName ( DBASE *  d,
char *  name 
)

Definition at line 997 of file minos.c.

◆ PutTableNames()

int PutTableNames ( DBASE *  d)

Definition at line 1029 of file minos.c.

◆ AddToIndex()

int AddToIndex ( DBASE *  d,
MLONG  number 
)

Definition at line 1127 of file minos.c.

◆ AddObject()

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

Definition at line 1223 of file minos.c.

◆ FindTableNumber()

MLONG FindTableNumber ( DBASE *  d,
char *  name 
)

Definition at line 1237 of file minos.c.

◆ WriteObject()

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

Definition at line 1265 of file minos.c.

◆ ReadObject()

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

Definition at line 1370 of file minos.c.

◆ ReadijObject()

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

Definition at line 1455 of file minos.c.

◆ ExistsObject()

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

Definition at line 1511 of file minos.c.

◆ DeleteObject()

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

Definition at line 1543 of file minos.c.

Variable Documentation

◆ withoutflush

int withoutflush = 0

Definition at line 45 of file minos.c.