GnuCOBOL
2.0
A free COBOL compiler
|
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "libcob.h"
#include "coblocal.h"
Go to the source code of this file.
Data Structures | |
struct | file_list |
struct | cobitem |
struct | sort_mem_struct |
struct | queue_struct |
struct | file_struct |
struct | cobsort |
Macros | |
#define | _LFS64_LARGEFILE 1 |
#define | _LFS64_STDIO 1 |
#define | _FILE_OFFSET_BITS 64 |
#define | _LARGEFILE64_SOURCE 1 |
#define | fdcobsync fsync |
#define | O_BINARY 0 |
#define | COB_LIB_EXPIMP |
#define | COB_MAYSWAP_16(x) (COB_BSWAP_16((unsigned short)(x))) |
#define | COB_MAYSWAP_32(x) (COB_BSWAP_32((unsigned int)(x))) |
#define | COBSORTEND 1 |
#define | COBSORTABORT 2 |
#define | COBSORTFILEERR 3 |
#define | COBSORTNOTOPEN 4 |
#define | NUM_PREFIX sizeof(prefix) / sizeof(char *) |
Functions | |
static int | dummy_delete (cob_file *) |
static int | dummy_rnxt_rewrite (cob_file *, const int) |
static int | dummy_read (cob_file *, cob_field *, const int) |
static int | dummy_start (cob_file *, const int, cob_field *) |
static int | cob_file_open (cob_file *, char *, const int, const int) |
static int | cob_file_close (cob_file *, const int) |
static int | cob_file_write_opt (cob_file *, const int) |
static int | sequential_read (cob_file *, const int) |
static int | sequential_write (cob_file *, const int) |
static int | sequential_rewrite (cob_file *, const int) |
static int | lineseq_read (cob_file *, const int) |
static int | lineseq_write (cob_file *, const int) |
static int | relative_start (cob_file *, const int, cob_field *) |
static int | relative_read (cob_file *, cob_field *, const int) |
static int | relative_read_next (cob_file *, const int) |
static int | relative_write (cob_file *, const int) |
static int | relative_rewrite (cob_file *, const int) |
static int | relative_delete (cob_file *) |
static int | indexed_open (cob_file *, char *, const int, const int) |
static int | indexed_close (cob_file *, const int) |
static int | indexed_start (cob_file *, const int, cob_field *) |
static int | indexed_read (cob_file *, cob_field *, const int) |
static int | indexed_read_next (cob_file *, const int) |
static int | indexed_write (cob_file *, const int) |
static int | indexed_delete (cob_file *) |
static int | indexed_rewrite (cob_file *, const int) |
static char * | cob_chk_file_env (const char *src) |
static void | cob_chk_file_mapping (void) |
static void | cob_sync (cob_file *f) |
static void | cob_cache_file (cob_file *f) |
static void | save_status (cob_file *f, cob_field *fnstatus, const int status) |
static size_t | file_linage_check (cob_file *f) |
static int | cob_linage_write_opt (cob_file *f, const int opt) |
static unsigned int | cob_seq_write_opt (cob_file *f, const int opt) |
static int | cob_fd_file_open (cob_file *f, char *filename, const int mode, const int sharing) |
static void | indexed_file_delete (cob_file *f, const char *filename) |
static void | cob_file_unlock (cob_file *f) |
void | cob_unlock_file (cob_file *f, cob_field *fnstatus) |
void | cob_open (cob_file *f, const int mode, const int sharing, cob_field *fnstatus) |
void | cob_close (cob_file *f, cob_field *fnstatus, const int opt, const int remfil) |
void | cob_start (cob_file *f, const int cond, cob_field *key, cob_field *keysize, cob_field *fnstatus) |
void | cob_read (cob_file *f, cob_field *key, cob_field *fnstatus, const int read_opts) |
void | cob_read_next (cob_file *f, cob_field *fnstatus, const int read_opts) |
void | cob_write (cob_file *f, cob_field *rec, const int opt, cob_field *fnstatus, const unsigned int check_eop) |
void | cob_rewrite (cob_file *f, cob_field *rec, const int opt, cob_field *fnstatus) |
void | cob_delete (cob_file *f, cob_field *fnstatus) |
void | cob_commit (void) |
void | cob_rollback (void) |
void | cob_delete_file (cob_file *f, cob_field *fnstatus) |
static void * | cob_str_from_fld (const cob_field *f) |
static int | open_cbl_file (unsigned char *file_name, unsigned char *file_access, unsigned char *file_handle, const int file_flags) |
int | cob_sys_open_file (unsigned char *file_name, unsigned char *file_access, unsigned char *file_lock, unsigned char *file_dev, unsigned char *file_handle) |
int | cob_sys_create_file (unsigned char *file_name, unsigned char *file_access, unsigned char *file_lock, unsigned char *file_dev, unsigned char *file_handle) |
int | cob_sys_read_file (unsigned char *file_handle, unsigned char *file_offset, unsigned char *file_len, unsigned char *flags, unsigned char *buf) |
int | cob_sys_write_file (unsigned char *file_handle, unsigned char *file_offset, unsigned char *file_len, unsigned char *flags, unsigned char *buf) |
int | cob_sys_close_file (unsigned char *file_handle) |
int | cob_sys_flush_file (unsigned char *file_handle) |
int | cob_sys_delete_file (unsigned char *file_name) |
int | cob_sys_copy_file (unsigned char *fname1, unsigned char *fname2) |
int | cob_sys_check_file_exist (unsigned char *file_name, unsigned char *file_info) |
int | cob_sys_rename_file (unsigned char *fname1, unsigned char *fname2) |
int | cob_sys_get_current_dir (const int flags, const int dir_length, unsigned char *dir) |
int | cob_sys_create_dir (unsigned char *dir) |
int | cob_sys_change_dir (unsigned char *dir) |
int | cob_sys_delete_dir (unsigned char *dir) |
int | cob_sys_mkdir (unsigned char *dir) |
int | cob_sys_chdir (unsigned char *dir, unsigned char *status) |
int | cob_sys_copyfile (unsigned char *fname1, unsigned char *fname2, unsigned char *file_type) |
int | cob_sys_file_info (unsigned char *file_name, unsigned char *file_info) |
int | cob_sys_file_delete (unsigned char *file_name, unsigned char *file_type) |
static int | sort_cmps (const unsigned char *s1, const unsigned char *s2, const size_t size, const unsigned char *col) |
static COB_INLINE void | unique_copy (unsigned char *s1, const unsigned char *s2) |
static int | cob_file_sort_compare (struct cobitem *k1, struct cobitem *k2, void *pointer) |
static void | cob_free_list (struct cobsort *hp) |
static struct cobitem * | cob_new_item (struct cobsort *hp, const size_t size) |
static FILE * | cob_srttmpfile (void) |
static int | cob_get_sort_tempfile (struct cobsort *hp, const int n) |
static int | cob_sort_queues (struct cobsort *hp) |
static int | cob_read_item (struct cobsort *hp, const int n) |
static int | cob_write_block (struct cobsort *hp, const int n) |
static void | cob_copy_check (cob_file *to, cob_file *from) |
static int | cob_file_sort_process (struct cobsort *hp) |
static int | cob_file_sort_submit (cob_file *f, const unsigned char *p) |
static int | cob_file_sort_retrieve (cob_file *f, unsigned char *p) |
void | cob_file_sort_using (cob_file *sort_file, cob_file *data_file) |
void | cob_file_sort_giving (cob_file *sort_file, const size_t varcnt,...) |
void | cob_file_sort_init (cob_file *f, const unsigned int nkeys, const unsigned char *collating_sequence, void *sort_return, cob_field *fnstatus) |
void | cob_file_sort_init_key (cob_file *f, cob_field *field, const int flag, const unsigned int offset) |
void | cob_file_sort_close (cob_file *f) |
void | cob_file_release (cob_file *f) |
void | cob_file_return (cob_file *f) |
void | cob_exit_fileio (void) |
void | cob_init_fileio (cob_global *lptr, cob_settings *sptr) |
Variables | |
static cob_global * | cobglobptr |
static cob_settings * | cobsetptr |
static unsigned int | eop_status |
static unsigned int | check_eop_status |
static size_t | cob_vsq_len |
static struct file_list * | file_cache |
static char * | file_open_env |
static char * | file_open_name |
static char * | file_open_buff |
static char * | runtime_buffer |
static const int | status_exception [] |
static const char *const | prefix [] = { "DD_", "dd_", "" } |
static const struct cob_fileio_funcs | indexed_funcs |
static const struct cob_fileio_funcs | sequential_funcs |
static const struct cob_fileio_funcs | lineseq_funcs |
static const struct cob_fileio_funcs | relative_funcs |
static const struct cob_fileio_funcs * | fileio_funcs [COB_ORG_MAX] |
#define COB_MAYSWAP_16 | ( | x | ) | (COB_BSWAP_16((unsigned short)(x))) |
Definition at line 164 of file fileio.c.
Referenced by sequential_read(), and sequential_write().
#define COB_MAYSWAP_32 | ( | x | ) | (COB_BSWAP_32((unsigned int)(x))) |
Definition at line 165 of file fileio.c.
Referenced by sequential_read(), and sequential_write().
#define COBSORTABORT 2 |
Definition at line 171 of file fileio.c.
Referenced by cob_file_sort_process(), and cob_file_sort_submit().
#define COBSORTEND 1 |
Definition at line 170 of file fileio.c.
Referenced by cob_file_return(), cob_file_sort_giving(), and cob_file_sort_retrieve().
#define COBSORTFILEERR 3 |
Definition at line 172 of file fileio.c.
Referenced by cob_file_sort_process(), cob_file_sort_retrieve(), and cob_file_sort_submit().
#define COBSORTNOTOPEN 4 |
Definition at line 173 of file fileio.c.
Referenced by cob_file_sort_retrieve(), and cob_file_sort_submit().
#define fdcobsync fsync |
Definition at line 86 of file fileio.c.
Referenced by cob_file_close(), cob_file_unlock(), and cob_sync().
Definition at line 263 of file fileio.c.
Referenced by cob_chk_file_env().
#define O_BINARY 0 |
Definition at line 90 of file fileio.c.
Referenced by cob_fd_file_open(), cob_srttmpfile(), cob_sys_copy_file(), isbuild(), islogopen(), isopen(), ivbopen(), and open_cbl_file().
|
static |
Definition at line 652 of file fileio.c.
References cob_malloc(), file_list::file, file_cache, and file_list::next.
Referenced by cob_open().
|
static |
Definition at line 468 of file fileio.c.
References __cob_settings::cob_env_mangle, COB_FILE_MAX, cob_free(), cob_strdup(), file_open_env, NULL, NUM_PREFIX, prefix, and unlikely.
Referenced by cob_chk_file_mapping().
|
static |
Definition at line 504 of file fileio.c.
References cob_chk_file_env(), COB_FILE_MAX, __cob_settings::cob_file_path, cob_free(), COB_MODULE_PTR, cob_strdup(), file_open_buff, file_open_name, likely, NULL, SLASH_CHAR, SLASH_STR, and unlikely.
Referenced by cob_delete_file(), cob_fd_file_open(), cob_file_open(), and indexed_open().
Definition at line 4498 of file fileio.c.
References cob_fileio_funcs::close, COB_CLOSE_LOCK, COB_FILE_SPECIAL, cob_free(), COB_LOCK_OPEN_EXCLUSIVE, COB_OPEN_CLOSED, COB_OPEN_LOCKED, COB_STATUS_00_SUCCESS, COB_STATUS_42_NOT_OPEN, cob_file::fd, file_list::file, cob_file::file, file_cache, cob_file::flag_nonexistent, cob_file::flag_operation, cob_file::flag_read_done, cob_file::lock_mode, file_list::next, NULL, cob_file::open_mode, cob_file::organization, save_status(), and unlikely.
Referenced by cob_exit_fileio(), cob_file_sort_giving(), cob_file_sort_using(), cobxref_(), GCic_(), get__reserved__lists_(), and LISTING_().
void cob_commit | ( | void | ) |
Definition at line 4851 of file fileio.c.
References cob_file_unlock(), file_list::file, and file_list::next.
Definition at line 5849 of file fileio.c.
References cob_field::data, cob_file::record, cob_field::size, and unlikely.
Referenced by cob_file_sort_giving(), and cob_file_sort_using().
Definition at line 4829 of file fileio.c.
References cob_file::access_mode, COB_ACCESS_SEQUENTIAL, COB_OPEN_I_O, COB_STATUS_43_READ_NOT_DONE, COB_STATUS_49_I_O_DENIED, cob_fileio_funcs::fdelete, cob_file::flag_read_done, cob_file::open_mode, cob_file::organization, save_status(), and unlikely.
Definition at line 4875 of file fileio.c.
References cob_file::assign, cob_chk_file_mapping(), cob_field_to_string(), COB_FILE_MAX, COB_FILE_STDIN, COB_FILE_STDOUT, COB_OPEN_CLOSED, COB_OPEN_LOCKED, COB_ORG_INDEXED, COB_ORG_SORT, COB_STATUS_00_SUCCESS, COB_STATUS_30_PERMANENT_ERROR, COB_STATUS_38_CLOSED_WITH_LOCK, COB_STATUS_41_ALREADY_OPEN, COB_STATUS_91_NOT_AVAILABLE, file_open_name, indexed_file_delete(), cob_file::open_mode, cob_file::organization, save_status(), and unlikely.
void cob_exit_fileio | ( | void | ) |
Definition at line 6282 of file fileio.c.
References _, cob_file::assign, cob_close(), COB_CLOSE_NORMAL, __cob_settings::cob_display_warn, cob_field_to_string(), COB_FILE_MAX, COB_FILE_SPECIAL, cob_free(), COB_OPEN_CLOSED, COB_OPEN_LOCKED, file_list::file, cob_file::flag_nonexistent, iscleanup(), file_list::next, NULL, cob_file::open_mode, runtime_buffer, and cob_file::select_name.
Referenced by cob_terminate_routines().
|
static |
Definition at line 860 of file fileio.c.
References cob_chk_file_mapping(), COB_FILE_MODE, COB_OPEN_EXTEND, COB_OPEN_I_O, COB_OPEN_INPUT, COB_OPEN_OUTPUT, COB_ORG_RELATIVE, COB_STATUS_05_SUCCESS_OPTIONAL, COB_STATUS_30_PERMANENT_ERROR, COB_STATUS_35_NOT_EXISTS, COB_STATUS_37_PERMISSION_DENIED, COB_STATUS_61_FILE_SHARING, COB_UNUSED, F_OK, cob_file::fd, cob_file::flag_begin_of_file, cob_file::flag_end_of_file, cob_file::flag_nonexistent, cob_file::flag_optional, O_BINARY, cob_file::open_mode, and cob_file::organization.
Referenced by cob_file_open().
|
static |
Definition at line 1184 of file fileio.c.
References COB_CLOSE_LOCK, COB_CLOSE_NO_REWIND, COB_CLOSE_NORMAL, COB_OPEN_CLOSED, COB_OPEN_INPUT, COB_ORG_LINE_SEQUENTIAL, COB_SELECT_LINAGE, COB_STATUS_00_SUCCESS, COB_STATUS_07_SUCCESS_NO_UNIT, cob_file::fd, fdcobsync, cob_file::file, cob_file::flag_needs_nl, cob_file::flag_select_features, cob_file::open_mode, and cob_file::organization.
|
static |
Definition at line 998 of file fileio.c.
References cob_chk_file_mapping(), cob_fatal_error(), cob_fd_file_open(), COB_FERROR_CODEGEN, COB_NOT_CONFIGURED, COB_OPEN_EXTEND, COB_OPEN_I_O, COB_OPEN_INPUT, COB_OPEN_OUTPUT, COB_ORG_LINE_SEQUENTIAL, COB_SELECT_LINAGE, cob_set_int(), COB_STATUS_00_SUCCESS, COB_STATUS_05_SUCCESS_OPTIONAL, COB_STATUS_30_PERMANENT_ERROR, COB_STATUS_35_NOT_EXISTS, COB_STATUS_37_PERMISSION_DENIED, COB_STATUS_57_I_O_LINAGE, COB_STATUS_61_FILE_SHARING, __cob_settings::cob_unix_lf, F_OK, cob_file::fd, cob_file::file, file_linage_check(), cob_file::flag_begin_of_file, cob_file::flag_end_of_file, cob_file::flag_needs_top, cob_file::flag_nonexistent, cob_file::flag_optional, cob_file::flag_select_features, cob_linage::linage_ctr, cob_file::linorkeyptr, NULL, cob_file::open_mode, cob_file::organization, and unlikely.
void cob_file_release | ( | cob_file * | f | ) |
Definition at line 6227 of file fileio.c.
References cob_file_sort_submit(), COB_STATUS_00_SUCCESS, COB_STATUS_30_PERMANENT_ERROR, cob_field::data, cob_file::file, cobsort::fnstatus, likely, NULL, cob_file::record, save_status(), and cobsort::sort_return.
Referenced by LISTING_().
void cob_file_return | ( | cob_file * | f | ) |
Definition at line 6250 of file fileio.c.
References cob_file_sort_retrieve(), COB_STATUS_00_SUCCESS, COB_STATUS_10_END_OF_FILE, COB_STATUS_30_PERMANENT_ERROR, COBSORTEND, cob_field::data, cob_file::file, cobsort::fnstatus, likely, NULL, cob_file::record, save_status(), and cobsort::sort_return.
Referenced by LISTING_().
void cob_file_sort_close | ( | cob_file * | f | ) |
Definition at line 6201 of file fileio.c.
References cob_free(), cob_free_list(), COB_STATUS_00_SUCCESS, cobsort::file, cob_file::file, cobsort::fnstatus, file_struct::fp, cob_file::keys, likely, NULL, and save_status().
Referenced by cobxref_(), and LISTING_().
|
static |
Definition at line 5612 of file fileio.c.
References COB_ASCENDING, COB_FIELD_IS_NUMERIC, cob_numeric_cmp(), cob_field::data, f1, f2, cob_file_key::field, cob_file_key::flag, cobitem::item, cob_file::keys, cob_file::nkeys, cob_file_key::offset, cob_field::size, sort_cmps(), cob_file::sort_collating, cobitem::unique, unique_copy(), and unlikely.
Referenced by cob_file_sort_process(), cob_file_sort_retrieve(), and cob_sort_queues().
void cob_file_sort_giving | ( | cob_file * | sort_file, |
const size_t | varcnt, | ||
... | |||
) |
Definition at line 6095 of file fileio.c.
References cob_close(), COB_CLOSE_NORMAL, cob_copy_check(), cob_file_sort_retrieve(), COB_FILE_SPECIAL, cob_free(), cob_malloc(), cob_open(), COB_OPEN_OUTPUT, COB_ORG_LINE_SEQUENTIAL, cob_write(), COB_WRITE_BEFORE, COB_WRITE_LINES, COBSORTEND, cob_field::data, cob_file::file, cob_file::file_status, NULL, cob_file::organization, cob_file::record, cob_file::record_max, cob_field::size, and cobsort::sort_return.
Referenced by cobxref_().
void cob_file_sort_init | ( | cob_file * | f, |
const unsigned int | nkeys, | ||
const unsigned char * | collating_sequence, | ||
void * | sort_return, | ||
cob_field * | fnstatus | ||
) |
Definition at line 6146 of file fileio.c.
References cobsort::alloc_size, cobsort::chunk_size, cob_fast_malloc(), cob_malloc(), COB_MODULE_PTR, __cob_settings::cob_sort_chunk, COB_STATUS_00_SUCCESS, cob_file::file, cobsort::fnstatus, cob_file::keys, cobsort::mem_base, sort_mem_struct::mem_ptr, cobsort::mem_size, cobsort::mem_total, sort_mem_struct::next, cob_file::nkeys, NULL, offsetof, cobsort::pointer, cobsort::r_size, cob_file::record_max, save_status(), cobsort::size, cob_file::sort_collating, cobsort::sort_return, and cobsort::w_size.
Referenced by cobxref_(), and LISTING_().
void cob_file_sort_init_key | ( | cob_file * | f, |
cob_field * | field, | ||
const int | flag, | ||
const unsigned int | offset | ||
) |
Definition at line 6191 of file fileio.c.
References cob_file_key::field, cob_file_key::flag, cob_file::keys, cob_file::nkeys, and cob_file_key::offset.
Referenced by cobxref_(), and LISTING_().
|
static |
Definition at line 5869 of file fileio.c.
References cobitem::block_byte, cob_file_sort_compare(), cob_get_sort_tempfile(), cob_read_item(), cob_sort_queues(), cob_write_block(), COBSORTABORT, COBSORTFILEERR, file_struct::count, cobsort::empty, cobitem::end_of_block, cobsort::file, cobsort::files_used, queue_struct::first, file_struct::fp, likely, cobitem::next, NULL, cobsort::pointer, cobsort::queue, cobsort::retrieval_queue, cobsort::retrieving, unlikely, and cobsort::w_size.
Referenced by cob_file_sort_retrieve().
|
static |
Definition at line 6022 of file fileio.c.
References cob_file_sort_compare(), cob_file_sort_process(), cob_read_item(), COBSORTEND, COBSORTFILEERR, COBSORTNOTOPEN, cobsort::empty, cobitem::end_of_block, cob_file::file, cobsort::files_used, queue_struct::first, cobitem::item, cobitem::next, NULL, cobsort::pointer, cobsort::queue, cobsort::retrieval_queue, cobsort::retrieving, cobsort::size, and unlikely.
Referenced by cob_file_return(), and cob_file_sort_giving().
|
static |
Definition at line 5969 of file fileio.c.
References cob_get_sort_tempfile(), cob_new_item(), cob_sort_queues(), cob_write_block(), COBSORTABORT, COBSORTFILEERR, COBSORTNOTOPEN, queue_struct::count, cobsort::destination_file, cobitem::end_of_block, cob_file::file, cobsort::files_used, queue_struct::first, cobitem::item, cobitem::next, cobsort::queue, cobsort::retrieving, cobsort::size, cobsort::switch_to_file, cobitem::unique, cobsort::unique, unique_copy(), and unlikely.
Referenced by cob_file_release(), and cob_file_sort_using().
Definition at line 6075 of file fileio.c.
References cob_close(), COB_CLOSE_NORMAL, cob_copy_check(), cob_file_sort_submit(), cob_open(), COB_OPEN_INPUT, COB_READ_NEXT, cob_read_next(), cob_field::data, cob_file::file_status, NULL, and cob_file::record.
Referenced by cobxref_().
|
static |
Definition at line 4366 of file fileio.c.
References COB_FILE_EXCLUSIVE, COB_FILE_SPECIAL, COB_OPEN_CLOSED, COB_OPEN_LOCKED, COB_ORG_INDEXED, COB_ORG_SORT, cob_file::fd, fdcobsync, cob_file::file, isrelease(), cob_file::lock_mode, NULL, cob_file::open_mode, and cob_file::organization.
Referenced by cob_commit(), cob_rollback(), and cob_unlock_file().
|
static |
Definition at line 836 of file fileio.c.
References cob_linage_write_opt(), COB_SELECT_LINAGE, COB_WRITE_LINES, COB_WRITE_MASK, COB_WRITE_PAGE, cob_file::file, cob_file::flag_select_features, and unlikely.
Referenced by cob_init_fileio(), and lineseq_write().
|
static |
Definition at line 5646 of file fileio.c.
References cob_free(), cobsort::mem_base, sort_mem_struct::mem_ptr, and sort_mem_struct::next.
Referenced by cob_file_sort_close().
|
static |
Definition at line 5730 of file fileio.c.
References _, cob_runtime_error(), cob_srttmpfile(), cob_stop_run(), file_struct::count, cobsort::file, file_struct::fp, and NULL.
Referenced by cob_file_sort_process(), and cob_file_sort_submit().
void cob_init_fileio | ( | cob_global * | lptr, |
cob_settings * | sptr | ||
) |
Definition at line 6345 of file fileio.c.
References check_eop_status, cob_fast_malloc(), COB_FILE_BUFF, cob_file_write_opt(), cob_malloc(), COB_SMALL_BUFF, __cob_settings::cob_sort_chunk, __cob_settings::cob_sort_memory, __cob_settings::cob_varseq_type, cob_vsq_len, eop_status, file_open_buff, file_open_env, file_open_name, NULL, and runtime_buffer.
Referenced by cob_init().
|
static |
Definition at line 740 of file fileio.c.
References check_eop_status, cob_add_int(), cob_get_int(), cob_set_int(), COB_STATUS_57_I_O_LINAGE, COB_WRITE_LINES, COB_WRITE_MASK, COB_WRITE_PAGE, eop_status, cob_file::file, file_linage_check(), cob_linage::lin_bot, cob_linage::lin_foot, cob_linage::lin_lines, cob_linage::lin_top, cob_linage::linage_ctr, cob_file::linorkeyptr, and unlikely.
Referenced by cob_file_write_opt().
Definition at line 5661 of file fileio.c.
References cobsort::alloc_size, cobitem::block_byte, cobsort::chunk_size, cob_fast_malloc(), __cob_settings::cob_sort_memory, COB_UNUSED, cobsort::empty, cobitem::end_of_block, cobsort::mem_base, sort_mem_struct::mem_ptr, cobsort::mem_size, cobsort::mem_total, cobsort::mem_used, cobitem::next, sort_mem_struct::next, NULL, cobsort::switch_to_file, and unlikely.
Referenced by cob_file_sort_submit().
Definition at line 4438 of file fileio.c.
References cob_file::assign, cob_cache_file(), cob_field_to_string(), COB_FILE_MAX, COB_FILE_STDIN, COB_FILE_STDOUT, COB_LOCK_OPEN_EXCLUSIVE, COB_OPEN_CLOSED, COB_OPEN_INPUT, COB_OPEN_LOCKED, COB_OPEN_OUTPUT, COB_STATUS_00_SUCCESS, COB_STATUS_30_PERMANENT_ERROR, COB_STATUS_38_CLOSED_WITH_LOCK, COB_STATUS_41_ALREADY_OPEN, cob_file::fd, cob_file::file, file_open_name, cob_file::flag_begin_of_file, cob_file::flag_end_of_file, cob_file::flag_first_read, cob_file::flag_nonexistent, cob_file::flag_operation, cob_file::flag_read_done, cob_file::last_open_mode, cob_file::lock_mode, cob_fileio_funcs::open, cob_file::open_mode, cob_file::organization, save_status(), and unlikely.
Referenced by cob_file_sort_giving(), cob_file_sort_using(), cobxref_(), GCic_(), get__reserved__lists_(), and LISTING_().
Definition at line 4633 of file fileio.c.
References COB_OPEN_I_O, COB_OPEN_INPUT, COB_READ_PREVIOUS, cob_set_int(), COB_STATUS_00_SUCCESS, COB_STATUS_02_SUCCESS_DUPLICATE, COB_STATUS_10_END_OF_FILE, COB_STATUS_23_KEY_NOT_EXISTS, COB_STATUS_46_READ_ERROR, COB_STATUS_47_INPUT_DENIED, cob_file::flag_begin_of_file, cob_file::flag_end_of_file, cob_file::flag_first_read, cob_file::flag_nonexistent, cob_file::flag_read_done, NULL, cob_file::open_mode, cob_file::organization, cob_fileio_funcs::read, cob_fileio_funcs::read_next, cob_file::record, save_status(), cob_field::size, unlikely, and cob_file::variable_record.
|
static |
Definition at line 5805 of file fileio.c.
References cobitem::end_of_block, cobsort::file, queue_struct::first, file_struct::fp, cobsort::queue, cobsort::r_size, cobitem::unique, and unlikely.
Referenced by cob_file_sort_process(), and cob_file_sort_retrieve().
Definition at line 4696 of file fileio.c.
References COB_OPEN_I_O, COB_OPEN_INPUT, COB_READ_PREVIOUS, cob_set_int(), COB_STATUS_00_SUCCESS, COB_STATUS_02_SUCCESS_DUPLICATE, COB_STATUS_10_END_OF_FILE, COB_STATUS_23_KEY_NOT_EXISTS, COB_STATUS_46_READ_ERROR, COB_STATUS_47_INPUT_DENIED, cob_file::flag_begin_of_file, cob_file::flag_end_of_file, cob_file::flag_first_read, cob_file::flag_nonexistent, cob_file::flag_read_done, cob_file::open_mode, cob_file::organization, cob_fileio_funcs::read_next, cob_file::record, save_status(), cob_field::size, unlikely, and cob_file::variable_record.
Referenced by cob_file_sort_using(), cobxref_(), GCic_(), get__reserved__lists_(), and LISTING_().
Definition at line 4793 of file fileio.c.
References cob_file::access_mode, COB_ACCESS_SEQUENTIAL, cob_get_int(), COB_OPEN_I_O, COB_ORG_SEQUENTIAL, COB_STATUS_43_READ_NOT_DONE, COB_STATUS_44_RECORD_OVERFLOW, COB_STATUS_49_I_O_DENIED, cob_file::flag_read_done, cob_file::open_mode, cob_file::organization, cob_file::record, cob_fileio_funcs::rewrite, save_status(), cob_field::size, unlikely, and cob_file::variable_record.
void cob_rollback | ( | void | ) |
Definition at line 4863 of file fileio.c.
References cob_file_unlock(), file_list::file, and file_list::next.
|
static |
Definition at line 809 of file fileio.c.
References COB_WRITE_LINES, COB_WRITE_MASK, COB_WRITE_PAGE, and cob_file::fd.
Referenced by sequential_write().
|
static |
Definition at line 5746 of file fileio.c.
References cob_file_sort_compare(), queue_struct::count, cobitem::end_of_block, queue_struct::first, queue_struct::last, cobitem::next, NULL, cobsort::pointer, and cobsort::queue.
Referenced by cob_file_sort_process(), and cob_file_sort_submit().
|
static |
Definition at line 5700 of file fileio.c.
References COB_FILE_BUFF, COB_FILE_MODE, cob_free(), cob_incr_temp_iteration(), cob_malloc(), cob_temp_name(), NULL, and O_BINARY.
Referenced by cob_get_sort_tempfile().
void cob_start | ( | cob_file * | f, |
const int | cond, | ||
cob_field * | key, | ||
cob_field * | keysize, | ||
cob_field * | fnstatus | ||
) |
Definition at line 4584 of file fileio.c.
References cob_file::access_mode, COB_ACCESS_RANDOM, cob_get_int(), COB_OPEN_I_O, COB_OPEN_INPUT, COB_STATUS_00_SUCCESS, COB_STATUS_23_KEY_NOT_EXISTS, COB_STATUS_47_INPUT_DENIED, cob_file::flag_begin_of_file, cob_file::flag_end_of_file, cob_file::flag_first_read, cob_file::flag_nonexistent, cob_file::flag_read_done, cob_file::open_mode, cob_file::organization, save_status(), cob_field::size, cob_fileio_funcs::start, and unlikely.
|
static |
Definition at line 4928 of file fileio.c.
References cob_malloc(), cob_field::data, and cob_field::size.
Referenced by cob_sys_change_dir(), cob_sys_check_file_exist(), cob_sys_copy_file(), cob_sys_create_dir(), cob_sys_delete_dir(), cob_sys_delete_file(), cob_sys_file_info(), cob_sys_rename_file(), and open_cbl_file().
|
static |
Definition at line 612 of file fileio.c.
References COB_ORG_INDEXED, COB_ORG_LINE_SEQUENTIAL, COB_ORG_SORT, cob_file::fd, fdcobsync, cob_file::file, isflush(), cob_file::nkeys, and cob_file::organization.
Referenced by save_status().
int cob_sys_change_dir | ( | unsigned char * | dir | ) |
Definition at line 5395 of file fileio.c.
References COB_CHK_PARMS, cob_free(), COB_MODULE_PTR, cob_str_from_fld(), and COB_UNUSED.
Referenced by cob_sys_chdir(), and GCic_().
int cob_sys_chdir | ( | unsigned char * | dir, |
unsigned char * | status | ||
) |
Definition at line 5453 of file fileio.c.
References COB_CHK_PARMS, COB_MODULE_PTR, cob_set_int(), cob_sys_change_dir(), and COB_UNUSED.
int cob_sys_check_file_exist | ( | unsigned char * | file_name, |
unsigned char * | file_info | ||
) |
Definition at line 5239 of file fileio.c.
References _, COB_BSWAP_16, COB_BSWAP_64, COB_CHK_PARMS, cob_free(), COB_MODULE_PTR, cob_runtime_error(), cob_s64_t, cob_stop_run(), cob_str_from_fld(), and COB_UNUSED.
Referenced by LISTING_().
int cob_sys_close_file | ( | unsigned char * | file_handle | ) |
int cob_sys_copy_file | ( | unsigned char * | fname1, |
unsigned char * | fname2 | ||
) |
Definition at line 5187 of file fileio.c.
References COB_CHK_PARMS, COB_FILE_BUFF, COB_FILE_MODE, cob_free(), COB_MODULE_PTR, cob_str_from_fld(), COB_UNUSED, file_open_buff, and O_BINARY.
Referenced by cob_sys_copyfile().
int cob_sys_copyfile | ( | unsigned char * | fname1, |
unsigned char * | fname2, | ||
unsigned char * | file_type | ||
) |
Definition at line 5470 of file fileio.c.
References __cob_global::cob_call_params, COB_CHK_PARMS, cob_sys_copy_file(), and COB_UNUSED.
int cob_sys_create_dir | ( | unsigned char * | dir | ) |
Definition at line 5369 of file fileio.c.
References COB_CHK_PARMS, cob_free(), COB_MODULE_PTR, cob_str_from_fld(), and COB_UNUSED.
Referenced by cob_sys_mkdir().
int cob_sys_create_file | ( | unsigned char * | file_name, |
unsigned char * | file_access, | ||
unsigned char * | file_lock, | ||
unsigned char * | file_dev, | ||
unsigned char * | file_handle | ||
) |
Definition at line 5039 of file fileio.c.
References _, COB_CHK_PARMS, __cob_settings::cob_display_warn, and open_cbl_file().
int cob_sys_delete_dir | ( | unsigned char * | dir | ) |
Definition at line 5417 of file fileio.c.
References COB_CHK_PARMS, cob_free(), COB_MODULE_PTR, cob_str_from_fld(), and COB_UNUSED.
int cob_sys_delete_file | ( | unsigned char * | file_name | ) |
Definition at line 5165 of file fileio.c.
References COB_CHK_PARMS, cob_free(), COB_MODULE_PTR, cob_str_from_fld(), and COB_UNUSED.
Referenced by cob_sys_file_delete(), cobxref_(), GCic_(), and get__reserved__lists_().
int cob_sys_file_delete | ( | unsigned char * | file_name, |
unsigned char * | file_type | ||
) |
Definition at line 5555 of file fileio.c.
References __cob_global::cob_call_params, COB_CHK_PARMS, COB_MODULE_PTR, cob_sys_delete_file(), and COB_UNUSED.
int cob_sys_file_info | ( | unsigned char * | file_name, |
unsigned char * | file_info | ||
) |
Definition at line 5491 of file fileio.c.
References _, COB_BSWAP_32, COB_BSWAP_64, __cob_global::cob_call_params, COB_CHK_PARMS, cob_free(), COB_MODULE_PTR, cob_runtime_error(), cob_stop_run(), cob_str_from_fld(), cob_u64_t, and COB_UNUSED.
int cob_sys_flush_file | ( | unsigned char * | file_handle | ) |
int cob_sys_get_current_dir | ( | const int | flags, |
const int | dir_length, | ||
unsigned char * | dir | ||
) |
Definition at line 5328 of file fileio.c.
References COB_CHK_PARMS, cob_free(), and NULL.
int cob_sys_mkdir | ( | unsigned char * | dir | ) |
Definition at line 5439 of file fileio.c.
References COB_CHK_PARMS, and cob_sys_create_dir().
int cob_sys_open_file | ( | unsigned char * | file_name, |
unsigned char * | file_access, | ||
unsigned char * | file_lock, | ||
unsigned char * | file_dev, | ||
unsigned char * | file_handle | ||
) |
Definition at line 5026 of file fileio.c.
References COB_CHK_PARMS, COB_UNUSED, and open_cbl_file().
int cob_sys_read_file | ( | unsigned char * | file_handle, |
unsigned char * | file_offset, | ||
unsigned char * | file_len, | ||
unsigned char * | flags, | ||
unsigned char * | buf | ||
) |
Definition at line 5066 of file fileio.c.
References COB_BSWAP_32, COB_BSWAP_64, COB_CHK_PARMS, and cob_s64_t.
int cob_sys_rename_file | ( | unsigned char * | fname1, |
unsigned char * | fname2 | ||
) |
Definition at line 5299 of file fileio.c.
References COB_CHK_PARMS, cob_free(), COB_MODULE_PTR, cob_str_from_fld(), and COB_UNUSED.
int cob_sys_write_file | ( | unsigned char * | file_handle, |
unsigned char * | file_offset, | ||
unsigned char * | file_len, | ||
unsigned char * | flags, | ||
unsigned char * | buf | ||
) |
Definition at line 5113 of file fileio.c.
References COB_BSWAP_32, COB_BSWAP_64, COB_CHK_PARMS, cob_s64_t, and COB_UNUSED.
Definition at line 4431 of file fileio.c.
References cob_file_unlock(), COB_STATUS_00_SUCCESS, and save_status().
void cob_write | ( | cob_file * | f, |
cob_field * | rec, | ||
const int | opt, | ||
cob_field * | fnstatus, | ||
const unsigned int | check_eop | ||
) |
Definition at line 4754 of file fileio.c.
References cob_file::access_mode, check_eop_status, COB_ACCESS_SEQUENTIAL, cob_get_int(), COB_OPEN_EXTEND, COB_OPEN_I_O, COB_OPEN_OUTPUT, COB_STATUS_44_RECORD_OVERFLOW, COB_STATUS_48_OUTPUT_DENIED, cob_file::flag_read_done, cob_file::open_mode, cob_file::organization, cob_file::record, cob_file::record_max, cob_file::record_min, save_status(), cob_field::size, unlikely, cob_file::variable_record, and cob_fileio_funcs::write.
Referenced by cob_file_sort_giving(), cobxref_(), GCic_(), and LISTING_().
|
static |
Definition at line 5822 of file fileio.c.
References cobitem::block_byte, queue_struct::count, file_struct::count, cobsort::destination_file, cobsort::empty, cobsort::file, queue_struct::first, file_struct::fp, cobitem::next, NULL, cobsort::queue, unlikely, and cobsort::w_size.
Referenced by cob_file_sort_process(), and cob_file_sort_submit().
|
static |
|
static |
|
static |
Definition at line 699 of file fileio.c.
References cob_get_int(), cob_set_int(), cob_linage::latbot, cob_linage::latfoot, cob_linage::lattop, cob_linage::lin_bot, cob_linage::lin_foot, cob_linage::lin_lines, cob_linage::lin_top, cob_linage::linage, cob_linage::linage_ctr, and cob_file::linorkeyptr.
Referenced by cob_file_open(), and cob_linage_write_opt().
|
static |
Definition at line 3234 of file fileio.c.
References cob_free(), COB_STATUS_00_SUCCESS, COB_STATUS_91_NOT_AVAILABLE, COB_UNUSED, cob_file::file, isfullclose(), cob_file::nkeys, and NULL.
|
static |
Definition at line 4146 of file fileio.c.
References COB_STATUS_00_SUCCESS, COB_STATUS_21_KEY_INVALID, COB_STATUS_49_I_O_DENIED, COB_STATUS_91_NOT_AVAILABLE, cob_field::data, cob_file::file, cob_file::flag_nonexistent, isdelete(), isread(), isstart(), and cob_file::record.
|
static |
Definition at line 2695 of file fileio.c.
References COB_FILE_MAX, COB_UNUSED, file_open_buff, and cob_file::nkeys.
Referenced by cob_delete_file().
|
static |
Definition at line 2726 of file fileio.c.
References cob_chk_file_mapping(), COB_FILE_EXCLUSIVE, COB_FILE_MAX, COB_FILE_MODE, cob_free(), COB_LOCK_AUTOMATIC, cob_malloc(), COB_NOT_CONFIGURED, COB_OPEN_EXTEND, COB_OPEN_I_O, COB_OPEN_INPUT, COB_OPEN_OUTPUT, COB_STATUS_00_SUCCESS, COB_STATUS_05_SUCCESS_OPTIONAL, COB_STATUS_30_PERMANENT_ERROR, COB_STATUS_35_NOT_EXISTS, COB_STATUS_37_PERMISSION_DENIED, COB_STATUS_39_CONFLICT_ATTRIBUTE, COB_STATUS_61_FILE_SHARING, COB_STATUS_91_NOT_AVAILABLE, cob_strdup(), cob_u32_t, COB_UNUSED, F_OK, cob_file_key::field, cob_file::file, file_open_buff, cob_file_key::flag, cob_file::flag_begin_of_file, cob_file::flag_end_of_file, cob_file::flag_nonexistent, cob_file::flag_optional, isaddindex(), isbuild(), iserase(), iserrno, isfullclose(), isindexinfo(), isopen(), isreclen, cob_file::keys, cob_file::lock_mode, cob_file::nkeys, NULL, cob_file_key::offset, cob_file::open_mode, R_OK, cob_file::record_max, cob_file::record_min, runtime_buffer, cob_field::size, and W_OK.
Definition at line 3420 of file fileio.c.
References COB_EQ, COB_FILE_EXCLUSIVE, COB_LOCK_AUTOMATIC, COB_LOCK_MULTIPLE, COB_OPEN_I_O, COB_OPEN_INPUT, COB_READ_LOCK, COB_READ_NO_LOCK, COB_READ_WAIT_LOCK, COB_STATUS_00_SUCCESS, COB_STATUS_21_KEY_INVALID, COB_STATUS_23_KEY_NOT_EXISTS, COB_STATUS_91_NOT_AVAILABLE, cob_field::data, cob_file_key::field, cob_file::file, cob_file::flag_begin_of_file, cob_file::flag_end_of_file, cob_file::flag_first_read, cob_file::flag_nonexistent, cob_file::flag_read_done, iserrno, isread(), isreclen, isrecnum, isrelease(), isstart(), cob_file::keys, cob_file::lock_mode, cob_file::nkeys, NULL, cob_file::open_mode, cob_file::record, cob_file::record_max, cob_file::record_min, cob_field::size, and unlikely.
|
static |
Definition at line 3543 of file fileio.c.
References COB_FI, COB_FILE_EXCLUSIVE, COB_GE, COB_GT, COB_LA, COB_LE, COB_LOCK_AUTOMATIC, COB_LOCK_MULTIPLE, COB_LT, COB_OPEN_I_O, COB_OPEN_INPUT, COB_READ_FIRST, COB_READ_LAST, COB_READ_LOCK, COB_READ_MASK, COB_READ_NEXT, COB_READ_NO_LOCK, COB_READ_PREVIOUS, COB_READ_WAIT_LOCK, COB_STATUS_00_SUCCESS, COB_STATUS_02_SUCCESS_DUPLICATE, COB_STATUS_10_END_OF_FILE, COB_STATUS_23_KEY_NOT_EXISTS, COB_STATUS_51_RECORD_LOCKED, COB_STATUS_91_NOT_AVAILABLE, cob_u32_t, cob_u8_ptr, cob_field::data, cob_file_key::field, cob_file::file, cob_file_key::flag, cob_file::flag_begin_of_file, cob_file::flag_end_of_file, cob_file::flag_first_read, cob_file::flag_nonexistent, cob_file::flag_read_done, iserrno, isread(), isreclen, isrecnum, isrelease(), isstart(), cob_file::keys, cob_file::lock_mode, cob_file::nkeys, NULL, cob_file::open_mode, cob_file::record, cob_file::record_max, cob_file::record_min, cob_field::size, and unlikely.
|
static |
Definition at line 4200 of file fileio.c.
References cob_file::access_mode, COB_ACCESS_SEQUENTIAL, COB_LOCK_AUTOMATIC, COB_LOCK_MULTIPLE, COB_STATUS_00_SUCCESS, COB_STATUS_02_SUCCESS_DUPLICATE, COB_STATUS_21_KEY_INVALID, COB_STATUS_22_KEY_EXISTS, COB_STATUS_49_I_O_DENIED, COB_STATUS_91_NOT_AVAILABLE, cob_u32_t, COB_UNUSED, cob_field::data, cob_file_key::field, cob_file::file, cob_file::flag_nonexistent, isread(), isreclen, isrecnum, isrelease(), isrewcurr(), isrewrite(), isstart(), cob_file::keys, cob_file::lock_mode, cob_file::nkeys, NULL, cob_file::record, cob_file::record_max, cob_file::record_min, and cob_field::size.
Definition at line 3309 of file fileio.c.
References COB_EQ, COB_FI, COB_GE, COB_GT, COB_LA, COB_LE, COB_LT, COB_STATUS_00_SUCCESS, COB_STATUS_21_KEY_INVALID, COB_STATUS_23_KEY_NOT_EXISTS, COB_STATUS_91_NOT_AVAILABLE, cob_field::data, cob_file_key::field, cob_file::file, cob_file::flag_begin_of_file, cob_file::flag_end_of_file, cob_file::flag_first_read, cob_file::flag_nonexistent, cob_file::flag_read_done, isstart(), cob_file::keys, cob_file::nkeys, cob_file::record, and cob_field::size.
|
static |
Definition at line 4072 of file fileio.c.
References cob_file::access_mode, COB_ACCESS_SEQUENTIAL, cob_malloc(), COB_STATUS_02_SUCCESS_DUPLICATE, COB_STATUS_21_KEY_INVALID, COB_STATUS_48_OUTPUT_DENIED, COB_STATUS_49_I_O_DENIED, COB_STATUS_91_NOT_AVAILABLE, COB_UNUSED, cob_field::data, cob_file_key::field, cob_file::file, cob_file::flag_nonexistent, isreclen, iswrite(), cob_file::keys, NULL, cob_file::record, cob_file::record_max, cob_file::record_min, cob_field::size, and unlikely.
|
static |
Definition at line 1408 of file fileio.c.
References __cob_settings::cob_ls_nulls, COB_NOT_CONFIGURED, COB_STATUS_00_SUCCESS, COB_STATUS_10_END_OF_FILE, COB_STATUS_30_PERMANENT_ERROR, COB_UNUSED, cob_field::data, cob_file::file, likely, cob_file::record, cob_file::record_max, cob_field::size, and unlikely.
|
static |
Definition at line 1463 of file fileio.c.
References cob_file_write_opt(), __cob_settings::cob_ls_fixed, __cob_settings::cob_ls_nulls, __cob_settings::cob_ls_uses_cr, COB_NOT_CONFIGURED, COB_SELECT_LINAGE, COB_STATUS_00_SUCCESS, COB_STATUS_30_PERMANENT_ERROR, COB_WRITE_AFTER, COB_WRITE_BEFORE, COB_WRITE_PAGE, cob_field::data, cob_file::file, cob_file::flag_needs_nl, cob_file::flag_needs_top, cob_file::flag_select_features, cob_linage::lin_top, cob_file::linorkeyptr, cob_file::record, cob_field::size, and unlikely.
|
static |
Definition at line 4980 of file fileio.c.
References _, __cob_settings::cob_display_warn, COB_FILE_MODE, cob_free(), COB_MODULE_PTR, cob_str_from_fld(), COB_UNUSED, and O_BINARY.
Referenced by cob_sys_create_file(), and cob_sys_open_file().
|
static |
Definition at line 1927 of file fileio.c.
References cob_get_int(), COB_NOT_CONFIGURED, COB_STATUS_00_SUCCESS, COB_STATUS_23_KEY_NOT_EXISTS, COB_STATUS_24_KEY_BOUNDARY, COB_STATUS_30_PERMANENT_ERROR, cob_file::fd, cob_file_key::field, cob_file::flag_operation, cob_file::keys, cob_file::record, cob_file::record_max, and cob_field::size.
Definition at line 1675 of file fileio.c.
References cob_get_int(), COB_NOT_CONFIGURED, COB_STATUS_00_SUCCESS, COB_STATUS_23_KEY_NOT_EXISTS, COB_STATUS_30_PERMANENT_ERROR, COB_UNUSED, cob_field::data, cob_file::fd, cob_file::flag_operation, cob_file::record, cob_file::record_max, cob_field::size, and unlikely.
|
static |
Definition at line 1720 of file fileio.c.
References cob_add_int(), COB_NOT_CONFIGURED, COB_READ_FIRST, COB_READ_LAST, COB_READ_MASK, COB_READ_NEXT, COB_READ_PREVIOUS, cob_s64_t, cob_set_int(), COB_STATUS_00_SUCCESS, COB_STATUS_10_END_OF_FILE, COB_STATUS_14_OUT_OF_KEY_RANGE, COB_STATUS_30_PERMANENT_ERROR, COB_STORE_KEEP_ON_OVERFLOW, cob_u32_t, cob_field::data, cob_file::fd, cob_file_key::field, cob_file::flag_first_read, cob_file::flag_operation, cob_file::keys, cob_file::record, cob_file::record_max, cob_field::size, and unlikely.
|
static |
Definition at line 1886 of file fileio.c.
References cob_file::access_mode, COB_ACCESS_SEQUENTIAL, cob_get_int(), COB_NOT_CONFIGURED, COB_STATUS_00_SUCCESS, COB_STATUS_23_KEY_NOT_EXISTS, COB_STATUS_24_KEY_BOUNDARY, COB_STATUS_30_PERMANENT_ERROR, COB_UNUSED, cob_field::data, cob_file::fd, cob_file_key::field, cob_file::flag_operation, cob_file::keys, cob_file::record, cob_file::record_max, and cob_field::size.
Definition at line 1553 of file fileio.c.
References COB_EQ, COB_FI, COB_GE, cob_get_int(), COB_GT, COB_LA, COB_LE, COB_LT, COB_NOT_CONFIGURED, cob_set_int(), COB_STATUS_00_SUCCESS, COB_STATUS_23_KEY_NOT_EXISTS, cob_file::fd, cob_file::flag_operation, cob_file::record, cob_file::record_max, and cob_field::size.
|
static |
Definition at line 1823 of file fileio.c.
References cob_file::access_mode, COB_ACCESS_SEQUENTIAL, cob_get_int(), COB_NOT_CONFIGURED, cob_set_int(), COB_STATUS_00_SUCCESS, COB_STATUS_22_KEY_EXISTS, COB_STATUS_24_KEY_BOUNDARY, COB_STATUS_30_PERMANENT_ERROR, COB_UNUSED, cob_field::data, cob_file::fd, cob_file_key::field, cob_file::flag_operation, cob_file::keys, cob_file::record, cob_file::record_max, cob_field::size, and unlikely.
Definition at line 668 of file fileio.c.
References __cob_settings::cob_do_sync, COB_EC_I_O_EOP, __cob_global::cob_error_file, COB_I2D, cob_set_exception(), cob_sync(), cob_field::data, eop_status, cob_file::file_status, likely, status_exception, and unlikely.
Referenced by cob_close(), cob_delete(), cob_delete_file(), cob_file_release(), cob_file_return(), cob_file_sort_close(), cob_file_sort_init(), cob_open(), cob_read(), cob_read_next(), cob_rewrite(), cob_start(), cob_unlock_file(), and cob_write().
|
static |
Definition at line 1249 of file fileio.c.
References COB_MAYSWAP_16, COB_MAYSWAP_32, COB_NOT_CONFIGURED, COB_STATUS_00_SUCCESS, COB_STATUS_04_SUCCESS_INCOMPLETE, COB_STATUS_10_END_OF_FILE, COB_STATUS_30_PERMANENT_ERROR, COB_UNUSED, __cob_settings::cob_varseq_type, cob_vsq_len, cob_field::data, cob_file::fd, cob_file::flag_operation, cob_file::record, cob_file::record_max, cob_file::record_min, cob_field::size, and unlikely.
|
static |
Definition at line 1383 of file fileio.c.
References COB_NOT_CONFIGURED, COB_STATUS_00_SUCCESS, COB_STATUS_30_PERMANENT_ERROR, COB_UNUSED, cob_field::data, cob_file::fd, cob_file::flag_operation, cob_file::record, and cob_field::size.
|
static |
Definition at line 1313 of file fileio.c.
References COB_MAYSWAP_16, COB_MAYSWAP_32, COB_NOT_CONFIGURED, cob_seq_write_opt(), COB_STATUS_00_SUCCESS, COB_STATUS_30_PERMANENT_ERROR, __cob_settings::cob_varseq_type, cob_vsq_len, COB_WRITE_AFTER, COB_WRITE_BEFORE, cob_field::data, cob_file::fd, cob_file::flag_needs_nl, cob_file::flag_operation, cob_file::record, cob_file::record_max, cob_file::record_min, cob_field::size, and unlikely.
|
static |
Definition at line 5578 of file fileio.c.
References unlikely.
Referenced by cob_file_sort_compare().
|
static |
Definition at line 5601 of file fileio.c.
Referenced by cob_file_sort_compare(), and cob_file_sort_submit().
|
static |
Definition at line 238 of file fileio.c.
Referenced by cob_init_fileio(), cob_linage_write_opt(), and cob_write().
|
static |
Definition at line 239 of file fileio.c.
Referenced by cob_init_fileio(), sequential_read(), and sequential_write().
|
static |
|
static |
|
static |
Definition at line 237 of file fileio.c.
Referenced by cob_init_fileio(), cob_linage_write_opt(), and save_status().
|
static |
Definition at line 241 of file fileio.c.
Referenced by cob_cache_file(), and cob_close().
|
static |
Definition at line 245 of file fileio.c.
Referenced by cob_chk_file_mapping(), cob_init_fileio(), cob_sys_copy_file(), indexed_file_delete(), and indexed_open().
|
static |
Definition at line 243 of file fileio.c.
Referenced by cob_chk_file_env(), and cob_init_fileio().
|
static |
Definition at line 244 of file fileio.c.
Referenced by cob_chk_file_mapping(), cob_delete_file(), cob_init_fileio(), and cob_open().
|
static |
|
static |
|
static |
|
static |
Definition at line 262 of file fileio.c.
Referenced by cob_chk_file_env().
|
static |
|
static |
Definition at line 247 of file fileio.c.
Referenced by cob_exit_fileio(), cob_init_fileio(), and indexed_open().
|
static |
|
static |
Definition at line 249 of file fileio.c.
Referenced by save_status().