Repository: dankamongmen/notcurses (language: python)

Issue:
`ncprogbar_options` is different in implementation and in docs
I have no context but this is confusing and seems wrong.

# Documentation

Claims it's made of three `uint64_t`.

`USAGE.md`
```h
typedef struct ncprogbar_options {
  // channels for the maximum and minimum points. linear interpolation will be
  // applied across the domain between these two.
  uint64_t maxchannels;
  uint64_t minchannels;
  uint64_t flags;
} ncprogbar_options;
```

`doc/man/man3/notcurses_progbar.3.md`
```h
typedef struct ncprogbar_options {
  uint64_t maxchannels;
  uint64_t minchannels;
  uint64_t flags;
} ncprogbar_options;
```

# Implementation

Assumes it's actually four `uint32_t` and one `uint64_t`

`include/notcurses/notcurses.h`
```h
typedef struct ncprogbar_options {
  uint32_t ulchannel; // upper-left channel. in the context of a progress bar,
  uint32_t urchannel; // "up" is the direction we are progressing towards, and
  uint32_t blchannel; // "bottom" is the direction of origin. for monochromatic
  uint32_t brchannel; // bar, all four channels ought be the same.
  uint64_t flags;
} ncprogbar_options;
```

`src/lib/progbar.c`
```c
ret->ulchannel = opts->ulchannel;
ret->urchannel = opts->urchannel;
ret->blchannel = opts->blchannel;
ret->brchannel = opts->brchannel;
ret->retrograde = opts->flags & NCPROGBAR_OPTION_RETROGRADE;
```
`ncprogbar_options` is different in implementation and in docs
I have no context but this is confusing and seems wrong.

# Documentation

Claims it's made of three `uint64_t`.

`USAGE.md`
```h
typedef struct ncprogbar_options {
  // channels for the maximum and minimum points. linear interpolation will be
  // applied across the domain between these two.
  uint64_t maxchannels;
  uint64_t minchannels;
  uint64_t flags;
} ncprogbar_options;
```

`doc/man/man3/notcurses_progbar.3.md`
```h
typedef struct ncprogbar_options {
  uint64_t maxchannels;
  uint64_t minchannels;
  uint64_t flags;
} ncprogbar_options;
```

# Implementation

Assumes it's actually four `uint32_t` and one `uint64_t`

`include/notcurses/notcurses.h`
```h
typedef struct ncprogbar_options {
  uint32_t ulchannel; // upper-left channel. in the context of a progress bar,
  uint32_t urchannel; // "up" is the direction we are progressing towards, and
  uint32_t blchannel; // "bottom" is the direction of origin. for monochromatic
  uint32_t brchannel; // bar, all four channels ought be the same.
  uint64_t flags;
} ncprogbar_options;
```

`src/lib/progbar.c`
```c
ret->ulchannel = opts->ulchannel;
ret->urchannel = opts->urchannel;
ret->blchannel = opts->blchannel;
ret->brchannel = opts->brchannel;
ret->retrograde = opts->flags & NCPROGBAR_OPTION_RETROGRADE;
```


Discussion / hints:

Fix patch:
diff --git a/USAGE.md b/USAGE.md
index f90da0dd7..35f1e8f0b 100644
--- a/USAGE.md
+++ b/USAGE.md
@@ -2830,10 +2830,10 @@ struct ncprogbar* ncprogbar_create(struct ncplane* n, const ncprogbar_options* o
 #define NCPROGBAR_OPTION_RETROGRADE        0x0001u // proceed left/down
 
 typedef struct ncprogbar_options {
-  // channels for the maximum and minimum points. linear interpolation will be
-  // applied across the domain between these two.
-  uint64_t maxchannels;
-  uint64_t minchannels;
+  uint32_t ulchannel; // upper-left channel. in the context of a progress bar,
+  uint32_t urchannel; // "up" is the direction we are progressing towards, and
+  uint32_t blchannel; // "bottom" is the direction of origin. for monochromatic
+  uint32_t brchannel; // bar, all four channels ought be the same.
   uint64_t flags;
 } ncprogbar_options;
 
diff --git a/doc/man/man3/notcurses_progbar.3.md b/doc/man/man3/notcurses_progbar.3.md
index 25e0f8228..27394bd62 100644
--- a/doc/man/man3/notcurses_progbar.3.md
+++ b/doc/man/man3/notcurses_progbar.3.md
@@ -16,8 +16,10 @@ struct ncprogbar;
 #define NCPROGBAR_OPTION_RETROGRADE        0x0001u // proceed left/down
 
 typedef struct ncprogbar_options {
-  uint64_t maxchannels;
-  uint64_t minchannels;
+  uint32_t ulchannel; // upper-left channel. in the context of a progress bar,
+  uint32_t urchannel; // "up" is the direction we are progressing towards, and
+  uint32_t blchannel; // "bottom" is the direction of origin. for monochromatic
+  uint32_t brchannel; // bar, all four channels ought be the same.
   uint64_t flags;
 } ncprogbar_options;
 ```


Test patch:
diff --git a/.github/workflows/windows_test.yml b/.github/workflows/windows_test.yml
index 0e33768a6..40f41fabd 100644
--- a/.github/workflows/windows_test.yml
+++ b/.github/workflows/windows_test.yml
@@ -16,7 +16,7 @@ jobs:
       COLORTERM: truecolor
       TERM: xterm
     name: 🏁 build, test, & install
-    runs-on: windows-latest
+    runs-on: windows-2022
 
     steps: