Logo Search packages:      
Sourcecode: maxdb-7.5.00 version File versions  Download package

ven06.c File Reference


Detailed Description

Client RunTime: Virtual File for Applications (old version for Pascal Tools).

Author:
JoergM
See also:

Definition in file ven06.c.

#include "gen00.h"
#include "heo00.h"
#include "heo46.h"
#include "geo57.h"
#include "geo001.h"
#include "hen40.h"

Go to the source code of this file.

Classes

struct  HOSTFILE_ALL
struct  VEN06_BUFFER
struct  VEN06_BUFTAB
struct  VEN06_FILE_CNT
struct  VEN06_FREE_TABLE

Defines

#define CR   '\r'
#define EOF_TRACKING
#define ERRTEXT(v, t)   { eo46CtoP(v,t,MAXERRORTEXT);}
#define FIFOFILE   2
#define HFS_END   3
#define HFS_ERROR   4
#define HFS_UNUSED   1
#define HFS_USED   2
#define HOSTFILE_MAX   8
#define HOSTFILE_MIN   1
#define HT   '\t'
#define IN_USE   1
#define KB08   8192
#define KB32   32768
#define KB64   65536
#define MAGIC_REC_LEN   8
#define MAX_BLOCK_COUNT   16
#define MAXBUFFERLENGTH   sizeof(tsp00_Page)
#define MAXIGN   32
#define MAXSEP   32
#define MB2   2000000000
#define MF__   MOD__"sqlfinit"
#define MOD__   "ven06.c:"
#define NEWLINE_LEN   1
#define NL   '\n'
#define NL   '\n'
#define NO_BSS_BUFFERS   2
#define NOT_IN_USE   0
#define NUL   '\0'
#define OLD_VEN06_LOCKFILE(hf, len)   (sql06_fcntl ( hf , len ))
#define REGFILE   1
#define SL_TIME   1
#define SPECFILE   0
#define SQL_DB_DEVSPACE   "SQL-DB DEVSPACE"
#define std_err   "STDERR"
#define std_in   "STDIN"
#define std_in_fn   "STDIN.cmd"
#define std_out   "STDOUT"
#define stderr_int   2
#define stdin_int   0
#define stdout_int   1
#define TABW   8
#define VEN06_CLOSEFILE(fd)   (close( fd ) == UNDEF)
#define VEN06_CREATFILE(name, hf)
#define VEN06_FILEDELETE(name)   (unlink( name ) == UNDEF)
#define VEN06_FILESIZE(buf)   (buf).st_size
#define VEN06_ISPIPEFIFO(buf)   (((buf). st_mode & S_IFMT) == S_IFIFO)
#define VEN06_ISREGFILE(buf)   (((buf). st_mode & S_IFMT) == S_IFREG)
#define VEN06_ISSPECIAL(buf)
#define VEN06_LOCKFILE(hf, len)   0
#define VEN06_OPENCREAT(name, hf)
#define VEN06_OPENRDWR(name, hf)
#define VEN06_OPENREAD(name, hf)
#define VEN06_OPENWRITE(name, hf)
#define VEN06_READFILE(fd, buf, cnt, actual, eof)
#define VEN06_SEEKABS(fd, pos, newpos)
#define VEN06_SEEKEND(fd, pos, newpos)
#define VEN06_STAT(path, buf)   (stat( (path), (buf) ) < 0)
#define VEN06_WRITEFILE(fd, buf, cnt, actual)

Typedefs

typedef tsp00_Page * BUFFERADDRESS
typedef struct HOSTFILE_ALL * HF_PTR
typedef struct HOSTFILE_ALL HOSTFILE_ALL_TYPE
typedef UINT1 HOSTFILE_STATE
typedef struct stat VEN06_FILEDATA

Functions

static void clear_hf_buf (struct HOSTFILE_ALL *hf)
static void clear_hf_buf ()
static void e06_get_xk_buffer (hf, block, tsp00_Int4 *length, error, errtext)
static void e06_get_xk_buffer ()
static void e06_getbuffer (struct HOSTFILE_ALL *hf, tsp00_VfReturn *error, tsp00_ErrText errtext)
static void e06_getbuffer ()
static void e06_pbuf_and_fill_up (struct HOSTFILE_ALL *hf, tsp00_VfReturn *error, tsp00_ErrText errtext)
static void e06_pbuf_and_fill_up ()
static void e06_posbuffer (hf, offset, whence, file_pos, error, errtext)
static void e06_posbuffer ()
static void e06_put_xk_buffer (struct HOSTFILE_ALL *hf, block, tsp00_VfReturn *error, tsp00_ErrText errtext)
static void e06_put_xk_buffer ()
static void e06_putbuffer (struct HOSTFILE_ALL *hf, tsp00_VfReturn *error, tsp00_ErrText errtext)
static void e06_putbuffer ()
static void e06_read_asc_var (hf, block, length, error, errtext)
static void e06_read_asc_var ()
static void e06_read_bin_fix (hf, block, tsp00_Int4 *length, error, errtext)
static void e06_read_bin_fix ()
static void e06_read_bin_var (hf, block, length, error, errtext)
static void e06_read_bin_var ()
static int e06_valid_fileno (hf)
static int e06_valid_fileno ()
static void e06_write_asc_var (struct HOSTFILE_ALL *hf, tsp_vf_bufaddr block, tsp00_Int4 length, tsp00_VfReturn *error, tsp00_ErrText errtext)
static void e06_write_asc_var ()
static void e06_write_bin_fix (struct HOSTFILE_ALL *hf, tsp_vf_bufaddr block, tsp00_Int4 length, tsp00_VfReturn *error, tsp00_ErrText errtext)
static void e06_write_bin_fix ()
static void e06_write_bin_var (struct HOSTFILE_ALL *hf, tsp_vf_bufaddr block, tsp00_Int4 length, tsp00_VfReturn *error, tsp00_ErrText errtext)
static void e06_write_bin_var ()
void en06_fseek (hf_num, rec_no, error, errtext, allowtext)
void exit ()
unsigned sleep ()
static void sql06_append_open (temp_name, hf, format, rec_len, error, errtext)
static void sql06_append_open ()
static int sql06_blocked_file (VF_FILENAMEC temp_name, UINT1 format, tsp00_Int4 rec_len)
static int sql06_blocked_file ()
static void sql06_close_buffer_pool_control (struct HOSTFILE_ALL *hf, block_cnt, block_beg_ptr, error, errtext)
static void sql06_close_buffer_pool_control ()
int sql06_fcntl (hf, len)
static void sql06_init_one (hf, first)
static void sql06_init_one ()
static void sql06_open_buffer_pool_control (struct HOSTFILE_ALL *hf, block_cnt, tsp00_VfReturn *error, tsp00_ErrText errtext)
static void sql06_open_buffer_pool_control ()
static void sql06_open_stdio (temp_name, hf, format, rec_len, error, errtext)
static void sql06_open_stdio ()
static void sql06_overwrite_open (temp_name, hf, format, rec_len, error, errtext)
static void sql06_overwrite_open ()
static int sql06_pread1 (fd, packet, pktlgt, eof)
static int sql06_pread1 ()
static void sql06_read_open (temp_name, hf, format, error, errtext)
static void sql06_read_open ()
static void sql06_write_open (temp_name, struct HOSTFILE_ALL *hf, format, rec_len, error, errtext)
static void sql06_write_open ()
static SIGNALFUNCTYPE sql06c_catch_sigpipe ()
static int sql06c_reset_signal ()
static int sql06c_set_signal ()
void sql48_change_log ()
char * sql48_strloc ()
char * sqlerrs ()
global void sqlfclose (UINT4 *hf_num, erase, poolptr, buf_cnt, block, tsp00_VfReturn *error, tsp00_ErrText errtext)
global void sqlfclose ()
global void sqlfclose_next_tape (UINT4 *hf_num, erase, poolptr, buf_cnt, block, tsp00_VfReturn *error, tsp00_VfReturn *nxt_tape_error, tsp00_ErrText errtext)
void sqlferase (pascal_name, error, errtext)
global void sqlferase ()
global void sqlfinit (buf_pool_size, poolptr, ok)
global void sqlfinit ()
global void sqlfopen (p1, direction, resource, hf_num, format, rec_len, poolptr, buf_cnt, block, error, errtext)
global void sqlfopen ()
global void sqlfread (hf_num, block, length, error, errtext)
global void sqlfread ()
void sqlfseek (hf_num, rec_no, error, errtext)
global void sqlfseek ()
void sqlftell (hf_num, resultpos, error, errtext)
void sqlftextseek (hf_num, rec_no, error, errtext)
global void sqlfwrite (hf_num, block, length, error, tsp00_ErrText errtext)
global void sqlfwrite ()
static void vf_get_desc (hf, format, error, errtext)
static void vf_get_desc ()
static void vf_put_desc (struct HOSTFILE_ALL *hf, tsp00_VfReturn *error, tsp00_ErrText errtext)
static void vf_put_desc ()
static void vfsearch (hostfilename, hf_num, resource, buf_cnt, block, error, errtext)
static void vfsearch ()
static void vfstatus (hf, error, errtext)
static void vfstatus ()

Variables

static char AUTOLOADER_NOT_SUPPORTED [] = "Autoloader is not supported"
static char BAD_FILENO_ERRTEXT [] = "Invalid file number"
static char BLANK_ERRTEXT [] = " "
static char BUF_NOT_ALLOC [] = "No memory for buffer"
static tsp00_Int2 buf_pool_block_cnt
static UINT1 * buf_pool_first_block
static VEN06_BUFFER buffers
static VEN06_BUFTAB buftable [HOSTFILE_MAX]
static char CLOSE_ERRTEXT [] = "Close ERROR "
static char CREATE_ERRTEXT [] = "Create ERROR"
static char FILE_ALREADY_IN_USE [] = "This file is already in use"
static VEN06_FILE_CNT file_cnt
static char FILE_EXIST [] = "File already exists"
static struct flock file_lock
static char FILE_NOT_FOUND_ERRTEXT [] = "File not found"
static char FN_EXPAND_ERRTEXT [] = "Error in expanding file name"
static VEN06_FREE_TABLE free_table [MAX_BLOCK_COUNT]
static int hf_second = FALSE
static char ILL_APPEND_DEVICE []
static char ILL_DIREC_ERRTEXT [] = "Illegal direction"
static char ILL_FILE_DESC_ERRTEXT [] = "Illegal UNIX-file description"
static char ILL_FILE_SPEC_ERRTEXT [] = "Illegal file specification"
static char ILL_HOST_FILE_NAME [] = "Illegal host file name"
static char ILL_REC_LEN_ERRTEXT [] = "Illegal record length"
static char ILL_REC_NO_ERRTEXT [] = "Illegal record number"
static char ILL_WRITE_FORMAT_COMB [] = "Illegal write/format combination"
static char MAX_REC_ERRTEXT []
static char MIN_REC_ERRTEXT []
static char NO_FREE_FILE_DESCRIPTOR [] = "No free file descriptor found"
static char NO_MORE_FILES_ALLOWED [] = "No more file descriptor allowed"
static char NO_MORE_SPACE_IN_BUF_POOL [] = "No more space within buf pool"
static char NO_REG_FILE [] = "No regular file"
static char NO_WRITE_PROTEC_ERRTEXT [] = "Cannot get write protection"
static char NOSEEK_EOF_ERRTEXT [] = "No seeking beyond file end"
static char NOSEEK_ERRTEXT []
static char NULL_BYTE_FILE_ERRTEXT [] = "File not found ( 0 bytes )"
static SIGNALFUNCTYPE(* oldsigpipe )()
static char OPEN_ERRTEXT [] = "Open ERROR"
static char READ_PERM_DEN_ERRTEXT [] = "Reading ERROR"
static struct HOSTFILE_ALL real_files [HOSTFILE_MAX]
static char SEEK_ERRTEXT [] = "Seeking ERROR"
int sql06c_last_fifo
static char STDIO_IN_ERRTEXT []
static char STDIO_OUT_ERRTEXT []
static char UNLINK_ERRTEXT [] = "Unlink ERROR"
static char WRITE_PERM_DEN_ERRTEXT [] = "Writing ERROR"


Generated by  Doxygen 1.6.0   Back to index