ARB
Functions
gb_prot.h File Reference
#include <attributes.h>
Include dependency graph for gb_prot.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

GB_MAIN_TYPEgb_get_main_during_cb (void)
 
void gb_remove_callbacks_marked_for_deletion (GBDATA *gbd)
 
void gb_touch_entry (GBDATA *gbd, GB_CHANGE val)
 
void gb_touch_header (GBCONTAINER *gbc)
 
void gb_untouch_children (GBCONTAINER *gbc)
 
void gb_untouch_me (GBENTRY *gbe)
 
void gb_untouch_children_and_me (GBCONTAINER *gbc)
 
void gb_create_header_array (GBCONTAINER *gbc, int size)
 
GBDATAgb_make_pre_defined_entry (GBCONTAINER *father, GBDATA *gbd, long index_pos, GBQUARK keyq)
 
GBENTRYgb_make_entry (GBCONTAINER *father, const char *key, long index_pos, GBQUARK keyq, GB_TYPES type)
 
GBCONTAINERgb_make_pre_defined_container (GBCONTAINER *father, GBCONTAINER *gbc, long index_pos, GBQUARK keyq)
 
GBCONTAINERgb_make_container (GBCONTAINER *father, const char *key, long index_pos, GBQUARK keyq)
 
void gb_pre_delete_entry (GBDATA *gbd)
 
void gb_delete_entry (GBDATA *&gbd)
 
void gb_delete_dummy_father (GBCONTAINER *&gbc)
 
void gb_add_ref_gb_transaction_save (gb_transaction_save *ts)
 
void gb_del_ref_gb_transaction_save (gb_transaction_save *ts)
 
void gb_del_ref_and_extern_gb_transaction_save (gb_transaction_save *ts)
 
void gb_save_extern_data_in_ts (GBENTRY *gbe)
 
void gb_write_index_key (GBCONTAINER *father, long index, GBQUARK new_index)
 
void gb_create_key_array (GB_MAIN_TYPE *Main, int index)
 
long gb_create_key (GB_MAIN_TYPE *Main, const char *key, bool create_gb_key)
 
chargb_abort_entry (GBDATA *gbd)
 
void gb_abort_transaction_local_rek (GBDATA *&gbd)
 
GB_ERROR gb_commit_transaction_local_rek (GBDATA *&gbd, long mode, int *pson_created) __ATTR__USERESULT
 
GB_MAIN_IDX gb_make_main_idx (GB_MAIN_TYPE *Main)
 
chargb_findExtension (char *path)
 
GB_CSTR gb_oldQuicksaveName (GB_CSTR path, int nr)
 
GB_CSTR gb_quicksaveName (GB_CSTR path, int nr)
 
GB_CSTR gb_mapfile_name (GB_CSTR path)
 
long gb_ascii_2_bin (const char *source, GBENTRY *gbe)
 
long gb_read_bin_error (FILE *in, GBDATA *gbd, const char *text)
 
chargb_read_cache (GBENTRY *gbe)
 
void gb_free_cache (GB_MAIN_TYPE *Main, GBENTRY *gbe)
 
void gb_uncache (GBENTRY *gbe)
 
chargb_alloc_cache_index (GBENTRY *gbe, size_t size)
 
GB_ERROR gbcm_unfold_client (GBCONTAINER *gbc, long deep, long index_pos) __ATTR__USERESULT
 
GB_ERROR gbcmc_begin_sendupdate (GBDATA *gbd) __ATTR__USERESULT
 
GB_ERROR gbcmc_end_sendupdate (GBDATA *gbd) __ATTR__USERESULT
 
GB_ERROR gbcmc_sendupdate_create (GBDATA *gbd) __ATTR__USERESULT
 
GB_ERROR gbcmc_sendupdate_delete (GBDATA *gbd) __ATTR__USERESULT
 
GB_ERROR gbcmc_sendupdate_update (GBDATA *gbd, int send_headera) __ATTR__USERESULT
 
GB_ERROR gbcmc_begin_transaction (GBDATA *gbd) __ATTR__USERESULT
 
GB_ERROR gbcmc_init_transaction (GBCONTAINER *gbc) __ATTR__USERESULT
 
GB_ERROR gbcmc_commit_transaction (GBDATA *gbd) __ATTR__USERESULT
 
GB_ERROR gbcmc_abort_transaction (GBDATA *gbd) __ATTR__USERESULT
 
GB_ERROR gbcms_add_to_delete_list (GBDATA *gbd)
 
long gbcmc_key_alloc (GBDATA *gbd, const char *key)
 
GB_ERROR gbcmc_send_undo_commands (GBDATA *gbd, enum gb_undo_commands command) __ATTR__USERESULT
 
chargbcmc_send_undo_info_commands (GBDATA *gbd, enum gb_undo_commands command)
 
GB_ERROR gbcm_login (GBCONTAINER *gb_main, const char *loginname) __ATTR__USERESULT
 
GBCM_ServerResult gbcmc_close (gbcmc_comm *link)
 
GB_ERROR gbcm_logout (GB_MAIN_TYPE *Main, const char *loginname)
 
gb_compress_treegb_build_uncompress_tree (const unsigned char *data, long short_flag, char **end)
 
void gb_free_compress_tree (gb_compress_tree *tree)
 
gb_compress_listgb_build_compress_list (const unsigned char *data, long short_flag, long *size)
 
chargb_compress_bits (const char *source, long size, const unsigned char *c_0, long *msize)
 
GB_BUFFER gb_uncompress_bits (const char *source, long size, char c_0, char c_1)
 
void gb_compress_equal_bytes_2 (const char *source, size_t size, size_t *msize, char *dest)
 
GB_BUFFER gb_uncompress_bytes (GB_CBUFFER source, size_t size, size_t *new_size)
 
GB_BUFFER gb_uncompress_longs_old (GB_CBUFFER source, size_t size, size_t *new_size)
 
GB_DICTIONARYgb_get_dictionary (GB_MAIN_TYPE *Main, GBQUARK key)
 
GB_BUFFER gb_compress_data (GBDATA *gbd, int key, GB_CBUFFER source, size_t size, size_t *msize, GB_COMPRESSION_MASK max_compr, bool pre_compressed)
 
GB_CBUFFER gb_uncompress_data (GBDATA *gbd, GB_CBUFFER source, size_t size)
 
GB_ERROR gb_scan_directory (char *basename, gb_scandir *sd) __ATTR__USERESULT_TODO
 
size_t gbs_get_a_prime (size_t above_or_equal_this)
 
void gb_destroy_indices (GBCONTAINER *gbc)
 
GBDATAgb_index_find (GBCONTAINER *gbf, gb_index_files *ifs, GBQUARK quark, const char *val, GB_CASE case_sens, int after_index)
 
void gb_init_undo_stack (GB_MAIN_TYPE *Main)
 
void gb_free_undo_stack (GB_MAIN_TYPE *Main)
 
chargb_set_undo_sync (GBDATA *gb_main)
 
chargb_disable_undo (GBDATA *gb_main)
 
void gb_check_in_undo_create (GB_MAIN_TYPE *Main, GBDATA *gbd)
 
void gb_check_in_undo_modify (GB_MAIN_TYPE *Main, GBDATA *gbd)
 
void gb_check_in_undo_delete (GB_MAIN_TYPE *Main, GBDATA *&gbd)
 
void gbm_flush_mem (void)
 
void gbm_init_mem (void)
 
void gbm_debug_mem (void)
 
GB_ERROR gb_save_mapfile (GB_MAIN_TYPE *Main, GB_CSTR path)
 
int gb_is_valid_mapfile (const char *path, gb_map_header *mheader, int verbose)
 
GBDATAgb_map_mapfile (const char *path)
 
int gb_isMappedMemory (void *mem)
 
GB_ERROR gb_convert_V2_to_V3 (GBDATA *gb_main)
 
chargb_uncompress_by_dictionary (GBDATA *gbd, GB_CSTR s_source, size_t size, size_t *new_size)
 
chargb_compress_by_dictionary (GB_DICTIONARY *dict, GB_CSTR s_source, size_t size, size_t *msize, int last_flag, int search_backward, int search_forward)
 
GBDATAgb_find_by_nr (GBCONTAINER *father, int index)
 
GBDATAgb_search (GBCONTAINER *gbc, const char *key, GB_TYPES create, int internflag)
 
void gbcm_read_flush (void)
 
long gbcm_read (int socket, char *ptr, long size)
 
GBCM_ServerResult gbcm_write_flush (int socket)
 
GBCM_ServerResult gbcm_write (int socket, const char *ptr, long size)
 
GB_ERROR gbcm_open_socket (const char *path, bool do_connect, int *psocket, char **unix_name)
 
long gbcms_close (gbcmc_comm *link)
 
gbcmc_commgbcmc_open (const char *path)
 
long gbcm_write_two (int socket, long a, long c)
 
GBCM_ServerResult gbcm_read_two (int socket, long a, long *b, long *c)
 
GBCM_ServerResult gbcm_write_string (int socket, const char *key)
 
chargbcm_read_string (int socket)
 
GBCM_ServerResult gbcm_write_long (int socket, long data)
 
long gbcm_read_long (int socket)
 
GB_ERROR gb_load_dictionary_data (GBDATA *gb_main, const char *key, char **dict_data, long *size)
 
void gb_load_single_key_data (GBDATA *gb_main, GBQUARK q)
 
GB_ERROR gb_save_dictionary_data (GBDATA *gb_main, const char *key, const char *dict, int size)
 
GB_ERROR gb_load_key_data_and_dictionaries (GB_MAIN_TYPE *Main) __ATTR__USERESULT
 
GB_ERROR gb_unfold (GBCONTAINER *gbc, long deep, int index_pos)
 
void gb_abort_and_close_all_DBs (void)
 
int gb_read_nr (GBDATA *gbd)
 
GB_ERROR gb_write_compressed_pntr (GBENTRY *gbe, const char *s, long memsize, long stored_size)
 
int gb_get_compression_mask (GB_MAIN_TYPE *Main, GBQUARK key, int gb_type)
 
GB_CSTR gb_read_key_pntr (GBDATA *gbd)
 
GBQUARK gb_find_or_create_quark (GB_MAIN_TYPE *Main, const char *key)
 
GBQUARK gb_find_or_create_NULL_quark (GB_MAIN_TYPE *Main, const char *key)
 
GBCONTAINERgb_get_root (GBENTRY *gbe)
 
GBCONTAINERgb_get_root (GBCONTAINER *gbc)
 
GBENTRYgb_create (GBCONTAINER *father, const char *key, GB_TYPES type)
 
GBCONTAINERgb_create_container (GBCONTAINER *father, const char *key)
 
GB_ERROR gb_delete_force (GBDATA *source)
 
GB_ERROR gb_resort_system_folder_to_top (GBCONTAINER *gb_main)
 

Function Documentation

GB_MAIN_TYPE* gb_get_main_during_cb ( void  )
void gb_remove_callbacks_marked_for_deletion ( GBDATA gbd)

Definition at line 295 of file ad_cb.cxx.

References gb_remove_callbacks_that().

Referenced by gb_do_callbacks().

void gb_touch_entry ( GBDATA gbd,
GB_CHANGE  val 
)
void gb_touch_header ( GBCONTAINER gbc)
void gb_untouch_children ( GBCONTAINER gbc)
void gb_untouch_me ( GBENTRY gbe)
void gb_untouch_children_and_me ( GBCONTAINER gbc)
void gb_create_header_array ( GBCONTAINER gbc,
int  size 
)
GBDATA* gb_make_pre_defined_entry ( GBCONTAINER father,
GBDATA gbd,
long  index_pos,
GBQUARK  keyq 
)
GBENTRY* gb_make_entry ( GBCONTAINER father,
const char key,
long  index_pos,
GBQUARK  keyq,
GB_TYPES  type 
)
GBCONTAINER* gb_make_pre_defined_container ( GBCONTAINER father,
GBCONTAINER gbc,
long  index_pos,
GBQUARK  keyq 
)
GBCONTAINER* gb_make_container ( GBCONTAINER father,
const char key,
long  index_pos,
GBQUARK  keyq 
)
void gb_pre_delete_entry ( GBDATA gbd)
void gb_delete_entry ( GBDATA *&  gbd)

Definition at line 511 of file ad_core.cxx.

References gb_delete_entry(), and GBDATA::is_container().

void gb_delete_dummy_father ( GBCONTAINER *&  gbc)
void gb_add_ref_gb_transaction_save ( gb_transaction_save ts)
void gb_del_ref_gb_transaction_save ( gb_transaction_save ts)
void gb_del_ref_and_extern_gb_transaction_save ( gb_transaction_save ts)
void gb_save_extern_data_in_ts ( GBENTRY gbe)
void gb_write_index_key ( GBCONTAINER father,
long  index,
GBQUARK  new_index 
)
void gb_create_key_array ( GB_MAIN_TYPE Main,
int  index 
)
long gb_create_key ( GB_MAIN_TYPE Main,
const char key,
bool  create_gb_key 
)
char* gb_abort_entry ( GBDATA gbd)
void gb_abort_transaction_local_rek ( GBDATA *&  gbd)
GB_ERROR gb_commit_transaction_local_rek ( GBDATA *&  gbd,
long  mode,
int pson_created 
)
GB_MAIN_IDX gb_make_main_idx ( GB_MAIN_TYPE Main)

Definition at line 922 of file ad_load.cxx.

References gb_assert, gb_main_array, GB_MAIN_ARRAY_SIZE, GB_random(), initialized, NULp, and short.

Referenced by GB_login(), and gb_save_mapfile().

char* gb_findExtension ( char path)

Definition at line 29 of file ad_save_load.cxx.

References NULp.

Referenced by GB_login(), gb_mapfile_name(), gb_oldQuicksaveName(), gb_quicksaveName(), and gb_reffile_name().

GB_CSTR gb_oldQuicksaveName ( GB_CSTR  path,
int  nr 
)

Definition at line 56 of file ad_save_load.cxx.

References gb_findExtension(), and STATIC_BUFFER().

Referenced by GB_login(), and gb_remove_quick_saved().

GB_CSTR gb_quicksaveName ( GB_CSTR  path,
int  nr 
)
GB_CSTR gb_mapfile_name ( GB_CSTR  path)
long gb_ascii_2_bin ( const char source,
GBENTRY gbe 
)

Definition at line 283 of file ad_save_load.cxx.

References A_TO_I, gb_flag_types::compressed_data, GBDATA::flags, and s.

Referenced by gb_parse_ascii_rek().

long gb_read_bin_error ( FILE *  in,
GBDATA gbd,
const char text 
)

Definition at line 566 of file ad_save_load.cxx.

References GB_export_errorf(), GB_KEY(), GB_print_error(), and long.

Referenced by gb_read_bin(), gb_read_bin_rek_V2(), and read_keyword().

char* gb_read_cache ( GBENTRY gbe)
void gb_free_cache ( GB_MAIN_TYPE Main,
GBENTRY gbe 
)
void gb_uncache ( GBENTRY gbe)

Definition at line 215 of file adcache.cxx.

References gb_free_cache(), and GB_MAIN().

char* gb_alloc_cache_index ( GBENTRY gbe,
size_t  size 
)
GB_ERROR gbcm_unfold_client ( GBCONTAINER gbc,
long  deep,
long  index_pos 
)
GB_ERROR gbcmc_begin_sendupdate ( GBDATA gbd)
GB_ERROR gbcmc_end_sendupdate ( GBDATA gbd)
GB_ERROR gbcmc_sendupdate_create ( GBDATA gbd)
GB_ERROR gbcmc_sendupdate_delete ( GBDATA gbd)
GB_ERROR gbcmc_sendupdate_update ( GBDATA gbd,
int  send_headera 
)
GB_ERROR gbcmc_begin_transaction ( GBDATA gbd)
GB_ERROR gbcmc_init_transaction ( GBCONTAINER gbc)
GB_ERROR gbcmc_commit_transaction ( GBDATA gbd)
GB_ERROR gbcmc_abort_transaction ( GBDATA gbd)
GB_ERROR gbcms_add_to_delete_list ( GBDATA gbd)
long gbcmc_key_alloc ( GBDATA gbd,
const char key 
)
GB_ERROR gbcmc_send_undo_commands ( GBDATA gbd,
enum gb_undo_commands  command 
)
char* gbcmc_send_undo_info_commands ( GBDATA gbd,
enum gb_undo_commands  command 
)
GB_ERROR gbcm_login ( GBCONTAINER gb_main,
const char loginname 
)
GBCM_ServerResult gbcmc_close ( gbcmc_comm link)
GB_ERROR gbcm_logout ( GB_MAIN_TYPE Main,
const char loginname 
)
gb_compress_tree* gb_build_uncompress_tree ( const unsigned char data,
long  short_flag,
char **  end 
)
void gb_free_compress_tree ( gb_compress_tree tree)
gb_compress_list* gb_build_compress_list ( const unsigned char data,
long  short_flag,
long size 
)
char* gb_compress_bits ( const char source,
long  size,
const unsigned char c_0,
long msize 
)
GB_BUFFER gb_uncompress_bits ( const char source,
long  size,
char  c_0,
char  c_1 
)
void gb_compress_equal_bytes_2 ( const char source,
size_t  size,
size_t *  msize,
char dest 
)
GB_BUFFER gb_uncompress_bytes ( GB_CBUFFER  source,
size_t  size,
size_t *  new_size 
)

Definition at line 761 of file adcompr.cxx.

References gb_assert, gb_uncompress_equal_bytes(), and gb_uncompress_huffmann().

Referenced by gb_convert_compression().

GB_BUFFER gb_uncompress_longs_old ( GB_CBUFFER  source,
size_t  size,
size_t *  new_size 
)
GB_DICTIONARY* gb_get_dictionary ( GB_MAIN_TYPE Main,
GBQUARK  key 
)
GB_BUFFER gb_compress_data ( GBDATA gbd,
int  key,
GB_CBUFFER  source,
size_t  size,
size_t *  msize,
GB_COMPRESSION_MASK  max_compr,
bool  pre_compressed 
)
GB_CBUFFER gb_uncompress_data ( GBDATA gbd,
GB_CBUFFER  source,
size_t  size 
)
GB_ERROR gb_scan_directory ( char basename,
gb_scandir sd 
)
size_t gbs_get_a_prime ( size_t  above_or_equal_this)

Definition at line 193 of file adhash.cxx.

References gb_assert, KNOWN_PRIMES, and sorted_primes.

Referenced by GB_create_index(), GBS_optimize_hash(), and hash_size().

void gb_destroy_indices ( GBCONTAINER gbc)
GBDATA* gb_index_find ( GBCONTAINER gbf,
gb_index_files ifs,
GBQUARK  quark,
const char val,
GB_CASE  case_sens,
int  after_index 
)
void gb_init_undo_stack ( GB_MAIN_TYPE Main)
void gb_free_undo_stack ( GB_MAIN_TYPE Main)
char* gb_set_undo_sync ( GBDATA gb_main)
char* gb_disable_undo ( GBDATA gb_main)
void gb_check_in_undo_create ( GB_MAIN_TYPE Main,
GBDATA gbd 
)
void gb_check_in_undo_modify ( GB_MAIN_TYPE Main,
GBDATA gbd 
)
void gb_check_in_undo_delete ( GB_MAIN_TYPE Main,
GBDATA *&  gbd 
)
void gbm_flush_mem ( void  )
void gbm_init_mem ( void  )
void gbm_debug_mem ( void  )
GB_ERROR gb_save_mapfile ( GB_MAIN_TYPE Main,
GB_CSTR  path 
)
int gb_is_valid_mapfile ( const char path,
gb_map_header mheader,
int  verbose 
)
GBDATA* gb_map_mapfile ( const char path)
int gb_isMappedMemory ( void *  mem)

Definition at line 725 of file admap.cxx.

References fileLen.

Referenced by gbmFreeMemImpl().

GB_ERROR gb_convert_V2_to_V3 ( GBDATA gb_main)
char* gb_uncompress_by_dictionary ( GBDATA gbd,
GB_CSTR  s_source,
size_t  size,
size_t *  new_size 
)
char* gb_compress_by_dictionary ( GB_DICTIONARY dict,
GB_CSTR  s_source,
size_t  size,
size_t *  msize,
int  last_flag,
int  search_backward,
int  search_forward 
)
GBDATA* gb_find_by_nr ( GBCONTAINER father,
int  index 
)
GBDATA* gb_search ( GBCONTAINER gbc,
const char key,
GB_TYPES  create,
int  internflag 
)
void gbcm_read_flush ( void  )
long gbcm_read ( int  socket,
char ptr,
long  size 
)
GBCM_ServerResult gbcm_write_flush ( int  socket)
GBCM_ServerResult gbcm_write ( int  socket,
const char ptr,
long  size 
)
GB_ERROR gbcm_open_socket ( const char path,
bool  do_connect,
int psocket,
char **  unix_name 
)

Definition at line 144 of file adsocket.cxx.

References arb_open_socket(), GB_await_error(), and GBS_read_arb_tcp().

Referenced by gbcmc_open(), and GBCMS_open().

long gbcms_close ( gbcmc_comm link)
gbcmc_comm* gbcmc_open ( const char path)
long gbcm_write_two ( int  socket,
long  a,
long  c 
)
GBCM_ServerResult gbcm_read_two ( int  socket,
long  a,
long b,
long c 
)

read two values: length and any user long

if data is send by gbcm_write_two() then

Parameters
bshould be zero and is not used!

Definition at line 196 of file adsocket.cxx.

References GB_internal_error(), GB_internal_errorf(), gbcm_read(), GBCM_SERVER_FAULT, and GBCM_SERVER_OK.

Referenced by gbcm_unfold_client(), gbcmc_abort_transaction(), gbcmc_begin_transaction(), gbcmc_commit_transaction(), GBCMC_find(), gbcmc_init_transaction(), gbcmc_key_alloc(), gbcms_talking_undo(), and gbcms_talking_unfold().

GBCM_ServerResult gbcm_write_string ( int  socket,
const char key 
)
char* gbcm_read_string ( int  socket)
GBCM_ServerResult gbcm_write_long ( int  socket,
long  data 
)

Definition at line 260 of file adsocket.cxx.

References GBCM_SERVER_OK, and gbcm_write().

Referenced by gbcm_write_string(), and GBCMC_find().

long gbcm_read_long ( int  socket)

Definition at line 265 of file adsocket.cxx.

References gbcm_read().

Referenced by gbcm_read_string(), and gbcms_talking_find().

GB_ERROR gb_load_dictionary_data ( GBDATA gb_main,
const char key,
char **  dict_data,
long size 
)
void gb_load_single_key_data ( GBDATA gb_main,
GBQUARK  q 
)
GB_ERROR gb_save_dictionary_data ( GBDATA gb_main,
const char key,
const char dict,
int  size 
)
GB_ERROR gb_load_key_data_and_dictionaries ( GB_MAIN_TYPE Main)
GB_ERROR gb_unfold ( GBCONTAINER gbc,
long  deep,
int  index_pos 
)
void gb_abort_and_close_all_DBs ( void  )
int gb_read_nr ( GBDATA gbd)

Definition at line 894 of file arbdb.cxx.

References GBDATA::index.

Referenced by compress_sequence_tree().

GB_ERROR gb_write_compressed_pntr ( GBENTRY gbe,
const char s,
long  memsize,
long  stored_size 
)
int gb_get_compression_mask ( GB_MAIN_TYPE Main,
GBQUARK  key,
int  gb_type 
)
GB_CSTR gb_read_key_pntr ( GBDATA gbd)

Definition at line 1662 of file arbdb.cxx.

References GB_KEY().

Referenced by g_b_undo_info().

GBQUARK gb_find_or_create_quark ( GB_MAIN_TYPE Main,
const char key 
)
GBQUARK gb_find_or_create_NULL_quark ( GB_MAIN_TYPE Main,
const char key 
)

Definition at line 1676 of file arbdb.cxx.

References gb_find_or_create_quark().

Referenced by gb_make_container().

GBCONTAINER* gb_get_root ( GBENTRY gbe)

Definition at line 1739 of file arbdb.cxx.

References GB_MAIN(), and GB_MAIN_TYPE::root_container.

Referenced by gb_search().

GBCONTAINER* gb_get_root ( GBCONTAINER gbc)

Definition at line 1740 of file arbdb.cxx.

References GB_MAIN(), and GB_MAIN_TYPE::root_container.

GBENTRY* gb_create ( GBCONTAINER father,
const char key,
GB_TYPES  type 
)
GBCONTAINER* gb_create_container ( GBCONTAINER father,
const char key 
)
GB_ERROR gb_delete_force ( GBDATA source)

Definition at line 1937 of file arbdb.cxx.

References GB_DELETED, gb_touch_entry(), and NULp.

Referenced by gbcms_talking_put_update().

GB_ERROR gb_resort_system_folder_to_top ( GBCONTAINER gb_main)