1
1

nt, os2, tk, xv: removed all files

Этот коммит содержится в:
Pavel Roskin 2000-08-02 16:27:14 +00:00
родитель 55cf24c3db
Коммит 84a2125c44
137 изменённых файлов: 0 добавлений и 22882 удалений

Просмотреть файл

@ -1,24 +0,0 @@
Mon Mar 23 08:16:12 1998 Pavel Roskin <pavel.roskin@ecsoft.co.uk>
* nt/key.nt.c: cleanup, more keys work (not all)
Sat Mar 7 14:43:27 1998 Pavel Roskin <pavel.roskin@ecsoft.co.uk>
* nt/Makefile.NT, nt/Makefile.VC4: rewritten for GNU make.
Use gmake -f Makefile.VC4 to compile.
* nt/*.c: config.h is included before all other code.
* nt/config.h: added some definitions, because some
compilers don't accept long command lines.
* nt/Makefile.VC1: removed :-( It didn't work anyways.
* nt/slint.nt.c: can be compiled under OS/2 too
* nt/key.nt.c: correct_key_code was called twice. Shifted
functional keys supported. Alt-F1 and Alt-F2 work as F11 and F12.
Alt-F7 works as Shift-Alt-? (used for find file). Function
alt_pressed() and ctrl_pressed() introduced.

Просмотреть файл

@ -1,37 +0,0 @@
#
# 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, use Makefile.NT instead.
#
# Please read the file README.NT in the top directory of the distribution
#
include ../Make.common
FILES = Makefile TODO dirent.c mc.ico bugs mc.rc config.h dirent.h \
Makefile.NT chmod.nt.c drive.nt.c slint.nt.c cons.handler.nt.c \
key.nt.c utilnt.c Makefile.NT Makefile.VC4 Makefile.BC5 \
util.WinNT.c util.debug.c util.Win32.c util.Win32.h util.debug.h \
drive.h
FILESSYS = sys/param.h sys/time.h
all:
TAGS: $(FILES)
etags $(FILES)
clean realclean distclean cross:
install:
uninstall:
depend dep:
fastdeploc:
distcopy:
$(CP) $(FILES) ../../mc-$(VERSION)/nt
-mkdir ../../mc-$(VERSION)/nt/sys
$(CP) $(FILESSYS) ../../mc-$(VERSION)/nt/sys

Просмотреть файл

@ -1,62 +0,0 @@
# Makefile.BC5
#
# Midnight Commander for Win32 makefile
# for Borland C++ 5.01
#
# Hacked by Dan Nicolaescu from Visual IDE mak
# Hacked by Pavel Roskin to make it work with cmd.exe from Windows NT4
# 980206 hacked by Pavel Roskin to make it work with GNU make
# 980316 hacked by Pavel Roskin to make it work with Borland C++
# --------------------------------------------------------------------------
MC_LIBS=
# ---- Path (case-sensitive!) is searched for executables
# If the command line contains quotes, it is passed to shell
# Errors are ignored in this case!
Path=c:/bc5/bin
CC=bcc32.exe
# Just comment RSC out if you have problems with resources
# RSC=rc.exe
LINK=bcc32.exe
OBJ_SUFFIX=obj
OBJ_PLACE=-o
RES_PLACE=-fo
EXE_PLACE=-e
# ---- Compiler-specific optional stuff
MC_MISC_CFLAGS=
ifndef RELEASE
# ---- Debug build
OBJS_DIR=debug
EXTRA_MC_SRCS=util.debug.c
SPECIFIC_DEFINES=-DHAVE_TRACE
SPECIFIC_MC_CFLAGS=-v -y $(MC_MISC_CFLAGS)
SPECIFIC_MC_LFLAGS_EXTRA=-lv
SPECIFIC_SLANG_CFLAGS=$(SPECIFIC_MC_CFLAGS)
SPECIFIC_MCEDIT_CFLAGS=$(SPECIFIC_MC_CFLAGS) -I../edit -I../src
RC_DEFINES=-D_DEBUG
else
# ---- Release build
OBJS_DIR=release
EXTRA_MC_SRCS=
SPECIFIC_DEFINES=
SPECIFIC_MC_CFLAGS=$(MC_MISC_CFLAGS)
SPECIFIC_MC_LFLAGS_EXTRA=
SPECIFIC_SLANG_CFLAGS=$(SPECIFIC_MC_CFLAGS)
SPECIFIC_MCEDIT_CFLAGS=$(SPECIFIC_MC_CFLAGS) -I../edit -I../src
RC_DEFINES=-DRELEASE=$(RELEASE)
endif
MC_EXE=$(OBJS_DIR)/mc.exe
# ---- Compiler independent defines
include Makefile.NT
# ---- Linkers are usualy compiler-specific
SPECIFIC_MC_LFLAGS= \
$(SPECIFIC_MC_LFLAGS_EXTRA)
$(MC_EXE): $(MC_RES) $(OBJS) $(MCEDIT_OBJS) $(SLANG_OBJS)
$(LINK) $(EXE_PLACE)$(MC_EXE) $(SPECIFIC_MC_LFLAGS) $+ $(MC_LIBS)

Просмотреть файл

@ -1,152 +0,0 @@
# Makefile
# Written by Dan Nicolaescu
# 970423 hacked by Juan f. Grigera
# 970525 hacked again by jfg to add internal editor
# 971127 hacked by Pavel Roskin to make it work with mc-4.1.11
# 980206 hacked by Pavel Roskin to make it work with GNU make
#
# This is the Makefile for Midnight Commander under Win32.
#
# Supported Compilers:
#
# makefile.vc4: Microsoft Visual C++ 4.x
# ...
# ---- Directories
MC_NT_DIR=../nt
MC_SRC_DIR=../src
MC_INCLUDE_DIR=.
VFS_DIR=../vfs
MCEDIT_SRC_DIR=../edit
MCEDIT_OBJS_DIR=$(OBJS_DIR)/edit
SLANG_SRC_DIR=../slang
SLANG_OBJS_DIR=$(OBJS_DIR)/slang
# --- Midnight Defines
MC_DEFINES=$(SPECIFIC_DEFINES) -D_CONSOLE -DHAVE_CONFIG_H -DUSE_INTERNAL_EDIT
MC_INCLUDES=-I$(MC_SRC_DIR) -I$(MC_NT_DIR) -I$(SLANG_SRC_DIR)
SLANG_DEFINES=$(SPECIFIC_DEFINES)
SLANG_INCLUDES=-I$(MC_NT_DIR) -I$(SLANG_SRC_DIR)
MCEDIT_DEFINES=$(SPECIFIC_DEFINES) -D_CONSOLE -DHAVE_CONFIG_H
MCEDIT_INCLUDES=-I$(MC_NT_DIR) -I$(MC_SRC_DIR)/.. -I$(SLANG_SRC_DIR)
CFLAGS=$(SPECIFIC_MC_CFLAGS) $(MC_INCLUDES) $(MC_DEFINES) -c
SLANG_CFLAGS=$(SPECIFIC_SLANG_CFLAGS) $(SLANG_INCLUDES) $(SLANG_DEFINES) -c
MCEDIT_CFLAGS=$(SPECIFIC_MCEDIT_CFLAGS) $(MCEDIT_INCLUDES) $(MCEDIT_DEFINES) -c
RSC_FLAGS=$(RES_PLACE)$(OBJS_DIR)/mc.res $(RC_DEFINES)
# --- Dependencies
.PHONY: all object-dirs mc clean
all: object-dirs mc
object-dirs: $(OBJS_DIR) $(SLANG_OBJS_DIR) $(MCEDIT_OBJS_DIR)
mc: $(MC_EXE)
clean:
deltree -y "$(SLANG_OBJS_DIR)"
deltree -y "$(MCEDIT_OBJS_DIR)"
deltree -y "$(OBJS_DIR)"
$(OBJS_DIR):
mkdir "$@"
$(SLANG_OBJS_DIR):
mkdir "$@"
$(MCEDIT_OBJS_DIR):
mkdir "$@"
$(OBJS_DIR)/%.$(OBJ_SUFFIX): $(MC_NT_DIR)/%.c
$(CC) $(CFLAGS) $(OBJ_PLACE)$@ $<
$(OBJS_DIR)/%.$(OBJ_SUFFIX): $(MC_SRC_DIR)/%.c
$(CC) $(CFLAGS) $(OBJ_PLACE)$@ $<
$(SLANG_OBJS_DIR)/%.$(OBJ_SUFFIX): $(SLANG_SRC_DIR)/%.c
$(CC) $(SLANG_CFLAGS) $(OBJ_PLACE)$@ $<
$(MCEDIT_OBJS_DIR)/%.$(OBJ_SUFFIX): $(MCEDIT_SRC_DIR)/%.c
$(CC) $(MCEDIT_CFLAGS) $(OBJ_PLACE)$@ $<
SRCS= $(EXTRA_MC_SRCS) \
util.Win32.c \
util.WinNT.c \
terms.c \
user.c \
utilnt.c \
subshell.c \
file.c \
listmode.c \
cmd.c \
dirent.c \
command.c \
help.c \
menu.c \
view.c \
dir.c \
info.c \
widget.c \
cons.handler.nt.c \
option.c \
dlg.c \
panelize.c \
profile.c \
util.c \
dialog.c \
ext.c \
color.c \
drive.nt.c \
key.nt.c \
layout.c \
setup.c \
regex.c \
hotlist.c \
slint.nt.c \
tree.c \
win.c \
chmod.nt.c \
complete.c \
find.c \
wtools.c \
boxes.c \
background.c \
dirhist.c \
main.c \
popt.c \
text.c \
screen.c
SLANG_SRCS= \
slw32tty.c \
slerr.c \
slgetkey.c \
slsmg.c \
slvideo.c
MCEDIT_SRCS= \
edit.c \
editcmd.c \
editdraw.c \
editmenu.c \
editoptions.c \
editwidget.c \
wordproc.c
OBJS=$(addprefix $(OBJS_DIR)/, \
$(patsubst %.c,%.$(OBJ_SUFFIX),$(SRCS)))
SLANG_OBJS=$(addprefix $(SLANG_OBJS_DIR)/, \
$(patsubst %.c,%.$(OBJ_SUFFIX),$(SLANG_SRCS)))
MCEDIT_OBJS=$(addprefix $(MCEDIT_OBJS_DIR)/, \
$(patsubst %.c,%.$(OBJ_SUFFIX),$(MCEDIT_SRCS)))
# --- Resources
ifdef RSC
MC_RES=$(OBJS_DIR)/mc.res
else
MC_RES=
endif
$(OBJS_DIR)/mc.res: $(MC_NT_DIR)/mc.rc $(MC_NT_DIR)/mc.ico $(MC_NT_DIR)/config.h ../VERSION
$(RSC) $(RSC_FLAGS) $(MC_NT_DIR)/mc.rc

Просмотреть файл

@ -1,35 +0,0 @@
# Makefile.vc1
#
# Midnight Commander for Win32 makefile
# for Microsoft Visual C++ 1.x
#
# Hacked by Juan Grigera from Visual IDE mak
# --------------------------------------------------------------------------
MC_LIBS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
NOLOGO=-nologo
MC_MISC_CFLAGS=-Fp"$(OBJS_DIR)/Mc.pch"
CC=cl.exe
RSC=rc.exe
LINK=link.exe
BSC=bscmake.exe
SLANG_LINK=link.exe -lib
MCEDIT_LINK=link.exe -lib
!if "$(DEBUG)" == "0"
EXTRA_MC_OBJS=
SPECIFIC_DEFINES=-DNDEBUG
SPECIFIC_MC_CFLAGS=$(NOLOGO) -ML -GX -O2 -YX0 $(MC_MISC_CFLAGS)
SPECIFIC_MC_LFLAGS_EXTRA=-debug -incremental:no
SPECIFIC_SLANG_CFLAGS=-ML -W3 -GX -O2 -YX -Fp"$(SLANG_OBJS_DIR)/slang.pch"
SPECIFIC_MCEDIT_CFLAGS=-ML -W3 -GX -O2 -YX -Fp"$(MCEDIT_OBJS_DIR)/slang.pch"
!else
EXTRA_MC_OBJS=$(OBJS_DIR)\util.debug.obj
SPECIFIC_MC_CFLAGS==$(NOLOGO) -MLd -Gm -GX -Zi -Od -YX -Fd"$(OBJS_DIR)/" $(MC_MISC_CFLAGS)
SPECIFIC_MC_LFLAGS_EXTRA=-debug -incremental:yes
SPECIFIC_SLANG_CFLAGS=-MLd -W3 -GX -Z7 -Od -YX -Fr"$(SLANG_OBJS_DIR)/" -Fp"$(SLANG_OBJS_DIR)/slang.pch"
SPECIFIC_MCEDIT_CFLAGS=-MLd -W3 -GX -Z7 -Od -YX -Fr"$(MCEDIT_OBJS_DIR)/" -Fp"$(MCEDIT_OBJS_DIR)/slang.pch"
!endif
SPECIFIC_MC_LFLAGS=-subsystem:console -pdb:"$(OBJS_DIR)/Mc.pdb" -out:"$(OBJS_DIR)/Mc.exe" $(SPECIFIC_MC_LFLAGS_EXTRA)

Просмотреть файл

@ -1,65 +0,0 @@
# Makefile.vc4
#
# Midnight Commander for Win32 makefile
# for Microsoft Visual C++ 4.x
#
# Hacked by Dan Nicolaescu from Visual IDE mak
# Hacked by Pavel Roskin to make it work with cmd.exe from Windows NT4
# 980206 hacked by Pavel Roskin to make it work with GNU make
# --------------------------------------------------------------------------
MC_LIBS=advapi32.lib
# ---- Path (case-sensitive!) is searched for executables
# If the command line contains quotes, it is passed to shell
# Errors are ignored in this case!
Path=c:/msdev/bin
CC=cl.exe
# Just comment RSC out if you have problems with resources
RSC=rc.exe
LINK=link.exe
OBJ_SUFFIX=obj
OBJ_PLACE=-Fo
RES_PLACE=-fo
EXE_PLACE=-out:
# ---- Compiler-specific optional stuff
MC_MISC_CFLAGS=-nologo -YX -Fp$(OBJS_DIR)/mc.pch
ifndef RELEASE
# ---- Debug build
OBJS_DIR=debug
EXTRA_MC_SRCS=util.debug.c
SPECIFIC_DEFINES=-DHAVE_TRACE
SPECIFIC_MC_CFLAGS=-MLd -W3 -Gm -Zi -Od -Fd$(OBJS_DIR)/mc.pdb $(MC_MISC_CFLAGS)
SPECIFIC_MC_LFLAGS_EXTRA=-debug -incremental:yes
SPECIFIC_SLANG_CFLAGS=$(SPECIFIC_MC_CFLAGS)
SPECIFIC_MCEDIT_CFLAGS=$(SPECIFIC_MC_CFLAGS)
RC_DEFINES=-D_DEBUG
else
# ---- Release build
OBJS_DIR=release
EXTRA_MC_SRCS=
SPECIFIC_DEFINES=
SPECIFIC_MC_CFLAGS=-ML -W3 -O2 $(MC_MISC_CFLAGS)
SPECIFIC_MC_LFLAGS_EXTRA=-incremental:no
SPECIFIC_SLANG_CFLAGS=$(SPECIFIC_MC_CFLAGS)
SPECIFIC_MCEDIT_CFLAGS=$(SPECIFIC_MC_CFLAGS)
RC_DEFINES=-DRELEASE=$(RELEASE)
endif
MC_EXE=$(OBJS_DIR)/mc.exe
# ---- Compiler independent defines
include Makefile.NT
# ---- Linkers are usualy compiler-specific
SPECIFIC_MC_LFLAGS= \
-nologo \
-subsystem:console \
-pdb:$(OBJS_DIR)/mc.pdb \
-machine:I386 \
$(SPECIFIC_MC_LFLAGS_EXTRA)
$(MC_EXE): $(MC_RES) $(OBJS) $(MCEDIT_OBJS) $(SLANG_OBJS)
$(LINK) $(EXE_PLACE)$(MC_EXE) $(MC_LIBS) $(SPECIFIC_MC_LFLAGS) $+

12
nt/TODO
Просмотреть файл

@ -1,12 +0,0 @@
TODO
-Move settings from mc.ini to the registry.
-Fix opendir/readdir d_date and d_time packing (they return 10).
-Fix gettimeofday()
-Write a better stat function than the one RTL gives us. We can provide user ID
and rwx permissions.
-Write the VFS
-Write a TODO list!

14
nt/bugs
Просмотреть файл

@ -1,14 +0,0 @@
BUGS
(of this port)
- show_console_contents is not working fine, needs more dev.
- International keyboard layouts have trouble with Alt-Gr+keys
- filtered view hangs in close_pipe()
- Windows '95 will not delete directory if not empty. (as it does
not return ENOTEMPTY but ENOACCESS)!
- Windows '95 will not allow "''" in root drives
-please report!

Просмотреть файл

@ -1,434 +0,0 @@
/* Chmod command for Windows NT operating system
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Notes:
- Preliminar. Work to be done here. (Maybe should write a command to
change attributes and another to change rwx permissions.
*/
#include <config.h>
#ifndef _OS_NT
#error This file is for the NT operating system.
#else
#include <windows.h>
#include <string.h>
#include <stdio.h>
#include "tty.h"
#include "mad.h"
#include "util.h"
#include "win.h"
#include "color.h"
#include "dlg.h"
#include "widget.h"
#include "dialog.h" /* For do_refresh() */
#include "dir.h"
#include "panel.h" /* Needed for the externs */
#include "file.h"
#include "main.h"
#include "chmod.h"
#include "achown.h"
#include "chown.h"
static int single_set;
struct Dlg_head *ch_dlg;
#define PX 5
#define PY 2
#define FX 40
#define FY 2
#define BX 6
#define BY 17
#define TX 40
#define TY 12
#define PERMISSIONS 4
#define BUTTONS 6
#define B_MARKED B_USER
#define B_ALL B_USER+1
#define B_SETMRK B_USER+2
#define B_CLRMRK B_USER+3
int mode_change, need_update;
int c_file, end_chmod;
umode_t and_mask, or_mask, c_stat;
char *c_fname, *c_fown, *c_fgrp, *c_fperm;
int c_fsize;
static WLabel *statl;
static int normal_color;
static int title_color;
static int selection_color;
struct {
mode_t mode;
char *text;
int selected;
WCheck *check;
} check_perm[PERMISSIONS] = {
{
FILE_ATTRIBUTE_ARCHIVE, "Archive", 0, 0,
},
{
FILE_ATTRIBUTE_READONLY, "Read Only", 0, 0,
},
{
FILE_ATTRIBUTE_HIDDEN, "Hidden", 0, 0,
},
{
FILE_ATTRIBUTE_SYSTEM, "System", 0, 0,
},
/* {
S_IWGRP, "write by group", 0, 0,
},
{
S_IRGRP, "read by group", 0, 0,
},
{
S_IXUSR, "execute/search by owner", 0, 0,
},
{
S_IWUSR, "write by owner", 0, 0,
},
{
S_IRUSR, "read by owner", 0, 0,
},
*/
};
struct {
int ret_cmd, flags, y, x;
char *text;
} chmod_but[BUTTONS] = {
{
B_CANCEL, NORMAL_BUTTON, 2, 33, "&Cancel",
},
{
B_ENTER, DEFPUSH_BUTTON, 2, 17, "&Set",
},
{
B_CLRMRK, NORMAL_BUTTON, 0, 42, "C&lear marked",
},
{
B_SETMRK, NORMAL_BUTTON, 0, 27, "S&et marked",
},
{
B_MARKED, NORMAL_BUTTON, 0, 12, "&Marked all",
},
{
B_ALL, NORMAL_BUTTON, 0, 0, "Set &all",
},
};
static void chmod_toggle_select (void)
{
int Id = ch_dlg->current->dlg_id - BUTTONS + single_set * 2;
attrset (normal_color);
check_perm[Id].selected ^= 1;
dlg_move (ch_dlg, PY + PERMISSIONS - Id, PX + 1);
addch ((check_perm[Id].selected) ? '*' : ' ');
dlg_move (ch_dlg, PY + PERMISSIONS - Id, PX + 3);
}
static void chmod_refresh (void)
{
attrset (normal_color);
dlg_erase (ch_dlg);
draw_box (ch_dlg, 1, 2, 20 - single_set, 66);
draw_box (ch_dlg, PY, PX, PERMISSIONS + 2, 33);
draw_box (ch_dlg, FY, FX, 10, 25);
dlg_move (ch_dlg, FY + 1, FX + 2);
addstr ("Name");
dlg_move (ch_dlg, FY + 3, FX + 2);
addstr ("Permissions (Octal)");
dlg_move (ch_dlg, FY + 5, FX + 2);
addstr ("Owner name");
dlg_move (ch_dlg, FY + 7, FX + 2);
addstr ("Group name");
attrset (title_color);
dlg_move (ch_dlg, 1, 28);
addstr (" Chmod command ");
dlg_move (ch_dlg, PY, PX + 1);
addstr (" Permission ");
dlg_move (ch_dlg, FY, FX + 1);
addstr (" File ");
attrset (selection_color);
dlg_move (ch_dlg, TY, TX);
addstr ("Use SPACE to change");
dlg_move (ch_dlg, TY + 1, TX);
addstr ("an option, ARROW KEYS");
dlg_move (ch_dlg, TY + 2, TX);
addstr ("to move between options");
dlg_move (ch_dlg, TY + 3, TX);
addstr ("and T or INS to mark");
}
static int chmod_callback (Dlg_head *h, int Par, int Msg)
{
char buffer [10];
switch (Msg) {
case DLG_ACTION:
if (Par >= BUTTONS - single_set * 2){
c_stat ^= check_perm[Par - BUTTONS + single_set * 2].mode;
sprintf (buffer, "%o", c_stat);
label_set_text (statl, buffer);
chmod_toggle_select ();
mode_change = 1;
}
break;
case DLG_KEY:
if ((Par == 'T' || Par == 't' || Par == KEY_IC) &&
ch_dlg->current->dlg_id >= BUTTONS - single_set * 2) {
chmod_toggle_select ();
if (Par == KEY_IC)
dlg_one_down (ch_dlg);
return 1;
}
break;
#ifndef HAVE_X
case DLG_DRAW:
chmod_refresh ();
break;
#endif
}
return 0;
}
static void init_chmod (void)
{
int i;
do_refresh ();
end_chmod = c_file = need_update = 0;
single_set = (cpanel->marked < 2) ? 2 : 0;
if (use_colors){
normal_color = COLOR_NORMAL;
title_color = COLOR_HOT_NORMAL;
selection_color = COLOR_NORMAL;
} else {
normal_color = NORMAL_COLOR;
title_color = SELECTED_COLOR;
selection_color = SELECTED_COLOR;
}
ch_dlg = create_dlg (0, 0, 22 - single_set, 70, dialog_colors,
chmod_callback, "[Chmod]", "chmod", DLG_CENTER);
x_set_dialog_title (ch_dlg, "Chmod command");
#define XTRACT(i) BY+chmod_but[i].y-single_set, BX+chmod_but[i].x, \
chmod_but[i].ret_cmd, chmod_but[i].flags, chmod_but[i].text, 0, 0, NULL
tk_new_frame (ch_dlg, "b.");
for (i = 0; i < BUTTONS; i++) {
if (i == 2 && single_set)
break;
else
add_widgetl (ch_dlg, button_new (XTRACT (i)), XV_WLAY_RIGHTOF);
}
#define XTRACT2(i) 0, check_perm [i].text, NULL
tk_new_frame (ch_dlg, "c.");
for (i = 0; i < PERMISSIONS; i++) {
check_perm[i].check = check_new (PY + (PERMISSIONS - i), PX + 2,
XTRACT2 (i));
add_widget (ch_dlg, check_perm[i].check);
}
}
static int stat_file (char *filename, struct stat *st)
{
// Note: - we assume attribute values fit in st.st_mode (a word, not a dword)
// - we change st_mode value with attributes, not RWX permissions
if (stat (filename, st))
return 0;
st->st_mode = GetFileAttributes (filename);
if (st->st_mode & FILE_ATTRIBUTE_DIRECTORY)
return 0;
return 1;
}
static void chmod_done (void)
{
if (need_update)
update_panels (UP_OPTIMIZE, UP_KEEPSEL, UP_KEEPSEL);
repaint_screen ();
}
char *next_file (void)
{
while (!cpanel->dir.list[c_file].f.marked)
c_file++;
return cpanel->dir.list[c_file].fname;
}
static void do_chmod (struct stat *sf)
{
sf->st_mode &= and_mask;
sf->st_mode |= or_mask;
SetFileAttributes (cpanel->dir.list [c_file].fname, sf->st_mode);
do_file_mark (cpanel, c_file, 0);
}
static void apply_mask (struct stat *sf)
{
char *fname;
need_update = end_chmod = 1;
do_chmod (sf);
do {
fname = next_file ();
if (!stat_file (fname, sf))
return;
c_stat = sf->st_mode;
do_chmod (sf);
} while (cpanel->marked);
}
static int my_chmod (char *path, int mode)
{
SetFileAttributes(path, mode);
return (GetFileAttributes(path) != mode);
}
void chmod_cmd (void)
{
char buffer [10];
char *fname;
int i;
struct stat sf_stat;
do { /* do while any files remaining */
init_chmod ();
if (cpanel->marked)
fname = next_file (); /* next marked file */
else
fname = selection (cpanel)->fname; /* single file */
if (!stat_file (fname, &sf_stat)) /* get status of file */
break;
c_stat = sf_stat.st_mode;
mode_change = 0; /* clear changes flag */
/* set check buttons */
for (i = 0; i < PERMISSIONS; i++){
check_perm[i].check->state = (c_stat & check_perm[i].mode) ? 1 : 0;
check_perm[i].selected = 0;
}
tk_new_frame (ch_dlg, "l.");
/* Set the labels */
c_fname = name_trunc (fname, 21);
add_widget (ch_dlg, label_new (FY+2, FX+2, c_fname, NULL));
c_fown = name_trunc (get_owner (sf_stat.st_uid), 21);
add_widget (ch_dlg, label_new (FY+6, FX+2, c_fown, NULL));
c_fgrp = name_trunc (get_group (sf_stat.st_gid), 21);
add_widget (ch_dlg, label_new (FY+8, FX+2, c_fgrp, NULL));
sprintf (buffer, "%o", c_stat);
statl = label_new (FY+4, FX+2, buffer, NULL);
add_widget (ch_dlg, statl);
tk_end_frame ();
run_dlg (ch_dlg); /* retrieve an action */
/* do action */
switch (ch_dlg->ret_value){
case B_ENTER:
if (mode_change)
if (my_chmod (fname, c_stat))
message(1, "Chmod", "Change mode failed!");
need_update = 1;
break;
case B_CANCEL:
end_chmod = 1;
break;
case B_ALL:
case B_MARKED:
and_mask = or_mask = 0;
and_mask = ~and_mask;
for (i = 0; i < PERMISSIONS; i++) {
if (check_perm[i].selected || ch_dlg->ret_value == B_ALL)
if (check_perm[i].check->state & C_BOOL)
or_mask |= check_perm[i].mode;
else
and_mask &= ~check_perm[i].mode;
}
apply_mask (&sf_stat);
break;
case B_SETMRK:
and_mask = or_mask = 0;
and_mask = ~and_mask;
for (i = 0; i < PERMISSIONS; i++) {
if (check_perm[i].selected)
or_mask |= check_perm[i].mode;
}
apply_mask (&sf_stat);
break;
case B_CLRMRK:
and_mask = or_mask = 0;
and_mask = ~and_mask;
for (i = 0; i < PERMISSIONS; i++) {
if (check_perm[i].selected)
and_mask &= ~check_perm[i].mode;
}
apply_mask (&sf_stat);
break;
}
if (cpanel->marked && ch_dlg->ret_value!=B_CANCEL) {
do_file_mark (cpanel, c_file, 0);
need_update = 1;
}
destroy_dlg (ch_dlg);
} while (cpanel->marked && !end_chmod);
chmod_done ();
}
#endif /*_OS_NT*/

Просмотреть файл

@ -1,160 +0,0 @@
/****************************************************************************
CONFIG.H - Midnight Commander Configuration 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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
----------------------------------------------------------------------------
Changes:
- Created 951204/jfg
----------------------------------------------------------------------------
Contents:
- Headers flags
- Library flags
- Typedefs
- etc.
****************************************************************************/
#ifndef __CONFIG_H
#define __CONFIG_H
#ifndef __BORLANDC__
# include <../VERSION>
#else
# include <../VERSION.>
#endif
#ifndef WIN32
# define WIN32
#endif
#ifndef __WIN32__
# define __WIN32__
#endif
#ifndef MSWINDOWS
# define MSWINDOWS
#endif
#ifndef pc_system
# define pc_system
#endif
#define _OS_NT
#define OS2_NT
#define FLOAT_TYPE
#define MIDNIGHT
#define STDC_HEADERS
#define HAVE_STDLIB_H
#define HAVE_STRING_H
#define HAVE_DIRENT_H
#define HAVE_LIMITS_H
#define HAVE_FCNTL_H
#define HAVE_MEMSET
#define HAVE_MEMCHR
#define HAVE_MEMCPY
#define HAVE_MEMCMP
#define HAVE_MEMMOVE
#define HAVE_STRDUP
#define HAVE_STRERROR
#define HAVE_TRUNCATE
#define REGEX_MALLOC
#define NO_INFOMOUNT
#if !defined(HAVE_SLANG) && !defined (USE_NCURSES)
#define HAVE_SLANG
#endif
#ifdef USE_NCURSES
#define RENAMED_NCURSES
#endif
typedef unsigned int umode_t;
#define S_IFLNK 0
#define S_ISLNK(x) 0
#ifdef _MSC_VER
#pragma include_alias(<utime.h>, <sys/utime.h>)
#define INLINE
#define inline
#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#define S_ISFIFO(m) 0
#define S_ISBLK(x) 0
#define S_IRWXU 0000700
#define S_IRUSR 0000400
#define S_IWUSR 0000200
#define S_IXUSR 0000100
#define S_IRWXG 0000070
#define S_IRGRP 0000040
#define S_IWGRP 0000020
#define S_IXGRP 0000010
#define S_IRWXO 0000007
#define S_IROTH 0000004
#define S_IWOTH 0000002
#define S_IXOTH 0000001
/* FIXME: is this definition correct? */
#define R_OK 4
#define pipe(p) _pipe(p, 4096, 0x8000 /* O_BINARY */)
#define popen _popen
#define pclose _pclose
typedef int mode_t;
typedef unsigned int nlink_t;
typedef int gid_t;
typedef int uid_t;
typedef int pid_t;
#endif /* _MSC_VER */
#ifdef __BORLANDC__
#define INLINE
#define inline
#define S_IRWXG 0000070
#define S_IRGRP 0000040
#define S_IWGRP 0000020
#define S_IXGRP 0000010
#define S_IRWXO 0000007
#define S_IROTH 0000004
#define S_IWOTH 0000002
#define S_IXOTH 0000001
/* FIXME: is this definition correct? */
#define R_OK 4
#define pipe(p) _pipe(p, 4096, 0x8000 /* O_BINARY */)
#define popen _popen
#define pclose _pclose
typedef int pid_t;
#endif /* __BORLANDC__ */
#endif /* __CONFIG_H */

Просмотреть файл

@ -1,123 +0,0 @@
/* Client interface for General purpose Win32 console save/restore server
Having the same interface as its Linux counterpart:
Copyright (C) 1994 Janne Kukonlehto <jtklehto@stekt.oulu.fi>
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Note:
show_console_contents doesn't know how to write to its window
the rest works fine.
*/
#include <config.h>
#ifndef _OS_NT
#error This file is for Win32 operating systems.
#else
#include <windows.h>
#include "util.debug.h"
int cons_saver_pid = 1;
#include "tty.h"
#include "util.h"
#include "win.h"
#include "cons.saver.h"
signed char console_flag = 1;
static HANDLE hSaved, hNew;
void show_console_contents (int starty, unsigned char begin_line, unsigned char end_line)
{
DWORD dw;
COORD c0 = { 0, 0 };
COORD csize;
SMALL_RECT rect;
CHAR_INFO *pchar;
csize.X = COLS;
csize.Y = end_line-begin_line;
rect.Left = 0;
rect.Top = begin_line;
rect.Right = COLS;
rect.Bottom = end_line;
// -- This code reads characters and attributes
pchar = malloc (sizeof(CHAR_INFO) * (end_line-begin_line) * COLS);
// Copy from one console to the curses virtual screen
win32APICALL(ReadConsoleOutput (hSaved, pchar, csize, c0, &rect));
// FIXME: this should've work, but refresh() is called after this write :-(
win32APICALL(WriteConsoleOutput (hNew, pchar, csize, c0, &rect));
#ifdef USE_NCURSES
// Here we read only characters so that we can printw to stdscr.
// pchar = malloc (sizeof(TCHAR) * (end_line-begin_line) * COLS);
// Copy from one console to the curses virtual screen
// ReadConsoleOutputCharacter (hSaved, pchar, (end_line-begin_line) * COLS, c0, &dw);
// mvprintw(0, begin_line, "%.*s", (end_line-begin_line) * COLS, pchar);
#else
//#error show_console_contents not written for S-Lang
#endif
free (pchar);
}
void handle_console (unsigned char action)
{
static SECURITY_ATTRIBUTES sa;
COORD c;
CONSOLE_SCREEN_BUFFER_INFO csbi;
long lMode;
switch (action){
case CONSOLE_INIT: // Init
hSaved = GetStdHandle (STD_OUTPUT_HANDLE); // Save Standard handle
sa.nLength = sizeof(SECURITY_ATTRIBUTES);
sa.lpSecurityDescriptor = NULL;
sa.bInheritHandle = TRUE; // Create a new console buffer
win32APICALL_HANDLE(hNew, /* = */ CreateConsoleScreenBuffer (GENERIC_WRITE | GENERIC_READ,
FILE_SHARE_READ | FILE_SHARE_WRITE, &sa,
CONSOLE_TEXTMODE_BUFFER, NULL));
win32APICALL(GetConsoleScreenBufferInfo(hSaved, &csbi)); // ... with same size
win32APICALL(SetConsoleScreenBufferSize(hNew, csbi.dwSize));
win32APICALL(SetConsoleActiveScreenBuffer(hNew)); // ... that becomes standard handle
win32APICALL(SetConsoleMode(hNew, ENABLE_PROCESSED_INPUT));
win32APICALL(SetStdHandle(STD_OUTPUT_HANDLE, hNew));
break;
case CONSOLE_DONE: // Clean Up
win32APICALL(CloseHandle (hNew));
break;
case CONSOLE_SAVE: // Save
win32APICALL(SetConsoleActiveScreenBuffer (hNew)); // Current = our standard handle
win32APICALL(SetStdHandle (STD_OUTPUT_HANDLE, hNew));
break;
case CONSOLE_RESTORE: // Restore
win32APICALL(SetConsoleActiveScreenBuffer (hSaved)); // Put saved (shell) screen buffer
win32APICALL(SetStdHandle (STD_OUTPUT_HANDLE, hSaved));
break;
default:
win32Trace(("Invalid action code %d received in handle_console", action));
}
}
#endif // !_OS_NT

Просмотреть файл

@ -1,92 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
#include <windows.h>
#include <errno.h>
DIR *opendir (const char * a_dir)
{
int err;
WIN32_FIND_DATA wfd;
DIR* dd_dir = (DIR*) malloc (sizeof(DIR));
char *c_dir = malloc (strlen(a_dir) + 4);
strcpy (c_dir, a_dir);
strcat (c_dir, "\\*");
dd_dir->d_handle = FindFirstFile (c_dir, &wfd);
if (dd_dir->d_handle == INVALID_HANDLE_VALUE) {
err = GetLastError();
switch (err) {
case ERROR_NO_MORE_FILES:
case ERROR_FILE_NOT_FOUND:
case ERROR_PATH_NOT_FOUND:
errno = ENOENT;
break;
case ERROR_NOT_ENOUGH_MEMORY:
errno = ENOMEM;
break;
default:
errno = EINVAL;
break;
}
free(dd_dir);
return NULL;
}
dd_dir->d_attr = (wfd.dwFileAttributes == FILE_ATTRIBUTE_NORMAL)
? 0 : wfd.dwFileAttributes;
dd_dir->d_time = dd_dir->d_date = 10; //#
dd_dir->d_size = wfd.nFileSizeLow;
strcpy (dd_dir->d_name, wfd.cFileName);
dd_dir->d_first = 1;
free (c_dir);
return dd_dir;
}
DIR *readdir( DIR * dd_dir)
{
int err;
WIN32_FIND_DATA wfd;
if (dd_dir->d_first) {
dd_dir->d_first = 0;
return dd_dir;
}
if(!FindNextFile (dd_dir->d_handle, &wfd)) {
err = GetLastError();
switch (err) {
case ERROR_NO_MORE_FILES:
case ERROR_FILE_NOT_FOUND:
case ERROR_PATH_NOT_FOUND:
errno = ENOENT;
break;
case ERROR_NOT_ENOUGH_MEMORY:
errno = ENOMEM;
break;
default:
errno = EINVAL;
break;
}
return NULL;
}
dd_dir->d_attr = (wfd.dwFileAttributes == FILE_ATTRIBUTE_NORMAL)
? 0 : wfd.dwFileAttributes;
dd_dir->d_time = dd_dir->d_date = 10; //#
dd_dir->d_size = wfd.nFileSizeLow;
strcpy (dd_dir->d_name, wfd.cFileName);
return dd_dir;
}
int closedir (DIR *dd_dir)
{
FindClose(dd_dir->d_handle);
free (dd_dir);
return 1;
}

Просмотреть файл

@ -1,60 +0,0 @@
/*
* direct.h Defines the types and structures used by the directory routines
*
*/
#ifndef _DIRENT_H_incl
#define _DIRENT_H_incl
#ifdef __WATCOMC__
#include <direct.h>
#else
#ifdef __cplupplus
extern "C" {
#endif
#include <sys/types.h>
#define NAME_MAX 255 /* maximum filename for HPFS or NTFS */
typedef struct dirent {
void* d_handle;
unsigned d_attr; /* file's attribute */
unsigned short int d_time; /* file's time */
unsigned short int d_date; /* file's date */
long d_size; /* file's size */
char d_name[ NAME_MAX + 1 ]; /* file's name */
unsigned short d_ino; /* serial number (not used) */
char d_first; /* flag for 1st time */
} DIR;
#ifndef _A_NORMAL
#define _A_NORMAL 0x00 /* Normal file - read/write permitted */
#define _A_RDONLY 0x01 /* Read-only file */
#define _A_HIDDEN 0x02 /* Hidden file */
#define _A_SYSTEM 0x04 /* System file */
#define _A_VOLID 0x08 /* Volume-ID entry */
#define _A_SUBDIR 0x10 /* Subdirectory */
#define _A_ARCH 0x20 /* Archive file */
#endif //_A_NORMAL_
extern int chdir( const char *__path );
extern int closedir( DIR * );
/*
extern char *getcwd( char *__buf, unsigned __size );
extern unsigned _getdrive( void );
extern unsigned _getdiskfree( unsigned __drive, struct _diskfree_t *__diskspace);
*/
extern int mkdir( const char *__path );
extern DIR *opendir( const char * );
extern struct dirent *readdir( DIR * );
extern int rmdir( const char *__path );
#ifdef __cplusplus
};
#endif
#endif //__WATCOMC__
#endif //incl

Просмотреть файл

@ -1,12 +0,0 @@
#ifndef __DRIVE_H
#define __DRIVE_H
void drive_cmd_a(WPanel *);
void drive_cmd_b(WPanel *);
void drive_chg(WPanel *panel);
#endif /* __DRIVE_H */
void drive_cmd_a(WPanel *);
void drive_cmd_b(WPanel *);
void drive_chg(WPanel *panel);

Просмотреть файл

@ -1,222 +0,0 @@
/* Ch-Drive command for Windows NT operating system
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Bug:
the code will not work if you have more drives than those that
can fit in a panel.
*/
#include <config.h>
#ifndef _OS_NT
#error This file is for the Win32 operating systems.
#else
#include <windows.h>
#include <string.h>
#include <stdio.h>
#include "tty.h"
#include "mad.h"
#include "util.h"
#include "win.h"
#include "color.h"
#include "dlg.h"
#include "widget.h"
#include "dialog.h" /* For do_refresh() */
#include "dir.h"
#include "panel.h" /* Needed for the externs */
#include "file.h"
#include "main.h"
#include "util.Win32.h"
struct Dlg_head *drive_dlg;
WPanel *this_panel;
static int drive_dlg_callback (Dlg_head *h, int Par, int Msg);
static void drive_dlg_refresh (void);
static void drive_cmd();
#define B_DRIVE_BASE 100
void drive_cmd_a()
{
this_panel = left_panel;
drive_cmd();
}
void drive_cmd_b()
{
this_panel = right_panel;
drive_cmd();
}
void drive_chg(WPanel *panel)
{
this_panel = panel;
drive_cmd();
}
#define MAX_LGH 13 /* Length for drives */
static void drive_cmd()
{
int i, nNewDrive, nDrivesAvail;
char szTempBuf[7], szDrivesAvail[256], *p; /* mmm... this is bad practice... (256) */
// Dialogbox position
int x_pos; /* X-Position for the dialog */
int y_pos = (LINES-6)/2-3; /* Center on y */
int y_height;
int x_width;
int m_drv;
/* Get drives name and count */
GetLogicalDriveStrings (255, szDrivesAvail);
for (nDrivesAvail=0, p=szDrivesAvail; *p; nDrivesAvail++)
p+=4;
/* Create Dialog */
do_refresh ();
m_drv = ((nDrivesAvail > MAX_LGH) ? MAX_LGH: nDrivesAvail);
x_pos = this_panel->widget.x + (this_panel->widget.cols - m_drv*3)/2 + 2; /* Center on x, relative to panel */
if (nDrivesAvail > MAX_LGH) {
y_height = 8;
x_width = 33;
} else {
y_height = 6;
x_width = (nDrivesAvail - 1) * 2 + 9;
}
drive_dlg = create_dlg (y_pos, x_pos,
y_height,
x_width,
dialog_colors,
drive_dlg_callback,
"[ChDrive]",
"drive",
DLG_NONE);
x_set_dialog_title (drive_dlg, "Change Drive");
if (nDrivesAvail>MAX_LGH) {
for (i = 0; i < nDrivesAvail - MAX_LGH; i++) {
p -= 4;
sprintf(szTempBuf, "&%c", *p);
add_widgetl(drive_dlg,
button_new (5,
(m_drv-i-1)*2+4 - (MAX_LGH*2 - nDrivesAvail) * 2,
B_DRIVE_BASE + nDrivesAvail - i - 1,
HIDDEN_BUTTON,
szTempBuf, 0, NULL, NULL),
XV_WLAY_RIGHTOF);
}
}
/* Add a button for each drive */
for (i = 0; i < m_drv; i++) {
p -= 4;
sprintf (szTempBuf, "&%c", *p);
add_widgetl(drive_dlg,
button_new (3,
(m_drv-i-1)*2+4,
B_DRIVE_BASE+m_drv-i-1,
HIDDEN_BUTTON,
szTempBuf,
0,
NULL,
NULL),
XV_WLAY_RIGHTOF);
}
run_dlg(drive_dlg);
/* do action */
if (drive_dlg->ret_value != B_CANCEL) {
int errocc = 0; // no error
int rtn;
char drvLetter;
nNewDrive = drive_dlg->ret_value - B_DRIVE_BASE;
drvLetter = (char) *(szDrivesAvail + (nNewDrive*4));
if (win32_GetPlatform() == OS_WinNT) { /* Windows NT */
rtn = _chdrive(drvLetter - 'A' + 1);
} else { /* Windows 95 */
// HANDLE hDevice;
rtn = 1;
SetCurrentDirectory(szDrivesAvail+(nNewDrive*4));
/* Bug: can only change to DRV:\ */
// hDevice = CreateFile("\\\\.\\VWIN32", 0, 0, NULL, 0, 0, NULL);
// CloseHandle(hDevice);
}
if (rtn == -1)
errocc = 1;
else {
getcwd (this_panel->cwd, sizeof (this_panel->cwd)-2);
if (toupper(drvLetter) == toupper(*(this_panel->cwd))) {
clean_dir (&this_panel->dir, this_panel->count);
this_panel->count = do_load_dir(&this_panel->dir,
this_panel->sort_type,
this_panel->reverse,
this_panel->case_sensitive,
this_panel->filter);
this_panel->top_file = 0;
this_panel->selected = 0;
this_panel->marked = 0;
this_panel->total = 0;
show_dir(this_panel);
reread_cmd();
} else errocc = 1;
}
if (errocc)
message (1, " Error ",
"Can't access drive %c: \n",
*(szDrivesAvail+(nNewDrive*4)) );
}
destroy_dlg (drive_dlg);
repaint_screen ();
}
static int drive_dlg_callback (Dlg_head *h, int Par, int Msg)
{
char buffer [10];
switch (Msg) {
#ifndef HAVE_X
case DLG_DRAW:
drive_dlg_refresh ();
break;
#endif
}
return 0;
}
static void drive_dlg_refresh (void)
{
attrset (dialog_colors[0]);
dlg_erase (drive_dlg);
draw_box (drive_dlg, 1, 1, drive_dlg->lines-2, drive_dlg->cols-2);
attrset (dialog_colors[2]);
dlg_move (drive_dlg, 1, drive_dlg->cols/2 - 7);
addstr (" Change Drive ");
}
#endif

Просмотреть файл

@ -1,310 +0,0 @@
/* Keyboard support routines.
for Windows NT system.
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Bugs:
Have trouble with non-US keyboards, "Alt-gr"+keys (API tells CTRL-ALT is pressed)
*/
#include <config.h>
#ifndef _OS_NT
#error This file is for Win32 systems.
#else
#include <windows.h>
#include <stdio.h>
#include "mouse.h"
#include "global.h"
#include "main.h"
#include "key.h"
#include "../vfs/vfs.h"
#include "tty.h"
#include "util.debug.h"
/* Global variables */
int old_esc_mode = 0;
HANDLE hConsoleInput;
DWORD dwSaved_ControlState;
Gpm_Event evSaved_Event;
/* Unused variables */
int double_click_speed; /* they are here to keep linker happy */
int mou_auto_repeat;
int use_8th_bit_as_meta = 0;
/* Static Tables */
struct {
int key_code;
int vkcode;
} key_table [] = {
{ KEY_F(1), VK_F1 },
{ KEY_F(2), VK_F2 },
{ KEY_F(3), VK_F3 },
{ KEY_F(4), VK_F4 },
{ KEY_F(5), VK_F5 },
{ KEY_F(6), VK_F6 },
{ KEY_F(7), VK_F7 },
{ KEY_F(8), VK_F8 },
{ KEY_F(9), VK_F9 },
{ KEY_F(10), VK_F10 },
{ KEY_F(11), VK_F11 },
{ KEY_F(12), VK_F12 },
{ KEY_F(13), VK_F13 },
{ KEY_F(14), VK_F14 },
{ KEY_F(15), VK_F15 },
{ KEY_F(16), VK_F16 },
{ KEY_F(17), VK_F17 },
{ KEY_F(18), VK_F18 },
{ KEY_F(19), VK_F19 },
{ KEY_F(20), VK_F20 },
{ KEY_IC, VK_INSERT },
{ KEY_DC, VK_DELETE },
{ KEY_BACKSPACE, VK_BACK },
{ KEY_PPAGE, VK_PRIOR }, // Movement keys
{ KEY_NPAGE, VK_NEXT },
{ KEY_LEFT, VK_LEFT },
{ KEY_RIGHT, VK_RIGHT },
{ KEY_UP, VK_UP },
{ KEY_DOWN, VK_DOWN },
{ KEY_HOME, VK_HOME },
{ KEY_END, VK_END },
{ ALT('*'), VK_MULTIPLY }, // Numeric pad
{ ALT('+'), VK_ADD },
{ ALT('-'), VK_SUBTRACT },
{ ESC_CHAR, VK_ESCAPE }, /* ESC */
{ 0, 0}
};
/* init_key - Called in main.c to initialize ourselves
Get handle to console input
*/
void init_key (void)
{
win32APICALL_HANDLE (hConsoleInput, GetStdHandle (STD_INPUT_HANDLE));
}
int ctrl_pressed ()
{
return dwSaved_ControlState & (RIGHT_CTRL_PRESSED | LEFT_CTRL_PRESSED);
}
int shift_pressed ()
{
return dwSaved_ControlState & SHIFT_PRESSED;
}
int alt_pressed ()
{
return dwSaved_ControlState & (RIGHT_ALT_PRESSED | LEFT_ALT_PRESSED);
}
static int VKtoCurses (int a_vkc)
{
int i;
for (i = 0; key_table[i].vkcode != 0; i++)
if (a_vkc == key_table[i].vkcode) {
return key_table[i].key_code;
}
return 0;
}
static int translate_key_code(int asc, int scan)
{
int c;
c = VKtoCurses (scan);
if (!asc && !c)
return 0;
if (asc && c)
return c;
if (!asc)
{
if (shift_pressed() && (c >= KEY_F(1)) && (c <= KEY_F(10)))
c += 10;
if (alt_pressed() && (c >= KEY_F(1)) && (c <= KEY_F(2)))
c += 10;
if (alt_pressed() && (c == KEY_F(7)))
c = ALT('?');
if (ctrl_pressed() && c == '\t')
c = ALT('\t');
return c;
}
if (ctrl_pressed())
return XCTRL(asc);
if (alt_pressed())
return ALT(asc);
if (asc == 13)
return 10;
return asc;
}
int get_key_code (int no_delay)
{
INPUT_RECORD ir; /* Input record */
DWORD dw; /* number of records actually read */
int ch, vkcode, j;
if (no_delay) {
/* Check if any input pending, otherwise return */
nodelay (stdscr, TRUE);
win32APICALL(PeekConsoleInput(hConsoleInput, &ir, 1, &dw));
if (!dw)
return 0;
}
do {
win32APICALL(ReadConsoleInput(hConsoleInput, &ir, 1, &dw));
switch (ir.EventType) {
case KEY_EVENT:
if (!ir.Event.KeyEvent.bKeyDown) /* Process key just once: when pressed */
break;
vkcode = ir.Event.KeyEvent.wVirtualKeyCode;
ch = ir.Event.KeyEvent.uChar.AsciiChar;
dwSaved_ControlState = ir.Event.KeyEvent.dwControlKeyState;
j = translate_key_code (ch, vkcode);
if (j)
return j;
break;
case MOUSE_EVENT:
// Save event as a GPM-like event
evSaved_Event.x = ir.Event.MouseEvent.dwMousePosition.X;
evSaved_Event.y = ir.Event.MouseEvent.dwMousePosition.Y+1;
evSaved_Event.buttons = ir.Event.MouseEvent.dwButtonState;
switch (ir.Event.MouseEvent.dwEventFlags) {
case 0:
evSaved_Event.type = GPM_DOWN | GPM_SINGLE;
break;
case MOUSE_MOVED:
evSaved_Event.type = GPM_MOVE;
break;
case DOUBLE_CLICK:
evSaved_Event.type = GPM_DOWN | GPM_DOUBLE;
break;
};
return 0;
}
} while (!no_delay);
return 0;
}
static int getch_with_delay (void)
{
int c;
while (1) {
/* Try to get a character */
c = get_key_code (0);
if (c != ERR)
break;
}
/* Success -> return the character */
return c;
}
/* Returns a character read from stdin with appropriate interpretation */
int get_event (Gpm_Event *event, int redo_event, int block)
{
int c;
static int flag; /* Return value from select */
static int dirty = 3;
if ((dirty == 1) || is_idle ()){
refresh ();
doupdate ();
dirty = 1;
} else
dirty++;
vfs_timeout_handler ();
c = block ? getch_with_delay () : get_key_code (1);
if (!c) {
/* Code is 0, so this is a Control key or mouse event */
return EV_NONE; /* FIXME: mouse not supported */
}
return c;
}
/* Returns a key press, mouse events are discarded */
int mi_getch ()
{
Gpm_Event ev;
int key;
while ((key = get_event (&ev, 0, 1)) == 0)
;
return key;
}
/*
is_idle - A function to check if we're idle.
It checks for any waiting event (that can be a Key, Mouse event,
and other internal events like focus or menu)
*/
int is_idle (void)
{
DWORD dw;
if (GetNumberOfConsoleInputEvents (hConsoleInput, &dw))
if (dw > 15)
return 0;
return 1;
}
/* get_modifier */
int get_modifier()
{
int retval = 0;
if (dwSaved_ControlState & LEFT_ALT_PRESSED) /* code is not clean, because we return Linux-like bitcodes*/
retval |= ALTL_PRESSED;
if (dwSaved_ControlState & RIGHT_ALT_PRESSED)
retval |= ALTR_PRESSED;
if (dwSaved_ControlState & RIGHT_CTRL_PRESSED ||
dwSaved_ControlState & LEFT_CTRL_PRESSED)
retval |= CONTROL_PRESSED;
if (dwSaved_ControlState & SHIFT_PRESSED)
retval |= SHIFT_PRESSED;
return retval;
}
/* void functions for UNIX compatibility */
void define_sequence (int code, char* vkcode, int action)
{
}
void channels_up()
{
}
void channels_down()
{
}
void init_key_input_fd (void)
{
}
/* mouse is not yet supported, sorry */
void init_mouse (void) {}
void shut_mouse (void) {}
#endif /* _OS_NT */

Двоичные данные
nt/mc.ico

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.1 KiB

Просмотреть файл

@ -1,61 +0,0 @@
#include "windows.h"
#include "winver.h"
#include "config.h"
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 3,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40000L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", "Free Software Foundation\0"
VALUE "FileDescription", "GNU Midnight Commander\0"
VALUE "FileVersion", VERSION
VALUE "InternalName", "MC\0"
VALUE "LegalCopyright", "(c) Free Software Foundation\0"
VALUE "LegalTrademarks", "see GNU General Public License\0"
VALUE "OriginalFilename", "MC.EXE\0"
VALUE "ProductName", "GNU Midnight Commander\0"
VALUE "ProductVersion", VERSION
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
0 ICON DISCARDABLE "mc.ico"
#endif // English (U.S.) resources

Просмотреть файл

@ -1,221 +0,0 @@
/* Slang interface to the Midnight Commander for Windows NT and OS/2
This emulates some features of ncurses on top of slang
S-lang is not fully consistent between its Unix and non-Unix versions.
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <config.h>
#include <stdio.h>
#include "tty.h"
#include "mad.h"
#include "color.h"
#include "util.h"
#include "mouse.h" /* Gpm_Event is required in key.h */
#include "key.h" /* define_sequence */
#include "main.h" /* extern: force_colors */
#include "win.h" /* do_exit_ca_mode */
#ifdef HAVE_SLANG
static void slang_sigterm ()
{
SLsmg_reset_smg ();
}
static int slinterrupt;
void enable_interrupt_key(void)
{
SLang_set_abort_signal(NULL);
slinterrupt = 1;
}
void disable_interrupt_key(void)
{
slinterrupt = 0;
}
int got_interrupt ()
{
int t;
int SLKeyboard_Quit=0; //FIXME!!
t = slinterrupt ? SLKeyboard_Quit : 0;
// SLKeyboard_Quit = 0;
return t;
}
/* Only done the first time */
void slang_init (void)
{
SLtt_get_terminfo ();
SLang_init_tty (XCTRL('c'), 1, 0);
slang_prog_mode ();
load_terminfo_keys ();
}
/* Done each time we come back from done mode */
void slang_prog_mode (void)
{
SLsmg_init_smg ();
SLsmg_touch_lines (0, LINES);
}
/* Called each time we want to shutdown slang screen manager */
void slang_shell_mode (void)
{
}
void slang_shutdown ()
{
slang_shell_mode ();
do_exit_ca_mode ();
SLang_reset_tty ();
/* reset the colors to those that were
* active when the program was started up
(not written)
*/
}
/* keypad routines */
void slang_keypad (int set)
{
// enable keypad strings
// ?
}
static int no_slang_delay;
void set_slang_delay (int v)
{
no_slang_delay = v;
}
void hline (int ch, int len)
{
int last_x, last_y;
last_x = SLsmg_get_column ();
last_y = SLsmg_get_row ();
if (ch == 0)
ch = ACS_HLINE;
if (ch == ACS_HLINE){
SLsmg_draw_hline (len);
} else {
while (len--)
addch (ch);
}
move (last_y, last_x);
}
void vline (int character, int len)
{
if (!slow_terminal){
SLsmg_draw_vline (len);
} else {
int last_x, last_y, pos = 0;
last_x = SLsmg_get_column ();
last_y = SLsmg_get_row ();
while (len--){
move (last_y + pos++, last_x);
addch (' ');
}
move (last_x, last_y);
}
}
void init_pair (int index, char *foreground, char *background)
{
SLtt_set_color (index, "", foreground, background);
}
int has_colors ()
{
/* No terminals on NT, make default color */
if (!disable_colors)
SLtt_Use_Ansi_Colors = 1;
/* Setup emulated colors */
if (SLtt_Use_Ansi_Colors){
init_pair (A_REVERSE, "black", "white");
} else {
/* SLtt_set_mono (A_BOLD, NULL, SLTT_BOLD_MASK);
SLtt_set_mono (A_REVERSE, NULL, SLTT_REV_MASK);
SLtt_set_mono (A_BOLD|A_REVERSE, NULL, SLTT_BOLD_MASK | SLTT_REV_MASK);
*/ }
return SLtt_Use_Ansi_Colors;
}
void attrset (int color)
{
if (!SLtt_Use_Ansi_Colors){
SLsmg_set_color (color);
return;
}
if (color & A_BOLD){
if (color == A_BOLD)
SLsmg_set_color (A_BOLD);
else
SLsmg_set_color ((color & (~A_BOLD)) + 8);
return;
}
if (color == A_REVERSE)
SLsmg_set_color (A_REVERSE);
else
SLsmg_set_color (color);
}
void load_terminfo_keys ()
{
}
int getch ()
{
if (no_slang_delay)
if (SLang_input_pending (0) == 0)
return -1;
return SLang_getkey ();
}
extern int slow_terminal;
#else
/* Non slang builds do not understand got_interrupt */
int got_interrupt ()
{
return 0;
}
#endif /* HAVE_SLANG */
void mc_refresh (void)
{
/* if (!we_are_background) (no background mode yet) */
refresh ();
}
void slang_set_raw_mode (void)
{
return;
}

Просмотреть файл

@ -1,7 +0,0 @@
/* Systems having sys/param.h should not include this file */
#ifdef HAVE_PARAM_H
#error Remove this file if you have real sys/param.h
#else
/* FIXME: We should warn, that this file should not be included */
#endif

Просмотреть файл

@ -1,16 +0,0 @@
#ifndef _SYS_TIME_H
#define _SYS_TIME_H
#ifndef _WINSOCKAPI_ /* winsock.h defines struct timeval */
struct timeval {
long tv_sec;
long tv_usec;
};
#endif
int gettimeofday (struct timeval*, void *);
#endif

Просмотреть файл

@ -1,182 +0,0 @@
/* Utilities - Win32 utilities (Windows NT and Windows '95)
Copyright (C) 1994, 1995, 1996 the Free Software Foundation.
Written 1996 by Juan Grigera<grigera@isis.unlp.edu.ar>
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <config.h>
#include <windows.h>
#include "util.win32.h"
#include "util.debug.h"
/* int win32_GetPlatform ()
Checks in which OS Midnight Commander is running.
Returns:
OS_WinNT - Windows NT 3.x
OS_Win95 - Windows 4.x
Note: GetVersionEx (Win32API) is called only once.
*/
int win32_GetPlatform ()
{
static int platform = 0;
return (platform ? platform : (platform = win32_GetVersionEx()) );
}
/* int win32_GetVersionEx ()
intended for use by win32_GetPlatform only
*/
int win32_GetVersionEx ()
{
OSVERSIONINFO ovi;
ovi.dwOSVersionInfoSize = sizeof(ovi);
win32APICALL( GetVersionEx(&ovi) );
return ovi.dwPlatformId;
}
/* int win32_GetEXEType (const char* filename)
Determines whether filename (an Executable) is
a Console application (CUI) or a Graphical application(GUI).
filename - Name of executable file to check
Returns: EXE_win16 - Windows 3.x archive or OS/2
EXE_win32CUI - NT or Chicago Console API, also OS/2
EXE_win32GUI - NT or Chicago GUI API
EXE_otherCUI - DOS COM, MZ, ZM, Phar Lap
EXE_Unknown - Unknown
EXE_Error - Couldn't read file/EXE image
TODO: better management of OS/2 images
EXE_CompressedArchive can be easily implemented
Notes: This function parses the executable header (the only ugly way
to do it). If header is not found or not understood,
0 is returned.
Information on NE, LE, LX and MZ taken from Ralf Brown's interrupt
list, under INT 21-function 4B ("EXEC" - LOAD AND/OR EXECUTE PROGRAM),
Tables 0806 - 836.
Parsing of PE header (Win32 signature, "Portable Executable")
taken from MSKBase article Number: Q90493.
*/
/* ---- Executable Signatures ---- */
/* Alternative DOS signagure */
#define IMAGE_DOS_SIGNATURE_ALTERNATIVE 0x4D5A /* ZM */
/* Phar Lap .EXP files */
#define IMAGE_OLDPHARLAP_SIGNATURE 0x504D /* MP */
#define IMAGE_NEWPHARLAP_286_SIGNATURE 0x3250 /* P2 */
#define IMAGE_NEWPHARLAP_386_SIGNATURE 0x3350 /* P3 */
/* New Executables */
#define IMAGE_LX_SIGNATURE 0x584C /* LX */
#define IMAGE_PE_SIGNATURE 0x4550 /* PE */
int win32_GetEXEType (const char* a_szFileName)
{
HANDLE hImage;
DWORD dwDumm;
DWORD SectionOffset;
DWORD CoffHeaderOffset;
WORD wSignature;
/* DWORD MoreDosHeader[16]; */
IMAGE_DOS_HEADER image_dos_header;
IMAGE_FILE_HEADER image_file_header;
IMAGE_OPTIONAL_HEADER image_optional_header;
/* IMAGE_SECTION_HEADER image_section_header; */
/* Open the EXE file - Use Native API for SHARE compatibility */
hImage = CreateFile(a_szFileName, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (hImage == INVALID_HANDLE_VALUE) {
win32Trace (("win32_GetEXEType: Could not open file %s. API Error %d.", a_szFileName, GetLastError()));
return EXE_Error;
}
/* Read the MZ (DOS) image header. */
win32APICALL( ReadFile (hImage, (LPVOID)&image_dos_header, sizeof(IMAGE_DOS_HEADER), &dwDumm, NULL) );
switch (image_dos_header.e_magic) {
case IMAGE_DOS_SIGNATURE: /* MZ or ZM */
case IMAGE_DOS_SIGNATURE_ALTERNATIVE:
break;
case IMAGE_OLDPHARLAP_SIGNATURE: /* MP, P2, P3: Phar Lap executables */
case IMAGE_NEWPHARLAP_286_SIGNATURE:
case IMAGE_NEWPHARLAP_386_SIGNATURE:
return EXE_otherCUI;
default:
return EXE_otherCUI; /* Probably .COM? */
}
/* Read more MS-DOS header. */
/* win32APICALL( ReadFile (hImage, MoreDosHeader, sizeof(MoreDosHeader)); */
/* Get new executable header */
CoffHeaderOffset = SetFilePointer(hImage, image_dos_header.e_lfanew, NULL, FILE_BEGIN);
/* + sizeof(ULONG); */
win32APICALL( ReadFile (hImage, (LPVOID) &wSignature, sizeof(WORD), &dwDumm, NULL) );
switch (wSignature) {
case IMAGE_PE_SIGNATURE: /* PE - Portable Executable */
break;
case IMAGE_OS2_SIGNATURE: /* NE - New Executable OS/2 and Windows 3.x */
case IMAGE_OS2_SIGNATURE_LE: /* LE - Linear Execuable (Windows 3.x) */
case IMAGE_LX_SIGNATURE: /* LX - Linear Execuable (OS/2) */
return EXE_win16;
default:
return EXE_Unknown; /* unknown New Executable or bad pointer */
}
/* Continue parsing PE (COFF-like) */
SectionOffset = CoffHeaderOffset + IMAGE_SIZEOF_FILE_HEADER + IMAGE_SIZEOF_NT_OPTIONAL_HEADER;
win32APICALL( ReadFile(hImage, (LPVOID) &image_file_header, IMAGE_SIZEOF_FILE_HEADER, &dwDumm, NULL) );
/* Read optional header. */
win32APICALL( ReadFile(hImage, (LPVOID) &image_optional_header, IMAGE_SIZEOF_NT_OPTIONAL_HEADER, &dwDumm, NULL) );
switch (image_optional_header.Subsystem) {
case IMAGE_SUBSYSTEM_WINDOWS_GUI:
return EXE_win32GUI;
case IMAGE_SUBSYSTEM_WINDOWS_CUI:
case IMAGE_SUBSYSTEM_OS2_CUI:
case IMAGE_SUBSYSTEM_POSIX_CUI:
return EXE_win32CUI;
case IMAGE_SUBSYSTEM_UNKNOWN:
case IMAGE_SUBSYSTEM_NATIVE:
return EXE_Unknown; /* FIXME: what is "NATIVE??" */
default:
win32Trace(("Unknown type %u.\n", image_optional_header.Subsystem));
return EXE_Unknown;
}
}

Просмотреть файл

@ -1,42 +0,0 @@
/* util.Win32.h - Header
Utilities - Win32 utilities (Windows NT and Windows '95)
Copyright (C) 1994, 1995, 1996 the Free Software Foundation.
Written 1996 by Juan Grigera<grigera@isis.unlp.edu.ar>
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* Prototypes */
int win32_GetPlatform ();
int win32_GetEXEType (const char* a_szFileName);
int win32_GetVersionEx ();
/* Constants */
enum {
OS_WinNT = VER_PLATFORM_WIN32_NT, /* windows.h values */
OS_Win95 = VER_PLATFORM_WIN32_WINDOWS,
};
enum {
EXE_Unknown,
EXE_win16,
EXE_win32CUI,
EXE_win32GUI,
EXE_otherCUI,
EXE_Error
};

Просмотреть файл

@ -1,85 +0,0 @@
/* Utilities - Windows NT specific utilities (not in Win95)
Copyright (C) 1994, 1995, 1996 the Free Software Foundation.
Written 1996 by Juan Grigera<grigera@isis.unlp.edu.ar>
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <config.h>
#include <windows.h>
#include "util.win32.h"
#include "util.debug.h"
/* int winnt_IsAdministrator() - Determines whether user has Administrator (root)
priviledges.
Return: 1 if administrator
0 if not
Note: Code taken from MSKbase Number: Q118626.
To determine whether or not a user is an administrator, you need to examine
the user's access token with GetTokenInformation(). The access token
represents the user's privileges and the groups to which the user belongs.
*/
int winnt_IsAdministrator()
{
HANDLE hAccessToken;
UCHAR InfoBuffer[1024];
PTOKEN_GROUPS ptgGroups = (PTOKEN_GROUPS)InfoBuffer;
DWORD dwInfoBufferSize;
PSID psidAdministrators;
SID_IDENTIFIER_AUTHORITY siaNtAuthority = SECURITY_NT_AUTHORITY;
UINT x;
BOOL bSuccess;
if(!OpenProcessToken(GetCurrentProcess(),TOKEN_READ,&hAccessToken))
return 0;
bSuccess = GetTokenInformation(hAccessToken,TokenGroups,InfoBuffer,
1024, &dwInfoBufferSize);
CloseHandle(hAccessToken);
if( !bSuccess )
return 0;
if(!AllocateAndInitializeSid(&siaNtAuthority, 2,
SECURITY_BUILTIN_DOMAIN_RID,
DOMAIN_ALIAS_RID_ADMINS,
0, 0, 0, 0, 0, 0,
&psidAdministrators))
return 0;
bSuccess = 0;
for(x=0;x<ptgGroups->GroupCount;x++) {
if( EqualSid(psidAdministrators, ptgGroups->Groups[x].Sid) ) {
bSuccess = 1;
break;
}
}
FreeSid(psidAdministrators);
return bSuccess;
}
int geteuid ()
{
if (winnt_IsAdministrator())
return 0;
return 1;
}

Просмотреть файл

@ -1,187 +0,0 @@
/* UTIL.debug.c - Debugging routines
for Midnight Commander, under Win32
Written 951215 by Juan Grigera <grigera@isis.unlp.edu.ar>
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <config.h>
#ifdef HAVE_TRACE
#include <stdio.h>
#ifdef _OS_NT
#include <windows.h>
#endif
#include <errno.h>
#include "util.debug.h"
/* Global variables */
int __win32_tracing_enabled = 1;
static int _win32_tracing_started = 0;
static FILE *__win32_trace_f = NULL;
/* Definitions */
#define TRACE_FILE "mcTrace.out"
/* Prototypes - static funcs */
static void _win32InitTrace (void);
static void _win32EndTrace (void);
static const char* GetLastErrorText(void);
static char *visbuf(const char *buf);
/*
void _win32InitTrace()
This func will open file TRACE_FILE for output and add _win32EndTrace to onexit
list of funcs.
*/
static void _win32InitTrace()
{
if (!_win32_tracing_started) {
_win32_tracing_started = 1;
__win32_trace_f = fopen(TRACE_FILE, "wt");
if (__win32_trace_f == NULL) {
printf("Midnight Commander[DEBUG]: Can't open trace file '" TRACE_FILE "': %s \n", strerror(errno));
}
atexit (&_win32EndTrace);
// onexit (&_win32EndTrace);
}
}
/*
void _win32EndTrace()
This func closes file TRACE_FILE if opened.
*/
static void _win32EndTrace()
{
if (_win32_tracing_started) {
_win32_tracing_started = 0;
if (__win32_trace_f)
fclose (__win32_trace_f);
}
}
/*
void _win32Trace (char *fmt, ...)
Format and output debug strings. They are written to TRACE_FILE.
Debug Output is controlled by SetTrace (see below).
Win32: Output is sent to Debug Output also.
*/
void _win32Trace (const char *fmt, ...)
{
va_list ap;
char buffer[256];
char *vp;
if (!_win32_tracing_started)
_win32InitTrace();
va_start(ap, fmt);
vsprintf(buffer, fmt, ap);
vp = buffer;
#ifdef _OS_NT /* 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");
#endif
#endif
if(__win32_trace_f)
fprintf (__win32_trace_f, "%s\n", vp);
}
/*
void SetTrace (int trace)
Control debug output. Turn it of or on.
trace: 0 = off, 1 = on.
*/
void _win32SetTrace (int trace)
{
/* Prototypes - interlan funcs */
__win32_tracing_enabled = trace;
}
void _win32TraceOn ()
{
__win32_tracing_enabled = 1;
}
void _win32TraceOff()
{
__win32_tracing_enabled = 0;
}
#ifdef _OS_NT
/*
void DebugFailedWin32APICall (const char* name, int line, const char* file)
Report a System call failure.
name - text containing the source code that called the offending API func
line, file - place of "name" in code
See Also: definition of win32APICALL macro.
*/
void _win32DebugFailedWin32APICall (const char* name, int line, const char* file)
{
_win32Trace ("%s(%d): Call to Win32 API Failed. \"%s\".", file, line, name);
_win32Trace (" System Error (%d): %s. ", GetLastError(), GetLastErrorText());
}
#endif
/*
void DebugAssertionFailed (const char* name, int line, const char* file)
Report a logical condition failure. (e.g. a bad argument to a func)
name - text containing the logical condition
line, file - place of "name" in code
See Also: definition of ASSERT macro.
*/
void _win32DebugAssertionFailed (const char* name, int line, const char* file)
{
_win32Trace ("%s(%d): Assertion failed! \"%s\".", file, line, name);
}
/* const char* GetLastErrorText()
Retrieves the text associated with the last system error.
Returns pointer to static buffer. Contents valid till next call
*/
static const char* GetLastErrorText()
{
#define MAX_MSG_SIZE 256
static char szMsgBuf[MAX_MSG_SIZE];
DWORD dwError, dwRes;
dwError = GetLastError ();
dwRes = FormatMessage (
FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
dwError,
MAKELANGID (LANG_ENGLISH, SUBLANG_ENGLISH_US),
szMsgBuf,
MAX_MSG_SIZE,
NULL);
if (0 == dwRes) {
sprintf (szMsgBuf, "FormatMessage failed with %d", GetLastError());
}
return szMsgBuf;
}
#endif /*HAVE_TRACE*/

Просмотреть файл

@ -1,72 +0,0 @@
/* util.debug.h - Debugging routines
Written by Juan Grigera<grigera@isis.unlp.edu.ar>
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* ------------------------------------------------------------------------------------------ *
TRACER FUNCTIONS
* ------------------------------------------------------------------------------------------ */
#ifdef HAVE_TRACE
/************************/
/* Debug version */
/************************/
/* Macros
------
win32Trace(x) - Trace macro. Use double in parenthesis for x. Same args as printf.
win32ASSERT(x) - assert macro, but will not abort program and output sent to trace routine.
win32APICALL(x) - Use to enclose a Win32 system call that should return TRUE.
win32APICALL_HANDLE(h,api) - Use to enclose a Win32 system call that should return a handle.
*/
#define win32Trace(x) if (__win32_tracing_enabled) _win32Trace x
#define win32ASSERT(x) if (!(x)) _win32DebugAssertionFailed (#x, __LINE__, __FILE__)
#define win32APICALL(x) if (!(x)) _win32DebugFailedWin32APICall (#x, __LINE__, __FILE__)
#define win32APICALL_HANDLE(h,api) h=api; if (h==INVALID_HANDLE_VALUE) _win32DebugFailedWin32APICall (#h" = "#api, __LINE__, __FILE__)
/* Prototypes */
void _win32Trace (const char *, ...);
void _win32DebugFailedWin32APICall (const char *name, int line, const char *file);
void _win32DebugAssertionFailed (const char *name, int line, const char *file);
void _win32SetTrace (int trace);
void _win32TraceOn (void);
void _win32TraceOff (void);
#define SetTrace _win32SetTrace
#define TraceOn _win32TraceOn
#define TraceOff _win32TraceOff
/* Global variables */
extern int __win32_tracing_enabled;
#else
/************************/
/* Non-debug version */
/************************/
/* Wipe-out these macros */
#define win32Trace(x)
#define win32ASSERT(x)
#define win32APICALL(x) x
#define win32APICALL_HANDLE(h,api) h=api;
/* Wipe-out these funcs */
#define SetTrace(x)
#define TraceOn()
#define TraceOff()
#endif

Просмотреть файл

@ -1,719 +0,0 @@
/* Various utilities - NT versions
Copyright (C) 1994, 1995, 1996 the Free Software Foundation.
Written 1994, 1995, 1996 by:
Juan Grigera, Miguel de Icaza, Janne Kukonlehto, Dugan Porter,
Jakub Jelinek, Mauricio Plaza.
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <config.h>
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <io.h>
#include <fcntl.h>
#include <signal.h> /* my_system */
#include <limits.h> /* INT_MAX */
#include <errno.h>
#include <sys/time.h> /* select: timeout */
#include <sys/param.h>
#include <sys/stat.h>
#include <stdarg.h>
#include <process.h>
#include <fs.h>
#include <util.h>
#include "util.Win32.h"
#ifdef __BORLANDC__
#define ENOTEMPTY ERROR_DIR_NOT_EMPTY
#endif
char *get_owner (int uid)
{
return "none";
}
char *get_group (int gid)
{
return "none";
}
/* Pipes are guaranteed to be able to hold at least 4096 bytes */
/* More than that would be unportable */
#define MAX_PIPE_SIZE 4096
static int error_pipe[2]; /* File descriptors of error pipe */
static int old_error; /* File descriptor of old standard error */
/* Creates a pipe to hold standard error for a later analysis. */
/* The pipe can hold 4096 bytes. Make sure no more is written */
/* or a deadlock might occur. */
void open_error_pipe (void)
{
if (pipe (error_pipe) < 0){
message (0, " Warning ", " Pipe failed ");
}
old_error = dup (2);
if(old_error < 0 || close(2) || dup (error_pipe[1]) != 2){
message (0, " Warning ", " Dup failed ");
close (error_pipe[0]);
close (error_pipe[1]);
}
close (error_pipe[1]);
}
void close_error_pipe (int error, char *text)
{
char *title;
char msg[MAX_PIPE_SIZE];
int len = 0;
if (error)
title = " Error ";
else
title = " Warning ";
if (old_error >= 0){
close (2);
dup (old_error);
close (old_error);
len = read (error_pipe[0], msg, MAX_PIPE_SIZE);
if (len >= 0)
msg[len] = 0;
close (error_pipe[0]);
}
if (error < 0)
return; /* Just ignore error message */
if (text == NULL){
if (len == 0) return; /* Nothing to show */
/* Show message from pipe */
message (error, title, msg);
} else {
/* Show given text and possible message from pipe */
message (error, title, " %s \n %s ", text, msg);
}
}
void check_error_pipe (void)
{
char error[MAX_PIPE_SIZE];
int len = 0;
if (old_error >= 0){
while (len < MAX_PIPE_SIZE)
{
int rvalue;
rvalue = read (error_pipe[0], error + len, 1);
len ++;
if (rvalue <= 0)
break;
}
error[len] = 0;
close (error_pipe[0]);
}
if (len > 0)
message (0, " Warning ", error);
}
int my_system (int as_shell_command, const char *shell, const char *command)
{
int status = 0;
#if 0
/* .ado: temp. turn out */
if (as_shell_command) {
/* It is only the shell, /c will not work */
if (command)
spawnlp (P_WAIT, shell, shell, "/c", command, (char *) 0);
else
spawnlp (P_WAIT, shell, (char *) 0);
} else
spawnl (P_WAIT, shell, shell, command, (char *) 0);
if (win32_GetPlatform() == OS_Win95) {
SetConsoleTitle ("GNU Midnight Commander"); /* title is gone after spawn... */
}
#endif
if (as_shell_command) {
if (!access(command, 0)) {
switch(win32_GetEXEType (shell)) {
case EXE_win16: /* Windows 3.x archive or OS/2 */
case EXE_win32GUI: /* NT or Chicago GUI API */
spawnlp (P_NOWAIT, shell, shell, "/c", command, (char *) 0); /* don't wait for GUI programs to end */
break;
case EXE_otherCUI: /* DOS COM, MZ, ZM, Phar Lap */
case EXE_win32CUI: /* NT or Chicago Console API, also OS/2 */
case EXE_Unknown:
default:
spawnlp (P_WAIT, shell, shell, "/c", command, (char *) 0);
break;
}
}
else
spawnlp (P_WAIT, shell, shell, "/c", command, (char *) 0);
}
else
spawnl (P_WAIT, shell, shell, command, (char *) 0);
if (win32_GetPlatform() == OS_Win95) {
SetConsoleTitle ("GNU Midnight Commander"); /* title is gone after spawn... */
}
return status;
}
/* get_default_shell
Get the default shell for the current hardware platform
*/
char* get_default_shell()
{
if (win32_GetPlatform() == OS_WinNT)
return "cmd.exe";
else
return "command.com";
}
char *tilde_expand (char *directory)
{
return strdup (directory);
}
/* sleep: Call Windows API.
Can't do simple define. That would need <windows.h> in every source
*/
void sleep(unsigned long dwMiliSecs)
{
Sleep(dwMiliSecs);
}
/* Canonicalize path, and return a new path. Do everything in situ.
* [call OS API]
*/
char *canonicalize_pathname (char *path)
{
/* This holds an unused pointer to the start of file name in path */
char *pName;
char pCanonical[MC_MAXPATHLEN];
GetFullPathName (path, MC_MAXPATHLEN, pCanonical, &pName);
/* FIXME: buffer large enough? */
strcpy (path, pCanonical);
return path;
}
/* Do 'manual' canonicalizing, needed for some VFS functions
Canonicalize path, and return a new path. Do everything in situ.
The new path differs from path in:
Multiple `/'s are collapsed to a single `/'.
Leading `./'s and trailing `/.'s are removed.
Trailing `/'s are removed.
Non-leading `../'s and trailing `..'s are handled by removing
portions of the path. */
char *unixlike_canonicalize_pathname (char *path)
{
int i, start;
char stub_char;
stub_char = (*path == PATH_SEP) ? PATH_SEP : '.';
/* Walk along path looking for things to compact. */
i = 0;
for (;;) {
if (!path[i])
break;
while (path[i] && path[i] != PATH_SEP)
i++;
start = i++;
/* If we didn't find any slashes, then there is nothing left to do. */
if (!path[start])
break;
/* Handle multiple `/'s in a row. */
while (path[i] == PATH_SEP)
i++;
if ((start + 1) != i) {
strcpy (path + start + 1, path + i);
i = start + 1;
}
/* Handle backquoted `/'. */
if (start > 0 && path[start - 1] == '\\')
continue;
/* Check for trailing `/'. */
if (start && !path[i]) {
zero_last:
path[--i] = '\0';
break;
}
/* Check for `../', `./' or trailing `.' by itself. */
if (path[i] == '.') {
/* Handle trailing `.' by itself. */
if (!path[i + 1])
goto zero_last;
/* Handle `./'. */
if (path[i + 1] == PATH_SEP) {
strcpy (path + i, path + i + 1);
i = start;
continue;
}
/* Handle `../' or trailing `..' by itself.
Remove the previous ?/ part with the exception of
../, which we should leave intact. */
if (path[i + 1] == '.' && (path[i + 2] == PATH_SEP || !path[i + 2])) {
while (--start > -1 && path[start] != PATH_SEP);
if (!strncmp (path + start + 1, "../", 3))
continue;
strcpy (path + start + 1, path + i + 2);
i = start;
continue;
}
}
}
if (!*path) {
*path = stub_char;
path[1] = '\0';
}
return path;
}
#ifndef USE_VFS
/*
int mc_rmdir (char *path);
Fix for Win95 UGLY BUG in rmdir: it will return ENOACCESS instead
of ENOTEMPTY.
*/
int mc_rmdir (char *path)
{
if (win32_GetPlatform() == OS_Win95) {
if (rmdir(path)) {
SetLastError (ERROR_DIR_NOT_EMPTY);
_doserrno = ERROR_DIR_NOT_EMPTY; /* FIXME: We are always saying the same thing! */
errno = ENOTEMPTY;
return -1;
} else
return 0;
}
else
return rmdir(path); /* No trouble in Windows NT */
}
static int conv_nt_unx_rc(int rc)
{
int errCode;
switch (rc) {
case ERROR_FILE_NOT_FOUND:
case ERROR_PATH_NOT_FOUND:
case ERROR_TOO_MANY_OPEN_FILES:
errCode = ENOENT;
break;
case ERROR_INVALID_HANDLE:
case ERROR_ARENA_TRASHED:
case ERROR_ACCESS_DENIED:
case ERROR_INVALID_ACCESS:
case ERROR_WRITE_PROTECT:
case ERROR_WRITE_FAULT:
case ERROR_READ_FAULT:
case ERROR_SHARING_VIOLATION:
errCode = EACCES;
break;
case ERROR_NOT_ENOUGH_MEMORY:
errCode = ENOMEM;
break;
case ERROR_INVALID_BLOCK:
case ERROR_INVALID_FUNCTION:
case ERROR_INVALID_DRIVE:
errCode = ENODEV;
break;
case ERROR_CURRENT_DIRECTORY:
errCode = ENOTDIR;
break;
case ERROR_NOT_READY:
errCode = EINVAL;
break;
default:
errCode = EINVAL;
break;
} /* endswitch */
return errCode;
}
/*
int mc_unlink (char *pathName)
For Windows 95 and NT, files should be able to be deleted even
if they don't have write-protection. We should build a question box
like: Delete anyway? Yes <No> All
*/
int mc_unlink (char *pathName)
{
char *fileName;
char *trunced_name;
static int erase_all = 0;
BOOL rc;
DWORD returnError;
rc = DeleteFile(pathName);
returnError = GetLastError();
if ((rc == FALSE) && (returnError == ERROR_ACCESS_DENIED)) {
int result;
if (!erase_all) {
errno = conv_nt_unx_rc(returnError);
trunced_name = name_trunc(pathName, 30);
fileName = (char *) malloc(strlen(trunced_name) + 16);
strcpy(fileName, "File ");
strcat(fileName, trunced_name);
strcat(fileName, " protected");
result = query_dialog(fileName, "Delete anyway?", 3, 3, " No ", " Yes ", " All in the future!");
free(fileName);
switch (result) {
case 0:
do_refresh ();
return -1;
case 1:
do_refresh ();
break;
case 2:
do_refresh ();
erase_all = 1;
break;
default:
do_refresh ();
return -1;
break;
}
}
chmod(pathName, S_IWRITE); /* make it writable */
rc = DeleteFile(pathName);
returnError = GetLastError();
if (rc == FALSE) {
errno = conv_nt_unx_rc(returnError);
return -1;
}
}
if (rc == TRUE) return 0;
else
return -1;
}
/*
int mc_rename (char *original, char *target)
Fix for Win95 and WinNT BUG in rename: they will return ENOACCESS instead
of EXDEV.
*/
int mc_rename (char* original, char *target)
{
/* check same device: easy with FAT/NTFS, first letter is drive
FIXME: network paths will fail this test */
if (*original != *target) {
SetLastError (ERROR_NOT_SAME_DEVICE);
_doserrno = ERROR_NOT_SAME_DEVICE;
errno = EXDEV;
return -1;
}
else
return rename(original,target);
}
#endif /*USE_VFS*/
void my_statfs (struct my_statfs *myfs_stats, char *path)
{
int i, len = 0;
DWORD lpSectorsPerCluster, lpBytesPerSector, lpFreeClusters, lpClusters;
DWORD lpMaximumComponentLength, dw, lpFileSystemFlags;
static char lpVolumeNameBuffer[256], lpFileSystemNameBuffer[30];
GetDiskFreeSpace(NULL, &lpSectorsPerCluster, &lpBytesPerSector,
&lpFreeClusters, &lpClusters);
/* KBytes available */
myfs_stats->avail = lpSectorsPerCluster * lpBytesPerSector * lpFreeClusters / 1024;
/* KBytes total */
myfs_stats->total = lpSectorsPerCluster * lpBytesPerSector * lpClusters / 1024;
myfs_stats->nfree = lpFreeClusters;
myfs_stats->nodes = lpClusters;
GetVolumeInformation(NULL, lpVolumeNameBuffer, 255, NULL,
&lpMaximumComponentLength, &lpFileSystemFlags,
lpFileSystemNameBuffer, 30);
myfs_stats->mpoint = lpFileSystemNameBuffer;
myfs_stats->device = lpVolumeNameBuffer;
myfs_stats->type = GetDriveType(NULL);
switch (myfs_stats->type) {
/*
* mmm. DeviceIoControl may fail if you are not root case
* F5_1Pt2_512, 5.25", 1.2MB, 512 bytes/sector
* myfs_stats->typename = "5.25\" 1.2MB"; break; case
* F3_1Pt44_512, 3.5", 1.44MB, 512 bytes/sector
* myfs_stats->typename = "3.5\" 1.44MB"; break; case
* F3_2Pt88_512, 3.5", 2.88MB, 512 bytes/sector
* myfs_stats->typename = "3.5\" 2.88MB"; break; case
* F3_20Pt8_512, 3.5", 20.8MB, 512 bytes/sector
* myfs_stats->typename = "3.5\" 20.8MB"; break; case
* F3_720_512, 3.5", 720KB, 512 bytes/sector
* myfs_stats->typename = "3.5\" 720MB"; break; case
* F5_360_512, 5.25", 360KB, 512 bytes/sector
* myfs_stats->typename = "5.25\" 360KB"; break; case
* F5_320_512, 5.25", 320KB, 512 bytes/sector
* case F5_320_1024, 5.25", 320KB, 1024
* bytes/sector myfs_stats->typename = "5.25\" 320KB"; break;
* case F5_180_512, 5.25", 180KB, 512
* bytes/sector myfs_stats->typename = "5.25\" 180KB"; break;
* case F5_160_512, 5.25", 160KB, 512
* bytes/sector myfs_stats->typename = "5.25\" 160KB"; break;
* case RemovableMedia, Removable media other than
* floppy myfs_stats->typename = "Removable"; break; case
* FixedMedia Fixed hard disk media
* myfs_stats->typename = "Hard Disk"; break; case Unknown:
* Format is unknown
*/
case DRIVE_REMOVABLE:
myfs_stats->typename = "Removable";
break;
case DRIVE_FIXED:
myfs_stats->typename = "Hard Disk";
break;
case DRIVE_REMOTE:
myfs_stats->typename = "Networked";
break;
case DRIVE_CDROM:
myfs_stats->typename = "CD-ROM";
break;
case DRIVE_RAMDISK:
myfs_stats->typename = "RAM disk";
break;
default:
myfs_stats->typename = "unknown";
break;
};
}
int gettimeofday (struct timeval* tvp, void *p)
{
if (p != NULL)
return 0;
/* Since MC only calls this func from get_random_hint we return
some value, not exactly the "correct" one */
tvp->tv_sec = GetTickCount()/1000; /* Number of milliseconds since Windows started*/
tvp->tv_usec = GetTickCount();
}
// FAKE funcs
int
look_for_exe(const char* pathname)
{
int j;
char *p;
int lgh = strlen(pathname);
if (lgh < 4) {
return 0;
} else {
p = (char *) pathname;
for (j=0; j<lgh-4; j++) {
p++;
} /* endfor */
if (!stricmp(p, ".exe") ||
!stricmp(p, ".bat") ||
!stricmp(p, ".com") ||
!stricmp(p, ".cmd")) {
return 1;
}
}
return 0;
}
int
lstat (const char* pathname, struct stat *buffer)
{
int rc = stat (pathname, buffer);
#ifdef __BORLANDC__
if (rc == 0) {
if (!(buffer->st_mode & S_IFDIR)) {
if (!look_for_exe(pathname)) {
buffer->st_mode &= !S_IXUSR & !S_IXGRP & !S_IXOTH;
}
}
}
#endif
return rc;
}
int getuid ()
{
/* SID sid;
LookupAccountName (NULL, &sid...
return 0;
*/
return 0;
}
int getgid ()
{
return 0;
}
int readlink (char* path, char* buf, int size)
{
return -1;
}
int symlink (char *n1, char *n2)
{
return -1;
}
int link (char *p1, char *p2)
{
return -1;
}
int chown (char *path, int owner, int group)
{
return -1;
}
int mknod (char *path, int mode, int dev)
{
return -1;
}
void init_uid_gid_cache (void)
{
return;
}
int mc_doublepopen (int inhandle, int inlen, pid_t *the_pid, char *command, ...)
{
return 0;
}
int mc_doublepclose (int pipe, pid_t pid)
{
/* win32Trace(("mc_doublepclose called")); */
return 0;
}
/*hacks to get it compile, remove these after vfs works */
#ifndef USE_VFS
char *vfs_get_current_dir (void)
{
return NULL;
}
int vfs_current_is_extfs (void)
{
return 0;
}
int vfs_file_is_ftp (char *filename)
{
return 0;
}
int mc_utime (char *path, struct utimbuf *times)
{
return 0;
}
void extfs_run (char *file)
{
return;
}
#endif
int strncasecmp (char *s, char *d, int count)
{
register char result;
while (count > 0){
if (result = (0x20 | *s) - (0x20 | *d))
break;
if (!*s)
return 0;
s++;
d++;
count--;
}
return result;
}
char *
get_default_editor (void)
{
return "vi.exe";
}
int
errno_dir_not_empty (int err)
{
if (err == ENOTEMPTY || err == EEXIST || err == EACCES)
return 1;
return 0;
}
/* The MC library directory is by default the directory where mc.exe
is situated. It is possible to specify this directory via MCHOME
environment variable */
char *
get_mc_lib_dir ()
{
char *cur;
char *mchome = getenv("MCHOME");
if (mchome && *mchome)
return mchome;
mchome = malloc(MC_MAXPATHLEN);
GetModuleFileName(NULL, mchome, MC_MAXPATHLEN);
for (cur = mchome + strlen(mchome); \
(cur > mchome) && (*cur != PATH_SEP); cur--);
*cur = 0;
cur = strdup(mchome);
free(mchome);
if (!cur || !*cur) {
free(cur);
return "C:\\MC";
}
return cur;
}
int get_user_rights (struct stat *buf)
{
return 2;
}
void init_groups (void)
{
}
void delete_groups (void)
{
}

Просмотреть файл

Просмотреть файл

@ -1,28 +0,0 @@
Mon Mar 23 08:10:28 1998 Pavel Roskin <pavel.roskin@ecsoft.co.uk>
* os2/Makefile.BC2: new file for Borland C++ version 2
* os2/key.os2.c: cleanup, more keys work (not all)
* os2/util.os2.c: Windows' programs temporaly disabled
in order to make mc work without PM
* os2/config.h: Borland C++ fixes
Sat Mar 7 14:19:29 1998 Pavel Roskin <pavel.roskin@ecsoft.co.uk>
* os2/Makefile.OS2, os2/Makefile.EMX: new files. Use
"gmake -f Makefile.EMX" to compile
* os2/slint.os2.c: copied from ../nt/slint.nt.c
* os2/direct.h: dummy file. Replaces douzen of other dummy
files :-)
* os2/Makefile: list of distibution files corrected
* os2/drive.os2.c, os2/chmod.os2.c: button_new() calls
updated
* os2/*: many minor changes for EMX.

Просмотреть файл

@ -1,37 +0,0 @@
#
# This makefile is for making the distribution on Unix
# You won't be able to compile with this one the Midnight Commander
# on OS/2, use Makefile.release instead.
#
# Please read the file README.OS2 in the top directory of the distribution
#
include ../Make.common
FILES = Makefile Makefile.EMX Makefile.BC2 Makefile.OS2 chmod.os2.c config.h \
cons.handler.os2.c cons.saver.h direct.h dirent.h dirent.os2.c \
drive.h drive.os2.c inst.cmd key.os2.c mc.def mc.ico slint.os2.c \
util.os2.c
FILESSYS = sys/param.h sys/time.h
all:
TAGS: $(FILES)
etags $(FILES)
clean realclean distclean cross:
install:
uninstall:
depend dep:
fastdeploc:
distcopy:
-mkdir ../../mc-$(VERSION)/os2
$(CP) $(FILES) ../../mc-$(VERSION)/os2
-mkdir ../../mc-$(VERSION)/os2/sys
$(CP) $(FILESSYS) ../../mc-$(VERSION)/os2/sys

Просмотреть файл

@ -1,58 +0,0 @@
# Makefile.BC5
#
# Midnight Commander for OS/2 makefile
# for Borland C++ 2
#
# Hacked by Dan Nicolaescu from Visual IDE mak
# Hacked by Pavel Roskin to make it work with cmd.exe from Windows NT4
# 980206 hacked by Pavel Roskin to make it work with GNU make
# 980316 hacked by Pavel Roskin to make it work with Borland C++
# --------------------------------------------------------------------------
MC_LIBS=c2mt.lib
CC=bcc.exe
# Just comment RSC out if you have problems with resources
# RSC=rc.exe
LINK=bcc.exe
OBJ_SUFFIX=obj
OBJ_PLACE=-o
RES_PLACE=-fo
EXE_PLACE=-e
# ---- Compiler-specific optional stuff
MC_MISC_CFLAGS=-D__MT__
ifndef RELEASE
# ---- Debug build
OBJS_DIR=debug
EXTRA_MC_SRCS=
SPECIFIC_DEFINES=
SPECIFIC_MC_CFLAGS=-v -y $(MC_MISC_CFLAGS)
SPECIFIC_MC_LFLAGS_EXTRA=-lv
SPECIFIC_SLANG_CFLAGS=$(SPECIFIC_MC_CFLAGS)
SPECIFIC_MCEDIT_CFLAGS=$(SPECIFIC_MC_CFLAGS) -I../edit -I../src
RC_DEFINES=-D_DEBUG
else
# ---- Release build
OBJS_DIR=release
EXTRA_MC_SRCS=
SPECIFIC_DEFINES=
SPECIFIC_MC_CFLAGS=-O2 $(MC_MISC_CFLAGS)
SPECIFIC_MC_LFLAGS_EXTRA=
SPECIFIC_SLANG_CFLAGS=$(SPECIFIC_MC_CFLAGS)
SPECIFIC_MCEDIT_CFLAGS=$(SPECIFIC_MC_CFLAGS) -I../edit -I../src
RC_DEFINES=-DRELEASE=$(RELEASE)
endif
MC_EXE=$(OBJS_DIR)/mc.exe
# ---- Compiler independent defines
include Makefile.OS2
# ---- Linkers are usualy compiler-specific
SPECIFIC_MC_LFLAGS= \
$(SPECIFIC_MC_LFLAGS_EXTRA)
$(MC_EXE): $(MC_RES) $(OBJS) $(MCEDIT_OBJS) $(SLANG_OBJS)
$(LINK) $(EXE_PLACE)$(MC_EXE) $(SPECIFIC_MC_LFLAGS) $+ $(MC_LIBS)

Просмотреть файл

@ -1,55 +0,0 @@
# Makefile.vc4
#
# Midnight Commander for Win32 makefile
# for Microsoft Visual C++ 4.x
#
# Hacked by Dan Nicolaescu from Visual IDE mak
# Hacked by Pavel Roskin to make it work with cmd.exe from Windows NT4
# 980206 hacked by Pavel Roskin to make it work with GNU make
# --------------------------------------------------------------------------
MC_LIBS=
CC=gcc.exe
# Just comment RSC out if you have problems with resources
# RSC=rc.exe
LINK=gcc.exe
OBJ_SUFFIX=o
OBJ_PLACE=-o
RES_PLACE=-fo
# ---- Compiler-specific optional stuff
MC_MISC_CFLAGS=-Zmt
ifndef RELEASE
# ---- Debug build
OBJS_DIR=debug
EXTRA_MC_SRCS=
SPECIFIC_DEFINES=
SPECIFIC_MC_CFLAGS=-g -O0 $(MC_MISC_CFLAGS)
SPECIFIC_MC_LFLAGS_EXTRA=
SPECIFIC_SLANG_CFLAGS=$(SPECIFIC_MC_CFLAGS)
SPECIFIC_MCEDIT_CFLAGS=$(SPECIFIC_MC_CFLAGS)
RC_DEFINES=-D_DEBUG
else
# ---- Release build
OBJS_DIR=release
EXTRA_MC_SRCS=
SPECIFIC_DEFINES=
SPECIFIC_MC_CFLAGS=-O2 $(MC_MISC_CFLAGS)
SPECIFIC_MC_LFLAGS_EXTRA=
SPECIFIC_SLANG_CFLAGS=$(SPECIFIC_MC_CFLAGS)
SPECIFIC_MCEDIT_CFLAGS=$(SPECIFIC_MC_CFLAGS)
RC_DEFINES=-DRELEASE=$(RELEASE)
endif
SPECIFIC_MC_LFLAGS= \
-o $(OBJS_DIR)/mc.exe \
$(SPECIFIC_MC_LFLAGS_EXTRA)
# ---- Compiler independent defines
include Makefile.OS2
# ---- Linkers are very compiler-specific
$(OBJS_DIR)/mc.exe: $(MC_RES) $(OBJS) $(MCEDIT_OBJS) $(SLANG_OBJS)
$(LINK) -Zmt $(MC_LIBS) $(SPECIFIC_MC_LFLAGS) $+

Просмотреть файл

@ -1,148 +0,0 @@
# Makefile
# Written by Dan Nicolaescu
# 970423 hacked by Juan f. Grigera
# 970525 hacked again by jfg to add internal editor
# 971127 hacked by Pavel Roskin to make it work with mc-4.1.11
# 980206 hacked by Pavel Roskin to make it work with GNU make
#
# This is the Makefile for Midnight Commander under OS/2.
#
# Supported Compilers:
#
# makefile.vc4: Microsoft Visual C++ 4.x
# ...
# ---- Directories
MC_NT_DIR=.
MC_SRC_DIR=../src
VFS_DIR=../vfs
MCEDIT_SRC_DIR=../edit
MCEDIT_OBJS_DIR=$(OBJS_DIR)/edit
SLANG_SRC_DIR=../slang
SLANG_OBJS_DIR=$(OBJS_DIR)/slang
# --- Midnight Defines
MC_DEFINES=$(SPECIFIC_DEFINES) -D_CONSOLE -DHAVE_CONFIG_H -DUSE_INTERNAL_EDIT
MC_INCLUDES=-I$(MC_SRC_DIR) -I$(MC_NT_DIR) -I$(SLANG_SRC_DIR)
SLANG_DEFINES=$(SPECIFIC_DEFINES)
SLANG_INCLUDES=-I$(MC_NT_DIR) -I$(SLANG_SRC_DIR)
MCEDIT_DEFINES=$(SPECIFIC_DEFINES) -D_CONSOLE -DHAVE_CONFIG_H
MCEDIT_INCLUDES=-I$(MC_NT_DIR) -I$(MC_SRC_DIR)/.. -I$(SLANG_SRC_DIR)
CFLAGS=$(SPECIFIC_MC_CFLAGS) $(MC_INCLUDES) $(MC_DEFINES) -c
SLANG_CFLAGS=$(SPECIFIC_SLANG_CFLAGS) $(SLANG_INCLUDES) $(SLANG_DEFINES) -c
MCEDIT_CFLAGS=$(SPECIFIC_MCEDIT_CFLAGS) $(MCEDIT_INCLUDES) $(MCEDIT_DEFINES) -c
RSC_FLAGS=$(RES_PLACE)$(OBJS_DIR)/mc.res $(RC_DEFINES)
all: object-dirs mc
object-dirs: $(OBJS_DIR) $(SLANG_OBJS_DIR) $(MCEDIT_OBJS_DIR)
mc: $(OBJS_DIR)/mc.exe
clean:
deltree -y "$(SLANG_OBJS_DIR)"
deltree -y "$(MCEDIT_OBJS_DIR)"
deltree -y "$(OBJS_DIR)"
$(OBJS_DIR):
mkdir "$@"
$(SLANG_OBJS_DIR):
mkdir "$@"
$(MCEDIT_OBJS_DIR):
mkdir "$@"
$(OBJS_DIR)/%.$(OBJ_SUFFIX): $(MC_NT_DIR)/%.c
$(CC) $(CFLAGS) $(OBJ_PLACE)$@ $<
$(OBJS_DIR)/%.$(OBJ_SUFFIX): $(MC_SRC_DIR)/%.c
$(CC) $(CFLAGS) $(OBJ_PLACE)$@ $<
$(SLANG_OBJS_DIR)/%.$(OBJ_SUFFIX): $(SLANG_SRC_DIR)/%.c
$(CC) $(SLANG_CFLAGS) $(OBJ_PLACE)$@ $<
$(MCEDIT_OBJS_DIR)/%.$(OBJ_SUFFIX): $(MCEDIT_SRC_DIR)/%.c
$(CC) $(MCEDIT_CFLAGS) $(OBJ_PLACE)$@ $<
SRCS= $(EXTRA_MC_SRCS) \
util.os2.c \
terms.c \
user.c \
subshell.c \
file.c \
listmode.c \
cmd.c \
dirent.os2.c \
command.c \
help.c \
menu.c \
view.c \
dir.c \
info.c \
widget.c \
cons.handler.os2.c \
option.c \
dlg.c \
panelize.c \
profile.c \
util.c \
dialog.c \
ext.c \
color.c \
drive.os2.c \
key.os2.c \
layout.c \
setup.c \
regex.c \
hotlist.c \
slint.os2.c \
tree.c \
win.c \
chmod.os2.c \
complete.c \
find.c \
wtools.c \
boxes.c \
background.c \
dirhist.c \
main.c \
popt.c \
text.c \
screen.c
SLANG_SRCS= \
slos2tty.c \
slerr.c \
slgetkey.c \
slsmg.c \
slvideo.c
MCEDIT_SRCS= \
edit.c \
editcmd.c \
editdraw.c \
editmenu.c \
editoptions.c \
editwidget.c \
wordproc.c
OBJS=$(addprefix $(OBJS_DIR)/, \
$(patsubst %.c,%.$(OBJ_SUFFIX),$(SRCS)))
SLANG_OBJS=$(addprefix $(SLANG_OBJS_DIR)/, \
$(patsubst %.c,%.$(OBJ_SUFFIX),$(SLANG_SRCS)))
MCEDIT_OBJS=$(addprefix $(MCEDIT_OBJS_DIR)/, \
$(patsubst %.c,%.$(OBJ_SUFFIX),$(MCEDIT_SRCS)))
ifdef RSC
MC_RES=$(OBJS_DIR)/mc.res
else
MC_RES=
endif
$(OBJS_DIR)/mc.res: $(MC_NT_DIR)/mc.rc $(MC_NT_DIR)/mc.ico $(MC_NT_DIR)/config.h ../VERSION
$(RSC) $(RSC_FLAGS) $(MC_NT_DIR)/mc.rc

Просмотреть файл

@ -1,502 +0,0 @@
/* Chmod command for OS/2 operating system
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <config.h>
#ifndef __os2__
#error This file is for the OS/2 operating system.
#else
#define INCL_DOSFILEMGR
#include <os2.h>
#include <string.h>
#include <stdio.h>
/* for chmod and stat */
#include <io.h>
#include <sys\types.h>
#include <sys\stat.h>
#include "tty.h"
#include "mad.h"
#include "util.h"
#include "win.h"
#include "color.h"
#include "dlg.h"
#include "widget.h"
#include "dialog.h" /* For do_refresh() */
#include "dir.h"
#include "panel.h" /* Needed for the externs */
#include "file.h"
#include "main.h"
#include "chmod.h"
#include "achown.h"
#include "chown.h"
static int single_set;
struct Dlg_head *ch_dlg;
#define PX 5
#define PY 2
#define FX 40
#define FY 2
#define BX 6
#define BY 17
#define TX 40
#define TY 12
#define PERMISSIONS 4
#define BUTTONS 6
#define B_MARKED B_USER
#define B_ALL B_USER+1
#define B_SETMRK B_USER+2
#define B_CLRMRK B_USER+3
int mode_change, need_update;
int c_file, end_chmod;
umode_t and_mask, or_mask, c_stat;
char *c_fname, *c_fown, *c_fgrp, *c_fperm;
int c_fsize;
static WLabel *statl;
static int normal_color;
static int title_color;
static int selection_color;
/* bsedos.h */
struct {
mode_t mode;
char *text;
int selected;
WCheck *check;
} check_perm[PERMISSIONS] = {
{
FILE_ARCHIVED, "Archive", 0, 0,
},
{
FILE_READONLY, "Read Only", 0, 0,
},
{
FILE_HIDDEN, "Hidden", 0, 0,
},
{
FILE_SYSTEM, "System", 0, 0,
},
};
struct {
int ret_cmd, flags, y, x;
char *text;
} chmod_but[BUTTONS] = {
{
B_CANCEL, NORMAL_BUTTON, 2, 33, "&Cancel",
},
{
B_ENTER, DEFPUSH_BUTTON, 2, 17, "&Set",
},
{
B_CLRMRK, NORMAL_BUTTON, 0, 42, "C&lear marked",
},
{
B_SETMRK, NORMAL_BUTTON, 0, 27, "S&et marked",
},
{
B_MARKED, NORMAL_BUTTON, 0, 12, "&Marked all",
},
{
B_ALL, NORMAL_BUTTON, 0, 0, "Set &all",
},
};
static void mk_chmod (char *filename, ULONG st);
static void chmod_toggle_select (void)
{
int Id = ch_dlg->current->dlg_id - BUTTONS + single_set * 2;
attrset (normal_color);
check_perm[Id].selected ^= 1;
dlg_move (ch_dlg, PY + PERMISSIONS - Id, PX + 1);
addch ((check_perm[Id].selected) ? '*' : ' ');
dlg_move (ch_dlg, PY + PERMISSIONS - Id, PX + 3);
}
static void chmod_refresh (void)
{
attrset (normal_color);
dlg_erase (ch_dlg);
draw_box (ch_dlg, 1, 2, 20 - single_set, 66);
draw_box (ch_dlg, PY, PX, PERMISSIONS + 2, 33);
draw_box (ch_dlg, FY, FX, 10, 25);
dlg_move (ch_dlg, FY + 1, FX + 2);
addstr ("Name");
dlg_move (ch_dlg, FY + 3, FX + 2);
addstr ("Permissions (Octal)");
dlg_move (ch_dlg, FY + 5, FX + 2);
addstr ("Owner name");
dlg_move (ch_dlg, FY + 7, FX + 2);
addstr ("Group name");
attrset (title_color);
dlg_move (ch_dlg, 1, 28);
addstr (" Chmod command ");
dlg_move (ch_dlg, PY, PX + 1);
addstr (" Permission ");
dlg_move (ch_dlg, FY, FX + 1);
addstr (" File ");
attrset (selection_color);
dlg_move (ch_dlg, TY, TX);
addstr ("Use SPACE to change");
dlg_move (ch_dlg, TY + 1, TX);
addstr ("an option, ARROW KEYS");
dlg_move (ch_dlg, TY + 2, TX);
addstr ("to move between options");
dlg_move (ch_dlg, TY + 3, TX);
addstr ("and T or INS to mark");
}
static int chmod_callback (Dlg_head *h, int Par, int Msg)
{
char buffer [10];
switch (Msg) {
case DLG_ACTION:
if (Par >= BUTTONS - single_set * 2){
c_stat ^= check_perm[Par - BUTTONS + single_set * 2].mode;
sprintf (buffer, "%o", c_stat);
label_set_text (statl, buffer);
chmod_toggle_select ();
mode_change = 1;
}
break;
case DLG_KEY:
if ((Par == 'T' || Par == 't' || Par == KEY_IC) &&
ch_dlg->current->dlg_id >= BUTTONS - single_set * 2) {
chmod_toggle_select ();
if (Par == KEY_IC)
dlg_one_down (ch_dlg);
return 1;
}
break;
#ifndef HAVE_X
case DLG_DRAW:
chmod_refresh ();
break;
#endif
}
return 0;
}
static void init_chmod (void)
{
int i;
do_refresh ();
end_chmod = c_file = need_update = 0;
single_set = (cpanel->marked < 2) ? 2 : 0;
if (use_colors){
normal_color = COLOR_NORMAL;
title_color = COLOR_HOT_NORMAL;
selection_color = COLOR_NORMAL;
} else {
normal_color = NORMAL_COLOR;
title_color = SELECTED_COLOR;
selection_color = SELECTED_COLOR;
}
ch_dlg = create_dlg (0, 0, 22 - single_set, 70, dialog_colors,
chmod_callback, "[Chmod]", "chmod", DLG_CENTER);
x_set_dialog_title (ch_dlg, "Chmod command");
#define XTRACT(i) BY+chmod_but[i].y-single_set, BX+chmod_but[i].x, \
chmod_but[i].ret_cmd, chmod_but[i].flags, chmod_but[i].text, 0, 0, NULL
tk_new_frame (ch_dlg, "b.");
for (i = 0; i < BUTTONS; i++) {
if (i == 2 && single_set)
break;
else
add_widgetl (ch_dlg, button_new (XTRACT (i)), XV_WLAY_RIGHTOF);
}
#define XTRACT2(i) 0, check_perm [i].text, NULL
tk_new_frame (ch_dlg, "c.");
for (i = 0; i < PERMISSIONS; i++) {
check_perm[i].check = check_new (PY + (PERMISSIONS - i), PX + 2,
XTRACT2 (i));
add_widget (ch_dlg, check_perm[i].check);
}
}
int stat_file (char *filename, struct stat *st)
{
HFILE fHandle = 0L;
ULONG fInfoLevel = 1; /* 1st Level Info: Standard attributs */
FILESTATUS3 fInfoBuf;
ULONG fInfoBufSize;
ULONG fAction = 0;
APIRET rc;
fInfoBufSize = sizeof(FILESTATUS3);
rc = DosOpen((PSZ) filename,
&fHandle,
&fAction,
(ULONG) 0,
FILE_NORMAL,
OPEN_ACTION_OPEN_IF_EXISTS,
(OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE),
(PEAOP2) NULL);
if (rc != 0) {
return 0;
}
rc = DosQueryFileInfo(fHandle, fInfoLevel, &fInfoBuf, fInfoBufSize);
DosClose(fHandle);
if (rc != 0) {
return 0; /* error ! */
} else {
st->st_mode = fInfoBuf.attrFile;
}
if (st->st_mode & FILE_DIRECTORY)
return 0;
return 1;
}
static void chmod_done (void)
{
if (need_update)
update_panels (UP_OPTIMIZE, UP_KEEPSEL, UP_KEEPSEL);
repaint_screen ();
}
char *next_file (void)
{
while (!cpanel->dir.list[c_file].f.marked)
c_file++;
return cpanel->dir.list[c_file].fname;
}
static int os2_chmod (char *filename, ULONG st)
{
HFILE fHandle = 0L;
ULONG fInfoLevel = 1; /* 1st Level Info: Standard attributs */
FILESTATUS3 fInfoBuf;
ULONG fInfoBufSize;
ULONG fAction = 0L;
APIRET rc;
fInfoBufSize = sizeof(FILESTATUS3);
rc = DosOpen((PSZ) filename,
&fHandle,
&fAction,
(ULONG) 0,
FILE_NORMAL,
OPEN_ACTION_OPEN_IF_EXISTS,
(OPEN_ACCESS_READWRITE | OPEN_SHARE_DENYNONE),
0L);
if (rc != 0) {
return rc;
}
rc = DosQueryFileInfo(fHandle, fInfoLevel, &fInfoBuf, fInfoBufSize);
if (rc!=0) {
DosClose(fHandle);
return rc;
}
fInfoBuf.attrFile = st;
rc = DosSetFileInfo(fHandle, fInfoLevel, &fInfoBuf, fInfoBufSize);
rc = DosClose(fHandle);
return rc;
}
static void do_chmod (struct stat *sf)
{
HFILE fHandle = 0L;
ULONG fInfoLevel = 1; /* 1st Level Info: Standard attributs */
FILESTATUS3 fInfoBuf;
ULONG fInfoBufSize;
ULONG fAction = 0;
EAOP2 fEaop;
APIRET rc;
sf->st_mode &= and_mask;
sf->st_mode |= or_mask;
mk_chmod(cpanel->dir.list[c_file].fname, sf->st_mode);
do_file_mark (cpanel, c_file, 0);
return;
}
static void mk_chmod (char *filename, ULONG st)
{
int rc;
int fileMode = 0;
if (st & FILE_READONLY) {
// READONLY set
fileMode |= S_IREAD;
os2_chmod(filename, st);
} else {
fileMode |= (S_IWRITE | S_IREAD);
rc = chmod(filename, fileMode);
// Then set the other flags
os2_chmod(filename, st);
}
return;
}
static void apply_mask (struct stat *sf)
{
char *fname;
need_update = end_chmod = 1;
do_chmod (sf);
do {
fname = next_file ();
if (!stat_file (fname, sf))
return;
c_stat = sf->st_mode;
do_chmod (sf);
} while (cpanel->marked);
}
void chmod_cmd (void)
{
char buffer [10];
char *fname;
int i;
struct stat sf_stat;
do { /* do while any files remaining */
init_chmod ();
if (cpanel->marked)
fname = next_file (); /* next marked file */
else
fname = selection (cpanel)->fname; /* single file */
if (!stat_file (fname, &sf_stat)) /* get status of file */
break;
c_stat = sf_stat.st_mode;
mode_change = 0; /* clear changes flag */
/* set check buttons */
for (i = 0; i < PERMISSIONS; i++){
check_perm[i].check->state = (c_stat & check_perm[i].mode) ? 1 : 0;
check_perm[i].selected = 0;
}
tk_new_frame (ch_dlg, "l.");
/* Set the labels */
c_fname = name_trunc (fname, 21);
add_widget (ch_dlg, label_new (FY+2, FX+2, c_fname, NULL));
c_fown = name_trunc (get_owner (sf_stat.st_uid), 21);
add_widget (ch_dlg, label_new (FY+6, FX+2, c_fown, NULL));
c_fgrp = name_trunc (get_group (sf_stat.st_gid), 21);
add_widget (ch_dlg, label_new (FY+8, FX+2, c_fgrp, NULL));
sprintf (buffer, "%o", c_stat);
statl = label_new (FY+4, FX+2, buffer, NULL);
add_widget (ch_dlg, statl);
tk_end_frame ();
run_dlg (ch_dlg); /* retrieve an action */
/* do action */
switch (ch_dlg->ret_value){
case B_ENTER:
if (mode_change)
mk_chmod (fname, c_stat); /*.ado */
need_update = 1;
break;
case B_CANCEL:
end_chmod = 1;
break;
case B_ALL:
case B_MARKED:
and_mask = or_mask = 0;
and_mask = ~and_mask;
for (i = 0; i < PERMISSIONS; i++) {
if (check_perm[i].selected || ch_dlg->ret_value == B_ALL)
if (check_perm[i].check->state & C_BOOL)
or_mask |= check_perm[i].mode;
else
and_mask &= ~check_perm[i].mode;
}
apply_mask (&sf_stat);
break;
case B_SETMRK:
and_mask = or_mask = 0;
and_mask = ~and_mask;
for (i = 0; i < PERMISSIONS; i++) {
if (check_perm[i].selected)
or_mask |= check_perm[i].mode;
}
apply_mask (&sf_stat);
break;
case B_CLRMRK:
and_mask = or_mask = 0;
and_mask = ~and_mask;
for (i = 0; i < PERMISSIONS; i++) {
if (check_perm[i].selected)
and_mask &= ~check_perm[i].mode;
}
apply_mask (&sf_stat);
break;
}
if (cpanel->marked && ch_dlg->ret_value!=B_CANCEL) {
do_file_mark (cpanel, c_file, 0);
need_update = 1;
}
destroy_dlg (ch_dlg);
} while (cpanel->marked && !end_chmod);
chmod_done ();
}
#endif /*__os2__*/

Просмотреть файл

@ -1,121 +0,0 @@
/****************************************************************************
CONFIG.H - Midnight Commander Configuration for OS/2
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
----------------------------------------------------------------------------
Changes:
- Created 951204/jfg
- Changed from Alexander Dong (ado) for OS/2
----------------------------------------------------------------------------
Contents:
- Headers flags
- Library flags
- Typedefs
- etc.
****************************************************************************/
#ifndef __CONFIG_H
#define __CONFIG_H
#ifndef __BORLANDC__
# include <../VERSION>
#else
# include <../VERSION.>
#endif
#ifndef OS2
# define OS2
#endif
#ifndef __os2__
# define __os2__
#endif
#ifndef pc_system
# define pc_system
#endif
#define OS2_NT
#define FLOAT_TYPE
#define MIDNIGHT
#define STDC_HEADERS
#define HAVE_STDLIB_H
#define HAVE_STRING_H
#define HAVE_DIRENT_H
#define HAVE_LIMITS_H
#define HAVE_FCNTL_H
#define HAVE_MEMSET
#define HAVE_MEMCHR
#define HAVE_MEMCPY
#define HAVE_MEMCMP
#define HAVE_MEMMOVE
#define HAVE_STRDUP
#define HAVE_STRERROR
#define HAVE_TRUNCATE
#define REGEX_MALLOC
#define NO_INFOMOUNT
#if !defined(HAVE_SLANG) && !defined (USE_NCURSES)
#define HAVE_SLANG
#endif
#ifdef USE_NCURSES
#define RENAMED_NCURSES
#endif
typedef unsigned int umode_t;
#define S_IFLNK 0
#define S_ISLNK(x) 0
#ifdef __EMX__
#define S_IFBLK 0
#define S_ISBLK(x) 0
#endif /* __EMX__ */
#ifdef __BORLANDC__
#define INLINE
#define inline
#define S_IRWXG 0000070
#define S_IRGRP 0000040
#define S_IWGRP 0000020
#define S_IXGRP 0000010
#define S_IRWXO 0000007
#define S_IROTH 0000004
#define S_IWOTH 0000002
#define S_IXOTH 0000001
/* FIXME: is this definition correct? */
#define R_OK 4
#define popen _popen
#define pclose _pclose
#define sleep _sleep
typedef int pid_t;
#endif /* __BORLANDC__ */
#endif /* __CONFIG_H */

Просмотреть файл

@ -1,114 +0,0 @@
/* Client interface for General purpose OS/2 console save/restore server.
1997 Alexander Dong <ado@software-ag.de>
Having the same interface as its Linux counterpart:
Copyright (C) 1994 Janne Kukonlehto <jtklehto@stekt.oulu.fi>
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <config.h>
#ifndef __os2__
#error This file is for OS/2 operating systems.
#else
#define INCL_BASE
#define INCL_NOPM
#define INCL_VIO
#define INCL_KBD
#define INCL_DOS
#define INCL_SUB
#define INCL_DOSERRORS
#include <os2.h>
#include "tty.h"
#include "util.h"
#include "win.h"
#include "cons.saver.h"
signed char console_flag = 1;
static unsigned char *scr_buffer;
static unsigned char *pointer;
static int GetScrRows();
static int GetScrCols();
static int GetScrRows()
{
VIOMODEINFO pvMode = {80};
unsigned int hVio = 0;
VioGetMode(&pvMode, hVio);
return (pvMode.row ? pvMode.row: 25);
}
static int GetScrCols()
{
VIOMODEINFO pvMode = {80};
unsigned int hVio = 0;
VioGetMode(&pvMode, hVio);
return (pvMode.col ? pvMode.col: 80);
}
void show_console_contents (int starty, unsigned char begin_line, unsigned char end_line)
{
int col = GetScrCols();
int row = GetScrRows();
int n;
register int z;
pointer = scr_buffer;
for (z=0; z<(begin_line * col); z++) {
pointer++; pointer++;
}
n = (end_line - begin_line + 1) * col;
VioWrtCellStr((PCH) pointer, (USHORT) n, begin_line, 0, 0);
return; /* .ado */
}
void handle_console (unsigned char action)
{
static int col;
static int row;
int n;
switch (action) {
case CONSOLE_INIT: /* Initialize */
col = GetScrCols();
row = GetScrRows();
scr_buffer = (unsigned char *) malloc(col * row * 2); /* short values */
n = col * row * 2;
VioReadCellStr((PCH) scr_buffer, (USHORT *) &n, 0, 0, 0); /* Just save it */
break;
case CONSOLE_DONE:
free(scr_buffer);
break;
case CONSOLE_SAVE: /* Save the screen */
n = col * row * 2;
VioReadCellStr((PCH) scr_buffer, (USHORT *) &n, 0, 0, 0);
break;
case CONSOLE_RESTORE:
n = col * row * 2;
VioWrtCellStr ((PCH) scr_buffer, (USHORT) n, 0, 0, 0); /* Write it back */
break;
default:
/* This is not possible, but if we are here, just save the screen */
handle_console(CONSOLE_SAVE);
break;
}
return; /* .ado */
}
#endif // !__os2__

Просмотреть файл

@ -1,29 +0,0 @@
#ifndef __CONS_SAVER_H
#define __CONS_SAVER_H
#if defined(linux) || defined(__linux__) || defined(_OS_NT) || defined(__os2__)
enum {
CONSOLE_INIT = '1',
CONSOLE_DONE,
CONSOLE_SAVE,
CONSOLE_RESTORE,
CONSOLE_CONTENTS
};
extern signed char console_flag;
void show_console_contents (int starty, unsigned char begin_line, unsigned char end_line);
void handle_console (unsigned char action);
#else
# define console_flag 0
# define show_console_contents(w,f,l) { }
# define handle_console(x) { }
#endif /* #ifdef linux */
/* Used only in the principal program */
extern int cons_saver_pid;
#endif /* __CONS_SAVER_H */

Просмотреть файл

@ -1 +0,0 @@
/* */

Просмотреть файл

@ -1 +0,0 @@
/* */

Просмотреть файл

@ -1 +0,0 @@
/* dummy */

Просмотреть файл

@ -1,68 +0,0 @@
/*
* direct.h Defines the types and structures used by the directory routines
*
*/
#ifndef _DIRENT_H_incl
#define _DIRENT_H_incl
#ifdef __WATCOMC__
#include <direct.h>
#else
#ifdef __cplupplus
extern "C" {
#endif
#include <sys/types.h>
#ifndef __OS2_H__
#define INCL_DOSFILEMGR
#define INCL_DOSERRORS
#include <os2.h>
#endif
#define NAME_MAX 255 /* maximum filename for HPFS or NTFS */
typedef struct dirent {
HDIR d_handle;
ULONG d_attr; /* file's attribute */
unsigned short int d_time; /* file's time */
unsigned short int d_date; /* file's date */
ULONG d_size; /* file's size */
char d_name[ NAME_MAX + 1 ]; /* file's name */
unsigned short d_ino; /* serial number (not used) */
char d_first; /* flag for 1st time */
} DIR;
#ifndef _A_NORMAL
#define _A_NORMAL 0x00 /* Normal file - read/write permitted */
#define _A_RDONLY 0x01 /* Read-only file */
#define _A_HIDDEN 0x02 /* Hidden file */
#define _A_SYSTEM 0x04 /* System file */
#define _A_VOLID 0x08 /* Volume-ID entry */
#define _A_SUBDIR 0x10 /* Subdirectory */
#define _A_ARCH 0x20 /* Archive file */
#endif //_A_NORMAL_
extern int closedir( DIR * );
/*
extern char *getcwd( char *__buf, unsigned __size );
extern unsigned _getdrive( void );
extern unsigned _getdiskfree( unsigned __drive, struct _diskfree_t *__diskspace);
*/
extern DIR *opendir( const char * );
extern struct dirent *readdir( DIR * );
#if !defined(__os2__)
extern int chdir( const char *__path );
extern int mkdir( const char *__path );
extern int rmdir( const char *__path );
#endif
#ifdef __cplusplus
};
#endif
#endif //__WATCOMC__
#endif //incl

Просмотреть файл

@ -1,131 +0,0 @@
#define INCL_DOSFILEMGR
#define INCL_DOSERRORS
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <os2.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "dirent.h"
#include <errno.h>
DIR *opendir (const char * a_dir)
{
APIRET rc;
FILEFINDBUF3 FindBuffer = {0};
ULONG FileCount = 1;
DIR *dd_dir = (DIR*) malloc (sizeof(DIR));
char *c_dir = (char*) malloc (strlen(a_dir) + 5);
strcpy (c_dir, a_dir);
strcat (c_dir, "\\*.*");
dd_dir->d_handle = 0xFFFF;
rc = DosFindFirst(c_dir,
(PHDIR) &dd_dir->d_handle,
/* FILE_NORMAL || FILE_DIRECTORY, */
FILE_DIRECTORY,
(PVOID) &FindBuffer,
sizeof(FILEFINDBUF3),
&FileCount,
FIL_STANDARD);
switch (rc) {
case ERROR_NO_MORE_FILES:
case ERROR_FILE_NOT_FOUND:
case ERROR_PATH_NOT_FOUND:
errno = ENOENT;
free(dd_dir);
return NULL;
break;
case ERROR_BUFFER_OVERFLOW:
errno = ENOMEM;
free(dd_dir);
return NULL;
break;
case NO_ERROR: /* go through */
break;
default:
errno = EINVAL;
free(dd_dir);
return NULL;
break;
}
dd_dir->d_attr = FindBuffer.attrFile;
/* dd_dir->d_attr = (wfd.dwFileAttributes == FILE_ATTRIBUTE_NORMAL)
? 0 : wfd.dwFileAttributes; */
dd_dir->d_time = dd_dir->d_date = 10;
dd_dir->d_size = FindBuffer.cbFile;
strcpy (dd_dir->d_name, FindBuffer.achName);
dd_dir->d_first = 1;
free (c_dir);
return dd_dir;
}
DIR *readdir( DIR * dd_dir)
{
APIRET rc;
FILEFINDBUF3 FindBuffer = {0};
ULONG FileCount = 1;
DIR *ret_dir = (DIR*) malloc (sizeof(DIR));
if (dd_dir->d_first) {
dd_dir->d_first = 0;
return dd_dir;
}
rc = DosFindNext((HDIR) dd_dir->d_handle,
(PVOID) &FindBuffer,
sizeof(FILEFINDBUF3),
&FileCount);
switch (rc) {
case ERROR_NO_MORE_FILES:
case ERROR_FILE_NOT_FOUND:
case ERROR_PATH_NOT_FOUND:
errno = ENOENT;
return NULL;
break;
case ERROR_BUFFER_OVERFLOW:
errno = ENOMEM;
return NULL;
break;
case NO_ERROR: /* go through */
break;
default:
errno = EINVAL;
return NULL;
break;
}
/* dd_dir->d_attr = (wfd.dwFileAttributes == FILE_ATTRIBUTE_NORMAL)
? 0 : wfd.dwFileAttributes; */
/* #define FILE_NORMAL 0x0000
#define FILE_READONLY 0x0001
#define FILE_HIDDEN 0x0002
#define FILE_SYSTEM 0x0004
#define FILE_DIRECTORY 0x0010
#define FILE_ARCHIVED 0x0020
*/
ret_dir->d_attr = FindBuffer.attrFile;
ret_dir->d_time = ret_dir->d_date = 10;
ret_dir->d_size = FindBuffer.cbFile;
strcpy (ret_dir->d_name, FindBuffer.achName);
return ret_dir;
}
int closedir (DIR *dd_dir)
{
if (dd_dir->d_handle != 0xFFFF) {
DosFindClose(dd_dir->d_handle);
}
free (dd_dir);
return 1;
}

Просмотреть файл

@ -1,4 +0,0 @@
void drive_cmd_a(WPanel *);
void drive_cmd_b(WPanel *);
void drive_chg(WPanel *panel);

Просмотреть файл

@ -1,247 +0,0 @@
/* Ch-Drive command for OS/2 operating system
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <config.h>
#ifndef __os2__
#error This file is for the OS/2 operating systems.
#else
#define INCL_DOSDEVICES /* Device values */
#define INCL_DOSERRORS /* Error values */
#include <os2.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "tty.h"
#include "mad.h"
#include "util.h"
#include "win.h"
#include "color.h"
#include "dlg.h"
#include "widget.h"
#include "dialog.h" /* For do_refresh() */
#include "dir.h"
#include "panel.h" /* Needed for the externs */
#include "file.h"
#include "main.h"
#include "drive.h"
struct Dlg_head *drive_dlg;
WPanel *this_panel;
static int drive_dlg_callback (Dlg_head *h, int Par, int Msg);
static void drive_dlg_refresh (void);
static void drive_cmd();
#define B_DRIVE_BASE 100
void drive_cmd_a(WPanel *p)
{
this_panel = left_panel;
/* .ado: Drive change can only be done within view_listing */
if (p == this_panel) {
if (get_current_type() != view_listing) {
return;
}
} else {
if (get_other_type() != view_listing) {
return;
}
}
drive_cmd();
}
void drive_cmd_b(WPanel *p)
{
this_panel = right_panel;
/* .ado: Drive change can only be done within view_listing */
if (p == this_panel) {
if (get_current_type() != view_listing) {
return;
}
} else {
if (get_other_type() != view_listing) {
return;
}
}
drive_cmd();
}
void drive_chg(WPanel *panel)
{
this_panel = panel;
drive_cmd();
}
#define MAX_LGH 13
static void drive_cmd()
{
register int i;
register int j;
int nDrivesAvail = 0; /* Available drives */
int nNewDrive; /* New drive */
char szTempBuf[7];
ULONG uDriveNum = 0; /* Drive number (A=1, B=2 ...) */
ULONG uDriveMap = 0; /* Mapping */
char sDrvs[26]; /* Char-Mapping */
char curDisk;
// Dialogbox position
int x_pos; /* X-Position for the dialog */
int y_pos = (LINES-6)/2-3; /* Center on y */
int y_height;
int x_width;
int m_drv;
void *widget;
APIRET rc = NO_ERROR; /* Return code */
memset(sDrvs, (char) 0, 26);
rc = DosQueryCurrentDisk(&uDriveNum, &uDriveMap);
if (rc != NO_ERROR) {
message(0, " ERROR ", " Internal Error with drive_cmd ");
return;
}
j = 0;
for (i=0; i < 26; i++) {
if ( (uDriveMap<<(31-i)) >> 31) {
sDrvs[j++] = (char) ((int) 'A' + i);
nDrivesAvail++;
}
}
/* Create Dialog */
do_refresh ();
m_drv = ((nDrivesAvail > MAX_LGH) ? MAX_LGH: nDrivesAvail);
x_pos = this_panel->widget.x + (this_panel->widget.cols - m_drv*3)/2 + 2; /* Center on x, relative to panel */
if (nDrivesAvail > MAX_LGH) {
y_height = 8;
x_width = 33;
} else {
y_height = 6;
x_width = (nDrivesAvail - 1) * 2 + 9;
}
drive_dlg = create_dlg (y_pos, x_pos,
y_height,
x_width,
dialog_colors,
drive_dlg_callback,
"[ChDrive]",
"drive",
DLG_NONE);
x_set_dialog_title (drive_dlg, "Change Drive");
if (nDrivesAvail>MAX_LGH) {
for (i = 0; i < nDrivesAvail - MAX_LGH; i++) {
sprintf(szTempBuf, "%c", sDrvs[nDrivesAvail-i-1]);
add_widgetl (drive_dlg,
button_new (5, (m_drv-i-1)*2+4 - (MAX_LGH*2 - nDrivesAvail) * 2,
B_DRIVE_BASE+((int) szTempBuf[0] - (int) 'A'),
HIDDEN_BUTTON,
szTempBuf,
0, NULL, NULL),
XV_WLAY_RIGHTOF);
}
}
/* Add a button for each drive */
for (i = 0; i < m_drv; i++) {
sprintf (szTempBuf, "%c", sDrvs[m_drv-i-1]);
add_widgetl(drive_dlg,
button_new (3,
(m_drv-i-1)*2+4,
B_DRIVE_BASE+((int)szTempBuf[0] - (int) 'A'),
HIDDEN_BUTTON,
szTempBuf,
0,
NULL,
NULL),
XV_WLAY_RIGHTOF);
}
run_dlg(drive_dlg);
/* do action */
if (drive_dlg->ret_value != B_CANCEL) {
nNewDrive = drive_dlg->ret_value - B_DRIVE_BASE;
curDisk = (char) (nNewDrive + (int) 'A');
rc = DosSetDefaultDisk(nNewDrive + 1);
if (rc != NO_ERROR) {
message(1, " Error ", " Invalid Drive %c: \n", curDisk);
} else {
getcwd(this_panel->cwd, sizeof(this_panel->cwd) - 2);
// if getcwd returns NULL --> error!
// rc = DosQueryCurrentDisk(&uDriveNum, &uDriveMap);
if (toupper(curDisk) == toupper(*(this_panel->cwd))) {
clean_dir (&this_panel->dir, this_panel->count);
this_panel->count = do_load_dir (&this_panel->dir,
this_panel->sort_type,
this_panel->reverse,
this_panel->case_sensitive,
this_panel->filter);
this_panel->top_file = 0;
this_panel->selected = 0;
this_panel->marked = 0;
this_panel->total = 0;
show_dir(this_panel);
reread_cmd();
}
// rc = DosSetDefaultDisk(uDriveNum);
}
}
destroy_dlg (drive_dlg);
repaint_screen ();
}
static int drive_dlg_callback (Dlg_head *h, int Par, int Msg)
{
char buffer [10];
switch (Msg) {
#ifndef HAVE_X
case DLG_DRAW:
drive_dlg_refresh ();
break;
#endif
}
return 0;
}
static void drive_dlg_refresh (void)
{
attrset (dialog_colors[0]);
dlg_erase (drive_dlg);
draw_box (drive_dlg, 1, 1, drive_dlg->lines-2, drive_dlg->cols-2);
attrset (dialog_colors[2]);
dlg_move (drive_dlg, 1, drive_dlg->cols/2 - 7);
addstr (" Change Drive ");
}
#endif

Просмотреть файл

@ -1,3 +0,0 @@
#ifndef GPM_XTERM_H
#define GPM_XTERM_H
#endif

Просмотреть файл

@ -1 +0,0 @@
/* */

Просмотреть файл

@ -1,32 +0,0 @@
@echo off
echo This file will setup your build environment for OS/2.
echo Press a key to continue...
pause
xcopy . ..\src
xcopy ..\nt\getopt.* ..\src
xcopy sys\. ..\src\sys\ /s
xcopy os2edit\. ..\edit /s
echo Now I will delete the files we don't need for OS/2.
echo Press a key to continue...
pause
cd ..\src
del achown.c
del chmod.c
del chown.c
del cons.handler.c
del cons.saver.c
del fixhlp.c
del key.c
del key.unx.c
del learn.c
del learn.h
del mad.c
del Makefile.in
del man2hlp.c
del mfmt.c
del slint.c
del utilunix.c
del xcurses.c
cd ..\edit
ren edit_key_translator.c edit_key_translator
echo Now you can use nmake to build the project.

Просмотреть файл

@ -1,440 +0,0 @@
/* Keyboard support routines.
for OS/2 system.
20. April 97: Alexander Dong (ado)
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <config.h>
#ifndef __os2__
#error This file is for OS/2 systems.
#else
#define INCL_BASE
#define INCL_NOPM
#define INCL_VIO
#define INCL_KBD
#define INCL_DOS
#define INCL_DOSERRORS
#define INCL_WININPUT
#include <os2.h>
#include <stdio.h>
#include "mouse.h"
#include "global.h"
#include "main.h"
#include "key.h"
#include "../vfs/vfs.h"
#include "tty.h"
/* Code to read keystrokes in a separate thread */
typedef struct kbdcodes {
UCHAR ascii;
UCHAR scan;
USHORT shift; /* .ado: change for mc */
} KBDCODES;
/* Global variables */
int old_esc_mode = 0;
/* HANDLE hConsoleInput;
DWORD dwSaved_ControlState; */
Gpm_Event evSaved_Event;
/* Unused variables */
int double_click_speed; /* they are here to keep linker happy */
int mou_auto_repeat;
int use_8th_bit_as_meta = 0;
static int VKtoCurses (int vkcode);
/* -------------------------------------------------------------- */
/* DEFINITIONS:
Return from SLANG: KeyCode: 0xaaaabbcc
where: aaaa = Flags
bb = Scan code
cc = ASCII-code (if available)
if no flags (CTRL and ALT) is set, cc will be returned.
If CTRL is pressed, cc is already the XCTRL(code).
case cc is:
0xE0: The scan code will be used for the following keys:
Insert: 0x52, DEL: 0x53,
Page_Up: 0x49, Page_Down: 0x51,
Pos1: 0x47, Ende: 0x4F,
Up: 0x48, Down: 0x50,
Left: 0x4B, Right: 0x4D,
0x00: The function keys are defined as:
F1: 3b00, F2: 3c00 ... F10: 4400, F11: 8500, F12: 8600.
With ALT-bit set:
ALT(F1): 6800, 6900,... ALT(F10): 7100, ALT(F11): 8b00
ALT(F12): 8c00
Mapping for ALT(key_code):
For Mapping with normal keys, only the scan code can be
used. (see struct ALT_table)
Special keys:
ENTER (number block): 0xaaaaE00D
+ (number block): 0xaaaa4E2B Normal: 1B2B
- (number block): 0xaaaa4A2D Normal: 352D
* (number block): 0xaaaa372A Normal: 1B2A
/ (number block): 0xaaaaE02F
*/
/* -------------------------------------------------------------- */
#define RIGHT_SHIFT_PRESSED 1
#define LEFT_SHIFT_PRESSED 2
#define CTRL_PRESSED 4
#define ALT_PRESSED 8
#define SCROLL_LOCK_MODE 16
#define NUM_LOCK_MODE 32
#define CAPS_LOCK_MODE 64
#define INSERT_MODE 128
#define LEFT_CTRL_PRESSED 256
#define LEFT_ALT_PRESSED 512
#define RIGHT_CTRL_PRESSED 1024
#define RIGHT_ALT_PRESSED 2048
#define SCROLL_LOCK_PRESSED 4096
#define NUM_LOCK_PRESSED 8192
#define CAPS_LOCK_PRESSED 16384
#define SYSREQ 32768
/* -------------------------------------------------------------- */
/* Static Tables */
struct {
int key_code;
int vkcode;
} fkt_table [] = {
{ KEY_F(1), 0x3B },
{ KEY_F(2), 0x3C },
{ KEY_F(3), 0x3D },
{ KEY_F(4), 0x3E },
{ KEY_F(5), 0x3F },
{ KEY_F(6), 0x40 },
{ KEY_F(7), 0x41 },
{ KEY_F(8), 0x42 },
{ KEY_F(9), 0x43 },
{ KEY_F(10), 0x44 },
{ KEY_F(11), 0x85 },
{ KEY_F(12), 0x86 },
{ 0, 0}
};
struct {
int key_code;
int vkcode;
} ALT_table [] = {
{ ALT('a'), 0x1E },
{ ALT('b'), 0x30 },
{ ALT('c'), 0x2E },
{ ALT('d'), 0x20 },
{ ALT('e'), 0x12 },
{ ALT('f'), 0x21 },
{ ALT('g'), 0x22 },
{ ALT('h'), 0x23 },
{ ALT('i'), 0x17 },
{ ALT('j'), 0x24 },
{ ALT('k'), 0x25 },
{ ALT('l'), 0x26 },
{ ALT('m'), 0x32 },
{ ALT('n'), 0x31 },
{ ALT('o'), 0x18 },
{ ALT('p'), 0x19 },
{ ALT('q'), 0x10 },
{ ALT('r'), 0x13 },
{ ALT('s'), 0x1F },
{ ALT('t'), 0x14 },
{ ALT('u'), 0x16 },
{ ALT('v'), 0x2F },
{ ALT('w'), 0x11 },
{ ALT('x'), 0x2D },
{ ALT('y'), 0x15 },
{ ALT('z'), 0x2C },
{ ALT('\n'), 0x1c },
{ ALT('\n'), 0xA6 },
{ ALT(KEY_F(1)), 0x68 },
{ ALT(KEY_F(2)), 0x69 },
{ ALT(KEY_F(3)), 0x6A },
{ ALT(KEY_F(4)), 0x6B },
{ ALT(KEY_F(5)), 0x6C },
{ ALT(KEY_F(6)), 0x6D },
{ ALT(KEY_F(7)), 0x6E },
{ ALT(KEY_F(8)), 0x6F },
{ ALT(KEY_F(9)), 0x70 },
{ ALT(KEY_F(10)), 0x71 },
{ ALT(KEY_F(11)), 0x8B },
{ ALT(KEY_F(12)), 0x8C },
{ 0, 0}
};
struct {
int key_code;
int vkcode;
} movement [] = {
{ KEY_IC, 0x52 }, // Insert
{ KEY_DC, 0x53 }, // Delete
{ KEY_PPAGE, 0x49 }, // PAGEUP
{ KEY_NPAGE, 0x51 }, // PAGEDOWN
{ KEY_LEFT, 0x4B }, // left
{ KEY_RIGHT, 0x4D }, // right
{ KEY_UP, 0x48 }, // up
{ KEY_DOWN, 0x50 }, // down
{ KEY_HOME, 0x47 }, // HOME, Pos1
{ KEY_END, 0x4F }, // Ende
{ 0, 0}
};
/* init_key -- to make linker happy */
void init_key (void)
{
return;
}
/* The maximum sequence length (32 + null terminator) */
static int seq_buffer[33];
static int *seq_append = 0;
static int push_char (int c)
{
if (!seq_append)
seq_append = seq_buffer;
if (seq_append == &(seq_buffer [sizeof (seq_buffer)-2]))
return 0;
*(seq_append++) = c;
*seq_append = 0;
return 1;
}
void define_sequence (int code, char* vkcode, int action)
{
}
static int *pending_keys;
int get_key_code (int no_delay)
{
unsigned int inp_ch;
if (no_delay) {
/* Check if any input pending, otherwise return */
nodelay (stdscr, TRUE);
inp_ch = SLang_input_pending(0);
if (inp_ch == 0) {
return 0;
}
}
/* .ado: I don't know what these codes mean: */
#if 0
if (pending_keys) {
int d = *pending_keys++;
if (!*pending_keys){
pending_keys = 0;
seq_append = 0;
}
return VKtoCurses(d);
}
#endif
/* .ado: We have already the key-code */
if (no_delay) {
return (VKtoCurses(inp_ch));
}
do {
inp_ch = SLang_getkey();
if (!inp_ch)
inp_ch = (SLang_getkey() << 8);
if (inp_ch) return (VKtoCurses(inp_ch));
} while (!no_delay);
return 0;
}
static int VKtoCurses (int a_vkc)
{
int shiftState = 0;
int ctrlState = 0;
int altState = 0;
int altGRState = 0;
int fsState = 0;
char scanCode;
char asciiCode;
register int i;
int rtnCode = 0;
fsState = (a_vkc & 0xFFFF0000) >> 16;
fsState &= (~INSERT_MODE); // Ignore Insertion mode
scanCode = (char) ((a_vkc & 0x0000FFFF) >> 8);
asciiCode = (char) (a_vkc & 0x000000FF);
// SHIFT pressed?
shiftState = ((fsState & RIGHT_SHIFT_PRESSED) || (fsState & LEFT_SHIFT_PRESSED));
ctrlState = (fsState & CTRL_PRESSED);
altState = (fsState & ALT_PRESSED);
rtnCode = asciiCode;
if (ctrlState) {
// CTRL pressed
rtnCode = XCTRL(asciiCode);
}
if (altState) {
// ALT pressed
// rtnCode = ALT(asciiCode);
// With German keyboards, the Values between 7B -> 7D
// and 5b, 5d, 40, fd, fc and e6 are only reachable with the AltGr
// key. If such a combination is used, asciiCode will not be zero.
// With the normal ALT key, the asciiCode will always be zero.
if (asciiCode) {
return asciiCode;
}
}
// Scan Movement codes
if (asciiCode == 0) {
// Replace key code with that in table
for (i=0; movement[i].vkcode != 0 || movement[i].key_code != 0; i++)
if (scanCode == movement[i].vkcode)
return (movement[i].key_code);
}
if (asciiCode == 0) {
// Function-key detected
for (i=0; fkt_table[i].vkcode != 0 || fkt_table[i].key_code != 0; i++)
if (scanCode == fkt_table[i].vkcode)
return (fkt_table[i].key_code);
// ALT - KEY
/* if (altState) */ {
for (i=0; ALT_table[i].vkcode != 0 || ALT_table[i].key_code != 0; i++)
if (scanCode == ALT_table[i].vkcode)
return (ALT_table[i].key_code);
}
}
if (asciiCode == 0x0d) {
return '\n';
}
return rtnCode;
}
static int getch_with_delay (void)
{
int c;
while (1) {
/* Try to get a character */
c = get_key_code (0);
if (c != ERR)
break;
}
/* Success -> return the character */
return c;
}
int get_event (Gpm_Event *event, int redo_event, int block)
{
int c;
static int flag; /* Return value from select */
static int dirty = 3;
if ((dirty == 1) || is_idle ()){
refresh ();
doupdate ();
dirty = 1;
} else
dirty++;
vfs_timeout_handler ();
c = block ? getch_with_delay () : get_key_code (1);
if (!c) { /* Code is 0, so this is a Control key or mouse event */
#ifdef HAVE_SLANG
// SLms_GetEvent (event);
*event = evSaved_Event;
#else
ms_GetEvent (event); /* my curses */
#endif
return EV_NONE; /* FIXME: when should we return EV_MOUSE ? */
}
return c;
}
/* Returns a key press, mouse events are discarded */
int mi_getch ()
{
Gpm_Event ev;
int key;
while ((key = get_event (&ev, 0, 1)) == 0)
;
return key;
}
/*
is_idle - A function to check if we're idle.
It checks for any waiting event (that can be a Key, Mouse event,
and other internal events like focus or menu)
*/
int is_idle (void)
{
return 1;
}
/* get_modifier */
int get_modifier()
{
return 0;
}
int ctrl_pressed ()
{
return 0;
}
/* void functions for UNIX copatibility */
void try_channels (int set_timeout)
{
}
void channels_up()
{
}
void channels_down()
{
}
void init_key_input_fd (void)
{
}
/* mouse is not yet supported, sorry */
void init_mouse (void) {}
void shut_mouse (void) {}
#endif /* __os2__ */

Просмотреть файл

@ -1 +0,0 @@
/* */

Просмотреть файл

@ -1 +0,0 @@
/* Dummy */

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,6 +0,0 @@
NAME MC WINDOWCOMPAT
DESCRIPTION 'Midnight Commander'
EXETYPE OS2
PROTMODE

Двоичные данные
os2/mc.ico

Двоичный файл не отображается.

Просмотреть файл

@ -1 +0,0 @@
/* Dummy for OS/2 */

Просмотреть файл

@ -1 +0,0 @@
/* */

Просмотреть файл

@ -1,202 +0,0 @@
# makefile.debug
# Erstellt von IBM WorkFrame/2 MakeMake um 21:53:52 am 8 Mai 1997
#
# Diese Make-Datei enthДlt folgende Aktionen:
# Compile::C++ Compiler
# Lib::Library Tool
.SUFFIXES: .c .obj
.all: \
.\libedit.lib
.c.obj:
@echo " Compile::C++ Compiler "
icc.exe /Tl5 /Id:\work\mc\mc-3.5.29\edit /Id:\work\mc\mc-3.5.29\src /Id:\work\mc\slang\os2src /Id:\work\mc\mc-3.5.29 /DMIDNIGHT /D__os2__ /DOS2_NT /DHAVE_SLANG /DLIBDIR=\"D:\\mc\\\" /Ss /Tx /Gh /Ti /Tm /Fb /C %s
{D:\WORK\mc\mc-3.5.29\edit}.c.obj:
@echo " Compile::C++ Compiler "
icc.exe /Tl5 /Id:\work\mc\mc-3.5.29\edit /Id:\work\mc\mc-3.5.29\src /Id:\work\mc\slang\os2src /Id:\work\mc\mc-3.5.29 /DMIDNIGHT /D__os2__ /DOS2_NT /DHAVE_SLANG /DLIBDIR=\"D:\\mc\\\" /Ss /Tx /Gh /Ti /Tm /Fb /C %s
.\libedit.lib: \
.\editmenu.obj \
.\editdraw.obj \
.\editwidget.obj \
.\edit.obj \
.\editcmd.obj
@echo " Lib::Library Tool "
ilib.exe /nol libedit.lib @makefile.rf;
.\editmenu.obj: \
D:\WORK\mc\mc-3.5.29\edit\editmenu.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}edit.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}app_glob.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}coollocal.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}editcmddef.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../vfs/vfs.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/tty.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}global.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}regex.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}lkeysym.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}coolwidget.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dialog.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}stringtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/main.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/mad.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/dlg.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/widget.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/color.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/mouse.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/help.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/key.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/wtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/win.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/menu.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../slang/slang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../slang/slcurses.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}myslang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}util.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}gpm-xterm.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}slang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}fs.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dirent.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}copyright.h
.\editdraw.obj: \
D:\WORK\mc\mc-3.5.29\edit\editdraw.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}edit.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}app_glob.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dirtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}coollocal.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../vfs/vfs.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/tty.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}global.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}regex.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}lkeysym.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}coolwidget.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dialog.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}stringtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/main.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/mad.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/dlg.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/widget.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/color.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/mouse.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/help.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/key.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/wtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/win.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/menu.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../slang/slang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../slang/slcurses.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}myslang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}util.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}gpm-xterm.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}slang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}fs.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dirent.h
.\editcmd.obj: \
D:\WORK\mc\mc-3.5.29\edit\editcmd.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}edit.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}app_glob.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}coollocal.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../vfs/vfs.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/tty.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}global.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}regex.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}lkeysym.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}coolwidget.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dialog.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}stringtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/main.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/mad.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/dlg.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/widget.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/color.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/mouse.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/help.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/key.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/wtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/win.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/menu.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../slang/slang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../slang/slcurses.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}myslang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}util.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}gpm-xterm.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}slang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}fs.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dirent.h
.\edit.obj: \
D:\WORK\mc\mc-3.5.29\edit\edit.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}edit.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}app_glob.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}coollocal.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}editcmddef.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../vfs/vfs.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/tty.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}global.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}regex.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}lkeysym.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}coolwidget.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dialog.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}stringtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/main.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/mad.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/dlg.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/widget.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/color.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/mouse.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/help.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/key.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/wtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/win.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/menu.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../slang/slang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../slang/slcurses.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}myslang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}util.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}gpm-xterm.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}slang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}fs.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dirent.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}edit/edit_key_translator \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}edit/edit_key_translator.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}widget/edit_key_translator.c
.\editwidget.obj: \
D:\WORK\mc\mc-3.5.29\edit\editwidget.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}edit.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}app_glob.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dirtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}coollocal.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}editcmddef.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../vfs/vfs.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/tty.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}global.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}regex.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}lkeysym.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}coolwidget.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dialog.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}stringtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/main.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/mad.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/dlg.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/widget.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/color.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/mouse.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/help.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/key.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/wtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/win.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/menu.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../slang/slang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../slang/slcurses.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}myslang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}util.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}gpm-xterm.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}slang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}fs.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dirent.h

Просмотреть файл

@ -1,199 +0,0 @@
# makefile.release
# Erstellt von IBM WorkFrame/2 MakeMake um 21:14:28 am 8 Mai 1997
#
# Diese Make-Datei enthДlt folgende Aktionen:
# Compile::C++ Compiler
# Lib::Library Tool
.SUFFIXES: .c .obj
.all: \
.\libedit.lib
.c.obj:
@echo " Compile::C++ Compiler "
icc.exe /Tl5 /Id:\work\mc\mc-3.5.29\edit /Id:\work\mc\mc-3.5.29\src /Id:\work\mc\slang\os2src /Id:\work\mc\mc-3.5.29 /DMIDNIGHT /D__os2__ /DOS2_NT /DHAVE_SLANG /DLIBDIR=\"D:\\mc\\\" /Ss /O /C %s
{D:\WORK\mc\mc-3.5.29\edit}.c.obj:
@echo " Compile::C++ Compiler "
icc.exe /Tl5 /Id:\work\mc\mc-3.5.29\edit /Id:\work\mc\mc-3.5.29\src /Id:\work\mc\slang\os2src /Id:\work\mc\mc-3.5.29 /DMIDNIGHT /D__os2__ /DOS2_NT /DHAVE_SLANG /DLIBDIR=\"D:\\mc\\\" /Ss /O /C %s
.\libedit.lib: \
.\editmenu.obj \
.\editwidget.obj \
.\edit.obj \
.\editcmd.obj \
.\editdraw.obj
@echo " Lib::Library Tool "
ilib.exe /nol libedit.lib @makefile.rf;
.\editmenu.obj: \
D:\WORK\mc\mc-3.5.29\edit\editmenu.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}edit.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}app_glob.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}coollocal.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}editcmddef.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../vfs/vfs.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/tty.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}global.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}regex.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}lkeysym.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}coolwidget.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dialog.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}stringtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/main.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/mad.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/dlg.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/widget.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/color.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/mouse.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/help.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/key.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/wtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/win.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/menu.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../slang/slang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../slang/slcurses.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}myslang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}util.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}gpm-xterm.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}slang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}fs.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dirent.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}copyright.h
.\editdraw.obj: \
D:\WORK\mc\mc-3.5.29\edit\editdraw.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}edit.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}app_glob.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dirtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}coollocal.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../vfs/vfs.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/tty.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}global.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}regex.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}lkeysym.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}coolwidget.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dialog.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}stringtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/main.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/mad.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/dlg.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/widget.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/color.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/mouse.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/help.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/key.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/wtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/win.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/menu.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../slang/slang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../slang/slcurses.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}myslang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}util.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}gpm-xterm.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}slang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}fs.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dirent.h
.\editcmd.obj: \
D:\WORK\mc\mc-3.5.29\edit\editcmd.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}edit.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}app_glob.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}coollocal.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../vfs/vfs.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/tty.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}global.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}regex.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}lkeysym.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}coolwidget.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dialog.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}stringtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/main.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/mad.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/dlg.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/widget.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/color.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/mouse.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/help.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/key.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/wtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/win.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/menu.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../slang/slang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../slang/slcurses.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}myslang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}util.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}gpm-xterm.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}slang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}fs.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dirent.h
.\edit.obj: \
D:\WORK\mc\mc-3.5.29\edit\edit.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}edit.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}app_glob.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}coollocal.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}editcmddef.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../vfs/vfs.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/tty.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}global.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}regex.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}lkeysym.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}coolwidget.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dialog.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}stringtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/main.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/mad.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/dlg.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/widget.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/color.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/mouse.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/help.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/key.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/wtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/win.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/menu.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../slang/slang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../slang/slcurses.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}myslang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}util.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}gpm-xterm.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}slang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}fs.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dirent.h
.\editwidget.obj: \
D:\WORK\mc\mc-3.5.29\edit\editwidget.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}edit.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}app_glob.c \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dirtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}coollocal.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}editcmddef.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../vfs/vfs.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/tty.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}global.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}regex.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}lkeysym.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}coolwidget.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dialog.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}stringtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/main.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/mad.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/dlg.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/widget.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/color.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/mouse.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/help.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/key.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/wtools.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/win.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}src/menu.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../slang/slang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}../slang/slcurses.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}myslang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}util.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}gpm-xterm.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}slang.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}fs.h \
{D:\WORK\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\edit;d:\work\mc\mc-3.5.29\src;d:\work\mc\slang\os2src;d:\work\mc\mc-3.5.29;$(INCLUDE);}dirent.h

Просмотреть файл

@ -1,5 +0,0 @@
-+.\editmenu.obj &
-+.\editdraw.obj &
-+.\editwidget.obj &
-+.\edit.obj &
-+.\editcmd.obj;

Просмотреть файл

@ -1 +0,0 @@
/* */

Просмотреть файл

@ -1,221 +0,0 @@
/* Slang interface to the Midnight Commander for Windows NT and OS/2
This emulates some features of ncurses on top of slang
S-lang is not fully consistent between its Unix and non-Unix versions.
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <config.h>
#include <stdio.h>
#include "tty.h"
#include "mad.h"
#include "color.h"
#include "util.h"
#include "mouse.h" /* Gpm_Event is required in key.h */
#include "key.h" /* define_sequence */
#include "main.h" /* extern: force_colors */
#include "win.h" /* do_exit_ca_mode */
#ifdef HAVE_SLANG
static void slang_sigterm ()
{
SLsmg_reset_smg ();
}
static int slinterrupt;
void enable_interrupt_key(void)
{
SLang_set_abort_signal(NULL);
slinterrupt = 1;
}
void disable_interrupt_key(void)
{
slinterrupt = 0;
}
int got_interrupt ()
{
int t;
int SLKeyboard_Quit=0; //FIXME!!
t = slinterrupt ? SLKeyboard_Quit : 0;
// SLKeyboard_Quit = 0;
return t;
}
/* Only done the first time */
void slang_init (void)
{
SLtt_get_terminfo ();
SLang_init_tty (XCTRL('c'), 1, 0);
slang_prog_mode ();
load_terminfo_keys ();
}
/* Done each time we come back from done mode */
void slang_prog_mode (void)
{
SLsmg_init_smg ();
SLsmg_touch_lines (0, LINES);
}
/* Called each time we want to shutdown slang screen manager */
void slang_shell_mode (void)
{
}
void slang_shutdown ()
{
slang_shell_mode ();
do_exit_ca_mode ();
SLang_reset_tty ();
/* reset the colors to those that were
* active when the program was started up
(not written)
*/
}
/* keypad routines */
void slang_keypad (int set)
{
// enable keypad strings
// ?
}
static int no_slang_delay;
void set_slang_delay (int v)
{
no_slang_delay = v;
}
void hline (int ch, int len)
{
int last_x, last_y;
last_x = SLsmg_get_column ();
last_y = SLsmg_get_row ();
if (ch == 0)
ch = ACS_HLINE;
if (ch == ACS_HLINE){
SLsmg_draw_hline (len);
} else {
while (len--)
addch (ch);
}
move (last_y, last_x);
}
void vline (int character, int len)
{
if (!slow_terminal){
SLsmg_draw_vline (len);
} else {
int last_x, last_y, pos = 0;
last_x = SLsmg_get_column ();
last_y = SLsmg_get_row ();
while (len--){
move (last_y + pos++, last_x);
addch (' ');
}
move (last_x, last_y);
}
}
void init_pair (int index, char *foreground, char *background)
{
SLtt_set_color (index, "", foreground, background);
}
int has_colors ()
{
/* No terminals on NT, make default color */
if (!disable_colors)
SLtt_Use_Ansi_Colors = 1;
/* Setup emulated colors */
if (SLtt_Use_Ansi_Colors){
init_pair (A_REVERSE, "black", "white");
} else {
/* SLtt_set_mono (A_BOLD, NULL, SLTT_BOLD_MASK);
SLtt_set_mono (A_REVERSE, NULL, SLTT_REV_MASK);
SLtt_set_mono (A_BOLD|A_REVERSE, NULL, SLTT_BOLD_MASK | SLTT_REV_MASK);
*/ }
return SLtt_Use_Ansi_Colors;
}
void attrset (int color)
{
if (!SLtt_Use_Ansi_Colors){
SLsmg_set_color (color);
return;
}
if (color & A_BOLD){
if (color == A_BOLD)
SLsmg_set_color (A_BOLD);
else
SLsmg_set_color ((color & (~A_BOLD)) + 8);
return;
}
if (color == A_REVERSE)
SLsmg_set_color (A_REVERSE);
else
SLsmg_set_color (color);
}
void load_terminfo_keys ()
{
}
int getch ()
{
if (no_slang_delay)
if (SLang_input_pending (0) == 0)
return -1;
return SLang_getkey ();
}
extern int slow_terminal;
#else
/* Non slang builds do not understand got_interrupt */
int got_interrupt ()
{
return 0;
}
#endif /* HAVE_SLANG */
void mc_refresh (void)
{
/* if (!we_are_background) (no background mode yet) */
refresh ();
}
void slang_set_raw_mode (void)
{
return;
}

Просмотреть файл

@ -1,7 +0,0 @@
/* Systems having sys/param.h should not include this file */
#ifdef HAVE_PARAM_H
#error Remove this file if you have real sys/param.h
#else
/* FIXME: We should warn, that this file should not be included */
#endif

Просмотреть файл

@ -1,16 +0,0 @@
#ifndef _SYS_TIME_H
#define _SYS_TIME_H
#ifndef _WINSOCKAPI_ /* winsock.h defines struct timeval */
struct timeval {
long tv_sec;
long tv_usec;
};
#endif
int gettimeofday (struct timeval*, void *);
#endif

Просмотреть файл

@ -1 +0,0 @@
/* */

Просмотреть файл

@ -1,3 +0,0 @@
#ifndef TERMIOS_H
#define TERMIOS_H
#endif

Просмотреть файл

@ -1 +0,0 @@
/* */

Просмотреть файл

@ -1,869 +0,0 @@
/* Various utilities - OS/2 versions
Copyright (C) 1994, 1995, 1996 the Free Software Foundation.
Written 1994, 1995, 1996 by:
Juan Grigera, Miguel de Icaza, Janne Kukonlehto, Dugan Porter,
Jakub Jelinek, Mauricio Plaza.
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define INCL_DOS
#define INCL_PM
#define INCL_DOSPROCESS
#define INCL_DOSFILEMGR
#define INCL_DOSDEVICES /* Device values */
#define INCL_DOSDATETIME
#define INCL_DOSERRORS
#include "config.h"
#include <os2.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <config.h>
#include <ctype.h>
#include <sys/stat.h>
#include <errno.h>
#include <io.h>
#include <fcntl.h>
#include <signal.h> /* my_system */
#include <limits.h> /* INT_MAX */
#include <sys/time.h> /* select: timeout */
#include <sys/param.h>
#include <sys/stat.h>
#include <stdarg.h>
#include <process.h>
#include <fs.h>
#include <util.h>
#ifdef __BORLANDC__
#define ENOTEMPTY ERROR_DIR_NOT_EMPTY
#endif
char *
get_owner (int uid)
{
return "none";
}
char *
get_group (int gid)
{
return "none";
}
/* Pipes are guaranteed to be able to hold at least 4096 bytes */
/* More than that would be unportable */
#define MAX_PIPE_SIZE 4096
static int error_pipe[2]; /* File descriptors of error pipe */
static int old_error; /* File descriptor of old standard error */
/* Creates a pipe to hold standard error for a later analysis. */
/* The pipe can hold 4096 bytes. Make sure no more is written */
/* or a deadlock might occur. */
void
open_error_pipe (void)
{
return;
}
void
close_error_pipe (int error, char *text)
{
return;
}
void
check_error_pipe (void)
{
char error[MAX_PIPE_SIZE];
int len = 0;
if (old_error >= 0){
while (len < MAX_PIPE_SIZE)
{
int rvalue;
rvalue = read (error_pipe[0], error + len, 1);
len ++;
if (rvalue <= 0)
break;
}
error[len] = 0;
close (error_pipe[0]);
}
if (len > 0)
message (0, " Warning ", error);
}
static int
StartWindowsProg (char *name, SHORT type)
{
#if 0 /* FIXME: PM DDL's should be loaded (or not loaded) at run time */
PROGDETAILS pDetails;
memset(&pDetails, 0, sizeof(PROGDETAILS)) ;
pDetails.Length = sizeof(pDetails);
pDetails.pszExecutable = name; /* program name */
pDetails.pszStartupDir = NULL; /* default directory for new app. */
pDetails.pszParameters = NULL; /* command line */
pDetails.progt.fbVisible = SHE_VISIBLE ;
pDetails.pszEnvironment = NULL;
switch (type) {
case 0:
/* Win Standard */
pDetails.progt.progc = PROG_31_ENHSEAMLESSCOMMON ;
break;
case 1:
/* Win 3.1 Protect */
pDetails.progt.progc = PROG_31_ENHSEAMLESSCOMMON ;
break;
case 2:
/* Win 3.1 Enh. Protect */
pDetails.progt.progc = PROG_31_ENHSEAMLESSCOMMON ;
break;
default:
pDetails.progt.progc = PROG_31_ENHSEAMLESSCOMMON ;
break;
}
WinStartApp(NULLHANDLE,
&pDetails,
NULL,
NULL,
SAF_INSTALLEDCMDLINE|SAF_STARTCHILDAPP) ;
#endif
return 0;
}
static int
os2_system (int as_shell_command, const char *shell, const char *command, char *parm);
/*
as_shell_command = 1: If a program is started during input line, CTRL-O
or RETURN
= 0: F3, F4
*/
int
my_system (int as_shell_command, const char *shell, const char *command)
{
char *sh; /* This is the shell -- always! */
char *cmd; /* This is the command (only the command) */
char *parm; /* This is the parameter (can be more than one) */
register int length, i;
char temp[4096]; /* That's enough! */
sh = get_default_shell();
if (strcmp(sh, shell)) {
/*
Not equal -- That means: shell is the program and command is the
parameter
*/
cmd = (char *) shell;
parm = (char *) command;
} else {
/* look into the command and take out the program */
if (command) {
strcpy(temp, command);
length = strlen(command);
for (i=length-1; i>=0; i--) {
if (command[i] == ' ') {
temp[i] = (char) 0;
length--;
} else
break;
}
if (i==-1) {
/* only blanks */
return -1;
}
if (parm = strchr(temp, (char) ' ')) {
*parm = (char) 0;
parm++;
}
cmd = (char *) temp;
} else {
/* command is NULL */
cmd = parm = NULL;
}
}
/* .ado: Konvertierung wenn shell <> get_default_shell */
os2_system (as_shell_command, sh, cmd, parm);
}
static int
ux_startp (const char *shell, const char *command, const char *parm)
{
if (parm) {
spawnlp (P_WAIT,
(char *) shell,
(char *) shell,
"/c",
(char *) command,
(char *) parm,
(char *) 0);
} else {
spawnlp (P_WAIT,
(char *) shell,
(char *) shell,
"/c",
(char *) command,
(char *) 0);
}
return 0;
}
static int
os2_system (int as_shell_command, const char *shell, const char *command, char *parm)
{
register int i, j;
ULONG AppType = 0; /* Application type flags (returned) */
APIRET rc = NO_ERROR; /* Return Code */
char pathValue[5] = "PATH"; /* For DosSearchPath */
UCHAR searchResult[MC_MAXPATHLEN * 2 + 1]; /* For DosSearchPath */
char *cmdString;
char *postFix[3];
char *line;
/* ------------------------------------------------------- */
STARTDATA StartData;
CHAR ObjBuf[100];
ULONG SessionID;
PID pid;
if (command == NULL) {
/* .ado: just start a shell, we don't need the parameter */
spawnl (P_WAIT,
(char *) shell,
(char *) shell,
(char *) command, (char *) 0);
return 0;
}
memset(&StartData, 0, sizeof(StartData)) ;
StartData.Length = sizeof(StartData);
StartData.Related = SSF_RELATED_CHILD;
StartData.FgBg = SSF_FGBG_BACK;
StartData.TraceOpt = SSF_TRACEOPT_NONE;
StartData.PgmTitle = NULL;
StartData.TermQ = NULL;
StartData.InheritOpt = SSF_INHERTOPT_PARENT;
StartData.IconFile = 0;
StartData.PgmHandle = 0;
StartData.PgmControl = SSF_CONTROL_VISIBLE ;
StartData.ObjectBuffer = ObjBuf;
StartData.ObjectBuffLen = 100;
StartData.PgmInputs = parm;
postFix[0] = ".exe";
postFix[1] = ".cmd";
postFix[2] = ".bat";
i = strlen(command);
if (command[i-1] == ' ') {
/* The user has used ALT-RETURN */
i--;
}
cmdString = (char *) malloc(i+1);
for (j=0; j<i; j++) {
cmdString[j] = command[j];
}
cmdString[j] = (char) 0;
if ((i < 5) || ((i > 4) && (cmdString[i-4]) != '.')) {
/* without Extension */
line = (char *) malloc(i+5);
rc = 1;
for (i=0; (i<3 && rc); i++) {
/* Search for the file */
strcpy(line, cmdString);
strcat(line, postFix[i]);
rc = DosSearchPath((SEARCH_IGNORENETERRS | SEARCH_ENVIRONMENT | SEARCH_CUR_DIRECTORY),
(PSZ) pathValue,
line,
searchResult,
sizeof(searchResult));
}
free (line);
} else {
/* Just search */
rc = DosSearchPath((SEARCH_IGNORENETERRS | SEARCH_ENVIRONMENT | SEARCH_CUR_DIRECTORY),
(PSZ) pathValue,
cmdString,
searchResult,
sizeof(searchResult));
}
free(cmdString);
if (rc != 0) {
/* Internal command or the program was written with absolut path */
return ux_startp(shell, command, parm);
}
/* Application to be started */
StartData.PgmName = searchResult;
StartData.Environment = NULL;
rc = DosQueryAppType(searchResult, &AppType);
if (rc == NO_ERROR) {
StartData.SessionType = PROG_WINDOWABLEVIO;
if ((AppType & 0x00000007) == FAPPTYP_WINDOWAPI) {
/* Window API */
StartData.SessionType = PROG_PM;
return DosStartSession(&StartData, &SessionID, &pid);
}
if ((AppType & 0x00000007) == FAPPTYP_WINDOWCOMPAT) {
/* Window compat */
return ux_startp(shell, command, parm);
}
if (AppType & 0x0000ffff & FAPPTYP_DOS) {
/* PC/DOS Format */
StartData.SessionType = PROG_WINDOWEDVDM;
return DosStartSession(&StartData, &SessionID, &pid);
}
if (AppType & 0x0000ffff & FAPPTYP_WINDOWSREAL) {
/* Windows real mode app */
return StartWindowsProg(searchResult, 0);
}
if (AppType & 0x0000ffff & FAPPTYP_WINDOWSPROT) {
/* Windows Protect mode app*/
return StartWindowsProg(searchResult, 1);
}
if (AppType & 0x0000ffff & FAPPTYP_WINDOWSPROT31) {
/* Windows 3.1 Protect mode app*/
return StartWindowsProg(searchResult, 2);
}
rc = DosStartSession(&StartData, &SessionID, &pid) ;
} else {
/* It's not a known exe type or it's a CMD/BAT file */
i = strlen(searchResult);
if ((toupper(searchResult[--i]) == 'T') &&
(toupper(searchResult[--i]) == 'A') &&
(toupper(searchResult[--i]) == 'B') &&
(searchResult[--i] == '.') ) {
StartData.SessionType = PROG_WINDOWEDVDM;
rc = DosStartSession(&StartData, &SessionID, &pid) ;
} else {
rc = ux_startp (shell, command, parm);
}
}
return rc;
}
char *tilde_expand (char *directory)
{
return strdup (directory);
}
/* Canonicalize path, and return a new path. Do everything in situ.
The new path differs from path in:
Multiple BACKSLASHs are collapsed to a single BACKSLASH.
Leading `./'s and trailing `/.'s are removed.
Trailing BACKSLASHs are removed.
Non-leading `../'s and trailing `..'s are handled by removing
portions of the path. */
char *
canonicalize_pathname (char *path)
{
int i, start;
char stub_char;
stub_char = (*path == PATH_SEP) ? PATH_SEP : '.';
/* Walk along path looking for things to compact. */
i = 0;
for (;;) {
if (!path[i])
break;
while (path[i] && path[i] != PATH_SEP)
i++;
start = i++;
/* If we didn't find any slashes, then there is nothing left to do. */
if (!path[start])
break;
/* Handle multiple BACKSLASHs in a row. */
while (path[i] == PATH_SEP)
i++;
if ((start + 1) != i) {
strcpy (path + start + 1, path + i);
i = start + 1;
}
/* Handle backquoted BACKSLASH. */
/* if (start > 0 && path[start - 1] == '\\')
continue; */
/* Check for trailing BACKSLASH. */
if (start && !path[i]) {
zero_last:
path[--i] = '\0';
break;
}
/* Check for `../', `./' or trailing `.' by itself. */
if (path[i] == '.') {
/* Handle trailing `.' by itself. */
if (!path[i + 1])
goto zero_last;
/* Handle `./'. */
if (path[i + 1] == PATH_SEP) {
strcpy (path + i, path + i + 1);
i = start;
continue;
}
/* Handle `../' or trailing `..' by itself.
Remove the previous ?/ part with the exception of
../, which we should leave intact. */
if (path[i + 1] == '.' && (path[i + 2] == PATH_SEP || !path[i + 2])) {
while (--start > -1 && path[start] != PATH_SEP);
if (!strncmp (path + start + 1, "..\\", 3))
continue;
strcpy (path + start + 1, path + i + 2);
i = start;
continue;
}
}
}
if (!*path) {
*path = stub_char;
path[1] = '\0';
}
return path;
}
void
my_statfs (struct my_statfs *myfs_stats, char *path)
{
PFSALLOCATE pBuf;
PFSINFO pFsInfo;
ULONG lghBuf;
ULONG diskNum = 0;
ULONG logical = 0;
UCHAR szDeviceName[3] = "A:";
ULONG ulOrdinal = 0; /* Ordinal of entry in name list */
PBYTE pszFSDName = NULL; /* pointer to FS name */
APIRET rc = NO_ERROR; /* Return code */
BYTE fsqBuffer[sizeof(FSQBUFFER2) + (3 * CCHMAXPATH)] = {0};
ULONG cbBuffer = sizeof(fsqBuffer); /* Buffer length) */
PFSQBUFFER2 pfsqBuffer = (PFSQBUFFER2) fsqBuffer;
int i, len = 0;
/* ------------------------------------------------------------------ */
lghBuf = sizeof(FSALLOCATE);
pBuf = (PFSALLOCATE) malloc(lghBuf);
/* Get the free number of Bytes */
rc = DosQueryFSInfo(0L, FSIL_ALLOC, (PVOID) pBuf, lghBuf);
/* KBytes available */
myfs_stats->avail = pBuf->cSectorUnit * pBuf->cUnitAvail * pBuf->cbSector / 1024;
/* KBytes total */
myfs_stats->total = pBuf->cSectorUnit * pBuf->cUnit * pBuf->cbSector / 1024;
myfs_stats->nfree = pBuf->cUnitAvail;
myfs_stats->nodes = pBuf->cbSector;
lghBuf = sizeof(FSINFO);
pFsInfo = (PFSINFO) malloc(lghBuf);
rc = DosQueryFSInfo(0L,
FSIL_VOLSER,
(PVOID) pFsInfo,
lghBuf);
/* Get name */
myfs_stats->device = strdup(pFsInfo->vol.szVolLabel); /* Label of the Disk */
/* Get the current disk for DosQueryFSAttach */
rc = DosQueryCurrentDisk(&diskNum, &logical);
szDeviceName[0] = (UCHAR) (diskNum + (ULONG) 'A' - 1);
/* Now get the type of the disk */
rc = DosQueryFSAttach(szDeviceName,
0L,
FSAIL_QUERYNAME,
pfsqBuffer,
&cbBuffer);
pszFSDName = pfsqBuffer->szName + pfsqBuffer->cbName + 1;
myfs_stats->mpoint = strdup(pszFSDName); /* FAT, HPFS ... */
myfs_stats->type = pBuf->idFileSystem;
/* What is about 3 ?*/
if (myfs_stats->type == 0) {
myfs_stats->typename = (char *) malloc(11);
strcpy(myfs_stats->typename, "Local Disk");
} else {
myfs_stats->typename = (char *) malloc(13);
strcpy(myfs_stats->typename, "Other Device");
}
free(pBuf);
free(pFsInfo);
}
int
gettimeofday (struct timeval* tvp, void *p)
{
DATETIME pdt = {0};
if (p != NULL) /* what is "p"? */
return 0;
/* Since MC only calls this func from get_random_hint we return
* some value, not exactly the "correct" one
*/
DosGetDateTime(&pdt);
tvp->tv_usec = (pdt.hours * 60 + pdt.minutes) * 60 + pdt.seconds;
/* Number of milliseconds since Windows started */
tvp->tv_sec = tvp->tv_usec * 1000 + pdt.hundredths * 10;
return 0;
}
/* FAKE functions */
int
look_for_exe(const char* pathname)
{
int j;
char *p;
int lgh = strlen(pathname);
if (lgh < 4) {
return 0;
} else {
p = (char *) pathname;
for (j=0; j<lgh-4; j++) {
p++;
}
if (!stricmp(p, ".exe") ||
!stricmp(p, ".bat") ||
!stricmp(p, ".com") ||
!stricmp(p, ".cmd")) {
return 1;
}
}
return 0;
}
int
lstat (const char* pathname, struct stat *buffer)
{
int rc = stat (pathname, buffer);
#ifdef __BORLANDC__
if (rc == 0) {
if (!(buffer->st_mode & S_IFDIR)) {
if (!look_for_exe(pathname)) {
buffer->st_mode &= !S_IXUSR & !S_IXGRP & !S_IXOTH;
}
}
}
#endif
return rc;
}
int
getuid ()
{
return 0;
}
int
getgid ()
{
return 0;
}
int
readlink (char* path, char* buf, int size)
{
return -1;
}
int
symlink (char *n1, char *n2)
{
return -1;
}
int
link (char *p1, char *p2)
{
return -1;
}
int
chown (char *path, int owner, int group)
{
return -1;
}
int
mknod (char *path, int mode, int dev)
{
return -1;
}
void
init_uid_gid_cache (void)
{
return;
}
int
mc_doublepopen (int inhandle, int inlen, pid_t *the_pid, char *command, ...)
{
return 0;
}
int
mc_doublepclose (int pipe, pid_t pid)
{
return 0;
}
/*hacks to get it compile, remove these after vfs works */
char *
vfs_get_current_dir (void)
{
return NULL;
}
int
vfs_current_is_extfs (void)
{
return 0;
}
int
vfs_file_is_ftp (char *filename)
{
return 0;
}
int
mc_utime (char *path, void *times)
{
return 0;
}
void
extfs_run (char *file)
{
return;
}
int
geteuid(void)
{
return 0;
}
int
mc_chdir(char *pathname)
{
APIRET ret;
register int lgh = strlen(pathname);
/* Set the current drive */
if (lgh == 0) {
return -1;
} else {
/* First set the default drive */
if (lgh > 1) {
if (pathname[1] == ':') {
ret = DosSetDefaultDisk(toupper(pathname[0]) - 'A' + 1);
}
}
/* After that, set the current dir! */
ret = DosSetCurrentDir(pathname);
}
return ret;
}
int
mc_chmod(char *pathName, int unxmode)
{
/* OS/2 does not need S_REG */
int os2Mode = unxmode & 0x0FFF;
return chmod(pathName, os2Mode);
}
static int
conv_os2_unx_rc(int os2rc)
{
int errCode;
switch (os2rc) {
case ERROR_FILE_NOT_FOUND:
case ERROR_PATH_NOT_FOUND:
case ERROR_FILENAME_EXCED_RANGE:
errCode = ENOENT;
break;
case ERROR_NOT_DOS_DISK:
case ERROR_SHARING_VIOLATION:
case ERROR_SHARING_BUFFER_EXCEEDED:
case ERROR_ACCESS_DENIED:
errCode = EACCES;
break;
case ERROR_INVALID_PARAMETER:
errCode = EINVAL;
break;
default:
errCode = EINVAL;
break;
}
return errCode;
}
int
mc_open (char *file, int flags, int pmode)
{
return open(file, (flags | O_BINARY), pmode);
}
int
mc_unlink(char *pathName)
{
/* Use OS/2 API to delete a file, if the file is set as read-only,
the file will be deleted without asking the user! */
APIRET rc;
rc = DosDelete(pathName);
if (!rc) {
return 0;
}
if (rc == ERROR_ACCESS_DENIED) {
chmod(pathName, (S_IREAD|S_IWRITE));
rc = DosDelete(pathName);
if (rc) {
errno = conv_os2_unx_rc(rc) ;
return -1;
} else {
return 0;
}
} else {
errno = conv_os2_unx_rc(rc) ;
return -1;
}
}
int
strncasecmp (char *s, char *d, int count)
{
register char result;
while (count > 0){
if (result = (0x20 | *s) - (0x20 | *d))
break;
if (!*s)
return 0;
s++;
d++;
count--;
}
return result;
}
FILE *
_popen(const char *cmd, const char *mode)
{
return NULL;
}
int
_pclose(FILE *file)
{
return 1;
}
char *
get_default_editor (void)
{
char *tmp;
APIRET rc;
char pathValue[5] = "PATH";
UCHAR searchResult[MC_MAXPATHLEN + 1];
/* EPM is not always be installed */
rc = DosSearchPath((SEARCH_IGNORENETERRS | SEARCH_ENVIRONMENT | SEARCH_CUR_DIRECTORY),
(PSZ) pathValue,
"EPM.EXE",
searchResult,
sizeof(searchResult));
if (rc != 0) {
/* The system editor is always there */
return strdup("e.exe");
} else {
/* Let it be searched from my_system */
return strdup("epm.exe");
}
}
/* get_default_shell
Get the default shell for the current hardware platform
TODO: Get the value of %OS2_SHELL% or %SHELL%: which one?
*/
char *
get_default_shell()
{
return getenv ("COMSPEC");
}
int
getpid (void)
{
return 0;
}
int
errno_dir_not_empty (int err)
{
if (err == ENOTEMPTY)
return 1;
return 0;
}
char *
get_mc_lib_dir ()
{
char *mchome = getenv("MCHOME");
if (!mchome) {
return "D:\\mc";
} else {
return mchome;
}
}
int get_user_rights (struct stat *buf)
{
return 2;
}
void init_groups (void)
{
}
void delete_groups (void)
{
}

Просмотреть файл

@ -1,3 +0,0 @@
Makefile
tkmc
gui.tcl

Просмотреть файл

@ -1,37 +0,0 @@
Sun Nov 22 22:23:20 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
* Makefile.in: added findme.o to LOBJS and filegui.o to OOBJS
Sun May 31 13:22:09 1998 Norbert Warmuth <k3190@fh-sw.de>
* Makefile.in: use @LIBVFS@ when referring to libvfs-mc.a
Thu May 14 02:03:57 1998 Norbert Warmuth <k3190@fh-sw.de>
* Makefile.in (EXTRALIBS): add @LINTL@
1998-04-10 Marc Ewing <marc@redhat.com>
* tkscreen.c: removed duplicate (conflicting) definition
of do_enter()
Fri Apr 3 12:14:08 1998 Norbert Warmuth <k3190@fh-sw.de>
* tkmenu.c (menubar_arrange, destroy_menu): Added small stubs in order
to make it compile.
* Makefile.in: Use tkmenu* instead of menu*
Fri Mar 20 18:41:40 1998 Norbert Warmuth <k3190@fh-sw.de>
* tkmain.c (x_init_dlg): added dummy function to make it
compile
Mon Mar 16 13:05:47 1998 Pavel Roskin <pavel_roskin@geocities.com>
* tkview.c: Include stdio.h; Minor spelling corrections added.
1998-03-04 Federico Mena Quintero <federico@nuclecu.unam.mx>
* tkconf.h (PORT_HAS_FILTER_CHANGED): New flag for conditional compilation.

Просмотреть файл

@ -1,155 +0,0 @@
srcdir = @srcdir@
VPATH = @srcdir@
rootdir = $(srcdir)/..
@MCFG@@MCF@
CFLAGS = $(XCFLAGS) @X_CFLAGS@
CPPFLAGS = $(XCPPFLAGS) @tk_includes@ -I$(vfsdir) -I$(slangdir) -DHAVE_X -DHAVE_TK
LDFLAGS = $(XLDFLAGS) @tk_libs@ @X_LIBS@
DEFS = $(XDEFS)
LIBS = -ltk -ltcl -lm @X_EXTRA_LIBS@ -lX11 @X_PRE_LIBS@ $(XLIBS) $(XLIB) @TERMNET@
EXTRALIBS = @LVFS@ @LSLANG@ @LEDIT@ @LINTL@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
TKSRCS = tkmain.c tkmenu.c tkscreen.c tkwidget.c mc.tcl tkkey.c tkview.c \
tkinfo.c gd.tcl
TKHDRS = tkmain.h tkscreen.h tkwidget.h tkinfo.h tkconf.h
GUIS = gui.dbits.tcl gui.display.tcl gui.findfile.tcl gui.hotlist.tcl \
gui.listbox.tcl gui.mfind.tcl gui.option.tcl gui.panelize.tcl \
gui.layout.tcl gui.quick_confirm.tcl gui.quick_file_mask_copy.tcl \
gui.quick_input.tcl gui.quick_vfs.tcl gui.sort.tcl gui.vfshot.tcl \
gui.quick_input_2.tcl gui.hotlist_new_entry.tcl \
gui.hotlist_new_group.tcl gui.movelist.tcl gui.quick_file_mask_move.tcl
#
# These objects from ../src do not depend on HAVE_X / HAVE_TK??
#
LOBJS = mad.o findme.o
#
# These objects from ../src do depend on HAVE_TK
#
OOBJS = main.o dlg.o screen.o widget.o wtools.o info.o layout.o boxes.o \
file.o find.o dialog.o help.o key.o chmod.o chown.o view.o \
panelize.o hotlist.o listmode.o background.o dir.o util.o \
win.o color.o profile.o user.o \
ext.o setup.o \
tree.o filegui.o\
subshell.o terms.o \
achown.o fsusage.o mountlist.o \
@XCURSES@ @REGEX_O@ complete.o command.o \
option.o cmd.o utilunix.o popt.o xslint.o
OBJS = $(LOBJS) $(OOBJS) \
tkmenu.o tkmain.o tkscreen.o tkwidget.o tkkey.o tkview.o \
tkinfo.o
#
# Distribution variables
#
DISTTK = Makefile.in $(TKSRCS) $(TKHDRS) $(GUIS)
.c.o:
$(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
all: @tkmc@
tkmc: checklinks
$(MAKE) mx
mx: @LIBVFS@ $(OBJS) @LIBSLANG@ @LIBEDIT_A@ gui.tcl
$(CC) $(LDFLAGS) -o tkmc $(OBJS) -L../vfs -L../slang -L../edit $(EXTRALIBS) $(LIBS)
touch mx
gui.tcl: $(GUIS)
for i in $(GUIS); do cat $(srcdir)/$$i; done > gui.tcl
@LIBVFS@:
cd ../vfs; $(MAKE) @LIBVFS@
@PCENTRULE@ -$(RMF) @LIBVFS@
@PCENTRULE@ $(LN_S) ../vfs/@LIBVFS@ .
libmcslang.a:
cd ../slang; $(MAKE) libmcslang.a
@PCENTRULE@ -$(RMF) libmcslang.a
@PCENTRULE@ $(LN_S) ../slang/libmcslang.a .
libedit.a:
cd ../edit; $(MAKE) libedit.a
@PCENTRULE@ -$(RMF) libedit.a
@PCENTRULE@ $(LN_S) ../edit/libedit.a .
checklinks:
@if test -f $(tkdir)/regex.c; then echo ok; \
else $(MAKE) sourcelinks; fi
@if test -f regex.o; then echo ok; else $(MAKE) links; fi
links:
for I in $(LOBJS); do $(RMF) $$I; $(LN_S) ../src/$$I $$I >/dev/null 2>&1; done; true
sourcelinks:
-cd $(tkdir); $(LN_S) ../src/*.[ch] . >/dev/null 2>&1; $(LN_S) ../src/*.inc .; true
cleansourcelinks:
-if test -f $(tkdir)/regex.c; then \
cd $(tkdir); find . \( -lname '*.[ch]' -o -lname '*.inc' \) | xargs $(RM); \
fi
check:
@echo no tests are supplied.
cross:
$(MAKE) CC=gcc-linux CPP="gcc-linux -E" \
CPPFLAGS="$(CPPFLAGS) -I/usr/local/lib/gcc-lib/i386-linux-linux/include/ncurses "
TAGS: $(TKSRCS)
etags $(TKSRCS)
clean:
$(RMF) @tkmc@ *.o core a.out mx @LIBVFS@ libedit.a libmcslang.a
realclean: clean
$(RMF) .depend
$(RMF) TAGS
$(RMF) *~
distclean: cleansourcelinks
-$(RMF) $(srcdir)/*~ $(srcdir)/*.o $(srcdir)/tkmc $(srcdir)/core
-$(RMF) $(srcdir)/a.out
-if test $(srcdir) = .; then $(MAKE) realclean; fi
-$(RMF) $(srcdir)/Makefile gui.tcl
distcopy:
for I in $(DISTTK); do $(CP) $(top_srcdir)/tk/$$I $(top_srcdir)/mc-$(VERSION)/tk; done
install: install_@tkmc@
install_:
install_tkmc: all
$(INSTALL_DATA) $(tkdir)/mc.tcl $(DESTDIR)$(libdir)/mc.tcl
$(INSTALL_DATA) gui.tcl $(DESTDIR)$(libdir)/gui.tcl
$(INSTALL_DATA) $(tkdir)/gd.tcl $(DESTDIR)$(libdir)/gd.tcl
$(INSTALL_PROGRAM) tkmc $(DESTDIR)$(bindir)/$(binprefix)tkmc
uninstall:
-$(RMF) $(DESTDIR)$(libdir)/mc.tcl
-$(RMF) $(DESTDIR)$(libdir)/gui.tcl
-$(RMF) $(DESTDIR)$(libdir)/gd.tcl
-$(RMF) $(DESTDIR)$(bindir)/$(binprefix)tkmc
depend dep: @tkdep@
tkdep: checklinks mcdep
fastdeploc: @fastdepslang@ @fastdepvfs@
# ***Dependencies***Do not edit***
@DOTDEPEND@
# ***End of dependencies***

752
tk/gd.tcl
Просмотреть файл

@ -1,752 +0,0 @@
#
# gd: the built in Midnight Commander GUI designer
# (C) 1996 the Free Software Foundation
# See the file COPYING for details
#
# Author: Miguel de Icaza
#
set min_width 10
set min_height 10
set dragging 0
set new_dialog 1
proc reset_counters {} {
global dialog_rows
global dialog_columns
global frame_count
global text_count
global line_count
set dialog_rows 4
set dialog_columns 4
set frame_count 0
set text_count 0
set line_count 0
}
#
# create a division
#
# what = { row, column }
# if visible then allow the user to add columns and make them visibles
#
proc create_division {root index what visible} {
global dialog_columns
global dialog_rows
set cn [expr $index*2]
if {$what == "row"} {
set owhat "column"
set width height
set stick we
} else {
set owhat "row"
set width width
set stick ns
}
set c \$dialog_${owhat}s
if {$visible} {
frame $root.$what@$cn -$width 3 -back gray -relief sunken -borderwidth 4
bind $root.$what@$cn <Enter> "$root.$what@$cn configure -back red"
bind $root.$what@$cn <Leave> "$root.$what@$cn configure -back gray"
bind $root.$what@$cn <ButtonRelease-1> "new_division $root $index $what"
} else {
frame $root.$what@$cn -$width 3
}
grid $root.$what@$cn -$what $cn -$owhat 0 -${what}span 1 -${owhat}span [expr $c*2] -sticky $stick
}
proc create_column {root column visible} {
create_division $root $column column $visible
}
proc create_row {root row visible} {
create_division $root $row row $visible
}
proc column_space {root column} {
global min_width
grid columnconfigure $root [expr $column*2+1] -minsize $min_width
}
proc row_space {root row} {
global min_height
grid rowconfigure $root [expr $row*2+1] -minsize $min_height
}
#
# When inserting a column or row, move all of the widgets after
# the insertion point
#
proc move_childs {root index what} {
global components
set pix [expr $index*2]
foreach i $components {
set info [grid info $root.$i]
set idx [lsearch $info -$what]
if {$idx >= 0} {
incr idx
set cp [lindex $info $idx]
if {$cp >= $pix} {
grid $root.$i -$what [expr $cp+2]
}
}
}
}
#
# Update the separators spans after a column or row has been added
#
proc reconfig_spans {root} {
global dialog_rows
global dialog_columns
for {set i 0} {$i <= $dialog_rows} {incr i} {
set j [expr $i*2]
grid $root.row@$j -columnspan [expr $dialog_columns*2]
}
for {set i 0} {$i <= $dialog_columns} {incr i} {
set j [expr $i*2]
grid $root.column@$j -rowspan [expr $dialog_rows*2]
}
}
proc new_division {root index what} {
global dialog_columns
global dialog_rows
set var [incr dialog_${what}s]
create_$what $root $var 1
${what}_space $root $var
reconfig_spans $root
move_childs $root $index $what
}
proc create_gui_canvas {frame} {
if {$frame == "."} { set base "" } else { set base $frame }
set bw $base.widgets
catch "frame $bw"
grid $bw -column 1 -row 1 -sticky nwse -padx 2 -pady 2 -ipady 12
}
proc create_workspace {frame} {
global dialog_rows
global dialog_columns
global env
global components
puts "Create_workspace llamado"
if {$frame == "."} { set base "" } else { set base $frame }
set bw $base.widgets
# If user wants to edit this, then the workspace has been already created.
if ![string compare .$env(MC_EDIT) $frame] {
return 0
}
create_gui_canvas $frame
$bw configure -relief sunken -borderwidth 2
canvas $base.h -back white -height 8 -relief sunken -borderwidth 2
canvas $base.v -back white -width 8 -relief sunken -borderwidth 2
grid $bw -column 1 -row 1 -sticky nwse -padx 2 -pady 2 -ipady 12
grid $base.h -column 1 -row 0 -sticky we
grid $base.v -column 0 -row 1 -sticky ns
for {set col 0} {$col <= $dialog_columns} {incr col} {
column_space $bw $col
create_column $bw $col 1
}
for {set row 0} {$row <= $dialog_rows} {incr row} {
row_space $bw $row
create_row $bw $row 1
}
}
proc get_stick {root widget} {
global props
set a $props(stick.n.$widget)
set b $props(stick.s.$widget)
set c $props(stick.e.$widget)
set d $props(stick.w.$widget)
return "$a$b$c$d"
}
#
# Callbacks for configuring widgets, frames and extra text
#
proc set_stick {root widget} {
if {$root == "."} { set base "" } else { set base $root }
grid $base.widgets.$widget -sticky [get_stick $root $widget]
}
proc make_sticky_button {root window widget sval} {
checkbutton $window.$sval -text $sval -variable props(stick.$sval.$widget) \
-command "set_stick $root $widget" -onvalue $sval -offvalue ""
}
#
# Configure a widget
#
proc config_widget {root widget} {
global components
global props
set w .config-$widget
toplevel $w
frame $w.f
make_sticky_button $root $w.f $widget n
make_sticky_button $root $w.f $widget s
make_sticky_button $root $w.f $widget e
make_sticky_button $root $w.f $widget w
label $w.f.l -text "Anchor"
pack $w.f.l $w.f.n $w.f.s $w.f.e $w.f.w
pack $w.f
}
proc make_radio_button {root window widget state} {
radiobutton $window.$state -text $state -variable frame_relief -value $state \
-command "$root.widgets.$widget configure -relief $state"
pack $window.$state
}
#
# Configure a frame
#
proc config_frame {root widget} {
set w .config-$widget
toplevel $w
make_radio_button $root $w $widget sunken
make_radio_button $root $w $widget groove
make_radio_button $root $w $widget ridge
make_radio_button $root $w $widget raised
}
proc set_text {root widget from} {
set text [.config-$widget.f.entry get]
puts "Texto: $text"
$root.widgets.$widget configure -text $text
}
proc config_text {root widget} {
config_widget $root $widget
entry .config-$widget.f.entry -text [lindex [$root.widgets.$widget configure -text] 4]
pack .config-$widget.f.entry
bind .config-$widget.f.entry <Return> "set_text $root $widget .config-$widget.f.entry"
}
proc config_line {root widget} {
# Nothing is configurable on a line.
}
proc reconfig_rows {root} {
global dialog_rows
global dialog_columns
for {set i 0} {$i < $dialog_rows} {incr i} {
set cn [expr $i*2]
grid $root.row@cn -columnspan [expr $dialog_columns*2+2]
}
}
#
# Set the column for a widget
#
proc set_widget_col {root w col} {
global dialog_columns
if {$root == "."} { set base "" } else { set base $root }
if {$col >= $dialog_columns} {
return
}
grid $base.widgets.$w -column [expr $col*2+1]
}
#
# Set the row for a widget
#
proc set_widget_row {root w row} {
global dialog_rows
if {$root == "."} { set base "" } else { set base $root }
if {$row >= $dialog_rows} {
return
}
grid $base.widgets.$w -row [expr $row*2+1]
}
#
# Set the number of spanning lines for a widget
#
proc set_span_col {root w n} {
if {$root == "."} { set base "" } else { set base $root }
grid $base.widgets.$w -columnspan [expr $n*2-1]
}
#
# Set the number of spanning rows for a widget
#
proc set_span_row {root w n} {
if {$root == "."} { set base "" } else { set base $root }
grid $base.widgets.$w -rowspan [expr $n*2-1]
}
proc set_sticky {root w s} {
global props
if {$root == "."} { set base "" } else { set base $root }
grid $base.widgets.$w -sticky $s
foreach stick_dir {n s w e} {
if [regexp $stick_dir $s] {
set props(stick.$stick_dir.$w) $stick_dir
}
}
}
#
# Start a drag
#
proc drag {root w x y} {
global dragging
global root_x
global root_y
if {$root == "."} { set base "" } else { set base $root }
if {!$dragging} {
set dragging 1
button $base.widgets.drag -text "$w"
}
place $base.widgets.drag -x [expr $x-$root_x] -y [expr $y-$root_y]
}
#
# Drop action
#
proc drop {root w x y} {
global root_x
global root_y
global dragging
if {$root == "."} { set base "" } else { set base $root }
set pos [grid location $base.widgets [expr $x-$root_x] [expr $y-$root_y]]
set col [expr [lindex $pos 0]/2]
set row [expr [lindex $pos 1]/2]
set_widget_row $root $w $row
set_widget_col $root $w $col
set dragging 0
catch "destroy $root.widgets.drag"
}
#
# Setup before the drag
#
proc button_press {root} {
global root_x
global root_y
if {$root == "."} { set base "" } else { set base $root }
set root_x [expr [winfo rootx $base.widgets]]
set root_y [expr [winfo rooty $base.widgets]]
}
#
# Extract a value from a {key value ...} list returned by Tk
#
proc extract_parameter {parameters key} {
return [lindex $parameters [expr [lsearch $parameters $key]+1]]
}
#
# Return the value of a variable stored in the props() array
#
proc get_prop {root win} {
global props
return $props($root.props.$win)
}
#
# Save the layout as defined by the user
#
proc save_gui {root dlg} {
global dialog_columns
global dialog_rows
global components
global frame_count
global text_count
global line_count
if {$root == "."} { set base "" } else { set base $root }
set file [open "gui$dlg.tcl" w]
puts $file "set props($dlg.columns) $dialog_columns"
puts $file "set props($dlg.rows) $dialog_rows"
puts $file "set props($dlg.frames) $frame_count"
puts $file "set props($dlg.texts) $text_count"
puts $file "set props($dlg.lines) $line_count"
set cnum [llength $components]
puts $file "set props($dlg.components) \"$components\""
puts $file "set props($dlg.count) $cnum"
# 1. dump components
foreach i $components {
set winfo [grid info $base.widgets.$i]
puts $file "set props($dlg.props.$i) \"$winfo\""
}
# 2. dump frames
for {set i 0} {$i < $frame_count} {incr i} {
set winfo [grid info $base.widgets.frame$i]
set relief [lindex [$base.widgets.frame$i configure -relief] end]
puts $file "set props($dlg.frame$i) \"$winfo\""
puts $file "set props($dlg.relief.frame$i) $relief"
}
# 3. dump texts
for {set i 0} {$i < $text_count} {incr i} {
set winfo [grid info $base.widgets.text$i]
set text [lindex [$base.widgets.text$i configure -text] end]
puts $file "set props($dlg.text$i) \"$winfo\""
puts $file "set props($dlg.text.text$i) \"$text\""
}
# 4. dump lines
for {set i 0} {$i < $line_count} {incr i} {
set winfo [grid info $base.widgets.line$i]
puts $file "set props($dlg.line$i) \"$winfo\""
}
close $file
}
#
# Setup the bindings for a given widget to make it drag and droppable
#
proc make_draggable {root wn short} {
bind $wn <ButtonPress-1> "button_press $root; update idletasks"
bind $wn <B1-Motion> "drag $root $short %X %Y; update idletasks"
bind $wn <ButtonRelease-1> "drop $root $short %X %Y; update idletasks"
}
#
# root, window name, what = { frame, text, widget }
#
proc make_config_button {root i what} {
if {$root == "."} { set base "" } else { set base $root }
frame .gui-widgets.$i
button .gui-widgets.$i.button -command "config_$what $root $i " -text "$i"
set spans [grid info $base.widgets.$i]
scale .gui-widgets.$i.scale-x -orient horizontal -from 1 -to 10 -label "span-x" \
-command "set_span_col $root $i"
scale .gui-widgets.$i.scale-y -orient horizontal -from 1 -to 10 -label "span-y" \
-command "set_span_row $root $i"
.gui-widgets.$i.scale-y set [expr 1+([lindex $spans [expr 1+[lsearch $spans -rowspan]]]-1)/2]
.gui-widgets.$i.scale-x set [expr 1+([lindex $spans [expr 1+[lsearch $spans -columnspan]]]-1)/2]
pack .gui-widgets.$i.button .gui-widgets.$i.scale-x .gui-widgets.$i.scale-y -side left
pack .gui-widgets.$i -side top
}
#
# Create a new border (these are widgets not known by mc)
#
proc new_border {root} {
global frame_count
if {$root == "."} { set base "" } else { set base $root }
set short frame$frame_count
set wn $base.widgets.$short
incr frame_count
# create the frame
frame $wn -relief sunken -borderwidth 2
grid $wn -row 1 -column 1 -columnspan 1 -rowspan 1 -sticky wens -padx 2 -pady 2
lower $wn
# drag and dropability
make_draggable $root $wn $short
# configurability
make_config_button $root $short frame
}
#
# Create a new line separator (these are widgets not known by mc)
#
proc new_line {root} {
global line_count
if {$root == "."} { set base "" } else { set base $root }
set short line$line_count
set wn $base.widgets.$short
incr line_count
# create the line
frame $wn -height 3 -bd 1 -relief sunken
grid $wn -row 1 -column 1 -columnspan 1 -rowspan 1 -sticky wens -padx 2 -pady 2
lower $wn
# drag and dropability
make_draggable $root $wn $short
# configurability
make_config_button $root $short line
}
#
# Create a new text (these are widgets not known by mc)
#
proc new_text {root} {
global text_count
if {$root == "."} { set base "" } else { set base $root }
set short text$text_count
set wn $base.widgets.$short
incr text_count
label $wn -text "Text..."
grid $wn -row 1 -column 1 -columnspan 1 -rowspan 1
make_draggable $root $wn $short
make_config_button $root $short text
}
#
# Start up the GUI designer
#
proc gui_design {root components} {
global props
global new_dialog
# May be created in layout_with_grid if reconfiguring
catch {toplevel .gui-widgets}
if {$root == "."} {
set base ""
} else {
set base $root
}
if {$new_dialog} {
reset_counters
}
# Work around Tk 4.1 bug
frame $base.widgets.bug-work-around
grid $base.widgets.bug-work-around -row 60 -column 60
foreach i $components {
set def_layout [catch "get_prop $root $i" val]
if {$def_layout} {
set_widget_col $root $i 0
set_widget_row $root $i 0
}
make_draggable $root $base.widgets.$i $i
make_config_button $root $i widget
}
frame .gui-widgets.buttons
button .gui-widgets.buttons.save -text "Save to: gui$root.tcl" -command "save_gui $root $root"
button .gui-widgets.buttons.abort -text "abort" -command "exit"
button .gui-widgets.buttons.newf -text "New border" -command "new_border $root"
button .gui-widgets.buttons.newl -text "New line" -command "new_line $root"
button .gui-widgets.buttons.newt -text "New text" -command "new_text $root"
pack\
.gui-widgets.buttons.save \
.gui-widgets.buttons.abort \
.gui-widgets.buttons.newf \
.gui-widgets.buttons.newt \
-side left -expand y
pack .gui-widgets.buttons
}
#
# Attempt to layout a grided dialog. If something fails, return 0
# to give the application the chance to run the GUI designer
#
proc layout_with_grid {dialog count} {
global props
global components
global min_width
global min_height
global env
global dialog_columns
global dialog_rows
global frame_count
global text_count
global line_count
global new_dialog
set expr "set saved_count \$props(.\$dialog.count)"
set new_dialog 1
if [catch "eval $expr"] {
puts "Calling editor, reason: count"
return 0
}
set bw .$dialog.widgets
if {$saved_count != $count} {
puts "Calling editor, reason: more widgets"
return 0
}
set new_dialog 0
# Check if the user wants to modify this dialog
if ![string compare $env(MC_EDIT) $dialog] {
set modify_dialog 1
toplevel .gui-widgets
} else {
set modify_dialog 0
}
# First, hack around the crash problem of Tk 4.2 beta 1
frame .$dialog.widgets.work-around
grid .$dialog.widgets.work-around -row 60 -column 60
set dialog_columns $props(.$dialog.columns)
set dialog_rows $props(.$dialog.rows)
for {set i 0} {$i <= $dialog_columns} {incr i} {
column_space $bw $i
create_column $bw $i $modify_dialog
}
for {set i 0} {$i <= $dialog_rows} {incr i} {
row_space $bw $i
create_row $bw $i $modify_dialog
}
grid .$dialog.widgets -column 0 -row 0 -ipadx 8 -ipady 8 -sticky nswe
# 1. Load the borders (first, because they may cover other widgets)
set frame_count $props(.$dialog.frames)
for {set i 0} {$i < $frame_count} {incr i} {
frame .$dialog.widgets.frame$i -relief $props(.$dialog.relief.frame$i) -borderwidth 2
eval grid .$dialog.widgets.frame$i "$props(.$dialog.frame$i)"
if {$modify_dialog} {
lower .$dialog.widgets.frame$i
make_draggable .$dialog .$dialog.widgets.frame$i frame$i
make_config_button .$dialog frame$i frame
}
}
# 1.1 Load the lines (before texts, since they may cover other widgets)
if {![catch {set line_count $props(.$dialog.lines)}]} {
for {set i 0} {$i < $line_count} {incr i} {
frame .$dialog.widgets.line$i -relief sunken -bd 1 -height 3
eval grid .$dialog.widgets.line$i "$props(.$dialog.line$i)"
if {$modify_dialog} {
lower .$dialog.widgets.line$i
make_draggable .$dialog .$dialog.widgets.line$i line$i
make_config_button .$dialog line$i line
}
}
}
# 2. Load the components
foreach i $components {
eval grid .$dialog.widgets.$i "$props(.$dialog.props.$i)"
raise .$dialog.widgets.$i
}
# 3 . Load the texts
set text_count $props(.$dialog.texts)
for {set i 0} {$i < $text_count} {incr i} {
label .$dialog.widgets.text$i -text $props(.$dialog.text.text$i)
eval grid .$dialog.widgets.text$i "$props(.$dialog.text$i)"
raise .$dialog.widgets.text$i
if {$modify_dialog} {
make_draggable .$dialog .$dialog.widgets.text$i text$i
# make_config_button .$dialog text$i text
}
}
if {$modify_dialog} {
puts "Calling editor, reason: modify_dialog set"
return 0
}
return 1
}
#
# For testing the GUI builder. Not used by the Midnight Commander
#
proc mc_create_buttons {root} {
if {$root == "."} { set base "" } else { set base $root }
button $base.widgets.button#1 -text "Oki\ndoki\nmy\friends"
button $base.widgets.button#2 -text "Cancel"
entry $base.widgets.entry#1
radiobutton $base.widgets.radio#1 -text "Primera opcion"
radiobutton $base.widgets.radio#2 -text "Segunda opcion"
radiobutton $base.widgets.radio#3 -text "Tercera opcion"
}
proc test_gui {} {
global components
button .a -text "A"
pack .a
toplevel .hola
create_gui_canvas .hola
set components {button#1 button#2 entry#1 radio#1 radio#2 radio#3}
mc_create_buttons .hola
if [layout_with_grid hola 6] {
puts corriendo
} else {
create_workspace .hola
gui_design .hola $components
}
}
# initialize
reset_counters
if ![info exists env(MC_EDIT)] {
set env(MC_EDIT) non-existant-toplevel-never-hit
}
if [catch {set x $mc_running}] { set mc_running 0 }
if {$use_separate_gui_files} {
if [catch "glob gui.*.tcl" files] {
set files ""
}
foreach i $files {
puts "loading $i..."
source $i
}
} else {
source $LIBDIR/gui.tcl
}
if {$mc_running == 0} {
test_gui
}

Просмотреть файл

@ -1,11 +0,0 @@
set props(.dbits.columns) 4
set props(.dbits.rows) 4
set props(.dbits.frames) 1
set props(.dbits.texts) 0
set props(.dbits.components) "c o r "
set props(.dbits.count) 3
set props(.dbits.props.c) "-in .dbits.widgets -column 9 -row 7 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.dbits.props.o) "-in .dbits.widgets -column 9 -row 3 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.dbits.props.r) "-in .dbits.widgets -column 3 -row 3 -columnspan 1 -rowspan 5 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.dbits.frame0) "-in .dbits.widgets -column 1 -row 1 -columnspan 5 -rowspan 9 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.dbits.relief.frame0) groove

Просмотреть файл

@ -1,16 +0,0 @@
set props(.display.columns) 4
set props(.display.rows) 8
set props(.display.frames) 2
set props(.display.texts) 0
set props(.display.components) "user-fmt-input mini-status mini-input ok-button cancel-button radio "
set props(.display.count) 6
set props(.display.props.user-fmt-input) "-in .display.widgets -column 5 -row 3 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky sw"
set props(.display.props.mini-status) "-in .display.widgets -column 3 -row 9 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.display.props.mini-input) "-in .display.widgets -column 5 -row 9 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.display.props.ok-button) "-in .display.widgets -column 3 -row 15 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.display.props.cancel-button) "-in .display.widgets -column 7 -row 15 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.display.props.radio) "-in .display.widgets -column 3 -row 3 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.display.frame0) "-in .display.widgets -column 1 -row 1 -columnspan 9 -rowspan 5 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.display.relief.frame0) groove
set props(.display.frame1) "-in .display.widgets -column 1 -row 7 -columnspan 9 -rowspan 5 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.display.relief.frame1) groove

Просмотреть файл

@ -1,17 +0,0 @@
set props(.findfile.columns) 5
set props(.findfile.rows) 6
set props(.findfile.frames) 1
set props(.findfile.texts) 0
set props(.findfile.components) "content ok tree cancel start label-start label-file label-cont name "
set props(.findfile.count) 9
set props(.findfile.props.content) "-in .findfile.widgets -column 5 -row 7 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.findfile.props.ok) "-in .findfile.widgets -column 3 -row 13 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.findfile.props.tree) "-in .findfile.widgets -column 5 -row 13 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.findfile.props.cancel) "-in .findfile.widgets -column 9 -row 13 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.findfile.props.start) "-in .findfile.widgets -column 5 -row 3 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.findfile.props.label-start) "-in .findfile.widgets -column 3 -row 3 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.findfile.props.label-file) "-in .findfile.widgets -column 3 -row 5 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.findfile.props.label-cont) "-in .findfile.widgets -column 3 -row 7 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.findfile.props.name) "-in .findfile.widgets -column 5 -row 5 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.findfile.frame0) "-in .findfile.widgets -column 1 -row 1 -columnspan 11 -rowspan 9 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.findfile.relief.frame0) groove

Просмотреть файл

@ -1,22 +0,0 @@
set props(.hotlist.columns) 9
set props(.hotlist.rows) 7
set props(.hotlist.frames) 2
set props(.hotlist.texts) 1
set props(.hotlist.components) "the-lab ct ad up cc g e r move listbox "
set props(.hotlist.count) 10
set props(.hotlist.props.the-lab) "-in .hotlist.widgets -column 5 -row 5 -columnspan 11 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.hotlist.props.ct) "-in .hotlist.widgets -column 3 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.hotlist.props.ad) "-in .hotlist.widgets -column 7 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.hotlist.props.up) "-in .hotlist.widgets -column 11 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.hotlist.props.cc) "-in .hotlist.widgets -column 15 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.hotlist.props.g) "-in .hotlist.widgets -column 3 -row 13 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.hotlist.props.e) "-in .hotlist.widgets -column 7 -row 13 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.hotlist.props.r) "-in .hotlist.widgets -column 11 -row 13 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.hotlist.props.move) "-in .hotlist.widgets -column 15 -row 13 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.hotlist.props.listbox) "-in .hotlist.widgets -column 1 -row 1 -columnspan 17 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.hotlist.frame0) "-in .hotlist.widgets -column 1 -row 3 -columnspan 17 -rowspan 5 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.hotlist.relief.frame0) groove
set props(.hotlist.frame1) "-in .hotlist.widgets -column 1 -row 9 -columnspan 17 -rowspan 7 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.hotlist.relief.frame1) groove
set props(.hotlist.text0) "-in .hotlist.widgets -column 3 -row 5 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky e"
set props(.hotlist.text.text0) "Directory path:"

Просмотреть файл

@ -1,15 +0,0 @@
set props(.hotlist_new_entry.columns) 4
set props(.hotlist_new_entry.rows) 5
set props(.hotlist_new_entry.frames) 1
set props(.hotlist_new_entry.texts) 0
set props(.hotlist_new_entry.components) "button-ok button-insert button-append label-pth input-pth label-lbl input-lbl "
set props(.hotlist_new_entry.count) 7
set props(.hotlist_new_entry.props.button-append) "-in .hotlist_new_entry.widgets -column 3 -row 12 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.hotlist_new_entry.props.button-insert) "-in .hotlist_new_entry.widgets -column 5 -row 12 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.hotlist_new_entry.props.button-cancel) "-in .hotlist_new_entry.widgets -column 7 -row 12 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky e"
set props(.hotlist_new_entry.props.label-pth) "-in .hotlist_new_entry.widgets -column 3 -row 7 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.hotlist_new_entry.props.input-pth) "-in .hotlist_new_entry.widgets -column 3 -row 9 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.hotlist_new_entry.props.label-lbl) "-in .hotlist_new_entry.widgets -column 3 -row 3 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.hotlist_new_entry.props.input-lbl) "-in .hotlist_new_entry.widgets -column 3 -row 5 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.hotlist_new_entry.frame0) "-in .hotlist_new_entry.widgets -column 1 -row 1 -columnspan 7 -rowspan 11 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.hotlist_new_entry.relief.frame0) groove

Просмотреть файл

@ -1,13 +0,0 @@
set props(.hotlist_new_group.columns) 4
set props(.hotlist_new_group.rows) 5
set props(.hotlist_new_group.frames) 1
set props(.hotlist_new_group.texts) 0
set props(.hotlist_new_group.components) "button-append button-insert button-cancel label input "
set props(.hotlist_new_group.count) 5
set props(.hotlist_new_group.props.button-append) "-in .hotlist_new_group.widgets -column 3 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.hotlist_new_group.props.button-insert) "-in .hotlist_new_group.widgets -column 5 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.hotlist_new_group.props.button-cancel) "-in .hotlist_new_group.widgets -column 7 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky e"
set props(.hotlist_new_group.props.label) "-in .hotlist_new_group.widgets -column 3 -row 3 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.hotlist_new_group.props.input) "-in .hotlist_new_group.widgets -column 3 -row 5 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.hotlist_new_group.frame0) "-in .hotlist_new_group.widgets -column 1 -row 1 -columnspan 7 -rowspan 7 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.hotlist_new_group.relief.frame0) groove

Просмотреть файл

@ -1,17 +0,0 @@
set props(.layout.columns) 7
set props(.layout.rows) 7
set props(.layout.frames) 1
set props(.layout.texts) 0
set props(.layout.components) "m p k v h o s c me "
set props(.layout.count) 9
set props(.layout.props.m) "-in .layout.widgets -column 3 -row 5 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.layout.props.p) "-in .layout.widgets -column 3 -row 7 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.layout.props.k) "-in .layout.widgets -column 3 -row 9 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.layout.props.v) "-in .layout.widgets -column 3 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.layout.props.h) "-in .layout.widgets -column 3 -row 13 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.layout.props.o) "-in .layout.widgets -column 11 -row 3 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.layout.props.s) "-in .layout.widgets -column 11 -row 7 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.layout.props.c) "-in .layout.widgets -column 11 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.layout.props.me) "-in .layout.widgets -column 3 -row 3 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.layout.frame0) "-in .layout.widgets -column 1 -row 1 -columnspan 5 -rowspan 15 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.layout.relief.frame0) groove

Просмотреть файл

@ -1,8 +0,0 @@
set props(.listbox.columns) 4
set props(.listbox.rows) 4
set props(.listbox.frames) 0
set props(.listbox.texts) 0
set props(.listbox.components) "c li "
set props(.listbox.count) 2
set props(.listbox.props.c) "-in .listbox.widgets -column 3 -row 5 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.listbox.props.li) "-in .listbox.widgets -column 3 -row 1 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"

Просмотреть файл

@ -1,19 +0,0 @@
set props(.mfind.columns) 7
set props(.mfind.rows) 10
set props(.mfind.frames) 2
set props(.mfind.texts) 0
set props(.mfind.components) "label-search button-chdir button-again start-stop button-quit button-view button-edit button-panelize listbox "
set props(.mfind.count) 9
set props(.mfind.props.label-search) "-in .mfind.widgets -column 5 -row 7 -columnspan 9 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.mfind.props.button-chdir) "-in .mfind.widgets -column 5 -row 15 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.mfind.props.button-again) "-in .mfind.widgets -column 7 -row 15 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.mfind.props.start-stop) "-in .mfind.widgets -column 9 -row 15 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.mfind.props.button-quit) "-in .mfind.widgets -column 11 -row 15 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.mfind.props.button-view) "-in .mfind.widgets -column 7 -row 17 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.mfind.props.button-edit) "-in .mfind.widgets -column 9 -row 17 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.mfind.props.button-panelize) "-in .mfind.widgets -column 5 -row 17 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.mfind.props.listbox) "-in .mfind.widgets -column 3 -row 3 -columnspan 13 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.mfind.frame0) "-in .mfind.widgets -column 3 -row 13 -columnspan 13 -rowspan 7 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.mfind.relief.frame0) groove
set props(.mfind.frame1) "-in .mfind.widgets -column 3 -row 5 -columnspan 13 -rowspan 5 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.mfind.relief.frame1) groove

Просмотреть файл

@ -1,14 +0,0 @@
set props(.movelist.columns) 9
set props(.movelist.rows) 7
set props(.movelist.frames) 1
set props(.movelist.texts) 0
set props(.movelist.components) "ct up cc g e listbox "
set props(.movelist.count) 6
set props(.movelist.props.ct) "-in .movelist.widgets -column 3 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.movelist.props.up) "-in .movelist.widgets -column 11 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.movelist.props.cc) "-in .movelist.widgets -column 15 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.movelist.props.g) "-in .movelist.widgets -column 3 -row 13 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.movelist.props.e) "-in .movelist.widgets -column 7 -row 13 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.movelist.props.listbox) "-in .movelist.widgets -column 1 -row 1 -columnspan 17 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.movelist.frame0) "-in .movelist.widgets -column 1 -row 9 -columnspan 17 -rowspan 7 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.movelist.relief.frame0) groove

Просмотреть файл

@ -1,36 +0,0 @@
set props(.option.columns) 9
set props(.option.rows) 13
set props(.option.frames) 3
set props(.option.texts) 0
set props(.option.components) "show-hidden mark-moves drop-menus mix-files fast-reload label-pause pause-radio label-other verbose shell-patt auto-save auto-menus view-int completion rotating lynx achown cd-follow safe-del button-ok button-save button-cancel label-panel show-backup "
set props(.option.count) 24
set props(.option.props.show-hidden) "-in .option.widgets -column 3 -row 7 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.option.props.mark-moves) "-in .option.widgets -column 3 -row 9 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.option.props.drop-menus) "-in .option.widgets -column 3 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.option.props.mix-files) "-in .option.widgets -column 3 -row 13 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.option.props.fast-reload) "-in .option.widgets -column 3 -row 15 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.option.props.label-pause) "-in .option.widgets -column 3 -row 19 -columnspan 1 -rowspan 3 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.option.props.pause-radio) "-in .option.widgets -column 3 -row 23 -columnspan 1 -rowspan 3 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.option.props.label-other) "-in .option.widgets -column 11 -row 1 -columnspan 1 -rowspan 3 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky sw"
set props(.option.props.verbose) "-in .option.widgets -column 11 -row 5 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.option.props.shell-patt) "-in .option.widgets -column 11 -row 7 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.option.props.auto-save) "-in .option.widgets -column 11 -row 9 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.option.props.auto-menus) "-in .option.widgets -column 11 -row 11 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.option.props.view-int) "-in .option.widgets -column 11 -row 13 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.option.props.completion) "-in .option.widgets -column 11 -row 15 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.option.props.rotating) "-in .option.widgets -column 15 -row 5 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.option.props.lynx) "-in .option.widgets -column 15 -row 7 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.option.props.achown) "-in .option.widgets -column 15 -row 9 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.option.props.cd-follow) "-in .option.widgets -column 15 -row 11 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.option.props.safe-del) "-in .option.widgets -column 15 -row 13 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.option.props.button-ok) "-in .option.widgets -column 13 -row 25 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.option.props.button-save) "-in .option.widgets -column 15 -row 25 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.option.props.button-cancel) "-in .option.widgets -column 17 -row 25 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.option.props.label-panel) "-in .option.widgets -column 3 -row 1 -columnspan 1 -rowspan 3 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky sw"
set props(.option.props.show-backup) "-in .option.widgets -column 3 -row 5 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.option.frame0) "-in .option.widgets -column 9 -row 3 -columnspan 11 -rowspan 15 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.option.relief.frame0) ridge
set props(.option.frame1) "-in .option.widgets -column 1 -row 3 -columnspan 7 -rowspan 15 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.option.relief.frame1) ridge
set props(.option.frame2) "-in .option.widgets -column 1 -row 21 -columnspan 7 -rowspan 7 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.option.relief.frame2) ridge

Просмотреть файл

@ -1,13 +0,0 @@
set props(.panelize.columns) 7
set props(.panelize.rows) 7
set props(.panelize.frames) 0
set props(.panelize.texts) 0
set props(.panelize.components) "label-command in p r a c li "
set props(.panelize.count) 7
set props(.panelize.props.label-command) "-in .panelize.widgets -column 3 -row 7 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.panelize.props.in) "-in .panelize.widgets -column 5 -row 7 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.panelize.props.p) "-in .panelize.widgets -column 3 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.panelize.props.r) "-in .panelize.widgets -column 5 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.panelize.props.a) "-in .panelize.widgets -column 7 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.panelize.props.c) "-in .panelize.widgets -column 11 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.panelize.props.li) "-in .panelize.widgets -column 3 -row 3 -columnspan 9 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"

Просмотреть файл

@ -1,13 +0,0 @@
set props(.quick_confirm.columns) 5
set props(.quick_confirm.rows) 7
set props(.quick_confirm.frames) 1
set props(.quick_confirm.texts) 0
set props(.quick_confirm.components) "ov e o c de "
set props(.quick_confirm.count) 5
set props(.quick_confirm.props.ov) "-in .quick_confirm.widgets -column 5 -row 7 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_confirm.props.e) "-in .quick_confirm.widgets -column 5 -row 9 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_confirm.props.o) "-in .quick_confirm.widgets -column 5 -row 15 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.quick_confirm.props.c) "-in .quick_confirm.widgets -column 9 -row 15 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.quick_confirm.props.de) "-in .quick_confirm.widgets -column 5 -row 5 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_confirm.frame0) "-in .quick_confirm.widgets -column 3 -row 3 -columnspan 7 -rowspan 9 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.quick_confirm.relief.frame0) groove

Просмотреть файл

@ -1,18 +0,0 @@
set props(.quick_file_mask_copy.columns) 7
set props(.quick_file_mask_copy.rows) 6
set props(.quick_file_mask_copy.frames) 0
set props(.quick_file_mask_copy.texts) 0
set props(.quick_file_mask_copy.components) "input-def using-shell to follow dive preserve ok back cancel ql input2 stab-sym "
set props(.quick_file_mask_copy.count) 12
set props(.quick_file_mask_copy.props.input-def) "-in .quick_file_mask_copy.widgets -column 3 -row 3 -columnspan 7 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.quick_file_mask_copy.props.using-shell) "-in .quick_file_mask_copy.widgets -column 11 -row 3 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.quick_file_mask_copy.props.to) "-in .quick_file_mask_copy.widgets -column 1 -row 5 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_file_mask_copy.props.follow) "-in .quick_file_mask_copy.widgets -column 3 -row 9 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_file_mask_copy.props.dive) "-in .quick_file_mask_copy.widgets -column 3 -row 10 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_file_mask_copy.props.preserve) "-in .quick_file_mask_copy.widgets -column 9 -row 9 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_file_mask_copy.props.stab-sym) "-in .quick_file_mask_copy.widgets -column 9 -row 10 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_file_mask_copy.props.ok) "-in .quick_file_mask_copy.widgets -column 3 -row 14 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.quick_file_mask_copy.props.back) "-in .quick_file_mask_copy.widgets -column 7 -row 14 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.quick_file_mask_copy.props.cancel) "-in .quick_file_mask_copy.widgets -column 11 -row 14 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.quick_file_mask_copy.props.ql) "-in .quick_file_mask_copy.widgets -column 1 -row 1 -columnspan 7 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_file_mask_copy.props.input2) "-in .quick_file_mask_copy.widgets -column 3 -row 7 -columnspan 7 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"

Просмотреть файл

@ -1,16 +0,0 @@
set props(.quick_file_mask_move.columns) 7
set props(.quick_file_mask_move.rows) 6
set props(.quick_file_mask_move.frames) 0
set props(.quick_file_mask_move.texts) 0
set props(.quick_file_mask_move.components) "input-def using-shell to follow dive ok back cancel ql input2 "
set props(.quick_file_mask_move.count) 10
set props(.quick_file_mask_move.props.input-def) "-in .quick_file_mask_move.widgets -column 3 -row 3 -columnspan 7 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.quick_file_mask_move.props.using-shell) "-in .quick_file_mask_move.widgets -column 11 -row 3 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.quick_file_mask_move.props.to) "-in .quick_file_mask_move.widgets -column 1 -row 5 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_file_mask_move.props.dive) "-in .quick_file_mask_move.widgets -column 3 -row 9 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_file_mask_move.props.stab-sym) "-in .quick_file_mask_move.widgets -column 9 -row 9 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_file_mask_move.props.ok) "-in .quick_file_mask_move.widgets -column 3 -row 13 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.quick_file_mask_move.props.back) "-in .quick_file_mask_move.widgets -column 7 -row 13 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.quick_file_mask_move.props.cancel) "-in .quick_file_mask_move.widgets -column 11 -row 13 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.quick_file_mask_move.props.ql) "-in .quick_file_mask_move.widgets -column 1 -row 1 -columnspan 7 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_file_mask_move.props.input2) "-in .quick_file_mask_move.widgets -column 3 -row 7 -columnspan 7 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"

Просмотреть файл

@ -1,12 +0,0 @@
set props(.quick_input.columns) 3
set props(.quick_input.rows) 5
set props(.quick_input.frames) 1
set props(.quick_input.texts) 0
set props(.quick_input.components) "button-ok button-cancel label inp "
set props(.quick_input.count) 4
set props(.quick_input.props.button-ok) "-in .quick_input.widgets -column 3 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_input.props.button-cancel) "-in .quick_input.widgets -column 5 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky e"
set props(.quick_input.props.label) "-in .quick_input.widgets -column 3 -row 3 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_input.props.inp) "-in .quick_input.widgets -column 3 -row 5 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.quick_input.frame0) "-in .quick_input.widgets -column 1 -row 1 -columnspan 7 -rowspan 7 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.quick_input.relief.frame0) groove

Просмотреть файл

@ -1,28 +0,0 @@
set props(.quick_input_2.columns) 3
set props(.quick_input_2.rows) 5
set props(.quick_input_2.frames) 1
set props(.quick_input_2.texts) 0
set props(.quick_input_2.components) "button-ok button-cancel label-lbl input-lbl label-pth input-pth "
set props(.quick_input_2.count) 6
set props(.quick_input_2.props.button-ok) "-in .quick_input_2.widgets -column 3 -row 12 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_input_2.props.button-cancel) "-in .quick_input_2.widgets -column 5 -row 12 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky e"
set props(.quick_input_2.props.label-lbl) "-in .quick_input_2.widgets -column 3 -row 3 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_input_2.props.input-lbl) "-in .quick_input_2.widgets -column 3 -row 5 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.quick_input_2.props.label-pth) "-in .quick_input_2.widgets -column 3 -row 7 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_input_2.props.input-pth) "-in .quick_input_2.widgets -column 3 -row 9 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.quick_input_2.frame0) "-in .quick_input_2.widgets -column 1 -row 1 -columnspan 7 -rowspan 11 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.quick_input_2.relief.frame0) groove
set props(.quick_input_2.columns) 3
set props(.quick_input_2.rows) 5
set props(.quick_input_2.frames) 1
set props(.quick_input_2.texts) 0
set props(.quick_input_2.components) "button-ok button-cancel label-pth input-pth label-lbl input-lbl "
set props(.quick_input_2.count) 6
set props(.quick_input_2.props.button-ok) "-in .quick_input_2.widgets -column 3 -row 12 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_input_2.props.button-cancel) "-in .quick_input_2.widgets -column 5 -row 12 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky e"
set props(.quick_input_2.props.label-pth) "-in .quick_input_2.widgets -column 3 -row 7 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_input_2.props.input-pth) "-in .quick_input_2.widgets -column 3 -row 9 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.quick_input_2.props.label-lbl) "-in .quick_input_2.widgets -column 3 -row 3 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_input_2.props.input-lbl) "-in .quick_input_2.widgets -column 3 -row 5 -columnspan 3 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.quick_input_2.frame0) "-in .quick_input_2.widgets -column 1 -row 1 -columnspan 7 -rowspan 11 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.quick_input_2.relief.frame0) groove

Просмотреть файл

@ -1,27 +0,0 @@
set props(.quick_vfs.columns) 5
set props(.quick_vfs.rows) 14
set props(.quick_vfs.frames) 3
set props(.quick_vfs.texts) 0
set props(.quick_vfs.components) "check-ftp-proxy label-sec2 label-tar radio input-limit label-pass input-passwd label-cache input-timeout label-sec input-ftp-proxy button-ok button-cancel label-vfs input-timo-vfs "
set props(.quick_vfs.count) 15
set props(.quick_vfs.props.label-sec2) "-in .quick_vfs.widgets -column 7 -row 3 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_vfs.props.label-tar) "-in .quick_vfs.widgets -column 3 -row 9 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky e"
set props(.quick_vfs.props.radio) "-in .quick_vfs.widgets -column 3 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky e"
set props(.quick_vfs.props.input-limit) "-in .quick_vfs.widgets -column 5 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky sw"
set props(.quick_vfs.props.label-pass) "-in .quick_vfs.widgets -column 3 -row 17 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky e"
set props(.quick_vfs.props.input-passwd) "-in .quick_vfs.widgets -column 5 -row 17 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.quick_vfs.props.label-cache) "-in .quick_vfs.widgets -column 3 -row 19 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky e"
set props(.quick_vfs.props.input-timeout) "-in .quick_vfs.widgets -column 5 -row 19 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.quick_vfs.props.label-sec) "-in .quick_vfs.widgets -column 7 -row 19 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_vfs.props.input-ftp-proxy) "-in .quick_vfs.widgets -column 5 -row 21 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.quick_vfs.props.check-ftp-proxy) "-in .quick_vfs.widgets -column 3 -row 21 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.quick_vfs.props.button-ok) "-in .quick_vfs.widgets -column 3 -row 27 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.quick_vfs.props.button-cancel) "-in .quick_vfs.widgets -column 5 -row 27 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.quick_vfs.props.label-vfs) "-in .quick_vfs.widgets -column 3 -row 3 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky e"
set props(.quick_vfs.props.input-timo-vfs) "-in .quick_vfs.widgets -column 5 -row 3 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.quick_vfs.frame0) "-in .quick_vfs.widgets -column 1 -row 1 -columnspan 9 -rowspan 5 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.quick_vfs.relief.frame0) groove
set props(.quick_vfs.frame1) "-in .quick_vfs.widgets -column 1 -row 7 -columnspan 9 -rowspan 7 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.quick_vfs.relief.frame1) groove
set props(.quick_vfs.frame2) "-in .quick_vfs.widgets -column 1 -row 15 -columnspan 9 -rowspan 9 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.quick_vfs.relief.frame2) groove

Просмотреть файл

@ -1,13 +0,0 @@
set props(.sort.columns) 5
set props(.sort.rows) 6
set props(.sort.frames) 1
set props(.sort.texts) 0
set props(.sort.components) "reverse-check case-check ok-button cancel-button radio-1 "
set props(.sort.count) 5
set props(.sort.props.reverse-check) "-in .sort.widgets -column 7 -row 5 -columnspan 5 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky nw"
set props(.sort.props.case-check) "-in .sort.widgets -column 7 -row 3 -columnspan 5 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky sw"
set props(.sort.props.ok-button) "-in .sort.widgets -column 9 -row 9 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.sort.props.cancel-button) "-in .sort.widgets -column 9 -row 11 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky ew"
set props(.sort.props.radio-1) "-in .sort.widgets -column 3 -row 3 -columnspan 1 -rowspan 9 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.sort.frame0) "-in .sort.widgets -column 1 -row 1 -columnspan 5 -rowspan 13 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.sort.relief.frame0) groove

Просмотреть файл

@ -1,14 +0,0 @@
set props(.vfshot.columns) 8
set props(.vfshot.rows) 7
set props(.vfshot.frames) 1
set props(.vfshot.texts) 1
set props(.vfshot.components) "the-lab ct cc listbox "
set props(.vfshot.count) 4
set props(.vfshot.props.the-lab) "-in .vfshot.widgets -column 5 -row 7 -columnspan 9 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky w"
set props(.vfshot.props.ct) "-in .vfshot.widgets -column 5 -row 13 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.vfshot.props.cc) "-in .vfshot.widgets -column 11 -row 13 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.vfshot.props.listbox) "-in .vfshot.widgets -column 1 -row 1 -columnspan 15 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky {}"
set props(.vfshot.frame0) "-in .vfshot.widgets -column 1 -row 5 -columnspan 15 -rowspan 5 -ipadx 0 -ipady 0 -padx 2 -pady 2 -sticky nesw"
set props(.vfshot.relief.frame0) groove
set props(.vfshot.text0) "-in .vfshot.widgets -column 3 -row 7 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky e"
set props(.vfshot.text.text0) "Directory path:"

1383
tk/mc.tcl

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,20 +0,0 @@
/* Defines which features are used on the Tk edition */
/* key.h defines */
#define PORT_HAS_FILE_HANDLERS 1
#define PORT_HAS_GETCH 1
#define PORT_HAS_FRONTEND_RUN_DLG 1
#define PORT_WANTS_GET_SORT_FN 1
#define PORT_HAS_FILTER_CHANGED 1
#define PORT_HAS_PANEL_ADJUST_TOP_FILE 1
#define PORT_HAS_PANEL_RESET_SORT_LABELS 1
#define PORT_HAS_DESTROY_CMD 1
#define PORT_HAS_RADIO_FOCUS_ITEM 1
#define PORT_HAS_DISPLAY_MINI_INFO 1
#define PORT_WIDGET_WANTS_HISTORY 1
#define frontend_run_dlg(x) tkrundlg_event (x)
#define port_shutdown_extra_fds()
/* Other */
#define COMPUTE_FORMAT_ALLOCATIONS

Просмотреть файл

@ -1,117 +0,0 @@
/* Midnight Commander Tk Information display
Copyright (C) 1995 Miguel de Icaza
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
#include "fs.h"
#include "dlg.h"
#include "widget.h"
#include "info.h"
#include "win.h"
#include "tkmain.h"
/* The following three include files are needed for cpanel */
#include "main.h"
#include "dir.h"
#include "panel.h"
/* Create the Tk widget */
void
x_create_info (Dlg_head *h, widget_data parent, WInfo *info)
{
char *cmd;
widget_data container = info->widget.wcontainer;
cmd = tk_new_command (container, info, 0, 'o');
tk_evalf ("newinfo %s %s " VERSION, (char *)container,
wtk_win (info->widget));
}
/* Updates the information on the Tk widgets */
void
x_show_info (WInfo *info, struct my_statfs *s, struct stat *b)
{
char bsize [17];
char avail_buf [17], total_buf [17];
char *mod, *acc, *cre;
char *fname;
int have_space, have_nodes;
int space_percent;
int ispace_percent;
fname = cpanel->dir.list [cpanel->selected].fname;
sprint_bytesize (bsize, b->st_size, 0);
mod = strdup (file_date (b->st_mtime));
acc = strdup (file_date (b->st_atime));
cre = strdup (file_date (b->st_ctime));
/* Do we have information on space/inodes? */
have_space = s->avail > 0 || s->total > 0;
have_nodes = s->nfree > 0 || s->nodes > 0;
/* Compute file system usage */
sprint_bytesize (avail_buf, s->avail, 1);
sprint_bytesize (total_buf, s->total, 1);
space_percent = s->total
? 100 * s->avail / s->total : 0;
/* inode percentage use */
ispace_percent = s->total ? 100 * s->nfree / s->nodes : 0;
tk_evalf ("info_update %s.b {%s} %X %X " /* window fname dev ino */
"{%s} %o " /* mode mode_oct */
"%d %s %s " /* links owner group */
#ifdef HAVE_ST_BLOCKS
#define BLOCKS b->st_blocks
"1 %d " /* have_blocks blocks */
#else
#define BLOCKS 0
"0 %d " /* have_blocks blocks */
#endif
"{%s} " /* size */
#ifdef HAVE_RDEV
#define RDEV b->st_rdev
"1 %d %d " /* have_rdev rdev rdev2 */
#else
#define RDEV 0
"0 %d %d " /* have_rdev rdev rdev2 */
#endif
"{%s} {%s} {%s} " /* create modify access */
"{%s} {%s} {%s} " /* fsys dev type */
"%d {%s} %d {%s} " /* have_space avail percent total */
"%d %d %d %d", /* have_ino nfree inoperc inotot */
wtk_win (info->widget), fname,
b->st_dev, b->st_ino,
string_perm (b->st_mode), b->st_mode & 07777,
b->st_nlink, get_owner (b->st_uid), get_group (b->st_gid),
BLOCKS,
bsize,
RDEV >> 8, RDEV & 0xff,
cre, mod, acc,
s->mpoint, s->device, s->typename,
have_space, avail_buf, space_percent, total_buf,
have_nodes, s->nfree, ispace_percent, s->nodes);
free (mod);
free (acc);
free (cre);
}

Просмотреть файл

@ -1,7 +0,0 @@
#ifndef __TKINFO_H
#define __TKINFO_H
void x_create_info (Dlg_head *h, widget_data parent, WInfo *info);
void x_show_info (WInfo *info, struct my_statfs *s, struct stat *b);
#endif /* __TKINFO_H */

Просмотреть файл

@ -1,121 +0,0 @@
/* Midnight Commander Tk initialization.
Copyright (C) 1995 Miguel de Icaza
Copyright (C) 1995 Jakub Jelinek
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <config.h>
#include "tkmain.h"
#include "tty.h" /* If you wonder why, read the comment below */
#include "key.h"
/* The tty.h file is included since we try to use as much object code
* from the curses distribution as possible so we need to send back
* the same constants that the code expects on the non-X version
* of the code. The constants may be the ones from curses/ncurses
* or our macro definitions for slang
*/
/* Describes the key code and the keysym name returned by X
* In case we found many keyboard problems with the Fnn keys
* we can allways remove them and put them on the mc.tcl file
* as local bindings
*/
static key_code_name_t x_keys [] = {
{ KEY_LEFT, "Left" },
{ KEY_RIGHT, "Right" },
{ KEY_UP, "Up" },
{ KEY_DOWN, "Down" },
{ KEY_END, "End" },
{ KEY_END, "R13" },
{ KEY_HOME, "Home" },
{ KEY_HOME, "F27" },
{ KEY_PPAGE, "F29" },
{ KEY_PPAGE, "Prior" },
{ KEY_NPAGE, "Next" },
{ KEY_NPAGE, "F35" },
{ '\n', "Return" },
{ '\n', "KP_Enter" },
#if 0
{ KEY_DC, "Delete" },
#else
{ KEY_BACKSPACE, "Delete" },
#endif
{ KEY_IC, "Insert" },
{ KEY_BACKSPACE, "BackSpace" },
{ KEY_F(1), "F1" },
{ KEY_F(2), "F2" },
{ KEY_F(3), "F3" },
{ KEY_F(4), "F4" },
{ KEY_F(5), "F5" },
{ KEY_F(6), "F6" },
{ KEY_F(7), "F7" },
{ KEY_F(8), "F8" },
{ KEY_F(9), "F9" },
{ KEY_F(10), "F10" },
{ 0, 0} /* terminator */
};
int lookup_keysym (char *s)
{
int i;
for (i = 0; x_keys [i].name; i++){
if (!strcmp (s, x_keys [i].name))
return (x_keys [i].code);
}
return 0;
}
#if TCL_MAJOR_VERSION > 7
/* Tcl 8.xx support */
void add_select_channel (int fd, select_fn callback, void *info)
{
Tcl_CreateFileHandler (fd, TCL_READABLE, (Tcl_FileProc *) callback, 0);
}
void delete_select_channel (int fd)
{
Tcl_DeleteFileHandler (fd);
}
#else
/* Tcl 7.xx support */
void add_select_channel (int fd, select_fn callback, void *info)
{
Tcl_File handle;
handle = Tcl_GetFile ((ClientData) fd, TCL_UNIX_FD);
Tcl_CreateFileHandler (handle, TCL_READABLE, (Tcl_FileProc *) callback, 0);
}
void delete_select_channel (int fd)
{
Tcl_File handle;
handle = Tcl_GetFile ((ClientData) fd, TCL_UNIX_FD);
Tcl_DeleteFileHandler (handle);
Tcl_FreeFile (handle);
}
#endif
int
mi_getch ()
{
return tk_getch();
}

Просмотреть файл

@ -1,488 +0,0 @@
/* Midnight Commander Tk initialization and main loop
Copyright (C) 1995, 1997 Miguel de Icaza
Copyright (C) 1995 Jakub Jelinek
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/*
* The Tk version of the code tries to use as much code as possible
* from the curses version of the code, so we Tk as barely as possible
* and manage most of the events ourselves. This may cause some
* confusion at the beginning.
*/
#include <config.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include "main.h"
#include "tkmain.h"
#include "key.h"
#include "global.h"
#include "tty.h" /* for KEY_BACKSPACE */
/* Tcl interpreter */
Tcl_Interp *interp;
/* if true, it's like mc, otherwise is like mxc */
int use_one_window = 1;
static char *display = NULL;
/* Used to quote the next character, emulates mi_getch () */
static int mi_getch_waiting = 0;
static int mi_getch_value;
static Tk_ArgvInfo arg_table[] = {
{"-display", TK_ARGV_STRING, (char *) NULL, (char *) &display,
"Display to use"},
{(char *) NULL, TK_ARGV_END, (char *) NULL, (char *) NULL,
(char *) NULL}
};
static int tkmc_callback (ClientData cd, Tcl_Interp *i, int ac, char *av[]);
char *ALPHA =
"\n\n"
"\n\t\t\t*** IMPORTANT ***\n\n"
"The Tk edition of the Midnight Commander is an ALPHA release of the code.\n\n"
"Many features are missing and in general, not all of the features that\n"
"are available in the text mode version of the program are available on\n"
"this edition.\n\n"
"The internal viewer is incomplete, the built-in editor does not work\n"
"the Tree widget does not work, the Info Widget is incomplete, the setup\n"
"code is incomplete, the keybindings are incomplete, and little testing\n"
"has been done in this code. ** This is not a finished product **\n\n"
"Feel free to send fixes to mc-devel@nuclecu.unam.mx\n\n\n";
int
xtoolkit_init (int *argc, char *argv[])
{
interp = Tcl_CreateInterp ();
if (Tk_ParseArgv (interp, (Tk_Window) NULL, argc, argv, arg_table, 0)
!= TCL_OK) {
fprintf(stderr, "%s\n", interp->result);
exit(1);
}
printf (ALPHA);
COLS = 80;
LINES = 25;
/* Pass DISPLAY variable to child procedures */
if (display != NULL) {
Tcl_SetVar2 (interp, "env", "DISPLAY", display, TCL_GLOBAL_ONLY);
}
Tcl_SetVar(interp, "tcl_interactive", "0", TCL_GLOBAL_ONLY);
Tcl_SetVar (interp, "LIBDIR", mc_home, TCL_GLOBAL_ONLY);
Tcl_SetVar (interp, "mc_running", "1", TCL_GLOBAL_ONLY);
Tcl_SetVar(interp, "one_window",
use_one_window ? "1" : "0", TCL_GLOBAL_ONLY);
/*
* Initialize the Tk application.
*/
#ifdef OLD_VERSION
tkwin = Tk_CreateMainWindow (interp, display, "Midnight Commander","tkmc");
#endif
/* #define HAVE_BLT */
if (Tcl_Init (interp) != TCL_OK){
fprintf (stderr, "Tcl_Init: %s\n", interp->result);
exit (1);
}
if (Tk_Init (interp) != TCL_OK){
fprintf (stderr, "Tk_Init: %s\n", interp->result);
exit (1);
}
#ifdef HAVE_BLT
give an error here
if (Blt_DragDropInit (interp) != TCL_OK){
fprintf (stderr, "Blt_DragDropInit: %s\n", interp->result);
exit (1);
}
Tcl_SetVar (interp, "have_blt", "1", TCL_GLOBAL_ONLY);
#else
Tcl_SetVar (interp, "have_blt", "0", TCL_GLOBAL_ONLY);
#endif
Tcl_CreateCommand (interp, "tkmc", tkmc_callback, 0, 0);
{
char *mc_tcl = concat_dir_and_file (mc_home, "mc.tcl");
if (Tcl_EvalFile (interp, mc_tcl) == TCL_OK){
free (mc_tcl);
return 0;
} else {
printf ("%s\n", interp->result);
exit (1);
}
}
}
int
xtoolkit_end (void)
{
/* Cleanup */
Tcl_Eval (interp, "exit");
return 1;
}
void
tk_evalf (char *format, ...)
{
va_list ap;
char buffer [1024];
va_start (ap, format);
vsprintf (buffer, format, ap);
if (Tcl_Eval (interp, buffer) != TCL_OK){
fprintf (stderr, "[%s]: %s\n", buffer, interp->result);
}
va_end (ap);
}
int
tk_evalf_val (char *format, ...)
{
va_list ap;
char buffer [1024];
int r;
va_start (ap, format);
vsprintf (buffer, format, ap);
r = Tcl_Eval (interp, buffer);
va_end (ap);
return r;
}
widget_data
xtoolkit_create_dialog (Dlg_head *h, int flags)
{
char *dialog_name = copy_strings (".", h->name, 0);
tk_evalf ("toplevel %s", dialog_name);
h->grided = flags & DLG_GRID;
if (h->grided)
tk_evalf ("create_gui_canvas %s", dialog_name);
return (widget_data) dialog_name;
}
void
x_set_dialog_title (Dlg_head *h, char *title)
{
tk_evalf ("wm title %s {%s}", (char *)(h->wdata), title);
}
widget_data
xtoolkit_get_main_dialog (Dlg_head *h)
{
return (widget_data) strdup (".");
}
/* Creates the containers */
widget_data
x_create_panel_container (int which)
{
char *s, *cmd;
cmd = use_one_window ? "frame" : "toplevel";
s = which ? ".right" : ".left";
tk_evalf ("%s %s", cmd, s);
s = which ? ".right.canvas" : ".left.canvas";
tk_evalf ("create_container %s", s);
return (widget_data) s;
}
void
x_panel_container_show (widget_data wdata)
{
}
static int
do_esc_key (int d)
{
if (isdigit(d))
return KEY_F(d-'0');
if ((d >= 'a' && d <= 'z') || (d >= 'A' && d <= 'Z' )
|| d == '\n' || d == '\t' || d == XCTRL ('h') || d == '!'
|| d == KEY_BACKSPACE || d == 127 || d == '\r')
return ALT(d);
else {
return ESC_CHAR;
}
}
/* This commands has this sintax:
* [r|a|c] ascii
*
* r, a, c, k: regular, alt, control, keysym
*/
static int
tkmc_callback (ClientData cd, Tcl_Interp *i, int ac, char *av[])
{
Dlg_head *h = current_dlg;
int key;
static int got_esc;
key = av [2][0];
/* Control or alt keys? */
if (av [1][0] == 'c' || av [1][0] == 'a'){
if (!key)
return TCL_OK;
/* Regular? */
if (!isascii (key)){
return TCL_OK;
} else {
key = tolower (key);
}
}
switch (av [1][0]){
case 'a':
key = ALT(key);
break;
case 'c':
key = XCTRL(key);
break;
case 'r':
if (!key)
return TCL_OK;
break;
case 'k':
if (!(key = lookup_keysym (av [2])))
return TCL_OK;
break;
case 'e':
key = ESC_CHAR;
dlg_key_event (h, key);
update_cursor (h);
return TCL_OK;
}
if (key == '\r')
key = '\n';
if (key == ESC_CHAR){
if (!got_esc){
got_esc = 1;
return TCL_OK;
}
got_esc = 0;
}
if (got_esc){
key = do_esc_key (key);
got_esc = 0;
}
if (mi_getch_waiting && key){
mi_getch_waiting = 0;
mi_getch_value = key;
return TCL_OK;
}
dlg_key_event (h, key);
update_cursor (h);
return TCL_OK;
}
void
x_focus_widget (Widget_Item *p)
{
char *wname;
if (!p->widget)
return;
wname = (char *) p->widget->wdata;
if (!wname)
return;
tk_evalf ("focus %s", wname+1);
}
void
x_unfocus_widget (Widget_Item *p)
{
}
/* Setup done before using tkrundlg_event */
void
x_init_dlg (Dlg_head *h)
{
Widget_Item *h_track;
char *top_level_name;
int grided;
int i;
/* Set wlist to hold all the widget names that will be ran */
h_track = h->current;
grided = h->grided;
top_level_name = (char *) h->wdata;
/* Set up the layout of the dialog box.
* We support two ways for laying out twidgets on Tk/mc:
*
* 1. At widget creation time a unique name is assigned to
* each widget. We create a global list called wlist that
* holds the names and invoke a routine that does the layout
* using Tk laying out primitives (usually pack).
*
* 2. If the widgets were created with supplied names, then
* the widgets are intended to be laid out with the grid
* manager with a property table contained in the Tcl source
* file.
*
* If there are no properties defined for a dialog box, then
* a small Tcl-based GUI designed is started up so that the
* programmer can define the grided layout for it
*/
if (grided){
tk_evalf ("set components {}");
for (i = 0; i < h->count; i++){
tk_evalf ("set components \"%s $components\"", h_track->widget->tkname);
h_track = h_track->prev;
}
tk_evalf ("layout_with_grid %s %d", h->name, h->count);
if (atoi (interp->result) == 0){
tk_evalf ("run_gui_design .%s", h->name);
/* Run Tk code */
while (1)
Tcl_DoOneEvent (TCL_ALL_EVENTS);
}
} else {
tk_evalf ("set wlist {}");
for (i = 0; i < h->count; i++){
char *wname = (char *)h_track->widget->wdata;
if (wname)
tk_evalf ("set wlist \"%s $wlist\"", wname+1);
h_track = h_track->prev;
}
tk_evalf ("layout_%s", h->name);
}
/* setup window bindings */
tk_evalf ("bind_setup %s", top_level_name);
/* If this is not the main window, center it */
if (top_level_name [0] && top_level_name [1]){
tk_evalf ("center_win %s", top_level_name);
}
}
int
tkrundlg_event (Dlg_head *h)
{
/* Run the dialog */
while (h->running){
if (h->send_idle_msg){
if (Tcl_DoOneEvent (TCL_DONT_WAIT))
if (idle_hook)
execute_hooks (idle_hook);
while (Tcl_DoOneEvent (TCL_DONT_WAIT) &&
h->running && h->send_idle_msg){
(*h->callback) (h, 0, DLG_IDLE);
}
} else
Tcl_DoOneEvent (TCL_ALL_EVENTS);
}
return 1;
}
int
Tcl_AppInit (Tcl_Interp *interp)
{
return TCL_OK;
}
void
x_interactive_display ()
{
}
int
tk_getch ()
{
mi_getch_waiting = 1;
while (mi_getch_waiting)
Tk_DoOneEvent (TK_ALL_EVENTS);
return mi_getch_value;
}
void
tk_dispatch_all (void)
{
while (Tk_DoOneEvent (TK_DONT_WAIT))
;
}
void
x_destroy_dlg_start (Dlg_head *h)
{
/* nothing */
}
void
x_destroy_dlg (Dlg_head *h)
{
tk_evalf ("destroy %s", (char *) h->wdata);
tk_dispatch_all ();
free ((char *) h->wdata);
tk_end_frame (); /* Cleanup, in case I forget */
}
void
edition_post_exec (void)
{
if (iconify_on_exec)
tk_evalf ("wm deiconify .");
}
void
edition_pre_exec (void)
{
if (iconify_on_exec)
tk_evalf ("wm iconify .");
}
int
try_alloc_color_pair (char *fg, char *bg)
{
}

Просмотреть файл

@ -1,69 +0,0 @@
#ifndef __TKMAIN_H
#define __TKMAIN_H
#include <tcl.h>
#include <tk.h>
#include "dlg.h"
#include "widget.h"
/* Tcl interpreter */
extern Tcl_Interp *interp;
int xtoolkit_init (int *argc, char *argv []);
int xtoolkit_end (void);
int tkrundlg_event (Dlg_head *h);
/* Required by the standard code */
widget_data xtoolkit_create_dialog (Dlg_head *h, int with_grid);
widget_data xtoolkit_get_main_dialog (Dlg_head *h);
widget_data x_create_panel_container (int which);
void x_panel_container_show (widget_data wdata);
void x_destroy_cmd (void *);
int x_create_radio (Dlg_head *h, widget_data parent, WRadio *r);
int x_create_check (Dlg_head *h, widget_data parent, WCheck *c);
int x_create_label (Dlg_head *h, widget_data parent, WLabel *l);
int x_create_input (Dlg_head *h, widget_data parent, WInput *in);
int x_create_listbox (Dlg_head *h, widget_data parent, WListbox *l);
int x_create_buttonbar (Dlg_head *h, widget_data parent, WButtonBar *bb);
void x_list_insert (WListbox *l, WLEntry *p, WLEntry *e);
void x_redefine_label (WButtonBar *bb, int idx);
/* Configuration parameters */
extern int use_one_window;
typedef int (*tcl_callback)(ClientData, Tcl_Interp *, int, char *[]);
char * tk_new_command (widget_data parent, void *widget,
tcl_callback callback, char id);
#define STREQ(a,b) (*a == *b && (strcmp (a,b) == 0))
/* Widget value extraction */
/* Return the widget name */
static inline char *wtcl_cmd (Widget w)
{
return (char *) w.wdata;
}
static inline char *wtk_win (Widget w)
{
return (char *)(w.wdata)+1;
}
/* tkkey.c */
int lookup_keysym (char *s);
/* tkmain.c */
void tk_focus_widget (Widget_Item *p);
void tk_init_dlg (Dlg_head *h);
void tk_evalf (char *format,...);
void tk_dispatch_all (void);
void x_interactive_display (void);
int tk_getch (void);
#define PORT_HAS_DIALOG_TITLE 1
#define PORT_HAS_PANEL_UPDATE_COLS 1
#endif /* __TKMAIN_H */

Просмотреть файл

@ -1,124 +0,0 @@
/* Midnight Commander/Tk: Pulldown menu code.
Copyright (C) 1995 Miguel de Icaza
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <config.h>
#include <string.h>
#include <malloc.h>
#include "main.h"
#include "tkmain.h"
#include "mad.h"
#include "menu.h"
/* Unused but required by the rest of the code */
int menubar_visible = 1;
static int
tkmenu_callback (ClientData cd, Tcl_Interp *interp,
int argc, char *argv [])
{
callfn callback = (callfn) cd;
is_right = (argv [1][0] != '1');
(*callback)();
return TCL_OK;
}
/* We assume that menu titles are only one word length */
Menu create_menu (char *name, menu_entry *entries, int count)
{
int i;
char *xname = strdup (name), *p;
static int menu_number;
/* Lower case string, Tk requires this */
for (p = xname; *p; p++){
if (*p < 'a')
*p |= 0x20;
}
/* And strip trailing space */
*(p-1) = 0;
/* Strip leading space */
for (p = xname; *p == ' '; p++)
;
menu_number++;
tk_evalf ("create_menu %s %s", name, p);
for (i = 0; i < count; i++){
if (entries [i].text [0]){
char cmd_name [20];
sprintf (cmd_name, "m%d%s", i, p);
Tcl_CreateCommand (interp, cmd_name, tkmenu_callback,
entries [i].call_back, NULL);
tk_evalf ("create_mentry %s {%s } %s %d", p, entries [i].text,
cmd_name, menu_number);
} else
tk_evalf ("add_separator %s", xname);
}
free (xname);
return 0;
}
static int menubar_callback (Dlg_head *h, WMenu *menubar, int msg, int par)
{
if (msg == WIDGET_FOCUS)
return 0;
return default_proc (h, msg, par);
}
int menubar_event (Gpm_Event *event, WMenu *menubar)
{
return MOU_NORMAL;
}
static void menubar_destroy (WMenu *menubar)
{
/* nothing yet */
}
WMenu *menubar_new (int y, int x, int cols, Menu menu [], int items)
{
WMenu *menubar = (WMenu *) xmalloc (sizeof (WMenu), "menubar_new");
init_widget (&menubar->widget, y, x, 1, cols,
(callback_fn) menubar_callback,
(destroy_fn) menubar_destroy,
(mouse_h) menubar_event, NULL);
menubar->menu = menu;
menubar->active = 0;
menubar->dropped = 0;
menubar->items = items;
menubar->selected = 0;
widget_want_cursor (menubar->widget, 0);
return menubar;
}
void
menubar_arrange (WMenu* menubar)
{
/* nothing to do I think (Norbert) */
}
void
destroy_menu (Menu menu)
{
/* FIXME: need to implement? (Norbert) */
}

Просмотреть файл

@ -1,565 +0,0 @@
/* Tk panel stuff.
Copyright (C) 1995, 1997 Miguel de Icaza
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <config.h>
#include <string.h>
#include <stdlib.h> /* atoi */
#include "fs.h"
#include "dir.h"
#include "tkmain.h"
#include "panel.h"
#include "command.h"
#include "panel.h" /* current_panel */
#include "command.h" /* cmdline */
#include "main.h"
#include "mouse.h"
#include "layout.h" /* get_panel_widget */
#include "ext.h" /* regex_command */
#include "cmd.h" /* copy_cmd, ren_cmd, delete_cmd, ... */
#include "tkscreen.h"
/* These two variables keep track of the dimensions of a character in the
* panel listing.
*/
static int panel_font_width;
static int panel_font_height;
static char *attrib;
void
repaint_file (WPanel *panel, int file_index, int move, int attr, int isstatus)
{
}
void
show_dir (WPanel *panel)
{
char *tkw = wtk_win (panel->widget);
char *filter = panel->filter ? panel->filter : "*";
if (!panel->widget.wdata)
return;
tk_evalf ("%s.cwd configure -text {%s [%s]}", tkw, panel->cwd, filter);
}
void
x_fill_panel (WPanel *panel)
{
const int top = panel->count;
const int panel_width = panel->widget.cols - 2;
char *panel_name, *tag;
char buffer [255];
int i;
int selected;
if (!panel->widget.wcontainer)
return;
selected = panel->selected;
panel_name = copy_strings (wtk_win (panel->widget), ".m.p.panel", 0);
tk_evalf ("%s delete 0.0 end", panel_name);
for (i = 0; i < top; i++){
file_entry *fe = &panel->dir.list [i];
int marked = fe->f.marked;
format_file (buffer, panel, i, panel_width, NORMAL, 0);
if (i)
tk_evalf ("%s insert end \\n", panel_name);
/* Set the mark tag name -- this probably should go into generic code */
if (marked)
tag = "marked";
else {
tag = "regular";
if (S_ISLNK (fe->buf.st_mode)){
if (fe->f.link_to_dir)
tag = "directory";
} else if (S_ISDIR (fe->buf.st_mode))
tag = "directory";
else if (is_exe (fe->buf.st_mode))
tag = "executable";
}
tk_evalf ("%s insert end {%s} %s", panel_name, buffer, tag);
}
if (panel->active)
x_select_item (panel);
#if 0
/* The first time, the panel does not yet have a command */
if (panel->widget.wdata)
x_select_item (panel);
free (panel_name);
#endif
}
/* Adjusts a panel size */
static void
tk_panel_set_size (int index, int boot)
{
Widget *w;
WPanel *p;
char *pn;
int cols, lines;
w = (Widget *) get_panel_widget (index);
tk_evalf ("panel_info cols");
cols = atoi (interp->result);
tk_evalf ("panel_info lines");
lines = atoi (interp->result);
if ((lines < 10) || (cols < 3))
return;
w = get_panel_widget (index);
p = (WPanel *) w;
w->cols = cols;
w->lines = lines;
set_panel_formats (p);
paint_panel (p);
/* FIXME: paint_panel() includes calls to paint_frame() & x_fill_panel(). */
/* Why does we call them 2 times ? Timur */
if (!boot)
paint_frame (p);
x_fill_panel (p);
}
/* Called by panel bootstrap routine */
void
x_panel_set_size (int index)
{
tk_panel_set_size (index, 1);
}
/* Called at runtime when the size of the window changes */
static void
x_change_size (char *panel, int boot)
{
if (strncmp (panel, ".left", 5) == 0)
tk_panel_set_size (0, 0);
else
tk_panel_set_size (1, 0);
}
#if TCL_MAJOR_VERSION > 7
/* Tcl 8.xx support */
static void
compute_font_size (char *font, char *win, char *dest)
{
Tk_Window window_id;
Tk_Font tkfont;
Tk_FontMetrics fmPtr;
int width, height;
window_id = Tk_NameToWindow (interp, win, Tk_MainWindow (interp));
if (window_id == NULL) {
fprintf (stderr, "Error: %s\n\r", interp->result);
exit (1);
}
tkfont = Tk_GetFont (interp, window_id, font);
if (tkfont == NULL) {
fprintf (stderr,
"This should not happend: %s\n", interp->result);
exit (1);
}
Tk_GetFontMetrics (tkfont, &fmPtr);
width = Tk_TextWidth (tkfont, "O", 1);
height = fmPtr.linespace;
Tk_FreeFont (tkfont);
sprintf (dest, "%d %d", height, width);
}
#else
#ifdef HAVE_TKFONT
/* PreTcl 8.xx support */
#define GetFontMetrics(tkfont) \
((CONST TkFontMetrics *) &((TkFont *) (tkfont))->fm)
static void
compute_font_size (char *font, char *win, char *dest)
{
Tk_Window window_id;
Tk_Font tkfont;
const TkFontMetrics *fmPtr;
int width, height;
window_id = Tk_NameToWindow (interp, win, Tk_MainWindow (interp));
if (window_id == NULL) {
fprintf (stderr, "Error: %s\n\r", interp->result);
exit (1);
}
tkfont = Tk_GetFont (interp, window_id, font);
if (tkfont == NULL) {
fprintf (stderr,
"This should not happend: %s\n", interp->result);
exit (1);
}
fmPtr = GetFontMetrics (tkfont);
width = fmPtr->maxWidth;
height = fmPtr->ascent + fmPtr->descent;
Tk_FreeFont (tkfont);
sprintf (dest, "%d %d", height, width);
}
#else
static char
compute_font_size (char *font, char *win, char *dest)
{
Tk_Uid font_uid;
Tk_Window window_id;
XFontStruct *f;
int width, height;
font_uid = Tk_GetUid (font);
window_id = Tk_NameToWindow (interp, win, Tk_MainWindow (interp));
if (window_id == NULL){
fprintf (stderr, "Error: %s\n\r", interp->result);
exit (1);
}
f = Tk_GetFontStruct (interp, window_id, font_uid);
if (f == NULL){
fprintf (stderr, "This should not happend: %s\n", interp->result);
exit (1);
}
width = f->max_bounds.width;
height = f->ascent + f->descent;
/* Ok, we will use this dummy until monday, the correct thing
* to do is extract the Tk font information from Tk's hash
* table (tkFont.c).
*
* TkFont->widths ['0'] holds the width
*/
sprintf (dest, "%d %d", height, width);
Tk_FreeFontStruct (f);
}
#endif
#endif
/*
* This routine is called when the user has chosen an action from the popup
* menu. Handles the Copy, Move and Delete commands internally, anything
* else ends in the regex_command routine.
*/
static void
tk_invoke (WPanel *panel, int idx, char *operation)
{
char *filename = panel->dir.list [idx].fname;
int movedir;
if (STREQ (operation, "Copy"))
copy_cmd ();
else if (STREQ (operation, "Move"))
ren_cmd ();
else if (STREQ (operation, "Delete"))
delete_cmd ();
else {
regex_command (filename, operation, NULL, &movedir);
}
}
static void
tk_add_popup_entry (char *option, char *cmd, int idx)
{
tk_evalf (".m add command -label {%s} -command {%s invoke %d {%s}}", option, cmd, idx, option);
}
/* This routine assumes the Tcl code has already created the .m menu */
static void
tk_load_popup (WPanel *panel, char *cmd, int idx)
{
char *filename = panel->dir.list [idx].fname;
char *p, *q;
int c;
tk_evalf ("popup_add_action {%s} %s %d", filename, cmd, idx);
p = regex_command (filename, NULL, NULL, NULL);
if (!p)
return;
tk_evalf (".m add separator");
for (;;){
while (*p == ' ' || *p == '\t')
p++;
if (!*p)
break;
q = p;
while (*q && *q != '=' && *q != '\t')
q++;
c = *q;
*q = 0;
tk_add_popup_entry (p, cmd, idx);
if (!c)
break;
p = q + 1;
}
}
void
tk_set_sort (WPanel *panel, char *name)
{
sortfn *f;
if (!name || (f = get_sort_fn (name)) == NULL)
return;
if (!name)
return;
set_sort_to (panel, f);
}
void
tk_return_drag_text (WPanel *panel)
{
if (panel->marked){
sprintf (interp->result, "%d file%s", panel->marked,
panel->marked== 1 ? "" : "s");
} else
strcpy (interp->result, "1 file");
}
int
tk_panel_callback (ClientData cd, Tcl_Interp *interp, int ac, char *av[])
{
Gpm_Event e;
WPanel *panel = (WPanel *) cd;
char b [20];
char *p;
int mouse_etype = 0;
p = av [1];
if (STREQ (p, "mdown"))
mouse_etype = GPM_DOWN;
else if (STREQ (p, "mup"))
mouse_etype = GPM_UP;
else if (STREQ (p, "double"))
mouse_etype = GPM_DOUBLE|GPM_UP;
else if (STREQ (p, "motion"))
mouse_etype = GPM_MOVE|GPM_DRAG;
else if (STREQ (p, "resize")){
x_change_size (av [2], 0);
return TCL_OK;
} else if (STREQ (p, "fontdim")){
compute_font_size (av [2], av [3], interp->result);
return TCL_OK;
} else if (STREQ (p, "load")){
tk_load_popup (panel, av [0], atoi (av [2])-1);
tk_evalf ("tk_popup .m %s %s", av [3], av [4]);
return TCL_OK;
} else if (STREQ (p, "invoke")){
tk_invoke (panel, atoi (av [2]), av [3]);
return TCL_OK;
} else if (STREQ (p, "refresh")){
reread_cmd ();
return TCL_OK;
} else if (STREQ (p, "setmask")){
filter_cmd ();
return TCL_OK;
} else if (STREQ (p, "nomask")){
if (panel->filter){
free (panel->filter);
panel->filter = 0;
}
reread_cmd ();
return TCL_OK;
} else if (STREQ (p, "sort")) {
tk_set_sort (panel, av [2]);
return TCL_OK;
} else if (STREQ (p, "reverse")){
panel->reverse = !panel->reverse;
do_re_sort (panel);
return TCL_OK;
} else if (STREQ (p, "dragtext")){
tk_return_drag_text (panel);
return TCL_OK;
}
if (STREQ (p, "top")){
int old_sel = panel->selected;
int new = old_sel;
panel->top_file = atoi (av [2]) - 1;
if (old_sel < panel->top_file)
new = panel->top_file;
if (old_sel > (panel->top_file + ITEMS (panel)))
new = panel->top_file + ITEMS (panel) - 1;
if (new != old_sel){
unselect_item (panel);
panel->selected = new;
select_item (panel);
}
return TCL_OK;
}
if (mouse_etype){
for (p = av [3]; *p && *p != '.'; p++)
;
*p++ = 0;
e.buttons = atoi (av [2]);
e.y = atoi (av [3]) + 2 - panel->top_file;
e.x = atoi (p);
e.type = mouse_etype;
panel_event (&e, panel);
} else {
/* We are currently dealing with those */
fprintf (stderr, "Unknown command: %s\n", p);
return TCL_ERROR;
}
return TCL_OK;
}
void
x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel)
{
char *cmd;
widget_data container = panel->widget.wcontainer;
cmd = tk_new_command (container, panel, tk_panel_callback, 'p');
tk_evalf ("panel_setup %s %s", wtk_win (panel->widget), cmd);
tk_evalf ("panel_bind %s %s", wtk_win (panel->widget), cmd);
paint_frame (panel);
x_fill_panel (panel);
}
/* Called when f.marked has changed on a file */
void
x_panel_select_item (WPanel *panel, int index, int value)
{
char *s;
s = value ? "add" : "remove";
tk_evalf ("panel_mark_entry %s %s %d", wtk_win(panel->widget), s, index+1);
}
void
x_unselect_item (WPanel *panel)
{
const int selected = panel->selected + 1;
if (panel->active)
tk_evalf ("panel_unmark_entry %s %d\n", wtk_win (panel->widget), selected);
}
void
x_select_item (WPanel *panel)
{
const int selected = panel->selected + 1;
char *cmd = wtcl_cmd (panel->widget);
if (!(cmd && *cmd))
return;
if (panel->active)
tk_evalf ("panel_select %s %d %s", wtk_win (panel->widget),
selected, cmd);
}
void
x_adjust_top_file (WPanel *panel)
{
tk_evalf ("%s.m.p.panel yview %d.0", wtk_win (panel->widget),
panel->top_file+1);
}
void
x_filter_changed (WPanel *panel)
{
show_dir (panel);
}
/* The following two routines may be called at the very beginning of the
* program, so we have to check if the widget has already been constructed
*/
static sort_label_last_pos;
void
x_add_sort_label (WPanel *panel, int index, char *text, char *tag, void *sr)
{
int pos;
if (!panel->format_modified)
return;
if (!panel->widget.wdata)
return;
/* We may still not have this information */
if (!panel_font_width){
tk_evalf ("panel_info heightc");
panel_font_height = atoi (interp->result);
tk_evalf ("panel_info widthc");
panel_font_width = atoi (interp->result);
}
pos = sort_label_last_pos;
sort_label_last_pos += (strlen (text) * panel_font_width) + (4);
/* The addition down there is to account for the canvas border width */
tk_evalf ("panel_add_sort %s %d {%s} %d %d {%s}", wtk_win(panel->widget),
strlen (text), text, pos , sort_label_last_pos, *tag ? tag : "Type");
}
void
x_sort_label_start (WPanel *panel)
{
if (!panel->widget.wdata)
return;
sort_label_last_pos = 0;
tk_evalf ("panel_sort_label_start %s", wtk_win (panel->widget));
}
void
x_reset_sort_labels (WPanel *panel)
{
if (!panel->widget.wdata)
return;
sort_label_last_pos = 0;
tk_evalf ("panel_reset_sort_labels %s", wtk_win (panel->widget));
}
void
panel_update_cols (Widget *widget, int frame_size)
{
/* nothing */
}
void
display_mini_info (WPanel *panel)
{
/* FIXME: implement */
}
void
x_panel_destroy (WPanel *panel)
{
}

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше