-
-
Notifications
You must be signed in to change notification settings - Fork 140
/
Copy pathkitty_store.h
72 lines (60 loc) · 2.25 KB
/
kitty_store.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#ifndef SAVEMODE_REG
#define SAVEMODE_REG 0
#endif
#ifndef SAVEMODE_FILE
#define SAVEMODE_FILE 1
#endif
#ifndef SAVEMODE_DIR
#define SAVEMODE_DIR 2
#endif
#define EMERGENCY_INIT int emergency_brake_count = 200000, while_iterations=0 ;
#define EMERGENCY_BREAK if( while_iterations++ > emergency_brake_count ) { break ; }
#include "kitty_commun.h"
#include "kitty_tools.h"
int get_param( const char * val ) ;
void mungestr(const char *in, char *out);
void unmungestr( const char *in, char *out, int outlen ) ;
void packstr(const char *in, char *out) ;
DWORD errorShow(const char* pcErrText, const char* pcErrParam) ;
char *itoa(int value, char *string, int radix);
int createPath(char* dir) ;
char *dupstr(const char *s);
extern char sesspath[2 * MAX_PATH] ;
extern char oldpath[2 * MAX_PATH] ;
extern char initialsesspath[2 * MAX_PATH] ;
extern char sessionsuffix[16] ;
extern char sshkpath[2 * MAX_PATH] ;
extern char keysuffix[16] ;
extern char jumplistpath[2 * MAX_PATH] ;
struct SettingsItem {
char * name ;
char * value ;
struct SettingsItem * pNext ;
struct SettingsItem * pPrevious ;
} ;
typedef struct SettingsItem SettingsItem, *HSettingsItem ;
struct SettingsList {
char * filename ;
int num ;
HSettingsItem first ;
HSettingsItem last ;
} ;
typedef struct SettingsList SettingsList, *HSettingsList;
extern HSettingsList PortableSettings ;
HSettingsItem SettingsNewItem( const char * name, const char * value ) ;
void SettingsFreeItem( HSettingsItem item ) ;
HSettingsList SettingsInit() ;
void SettingsDelItem( HSettingsList list, const char * key ) ;
void SettingsAddItem( HSettingsList list, const char * name, const char * value ) ;
void SettingsFree( HSettingsList list ) ;
char * SettingsKey( HSettingsList list, const char * key ) ;
char * SettingsKey_str( HSettingsList list, const char * key ) ;
int SettingsKey_int( HSettingsList list, const char * key, const int defvalue ) ;
void SettingsLoad( HSettingsList list, const char * filename ) ;
void SettingsSave( HSettingsList list, const char * filename ) ;
int loadPath() ;
char * SetInitialSessPath( void ) ;
char * GetSessPath( void ) ;
bool SessPathIsInitial( void ) ;
bool IsThereDefaultSessionFile( void ) ;
bool ReadPortableValue(const char *buffer, const char * name, char * value, const int maxlen) ;