Skip to content

Commit b7b7a86

Browse files
authored
4.8.33 (#113)
* #113 - legacy owc * #114 - warnings * #115 - widechar handling
1 parent c29dd79 commit b7b7a86

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+14063
-665
lines changed

.github/workflows/build.yml

+22-4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ jobs:
3232
toolchain: owc20,
3333
toolversion: owc20
3434
}
35+
- {
36+
name: "Windows Legacy OWC",
37+
os: windows-latest,
38+
toolchain: owc19,
39+
toolversion: owc19
40+
}
3541

3642
steps:
3743

@@ -66,32 +72,42 @@ jobs:
6672
version: "2.0"
6773
location: "C:\\Watcom"
6874

75+
- name: OpenWatcom legacy setup
76+
uses: open-watcom/setup-watcom@v0
77+
if: startsWith(matrix.config.name, 'Windows Legacy OWC')
78+
with:
79+
version: "1.9"
80+
location: "C:\\Watcom"
81+
6982
- name: Windows extra
70-
if: startsWith(matrix.config.name, 'Windows Latest MSVC') || startsWith(matrix.config.name, 'Windows Latest OWC')
83+
if: contains(matrix.config.name, 'MSVC') || contains(matrix.config.name, 'OWC')
7184
run: |
7285
c:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-gettext-tools
7386
7487
- name: Generate
75-
if: startsWith(matrix.config.name, 'Windows Latest')
88+
if: startsWith(matrix.config.name, 'Windows')
7689
shell: cmd
7790
run: |
7891
@if "${{ matrix.config.toolchain }}"=="mingw32" set PATH=c:\msys64\mingw32\bin;%PATH%
7992
@if "${{ matrix.config.toolchain }}"=="mingw64" set PATH=c:\msys64\mingw64\bin;%PATH%
8093
@if "${{ matrix.config.toolchain }}"=="owc20" call .\mcwin32\support\owc20setenv.bat C:\Watcom
94+
@if "${{ matrix.config.toolchain }}"=="owc19" call .\mcwin32\support\owc19setenv.bat C:\Watcom
8195
@set BUSYBOX=./support/busybox
8296
@if "${{ matrix.config.toolchain }}"=="mingw64" set BUSYBOX=./support/busybox64
8397
@set PERL=c:/Strawberry/perl/bin/perl
8498
cd mcwin32
85-
c:/Strawberry/perl/bin/perl makelib.pl --perlpath=c:/Strawberry/perl/bin --busybox=%BUSYBOX% --verbose "${{ matrix.config.toolchain }}"
99+
c:/Strawberry/perl/bin/perl makelib.pl --perlpath=c:/Strawberry/perl/bin --busybox=%BUSYBOX% "${{ matrix.config.toolchain }}"
86100
87101
- name: Compile
88-
if: startsWith(matrix.config.name, 'Windows Latest')
102+
if: startsWith(matrix.config.name, 'Windows')
89103
shell: cmd
90104
run: |
91105
@if "${{ matrix.config.toolchain }}"=="mingw32" set PATH=c:\msys64\mingw32\bin;%PATH%
92106
@if "${{ matrix.config.toolchain }}"=="mingw64" set PATH=c:\msys64\mingw64\bin;%PATH%
93107
@if "${{ matrix.config.toolchain }}"=="owc20" call .\mcwin32\support\owc20setenv.bat C:\Watcom
94108
@if "${{ matrix.config.toolchain }}"=="owc20" set PATH=%PATH%;c:\msys64\mingw64\bin
109+
@if "${{ matrix.config.toolchain }}"=="owc19" call .\mcwin32\support\owc19setenv.bat C:\Watcom
110+
@if "${{ matrix.config.toolchain }}"=="owc19" set PATH=%PATH%;c:\msys64\mingw64\bin
95111
@if "${{ matrix.config.toolchain }}"=="vc2022" set PATH=%PATH%;c:\msys64\mingw64\bin
96112
@set PERL=c:/Strawberry/perl/bin/perl
97113
cd mcwin32
@@ -104,6 +120,7 @@ jobs:
104120
path: mcwin32/bin.${{ matrix.config.toolversion }}/release/*
105121

106122
- name: Installer
123+
if: startsWith(matrix.config.name, 'Windows')
107124
shell: cmd
108125
run: |
109126
@set PERL=c:/Strawberry/perl/bin/perl
@@ -113,6 +130,7 @@ jobs:
113130
"%programfiles(x86)%\Inno Setup 5\ISCC" -DBUILD_INFO=1 -DBUILD_TYPE=release ".\releases\mc-inno-setup.iss"
114131
115132
- name: Release artifacts
133+
if: startsWith(matrix.config.name, 'Windows')
116134
uses: softprops/action-gh-release@v1
117135
with:
118136
files: ./mcwin32/releases/mcwin32-build*-setup.exe

mcsrc/src/main.c

+10-1
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,10 @@ main (int argc, char *argv[])
269269
int exit_code = EXIT_FAILURE;
270270
const char *tmpdir = NULL;
271271

272+
#if defined(WIN32)
273+
WIN32_HeapInit ();
274+
#endif
275+
272276
mc_global.run_from_parent_mc = !check_sid ();
273277

274278
/* We had LC_CTYPE before, LC_ALL includes LC_TYPE as well */
@@ -590,7 +594,12 @@ main (int argc, char *argv[])
590594
exit_code = EXIT_FAILURE;
591595
}
592596

593-
(void) putchar ('\n'); /* Hack to make shell's prompt start at left of screen */
597+
(void) putchar ('\n');
598+
/* Hack to make shell's prompt start at left of screen */
599+
600+
#if defined(WIN32)
601+
WIN32_HeapCheck ();
602+
#endif
594603

595604
return exit_code;
596605
}

mcsrc/src/subshell/common.c

+11-4
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,11 @@ init_subshell_child (const char *pty_name)
315315
{
316316
char sid_str[BUF_SMALL];
317317

318-
g_snprintf (sid_str, sizeof (sid_str), "MC_SID=%ld", (long) mc_sid);
319-
putenv (g_strdup (sid_str));
318+
//WIN32,setenv
319+
//g_snprintf (sid_str, sizeof (sid_str), "MC_SID=%ld", (long) mc_sid);
320+
//putenv (g_strdup (sid_str));
321+
g_snprintf (sid_str, sizeof (sid_str), "%ld", (long) mc_sid);
322+
g_setenv ("MC_SID", sid_str);
320323
}
321324

322325
switch (mc_global.shell->type)
@@ -334,7 +337,9 @@ init_subshell_child (const char *pty_name)
334337

335338
/* Make MC's special commands not show up in bash's history and also suppress
336339
* consecutive identical commands*/
337-
putenv ((char *) "HISTCONTROL=ignoreboth");
340+
//WIN32,setenv
341+
//putenv ((char *) "HISTCONTROL=ignoreboth");
342+
g_setenv ("HISTCONTROL", "ignoreboth");
338343

339344
/* Allow alternative readline settings for MC */
340345
{
@@ -382,7 +387,9 @@ init_subshell_child (const char *pty_name)
382387
g_setenv ("ENV", init_file, FALSE);
383388

384389
/* Make MC's special commands not show up in history */
385-
putenv ((char *) "HISTCONTROL=ignorespace");
390+
//WIN32,setenv
391+
//putenv ((char *) "HISTCONTROL=ignorespace");
392+
g_setenv ("HISTCONTROL", "ignorespace");
386393

387394
break;
388395

mcsrc/src/vfs/shell/shell.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ shell_dir_load (struct vfs_class *me, struct vfs_s_inode *dir, const char *remot
10151015

10161016
vfs_print_message (_("shell: Reading directory %s..."), remote_path);
10171017

1018-
dir->timestamp = g_get_monotonic_time () + shell_directory_timeout * G_USEC_PER_SEC;
1018+
dir->timestamp = g_get_monotonic_time () + ((gint64)shell_directory_timeout * G_USEC_PER_SEC);
10191019

10201020
quoted_path = str_shell_escape (remote_path);
10211021
(void) shell_command_v (me, super, NONE, SHELL_SUPER (super)->scr_ls, "SHELL_FILENAME=%s;\n",

0 commit comments

Comments
 (0)