2015-07-22 20:32:54 +02:00
|
|
|
#ifndef INCLUDE_LIBINI_H
|
|
|
|
#define INCLUDE_LIBINI_H
|
|
|
|
|
|
|
|
#ifndef INCLUDE_KOLIBRI_H
|
|
|
|
#include "../lib/kolibri.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef INCLUDE_DLL_H
|
|
|
|
#include "../lib/dll.h"
|
|
|
|
#endif
|
|
|
|
|
2014-10-31 00:35:25 +01:00
|
|
|
dword libini = #alibini;
|
|
|
|
char alibini[] = "/sys/lib/libini.obj";
|
|
|
|
|
|
|
|
dword lib_init = #alib_init;
|
|
|
|
dword ini_enum_sections = #aini_enum_sections;
|
|
|
|
dword ini_enum_keys = #aini_enum_keys;
|
|
|
|
dword ini_get_str = #aini_get_str;
|
|
|
|
dword ini_get_int = #aini_get_int;
|
2015-02-13 23:20:25 +01:00
|
|
|
dword ini_get_color = #aini_get_color;
|
2014-10-31 00:35:25 +01:00
|
|
|
dword ini_set_str = #aini_set_str;
|
|
|
|
dword ini_set_int = #aini_set_int;
|
2015-02-17 17:46:38 +01:00
|
|
|
//dword ini_set_color = #aini_set_color;
|
|
|
|
//dword ini_get_shortcut = #aini_get_shortcut;
|
2014-10-31 00:35:25 +01:00
|
|
|
$DD 2 dup 0
|
|
|
|
|
|
|
|
char alib_init[] = "lib_init";
|
|
|
|
char aini_enum_sections[] = "ini_enum_sections";
|
|
|
|
char aini_enum_keys[] = "ini_enum_keys";
|
|
|
|
char aini_get_str[] = "ini_get_str";
|
|
|
|
char aini_get_int[] = "ini_get_int";
|
|
|
|
char aini_set_str[] = "ini_set_str";
|
|
|
|
char aini_set_int[] = "ini_set_int";
|
2015-02-17 17:46:38 +01:00
|
|
|
//char aini_get_shortcut[] = "ini_get_shortcut";
|
2015-02-13 23:20:25 +01:00
|
|
|
char aini_get_color[] = "ini_get_color";
|
2015-02-17 17:46:38 +01:00
|
|
|
//char aini_set_color[] = "ini_set_color";
|
2015-07-22 20:32:54 +02:00
|
|
|
|
2017-10-05 11:37:50 +02:00
|
|
|
//===================================================//
|
|
|
|
// //
|
|
|
|
// FUCTIONS //
|
|
|
|
// //
|
|
|
|
//===================================================//
|
|
|
|
|
|
|
|
struct _ini
|
|
|
|
{
|
|
|
|
dword path;
|
|
|
|
dword section;
|
|
|
|
void SetPath();
|
|
|
|
void SetSection();
|
|
|
|
int GetInt();
|
|
|
|
void SetInt();
|
|
|
|
void GetString();
|
|
|
|
void SetString();
|
|
|
|
};
|
|
|
|
|
|
|
|
int _ini::GetInt(dword key, default_value)
|
|
|
|
{
|
|
|
|
ini_get_int stdcall (path, section, key, default_value);
|
|
|
|
return EAX;
|
|
|
|
}
|
|
|
|
|
|
|
|
void _ini::SetInt(dword key, value)
|
|
|
|
{
|
|
|
|
ini_set_int stdcall (path, section, key, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
void _ini::GetString(dword key, dst, len, default_value)
|
|
|
|
{
|
|
|
|
ini_get_str stdcall (path, section, key, dst, len, default_value);
|
|
|
|
}
|
|
|
|
|
|
|
|
void _ini::SetString(dword key, value, len)
|
|
|
|
{
|
|
|
|
ini_set_str stdcall (key, value, len);
|
|
|
|
}
|
|
|
|
|
2015-07-22 20:32:54 +02:00
|
|
|
#endif
|