-
Notifications
You must be signed in to change notification settings - Fork 73
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
Plan9 port to Bill-Gray fork #172
Conversation
I like that idea in general. In any case this likely still needs some time to be in a state where I'd find it possible to pull (which is of course @Bill-Gray's decision in any case). I'll drop some notes in the suggested file changes in the meantime. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The general approach looks fine. I suggest to first check if there's a possible CI build option for Plan9/pcc, otherwise this port may be broken now or at any time later.
Some documentation stuff (starting with comments, extending to the Makefile and C headers, ending in the README) should be updated before the port, too.
Question @staalmannen: did you recheck all the demos? Can you share screenshots?
Do you know if there was a PR to PDCurses before and if yes can reference it?
demos/mkfile
Outdated
tuidemo\ | ||
worm\ | ||
xmas\ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
misses the newer demos, newtest, speed and possibly picsview
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
speed could not be built since I am missing sys/timeb.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check with an option to build without sys/timeb.h? Maybe @benavento has an idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sys/timeb.h is required by ftime()
, for which the man page says
This function is obsolete. Don't use it... gettimeofday(2)
gives microseconds;...
(Which is my fault; I wrote speed.c
.) I'll revise the code to use gettimeofday()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should work now (see commit 0b34997). Turns out my use of ftime()
was not totally stupid; in fact, that was the only solution that works on some older compilers, and we can't get rid of it completely. But it's now only used on those older compilers, and it should compile/run correctly everywhere, including Plan9.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@staalmannen can you please update from master, add the speed demo and test it on plan9?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
speed now builds (I got 19 fps). I had to disable wchar.h since that is not present by default, but it seems like nothing in speed.c depended on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct. Compiled speed.c
without wchar.h
on X11, VT, DOS, DOSVGA, SDL1, SDL2, and WinGUI, and everything worked. I've removed that line (commit 348d53f).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok great! I will just import that one so that there are no merge conflicts if you decide to take this pull request.
Yes. In fact I directly imported the Plan9-related files from that PR ( wmcbrine/PDCurses#93 ). I did not expect that the two had diverged so much. I will definitely have to fix up the code specifically for the Bill-Gray fork and test-compile the new demos. As soon as I have access to my Plan9 VM again I will try it and let you know if it works. |
for a CI build option for Plan9 I only know of this one: but that is on an alternative git hosting site ( https://sr.ht/ ) |
Hm, actually I think the PR upstream would benefit of most of these adjustments, too :-) |
test speed can not work, missing sys/timeb.h
@staalmannen Thank you for the screenshot, looks interesting. I assume that is a CHTYPE32 build, correct? Does the CHTYPE64 one with its additional attributes look different or aren't those supported yet (in this case: do you plan to add them)? |
reading curses.h, CHTYPE_64 seems to be the default so most likely that. I did not define PDC_WIDE though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pdcplan9.c should be integrated in pdcutil.c to match with the other ports.
Other than this the PR is fine (still up to @Bill-Gray to include or not).
Updating to latest upstream to get demos/speed to work
forgot to update local branch on linux box first
@Bill-Gray Do you see any issues with this new port or can I pull it for upcoming 4.2 (and add the one-line entry to docs/HISTORY.md, a file I'd still like you to come back)? |
Simon's good with this port, and I see no problems (must confess I've not looked all that hard, but it looks as if Simon has, so I'll go with that.) I may have to add a Plan9 system to my OS menagerie... |
After this is settled @staalmannen can now go upstream with more points solved, this is good. |
Dear, I saw that you had far more target platforms than upstream PDCurses so I was thinking that you might be interested in Plan9 too...