Thank you for citing the lines and function calls. I was not aware that 
those win32 api calls were used in the ncurses library.

SetConsoleTextAttribute and GetConsoleScreenBufferInfo (and some others 
I see now) are all "console functions", related to the windows console. 
A curses program runs within a windows console, so in retrospect it 
makes perfect sense.

Back to the original assertion, that 'non-Cygwin ncurses programs were 
supposed to belong into the group of "regular Windows programs"', that a 
windows curses app (eg, mc or vim) running within a console window is 
basically the same as a win32 api program, I still disagree with that. 
First, of course "regular windows programs" (not my phrase) is ill 
defined. Even so, the fact that the ncurses library uses win32 api 
function calls to communicate with the windows console does not change 
the reality that curses programs do not have WinMain, do not use a 
message loop, and many other fundamental differences. curses programs 
running under windows are limited to running in a windows console. It 
seems a broad over-generalization and not useful in practice to lump 
together curses apps (eg, mc) and win32 api apps (eg, microsoft word).

Again, thanks for clearing up the question on those source files. I 
learned something.

Daniel

On 2/18/2016 12:08 AM, Fabrice Popineau wrote:
>
>
> 2016-02-18 6:55 GMT+01:00 Daniel Goldman <[email protected]
> <mailto:[email protected]>>:
>
>
>     I cannot go through these files line by line to prove that each line
>     does not "use the win32 api". In contrast, all you need to do is cite a
>     few lines that "use the win32 api", and I would be happy to reconsider.
>
>
> In win_driver.c, you get a bunch of GetConsoleXXXX and SetConsoleXXXX calls.
> Look for example at the wcon_setcolor() function :
>
> static void
> wcon_setcolor(TERMINAL_CONTROL_BLOCK * TCB,
>       int fore,
>       int color,
>       int (*outc) (SCREEN *, int) GCC_UNUSED)
> {
>      if (okConsoleHandle(TCB)) {
> WORD a = MapColor(fore, color);
> a |= (WORD) ((CON.SBI.wAttributes) & (fore ? 0xfff8 : 0xff8f));
> SetConsoleTextAttribute(CON.hdl, a);
> get_SBI();
>      }
> }
>
> SetConsoleTextAttribute() is Win32 API.
>
> Fabrice
>

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to