ADDED 残局文料/dfns_jvwg_ysaf/ipml_mj_ysaf.lua Index: 残局文料/dfns_jvwg_ysaf/ipml_mj_ysaf.lua ================================================================== --- /dev/null +++ 残局文料/dfns_jvwg_ysaf/ipml_mj_ysaf.lua @@ -0,0 +1,181 @@ +package.path = [[.\lib\?.lua;]] .. package.path +package.cpath = [[.\lib\?.dll;]] .. package.cpath +local 字集码互转库 = require("u8_to_a") +local d_5 = {} +local 简件系库 = require("lfs") +require(字集码互转库.u8_to_a("程语_月_基类_字串_内置库_加多")) +--~ 程语_月_标准库_仿照_加多_多编码_大字集_通用 +function d_5.导入库_通用大字集态_八位态(modname) + return require(字集码互转库.u8_to_a(modname)) + end +--~ local +do + local k1 = 0 + function _G.递增示() + k1 = k1 + 1 + print(k1) + end + end +--~ do +--~ local k1 = os.execute +--~ function _G.os.execute(command) +--~ return k1(字集码互转库.u2a(command)) +--~ end +--~ end +function d_5.读件(o1, o2) + local k1 + local k1_3 + k1_3 = io.open(o1, o2 or "r") + k1 = k1_3:read("a") + k1_3:flush() + k1_3:close() + return k1 + end +function d_5.读件排(o1_9, o1) + local k1_9 + k1_9 = {} + for o2 = 1, #o1_9 do + k1_9[#k1_9 + 1] = d_5.读件(o1_9[o2], o1) + end + return k1_9 + end +function d_5.写件(o1, o2, o3) + local k1_3 + k1_3 = io.open(o1, o3 or "w") + k1_3:write(o2) + k1_3:flush() + k1_3:close() + end +function d_5.写件_一维(o1, o1_9, o2, o3) + local k1 = table.concat(o1_9, "\n") + if o3 then + k1 = o3(k1) + end + d_5.写件(o1, k1, o2) + end +function d_5.删制表符(o1) + return o1:gsub("\t", "") + end +--~ function d_5.删空白字(o1) +--~ return o1:gsub("%s", "") +--~ end +--~ function d_5.删空格与制表符(o1) +--~ o1 = d_5.删空格(o1) +--~ return d_5.删制表符(o1) +--~ end +function d_5.文转排(text) + local lines = {} + for line in text:gmatch("[^\n]+") do + table.insert(lines, line) + end + return lines + end +--~ function d_5.删前缀(o1, o2) +--~ if o1:find(o2, 1, true) then +--~ return o1:sub(#o2 + 1) +--~ end +--~ end +--~ function d_5.删后缀(o1, o2) +--~ if o1:find(o2, -1, true) then +--~ return o1:sub(1, #o1 - #o2) +--~ end +--~ end +--~ function d_5.删空行_不虑首末态(o1) +--~ return o1:gsub("\n+", "\n") +--~ end +--~ function d_5.删空行(o1) +--~ o1 = d_5.删空行_不虑首末态(o1) +--~ o1 = d_5.删前缀(o1, "\n") +--~ return d_5.删后缀(o1, "\n") +--~ end +function d_5.删空格(o1) + return o1:gsub(" ", "") + end +function d_5.筛排(o1_9, o1, o2, o3) + local k1_8 + local k1_9 + k1_9 = {} + for o4 = 1, #o1_9 do + k1_8 = o1(o1_9[o4], o2, o3) + if k1_8 then + k1_9[#k1_9 + 1] = k1_8 + end + end + return k1_9 + end +--~ function d_5.筛文(o1, o2, o3) +--~ local k1_9 +--~ k1_9 = {} +--~ for o4 in o2(o1, o3) do +--~ k1_9[#k1_9 + 1] = o4 +--~ end +--~ return k1_9 +--~ end +--~ function d_5.判文(o1, o2, o3, o4) +--~ if o1:find(o2 or ".", o3, o4) then +--~ return o1 +--~ end +--~ end +--~ function d_5.筛件径(o1, o2) + --~ local k1_9 + --~ k1_9 = d_5.筛文(o1, 简件系库.dir) + --~ k1_9 = d_5.筛排(k1_9, d_5.加前缀, o1 .. "/") + --~ k1_9 = d_5.筛排(k1_9, d_5.判文, o2) + --~ return d_5.筛排(k1_9, d_5.在前后加英文双引号) + --~ end +--~ function d_5.筛单行等式(o1) +--~ return 常用库.捕排(string.gmatch, o1, "[^\n= \t]+") +--~ end +--~ function d_5.捕非空单行(o1) +--~ return 常用库.捕排(string.gmatch, o1, "[^\n]+[\n]?") +--~ end +--~ function d_5.捕非空单行(o1) +--~ return 常用库.捕排(string.gmatch, o1, "[^\n]+[\n]?") +--~ end +function d_5.排转对(o1_12, o1) + local k1_5 + local k1_11 + k1_11 = {} + for o2 = 1, #o1_12, o1 + 1 do + k1_5 = {} + for o3 = 1, o1 do + k1_5[o3] = o1_12[o2 + o3] + end + k1_11[o1_12[o2]] = k1_5 + end + return k1_11 + end +--~ function d_5.加前缀(o1, o2) +--~ return o2 .. o1 +--~ end +--~ function d_5.加后缀(o1, o2) +--~ return o1 .. o2 +--~ end +function d_5.filterLinesWithCharacter(text, character) + local result = {} + local lines = d_5.文转排(text) + -- 遍历每一行,检查是否包含目标字符 + for i, line in ipairs(lines) do + if line:find(character, 1, true) then + table.insert(result, line) + end + end + return result + end +--~ function d_5.办令(o1) + --~ print(o1) + --~ os.execute(o1) + --~ end +--~ function d_5.在前后加英文双引号(o1) +--~ return [["]] .. o1 .. [["]] +--~ end +--~ function d_5.筛单行等式_左右值态(o1) +--~ local k1_11 +--~ k1_11 = {} +--~ for o2 in k1_11:gmatch("[^\n= \t]+") do +--~ table.insert(k1_11, o2) +--~ end +--~ return o2 +--~ end +return d_5 + ADDED 残局文料/dfns_jvwg_ysaf/u8_to_a.lua Index: 残局文料/dfns_jvwg_ysaf/u8_to_a.lua ================================================================== --- /dev/null +++ 残局文料/dfns_jvwg_ysaf/u8_to_a.lua @@ -0,0 +1,40 @@ +local ffi = require("ffi") +local d_4 = {} +ffi.cdef([[ +typedef unsigned int UINT; +typedef unsigned long DWORD; +typedef wchar_t WCHAR; +typedef WCHAR* LPWSTR; +typedef wchar_t* LPCWCH; +typedef char CHAR; +typedef CHAR* LPSTR; +typedef const char* LPCCH; +typedef int BOOL; +typedef BOOL* LPBOOL; +int MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCCH lpMultiByteStr, int cbMultiByte, LPWSTR lpWideCharStr, int cchWideChar); +int WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWCH lpWideCharStr, int cchWideChar, LPSTR lpMultiByteStr, int cchMultiByte, LPCCH lpDefaultChar, LPBOOL pfUsedDefaultChar); +]]) +d_4.CP_ACP = 0 +d_4.CP_UTF8 = 65001 +--~ 算机_基统_窗群 +function d_4.m2w(input, o1) + local wlen = ffi.C.MultiByteToWideChar(o1 or d_4.CP_ACP, 0, input, #input, nil, 0) + local wstr = ffi.new("wchar_t[?]", wlen + 1) + ffi.C.MultiByteToWideChar(o1 or d_4.CP_ACP, 0, input, #input, wstr, wlen) + return wstr, wlen +end +function d_4.w2m(wstr, wlen, o1) + local len = ffi.C.WideCharToMultiByte(o1 or d_4.CP_ACP, 0, wstr, wlen or -1, nil, 0, nil, nil) + local str = ffi.new("char[?]", len) + ffi.C.WideCharToMultiByte(o1 or d_4.CP_ACP, 0, wstr, wlen or -1, str, len, nil, nil) + return ffi.string(str, len) +end +--~ 通用大字集_八位 +function d_4.u8_to_a(input) + return d_4.w2m(d_4.m2w(input, d_4.CP_UTF8)) +end +function d_4.a_to_u8(input) + local k1, k2 = d_4.m2w(input) + return d_4.w2m(k1, k2, d_4.CP_UTF8) +end +return d_4 ADDED 残局文料/dfns_jvwg_ysaf/删注/月程语.lua Index: 残局文料/dfns_jvwg_ysaf/删注/月程语.lua ================================================================== --- /dev/null +++ 残局文料/dfns_jvwg_ysaf/删注/月程语.lua @@ -0,0 +1,15 @@ +local d_3 = {} +--~ function d_3.多行注_套娃态(o1) +--~ return o1:gsub("%-%-%[(=*)%[.-%]%1%]", "") +--~ end +--~ function d_3.多行注_凡态(o1) +--~ return o1:gsub("%-%-%[%[.-%]%]", "") +--~ end +function d_3.单行注_不虑字串态(o1) + return o1:gsub("%-%-[^\n]*", "") +end +--~ function d_3.事启(o1) +--~ o1 = d_3.多行注_套娃态(o1) +--~ return d_3.单行注(o1) +--~ end +return d_3 ADDED 残局文料/dfns_jvwg_ysaf/程语_月_删注_不虑字串.lua Index: 残局文料/dfns_jvwg_ysaf/程语_月_删注_不虑字串.lua ================================================================== --- /dev/null +++ 残局文料/dfns_jvwg_ysaf/程语_月_删注_不虑字串.lua @@ -0,0 +1,5 @@ +local d_2 = {} +function d_2.单行注(o1) + return o1:gsub("%-%-[^\n]*", "") + end +return d_2 ADDED 残局文料/dfns_jvwg_ysaf/程语_月_基类_字串_内置库_加多.lua Index: 残局文料/dfns_jvwg_ysaf/程语_月_基类_字串_内置库_加多.lua ================================================================== --- /dev/null +++ 残局文料/dfns_jvwg_ysaf/程语_月_基类_字串_内置库_加多.lua @@ -0,0 +1,21 @@ +function string:lstrip() + return self:gsub("^%s+", "") + end +function string:rstrip() + return self:gsub("%s+$", "") + end +function string:strip() + local k1 + k1 = self:lstrip() + return k1:rstrip() + end +function string:startswith(text) + if self:sub(1, #text) == text then + return self + end + end +function string:endswith(text) + if self:sub(-#text) == text then + return self + end + end ADDED 残局文料/dfns_jvwg_ysaf/程语_月_基类_字串_始缀与终缀.lua Index: 残局文料/dfns_jvwg_ysaf/程语_月_基类_字串_始缀与终缀.lua ================================================================== --- /dev/null +++ 残局文料/dfns_jvwg_ysaf/程语_月_基类_字串_始缀与终缀.lua @@ -0,0 +1,27 @@ +local d_3 = {} +--~ 加 +function d_3.加始缀_基态(o1, o2) + return o2 .. o1 + end +function d_3.加终缀_基态(o1, o2) + return o1 .. o2 + end +--~ 加_分_确保 +--~ function d_3.加前缀_确保态(o1, o2, o3) +--~ 筛文库.返全文(o1, ) +--~ local k1 +--~ k1 = d_3.删前缀(o1, o2, o3) +--~ return o2 .. o1 +--~ end +--~ 减 +function d_3.减始缀_基态(o1, o2) + if o1:startswith(o2) then + return o1:sub(#o2 + 1) + end + end +function d_3.减终缀_基态(o1, o2) + if o1:endswith(o2) then + return o1:sub(1, #o1 - #o2) + end + end +return d_3 ADDED 残局文料/dfns_jvwg_ysaf/程语_月_基类_排_遍历.lua Index: 残局文料/dfns_jvwg_ysaf/程语_月_基类_排_遍历.lua ================================================================== --- /dev/null +++ 残局文料/dfns_jvwg_ysaf/程语_月_基类_排_遍历.lua @@ -0,0 +1,19 @@ +local d_2 = {} +function d_2.遍历_返排态(o1_11, o1, o2, o3, o4) + local k1_8 + local k1_11 + k1_11 = {} + for o5 = 1, #o1_11 do + k1_8 = o1(o1_11[o5], o2, o3, o4) + if k1_8 then + k1_11[#k1_11 + 1] = k1_8 + end + end + return k1_11 + end +function d_2.遍历_基态(o1_11, o1, o2, o3) + for o4 = 1, #o1_11 do + o1(o1_11[o4], o2, o3) + end + end +return d_2 ADDED 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_内置库_加多.lua Index: 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_内置库_加多.lua ================================================================== --- /dev/null +++ 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_内置库_加多.lua @@ -0,0 +1,22 @@ +function string:lstrip() + return self:gsub("^%s+", "") + end +function string:rstrip() + return self:gsub("%s+$", "") + end +function string:strip() + local k1 + k1 = self:lstrip() + return k1:rstrip() + end +function string:startswith(text) + local size = text:len() + if self:sub(1, size) == text then + return self + end + end +function string:endswith(text) + if self:sub(-#text) == text then + return self + end + end ADDED 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_删字.lua Index: 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_删字.lua ================================================================== --- /dev/null +++ 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_删字.lua @@ -0,0 +1,5 @@ +local d_2 = {} +function d_2.空格与制表符(o1) + return o1:gsub("[ \t]", "") + end +return d_2 ADDED 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_前后缀.lua Index: 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_前后缀.lua ================================================================== --- /dev/null +++ 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_前后缀.lua @@ -0,0 +1,37 @@ +local d_3 = {} +--~ 加 +function d_3.加前缀_基态(o1, o2) + return o2 .. o1 + end +function d_3.加前缀_基态(o1, o2) + return o2 .. o1 + end +function d_3.加后缀_基态(o1, o2) + return o1 .. o2 + end +--~ 加_分_确保 +--~ function d_3.加前缀_确保态(o1, o2, o3) +--~ 筛文库.返全文(o1, ) +--~ local k1 +--~ k1 = d_3.删前缀(o1, o2, o3) +--~ return o2 .. o1 +--~ end +function d_3.加前缀与后缀_基态(o1, o2, o3) + return o2 .. o1 .. (o3 or "") + end +--~ 删 +function d_3.删前缀_基态(o1, o2) + if o1:startswith(o2) then + return o1:sub(#o2 + 1) + end + end +function d_3.删后缀_基态(o1, o2) + if o1:endswith(o2) then + return o1:sub(1, #o1 - #o2) + end + end +--~ 场景_令行窗_件径 +function d_3.在前后加英文双引号_基态(o1) + return [["]] .. o1 .. [["]] + end +return d_3 ADDED 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_始缀与终缀.lua Index: 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_始缀与终缀.lua ================================================================== --- /dev/null +++ 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_始缀与终缀.lua @@ -0,0 +1,56 @@ +local d_3 = {} +--~ 加 +function d_3.加前缀_基态(o1, o2) + return o2 .. o1 + end +function d_3.加始缀_基态(o1, o2) + return o2 .. o1 + end +function d_3.加后缀_基态(o1, o2) + return o1 .. o2 + end +function d_3.加终缀_基态(o1, o2) + return o1 .. o2 + end +--~ 加_分_确保 +--~ function d_3.加前缀_确保态(o1, o2, o3) +--~ 筛文库.返全文(o1, ) +--~ local k1 +--~ k1 = d_3.删前缀(o1, o2, o3) +--~ return o2 .. o1 +--~ end +function d_3.加前缀与后缀_基态(o1, o2, o3) + return o2 .. o1 .. (o3 or "") + end +function d_3.加始缀与终缀_基态(o1, o2, o3) + return o2 .. o1 .. (o3 or "") + end +--~ 删 +function d_3.删前缀_基态(o1, o2) + if o1:startswith(o2) then + return o1:sub(#o2 + 1) + end + end +function d_3.减始缀_基态(o1, o2) + if o1:startswith(o2) then + return o1:sub(#o2 + 1) + end + end +function d_3.删后缀_基态(o1, o2) + if o1:endswith(o2) then + return o1:sub(1, #o1 - #o2) + end + end +function d_3.减终缀_基态(o1, o2) + if o1:endswith(o2) then + return o1:sub(1, #o1 - #o2) + end + end +--~ 场景_令行窗_件径 +function d_3.在前后加英文双引号_基态(o1) + return [["]] .. o1 .. [["]] + end +function d_3.在始终加英文双引号_基态(o1) + return [["]] .. o1 .. [["]] + end +return d_3 ADDED 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_筛文_判文.lua Index: 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_筛文_判文.lua ================================================================== --- /dev/null +++ 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_筛文_判文.lua @@ -0,0 +1,13 @@ +local d_2 = {} +function d_2.返全文(o1, o2, o3, o4) + if o1:find(o2, o3, o4) then + return o1 + end + end +function d_2.返全文_普态_前缀态(o1, o2) + return d_2.返全文(o1, o2, 1, true) + end +function d_2.返选文(o1, o2) + return o1:match(o2) + end +return d_2 ADDED 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_筛文_文转排.lua Index: 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_筛文_文转排.lua ================================================================== --- /dev/null +++ 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_筛文_文转排.lua @@ -0,0 +1,6 @@ +local d_2 = {} +local 遍历文库 = 常用库.导入库_通用大字集态_八位态("程语_月_基类_文_遍历") +function d_2.单行_非空态_无换行符态(o1) + return 遍历文库.遍历(o1, string.gmatch, "[^\n]+") + end +return d_2 ADDED 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_遍历.lua Index: 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_遍历.lua ================================================================== --- /dev/null +++ 残局文料/dfns_jvwg_ysaf/程语_月_基类_文_遍历.lua @@ -0,0 +1,11 @@ +local d_2 = {} +function d_2.遍历(o1, o2, o3, o4) + local k1_9 + k1_9 = {} + for o5 in o2(o1, o3, o4) do + k1_9[#k1_9 + 1] = o5 + end + return k1_9 + end +return d_2 + ADDED 残局文料/dfns_jvwg_ysaf/程语_月_基类_能_传参_转化.lua Index: 残局文料/dfns_jvwg_ysaf/程语_月_基类_能_传参_转化.lua ================================================================== --- /dev/null +++ 残局文料/dfns_jvwg_ysaf/程语_月_基类_能_传参_转化.lua @@ -0,0 +1,12 @@ +local d_2 = {} +--~ 传参_参数数量 +function d_2.二参(o1, o2, o3, o4) + return o1(o2(o3), o2(o4)) + end +function d_2.三参(o1, o2, o3, o4, o5) + return o1(o2(o3), o2(o4), o2(o5)) + end +function d_2.四参(o1, o2, o3, o4, o5, o6) + return o1(o2(o3), o2(o4), o2(o5), o2(o6)) + end +return d_2 ADDED 残局文料/dfns_jvwg_ysaf/算机_基统_窗群_令行窗_无窗.lua Index: 残局文料/dfns_jvwg_ysaf/算机_基统_窗群_令行窗_无窗.lua ================================================================== --- /dev/null +++ 残局文料/dfns_jvwg_ysaf/算机_基统_窗群_令行窗_无窗.lua @@ -0,0 +1,22 @@ +local d_2 = {} +local 件径库 = 常用库.导入库_通用大字集态_八位态("算机_基统_窗群_件系_件径") +local 遍历排库 = 常用库.导入库_通用大字集态_八位态("程语_月_基类_排_遍历") +local 缀库 = 常用库.导入库_通用大字集态_八位态("程语_月_基类_字串_始缀与终缀") +function d_2.办令_基态(o1) + print(o1) + os.execute(o1) + end +--~ 件夹 +function d_2.入件夹而用件径_筛态_前后缀态(o1, o2, o3, o4, o5, o6) + local k1_9 + k1_9 = 件径库.入件夹而返件径排_筛态(o1, o2, o3, o4) + k1_9 = 遍历排库.遍历_返排态(k1_9, 缀库.加始缀_基态, [["]]) + k1_9 = 遍历排库.遍历_返排态(k1_9, 缀库.加终缀_基态, [["]]) + k1_9 = 遍历排库.遍历_返排态(k1_9, 缀库.加始缀_基态, o5) + k1_9 = 遍历排库.遍历_返排态(k1_9, 缀库.加终缀_基态, o6) + 遍历排库.遍历_基态(k1_9, d_2.办令_基态) + end +function d_2.入件夹而用件径_筛后缀态_前缀态(o1, o2, o3) + d_2.入件夹而用件径_筛态_前后缀态(o1, o2, -#o2, true, o3) + end +return d_2 ADDED 残局文料/dfns_jvwg_ysaf/算机_基统_窗群_件系_件径.lua Index: 残局文料/dfns_jvwg_ysaf/算机_基统_窗群_件系_件径.lua ================================================================== --- /dev/null +++ 残局文料/dfns_jvwg_ysaf/算机_基统_窗群_件系_件径.lua @@ -0,0 +1,17 @@ +local d_2 = {} +local 遍历文库 = 常用库.导入库_通用大字集态_八位态("程语_月_基类_文_遍历") +local 遍历排库 = 常用库.导入库_通用大字集态_八位态("程语_月_基类_排_遍历") +local 缀库 = 常用库.导入库_通用大字集态_八位态("程语_月_基类_字串_始缀与终缀") +local 判文库 = 常用库.导入库_通用大字集态_八位态("程语_月_基类_文_筛文_判文") +local 简件系库 = require("lfs") +function d_2.入件夹而返件径排_筛态(o1, o2, o3, o4) + local k1_9 + k1_9 = d_2.入件夹而返件径排_基态(o1) + return 遍历排库.遍历_返排态(k1_9, 判文库.返全文, o2, o3, o4) + end +function d_2.入件夹而返件径排_基态(o1) + local k1_9 + k1_9 = 遍历文库.遍历(o1, 简件系库.dir) + return 遍历排库.遍历_返排态(k1_9, 缀库.加始缀_基态, o1 .. "/") + end +return d_2 ADDED 残局文料/dfns_jvwg_ysaf/算机_基统_窗群_件系_小件_写.lua Index: 残局文料/dfns_jvwg_ysaf/算机_基统_窗群_件系_小件_写.lua ================================================================== --- /dev/null +++ 残局文料/dfns_jvwg_ysaf/算机_基统_窗群_件系_小件_写.lua @@ -0,0 +1,9 @@ +local d_2 = {} +function d_2.写件(o1, o2, o3) + local k1_3 + k1_3 = io.open(o2, o3 or "w") + k1_3:write(o1) + k1_3:flush() + k1_3:close() + end +return d_2 ADDED 残局文料/dfns_jvwg_ysaf/算机_基统_窗群_件系_小件_读.lua Index: 残局文料/dfns_jvwg_ysaf/算机_基统_窗群_件系_小件_读.lua ================================================================== --- /dev/null +++ 残局文料/dfns_jvwg_ysaf/算机_基统_窗群_件系_小件_读.lua @@ -0,0 +1,11 @@ +local d_2 = {} +function d_2.读件(o1, o2) + local k1 + local k1_3 + k1_3 = io.open(o1, o2 or "r") + k1 = k1_3:read("a") + k1_3:flush() + k1_3:close() + return k1 + end +return d_2 DELETED 残局文料/lib/ipml_mj_ysaf.lua Index: 残局文料/lib/ipml_mj_ysaf.lua ================================================================== --- 残局文料/lib/ipml_mj_ysaf.lua +++ /dev/null @@ -1,181 +0,0 @@ -package.path = [[.\lib\?.lua;]] .. package.path -package.cpath = [[.\lib\?.dll;]] .. package.cpath -local 字集码互转库 = require("u8_to_a") -local d_5 = {} -local 简件系库 = require("lfs") -require(字集码互转库.u8_to_a("程语_月_基类_字串_内置库_加多")) ---~ 程语_月_标准库_仿照_加多_多编码_大字集_通用 -function d_5.导入库_通用大字集态_八位态(modname) - return require(字集码互转库.u8_to_a(modname)) - end ---~ local -do - local k1 = 0 - function _G.递增示() - k1 = k1 + 1 - print(k1) - end - end ---~ do ---~ local k1 = os.execute ---~ function _G.os.execute(command) ---~ return k1(字集码互转库.u2a(command)) ---~ end ---~ end -function d_5.读件(o1, o2) - local k1 - local k1_3 - k1_3 = io.open(o1, o2 or "r") - k1 = k1_3:read("a") - k1_3:flush() - k1_3:close() - return k1 - end -function d_5.读件排(o1_9, o1) - local k1_9 - k1_9 = {} - for o2 = 1, #o1_9 do - k1_9[#k1_9 + 1] = d_5.读件(o1_9[o2], o1) - end - return k1_9 - end -function d_5.写件(o1, o2, o3) - local k1_3 - k1_3 = io.open(o1, o3 or "w") - k1_3:write(o2) - k1_3:flush() - k1_3:close() - end -function d_5.写件_一维(o1, o1_9, o2, o3) - local k1 = table.concat(o1_9, "\n") - if o3 then - k1 = o3(k1) - end - d_5.写件(o1, k1, o2) - end -function d_5.删制表符(o1) - return o1:gsub("\t", "") - end ---~ function d_5.删空白字(o1) ---~ return o1:gsub("%s", "") ---~ end ---~ function d_5.删空格与制表符(o1) ---~ o1 = d_5.删空格(o1) ---~ return d_5.删制表符(o1) ---~ end -function d_5.文转排(text) - local lines = {} - for line in text:gmatch("[^\n]+") do - table.insert(lines, line) - end - return lines - end ---~ function d_5.删前缀(o1, o2) ---~ if o1:find(o2, 1, true) then ---~ return o1:sub(#o2 + 1) ---~ end ---~ end ---~ function d_5.删后缀(o1, o2) ---~ if o1:find(o2, -1, true) then ---~ return o1:sub(1, #o1 - #o2) ---~ end ---~ end ---~ function d_5.删空行_不虑首末态(o1) ---~ return o1:gsub("\n+", "\n") ---~ end ---~ function d_5.删空行(o1) ---~ o1 = d_5.删空行_不虑首末态(o1) ---~ o1 = d_5.删前缀(o1, "\n") ---~ return d_5.删后缀(o1, "\n") ---~ end -function d_5.删空格(o1) - return o1:gsub(" ", "") - end -function d_5.筛排(o1_9, o1, o2, o3) - local k1_8 - local k1_9 - k1_9 = {} - for o4 = 1, #o1_9 do - k1_8 = o1(o1_9[o4], o2, o3) - if k1_8 then - k1_9[#k1_9 + 1] = k1_8 - end - end - return k1_9 - end ---~ function d_5.筛文(o1, o2, o3) ---~ local k1_9 ---~ k1_9 = {} ---~ for o4 in o2(o1, o3) do ---~ k1_9[#k1_9 + 1] = o4 ---~ end ---~ return k1_9 ---~ end ---~ function d_5.判文(o1, o2, o3, o4) ---~ if o1:find(o2 or ".", o3, o4) then ---~ return o1 ---~ end ---~ end ---~ function d_5.筛件径(o1, o2) - --~ local k1_9 - --~ k1_9 = d_5.筛文(o1, 简件系库.dir) - --~ k1_9 = d_5.筛排(k1_9, d_5.加前缀, o1 .. "/") - --~ k1_9 = d_5.筛排(k1_9, d_5.判文, o2) - --~ return d_5.筛排(k1_9, d_5.在前后加英文双引号) - --~ end ---~ function d_5.筛单行等式(o1) ---~ return 常用库.捕排(string.gmatch, o1, "[^\n= \t]+") ---~ end ---~ function d_5.捕非空单行(o1) ---~ return 常用库.捕排(string.gmatch, o1, "[^\n]+[\n]?") ---~ end ---~ function d_5.捕非空单行(o1) ---~ return 常用库.捕排(string.gmatch, o1, "[^\n]+[\n]?") ---~ end -function d_5.排转对(o1_12, o1) - local k1_5 - local k1_11 - k1_11 = {} - for o2 = 1, #o1_12, o1 + 1 do - k1_5 = {} - for o3 = 1, o1 do - k1_5[o3] = o1_12[o2 + o3] - end - k1_11[o1_12[o2]] = k1_5 - end - return k1_11 - end ---~ function d_5.加前缀(o1, o2) ---~ return o2 .. o1 ---~ end ---~ function d_5.加后缀(o1, o2) ---~ return o1 .. o2 ---~ end -function d_5.filterLinesWithCharacter(text, character) - local result = {} - local lines = d_5.文转排(text) - -- 遍历每一行,检查是否包含目标字符 - for i, line in ipairs(lines) do - if line:find(character, 1, true) then - table.insert(result, line) - end - end - return result - end ---~ function d_5.办令(o1) - --~ print(o1) - --~ os.execute(o1) - --~ end ---~ function d_5.在前后加英文双引号(o1) ---~ return [["]] .. o1 .. [["]] ---~ end ---~ function d_5.筛单行等式_左右值态(o1) ---~ local k1_11 ---~ k1_11 = {} ---~ for o2 in k1_11:gmatch("[^\n= \t]+") do ---~ table.insert(k1_11, o2) ---~ end ---~ return o2 ---~ end -return d_5 - DELETED 残局文料/lib/u8_to_a.lua Index: 残局文料/lib/u8_to_a.lua ================================================================== --- 残局文料/lib/u8_to_a.lua +++ /dev/null @@ -1,40 +0,0 @@ -local ffi = require("ffi") -local d_4 = {} -ffi.cdef([[ -typedef unsigned int UINT; -typedef unsigned long DWORD; -typedef wchar_t WCHAR; -typedef WCHAR* LPWSTR; -typedef wchar_t* LPCWCH; -typedef char CHAR; -typedef CHAR* LPSTR; -typedef const char* LPCCH; -typedef int BOOL; -typedef BOOL* LPBOOL; -int MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCCH lpMultiByteStr, int cbMultiByte, LPWSTR lpWideCharStr, int cchWideChar); -int WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWCH lpWideCharStr, int cchWideChar, LPSTR lpMultiByteStr, int cchMultiByte, LPCCH lpDefaultChar, LPBOOL pfUsedDefaultChar); -]]) -d_4.CP_ACP = 0 -d_4.CP_UTF8 = 65001 ---~ 算机_基统_窗群 -function d_4.m2w(input, o1) - local wlen = ffi.C.MultiByteToWideChar(o1 or d_4.CP_ACP, 0, input, #input, nil, 0) - local wstr = ffi.new("wchar_t[?]", wlen + 1) - ffi.C.MultiByteToWideChar(o1 or d_4.CP_ACP, 0, input, #input, wstr, wlen) - return wstr, wlen -end -function d_4.w2m(wstr, wlen, o1) - local len = ffi.C.WideCharToMultiByte(o1 or d_4.CP_ACP, 0, wstr, wlen or -1, nil, 0, nil, nil) - local str = ffi.new("char[?]", len) - ffi.C.WideCharToMultiByte(o1 or d_4.CP_ACP, 0, wstr, wlen or -1, str, len, nil, nil) - return ffi.string(str, len) -end ---~ 通用大字集_八位 -function d_4.u8_to_a(input) - return d_4.w2m(d_4.m2w(input, d_4.CP_UTF8)) -end -function d_4.a_to_u8(input) - local k1, k2 = d_4.m2w(input) - return d_4.w2m(k1, k2, d_4.CP_UTF8) -end -return d_4 DELETED 残局文料/lib/删注/月程语.lua Index: 残局文料/lib/删注/月程语.lua ================================================================== --- 残局文料/lib/删注/月程语.lua +++ /dev/null @@ -1,15 +0,0 @@ -local d_3 = {} ---~ function d_3.多行注_套娃态(o1) ---~ return o1:gsub("%-%-%[(=*)%[.-%]%1%]", "") ---~ end ---~ function d_3.多行注_凡态(o1) ---~ return o1:gsub("%-%-%[%[.-%]%]", "") ---~ end -function d_3.单行注_不虑字串态(o1) - return o1:gsub("%-%-[^\n]*", "") -end ---~ function d_3.事启(o1) ---~ o1 = d_3.多行注_套娃态(o1) ---~ return d_3.单行注(o1) ---~ end -return d_3 DELETED 残局文料/lib/程语_月_删注_不虑字串.lua Index: 残局文料/lib/程语_月_删注_不虑字串.lua ================================================================== --- 残局文料/lib/程语_月_删注_不虑字串.lua +++ /dev/null @@ -1,5 +0,0 @@ -local d_2 = {} -function d_2.单行注(o1) - return o1:gsub("%-%-[^\n]*", "") - end -return d_2 DELETED 残局文料/lib/程语_月_基类_字串_内置库_加多.lua Index: 残局文料/lib/程语_月_基类_字串_内置库_加多.lua ================================================================== --- 残局文料/lib/程语_月_基类_字串_内置库_加多.lua +++ /dev/null @@ -1,21 +0,0 @@ -function string:lstrip() - return self:gsub("^%s+", "") - end -function string:rstrip() - return self:gsub("%s+$", "") - end -function string:strip() - local k1 - k1 = self:lstrip() - return k1:rstrip() - end -function string:startswith(text) - if self:sub(1, #text) == text then - return self - end - end -function string:endswith(text) - if self:sub(-#text) == text then - return self - end - end DELETED 残局文料/lib/程语_月_基类_字串_始缀与终缀.lua Index: 残局文料/lib/程语_月_基类_字串_始缀与终缀.lua ================================================================== --- 残局文料/lib/程语_月_基类_字串_始缀与终缀.lua +++ /dev/null @@ -1,27 +0,0 @@ -local d_3 = {} ---~ 加 -function d_3.加始缀_基态(o1, o2) - return o2 .. o1 - end -function d_3.加终缀_基态(o1, o2) - return o1 .. o2 - end ---~ 加_分_确保 ---~ function d_3.加前缀_确保态(o1, o2, o3) ---~ 筛文库.返全文(o1, ) ---~ local k1 ---~ k1 = d_3.删前缀(o1, o2, o3) ---~ return o2 .. o1 ---~ end ---~ 减 -function d_3.减始缀_基态(o1, o2) - if o1:startswith(o2) then - return o1:sub(#o2 + 1) - end - end -function d_3.减终缀_基态(o1, o2) - if o1:endswith(o2) then - return o1:sub(1, #o1 - #o2) - end - end -return d_3 DELETED 残局文料/lib/程语_月_基类_排_遍历.lua Index: 残局文料/lib/程语_月_基类_排_遍历.lua ================================================================== --- 残局文料/lib/程语_月_基类_排_遍历.lua +++ /dev/null @@ -1,19 +0,0 @@ -local d_2 = {} -function d_2.遍历_返排态(o1_11, o1, o2, o3, o4) - local k1_8 - local k1_11 - k1_11 = {} - for o5 = 1, #o1_11 do - k1_8 = o1(o1_11[o5], o2, o3, o4) - if k1_8 then - k1_11[#k1_11 + 1] = k1_8 - end - end - return k1_11 - end -function d_2.遍历_基态(o1_11, o1, o2, o3) - for o4 = 1, #o1_11 do - o1(o1_11[o4], o2, o3) - end - end -return d_2 DELETED 残局文料/lib/程语_月_基类_文_内置库_加多.lua Index: 残局文料/lib/程语_月_基类_文_内置库_加多.lua ================================================================== --- 残局文料/lib/程语_月_基类_文_内置库_加多.lua +++ /dev/null @@ -1,22 +0,0 @@ -function string:lstrip() - return self:gsub("^%s+", "") - end -function string:rstrip() - return self:gsub("%s+$", "") - end -function string:strip() - local k1 - k1 = self:lstrip() - return k1:rstrip() - end -function string:startswith(text) - local size = text:len() - if self:sub(1, size) == text then - return self - end - end -function string:endswith(text) - if self:sub(-#text) == text then - return self - end - end DELETED 残局文料/lib/程语_月_基类_文_删字.lua Index: 残局文料/lib/程语_月_基类_文_删字.lua ================================================================== --- 残局文料/lib/程语_月_基类_文_删字.lua +++ /dev/null @@ -1,5 +0,0 @@ -local d_2 = {} -function d_2.空格与制表符(o1) - return o1:gsub("[ \t]", "") - end -return d_2 DELETED 残局文料/lib/程语_月_基类_文_前后缀.lua Index: 残局文料/lib/程语_月_基类_文_前后缀.lua ================================================================== --- 残局文料/lib/程语_月_基类_文_前后缀.lua +++ /dev/null @@ -1,37 +0,0 @@ -local d_3 = {} ---~ 加 -function d_3.加前缀_基态(o1, o2) - return o2 .. o1 - end -function d_3.加前缀_基态(o1, o2) - return o2 .. o1 - end -function d_3.加后缀_基态(o1, o2) - return o1 .. o2 - end ---~ 加_分_确保 ---~ function d_3.加前缀_确保态(o1, o2, o3) ---~ 筛文库.返全文(o1, ) ---~ local k1 ---~ k1 = d_3.删前缀(o1, o2, o3) ---~ return o2 .. o1 ---~ end -function d_3.加前缀与后缀_基态(o1, o2, o3) - return o2 .. o1 .. (o3 or "") - end ---~ 删 -function d_3.删前缀_基态(o1, o2) - if o1:startswith(o2) then - return o1:sub(#o2 + 1) - end - end -function d_3.删后缀_基态(o1, o2) - if o1:endswith(o2) then - return o1:sub(1, #o1 - #o2) - end - end ---~ 场景_令行窗_件径 -function d_3.在前后加英文双引号_基态(o1) - return [["]] .. o1 .. [["]] - end -return d_3 DELETED 残局文料/lib/程语_月_基类_文_始缀与终缀.lua Index: 残局文料/lib/程语_月_基类_文_始缀与终缀.lua ================================================================== --- 残局文料/lib/程语_月_基类_文_始缀与终缀.lua +++ /dev/null @@ -1,56 +0,0 @@ -local d_3 = {} ---~ 加 -function d_3.加前缀_基态(o1, o2) - return o2 .. o1 - end -function d_3.加始缀_基态(o1, o2) - return o2 .. o1 - end -function d_3.加后缀_基态(o1, o2) - return o1 .. o2 - end -function d_3.加终缀_基态(o1, o2) - return o1 .. o2 - end ---~ 加_分_确保 ---~ function d_3.加前缀_确保态(o1, o2, o3) ---~ 筛文库.返全文(o1, ) ---~ local k1 ---~ k1 = d_3.删前缀(o1, o2, o3) ---~ return o2 .. o1 ---~ end -function d_3.加前缀与后缀_基态(o1, o2, o3) - return o2 .. o1 .. (o3 or "") - end -function d_3.加始缀与终缀_基态(o1, o2, o3) - return o2 .. o1 .. (o3 or "") - end ---~ 删 -function d_3.删前缀_基态(o1, o2) - if o1:startswith(o2) then - return o1:sub(#o2 + 1) - end - end -function d_3.减始缀_基态(o1, o2) - if o1:startswith(o2) then - return o1:sub(#o2 + 1) - end - end -function d_3.删后缀_基态(o1, o2) - if o1:endswith(o2) then - return o1:sub(1, #o1 - #o2) - end - end -function d_3.减终缀_基态(o1, o2) - if o1:endswith(o2) then - return o1:sub(1, #o1 - #o2) - end - end ---~ 场景_令行窗_件径 -function d_3.在前后加英文双引号_基态(o1) - return [["]] .. o1 .. [["]] - end -function d_3.在始终加英文双引号_基态(o1) - return [["]] .. o1 .. [["]] - end -return d_3 DELETED 残局文料/lib/程语_月_基类_文_筛文_判文.lua Index: 残局文料/lib/程语_月_基类_文_筛文_判文.lua ================================================================== --- 残局文料/lib/程语_月_基类_文_筛文_判文.lua +++ /dev/null @@ -1,13 +0,0 @@ -local d_2 = {} -function d_2.返全文(o1, o2, o3, o4) - if o1:find(o2, o3, o4) then - return o1 - end - end -function d_2.返全文_普态_前缀态(o1, o2) - return d_2.返全文(o1, o2, 1, true) - end -function d_2.返选文(o1, o2) - return o1:match(o2) - end -return d_2 DELETED 残局文料/lib/程语_月_基类_文_筛文_文转排.lua Index: 残局文料/lib/程语_月_基类_文_筛文_文转排.lua ================================================================== --- 残局文料/lib/程语_月_基类_文_筛文_文转排.lua +++ /dev/null @@ -1,6 +0,0 @@ -local d_2 = {} -local 遍历文库 = 常用库.导入库_通用大字集态_八位态("程语_月_基类_文_遍历") -function d_2.单行_非空态_无换行符态(o1) - return 遍历文库.遍历(o1, string.gmatch, "[^\n]+") - end -return d_2 DELETED 残局文料/lib/程语_月_基类_文_遍历.lua Index: 残局文料/lib/程语_月_基类_文_遍历.lua ================================================================== --- 残局文料/lib/程语_月_基类_文_遍历.lua +++ /dev/null @@ -1,11 +0,0 @@ -local d_2 = {} -function d_2.遍历(o1, o2, o3, o4) - local k1_9 - k1_9 = {} - for o5 in o2(o1, o3, o4) do - k1_9[#k1_9 + 1] = o5 - end - return k1_9 - end -return d_2 - DELETED 残局文料/lib/程语_月_基类_能_传参_转化.lua Index: 残局文料/lib/程语_月_基类_能_传参_转化.lua ================================================================== --- 残局文料/lib/程语_月_基类_能_传参_转化.lua +++ /dev/null @@ -1,12 +0,0 @@ -local d_2 = {} ---~ 传参_参数数量 -function d_2.二参(o1, o2, o3, o4) - return o1(o2(o3), o2(o4)) - end -function d_2.三参(o1, o2, o3, o4, o5) - return o1(o2(o3), o2(o4), o2(o5)) - end -function d_2.四参(o1, o2, o3, o4, o5, o6) - return o1(o2(o3), o2(o4), o2(o5), o2(o6)) - end -return d_2 DELETED 残局文料/lib/算机_基统_窗群_令行窗_无窗.lua Index: 残局文料/lib/算机_基统_窗群_令行窗_无窗.lua ================================================================== --- 残局文料/lib/算机_基统_窗群_令行窗_无窗.lua +++ /dev/null @@ -1,22 +0,0 @@ -local d_2 = {} -local 件径库 = 常用库.导入库_通用大字集态_八位态("算机_基统_窗群_件系_件径") -local 遍历排库 = 常用库.导入库_通用大字集态_八位态("程语_月_基类_排_遍历") -local 缀库 = 常用库.导入库_通用大字集态_八位态("程语_月_基类_字串_始缀与终缀") -function d_2.办令_基态(o1) - print(o1) - os.execute(o1) - end ---~ 件夹 -function d_2.入件夹而用件径_筛态_前后缀态(o1, o2, o3, o4, o5, o6) - local k1_9 - k1_9 = 件径库.入件夹而返件径排_筛态(o1, o2, o3, o4) - k1_9 = 遍历排库.遍历_返排态(k1_9, 缀库.加始缀_基态, [["]]) - k1_9 = 遍历排库.遍历_返排态(k1_9, 缀库.加终缀_基态, [["]]) - k1_9 = 遍历排库.遍历_返排态(k1_9, 缀库.加始缀_基态, o5) - k1_9 = 遍历排库.遍历_返排态(k1_9, 缀库.加终缀_基态, o6) - 遍历排库.遍历_基态(k1_9, d_2.办令_基态) - end -function d_2.入件夹而用件径_筛后缀态_前缀态(o1, o2, o3) - d_2.入件夹而用件径_筛态_前后缀态(o1, o2, -#o2, true, o3) - end -return d_2 DELETED 残局文料/lib/算机_基统_窗群_件系_件径.lua Index: 残局文料/lib/算机_基统_窗群_件系_件径.lua ================================================================== --- 残局文料/lib/算机_基统_窗群_件系_件径.lua +++ /dev/null @@ -1,17 +0,0 @@ -local d_2 = {} -local 遍历文库 = 常用库.导入库_通用大字集态_八位态("程语_月_基类_文_遍历") -local 遍历排库 = 常用库.导入库_通用大字集态_八位态("程语_月_基类_排_遍历") -local 缀库 = 常用库.导入库_通用大字集态_八位态("程语_月_基类_字串_始缀与终缀") -local 判文库 = 常用库.导入库_通用大字集态_八位态("程语_月_基类_文_筛文_判文") -local 简件系库 = require("lfs") -function d_2.入件夹而返件径排_筛态(o1, o2, o3, o4) - local k1_9 - k1_9 = d_2.入件夹而返件径排_基态(o1) - return 遍历排库.遍历_返排态(k1_9, 判文库.返全文, o2, o3, o4) - end -function d_2.入件夹而返件径排_基态(o1) - local k1_9 - k1_9 = 遍历文库.遍历(o1, 简件系库.dir) - return 遍历排库.遍历_返排态(k1_9, 缀库.加始缀_基态, o1 .. "/") - end -return d_2 DELETED 残局文料/lib/算机_基统_窗群_件系_小件_写.lua Index: 残局文料/lib/算机_基统_窗群_件系_小件_写.lua ================================================================== --- 残局文料/lib/算机_基统_窗群_件系_小件_写.lua +++ /dev/null @@ -1,9 +0,0 @@ -local d_2 = {} -function d_2.写件(o1, o2, o3) - local k1_3 - k1_3 = io.open(o2, o3 or "w") - k1_3:write(o1) - k1_3:flush() - k1_3:close() - end -return d_2 DELETED 残局文料/lib/算机_基统_窗群_件系_小件_读.lua Index: 残局文料/lib/算机_基统_窗群_件系_小件_读.lua ================================================================== --- 残局文料/lib/算机_基统_窗群_件系_小件_读.lua +++ /dev/null @@ -1,11 +0,0 @@ -local d_2 = {} -function d_2.读件(o1, o2) - local k1 - local k1_3 - k1_3 = io.open(o1, o2 or "r") - k1 = k1_3:read("a") - k1_3:flush() - k1_3:close() - return k1 - end -return d_2