-
Notifications
You must be signed in to change notification settings - Fork 14
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
Use unix.Ioctl*
on BSD systems, deduplicate tscreen_*.go
#29
Conversation
466971d
to
8b0056b
Compare
unix.Ioctl*
on BSD systems, deduplicate tscreen_.*go
unix.Ioctl*
on BSD systems, deduplicate tscreen_.*go
unix.Ioctl*
on BSD systems, deduplicate tscreen_*.go
Upstream Edit1: As a short term plan it is maybe better to prepare https://github.com/micro-editor/tcell 1 with the same state as https://github.com/zyedidia/tcell has to have ready2go drop-in replacement for Edit2: Footnotes
|
Replace Syscall with unix.Ioctl* in tscreen_{bsd,darwin}.go. Merge tscreen_{bsd,solaris}.go with tscreen_linux.go and rename to tscreen_unix.go to deduplicate code.
8b0056b
to
fd9a4c0
Compare
I think it is good to avoid adding code different with upstream, but the code in
I have no experience with maintaining forks but I will leave a comment when there is anything I could find or help with deciding. |
We now have two forks12. For us it is easier to get the things into 2 and 2 used as dependency for @dmaluka: Footnotes |
Sorry, I was trying to say that I will leave a comment in zyedidia/micro#3593 about the questions brought up in the description. Rebasing with a new version may take a while and it seems like permission has been given to maintain forks and move them to the organization, so I do not see any problem maintaining the current version used there. I have not submitted the pull request to |
The pull request was closed because I tried renaming the branch. I have not compared the file mentioned at this part in #29 (comment) a lot yet, but I have classes so I may not be able to open the pull request in
|
Summarizing it (as far as possible) inside a tscreen_unix.go doesn't seem to be the wrong approach, especially since it was also done upstream. |
There doesn't seem to be differences with the original code and functions in There will be more changes in code structure if the commit is cherry picked so I replaced the calls instead. |
The behavior that occurs when calling
syscall.Syscall
and passingsyscall.SYS_IOCTL
in OpenBSD has been changed in Go 1.23 becausesyscall(2)
is removed in OpenBSD 7.5. There may be changes in any platform where usingsyscall.Syscall*
will not work, soSyscall6
is replaced withgolang.org/x/sys/unix.Ioctl*
in this pull request to partly address zyedidia/micro#3557.There may be fields in
Termios
added that have to be copied, so the whole struct is also copied before modifying it in this pull request. The serial TTY session in my OpenBSD VM always crashed when I compiled with the originaltscreen_linux.go
code.I do not know how micro was able to start up properly on old OpenBSD versions even though
unsafe.Pointer
was not converted touintptr
in arguments like written in the 4th pattern written in documentation, but the screen would be blank in newer versions.There is a different module that had to be updated but micro seemed to start up properly when I tested using an OpenBSD 7.6 VM. I do not have a MacOS machine so I cannot test if there are no bugs on MacOS.