2015-07-22 21:32:54 +03: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 02:35:25 +03: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-14 01:20:25 +03:00
|
|
|
dword ini_get_color = #aini_get_color;
|
2014-10-31 02:35:25 +03:00
|
|
|
dword ini_set_str = #aini_set_str;
|
|
|
|
dword ini_set_int = #aini_set_int;
|
2015-02-17 19:46:38 +03:00
|
|
|
//dword ini_set_color = #aini_set_color;
|
|
|
|
//dword ini_get_shortcut = #aini_get_shortcut;
|
2014-10-31 02:35:25 +03: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 19:46:38 +03:00
|
|
|
//char aini_get_shortcut[] = "ini_get_shortcut";
|
2015-02-14 01:20:25 +03:00
|
|
|
char aini_get_color[] = "ini_get_color";
|
2015-02-17 19:46:38 +03:00
|
|
|
//char aini_set_color[] = "ini_set_color";
|
2015-07-22 21:32:54 +03:00
|
|
|
|
2017-10-05 12:37:50 +03:00
|
|
|
//===================================================//
|
|
|
|
// //
|
|
|
|
// FUCTIONS //
|
|
|
|
// //
|
|
|
|
//===================================================//
|
|
|
|
|
2018-09-15 13:48:42 +03:00
|
|
|
:struct _ini
|
2017-10-05 12:37:50 +03:00
|
|
|
{
|
|
|
|
dword path;
|
|
|
|
dword section;
|
|
|
|
void SetPath();
|
|
|
|
void SetSection();
|
|
|
|
int GetInt();
|
|
|
|
void SetInt();
|
|
|
|
void GetString();
|
|
|
|
void SetString();
|
|
|
|
};
|
|
|
|
|
2018-09-15 13:48:42 +03:00
|
|
|
:int _ini::GetInt(dword key, default_value)
|
2017-10-05 12:37:50 +03:00
|
|
|
{
|
|
|
|
ini_get_int stdcall (path, section, key, default_value);
|
|
|
|
return EAX;
|
|
|
|
}
|
|
|
|
|
2018-09-15 13:48:42 +03:00
|
|
|
:void _ini::SetInt(dword key, value)
|
2017-10-05 12:37:50 +03:00
|
|
|
{
|
|
|
|
ini_set_int stdcall (path, section, key, value);
|
|
|
|
}
|
|
|
|
|
2018-09-15 13:48:42 +03:00
|
|
|
:void _ini::GetString(dword key, dst, len, default_value)
|
2017-10-05 12:37:50 +03:00
|
|
|
{
|
|
|
|
ini_get_str stdcall (path, section, key, dst, len, default_value);
|
|
|
|
}
|
|
|
|
|
2018-09-15 13:48:42 +03:00
|
|
|
:void _ini::SetString(dword key, value, len)
|
2017-10-05 12:37:50 +03:00
|
|
|
{
|
2018-03-07 14:18:19 +03:00
|
|
|
ini_set_str stdcall (path, section, key, value, len);
|
2017-10-05 12:37:50 +03:00
|
|
|
}
|
|
|
|
|
2015-07-22 21:32:54 +03:00
|
|
|
#endif
|