Globally replace OS2_NT and _OS_NT with WIN32_NATIVE.

This commit is contained in:
Pavel Roskin 2002-09-10 22:04:11 +00:00
parent 9c04fa4313
commit ec1b1f9614
35 changed files with 115 additions and 115 deletions

View File

@ -1,3 +1,7 @@
2002-09-10 Pavel Roskin <proski@gnu.org>
Globally replace OS2_NT and _OS_NT with WIN32_NATIVE.
2002-09-07 Pavel Roskin <proski@gnu.org>
* configure.in: Eliminate --with-terminfo option, which was

View File

@ -74,7 +74,7 @@ Concurrent subshell is not supported.
2.1. Changes to main code
-------------------------
Changes in the main code are enclosed in #ifdef _OS_NT blocks.
Changes in the main code are enclosed in #ifdef NATIVE_WIN32 blocks.
In some cases we suppressed code. This is temporal (so that mc can compile).
In the future we will provide fake or true interfaces for these features.

View File

@ -25,11 +25,7 @@ the need to embed this logic into configure.in.
# endif
#endif
#ifdef _OS_NT
# define OS2_NT 1
#endif
#ifndef OS2_NT
#ifndef NATIVE_WIN32
/* some Unices do not define this, and slang requires it: */
#ifndef unix
# define unix

View File

@ -1,6 +1,6 @@
# Makefile.PC
#
# This is the Makefile for Midnight Commander under OS/2 and Windows NT
# This is the Makefile for Midnight Commander under Win32
#
# Written by Dan Nicolaescu
# 970423 hacked by Juan f. Grigera

View File

@ -1,7 +1,7 @@
#
# This makefile is for making the distribution on Unix
# You won't be able to compile with this one the Midnight Commander
# on Windows NT or OS/2
# on Win32
#
# Please read the file README in this directory if you want to compile
# the Midnight Commander for Windows NT or OS/2

View File

@ -1,4 +1,4 @@
/* Chmod command for Windows NT and OS/2
/* Chmod command for Win32
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/****************************************************************************
CONFIG.H - Midnight Commander Configuration for Win32 and OS/2
CONFIG.H - Midnight Commander Configuration for Win32
This program is free software; you can redistribute it and/or modify
@ -32,7 +32,7 @@
#ifndef __CONFIG_H
#define __CONFIG_H
#define OS2_NT
#define NATIVE_WIN32
#define NEEDS_IO_H
#define NEEDS_DRIVE_H
@ -52,8 +52,8 @@
# ifndef MSWINDOWS
# define MSWINDOWS
# endif
# ifndef _OS_NT
# define _OS_NT
# ifndef NATIVE_WIN32
# define NATIVE_WIN32
# endif
#endif /* MC_NT */

View File

@ -1,4 +1,4 @@
/* Ch-Drive command for Windows NT and OS/2
/* Ch-Drive command for Win32
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -62,7 +62,7 @@ static void drive_cmd()
int m_drv;
/* Get drives name and count */
#ifdef _OS_NT
#ifdef NATIVE_WIN32
GetLogicalDriveStrings (255, szDrivesAvail);
for (nDrivesAvail = 0, p = szDrivesAvail; *p; nDrivesAvail++)
p+=4;
@ -131,7 +131,7 @@ static void drive_cmd()
nNewDrive = drive_dlg->ret_value - B_DRIVE_BASE;
drvLetter = (char) *(szDrivesAvail + (nNewDrive*4));
#ifdef _OS_NT
#ifdef NATIVE_WIN32
if (win32_GetPlatform() == OS_WinNT) { /* Windows NT */
rtn = _chdrive(drvLetter - 'A' + 1);
} else { /* Windows 95 */

View File

@ -19,7 +19,7 @@
Have trouble with non-US keyboards, "Alt-gr"+keys (API tells CTRL-ALT is pressed)
*/
#include <config.h>
#ifndef _OS_NT
#ifndef NATIVE_WIN32
#error "This file is for Win32 systems only"
#else
@ -318,4 +318,4 @@ void application_keypad_mode (void) {}
void init_mouse (void) {}
void shut_mouse (void) {}
#endif /* _OS_NT */
#endif /* NATIVE_WIN32 */

View File

@ -1,4 +1,4 @@
/* Slang interface to the Midnight Commander for Windows NT and OS/2
/* Slang interface to the Midnight Commander for Win32
This emulates some features of ncurses on top of slang
S-lang is not fully consistent between its Unix and non-Unix versions.

View File

@ -21,7 +21,7 @@
#ifdef HAVE_TRACE
#include <stdio.h>
#ifdef _OS_NT
#ifdef NATIVE_WIN32
#include <windows.h>
#endif
#include <errno.h>
@ -96,7 +96,7 @@ void _win32Trace (const char *fmt, ...)
va_end(ap);
vp = buffer;
#ifdef _OS_NT /* Write Output to Debug monitor also */
#ifdef NATIVE_WIN32 /* Write Output to Debug monitor also */
OutputDebugString (vp);
#if (_MSC_VER > 800) /* Don't write newline in MSVC++ 1.0, has a dammed bug in Debug Output screen */
OutputDebugString ("\n");
@ -127,7 +127,7 @@ void _win32TraceOff()
}
#ifdef _OS_NT
#ifdef NATIVE_WIN32
/*
void DebugFailedWin32APICall (const char* name, int line, const char* file)
Report a System call failure.

View File

@ -25,7 +25,7 @@ int SLang_Ignore_User_Abort = 0;
# endif
#endif
#ifdef OS2_NT /* see the replacement in src/slint.c */
#ifdef NATIVE_WIN32 /* see the replacement in src/slint.c */
unsigned int SLang_getkey (void)
{
unsigned int imax;
@ -57,7 +57,7 @@ unsigned int SLang_getkey (void)
#endif
return(ch);
}
#endif /* OS2_NT */
#endif /* NATIVE_WIN32 */
void SLang_ungetkey_string (unsigned char *s, unsigned int n)
{
@ -88,7 +88,7 @@ void SLang_ungetkey (unsigned char ch)
SLang_ungetkey_string(&ch, 1);
}
#ifdef OS2_NT /* see the replacement in src/slint.c */
#ifdef NATIVE_WIN32 /* see the replacement in src/slint.c */
int SLang_input_pending (int tsecs)
{
int n;
@ -104,7 +104,7 @@ int SLang_input_pending (int tsecs)
return n;
}
#endif /* OS2_NT */
#endif /* NATIVE_WIN32 */
void SLang_flush_input (void)
{

View File

@ -1015,7 +1015,7 @@ view_other_cmd (void)
}
}
#ifndef OS2_NT
#ifndef NATIVE_WIN32
static void
do_link (int symbolic_link, char *fname)
{
@ -1163,7 +1163,7 @@ void other_symlink_cmd (void)
g_free (p);
g_free (r);
}
#endif /* !OS2_NT */
#endif /* !NATIVE_WIN32 */
void help_cmd (void)
{

View File

@ -199,7 +199,7 @@ filename_completion_function (char *text, int state)
/* We assume here that text[0] == '~' , if you want to call it in another way,
you have to change the code */
#ifdef OS2_NT
#ifdef NATIVE_WIN32
char *username_completion_function (char *text, int state)
{
return NULL;
@ -238,7 +238,7 @@ username_completion_function (char *text, int state)
}
extern char **environ;
#endif /* OS2_NT */
#endif /* NATIVE_WIN32 */
/* We assume text [0] == '$' and want to have a look at text [1], if it is
equal to '{', so that we should append '}' at the end */

View File

@ -619,7 +619,7 @@ static int dlg_try_hotkey (Dlg_head *h, int d_key)
if (d_key & ALT(0) && c < 255 && isalpha(c))
d_key = tolower(c);
#ifdef _OS_NT
#ifdef NATIVE_WIN32
/* .ado: fix problem with file_permission under Win95 */
if (d_key == 0) return 0;
#endif

View File

@ -8,7 +8,7 @@ int regex_command (char *filename, char *action, int *move_dir);
*/
void flush_extension_file (void);
#ifdef OS2_NT
#ifdef NATIVE_WIN32
# define MC_USER_EXT "mc.ext"
# define MC_LIB_EXT "mc.ext"
#else

View File

@ -459,10 +459,10 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path, int ask_over
off_t *progress_count, double *progress_bytes,
int is_toplevel_file)
{
#ifndef OS2_NT
#ifndef NATIVE_WIN32
uid_t src_uid = (uid_t) -1;
gid_t src_gid = (gid_t) -1;
#endif /* !OS2_NT */
#endif /* !NATIVE_WIN32 */
char *buf = NULL;
int buf_size = BUF_8K;
int src_desc, dest_desc = 0;
@ -507,17 +507,17 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path, int ask_over
}
if (dst_exists){
/* .ado: For OS/2 or NT: no st_ino exists, it is better to just try to
/* .ado: For Win32: no st_ino exists, it is better to just try to
* overwrite the target file
*/
#ifndef OS2_NT
#ifndef NATIVE_WIN32
/* Destination already exists */
if (sb.st_dev == sb2.st_dev && sb.st_ino == sb2.st_ino){
message_3s (1, MSG_ERROR, _(" `%s' and `%s' are the same file. "), src_path, dst_path);
do_refresh ();
return FILE_SKIP;
}
#endif /* !OS2_NT */
#endif /* !NATIVE_WIN32 */
/* Should we replace destination? */
if (ask_overwrite){
@ -530,7 +530,7 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path, int ask_over
if (!ctx->do_append) {
/* .ado: OS2 and NT don't have hardlinks */
#ifndef OS2_NT
#ifndef NATIVE_WIN32
/* Check the hardlinks */
if (!ctx->follow_links && sb.st_nlink > 1 &&
check_hardlinks (src_path, dst_path, &sb) == 1){
@ -545,7 +545,7 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path, int ask_over
return retval;
}
#endif /* !OS2_NT */
#endif /* !NATIVE_WIN32 */
if (S_ISCHR (sb.st_mode) || S_ISBLK (sb.st_mode) || S_ISFIFO (sb.st_mode)
|| S_ISSOCK (sb.st_mode)){
@ -557,14 +557,14 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path, int ask_over
}
/* Success */
#ifndef OS2_NT
#ifndef NATIVE_WIN32
while (ctx->preserve_uidgid && mc_chown (dst_path, sb.st_uid, sb.st_gid)){
temp_status = file_error (_(" Cannot chown target file \"%s\" \n %s "), dst_path);
if (temp_status == FILE_RETRY)
continue;
return temp_status;
}
#endif /* !OS2_NT */
#endif /* !NATIVE_WIN32 */
while (ctx->preserve &&
(mc_chmod (dst_path, sb.st_mode & ctx->umask_kill) < 0)){
temp_status = file_error (_(" Cannot chmod target file \"%s\" \n %s "), dst_path);
@ -602,10 +602,10 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path, int ask_over
goto ret;
}
src_mode = sb.st_mode;
#ifndef OS2_NT
#ifndef NATIVE_WIN32
src_uid = sb.st_uid;
src_gid = sb.st_gid;
#endif /* !OS2_NT */
#endif /* !NATIVE_WIN32 */
utb.actime = sb.st_atime;
utb.modtime = sb.st_mtime;
file_size = sb.st_size;
@ -773,7 +773,7 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path, int ask_over
mc_unlink (dst_path);
} else if (resources & (2|8)){
/* no short file and destination file exists */
#ifndef OS2_NT
#ifndef NATIVE_WIN32
if (!appending && ctx->preserve_uidgid){
while (mc_chown (dst_path, src_uid, src_gid)){
temp_status = file_error
@ -784,7 +784,7 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path, int ask_over
break;
}
}
#endif /* !OS2_NT */
#endif /* !NATIVE_WIN32 */
/*
* .ado: according to the XPG4 standard, the file must be closed before
@ -940,7 +940,7 @@ copy_dir_dir (FileOpContext *ctx, char *s, char *d, int toplevel,
lp->next = dest_dirs;
dest_dirs = lp;
#ifndef OS2_NT
#ifndef NATIVE_WIN32
if (ctx->preserve_uidgid){
retry_dst_chown:
if (mc_chown (dest_dir, cbuf.st_uid, cbuf.st_gid)){
@ -950,7 +950,7 @@ copy_dir_dir (FileOpContext *ctx, char *s, char *d, int toplevel,
goto ret;
}
}
#endif /* !OS2_NT */
#endif /* !NATIVE_WIN32 */
dont_mkdir:
/* open the source dir for reading */
@ -1053,8 +1053,8 @@ move_file_file (FileOpContext *ctx, char *s, char *d,
if (mc_lstat (d, &dst_stats) == 0){
/* Destination already exists */
/* .ado: for OS/2 and NT, no st_ino exists */
#ifndef OS2_NT
/* .ado: for Win32, no st_ino exists */
#ifndef NATIVE_WIN32
if (src_stats.st_dev == dst_stats.st_dev
&& src_stats.st_ino == dst_stats.st_ino){
int msize = COLS - 36;
@ -1072,7 +1072,7 @@ move_file_file (FileOpContext *ctx, char *s, char *d,
do_refresh ();
return FILE_SKIP;
}
#endif /* !OS2_NT */
#endif /* !NATIVE_WIN32 */
if (S_ISDIR (dst_stats.st_mode)){
message_2s (1, MSG_ERROR, _(" Cannot overwrite directory `%s' "), d);
do_refresh ();
@ -1166,7 +1166,7 @@ move_dir_dir (FileOpContext *ctx, char *s, char *d,
move_over = 1;
} else
destdir = concat_dir_and_file (d, x_basename (s));
#ifndef OS2_NT
#ifndef NATIVE_WIN32
if (sbuf.st_dev == dbuf.st_dev
&& sbuf.st_ino == dbuf.st_ino){
int msize = COLS - 36;
@ -1184,7 +1184,7 @@ move_dir_dir (FileOpContext *ctx, char *s, char *d,
do_refresh ();
return FILE_SKIP;
}
#endif /* !OS2_NT */
#endif /* !NATIVE_WIN32 */
/* Check if the user inputted an existing dir */
retry_dst_stat:

View File

@ -75,8 +75,8 @@ my_mkdir (char *s, mode_t mode)
int result;
result = mc_mkdir (s, mode);
#ifdef OS2_NT
/* .ado: it will be disabled in OS/2 and NT */
#ifdef NATIVE_WIN32
/* .ado: it will be disabled in Win32 */
/* otherwise crash if directory already exists. */
return result;
#endif

View File

@ -20,7 +20,7 @@
/* memory and strings.h conflict on other systems */
#endif /* !STDC_HEADERS & !HAVE_STRING_H */
#ifdef _OS_NT
#ifdef NATIVE_WIN32
# include <windows.h>
# include <io.h>
#ifdef _MSC_VER
@ -47,7 +47,7 @@
# endif
#endif
#if !defined(HAVE_SYS_TIME_H) && !defined(_OS_NT)
#if !defined(HAVE_SYS_TIME_H) && !defined(NATIVE_WIN32)
struct timeval {
long int tv_sec; /* seconds */
long int tv_usec; /* microseconds */

View File

@ -442,7 +442,7 @@ static void show (Dlg_head *h, char *paint_start)
if (c == ' ' || c == '.')
addch (c);
else
#ifndef OS2_NT
#ifndef NATIVE_WIN32
#ifndef HAVE_SLANG
addch (acs_map [c]);
#else
@ -450,7 +450,7 @@ static void show (Dlg_head *h, char *paint_start)
#endif
#else
addch (acs2pc (c));
#endif /* OS2_NT */
#endif /* NATIVE_WIN32 */
} else
addch (c);
col++;

View File

@ -74,8 +74,8 @@ info_show_info (WInfo *info)
printw (_("Midnight Commander %s"), VERSION);
attrset (NORMAL_COLOR);
widget_move (&info->widget, 2, 1);
/* .ado: info->widget.x has wrong value (==0) on NT and OS/2, why? */
#ifndef OS2_NT
/* .ado: info->widget.x has wrong value (==0) on Win32, why? */
#ifndef NATIVE_WIN32
hline (ACS_HLINE|NORMAL_COLOR, info->widget.x-2);
#endif
if (get_current_type () != view_listing)
@ -86,8 +86,8 @@ info_show_info (WInfo *info)
my_statfs (&myfs_stats, cpanel->cwd);
buf = cpanel->dir.list [cpanel->selected].buf;
#ifdef OS2_NT
/* .ado: for OS/2 and NT, st_dev must > 0 */
#ifdef NATIVE_WIN32
/* .ado: for Win32, st_dev must > 0 */
if ((signed char) buf.st_dev < 0)
return;
#endif

View File

@ -16,7 +16,7 @@ int mi_getch (void);
/* Used to get the modifier information */
/* Currently, it just works on the Linux console */
#ifdef _OS_NT
#ifdef NATIVE_WIN32
# ifndef SHIFT_PRESSED
# define SHIFT_PRESSED 0x0010
# endif

View File

@ -22,7 +22,7 @@
#include <config.h>
#include <locale.h>
#ifdef _OS_NT
#ifdef NATIVE_WIN32
# include <windows.h>
#endif
@ -81,7 +81,7 @@
#include "chmod.h"
#include "chown.h"
#ifdef _OS_NT
#ifdef NATIVE_WIN32
# include "drive.h"
#endif
@ -261,8 +261,8 @@ static int print_last_wd = 0;
static char *last_wd_string;
static int print_last_revert = 0;
/* On OS/2 and on Windows NT, we need a batch file to do the -P magic */
#ifdef OS2_NT
/* On Win32, we need a batch file to do the -P magic */
#ifdef NATIVE_WIN32
static char *batch_file_name = 0;
#endif
@ -968,7 +968,7 @@ static menu_entry PanelMenu [] = {
#endif
#endif
{ ' ', "", ' ', 0 },
#ifdef OS2_NT
#ifdef NATIVE_WIN32
{ ' ', N_("&Drive... M-d"), 'D', drive_cmd_a },
#endif
{ ' ', N_("&Rescan C-r"), 'R', reread_cmd }
@ -995,7 +995,7 @@ static menu_entry RightMenu [] = {
#endif
#endif
{ ' ', "", ' ', 0 },
#ifdef OS2_NT
#ifdef NATIVE_WIN32
{ ' ', N_("&Drive... M-d"), 'D', drive_cmd_b },
#endif
{ ' ', N_("&Rescan C-r"), 'R', reread_cmd }
@ -1009,7 +1009,7 @@ static menu_entry FileMenu [] = {
{ ' ', N_("&Edit F4"), 'E', edit_cmd },
{ ' ', N_("&Copy F5"), 'C', copy_cmd },
{ ' ', N_("c&Hmod C-x c"), 'H', chmod_cmd },
#ifndef OS2_NT
#ifndef NATIVE_WIN32
{ ' ', N_("&Link C-x l"), 'L', link_cmd },
{ ' ', N_("&SymLink C-x s"), 'S', symlink_cmd },
{ ' ', N_("edit s&Ymlink C-x C-s"), 'Y', edit_symlink_cmd },
@ -1074,9 +1074,9 @@ static menu_entry OptMenu [] = {
{ ' ', N_("&Layout..."), 'L', layout_cmd },
{ ' ', N_("c&Onfirmation..."), 'O', confirm_box },
{ ' ', N_("&Display bits..."), 'D', display_bits_box },
#ifndef OS2_NT
#ifndef NATIVE_WIN32
{ ' ', N_("learn &Keys..."), 'K', learn_keys },
#endif /* !OS2_NT */
#endif /* !NATIVE_WIN32 */
#ifdef USE_VFS
{ ' ', N_("&Virtual FS..."), 'V', configure_vfs },
#endif /* !USE_VFS */
@ -1415,7 +1415,7 @@ static const key_map ctl_x_map [] = {
{ 't', copy_current_tagged },
{ XCTRL('t'), copy_other_tagged },
{ 'c', chmod_cmd },
#ifndef OS2_NT
#ifndef NATIVE_WIN32
{ 'o', chown_cmd },
{ 'r', copy_current_readlink },
{ XCTRL('r'), copy_other_readlink },
@ -1423,7 +1423,7 @@ static const key_map ctl_x_map [] = {
{ XCTRL('l'), other_symlink_cmd },
{ 's', symlink_cmd },
{ XCTRL('s'), edit_symlink_cmd },
#endif /* !OS2_NT */
#endif /* !NATIVE_WIN32 */
{ 'i', info_cmd_no_menu },
{ 'q', quick_cmd_no_menu },
{ 'h', add2hotlist_cmd },
@ -1496,7 +1496,7 @@ static const key_map default_map [] = {
static void setup_sigwinch (void)
{
#if (defined(HAVE_SLANG) || (NCURSES_VERSION_MAJOR >= 4)) && \
!defined(OS2_NT) && defined(SIGWINCH)
!defined(NATIVE_WIN32) && defined(SIGWINCH)
struct sigaction act, oact;
act.sa_handler = flag_winch;
sigemptyset (&act.sa_mask);
@ -1666,8 +1666,8 @@ make_panels_dirty (void)
panel_update_contents (opanel);
}
/* In OS/2 and Windows NT people want to actually type the '\' key frequently */
#ifdef OS2_NT
/* In Windows people want to actually type the '\' key frequently */
#ifdef NATIVE_WIN32
# define check_key_backslash(x) 0
#else
# define check_key_backslash(x) ((x) == '\\')
@ -1954,7 +1954,7 @@ do_nc (void)
done_mc_profile ();
}
#if defined (_OS_NT)
#if defined (NATIVE_WIN32)
/* Windows NT code */
void
@ -1974,6 +1974,7 @@ OS_Setup (void)
mc_home = get_mc_lib_dir ();
}
/* Nothing to be done on Windows */
static void
sigchld_handler_no_subshell (int sig)
{
@ -1987,7 +1988,6 @@ init_sigchld (void)
void
init_sigfatals (void)
{
/* Nothing to be done on the OS/2, Windows/NT */
}
@ -2077,7 +2077,7 @@ init_sigchld (void)
}
}
#endif /* _OS_NT, UNIX */
#endif /* NATIVE_WIN32, UNIX */
static void
print_mc_usage (FILE *stream)
@ -2087,9 +2087,9 @@ print_mc_usage (FILE *stream)
N_("Usage is:\n\n"
"mc [flags] [this_dir] [other_panel_dir]\n\n"),
#ifndef OS2_NT
#ifndef NATIVE_WIN32
N_("-a, --stickchars Force use of +, -, | for line drawing.\n"),
#endif /* !OS2_NT */
#endif /* !NATIVE_WIN32 */
N_("-b, --nocolor Force black and white display.\n"),
#ifdef WITH_BACKGROUND
N_("-B, --background [DEVEL-ONLY: Debug the background code]\n"),
@ -2109,10 +2109,10 @@ print_mc_usage (FILE *stream)
#endif
N_("-P, --printwd At exit, print the last working directory.\n"
"-s, --slow Disables verbose operation (for slow terminals).\n"),
#if defined(HAVE_SLANG) && !defined(OS2_NT)
#if defined(HAVE_SLANG) && !defined(NATIVE_WIN32)
N_("-t, --termcap Activate support for the TERMCAP variable.\n"),
#endif
#if defined(HAVE_SLANG) && defined(OS2_NT)
#if defined(HAVE_SLANG) && defined(NATIVE_WIN32)
N_("-S, --createcmdile Create command file to set default directory upon exit.\n"),
#endif
#ifdef HAVE_SUBSHELL_SUPPORT
@ -2206,7 +2206,7 @@ process_args (int c, const char *option_arg)
finish_program = 1;
break;
#ifdef OS2_NT
#ifdef NATIVE_WIN32
case 'S':
print_last_wd = 2;
batch_file_name = option_arg;
@ -2239,7 +2239,7 @@ static const struct poptOption argument_table [] = {
{ "background", 'B', POPT_ARG_NONE, &background_wait, 0,
N_("Use to debug the background code") },
#endif
#if defined(HAVE_SLANG) && defined(OS2_NT)
#if defined(HAVE_SLANG) && defined(NATIVE_WIN32)
{ "createcmdfile", 'S', POPT_ARG_STRING, NULL, 'S' },
#endif
{ "color", 'c', POPT_ARG_NONE, NULL, 'c',
@ -2278,15 +2278,15 @@ static const struct poptOption argument_table [] = {
N_("Resets soft keys on HP terminals") },
{ "slow", 's', POPT_ARG_NONE, &slow_terminal, 0,
N_("To run on slow terminals") },
#ifndef OS2_NT
#ifndef NATIVE_WIN32
{ "stickchars", 'a', 0, &force_ugly_line_drawing, 0,
N_("Use stickchars to draw") },
#endif /* !OS2_NT */
#endif /* !NATIVE_WIN32 */
#ifdef HAVE_SUBSHELL_SUPPORT
{ "subshell", 'U', POPT_ARG_NONE, &use_subshell, 0,
N_("Enables subshell support (default)")},
#endif
#if defined(HAVE_SLANG) && !defined(OS2_NT)
#if defined(HAVE_SLANG) && !defined(NATIVE_WIN32)
{ "termcap", 't', 0, &SLtt_Try_Termcap, 0,
N_("Tries to use termcap instead of terminfo") },
#endif
@ -2383,7 +2383,7 @@ handle_args (int argc, char *argv [])
* Previous versions of the program had all of their files in
* the $HOME, we are now putting them in $HOME/.mc
*/
#ifdef OS2_NT
#ifdef NATIVE_WIN32
# define compatibility_move_mc_files()
#else
@ -2437,7 +2437,7 @@ compatibility_move_mc_files (void)
do_compatibility_move (mc_dir);
g_free (mc_dir);
}
#endif /* OS2_NT */
#endif /* NATIVE_WIN32 */
int
main (int argc, char *argv [])
@ -2473,7 +2473,7 @@ main (int argc, char *argv [])
/* Used to report the last working directory at program end */
if (print_last_wd){
#ifndef OS2_NT
#ifndef NATIVE_WIN32
stdout_fd = dup (1);
close (1);
if (open (ttyname (0), O_RDWR) < 0)
@ -2587,7 +2587,7 @@ main (int argc, char *argv [])
if (alternate_plus_minus)
numeric_keypad_mode ();
#ifndef OS2_NT
#ifndef NATIVE_WIN32
signal (SIGCHLD, SIG_DFL); /* Disable the SIGCHLD handler */
#endif
@ -2595,11 +2595,11 @@ main (int argc, char *argv [])
handle_console (CONSOLE_DONE);
putchar ('\n'); /* Hack to make shell's prompt start at left of screen */
#ifdef _OS_NT
#ifdef NATIVE_WIN32
/* On NT, home_dir is malloced */
g_free (home_dir);
#endif
#if defined(OS2_NT)
#if defined(NATIVE_WIN32)
if (print_last_wd == 2){
FILE *bat_file;
@ -2623,9 +2623,9 @@ main (int argc, char *argv [])
g_free (last_wd_string);
}
#ifndef _OS_NT
#ifndef NATIVE_WIN32
g_free (mc_home);
#endif /* (_OS_NT) */
#endif /* (NATIVE_WIN32) */
done_key ();
#ifdef HAVE_CHARSET
free_codepages_list ();

View File

@ -171,11 +171,11 @@ void done_menu (void);
void init_menu (void);
void exec_shell (void);
#ifdef OS2_NT
#ifdef NATIVE_WIN32
# define MC_BASE ""
#else
# define MC_BASE "/.mc/"
#endif /* !OS2_NT */
#endif /* !NATIVE_WIN32 */
/* Back hack to define the following routines only if the client code
* has included panel.h

View File

@ -291,7 +291,7 @@ static int menubar_handle_key (WMenu *menubar, int key)
}
/* .ado: NT Alpha can not allow CTRL in Menubar */
#if defined(_OS_NT)
#if defined(NATIVE_WIN32)
if (!key)
return 0;
#endif

View File

@ -2,7 +2,7 @@
#define __PROFILE_H
/* Prototypes for the profile management functions */
#ifndef _OS_NT
#ifndef NATIVE_WIN32
short GetPrivateProfileString (const char * AppName, char * KeyName,
char * Default, char * ReturnedString,
short Size, char * FileName);
@ -19,7 +19,7 @@ int WritePrivateProfileString (const char * AppName, char * KeyName, char * Stri
char * FileName);
int WriteProfileString (const char * AppName, char * KeyName, char * String);
#endif /* not _OS_NT */
#endif /* not NATIVE_WIN32 */
void sync_profiles (void);

View File

@ -46,7 +46,7 @@
#include "widget.h"
#include "../vfs/vfs.h"
#ifdef _OS_NT
#ifdef NATIVE_WIN32
# include "drive.h"
#endif
@ -633,7 +633,7 @@ display_mini_info (WPanel *panel)
/* Status resolves links and show them */
set_colors (panel);
#ifndef OS2_NT
#ifndef NATIVE_WIN32
if (S_ISLNK (panel->dir.list [panel->selected].buf.st_mode)){
char *link, link_target [MC_MAXPATHLEN];
int len;
@ -2093,7 +2093,7 @@ static const key_map panel_keymap [] = {
{ ALT('r'), goto_middle_file }, /* M-r like emacs */
{ ALT('j'), goto_bottom_file },
#ifdef OS2_NT
#ifdef NATIVE_WIN32
{ ALT(KEY_F(11)), drive_cmd_a },
{ ALT(KEY_F(12)), drive_cmd_b },
{ ALT('d'), drive_chg },

View File

@ -29,7 +29,7 @@ extern int startup_left_mode;
extern int startup_right_mode;
extern int verbose;
#ifdef OS2_NT
#ifdef NATIVE_WIN32
# define PROFILE_NAME "mc.ini"
# define HOTLIST_FILENAME "mc.hot"
#else

View File

@ -212,8 +212,8 @@ tree_store_load_from(char *name)
name = decode(buffer + 2);
len = strlen(name);
#ifdef OS2_NT
/* .ado: Drives for NT and OS/2 */
#ifdef NATIVE_WIN32
/* .ado: Drives for Win32 */
if ((len > 2) &&
isalpha(name[0]) &&
(name[1] == ':') && (name[2] == '\\')) {

View File

@ -3,7 +3,7 @@
/* Default filenames for the tree */
#ifdef OS2_NT
#ifdef NATIVE_WIN32
# define MC_TREE "mcn.tre"
# define MC_TREE_TMP "mcn.tr~"
#else

View File

@ -542,7 +542,7 @@ execute_menu_command (WEdit *edit_widget, char *commands)
char prompt [80];
int col;
char *file_name;
#ifdef OS2_NT
#ifdef NATIVE_WIN32
char *p;
#endif
/* Skip menu entry title line */

View File

@ -11,7 +11,7 @@ int check_format_var (const char *, char **);
int check_format_cd (const char *);
char *check_patterns (char*);
#ifdef OS2_NT
#ifdef NATIVE_WIN32
# define CEDIT_LOCAL_MENU "cedit.mnu"
# define CEDIT_GLOBAL_MENU "cedit.mnu"
# define CEDIT_HOME_MENU "cedit.mnu"

View File

@ -128,7 +128,7 @@ void execute_hooks (Hook *hook_list);
void delete_hook (Hook **hook_list, void (*hook_fn)(void *));
int hook_present (Hook *hook_list, void (*hook_fn)(void *));
#ifdef OS2_NT
#ifdef NATIVE_WIN32
# define PATH_SEP '\\'
# define PATH_SEP_STR "\\"
# define PATH_ENV_SEP ';'

View File

@ -83,7 +83,7 @@
/* Maxlimit for skipping updates */
static int max_dirt_limit =
#ifdef OS2_NT
#ifdef NATIVE_WIN32
0;
#else
10;

View File

@ -296,11 +296,11 @@ static inline int mc_setctl(a,b,c) { return 0; }
# define ftpfs_hint_reread(x) do { } while (0)
# define ftpfs_flushdir() do { } while (0)
#ifdef _OS_NT
#ifdef NATIVE_WIN32
# undef mc_rmdir
#endif
#ifdef OS2_NT
#ifdef NATIVE_WIN32
# undef mc_ctl
# undef mc_unlink
# define mc_ctl(a,b,c) 0