bemenu/lib/renderers/curses
Michael Vetter 0f6e1625b5 Rename stdscr to stdscreen to prevent collision
On my system I get:
```
[    3s] cd /home/abuild/rpmbuild/BUILD/bemenu-0.3.0/build/lib/renderers/x11 && /usr/bin/cc -DPANGO_DISABLE_DEPRECATED -D_GNU_SOURCE -Dbemenu_renderer_x11_EXPORTS -I/home/abuild/rpmbuild/BUI
LD/bemenu-0.3.0/build/lib -I/home/abuild/rpmbuild/BUILD/bemenu-0.3.0/lib/renderers/.. -I/home/abuild/rpmbuild/BUILD/bemenu-0.3.0/build/lib/renderers/x11 -I/usr/include/cairo -I/usr/include/g
lib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/uuid -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/inc
lude/fribidi  -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -DNDEBUG   -Wall
-Wextra -Wno-variadic-macros -Wno-long-long -O2 -g -DNDEBUG -fPIC   -std=c99 -o CMakeFiles/bemenu-renderer-x11.dir/xkb_unicode.c.o   -c /home/abuild/rpmbuild/BUILD/bemenu-0.3.0/lib/renderers
/x11/xkb_unicode.c
[    3s] [ 55%] Building C object lib/CMakeFiles/bemenu.dir/3rdparty/cdl.c.o
[    3s] cd /home/abuild/rpmbuild/BUILD/bemenu-0.3.0/build/lib && /usr/bin/cc -D_GNU_SOURCE -Dbemenu_EXPORTS -I/home/abuild/rpmbuild/BUILD/bemenu-0.3.0/build/lib  -O2 -Wall -D_FORTIFY_SOURCE
=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -DNDEBUG   -Wall -Wextra -Wno-variadic-macros -Wno-long-lo
ng -O2 -g -DNDEBUG -fPIC   -std=c99 -o CMakeFiles/bemenu.dir/3rdparty/cdl.c.o   -c /home/abuild/rpmbuild/BUILD/bemenu-0.3.0/lib/3rdparty/cdl.c
[    3s] In file included from /usr/include/ncurses.h:60,
[    3s]                  from /home/abuild/rpmbuild/BUILD/bemenu-0.3.0/lib/renderers/curses/curses.c:14:
[    3s] /home/abuild/rpmbuild/BUILD/bemenu-0.3.0/lib/renderers/curses/curses.c:27:13: error: field '_nc_stdscr' declared as a function
[    3s]    27 |     WINDOW *stdscr;
[    3s]       |             ^~~~~~
[    3s] /home/abuild/rpmbuild/BUILD/bemenu-0.3.0/lib/renderers/curses/curses.c: In function 'terminate':
[    3s] /home/abuild/rpmbuild/BUILD/bemenu-0.3.0/lib/renderers/curses/curses.c:97:19: error: lvalue required as left operand of assignment
[    3s]    97 |     curses.stdscr = NULL;
[    3s]       |                   ^
[    3s] /home/abuild/rpmbuild/BUILD/bemenu-0.3.0/lib/renderers/curses/curses.c: In function 'render':
[    3s] /home/abuild/rpmbuild/BUILD/bemenu-0.3.0/lib/renderers/curses/curses.c:190:28: error: lvalue required as left operand of assignment
[    3s]   190 |         if ((curses.stdscr = initscr()) == NULL)
[    3s]       |                            ^
```

`man stdscr` sais: "Upon  initializing curses, a default window called stdscr, which is the size of the terminal screen, is created.".

So it seems for some reason there happens a collision here.

Let's rename the window so this doesn't happen.
2019-12-27 14:47:06 +01:00
..
CMakeLists.txt Add options for renderers, make deps required 2019-03-25 09:44:45 +01:00
curses.c Rename stdscr to stdscreen to prevent collision 2019-12-27 14:47:06 +01:00