-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux: genwxbind fails on override files with Windows CR/LF line ends #55
Comments
What git settings do you have for |
This is for my own override file, not a wxLua one. It shouldn't have been crlf so it took me quite a while to figure out what was going on. |
@sheetcam, can you try the following patch: diff --git a/wxLua/bindings/genwxbind.lua b/wxLua/bindings/genwxbind.lua
index 639df5d..ccc641a 100644
--- a/wxLua/bindings/genwxbind.lua
+++ b/wxLua/bindings/genwxbind.lua
@@ -1461,6 +1461,7 @@ function ReadOverrideFile(override_file)
end
for line in io.lines(filename) do
+ line = line:gsub("%s+$","") -- drop all trailing whitespaces not handled by io.lines
local lineData = SplitString(line, delimiters)
local isOverride = false
local isEnd = false
@@ -1545,6 +1546,7 @@ function ReadInterfaceFile(filename)
local linenumber = 0
for line in io.lines(filename) do
+ line = line:gsub("%s+$","") -- drop all trailing whitespaces not handled by io.lines
linenumber = linenumber + 1
local lineTable = |
Yup, that appears to fix the problem. Thanks. |
This fixes handling of CRLF on Linux (which affected %end processing).
In Linux, If an override file uses Windows CR/LF line endings genwxbind fails with a lot of errors:
ERROR: Expected %end. File: ./override.hpp
The text was updated successfully, but these errors were encountered: