diff options
author | 2008-12-06 13:01:31 -0500 | |
---|---|---|
committer | 2008-12-06 13:01:31 -0500 | |
commit | 134f9a857e1b56252820a9d3d7f44d41b7d026ea (patch) | |
tree | e717abb6bab0840214cd6e6d76de8c651b742c86 /scripts/gen_iface.lua | |
parent | 72d97f4bed74709cd15063c72e07ab050027407c (diff) | |
download | textadept-134f9a857e1b56252820a9d3d7f44d41b7d026ea.tar.gz textadept-134f9a857e1b56252820a9d3d7f44d41b7d026ea.zip |
Tweaked scripts/gen_iface.lua.
Ignores SciTE IDM_* constants automatically and changes SC_MASK_FOLDERS from
0xFE000000 to -33554432 due to lua_checklong() issues. (0xFE000000 has a value
of 4261412864, but lua_checklong() gives it as -2147483648 due to overflow I
suspect. Either way -2147483648 & (1 << SC_MARKNUM_FOLDEROPEN) behaves as
expected, but -2147483648 & (1 << SC_MARKNUM_FOLDER) does not.
Diffstat (limited to 'scripts/gen_iface.lua')
-rwxr-xr-x | scripts/gen_iface.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/gen_iface.lua b/scripts/gen_iface.lua index 9c42c097..b81f52c5 100755 --- a/scripts/gen_iface.lua +++ b/scripts/gen_iface.lua @@ -1,7 +1,7 @@ #!/usr/bin/lua -- Copyright 2007-2008 Mitchell mitchell<att>caladbolg.net. See LICENSE. -local f = io.open('/usr/share/scite-st/src/scite/src/IFaceTable.cxx') +local f = io.open('../../scite-tools/branches/scite-st/src/scite/src/IFaceTable.cxx') local contents = f:read('*all') f:close() @@ -21,8 +21,11 @@ out = out..'textadept.constants = {\n' -- {"constant", value} for item in constants:sub(2, -2):gmatch('%b{}') do local name, value = item:match('^{"(.-)",(.-)}') - local line = (" %s = %s,\n"):format(name, value) - out = out..line + if not name:match('^IDM_') then + if name == 'SC_MASK_FOLDERS' then value = '-33554432' end + local line = (" %s = %s,\n"):format(name, value) + out = out..line + end end out = out..[[ SCN_STYLENEEDED = 2000, @@ -80,6 +83,6 @@ for item in properties:sub(2, -2):gmatch('%b{}') do end out = out..'}\n' -f = io.open('/usr/share/textadept/core/iface.lua', 'w') +f = io.open('../core/iface.lua', 'w') f:write(out) f:close() |