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

Renamed files to fit in 8.3, be (slightly) more informative.
Author: William McBrine
Author date (UTC): 2019-01-30 16:05
Committer name: William McBrine
Committer date (UTC): 2019-01-30 16:05
Parent(s): f791b1fc8bd296e98e0c36e8cf91d944126bd91d
Signing key:
Tree: a890ba115906a25861c5d0c97ab4d2a0ff7b830e
File Lines added Lines deleted
common/font437.h 1 1
common/icon32.xbm 3 3
common/icon64.xbm 3 3
common/iconbmp.h 2 2
sdl1/README.md 3 3
sdl1/pdcscrn.c 5 5
sdl2/README.md 3 3
sdl2/pdcscrn.c 5 5
x11/x11.c 12 12
File common/font437.h renamed from common/deffont.h (similarity 99%) (mode: 100644) (index 4366e0cc..1157953b)
3 3 based on the pc8x16s.bdf font from the vgafonts.tar.gz package, by based on the pc8x16s.bdf font from the vgafonts.tar.gz package, by
4 4 "Myrlin". */ "Myrlin". */
5 5
6 unsigned char deffont[] =
6 unsigned char font437[] =
7 7 { {
8 8 0x42, 0x4d, 0x3e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x42, 0x4d, 0x3e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e,
9 9 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
File common/icon32.xbm renamed from common/little_icon.xbm (similarity 88%) (mode: 100644) (index d3e777e8..a2da9987)
1 #define little_icon_width 32
2 #define little_icon_height 32
3 static unsigned char little_icon_bits[] = {
1 #define icon32_width 32
2 #define icon32_height 32
3 static unsigned char icon32_bits[] = {
4 4 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5 5 0x00, 0xfc, 0x30, 0x00, 0x00, 0xfc, 0x31, 0x00, 0x00, 0x8c, 0x33, 0x00, 0x00, 0xfc, 0x30, 0x00, 0x00, 0xfc, 0x31, 0x00, 0x00, 0x8c, 0x33, 0x00,
6 6 0x00, 0x0c, 0x33, 0x00, 0x00, 0x0c, 0x33, 0x00, 0x00, 0x8c, 0x33, 0x00, 0x00, 0x0c, 0x33, 0x00, 0x00, 0x0c, 0x33, 0x00, 0x00, 0x8c, 0x33, 0x00,
File common/icon64.xbm renamed from common/big_icon.xbm (similarity 97%) (mode: 100644) (index 04b98a5b..769b711c)
1 #define big_icon_width 64
2 #define big_icon_height 64
3 static unsigned char big_icon_bits[] = {
1 #define icon64_width 64
2 #define icon64_height 64
3 static unsigned char icon64_bits[] = {
4 4 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5 5 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6 6 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
File common/iconbmp.h renamed from common/deficon.h (similarity 93%) (mode: 100644) (index 8e22ed2c..c543ced8)
1 /* The PDCurses logo as #include'able BMP (from little_icon.xbm),
1 /* The PDCurses logo as #include'able BMP (from icon32.xbm),
2 2 for use by SDL. */ for use by SDL. */
3 3
4 unsigned char deficon[] =
4 unsigned char iconbmp[] =
5 5 { {
6 6 0x42, 0x4d, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x42, 0x4d, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e,
7 7 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
File sdl1/README.md changed (mode: 100644) (index 6617286f..e3ddc32c)
... ... not relying on correct values for the ACS_* macros.
57 57 The font can be set via the environment variable PDC_FONT. If it's not The font can be set via the environment variable PDC_FONT. If it's not
58 58 set, PDCurses looks for a file named "pdcfont.bmp" in the current set, PDCurses looks for a file named "pdcfont.bmp" in the current
59 59 directory at the time of initscr(). If neither is found, it uses the directory at the time of initscr(). If neither is found, it uses the
60 built-in default font encoded in deffont.h.
60 built-in default font encoded in font437.h.
61 61
62 62
63 63 ### 16-bit mode ### 16-bit mode
 
... ... Icons
94 94
95 95 The icon (used with SDL_WM_SetIcon() -- not used for the executable The icon (used with SDL_WM_SetIcon() -- not used for the executable
96 96 file) can be set via the environment variable PDC_ICON, and falls back file) can be set via the environment variable PDC_ICON, and falls back
97 to "pdcicon.bmp", and then to the built-in icon from deficon.h. The
98 built-in icon is the PDCurses logo, as seen in ../x11/little_icon.xbm.
97 to "pdcicon.bmp", and then to the built-in icon from iconbmp.h. The
98 built-in icon is the PDCurses logo, as seen in ../common/icon32.xbm.
99 99
100 100 If pdc_screen is preinitialized (see below), PDCurses does not attempt If pdc_screen is preinitialized (see below), PDCurses does not attempt
101 101 to set the icon. to set the icon.
File sdl1/pdcscrn.c changed (mode: 100644) (index d8e0dc5e..8a0609a8)
4 4
5 5 #include <stdlib.h> #include <stdlib.h>
6 6 #ifndef PDC_WIDE #ifndef PDC_WIDE
7 #include "../common/deffont.h"
7 #include "../common/font437.h"
8 8 #endif #endif
9 #include "../common/deficon.h"
9 #include "../common/iconbmp.h"
10 10
11 11 #ifdef PDC_WIDE #ifdef PDC_WIDE
12 12 # ifndef PDC_FONT_PATH # ifndef PDC_FONT_PATH
 
... ... int PDC_scr_open(int argc, char **argv)
190 190 } }
191 191
192 192 if (!pdc_font) if (!pdc_font)
193 pdc_font = SDL_LoadBMP_RW(SDL_RWFromMem(deffont, sizeof(deffont)), 0);
193 pdc_font = SDL_LoadBMP_RW(SDL_RWFromMem(font437, sizeof(font437)), 0);
194 194
195 195 if (!pdc_font) if (!pdc_font)
196 196 { {
 
... ... int PDC_scr_open(int argc, char **argv)
234 234 pdc_icon = SDL_LoadBMP(iname ? iname : "pdcicon.bmp"); pdc_icon = SDL_LoadBMP(iname ? iname : "pdcicon.bmp");
235 235
236 236 if (!pdc_icon) if (!pdc_icon)
237 pdc_icon = SDL_LoadBMP_RW(SDL_RWFromMem(deficon,
238 sizeof(deficon)), 0);
237 pdc_icon = SDL_LoadBMP_RW(SDL_RWFromMem(iconbmp,
238 sizeof(iconbmp)), 0);
239 239
240 240 if (pdc_icon) if (pdc_icon)
241 241 SDL_WM_SetIcon(pdc_icon, NULL); SDL_WM_SetIcon(pdc_icon, NULL);
File sdl2/README.md changed (mode: 100644) (index 7d5c30eb..db2e71b9)
... ... not relying on correct values for the ACS_* macros.
64 64 The font can be set via the environment variable PDC_FONT. If it's not The font can be set via the environment variable PDC_FONT. If it's not
65 65 set, PDCurses looks for a file named "pdcfont.bmp" in the current set, PDCurses looks for a file named "pdcfont.bmp" in the current
66 66 directory at the time of initscr(). If neither is found, it uses the directory at the time of initscr(). If neither is found, it uses the
67 built-in default font encoded in deffont.h.
67 built-in default font encoded in font437.h.
68 68
69 69
70 70 ### 16-bit mode ### 16-bit mode
 
... ... Icons
107 107
108 108 The icon (used with SDL_SetWindowIcon() -- not used for the executable The icon (used with SDL_SetWindowIcon() -- not used for the executable
109 109 file) can be set via the environment variable PDC_ICON, and falls back file) can be set via the environment variable PDC_ICON, and falls back
110 to "pdcicon.bmp", and then to the built-in icon from deficon.h. The
111 built-in icon is the PDCurses logo, as seen in ../x11/little_icon.xbm.
110 to "pdcicon.bmp", and then to the built-in icon from iconbmp.h. The
111 built-in icon is the PDCurses logo, as seen in ../common/icon32.xbm.
112 112
113 113 If pdc_screen is preinitialized (see below), PDCurses does not attempt If pdc_screen is preinitialized (see below), PDCurses does not attempt
114 114 to set the icon. to set the icon.
File sdl2/pdcscrn.c changed (mode: 100644) (index 5e96a50c..7edd98a4)
4 4
5 5 #include <stdlib.h> #include <stdlib.h>
6 6 #ifndef PDC_WIDE #ifndef PDC_WIDE
7 # include "../common/deffont.h"
7 # include "../common/font437.h"
8 8 #endif #endif
9 #include "../common/deficon.h"
9 #include "../common/iconbmp.h"
10 10
11 11 #ifdef PDC_WIDE #ifdef PDC_WIDE
12 12 # ifndef PDC_FONT_PATH # ifndef PDC_FONT_PATH
 
... ... int PDC_scr_open(int argc, char **argv)
200 200 } }
201 201
202 202 if (!pdc_font) if (!pdc_font)
203 pdc_font = SDL_LoadBMP_RW(SDL_RWFromMem(deffont, sizeof(deffont)), 0);
203 pdc_font = SDL_LoadBMP_RW(SDL_RWFromMem(font437, sizeof(font437)), 0);
204 204
205 205 if (!pdc_font) if (!pdc_font)
206 206 { {
 
... ... int PDC_scr_open(int argc, char **argv)
244 244 pdc_icon = SDL_LoadBMP(iname ? iname : "pdcicon.bmp"); pdc_icon = SDL_LoadBMP(iname ? iname : "pdcicon.bmp");
245 245
246 246 if (!pdc_icon) if (!pdc_icon)
247 pdc_icon = SDL_LoadBMP_RW(SDL_RWFromMem(deficon,
248 sizeof(deficon)), 0);
247 pdc_icon = SDL_LoadBMP_RW(SDL_RWFromMem(iconbmp,
248 sizeof(iconbmp)), 0);
249 249 } }
250 250
251 251 if (pdc_own_window) if (pdc_own_window)
File x11/x11.c changed (mode: 100644) (index 4d8947b0..f321c877)
... ... XCursesAppData xc_app_data;
46 46
47 47 /* Default icons for XCurses applications. */ /* Default icons for XCurses applications. */
48 48
49 #include "../common/big_icon.xbm"
50 #include "../common/little_icon.xbm"
49 #include "../common/icon64.xbm"
50 #include "../common/icon32.xbm"
51 51
52 52 static void _selection_off(void); static void _selection_off(void);
53 53 static void _display_cursor(int, int, int, int); static void _display_cursor(int, int, int, int);
 
... ... static void _get_icon(void)
888 888 icon_size[i].width_inc, icon_size[i].height_inc)); icon_size[i].width_inc, icon_size[i].height_inc));
889 889 } }
890 890
891 if (max_width >= big_icon_width && max_height >= big_icon_height)
891 if (max_width >= icon64_width && max_height >= icon64_height)
892 892 { {
893 icon_bitmap_width = big_icon_width;
894 icon_bitmap_height = big_icon_height;
895 bitmap_bits = (unsigned char *)big_icon_bits;
893 icon_bitmap_width = icon64_width;
894 icon_bitmap_height = icon64_height;
895 bitmap_bits = (unsigned char *)icon64_bits;
896 896 } }
897 897 else else
898 898 { {
899 icon_bitmap_width = little_icon_width;
900 icon_bitmap_height = little_icon_height;
901 bitmap_bits = (unsigned char *)little_icon_bits;
899 icon_bitmap_width = icon32_width;
900 icon_bitmap_height = icon32_height;
901 bitmap_bits = (unsigned char *)icon32_bits;
902 902 } }
903 903
904 904 } }
905 905 else /* use small icon */ else /* use small icon */
906 906 { {
907 icon_bitmap_width = little_icon_width;
908 icon_bitmap_height = little_icon_height;
909 bitmap_bits = (unsigned char *)little_icon_bits;
907 icon_bitmap_width = icon32_width;
908 icon_bitmap_height = icon32_height;
909 bitmap_bits = (unsigned char *)icon32_bits;
910 910 } }
911 911
912 912 XFree(icon_size); XFree(icon_size);
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