Re: Quad-PW on macOS

2024-12-30 Thread Dr . Jürgen Sauermann
Hi Paul, thanks, included in *SVN 1809*. No need to *#include config.h* because *Common.hh* #includes it and there are reasons to include it in a central place (i.e. Common.hh) rather than in individual .cc files. Best Regards, Jürgen On 12/30/24 07:13, Paul Rockwell wrote: Jürgen, May I su

Re: Quad-PW on macOS

2024-12-29 Thread Paul Rockwell
Jürgen, May I suggest a couple of changes to src/main.cc? The first thing is a. bug - there's no #include "config.h" in main.cc HAVE_IOCTL_TIOCGWINSZ is undefined and code that is conditionalized based on its existence won't be compiled. I also looked at the changes in context, and think t

Re: Quad-PW on macOS

2024-12-29 Thread Dr . Jürgen Sauermann
Hi Paul, thanks, fixed in *SVN 1808*. Best Regards, Jürgen On 12/28/24 20:25, Paul Rockwell wrote: Testing confirms that is not needed for Linux for the detection of TIOCGWINSZ. sufficient on both platforms. Having #include is redundant on Linux, but causes incorrect detection of the ex

Re: Quad-PW on macOS

2024-12-28 Thread Paul Rockwell
Testing confirms that is not needed for Linux for the detection of TIOCGWINSZ. sufficient on both platforms. Having #include is redundant on Linux, but causes incorrect detection of the existence of TIOCGWINSZ on macOS. Not sure if is needed on other platforms, though. - paul > On Dec 28,

Re: Quad-PW on macOS

2024-12-28 Thread Paul Rockwell
Jürgen, The configure code to determine HAVE_IOCTL_TIOCGWINSZ in config.h doesn't work on macOS: conftest.cpp:130:11: fatal error: 'asm/termbits.h' file not found 130 | #include /* for TIOCGWINSZ */ | ^~~~ 1 error generated. configure:22435: $? = 1 configure: fail

Re: Quad-PW on macOS

2024-12-28 Thread Dr . Jürgen Sauermann
Hi Elias et al., thanks for the hint. I have now (*SVN 1807*) changed the code so that the initial ⎕PW is set from the size of the GNU APL window if: 1. the platform supports TIOCGWINSZ, and 2. the user has set WINCH-SETS-⎕PW  to Yes in one of her preferences files, and 3. the user has NOT s

Re: Quad-PW on macOS

2024-12-25 Thread Christian Robert
In most of my workspaces I have a ⎕LXsystem variable and one of the function I use is to set ⎕PW on the window size. ⎕LX ⎕RL←⎕FIO["random"] 8 ⋄ ⎕PW←⎕FIO ¯8 ⋄ ⊣"libedif.so.0" ⎕FX "vi"     Xtian. On 2024-12-25 10:15, Elias Mårtenson wrote: You can actually r

Re: Quad-PW on macOS

2024-12-25 Thread Elias Mårtenson
You can actually request the terminal size. Unfortunately, the syntax to do that is not standardised, but on Linux you can use TIOCGWINSZ. See the documentation here: https://man.archlinux.org/man/core/man-pages/TIOCGWINSZ.2const.en Here's what the stty command does to read this infomration: stat

Re: Quad-PW on macOS

2024-12-25 Thread M.Hall
Thank you! Happy end-of-year holidays, everyone! On Wed, Dec 25, 2024 at 6:46 AM Dr. Jürgen Sauermann < mail@jürgen-sauermann.de> wrote: > Hi Mike, > > I have applied your patches - *SVN 1806*. > > A general problem with the SIGWINCH signal is that it is not emitted when > the apl interpreter > s

Re: Quad-PW on macOS

2024-12-25 Thread Dr . Jürgen Sauermann
Hi Mike, I have applied your patches - *SVN 1806*. A general problem with the SIGWINCH signal is that it is not emitted when the apl interpreter starts up (which make sense because the windows is not resized at that point in time). One could think of asking the window manager for the current

Re: Quad-PW on macOS

2024-12-23 Thread M.Hall
Yes, I see now the behavior is not quite right, is it? With INITIAL-⎕PW disabled, the ⎕PW still starts up at 80, ignoring the window width even with WINCH-SETS-⎕PW. Somehow we would have to detect if it was set, and use it only then, instead of always setting it. What I found unexpected was sett

Re: Quad-PW on macOS

2024-12-23 Thread Paul Rockwell
Jürgen, It's macOS that's the problem as Mike states. I've confirmed with a small C program that the ioctl TIOCGWINSZ has a different value on macOS than on Linux. WINCH-SETS-⎕PW works without the patch on Linux. With Mike's first patch, it works the same way on both platforms. I'm a little

Re: Quad-PW on macOS

2024-12-23 Thread M.Hall
WINCH-SETS-⎕PW did not originally work, on macOS Sonoma 14.7.2. Because macOS does not use the same TIOCGWINSZ magic number that was hard-coded. With the first patch, WINCH-SETS-⎕PW does now work on macOS. >From my original email: > I noticed that quad-pw wasn't changing with window resizes on mac

Re: Quad-PW on macOS

2024-12-22 Thread M.Hall
Paul Rockwell writes: > There may be a side effect, though. With the option set and Mike's code inserted, ⎕PW will be set to whatever the current terminal width is, not the IBM APL2 default of 80. Yes. There are three settings that interact: - command line "--PW xx" - preferences "INITIAL-⎕PW

Re: Quad-PW on macOS

2024-12-21 Thread Paul Rockwell
Jürgen, I tried enabling WINCH-SETS-⎕PW option in SVN 1802 running on macOS, and found that a windows resize did not does not resize the window in the macOS Terminal.app. Adding Mike Hall's proposed changes to main.cc , and ⎕PW will now set according to the window size. Ther

Re: Quad-PW on macOS

2024-12-21 Thread Henrik Moller
I was last night looking at an X11 alternative, Wayland.  Having started using X when it was still X10 (late 80s?), I agree it's very cool, but the biggest downside is that using it results in a huge amount of net  traffic, something Wayland doesn't do.  Of course, this might or might not have

Re: Quad-PW on macOS

2024-12-21 Thread Dr . Jürgen Sauermann
Hi Kacper, thanks for reminding us of that option. The user can specify this behavior in one of her *preference* files (i.e.*$HOME/.config/gnu-apl.d/preferences* for one user;s preferences, or */etc/gnu-apl.de/preferences* for system-wide GNU APL preferences. The option is: ##

Re: Quad-PW on macOS

2024-12-21 Thread Kacper Gutowski
On Sat, 21 Dec 2024 at 03:56, Blake McBride wrote: > Quad-PW should not change with the screen size. It is not used for screen > display only. Quad-PW should always default to 80 to be consistent with IBM > APL. GNU APL has an option to make it adjust automatically to the window size. It's not

Re: Quad-PW on macOS

2024-12-20 Thread Blake McBride
Quad-PW should not change with the screen size. It is not used for screen display only. Quad-PW should always default to 80 to be consistent with IBM APL. --blake On Fri, Dec 20, 2024 at 5:04 PM M.Hall wrote: > I noticed that quad-pw wasn't changing with window resizes on macOS > (Sonoma 14.

Quad-PW on macOS

2024-12-20 Thread M.Hall
I noticed that quad-pw wasn't changing with window resizes on macOS (Sonoma 14.7.2). Here's a patch; there's probably a better way to do it. I don't think it will break Linux builds, and it might help other OS (the BSDs maybe?), since not everyone has the same magic number for TIOCGWINSZ.. $ diff