FORM v5.0.1-23-g7a8f756
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 WriteNamesBlock (DBASE *d, MLONG num)
 
int WriteIndex (DBASE *d)
 
int WriteIniInfo (DBASE *d)
 
int ReadIniInfo (DBASE *d)
 
DBASEGetDbase (char *filename, MLONG rwmode)
 
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,
 
)
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,
 
)
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 399 of file minos.c.

◆ WriteNamesBlock()

int WriteNamesBlock ( DBASE d,
MLONG  num 
)

Definition at line 420 of file minos.c.

◆ WriteIndex()

int WriteIndex ( DBASE d)

Definition at line 443 of file minos.c.

◆ WriteIniInfo()

int WriteIniInfo ( DBASE d)

Definition at line 506 of file minos.c.

◆ ReadIniInfo()

int ReadIniInfo ( DBASE d)

Definition at line 523 of file minos.c.

◆ GetDbase()

DBASE * GetDbase ( char *  filename,
MLONG  rwmode 
)

Definition at line 546 of file minos.c.

◆ NewDbase()

DBASE * NewDbase ( char *  name,
MLONG  number 
)

Definition at line 602 of file minos.c.

◆ FreeTableBase()

void FreeTableBase ( DBASE d)

Definition at line 741 of file minos.c.

◆ ComposeTableNames()

int ComposeTableNames ( DBASE d)

Definition at line 773 of file minos.c.

◆ OpenDbase()

DBASE * OpenDbase ( char *  filename)

Definition at line 822 of file minos.c.

◆ AddTableName()

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

Definition at line 856 of file minos.c.

◆ GetTableName()

MLONG GetTableName ( DBASE d,
char *  name 
)

Definition at line 939 of file minos.c.

◆ PutTableNames()

int PutTableNames ( DBASE d)

Definition at line 971 of file minos.c.

◆ AddToIndex()

int AddToIndex ( DBASE d,
MLONG  number 
)

Definition at line 1067 of file minos.c.

◆ AddObject()

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

Definition at line 1154 of file minos.c.

◆ FindTableNumber()

MLONG FindTableNumber ( DBASE d,
char *  name 
)

Definition at line 1168 of file minos.c.

◆ WriteObject()

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

Definition at line 1196 of file minos.c.

◆ ReadObject()

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

Definition at line 1296 of file minos.c.

◆ ReadijObject()

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

Definition at line 1377 of file minos.c.

◆ ExistsObject()

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

Definition at line 1429 of file minos.c.

◆ DeleteObject()

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

Definition at line 1461 of file minos.c.

Variable Documentation

◆ withoutflush

int withoutflush = 0

Definition at line 45 of file minos.c.