Re: [PATCH v2 1/4] Cygwin: console: Add workaround for broken IL/DL in xterm mode.

2020-02-28 Thread Hans-Bernhard Bröker
Am 28.02.2020 um 14:31 schrieb Corinna Vinschen: [CC Hans] Thanks. I wasn't subscribed to -patches so far. Will change that. Hans, as for making a patch for this issue, may I leave it to you because you are already working on it? My patch was meant only as a minimally-invasive stop-gap fi

Re: [PATCH v2 1/4] Cygwin: console: Add workaround for broken IL/DL in xterm mode.

2020-02-29 Thread Hans-Bernhard Bröker
One more important note: the current implementation has a potential buffer overrun issue, because it writes first, and only then checks whether that may have overrun the buffer. And the check itself is off by one, too: wpbuf[wpixput++] = x; \ if (wpixput > WPBUF_LEN) \ wpixput--; \

Re: [PATCH v2 1/4] Cygwin: console: Add workaround for broken IL/DL in xterm mode.

2020-03-01 Thread Hans-Bernhard Bröker
Am 01.03.2020 um 07:33 schrieb Takashi Yano: However, from the view point of performance, just inline static function is better. I don't see how that could be the case. Inline methods of a static C++ object should not suffer any perfomance penalty compared to inline functions operating on

Copyright License waiver

2020-03-02 Thread Hans-Bernhard Bröker
To whom it may concern, I hereby grant anyone the rights to any use code I send here under the standard 2-clause BSD license statement as found, among other places, in winsup/cygwin/CONTRIBUTORS. Hans-Bernhard Bröker

[PATCH 0/1] Handle wpbuf in a more C++ style

2020-03-02 Thread Hans-Bernhard Bröker
Replace a relatively C-styled co-dependent pair of variables, a #define, and an inline function by a helper class containing their relation, because that is more in the C++ style. Hans-Bernhard Broeker (1): Collect handling of wpixput and wpbuf into a helper class. winsup/cygwin/fhandler_co

[PATCH 1/1] Collect handling of wpixput and wpbuf into a helper class.

2020-03-02 Thread Hans-Bernhard Bröker
Replace direct access to a pair of co-dependent variables by calls to methods of a class that encapsulates their relation. Also replace C #define by C++ class constant. --- winsup/cygwin/fhandler_console.cc | 135 -- 1 file changed, 70 insertions(+), 65 deletions(-)

Re: [PATCH 1/1] Collect handling of wpixput and wpbuf into a helper class.

2020-03-03 Thread Hans-Bernhard Bröker
Am 03.03.2020 um 01:35 schrieb Takashi Yano: The second argument DWORD *wn of sendOut() is not used outside sendOut(), so it can be covered up like: inline void sendOut (HANDLE &handle) { DWORD wn; WriteConsoleA (handle, buf, ixput, &wn, 0); } I doubt that will improve much, if anythin

[PATCH 0/2] wpbuf class-ification

2020-03-07 Thread Hans-Bernhard Bröker
Second shot at wpbuf class-ification. Also no longer request data from WriteConsoleA that is not used for anything. Hans-Bernhard Broeker (2): Collect handling of wpixput and wpbuf into a helper class. Do not bother passing optional argument to WriteConsoleA. winsup/cygwin/fhandler_console

[PATCH 0/2] wpbuf class-ification

2020-03-08 Thread Hans-Bernhard Bröker
Second shot at wpbuf class-ification. Also no longer request data from WriteConsoleA that is not used for anything. Hans-Bernhard Broeker (2): Collect handling of wpixput and wpbuf into a helper class. Do not bother passing optional argument to WriteConsoleA. winsup/cygwin/fhandler_console

[PATCH 2/2] Do not bother passing optional argument to WriteConsoleA.

2020-03-08 Thread Hans-Bernhard Bröker
Passing a pointer to a local variable to WriteConsoleA is not actually needed if we're not going to do anything with what WriteConsoleA would put in there. For the wpbuf class the pointer argument was made optional, so it can be just left out; other call places now pass a NULL pointer instead. T

[PATCH 1/2] Collect handling of wpixput and wpbuf into a helper class.

2020-03-08 Thread Hans-Bernhard Bröker
Replace direct access to a pair of co-dependent variables by calls to methods of a class that encapsulates their relation. Also replace C #define by C++ class constant. --- winsup/cygwin/fhandler_console.cc | 141 -- 1 file changed, 76 insertions(+), 65 deletions(-)

Re: [PATCH 1/2] Treat Windows Store's "app execution aliases" as symbolic links

2021-03-15 Thread Hans-Bernhard Bröker
Am 15.03.2021 um 04:19 schrieb Johannes Schindelin via Cygwin-patches: Hi Joe, On Sat, 13 Mar 2021, Joe Lowe wrote: I agree on the usefulness to the user of showing appexec target executable as symlink target. But I am uncertain about the effect on code. Maybe. But I am concerned about the e

Re: [PATCH 1/2] Treat Windows Store's "app execution aliases" as symbolic links

2021-03-22 Thread Hans-Bernhard Bröker
Am 22.03.2021 um 16:22 schrieb Johannes Schindelin: On Mon, 15 Mar 2021, Hans-Bernhard Bröker wrote: Am 15.03.2021 um 04:19 schrieb Johannes Schindelin via Cygwin-patches: That argument might hold more sway if Windows itself didn't quite so completely hide that information from users

Re: [PATCH 1/2] Treat Windows Store's "app execution aliases" as symbolic links

2021-03-24 Thread Hans-Bernhard Bröker
Am 23.03.2021 um 10:30 schrieb Corinna Vinschen via Cygwin-patches: > On Mar 22 22:54, Hans-Bernhard Bröker wrote: >> Am 22.03.2021 um 16:22 schrieb Johannes Schindelin: >>> One of those under-documented reparse point types is the WSL symbolic >>> link, which you w

Re: [PATCH 1/2] Treat Windows Store's "app execution aliases" as symbolic links

2021-03-25 Thread Hans-Bernhard Bröker
Am 24.03.2021 um 21:58 schrieb Ken Brown: On 3/24/2021 2:55 PM, Hans-Bernhard Bröker wrote: Am 23.03.2021 um 10:30 schrieb Corinna Vinschen via Cygwin-patches:  > On Mar 22 22:54, Hans-Bernhard Bröker wrote:  >> Am 22.03.2021 um 16:22 schrieb Johannes Schindelin: It's what WSL

Re: [PATCH v8] Cygwin: pipe: Switch pipe mode to blocking mode by default

2024-10-31 Thread Hans-Bernhard Bröker
Am 31.10.2024 um 17:25 schrieb Takashi Yano: On Thu, 31 Oct 2024 11:15:59 +0100 Corinna Vinschen wrote: Yes, I will, but this is still puzzeling. While negative shift values are undefined in C, there's this: [...] I guess the compiler ommitted the undefined calculation. Precisely. Using neg