mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
Get rid of all references to NATIVE_WIN32.
This commit is contained in:
parent
fe7d3b9a4e
commit
c72a1ea44c
@ -1,5 +1,7 @@
|
|||||||
2003-07-22 Pavel Roskin <proski@gnu.org>
|
2003-07-22 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
Get rid of all references to NATIVE_WIN32.
|
||||||
|
|
||||||
* pc: Remove. No work has been done on the PC post for years.
|
* pc: Remove. No work has been done on the PC post for years.
|
||||||
* README.PC: Likewise.
|
* README.PC: Likewise.
|
||||||
* Makefile.am: Adjust for the above.
|
* Makefile.am: Adjust for the above.
|
||||||
|
@ -392,9 +392,7 @@ static menu_entry OptMenu[] =
|
|||||||
{
|
{
|
||||||
{' ', N_("&General... "), 'G', menu_options},
|
{' ', N_("&General... "), 'G', menu_options},
|
||||||
{' ', N_("&Save mode..."), 'S', menu_save_mode_cmd},
|
{' ', N_("&Save mode..."), 'S', menu_save_mode_cmd},
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
{' ', N_("learn &Keys..."), 'K', learn_keys}
|
{' ', N_("learn &Keys..."), 'K', learn_keys}
|
||||||
#endif /* !NATIVE_WIN32 */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define OptMenuEmacs OptMenu
|
#define OptMenuEmacs OptMenu
|
||||||
|
@ -25,13 +25,6 @@ the need to embed this logic into configure.in.
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
/* some Unices do not define this, and slang requires it: */
|
|
||||||
#ifndef unix
|
|
||||||
# define unix
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef USE_VFS
|
#ifndef USE_VFS
|
||||||
# undef USE_NETCODE
|
# undef USE_NETCODE
|
||||||
# undef USE_EXT2FSLIB
|
# undef USE_EXT2FSLIB
|
||||||
|
@ -933,7 +933,6 @@ view_other_cmd (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
static void
|
static void
|
||||||
do_link (int symbolic_link, char *fname)
|
do_link (int symbolic_link, char *fname)
|
||||||
{
|
{
|
||||||
@ -1042,7 +1041,6 @@ void edit_symlink_cmd (void)
|
|||||||
selection (cpanel)->fname);
|
selection (cpanel)->fname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* !NATIVE_WIN32 */
|
|
||||||
|
|
||||||
void help_cmd (void)
|
void help_cmd (void)
|
||||||
{
|
{
|
||||||
|
@ -199,12 +199,6 @@ filename_completion_function (char *text, int state)
|
|||||||
|
|
||||||
/* We assume here that text[0] == '~' , if you want to call it in another way,
|
/* We assume here that text[0] == '~' , if you want to call it in another way,
|
||||||
you have to change the code */
|
you have to change the code */
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
char *username_completion_function (char *text, int state)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
static char *
|
static char *
|
||||||
username_completion_function (char *text, int state)
|
username_completion_function (char *text, int state)
|
||||||
{
|
{
|
||||||
@ -238,7 +232,6 @@ username_completion_function (char *text, int state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
#endif /* NATIVE_WIN32 */
|
|
||||||
|
|
||||||
/* We assume text [0] == '$' and want to have a look at text [1], if it is
|
/* 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 */
|
equal to '{', so that we should append '}' at the end */
|
||||||
|
@ -593,11 +593,6 @@ static int dlg_try_hotkey (Dlg_head *h, int d_key)
|
|||||||
if (d_key & ALT(0) && c < 255 && isalpha(c))
|
if (d_key & ALT(0) && c < 255 && isalpha(c))
|
||||||
d_key = tolower(c);
|
d_key = tolower(c);
|
||||||
|
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
/* .ado: fix problem with file_permission under Win95 */
|
|
||||||
if (d_key == 0) return 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
handled = 0;
|
handled = 0;
|
||||||
if (h->current->widget->options & W_WANT_HOTKEY)
|
if (h->current->widget->options & W_WANT_HOTKEY)
|
||||||
handled = callback (h) (h->current->widget, WIDGET_HOTKEY, d_key);
|
handled = callback (h) (h->current->widget, WIDGET_HOTKEY, d_key);
|
||||||
|
@ -8,11 +8,7 @@ int regex_command (char *filename, char *action, int *move_dir);
|
|||||||
*/
|
*/
|
||||||
void flush_extension_file (void);
|
void flush_extension_file (void);
|
||||||
|
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
# define MC_USER_EXT "mc.ext"
|
|
||||||
# define MC_LIB_EXT "mc.ext"
|
|
||||||
#else
|
|
||||||
#define MC_USER_EXT ".mc/bindings"
|
#define MC_USER_EXT ".mc/bindings"
|
||||||
#define MC_LIB_EXT "mc.ext"
|
#define MC_LIB_EXT "mc.ext"
|
||||||
#endif
|
|
||||||
#endif
|
#endif /* !__EXT_H */
|
||||||
|
27
src/file.c
27
src/file.c
@ -473,10 +473,9 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path,
|
|||||||
int ask_overwrite, off_t *progress_count,
|
int ask_overwrite, off_t *progress_count,
|
||||||
double *progress_bytes, int is_toplevel_file)
|
double *progress_bytes, int is_toplevel_file)
|
||||||
{
|
{
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
uid_t src_uid = (uid_t) - 1;
|
uid_t src_uid = (uid_t) - 1;
|
||||||
gid_t src_gid = (gid_t) - 1;
|
gid_t src_gid = (gid_t) - 1;
|
||||||
#endif /* !NATIVE_WIN32 */
|
|
||||||
char *buf = NULL;
|
char *buf = NULL;
|
||||||
int buf_size = BUF_8K;
|
int buf_size = BUF_8K;
|
||||||
int src_desc, dest_desc = -1;
|
int src_desc, dest_desc = -1;
|
||||||
@ -522,10 +521,6 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dst_exists) {
|
if (dst_exists) {
|
||||||
/* .ado: For Win32: no st_ino exists, it is better to just try to
|
|
||||||
* overwrite the target file
|
|
||||||
*/
|
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
/* Destination already exists */
|
/* Destination already exists */
|
||||||
if (sb.st_dev == sb2.st_dev && sb.st_ino == sb2.st_ino) {
|
if (sb.st_dev == sb2.st_dev && sb.st_ino == sb2.st_ino) {
|
||||||
message_3s (1, MSG_ERROR,
|
message_3s (1, MSG_ERROR,
|
||||||
@ -534,7 +529,6 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path,
|
|||||||
do_refresh ();
|
do_refresh ();
|
||||||
return FILE_SKIP;
|
return FILE_SKIP;
|
||||||
}
|
}
|
||||||
#endif /* !NATIVE_WIN32 */
|
|
||||||
|
|
||||||
/* Should we replace destination? */
|
/* Should we replace destination? */
|
||||||
if (ask_overwrite) {
|
if (ask_overwrite) {
|
||||||
@ -546,8 +540,6 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!ctx->do_append) {
|
if (!ctx->do_append) {
|
||||||
/* .ado: OS2 and NT don't have hardlinks */
|
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
/* Check the hardlinks */
|
/* Check the hardlinks */
|
||||||
if (!ctx->follow_links && sb.st_nlink > 1 &&
|
if (!ctx->follow_links && sb.st_nlink > 1 &&
|
||||||
check_hardlinks (src_path, dst_path, &sb) == 1) {
|
check_hardlinks (src_path, dst_path, &sb) == 1) {
|
||||||
@ -561,7 +553,6 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path,
|
|||||||
retval = make_symlink (ctx, src_path, dst_path);
|
retval = make_symlink (ctx, src_path, dst_path);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
#endif /* !NATIVE_WIN32 */
|
|
||||||
|
|
||||||
if (S_ISCHR (sb.st_mode) || S_ISBLK (sb.st_mode)
|
if (S_ISCHR (sb.st_mode) || S_ISBLK (sb.st_mode)
|
||||||
|| S_ISFIFO (sb.st_mode)
|
|| S_ISFIFO (sb.st_mode)
|
||||||
@ -579,7 +570,6 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path,
|
|||||||
}
|
}
|
||||||
/* Success */
|
/* Success */
|
||||||
|
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
while (ctx->preserve_uidgid
|
while (ctx->preserve_uidgid
|
||||||
&& mc_chown (dst_path, sb.st_uid, sb.st_gid)) {
|
&& mc_chown (dst_path, sb.st_uid, sb.st_gid)) {
|
||||||
temp_status =
|
temp_status =
|
||||||
@ -590,7 +580,6 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path,
|
|||||||
continue;
|
continue;
|
||||||
return temp_status;
|
return temp_status;
|
||||||
}
|
}
|
||||||
#endif /* !NATIVE_WIN32 */
|
|
||||||
while (ctx->preserve &&
|
while (ctx->preserve &&
|
||||||
(mc_chmod (dst_path, sb.st_mode & ctx->umask_kill) <
|
(mc_chmod (dst_path, sb.st_mode & ctx->umask_kill) <
|
||||||
0)) {
|
0)) {
|
||||||
@ -636,10 +625,8 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path,
|
|||||||
goto ret;
|
goto ret;
|
||||||
}
|
}
|
||||||
src_mode = sb.st_mode;
|
src_mode = sb.st_mode;
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
src_uid = sb.st_uid;
|
src_uid = sb.st_uid;
|
||||||
src_gid = sb.st_gid;
|
src_gid = sb.st_gid;
|
||||||
#endif /* !NATIVE_WIN32 */
|
|
||||||
utb.actime = sb.st_atime;
|
utb.actime = sb.st_atime;
|
||||||
utb.modtime = sb.st_mtime;
|
utb.modtime = sb.st_mtime;
|
||||||
file_size = sb.st_size;
|
file_size = sb.st_size;
|
||||||
@ -833,7 +820,6 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path,
|
|||||||
mc_unlink (dst_path);
|
mc_unlink (dst_path);
|
||||||
} else if (dst_status == DEST_FULL) {
|
} else if (dst_status == DEST_FULL) {
|
||||||
/* Copy has succeeded */
|
/* Copy has succeeded */
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
if (!appending && ctx->preserve_uidgid) {
|
if (!appending && ctx->preserve_uidgid) {
|
||||||
while (mc_chown (dst_path, src_uid, src_gid)) {
|
while (mc_chown (dst_path, src_uid, src_gid)) {
|
||||||
temp_status = file_error
|
temp_status = file_error
|
||||||
@ -845,7 +831,6 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* !NATIVE_WIN32 */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* .ado: according to the XPG4 standard, the file must be closed before
|
* .ado: according to the XPG4 standard, the file must be closed before
|
||||||
@ -1015,7 +1000,6 @@ copy_dir_dir (FileOpContext *ctx, char *s, char *d, int toplevel,
|
|||||||
lp->next = dest_dirs;
|
lp->next = dest_dirs;
|
||||||
dest_dirs = lp;
|
dest_dirs = lp;
|
||||||
|
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
if (ctx->preserve_uidgid) {
|
if (ctx->preserve_uidgid) {
|
||||||
while (mc_chown (dest_dir, cbuf.st_uid, cbuf.st_gid)) {
|
while (mc_chown (dest_dir, cbuf.st_uid, cbuf.st_gid)) {
|
||||||
return_status =
|
return_status =
|
||||||
@ -1026,7 +1010,6 @@ copy_dir_dir (FileOpContext *ctx, char *s, char *d, int toplevel,
|
|||||||
goto ret;
|
goto ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* !NATIVE_WIN32 */
|
|
||||||
|
|
||||||
dont_mkdir:
|
dont_mkdir:
|
||||||
/* open the source dir for reading */
|
/* open the source dir for reading */
|
||||||
@ -1129,9 +1112,6 @@ move_file_file (FileOpContext *ctx, char *s, char *d,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mc_lstat (d, &dst_stats) == 0) {
|
if (mc_lstat (d, &dst_stats) == 0) {
|
||||||
/* Destination already exists */
|
|
||||||
/* .ado: for Win32, no st_ino exists */
|
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
if (src_stats.st_dev == dst_stats.st_dev
|
if (src_stats.st_dev == dst_stats.st_dev
|
||||||
&& src_stats.st_ino == dst_stats.st_ino) {
|
&& src_stats.st_ino == dst_stats.st_ino) {
|
||||||
int msize = COLS - 36;
|
int msize = COLS - 36;
|
||||||
@ -1149,7 +1129,7 @@ move_file_file (FileOpContext *ctx, char *s, char *d,
|
|||||||
do_refresh ();
|
do_refresh ();
|
||||||
return FILE_SKIP;
|
return FILE_SKIP;
|
||||||
}
|
}
|
||||||
#endif /* !NATIVE_WIN32 */
|
|
||||||
if (S_ISDIR (dst_stats.st_mode)) {
|
if (S_ISDIR (dst_stats.st_mode)) {
|
||||||
message_2s (1, MSG_ERROR,
|
message_2s (1, MSG_ERROR,
|
||||||
_(" Cannot overwrite directory `%s' "), d);
|
_(" Cannot overwrite directory `%s' "), d);
|
||||||
@ -1250,7 +1230,7 @@ move_dir_dir (FileOpContext *ctx, char *s, char *d,
|
|||||||
move_over = 1;
|
move_over = 1;
|
||||||
} else
|
} else
|
||||||
destdir = concat_dir_and_file (d, x_basename (s));
|
destdir = concat_dir_and_file (d, x_basename (s));
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
if (sbuf.st_dev == dbuf.st_dev && sbuf.st_ino == dbuf.st_ino) {
|
if (sbuf.st_dev == dbuf.st_dev && sbuf.st_ino == dbuf.st_ino) {
|
||||||
int msize = COLS - 36;
|
int msize = COLS - 36;
|
||||||
char st[MC_MAXPATHLEN];
|
char st[MC_MAXPATHLEN];
|
||||||
@ -1267,7 +1247,6 @@ move_dir_dir (FileOpContext *ctx, char *s, char *d,
|
|||||||
do_refresh ();
|
do_refresh ();
|
||||||
return FILE_SKIP;
|
return FILE_SKIP;
|
||||||
}
|
}
|
||||||
#endif /* !NATIVE_WIN32 */
|
|
||||||
|
|
||||||
/* Check if the user inputted an existing dir */
|
/* Check if the user inputted an existing dir */
|
||||||
retry_dst_stat:
|
retry_dst_stat:
|
||||||
|
@ -76,11 +76,6 @@ my_mkdir (char *s, mode_t mode)
|
|||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = mc_mkdir (s, mode);
|
result = mc_mkdir (s, mode);
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
/* .ado: it will be disabled in Win32 */
|
|
||||||
/* otherwise crash if directory already exists. */
|
|
||||||
return result;
|
|
||||||
#endif
|
|
||||||
if (result) {
|
if (result) {
|
||||||
char *p = vfs_canon (s);
|
char *p = vfs_canon (s);
|
||||||
|
|
||||||
|
10
src/global.h
10
src/global.h
@ -20,14 +20,6 @@
|
|||||||
/* memory and strings.h conflict on other systems */
|
/* memory and strings.h conflict on other systems */
|
||||||
#endif /* !STDC_HEADERS & !HAVE_STRING_H */
|
#endif /* !STDC_HEADERS & !HAVE_STRING_H */
|
||||||
|
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
# include <windows.h>
|
|
||||||
# include <io.h>
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
# include <direct.h> /* from mkdir() */
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_SYS_PARAM_H
|
#ifdef HAVE_SYS_PARAM_H
|
||||||
# include <sys/param.h>
|
# include <sys/param.h>
|
||||||
#endif
|
#endif
|
||||||
@ -76,7 +68,7 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(HAVE_SYS_TIME_H) && !defined(NATIVE_WIN32)
|
#if !defined(HAVE_SYS_TIME_H)
|
||||||
struct timeval {
|
struct timeval {
|
||||||
long int tv_sec; /* seconds */
|
long int tv_sec; /* seconds */
|
||||||
long int tv_usec; /* microseconds */
|
long int tv_usec; /* microseconds */
|
||||||
|
@ -437,15 +437,11 @@ static void help_show (Dlg_head *h, char *paint_start)
|
|||||||
if (c == ' ' || c == '.')
|
if (c == ' ' || c == '.')
|
||||||
addch (c);
|
addch (c);
|
||||||
else
|
else
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
#ifndef HAVE_SLANG
|
#ifndef HAVE_SLANG
|
||||||
addch (acs_map [c]);
|
addch (acs_map [c]);
|
||||||
#else
|
#else
|
||||||
SLsmg_draw_object (h->y + line + 2, h->x + col + 2, c);
|
SLsmg_draw_object (h->y + line + 2, h->x + col + 2, c);
|
||||||
#endif
|
#endif
|
||||||
#else
|
|
||||||
addch (acs2pc (c));
|
|
||||||
#endif /* NATIVE_WIN32 */
|
|
||||||
} else
|
} else
|
||||||
addch (c);
|
addch (c);
|
||||||
col++;
|
col++;
|
||||||
|
@ -74,10 +74,7 @@ info_show_info (WInfo *info)
|
|||||||
printw (_("Midnight Commander %s"), VERSION);
|
printw (_("Midnight Commander %s"), VERSION);
|
||||||
attrset (NORMAL_COLOR);
|
attrset (NORMAL_COLOR);
|
||||||
widget_move (&info->widget, 2, 1);
|
widget_move (&info->widget, 2, 1);
|
||||||
/* .ado: info->widget.x has wrong value (==0) on Win32, why? */
|
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
hline (ACS_HLINE|NORMAL_COLOR, info->widget.x-2);
|
hline (ACS_HLINE|NORMAL_COLOR, info->widget.x-2);
|
||||||
#endif
|
|
||||||
if (get_current_type () != view_listing)
|
if (get_current_type () != view_listing)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -86,11 +83,6 @@ info_show_info (WInfo *info)
|
|||||||
|
|
||||||
my_statfs (&myfs_stats, cpanel->cwd);
|
my_statfs (&myfs_stats, cpanel->cwd);
|
||||||
buf = cpanel->dir.list [cpanel->selected].buf;
|
buf = cpanel->dir.list [cpanel->selected].buf;
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
/* .ado: for Win32, st_dev must > 0 */
|
|
||||||
if ((signed char) buf.st_dev < 0)
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Print only lines which fit */
|
/* Print only lines which fit */
|
||||||
|
|
||||||
|
93
src/main.c
93
src/main.c
@ -22,10 +22,6 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
# include <windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -79,10 +75,6 @@
|
|||||||
#include "chmod.h"
|
#include "chmod.h"
|
||||||
#include "chown.h"
|
#include "chown.h"
|
||||||
|
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
# include "drive.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WITH_SMBFS
|
#ifdef WITH_SMBFS
|
||||||
#include "../vfs/smbfs.h" /* smbfs_set_debug() */
|
#include "../vfs/smbfs.h" /* smbfs_set_debug() */
|
||||||
#endif
|
#endif
|
||||||
@ -840,9 +832,6 @@ static menu_entry PanelMenu[] = {
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
{' ', "", ' ', 0},
|
{' ', "", ' ', 0},
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
{' ', N_("&Drive... M-d"), 'D', drive_cmd_a},
|
|
||||||
#endif
|
|
||||||
{' ', N_("&Rescan C-r"), 'R', reread_cmd}
|
{' ', N_("&Rescan C-r"), 'R', reread_cmd}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -867,9 +856,6 @@ static menu_entry RightMenu[] = {
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
{' ', "", ' ', 0},
|
{' ', "", ' ', 0},
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
{' ', N_("&Drive... M-d"), 'D', drive_cmd_b},
|
|
||||||
#endif
|
|
||||||
{' ', N_("&Rescan C-r"), 'R', reread_cmd}
|
{' ', N_("&Rescan C-r"), 'R', reread_cmd}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -881,13 +867,11 @@ static menu_entry FileMenu[] = {
|
|||||||
{' ', N_("&Edit F4"), 'E', edit_cmd},
|
{' ', N_("&Edit F4"), 'E', edit_cmd},
|
||||||
{' ', N_("&Copy F5"), 'C', copy_cmd},
|
{' ', N_("&Copy F5"), 'C', copy_cmd},
|
||||||
{' ', N_("c&Hmod C-x c"), 'H', chmod_cmd},
|
{' ', N_("c&Hmod C-x c"), 'H', chmod_cmd},
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
{' ', N_("&Link C-x l"), 'L', link_cmd},
|
{' ', N_("&Link C-x l"), 'L', link_cmd},
|
||||||
{' ', N_("&SymLink C-x s"), 'S', symlink_cmd},
|
{' ', N_("&SymLink C-x s"), 'S', symlink_cmd},
|
||||||
{' ', N_("edit s&Ymlink C-x C-s"), 'Y', edit_symlink_cmd},
|
{' ', N_("edit s&Ymlink C-x C-s"), 'Y', edit_symlink_cmd},
|
||||||
{' ', N_("ch&Own C-x o"), 'O', chown_cmd},
|
{' ', N_("ch&Own C-x o"), 'O', chown_cmd},
|
||||||
{' ', N_("&Advanced chown "), 'A', chown_advanced_cmd},
|
{' ', N_("&Advanced chown "), 'A', chown_advanced_cmd},
|
||||||
#endif
|
|
||||||
{' ', N_("&Rename/Move F6"), 'R', ren_cmd},
|
{' ', N_("&Rename/Move F6"), 'R', ren_cmd},
|
||||||
{' ', N_("&Mkdir F7"), 'M', mkdir_cmd},
|
{' ', N_("&Mkdir F7"), 'M', mkdir_cmd},
|
||||||
{' ', N_("&Delete F8"), 'D', delete_cmd},
|
{' ', N_("&Delete F8"), 'D', delete_cmd},
|
||||||
@ -945,9 +929,7 @@ static menu_entry OptMenu[] = {
|
|||||||
{' ', N_("&Layout..."), 'L', layout_cmd},
|
{' ', N_("&Layout..."), 'L', layout_cmd},
|
||||||
{' ', N_("c&Onfirmation..."), 'O', confirm_box},
|
{' ', N_("c&Onfirmation..."), 'O', confirm_box},
|
||||||
{' ', N_("&Display bits..."), 'D', display_bits_box},
|
{' ', N_("&Display bits..."), 'D', display_bits_box},
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
{' ', N_("learn &Keys..."), 'K', learn_keys},
|
{' ', N_("learn &Keys..."), 'K', learn_keys},
|
||||||
#endif /* !NATIVE_WIN32 */
|
|
||||||
#ifdef USE_VFS
|
#ifdef USE_VFS
|
||||||
{' ', N_("&Virtual FS..."), 'V', configure_vfs},
|
{' ', N_("&Virtual FS..."), 'V', configure_vfs},
|
||||||
#endif /* !USE_VFS */
|
#endif /* !USE_VFS */
|
||||||
@ -1260,14 +1242,12 @@ static const key_map ctl_x_map[] = {
|
|||||||
{'t', copy_current_tagged},
|
{'t', copy_current_tagged},
|
||||||
{XCTRL ('t'), copy_other_tagged},
|
{XCTRL ('t'), copy_other_tagged},
|
||||||
{'c', chmod_cmd},
|
{'c', chmod_cmd},
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
{'o', chown_cmd},
|
{'o', chown_cmd},
|
||||||
{'r', copy_current_readlink},
|
{'r', copy_current_readlink},
|
||||||
{XCTRL ('r'), copy_other_readlink},
|
{XCTRL ('r'), copy_other_readlink},
|
||||||
{'l', link_cmd},
|
{'l', link_cmd},
|
||||||
{'s', symlink_cmd},
|
{'s', symlink_cmd},
|
||||||
{XCTRL ('s'), edit_symlink_cmd},
|
{XCTRL ('s'), edit_symlink_cmd},
|
||||||
#endif /* !NATIVE_WIN32 */
|
|
||||||
{'i', info_cmd_no_menu},
|
{'i', info_cmd_no_menu},
|
||||||
{'q', quick_cmd_no_menu},
|
{'q', quick_cmd_no_menu},
|
||||||
{'h', add2hotlist_cmd},
|
{'h', add2hotlist_cmd},
|
||||||
@ -1341,8 +1321,7 @@ static const key_map default_map[] = {
|
|||||||
static void
|
static void
|
||||||
setup_sigwinch (void)
|
setup_sigwinch (void)
|
||||||
{
|
{
|
||||||
#if (defined(HAVE_SLANG) || (NCURSES_VERSION_MAJOR >= 4)) && \
|
#if (defined(HAVE_SLANG) || (NCURSES_VERSION_MAJOR >= 4)) && defined(SIGWINCH)
|
||||||
!defined(NATIVE_WIN32) && defined(SIGWINCH)
|
|
||||||
struct sigaction act, oact;
|
struct sigaction act, oact;
|
||||||
act.sa_handler = flag_winch;
|
act.sa_handler = flag_winch;
|
||||||
sigemptyset (&act.sa_mask);
|
sigemptyset (&act.sa_mask);
|
||||||
@ -1519,13 +1498,6 @@ make_panels_dirty (void)
|
|||||||
move (row, col);
|
move (row, col);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 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) == '\\')
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
midnight_callback (struct Dlg_head *h, int id, int msg)
|
midnight_callback (struct Dlg_head *h, int id, int msg)
|
||||||
{
|
{
|
||||||
@ -1585,7 +1557,7 @@ midnight_callback (struct Dlg_head *h, int id, int msg)
|
|||||||
return MSG_HANDLED;
|
return MSG_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_key_backslash (id) || id == '-') {
|
if (id == '\\' || id == '-') {
|
||||||
unselect_cmd ();
|
unselect_cmd ();
|
||||||
return MSG_HANDLED;
|
return MSG_HANDLED;
|
||||||
}
|
}
|
||||||
@ -1604,7 +1576,7 @@ midnight_callback (struct Dlg_head *h, int id, int msg)
|
|||||||
return MSG_HANDLED;
|
return MSG_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_key_backslash (id) || id == '-') {
|
if (id == '\\' || id == '-') {
|
||||||
unselect_cmd ();
|
unselect_cmd ();
|
||||||
return MSG_HANDLED;
|
return MSG_HANDLED;
|
||||||
}
|
}
|
||||||
@ -1825,46 +1797,7 @@ do_nc (void)
|
|||||||
done_mc_profile ();
|
done_mc_profile ();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined (NATIVE_WIN32)
|
/* POSIX version. The only version we support. */
|
||||||
/* Windows NT code */
|
|
||||||
|
|
||||||
void
|
|
||||||
OS_Setup (void)
|
|
||||||
{
|
|
||||||
SetConsoleTitle ("GNU Midnight Commander");
|
|
||||||
|
|
||||||
shell = getenv ("COMSPEC");
|
|
||||||
if (!shell || !*shell)
|
|
||||||
shell = get_default_shell ();
|
|
||||||
|
|
||||||
/* Default opening mode for files is binary, not text (CR/LF translation) */
|
|
||||||
#ifndef __EMX__
|
|
||||||
_fmode = O_BINARY;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
mc_home = get_mc_lib_dir ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Nothing to be done on Windows */
|
|
||||||
static void
|
|
||||||
sigchld_handler_no_subshell (int sig)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
init_sigchld (void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
init_sigfatals (void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
/* Unix version */
|
|
||||||
static void
|
static void
|
||||||
OS_Setup (void)
|
OS_Setup (void)
|
||||||
{
|
{
|
||||||
@ -1948,8 +1881,6 @@ init_sigchld (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* NATIVE_WIN32, UNIX */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_mc_usage (poptContext ctx, FILE *stream)
|
print_mc_usage (poptContext ctx, FILE *stream)
|
||||||
{
|
{
|
||||||
@ -2093,15 +2024,13 @@ static const struct poptOption argument_table[] = {
|
|||||||
N_("Resets soft keys on HP terminals")},
|
N_("Resets soft keys on HP terminals")},
|
||||||
{"slow", 's', POPT_ARG_NONE, &slow_terminal, 0,
|
{"slow", 's', POPT_ARG_NONE, &slow_terminal, 0,
|
||||||
N_("To run on slow terminals")},
|
N_("To run on slow terminals")},
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
{"stickchars", 'a', 0, &force_ugly_line_drawing, 0,
|
{"stickchars", 'a', 0, &force_ugly_line_drawing, 0,
|
||||||
N_("Use stickchars to draw")},
|
N_("Use stickchars to draw")},
|
||||||
#endif /* !NATIVE_WIN32 */
|
|
||||||
#ifdef HAVE_SUBSHELL_SUPPORT
|
#ifdef HAVE_SUBSHELL_SUPPORT
|
||||||
{"subshell", 'U', POPT_ARG_NONE, &use_subshell, 0,
|
{"subshell", 'U', POPT_ARG_NONE, &use_subshell, 0,
|
||||||
N_("Enables subshell support (default)")},
|
N_("Enables subshell support (default)")},
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_SLANG) && !defined(NATIVE_WIN32)
|
#if defined(HAVE_SLANG)
|
||||||
{"termcap", 't', 0, &SLtt_Try_Termcap, 0,
|
{"termcap", 't', 0, &SLtt_Try_Termcap, 0,
|
||||||
N_("Tries to use termcap instead of terminfo")},
|
N_("Tries to use termcap instead of terminfo")},
|
||||||
#endif
|
#endif
|
||||||
@ -2193,9 +2122,6 @@ handle_args (int argc, char *argv[])
|
|||||||
* Previous versions of the program had all of their files in
|
* Previous versions of the program had all of their files in
|
||||||
* the $HOME, we are now putting them in $HOME/.mc
|
* the $HOME, we are now putting them in $HOME/.mc
|
||||||
*/
|
*/
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
# define compatibility_move_mc_files() 0
|
|
||||||
#else
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
do_mc_filename_rename (char *mc_dir, char *o_name, char *n_name)
|
do_mc_filename_rename (char *mc_dir, char *o_name, char *n_name)
|
||||||
@ -2232,7 +2158,6 @@ compatibility_move_mc_files (void)
|
|||||||
g_free (mc_dir);
|
g_free (mc_dir);
|
||||||
return move;
|
return move;
|
||||||
}
|
}
|
||||||
#endif /* NATIVE_WIN32 */
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
@ -2366,18 +2291,12 @@ main (int argc, char *argv[])
|
|||||||
if (alternate_plus_minus)
|
if (alternate_plus_minus)
|
||||||
numeric_keypad_mode ();
|
numeric_keypad_mode ();
|
||||||
|
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
signal (SIGCHLD, SIG_DFL); /* Disable the SIGCHLD handler */
|
signal (SIGCHLD, SIG_DFL); /* Disable the SIGCHLD handler */
|
||||||
#endif
|
|
||||||
|
|
||||||
if (console_flag)
|
if (console_flag)
|
||||||
handle_console (CONSOLE_DONE);
|
handle_console (CONSOLE_DONE);
|
||||||
putchar ('\n'); /* Hack to make shell's prompt start at left of screen */
|
putchar ('\n'); /* Hack to make shell's prompt start at left of screen */
|
||||||
|
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
/* On NT, home_dir is malloced */
|
|
||||||
g_free (home_dir);
|
|
||||||
#endif
|
|
||||||
if (last_wd_file && last_wd_string && !print_last_revert
|
if (last_wd_file && last_wd_string && !print_last_revert
|
||||||
&& !edit_one_file && !view_one_file) {
|
&& !edit_one_file && !view_one_file) {
|
||||||
int last_wd_fd =
|
int last_wd_fd =
|
||||||
@ -2391,9 +2310,7 @@ main (int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
g_free (last_wd_string);
|
g_free (last_wd_string);
|
||||||
|
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
g_free (mc_home);
|
g_free (mc_home);
|
||||||
#endif /* NATIVE_WIN32 */
|
|
||||||
done_key ();
|
done_key ();
|
||||||
#ifdef HAVE_CHARSET
|
#ifdef HAVE_CHARSET
|
||||||
free_codepages_list ();
|
free_codepages_list ();
|
||||||
|
@ -146,11 +146,7 @@ extern struct WMenu *the_menubar;
|
|||||||
void done_menu (void);
|
void done_menu (void);
|
||||||
void init_menu (void);
|
void init_menu (void);
|
||||||
|
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
# define MC_BASE ""
|
|
||||||
#else
|
|
||||||
#define MC_BASE "/.mc/"
|
#define MC_BASE "/.mc/"
|
||||||
#endif /* !NATIVE_WIN32 */
|
|
||||||
|
|
||||||
struct WPanel;
|
struct WPanel;
|
||||||
void directory_history_add (struct WPanel *panel, const char *dir);
|
void directory_history_add (struct WPanel *panel, const char *dir);
|
||||||
|
@ -289,12 +289,6 @@ static int menubar_handle_key (WMenu *menubar, int key)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* .ado: NT Alpha cannot allow CTRL in Menubar */
|
|
||||||
#if defined(NATIVE_WIN32)
|
|
||||||
if (!key)
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!menubar->dropped){
|
if (!menubar->dropped){
|
||||||
const int items = menubar->items;
|
const int items = menubar->items;
|
||||||
for (i = 0; i < items; i++){
|
for (i = 0; i < items; i++){
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
#define __PROFILE_H
|
#define __PROFILE_H
|
||||||
/* Prototypes for the profile management functions */
|
/* Prototypes for the profile management functions */
|
||||||
|
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
short GetPrivateProfileString (const char * AppName, char * KeyName,
|
short GetPrivateProfileString (const char * AppName, char * KeyName,
|
||||||
char * Default, char * ReturnedString,
|
char * Default, char * ReturnedString,
|
||||||
short Size, char * FileName);
|
short Size, char * FileName);
|
||||||
@ -19,7 +18,6 @@ int WritePrivateProfileString (const char * AppName, char * KeyName, char * Stri
|
|||||||
char * FileName);
|
char * FileName);
|
||||||
|
|
||||||
int WriteProfileString (const char * AppName, char * KeyName, char * String);
|
int WriteProfileString (const char * AppName, char * KeyName, char * String);
|
||||||
#endif /* not NATIVE_WIN32 */
|
|
||||||
|
|
||||||
void sync_profiles (void);
|
void sync_profiles (void);
|
||||||
|
|
||||||
|
14
src/screen.c
14
src/screen.c
@ -46,10 +46,6 @@
|
|||||||
#include "execute.h"
|
#include "execute.h"
|
||||||
#include "widget.h"
|
#include "widget.h"
|
||||||
|
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
# include "drive.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define ELEMENTS(arr) ( sizeof(arr) / sizeof((arr)[0]) )
|
#define ELEMENTS(arr) ( sizeof(arr) / sizeof((arr)[0]) )
|
||||||
|
|
||||||
#define J_LEFT 1
|
#define J_LEFT 1
|
||||||
@ -667,7 +663,7 @@ display_mini_info (WPanel *panel)
|
|||||||
|
|
||||||
/* Status resolves links and show them */
|
/* Status resolves links and show them */
|
||||||
set_colors (panel);
|
set_colors (panel);
|
||||||
#ifndef NATIVE_WIN32
|
|
||||||
if (S_ISLNK (panel->dir.list [panel->selected].buf.st_mode)){
|
if (S_ISLNK (panel->dir.list [panel->selected].buf.st_mode)){
|
||||||
char *link, link_target [MC_MAXPATHLEN];
|
char *link, link_target [MC_MAXPATHLEN];
|
||||||
int len;
|
int len;
|
||||||
@ -683,7 +679,7 @@ display_mini_info (WPanel *panel)
|
|||||||
addstr (_("<readlink failed>"));
|
addstr (_("<readlink failed>"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
/* Default behavior */
|
/* Default behavior */
|
||||||
repaint_file (panel, panel->selected, 0, STATUS, 1);
|
repaint_file (panel, panel->selected, 0, STATUS, 1);
|
||||||
return;
|
return;
|
||||||
@ -2075,12 +2071,6 @@ static const key_map panel_keymap [] = {
|
|||||||
{ ALT('r'), goto_middle_file }, /* M-r like emacs */
|
{ ALT('r'), goto_middle_file }, /* M-r like emacs */
|
||||||
{ ALT('j'), goto_bottom_file },
|
{ ALT('j'), goto_bottom_file },
|
||||||
|
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
{ ALT(KEY_F(11)), drive_cmd_a },
|
|
||||||
{ ALT(KEY_F(12)), drive_cmd_b },
|
|
||||||
{ ALT('d'), drive_chg },
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Emacs-like bindings */
|
/* Emacs-like bindings */
|
||||||
{ XCTRL('v'), next_page }, /* C-v like emacs */
|
{ XCTRL('v'), next_page }, /* C-v like emacs */
|
||||||
{ ALT('v'), prev_page }, /* M-v like emacs */
|
{ ALT('v'), prev_page }, /* M-v like emacs */
|
||||||
|
@ -26,11 +26,7 @@ extern int startup_left_mode;
|
|||||||
extern int startup_right_mode;
|
extern int startup_right_mode;
|
||||||
extern int verbose;
|
extern int verbose;
|
||||||
|
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
# define PROFILE_NAME "mc.ini"
|
|
||||||
# define HOTLIST_FILENAME "mc.hot"
|
|
||||||
#else
|
|
||||||
#define PROFILE_NAME ".mc/ini"
|
#define PROFILE_NAME ".mc/ini"
|
||||||
#define HOTLIST_FILENAME ".mc/hotlist"
|
#define HOTLIST_FILENAME ".mc/hotlist"
|
||||||
#endif
|
|
||||||
#endif
|
#endif /* !__SETUP_H */
|
||||||
|
@ -211,16 +211,6 @@ tree_store_load_from(char *name)
|
|||||||
name = decode(buffer + 2);
|
name = decode(buffer + 2);
|
||||||
|
|
||||||
len = strlen(name);
|
len = strlen(name);
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
/* .ado: Drives for Win32 */
|
|
||||||
if ((len > 2) &&
|
|
||||||
isalpha(name[0]) &&
|
|
||||||
(name[1] == ':') && (name[2] == '\\')) {
|
|
||||||
tree_store_add_entry(name);
|
|
||||||
strcpy(oldname, name);
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
/* UNIX Version */
|
|
||||||
if (name[0] != PATH_SEP) {
|
if (name[0] != PATH_SEP) {
|
||||||
/* Clear-text decompression */
|
/* Clear-text decompression */
|
||||||
char *s = strtok(name, " ");
|
char *s = strtok(name, " ");
|
||||||
|
@ -3,13 +3,8 @@
|
|||||||
|
|
||||||
/* Default filenames for the tree */
|
/* Default filenames for the tree */
|
||||||
|
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
# define MC_TREE "mcn.tre"
|
|
||||||
# define MC_TREE_TMP "mcn.tr~"
|
|
||||||
#else
|
|
||||||
#define MC_TREE ".mc/Tree"
|
#define MC_TREE ".mc/Tree"
|
||||||
#define MC_TREE_TMP ".mc/Tree.tmp"
|
#define MC_TREE_TMP ".mc/Tree.tmp"
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct tree_entry {
|
typedef struct tree_entry {
|
||||||
char *name; /* The full path of directory */
|
char *name; /* The full path of directory */
|
||||||
|
@ -554,9 +554,7 @@ execute_menu_command (WEdit *edit_widget, char *commands)
|
|||||||
char prompt [80];
|
char prompt [80];
|
||||||
int col;
|
int col;
|
||||||
char *file_name;
|
char *file_name;
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
char *p;
|
|
||||||
#endif
|
|
||||||
/* Skip menu entry title line */
|
/* Skip menu entry title line */
|
||||||
commands = strchr (commands, '\n');
|
commands = strchr (commands, '\n');
|
||||||
if (!commands){
|
if (!commands){
|
||||||
|
10
src/user.h
10
src/user.h
@ -10,15 +10,6 @@ int check_format_view (const char *);
|
|||||||
int check_format_var (const char *, char **);
|
int check_format_var (const char *, char **);
|
||||||
int check_format_cd (const char *);
|
int check_format_cd (const char *);
|
||||||
|
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
# define CEDIT_LOCAL_MENU "cedit.mnu"
|
|
||||||
# define CEDIT_GLOBAL_MENU "cedit.mnu"
|
|
||||||
# define CEDIT_HOME_MENU "cedit.mnu"
|
|
||||||
# define MC_LOCAL_MENU "mc.mnu"
|
|
||||||
# define MC_GLOBAL_MENU "mc.mnu"
|
|
||||||
# define MC_HOME_MENU "mc.mnu"
|
|
||||||
# define MC_HINT "mc.hnt"
|
|
||||||
#else
|
|
||||||
#define CEDIT_GLOBAL_MENU "cedit.menu"
|
#define CEDIT_GLOBAL_MENU "cedit.menu"
|
||||||
#define CEDIT_LOCAL_MENU ".cedit.menu"
|
#define CEDIT_LOCAL_MENU ".cedit.menu"
|
||||||
#define CEDIT_HOME_MENU ".mc/cedit/menu"
|
#define CEDIT_HOME_MENU ".mc/cedit/menu"
|
||||||
@ -26,6 +17,5 @@ int check_format_cd (const char *);
|
|||||||
#define MC_LOCAL_MENU ".mc.menu"
|
#define MC_LOCAL_MENU ".mc.menu"
|
||||||
#define MC_HOME_MENU ".mc/menu"
|
#define MC_HOME_MENU ".mc/menu"
|
||||||
#define MC_HINT "mc.hint"
|
#define MC_HINT "mc.hint"
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
18
src/util.h
18
src/util.h
@ -145,21 +145,6 @@ void save_file_position (char *filename, long line, long column);
|
|||||||
|
|
||||||
|
|
||||||
/* OS specific defines */
|
/* OS specific defines */
|
||||||
|
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
# define PATH_SEP '\\'
|
|
||||||
# define PATH_SEP_STR "\\"
|
|
||||||
# define PATH_ENV_SEP ';'
|
|
||||||
# define TMPDIR_DEFAULT "c:\\temp"
|
|
||||||
# define SCRIPT_SUFFIX ".cmd"
|
|
||||||
# define OS_SORT_CASE_SENSITIVE_DEFAULT 0
|
|
||||||
# define STRCOMP stricmp
|
|
||||||
# define STRNCOMP strnicmp
|
|
||||||
# define MC_ARCH_FLAGS REG_ICASE
|
|
||||||
char *get_default_shell (void);
|
|
||||||
char *get_default_editor (void);
|
|
||||||
int lstat (const char* pathname, struct stat *buffer);
|
|
||||||
#else
|
|
||||||
#define PATH_SEP '/'
|
#define PATH_SEP '/'
|
||||||
#define PATH_SEP_STR "/"
|
#define PATH_SEP_STR "/"
|
||||||
#define PATH_ENV_SEP ':'
|
#define PATH_ENV_SEP ':'
|
||||||
@ -170,7 +155,6 @@ void save_file_position (char *filename, long line, long column);
|
|||||||
#define STRCOMP strcmp
|
#define STRCOMP strcmp
|
||||||
#define STRNCOMP strncmp
|
#define STRNCOMP strncmp
|
||||||
#define MC_ARCH_FLAGS 0
|
#define MC_ARCH_FLAGS 0
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
|
|
||||||
@ -192,4 +176,4 @@ void save_file_position (char *filename, long line, long column);
|
|||||||
#define ISASCII(c) isascii(c)
|
#define ISASCII(c) isascii(c)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif /* !__UTIL_H */
|
||||||
|
@ -171,12 +171,7 @@ struct WView {
|
|||||||
|
|
||||||
|
|
||||||
/* Maxlimit for skipping updates */
|
/* Maxlimit for skipping updates */
|
||||||
int max_dirt_limit =
|
int max_dirt_limit = 10;
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
0;
|
|
||||||
#else
|
|
||||||
10;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern Hook *idle_hook;
|
extern Hook *idle_hook;
|
||||||
|
|
||||||
|
14
vfs/vfs.h
14
vfs/vfs.h
@ -286,20 +286,6 @@ static inline int mc_setctl(char *path, int ctlop, char *arg) { return 0; }
|
|||||||
# define ftpfs_hint_reread(x) do { } while (0)
|
# define ftpfs_hint_reread(x) do { } while (0)
|
||||||
# define ftpfs_flushdir() do { } while (0)
|
# define ftpfs_flushdir() do { } while (0)
|
||||||
|
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
# undef mc_rmdir
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef NATIVE_WIN32
|
|
||||||
# undef mc_ctl
|
|
||||||
# undef mc_unlink
|
|
||||||
# define mc_ctl(a,b,c) 0
|
|
||||||
# ifndef __EMX__
|
|
||||||
# undef mc_mkdir
|
|
||||||
# define mc_mkdir(a,b) mkdir(a)
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* USE_VFS */
|
#endif /* USE_VFS */
|
||||||
|
|
||||||
#define mc_errno errno
|
#define mc_errno errno
|
||||||
|
Loading…
Reference in New Issue
Block a user