Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

htreg.cc File Reference

#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include "defreg.h"
#include "htatom.h"
#include "htctrl.h"
#include "htdialog.h"
#include "htio.h"
#include "htiobox.h"
#include "htreg.h"
#include "log.h"
#include "snprintf.h"
#include "store.h"
#include "tools.h"

Go to the source code of this file.

Defines

#define ATOM_HT_REGISTRY   MAGICD("REG\x00")
#define ATOM_HT_REGISTRY_NODE   MAGICD("REG\x01")
#define ATOM_HT_REGISTRY_DATA_STREE   MAGICD("REG\x02")
#define ATOM_HT_REGISTRY_DATA_DWORD   MAGICD("REG\x03")
#define ATOM_HT_REGISTRY_DATA_RAW   MAGICD("REG\x04")
#define ATOM_HT_REGISTRY_DATA_STRING   MAGICD("REG\x05")
#define ATOM_HT_REGISTRY_NODE_TYPE_DESC   MAGICD("REG\x10")
#define ATOM_HT_CREATE_EMPTY_SUBDIR   MAGICD("REG\x20")
#define ATOM_HT_CREATE_EMPTY_SYMLINK   MAGICD("REG\x21")
#define ATOM_HT_CREATE_EMPTY_DWORD   MAGICD("REG\x22")
#define ATOM_HT_CREATE_EMPTY_STRING   MAGICD("REG\x23")
#define ATOM_HT_CREATE_EMPTY_RAW   MAGICD("REG\x24")

Functions

ht_registry_datacreate_empty_symlink ()
ht_registry_datacreate_empty_dword ()
ht_registry_datacreate_empty_string ()
ht_registry_datacreate_empty_raw ()
bool valid_char (unsigned char *bitmap, char c)
dword get_config_dword (char *ident)
char * get_config_string (char *ident)
 BUILDER (ATOM_HT_REGISTRY, ht_registry)
bool init_registry ()
void done_registry ()

Variables

ht_registryregistry
unsigned char valid_nodename_chars [256/8]
unsigned char valid_nodename_chars_first [256/8]


Define Documentation

#define ATOM_HT_CREATE_EMPTY_DWORD   MAGICD("REG\x22")
 

Definition at line 48 of file htreg.cc.

Referenced by done_registry(), and init_registry().

#define ATOM_HT_CREATE_EMPTY_RAW   MAGICD("REG\x24")
 

Definition at line 50 of file htreg.cc.

Referenced by done_registry(), and init_registry().

#define ATOM_HT_CREATE_EMPTY_STRING   MAGICD("REG\x23")
 

Definition at line 49 of file htreg.cc.

Referenced by done_registry(), and init_registry().

#define ATOM_HT_CREATE_EMPTY_SUBDIR   MAGICD("REG\x20")
 

Definition at line 46 of file htreg.cc.

#define ATOM_HT_CREATE_EMPTY_SYMLINK   MAGICD("REG\x21")
 

Definition at line 47 of file htreg.cc.

Referenced by done_registry(), and init_registry().

#define ATOM_HT_REGISTRY   MAGICD("REG\x00")
 

Definition at line 39 of file htreg.cc.

Referenced by done_registry(), init_registry(), and ht_registry::object_id().

#define ATOM_HT_REGISTRY_DATA_DWORD   MAGICD("REG\x03")
 

Definition at line 42 of file htreg.cc.

Referenced by done_registry(), init_registry(), and ht_registry_data_dword::object_id().

#define ATOM_HT_REGISTRY_DATA_RAW   MAGICD("REG\x04")
 

Definition at line 43 of file htreg.cc.

Referenced by done_registry(), init_registry(), and ht_registry_data_raw::object_id().

#define ATOM_HT_REGISTRY_DATA_STREE   MAGICD("REG\x02")
 

Definition at line 41 of file htreg.cc.

Referenced by done_registry(), init_registry(), and ht_registry_data_stree::object_id().

#define ATOM_HT_REGISTRY_DATA_STRING   MAGICD("REG\x05")
 

Definition at line 44 of file htreg.cc.

Referenced by done_registry(), init_registry(), and ht_registry_data_string::object_id().

#define ATOM_HT_REGISTRY_NODE   MAGICD("REG\x01")
 

Definition at line 40 of file htreg.cc.

Referenced by done_registry(), init_registry(), and ht_registry_node::object_id().

#define ATOM_HT_REGISTRY_NODE_TYPE_DESC   MAGICD("REG\x10")
 

Definition at line 45 of file htreg.cc.

Referenced by done_registry(), init_registry(), and ht_registry_node_type_desc::object_id().


Function Documentation

BUILDER ATOM_HT_REGISTRY  ,
ht_registry 
 

ht_registry_data* create_empty_dword  ) 
 

Definition at line 308 of file htreg.cc.

Referenced by ht_registry::init(), and init_registry().

ht_registry_data* create_empty_raw  ) 
 

Definition at line 318 of file htreg.cc.

Referenced by ht_registry::init(), and init_registry().

ht_registry_data* create_empty_string  ) 
 

Definition at line 313 of file htreg.cc.

Referenced by ht_registry::init(), and init_registry().

ht_registry_data* create_empty_symlink  ) 
 

Definition at line 303 of file htreg.cc.

Referenced by ht_registry::init(), and init_registry().

void done_registry  ) 
 

Definition at line 934 of file htreg.cc.

References ATOM_HT_CREATE_EMPTY_DWORD, ATOM_HT_CREATE_EMPTY_RAW, ATOM_HT_CREATE_EMPTY_STRING, ATOM_HT_CREATE_EMPTY_SYMLINK, ATOM_HT_REGISTRY, ATOM_HT_REGISTRY_DATA_DWORD, ATOM_HT_REGISTRY_DATA_RAW, ATOM_HT_REGISTRY_DATA_STREE, ATOM_HT_REGISTRY_DATA_STRING, ATOM_HT_REGISTRY_NODE, ATOM_HT_REGISTRY_NODE_TYPE_DESC, ht_registry::done(), registry, UNREGISTER, and unregister_atom().

dword get_config_dword char *  ident  ) 
 

Definition at line 843 of file htreg.cc.

References dword, ht_registry::find_data_entry(), ht_registry::get_node_type_desc(), HT_NAME_MAX, ht_registry_node_type, LOG_ERROR, LOG_EX, registry, RNT_DWORD, and ht_registry_data_dword::value.

Referenced by ht_text_viewer::config_changed(), ht_text_editor::config_changed(), save_fileconfig(), and save_systemconfig().

char* get_config_string char *  ident  ) 
 

Definition at line 863 of file htreg.cc.

References ht_registry::find_data_entry(), ht_registry::get_node_type_desc(), HT_NAME_MAX, ht_registry_node_type, ht_strdup(), LOG_ERROR, LOG_EX, NULL, registry, RNT_STRING, and ht_registry_data_string::value.

Referenced by ht_text_viewer::config_changed(), VfsListbox::config_changed(), ht_status::handlemsg(), and ht_status::init().

bool init_registry  ) 
 

Definition at line 895 of file htreg.cc.

References ATOM_HT_CREATE_EMPTY_DWORD, ATOM_HT_CREATE_EMPTY_RAW, ATOM_HT_CREATE_EMPTY_STRING, ATOM_HT_CREATE_EMPTY_SYMLINK, ATOM_HT_REGISTRY, ATOM_HT_REGISTRY_DATA_DWORD, ATOM_HT_REGISTRY_DATA_RAW, ATOM_HT_REGISTRY_DATA_STREE, ATOM_HT_REGISTRY_DATA_STRING, ATOM_HT_REGISTRY_NODE, ATOM_HT_REGISTRY_NODE_TYPE_DESC, create_empty_dword(), create_empty_raw(), create_empty_string(), create_empty_symlink(), default_reg, ht_object_stream::done(), ht_memmap_file::done(), ht_object_stream_inter::getObject(), ht_memmap_file::init(), ht_object_stream_bin::init(), NULL, REGISTER, register_atom(), and registry.

bool valid_char unsigned char *  bitmap,
char  c
 

Definition at line 822 of file htreg.cc.

References BITBIT.

Referenced by ht_registry::valid_nodename().


Variable Documentation

ht_registry* registry
 

Definition at line 37 of file htreg.cc.

Referenced by RegistryFs::canonicalize(), RegistryFs::createFile(), RegistryFs::deleteFile(), RegNodeFile::done(), done_registry(), RegistryFs::enumFiletype(), RegistryFs::findFirst(), RegistryFs::findNext(), get_config_dword(), get_config_string(), ht_app::handlemsg(), RegNodeFile::init(), init_registry(), ht_app::load(), load_pal(), RegistryFs::makeDir(), RegistryFs::open(), RegistryFs::pstat(), and ht_app::store().

unsigned char valid_nodename_chars[256/8]
 

Initial value:

{

        0, 0, 0, 0,


        BITMAP(1, 0, 0, 0, 0, 0, 1, 0), BITMAP(0, 0, 0, 0, 0, 1, 1, 0),
        BITMAP(1, 1, 1, 1, 1, 1, 1, 1), BITMAP(1, 1, 1, 0, 0, 0, 0, 0),


        BITMAP(0, 1, 1, 1, 1, 1, 1, 1), BITMAP(1, 1, 1, 1, 1, 1, 1, 1),
        BITMAP(1, 1, 1, 1, 1, 1, 1, 1), BITMAP(1, 1, 1, 0, 0, 0, 0, 1),


        BITMAP(0, 1, 1, 1, 1, 1, 1, 1), BITMAP(1, 1, 1, 1, 1, 1, 1, 1),
        BITMAP(1, 1, 1, 1, 1, 1, 1, 1), BITMAP(1, 1, 1, 0, 0, 0, 0, 0),

        0, 0, 0, 0,

        0, 0, 0, 0,

        0, 0, 0, 0,

        0, 0, 0, 0
}

Definition at line 770 of file htreg.cc.

Referenced by ht_registry::valid_nodename().

unsigned char valid_nodename_chars_first[256/8]
 

Initial value:

{

        0, 0, 0, 0,


        BITMAP(0, 0, 0, 0, 0, 0, 1, 0), BITMAP(0, 0, 0, 0, 0, 1, 1, 0),
        BITMAP(1, 1, 1, 1, 1, 1, 1, 1), BITMAP(1, 1, 0, 0, 0, 0, 0, 0),


        BITMAP(0, 1, 1, 1, 1, 1, 1, 1), BITMAP(1, 1, 1, 1, 1, 1, 1, 1),
        BITMAP(1, 1, 1, 1, 1, 1, 1, 1), BITMAP(1, 1, 1, 0, 0, 0, 0, 1),


        BITMAP(0, 1, 1, 1, 1, 1, 1, 1), BITMAP(1, 1, 1, 1, 1, 1, 1, 1),
        BITMAP(1, 1, 1, 1, 1, 1, 1, 1), BITMAP(1, 1, 1, 0, 0, 0, 0, 0),

        0, 0, 0, 0,

        0, 0, 0, 0,

        0, 0, 0, 0,

        0, 0, 0, 0
}

Definition at line 796 of file htreg.cc.

Referenced by ht_registry::valid_nodename().


Generated on Fri May 7 21:15:49 2004 by doxygen 1.3.5