Skip to content

Commit

Permalink
Release 4.0.7 version
Browse files Browse the repository at this point in the history
  • Loading branch information
adonais committed Oct 25, 2023
1 parent 9488877 commit 33c9b56
Show file tree
Hide file tree
Showing 48 changed files with 1,236 additions and 355 deletions.
16 changes: 16 additions & 0 deletions conf/conf.d/cfg.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ function cfg.get_comments()
return line_t, block_t
end

function cfg.get_fonts()
local fonts0_set = "Fira Code"
local fonts1_set = "Microsoft YaHei UI"
local fonts2_set = "Microsoft YaHei"
local fonts_size = 0
return fonts0_set,fonts1_set,fonts2_set,fonts_size
end

function cfg.create_bakup(path)
local cfg_code = {
"user_cfg = {}\n",
Expand All @@ -18,6 +26,14 @@ function cfg.create_bakup(path)
" return line_t, block_t\n",
"end\n",
"\n",
"function user_cfg.get_fonts()\n",
" local fonts0_set = \"Fira Code\"\n",
" local fonts1_set = \"Microsoft YaHei UI\"\n",
" local fonts2_set = \"Microsoft YaHei\"\n",
" local fonts_size = 0\n",
" return fonts0_set,fonts1_set,fonts2_set,fonts_size\n",
"end\n",
"\n",
"return user_cfg",
}
local shell_code = table.concat(cfg_code)
Expand Down
8 changes: 7 additions & 1 deletion conf/conf.d/eu_conf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,14 @@ function eu_conf.fill_customize(s)
if (eu_core.table_is_empty(process_customized)) then
process_customized[1] = {['hide'] = false, ['name'] = "44500", ['path'] = "conf/conf.d/eu_evaluation.lua",
['param'] = "%CURRENT_SELSTR% %NUM_SELSTR%", ['micon'] = 44305, ['posid'] = 0, ['hbmp'] = 0}
process_customized[2] = {['hide'] = false, ['name'] = "44501", ['path'] = "%windir%/system32/win32calc.exe",
process_customized[2] = {['hide'] = false, ['name'] = "44501", ['path'] = "",
['param'] = "", ['micon'] = 0, ['posid'] = 0, ['hbmp'] = 0}
local ver = eu_core.euapi.eu_win10_or_later()
if (ver ~= 0xFFFFFFFF) then
process_customized[2].path = "%windir%/system32/win32calc.exe"
else
process_customized[2].path = "%windir%/system32/calc.exe"
end
end
for i=0,msize-1 do
if process_customized[i+1] ~= nil then
Expand Down
15 changes: 14 additions & 1 deletion conf/conf.d/eu_core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,14 @@ typedef struct _doc_comments
bool initialized;
} doc_comments;

typedef struct _doc_fonts
{
const char *font0;
const char *font1;
const char *font2;
int size;
} doc_fonts;

typedef struct _snippet_t
{
intptr_t start;
Expand Down Expand Up @@ -320,6 +328,7 @@ typedef struct _doc_data
eutype_t ctshow_tree; // 函数提示hash
doc_styles style; // 文档关键字类型与高亮颜色
doc_comments comment; // 文档注释
doc_fonts font_list; // 文档字体
} doctype_t;

// for tinyexpr
Expand Down Expand Up @@ -347,7 +356,7 @@ void eu_lua_calltip(const char *pstr);

// 获取配置文件指针
bool eu_config_ptr(struct eu_config *pconfig);
bool eu_theme_ptr(struct eu_theme *ptheme, bool init);
bool eu_theme_ptr(struct eu_theme *ptheme);
bool eu_accel_ptr(ACCEL *paccel);
bool eu_toolbar_ptr(eue_toolbar *pdata, int num);
bool eu_exist_path(const char *path);
Expand Down Expand Up @@ -417,6 +426,7 @@ int on_doc_json_like(void *pnode, void *lpnotify);
int on_doc_makefile_like(void *pnode, void *lpnotify);
int on_doc_cmake_like(void *pnode, void *lpnotify);
int on_doc_text_like(void *pnode, void *lpnotify);
int on_doc_general_like(void *pnode, void *lpnotify);

/* 默认的 reload_list_ptr,reload_tree_ptr 回调函数入口 */
int on_doc_reload_list_reqular(void *pnode);
Expand Down Expand Up @@ -460,6 +470,9 @@ void eu_reset_accs_mask(void);
void eu_reset_snip_mask(void);
void eu_reset_theme_mask(void);

/* 获取系统版本 */
const uint32_t eu_win10_or_later(void);

]]

function eu_core.process_path()
Expand Down
66 changes: 58 additions & 8 deletions conf/conf.d/eu_docs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ if (not eu_core.file_exists(user_file)) then
" DOCTYPE_VERILOG = 41,\n",
" DOCTYPE_PASCAL = 42,\n",
" DOCTYPE_TCL = 43,\n",
" DOCTYPE_INNO = 44,\n",
" DOCTYPE_NSIS = 45,\n",
" }\n",
" local ffi_null = eu_core.ffi.cast(\"void *\", nil)\n",
" local docs_t = eu_core.ffi.new (\"doctype_t[?]\", i,\n",
Expand Down Expand Up @@ -219,7 +221,7 @@ if (not eu_core.file_exists(user_file)) then
" ffi_null,\n",
" ffi_null,\n",
" ffi_null,\n",
" ffi_null,\n",
" eu_core.euapi.on_doc_general_like,\n",
" ffi_null,\n",
" ffi_null,\n",
" ffi_null,\n",
Expand Down Expand Up @@ -259,7 +261,7 @@ if (not eu_core.file_exists(user_file)) then
" ffi_null,\n",
" ffi_null,\n",
" eu_core.euapi.on_doc_keyup_general,\n",
" eu_core.euapi.on_doc_identation,\n",
" eu_core.euapi.on_doc_general_like,\n",
" ffi_null,\n",
" ffi_null,\n",
" ffi_null,\n",
Expand Down Expand Up @@ -339,8 +341,28 @@ if (not eu_core.file_exists(user_file)) then
" ffi_null,\n",
" ffi_null,\n",
" ffi_null,\n",
" eu_core.euapi.on_doc_general_like,\n",
" ffi_null,\n",
" ffi_null,\n",
" ffi_null,\n",
" ffi_null,\n",
" ffi_null,\n",
" },\n",
" {\n",
" e.DOCTYPE_INNO,\n",
" \"inno\",\n",
" \";*.iss;*.isl;*.islu;\",\n",
" \"Inno Setup\",\n",
" \"inno.snippets\",\n",
" 0,\n",
" -1,\n",
" ffi_null,\n",
" ffi_null,\n",
" ffi_null,\n",
" ffi_null,\n",
" eu_core.euapi.on_doc_keyup_general,\n",
" eu_core.euapi.on_doc_general_like,\n",
" ffi_null,\n",
" ffi_null,\n",
" ffi_null,\n",
" ffi_null,\n",
Expand Down Expand Up @@ -499,7 +521,7 @@ if (not eu_core.file_exists(user_file)) then
" ffi_null,\n",
" ffi_null,\n",
" ffi_null,\n",
" eu_core.euapi.on_doc_identation,\n",
" eu_core.euapi.on_doc_general_like,\n",
" ffi_null,\n",
" ffi_null,\n",
" ffi_null,\n",
Expand Down Expand Up @@ -607,6 +629,26 @@ if (not eu_core.file_exists(user_file)) then
" ffi_null,\n",
" },\n",
" {\n",
" e.DOCTYPE_NSIS,\n",
" \"nsis\",\n",
" \";*.nsi;*.nsh;*.nlf;\",\n",
" \"Nsis Setup\",\n",
" \"nsis.snippets\",\n",
" 0,\n",
" -1,\n",
" ffi_null,\n",
" ffi_null,\n",
" ffi_null,\n",
" ffi_null,\n",
" eu_core.euapi.on_doc_keyup_general,\n",
" eu_core.euapi.on_doc_general_like,\n",
" ffi_null,\n",
" ffi_null,\n",
" ffi_null,\n",
" ffi_null,\n",
" ffi_null,\n",
" },\n",
" {\n",
" e.DOCTYPE_PASCAL,\n",
" \"pascal\",\n",
" \";*.pas;*.inc;*.dpr;*.dpk;*.dfm;*.pp;*.lfm;*.lpr;*.fpd;\",\n",
Expand Down Expand Up @@ -808,7 +850,7 @@ if (not eu_core.file_exists(user_file)) then
" },\n",
" {\n",
" e.DOCTYPE_TXT,\n",
" ffi_null,\n",
" \"text\",\n",
" \";*.txt;\",\n",
" \"Text\",\n",
" \"text.snippets\",\n",
Expand Down Expand Up @@ -885,7 +927,7 @@ if (not eu_core.file_exists(user_file)) then
" ffi_null,\n",
" ffi_null,\n",
" ffi_null,\n",
" },\n",
" },\n",
" {\n",
" e.DOCTYPE_XML,\n",
" \"xml\",\n",
Expand Down Expand Up @@ -962,6 +1004,7 @@ function fetch_doctype(s)
local m_config = eu_core.ffi.cast('doctype_t *', s)
local m_req = nil
local m_key0,m_key1,m_key2,m_key3,m_key4,m_key5
local m_ftz,m_font0,m_font1,m_font2
local m_set = nil
local m_styles = nil
local m_line_comment = nil
Expand Down Expand Up @@ -1047,7 +1090,7 @@ function fetch_doctype(s)
end
end
local count = 0;
if (m_req.get_styles ~= ni) then
if (m_req.get_styles ~= nil) then
m_styles = m_req.get_styles()
if (m_styles ~= nil) then
for k, v in pairs(m_styles) do
Expand Down Expand Up @@ -1081,22 +1124,29 @@ function fetch_doctype(s)
end
end
end
if (m_req.get_comments ~= ni) then
if (m_req.get_comments ~= nil) then
m_line_comment,m_block_comment = m_req.get_comments()
if (m_line_comment ~= nil and m_block_comment ~= nil) then
m_config.comment.initialized = true
m_config.comment.line = eu_core.ffi.cast("const char *", m_line_comment)
m_config.comment.block = eu_core.ffi.cast("const char *", m_block_comment)
end
end
if (m_req.get_fonts ~= nil) then
m_font0,m_font1,m_font2, m_ftz = m_req.get_fonts()
if (m_font0 ~= nil) then m_config.font_list.font0 = eu_core.ffi.cast("const char *", m_font0) end
if (m_font1 ~= nil) then m_config.font_list.font1 = eu_core.ffi.cast("const char *", m_font1) end
if (m_font2 ~= nil) then m_config.font_list.font2 = eu_core.ffi.cast("const char *", m_font2) end
if (m_ftz ~= nil) then m_config.font_list.size = eu_core.ffi.cast("int", m_ftz) end
end
end
end

function fill_my_docs()
local my_doc_config = user_docs.get_docs()
local my_size = eu_core.ffi.sizeof(my_doc_config)/eu_core.ffi.sizeof("doctype_t")
--print("my_size = " .. my_size)
if (my_size < 44) then
if (my_size < 46) then
eu_core.euapi.eu_reset_docs_mask()
end
for i=0,my_size-1 do
Expand Down
2 changes: 1 addition & 1 deletion conf/conf.d/eu_theme.lua
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ function eu_theme.load_default(name)
{dochistory_font,dochistory_fontsize,dochistory_color,dochistory_bgcolor,dochistory_bold}
}
})
return eu_core.euapi.eu_theme_ptr(m_theme, true)
return eu_core.euapi.eu_theme_ptr(m_theme)
end

return eu_theme
26 changes: 26 additions & 0 deletions conf/conf.d/ini.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ function ini.get_comments()
return line_t, block_t
end

function ini.get_fonts()
local fonts0_set = "Fira Code"
local fonts1_set = "Microsoft YaHei UI"
local fonts2_set = "Microsoft YaHei"
local fonts_size = 0
return fonts0_set,fonts1_set,fonts2_set,fonts_size
end

function ini.get_reqular()
local symbol_reqular_exp = "^\\[(.+)\\][\\s\\r\\n]*"
return symbol_reqular_exp
end

function ini.create_bakup(path)
local ini_code = {
"user_ini = {}\n",
Expand All @@ -17,6 +30,19 @@ function ini.create_bakup(path)
" return line_t, block_t\n",
"end\n",
"\n",
"function user_ini.get_fonts()\n",
" local fonts0_set = \"Fira Code\"\n",
" local fonts1_set = \"Microsoft YaHei UI\"\n",
" local fonts2_set = \"Microsoft YaHei\"\n",
" local fonts_size = 0\n",
" return fonts0_set,fonts1_set,fonts2_set,fonts_size\n",
"end\n",
"\n",
"function user_ini.get_reqular()\n",
" local symbol_reqular_exp = \"^\\\\[(.+)\\\\][\\\\s\\\\r\\\\n]*\"\n",
" return symbol_reqular_exp\n",
"end\n",
"\n",
"return user_ini",
}
local shell_code = table.concat(ini_code)
Expand Down
111 changes: 111 additions & 0 deletions conf/conf.d/inno.lua

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions conf/conf.d/log.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,32 @@ function log.get_keywords()
return keywords0_set,keywords1_set
end

function log.get_fonts()
local fonts0_set = "Fira Code"
local fonts1_set = "Microsoft YaHei UI"
local fonts2_set = "Microsoft YaHei"
local fonts_size = 0
return fonts0_set,fonts1_set,fonts2_set,fonts_size
end

function log.create_bakup(path)
local log_code = {
"user_log = {}\n",
"\n",
"function user_log.get_keywords()\n",
" local keywords0_set = \"adonais trace debug info TRACE DEBUG INFO\"\n",
" local keywords1_set = \"warn error fatal WARN ERROR FATAL\"\n",
" return keywords0_set,keywords1_set\n",
"end\n",
"\n",
"function user_log.get_fonts()\n",
" local fonts0_set = \"Fira Code\"\n",
" local fonts1_set = \"Microsoft YaHei UI\"\n",
" local fonts2_set = \"Microsoft YaHei\"\n",
" local fonts_size = 0\n",
" return fonts0_set,fonts1_set,fonts2_set,fonts_size\n",
"end\n",
"\n",
"return user_log",
}
local shell_code = table.concat(log_code)
Expand Down
Loading

0 comments on commit 33c9b56

Please sign in to comment.