xaizek / vifm-pdcurses (License: mostly public domain) (since 2019-03-20)
PDCurses 3.4 with vifm-specific patches applied (a couple were upstreamed)
Commit aae6b4c292b1a3d100a94f43705b63b9aceaa617

Fix reverse attribute on Windows
Was also posted at

https://sourceforge.net/p/pdcurses/discussion/95730/thread/395ac4ed/
Author: xaizek
Author date (UTC): 2019-03-20 12:24
Committer name: xaizek
Committer date (UTC): 2019-03-20 12:24
Parent(s): 61172e68ea685ebbfd135ba8898bf6b1ecbab04b
Signing key: 99DC5E4DB05F6BE2
Tree: 04fa8a0171f97769440fb88c1e17dbea7cd42c16
File Lines added Lines deleted
win32/pdcscrn.c 5 3
File win32/pdcscrn.c changed (mode: 100644) (index da84cdeb..4d9ce510)
... ... void PDC_init_pair(short pair, short fg, short bg)
555 555
556 556 for (i = 0; i < PDC_OFFSET; i++) for (i = 0; i < PDC_OFFSET; i++)
557 557 { {
558 const int reverse = (i & (A_REVERSE >> PDC_ATTR_SHIFT));
559
558 560 att = fg | (bg << 4); att = fg | (bg << 4);
559 561
560 if (i & (A_REVERSE >> PDC_ATTR_SHIFT))
562 if (reverse)
561 563 att = bg | (fg << 4); att = bg | (fg << 4);
562 564 if (i & (A_UNDERLINE >> PDC_ATTR_SHIFT)) if (i & (A_UNDERLINE >> PDC_ATTR_SHIFT))
563 565 /* No underscores in Windows terminals. */ /* No underscores in Windows terminals. */
 
... ... void PDC_init_pair(short pair, short fg, short bg)
568 570 att = temp_bg << 4 | temp_bg; att = temp_bg << 4 | temp_bg;
569 571 } }
570 572 if (i & (A_BOLD >> PDC_ATTR_SHIFT)) if (i & (A_BOLD >> PDC_ATTR_SHIFT))
571 att |= 8;
573 att |= reverse ? 128 : 8;
572 574 if (i & (A_BLINK >> PDC_ATTR_SHIFT)) if (i & (A_BLINK >> PDC_ATTR_SHIFT))
573 att |= 128;
575 att |= reverse ? 8 : 128;
574 576
575 577 pdc_atrtab[pair * PDC_OFFSET + i] = att; pdc_atrtab[pair * PDC_OFFSET + i] = att;
576 578 } }
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm-pdcurses

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm-pdcurses

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master