Sat Mar 7 14:19:29 1998 Pavel Roskin <pavel@absolute.spb.su>
* 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.
Этот коммит содержится в:
родитель
057f69beae
Коммит
1a9884eb13
17
os2/ChangeLog
Обычный файл
17
os2/ChangeLog
Обычный файл
@ -0,0 +1,17 @@
|
|||||||
|
Sat Mar 7 14:19:29 1998 Pavel Roskin <pavel@absolute.spb.su>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
15
os2/Makefile
15
os2/Makefile
@ -8,16 +8,13 @@
|
|||||||
|
|
||||||
include ../Make.common
|
include ../Make.common
|
||||||
|
|
||||||
FILES = coollocal.h gpm-xterm.h lkeysym.h pwd.h Makefile coolwidget.h grp.h \
|
FILES = Makefile Makefile.EMX Makefile.OS2 chmod.os2.c config.h \
|
||||||
makefile.debug slint.os2.c chmod.os2.c dirent.h inst.cmd \
|
cons.handler.os2.c cons.saver.h direct.h dirent.h dirent.os2.c \
|
||||||
makefile.release config.h dirent.os2.c mc.def termios.h \
|
drive.h drive.os2.c inst.cmd key.os2.c mc.def mc.ico slint.os2.c \
|
||||||
cons.handler.os2.c drive.h key.os2.c mc.ico unistd.h cons.saver.h \
|
util.os2.c
|
||||||
drive.os2.c learn.h util.os2.c
|
|
||||||
|
|
||||||
FILESSYS = sys/param.h sys/time.h sys/wait.h
|
FILESSYS = sys/param.h sys/time.h
|
||||||
|
|
||||||
FILESEDIT = os2edit/copyright.h os2edit/dirtools.h \
|
|
||||||
os2edit/makefile.debug os2edit/makefile.release os2edit/makefile.rf
|
|
||||||
all:
|
all:
|
||||||
|
|
||||||
TAGS: $(FILES)
|
TAGS: $(FILES)
|
||||||
@ -38,5 +35,3 @@ distcopy:
|
|||||||
$(CP) $(FILES) ../../mc-$(VERSION)/os2
|
$(CP) $(FILES) ../../mc-$(VERSION)/os2
|
||||||
-mkdir ../../mc-$(VERSION)/os2/sys
|
-mkdir ../../mc-$(VERSION)/os2/sys
|
||||||
$(CP) $(FILESSYS) ../../mc-$(VERSION)/os2/sys
|
$(CP) $(FILESSYS) ../../mc-$(VERSION)/os2/sys
|
||||||
-mkdir ../../mc-$(VERSION)/os2/os2edit
|
|
||||||
$(CP) $(FILESEDIT) ../../mc-$(VERSION)/os2/os2edit
|
|
||||||
|
@ -16,19 +16,19 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
#ifndef __os2__
|
#ifndef __os2__
|
||||||
#error This file is for the OS/2 operating system.
|
#error This file is for the OS/2 operating system.
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
#define INCL_DOSFILEMGR
|
#define INCL_DOSFILEMGR
|
||||||
#include <os2.h>
|
#include <os2.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
/* for chmod and stat */
|
/* for chmod and stat */
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include <sys\stat.h>
|
|
||||||
#include <sys\types.h>
|
#include <sys\types.h>
|
||||||
|
#include <sys\stat.h>
|
||||||
#include "tty.h"
|
#include "tty.h"
|
||||||
#include "mad.h"
|
#include "mad.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
@ -104,28 +104,27 @@ struct {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
int ret_cmd, y, x;
|
int ret_cmd, flags, y, x;
|
||||||
char *text;
|
char *text;
|
||||||
int hkey, hpos;
|
|
||||||
} chmod_but[BUTTONS] = {
|
} chmod_but[BUTTONS] = {
|
||||||
|
|
||||||
{
|
{
|
||||||
B_CANCEL, 2, 33, "[ Cancel ]", 'c', 2,
|
B_CANCEL, NORMAL_BUTTON, 2, 33, "&Cancel",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
B_ENTER, 2, 17, "[ Set ]", 's', 2,
|
B_ENTER, DEFPUSH_BUTTON, 2, 17, "&Set",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
B_CLRMRK, 0, 42, "[ Clear marked ]", 'l', 3,
|
B_CLRMRK, NORMAL_BUTTON, 0, 42, "C&lear marked",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
B_SETMRK, 0, 27, "[ Set marked ]", 'e', 3,
|
B_SETMRK, NORMAL_BUTTON, 0, 27, "S&et marked",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
B_MARKED, 0, 12, "[ Marked all ]", 'm', 2,
|
B_MARKED, NORMAL_BUTTON, 0, 12, "&Marked all",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
B_ALL, 0, 0, "[ Set all ]", 'a', 6,
|
B_ALL, NORMAL_BUTTON, 0, 0, "Set &all",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -240,7 +239,7 @@ static void init_chmod (void)
|
|||||||
x_set_dialog_title (ch_dlg, "Chmod command");
|
x_set_dialog_title (ch_dlg, "Chmod command");
|
||||||
|
|
||||||
#define XTRACT(i) BY+chmod_but[i].y-single_set, BX+chmod_but[i].x, \
|
#define XTRACT(i) BY+chmod_but[i].y-single_set, BX+chmod_but[i].x, \
|
||||||
chmod_but[i].ret_cmd, chmod_but[i].text, chmod_but[i].hkey, chmod_but[i].hpos, 0, 0, NULL
|
chmod_but[i].ret_cmd, chmod_but[i].flags, chmod_but[i].text, 0, 0, NULL
|
||||||
|
|
||||||
tk_new_frame (ch_dlg, "b.");
|
tk_new_frame (ch_dlg, "b.");
|
||||||
for (i = 0; i < BUTTONS; i++) {
|
for (i = 0; i < BUTTONS; i++) {
|
||||||
@ -251,7 +250,7 @@ static void init_chmod (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define XTRACT2(i) 0, check_perm [i].text, 0, -1, NULL
|
#define XTRACT2(i) 0, check_perm [i].text, NULL
|
||||||
tk_new_frame (ch_dlg, "c.");
|
tk_new_frame (ch_dlg, "c.");
|
||||||
for (i = 0; i < PERMISSIONS; i++) {
|
for (i = 0; i < PERMISSIONS; i++) {
|
||||||
check_perm[i].check = check_new (PY + (PERMISSIONS - i), PX + 2,
|
check_perm[i].check = check_new (PY + (PERMISSIONS - i), PX + 2,
|
||||||
|
51
os2/config.h
51
os2/config.h
@ -31,7 +31,27 @@
|
|||||||
#ifndef __CONFIG_H //Prevent multiple includes
|
#ifndef __CONFIG_H //Prevent multiple includes
|
||||||
#define __CONFIG_H
|
#define __CONFIG_H
|
||||||
|
|
||||||
#include "../VERSION"
|
#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
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Headers
|
// Headers
|
||||||
@ -44,17 +64,21 @@
|
|||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// "Standard" Library
|
// "Standard" Library
|
||||||
#define HAS_MEMSET
|
#define HAVE_MEMSET
|
||||||
#define HAS_MEMCHR
|
#define HAVE_MEMCHR
|
||||||
#define HAS_MEMCPY
|
#define HAVE_MEMCPY
|
||||||
#define HAS_MEMCMP
|
#define HAVE_MEMCMP
|
||||||
|
#define HAVE_MEMMOVE
|
||||||
#define HAVE_STRDUP
|
#define HAVE_STRDUP
|
||||||
#define HAVE_STRERROR
|
#define HAVE_STRERROR
|
||||||
#define HAVE_MEMMOVE
|
#define HAVE_TRUNCATE
|
||||||
#define REGEX_MALLOC
|
#define REGEX_MALLOC
|
||||||
|
|
||||||
#define NO_TERM
|
#define NO_TERM
|
||||||
#define NO_INFOMOUNT
|
#define NO_INFOMOUNT
|
||||||
|
#ifndef __EMX__
|
||||||
|
#define HAVE_SHORT_MKDIR
|
||||||
|
#endif
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Windowing library
|
// Windowing library
|
||||||
@ -68,22 +92,25 @@
|
|||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Typedefs (some useless under NT)
|
// Typedefs (some useless under NT)
|
||||||
|
typedef unsigned int umode_t;
|
||||||
|
#ifndef __EMX__
|
||||||
typedef int gid_t; // Not defined in <sys/types.h>
|
typedef int gid_t; // Not defined in <sys/types.h>
|
||||||
typedef int uid_t;
|
typedef int uid_t;
|
||||||
typedef int mode_t;
|
typedef int mode_t;
|
||||||
typedef int pid_t;
|
typedef int pid_t;
|
||||||
typedef unsigned int umode_t;
|
|
||||||
typedef unsigned int nlink_t;
|
typedef unsigned int nlink_t;
|
||||||
|
|
||||||
#define INLINE
|
#define INLINE
|
||||||
#define inline
|
#define inline
|
||||||
#define OS2_NT 1
|
|
||||||
#define ENOTDIR -1
|
#define ENOTDIR -1
|
||||||
|
#endif /* not __EMX__ */
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// File attributes
|
// File attributes
|
||||||
#define S_ISLNK(x) 0
|
|
||||||
|
|
||||||
#define S_ISBLK(m) 0 /* Some of these are not actual values*/
|
#define S_ISBLK(m) 0 /* Some of these are not actual values*/
|
||||||
|
#define S_ISLNK(x) 0
|
||||||
|
#ifndef __EMX__
|
||||||
|
|
||||||
#define S_ISFIFO(x) 0
|
#define S_ISFIFO(x) 0
|
||||||
#define S_IFBLK 0010000 /* but don't worry, these are yet not possible on NT */
|
#define S_IFBLK 0010000 /* but don't worry, these are yet not possible on NT */
|
||||||
#define S_IFLNK 0010000
|
#define S_IFLNK 0010000
|
||||||
@ -124,15 +151,17 @@ typedef unsigned int nlink_t;
|
|||||||
#define W_OK 2 /* Test for write permission */
|
#define W_OK 2 /* Test for write permission */
|
||||||
#define X_OK 1 /* Test for execute permission */
|
#define X_OK 1 /* Test for execute permission */
|
||||||
#define F_OK 0 /* Test for existence of file */
|
#define F_OK 0 /* Test for existence of file */
|
||||||
|
#endif /* __EMX__ */
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Inline definitions
|
// Inline definitions
|
||||||
|
|
||||||
// Pipes
|
// Pipes
|
||||||
|
#ifndef __EMX__
|
||||||
#define popen _popen
|
#define popen _popen
|
||||||
#define pclose _pclose
|
#define pclose _pclose
|
||||||
#define pipe(p) _pipe(p, 4096, 0x8000 /*_O_BINARY*/)
|
#define pipe(p) _pipe(p, 4096, 0x8000 /*_O_BINARY*/)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef MAX_PATH
|
#ifndef MAX_PATH
|
||||||
# define MAX_PATH 260
|
# define MAX_PATH 260
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Client interface for General purpose OS/2 console save/restore server.
|
/* Client interface for General purpose OS/2 console save/restore server.
|
||||||
/* Client interface for General purpose OS/2 console save/restore server.
|
/* Client interface for General purpose OS/2 console save/restore server.
|
||||||
1997 Alexander Dong <ado@software-ag.de>
|
1997 Alexander Dong <ado@software-ag.de>
|
||||||
Having the same interface as its Linux counterpart:
|
Having the same interface as its Linux counterpart:
|
||||||
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
#ifndef __os2__
|
#ifndef __os2__
|
||||||
#error This file is for OS/2 operating systems.
|
#error This file is for OS/2 operating systems.
|
||||||
#else
|
#else
|
||||||
@ -32,7 +33,6 @@
|
|||||||
#define INCL_SUB
|
#define INCL_SUB
|
||||||
#define INCL_DOSERRORS
|
#define INCL_DOSERRORS
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
#include <os2.h>
|
#include <os2.h>
|
||||||
|
|
||||||
#include "tty.h"
|
#include "tty.h"
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#define INCL_DOSFILEMGR
|
#define INCL_DOSFILEMGR
|
||||||
#define INCL_DOSERRORS
|
#define INCL_DOSERRORS
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include <config.h>
|
||||||
|
#endif
|
||||||
#include <os2.h>
|
#include <os2.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -16,13 +16,13 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
#ifndef __os2__
|
#ifndef __os2__
|
||||||
#error This file is for the OS/2 operating systems.
|
#error This file is for the OS/2 operating systems.
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define INCL_DOSDEVICES /* Device values */
|
#define INCL_DOSDEVICES /* Device values */
|
||||||
#define INCL_DOSERRORS /* Error values */
|
#define INCL_DOSERRORS /* Error values */
|
||||||
#include <config.h>
|
|
||||||
#include <os2.h>
|
#include <os2.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -109,7 +109,7 @@ static void drive_cmd()
|
|||||||
int x_pos; /* X-Position for the dialog */
|
int x_pos; /* X-Position for the dialog */
|
||||||
int y_pos = (LINES-6)/2-3; /* Center on y */
|
int y_pos = (LINES-6)/2-3; /* Center on y */
|
||||||
int y_height;
|
int y_height;
|
||||||
int x_width;
|
int x_width;
|
||||||
|
|
||||||
int m_drv;
|
int m_drv;
|
||||||
void *widget;
|
void *widget;
|
||||||
@ -123,7 +123,7 @@ static void drive_cmd()
|
|||||||
message(0, " ERROR ", " Internal Error with drive_cmd ");
|
message(0, " ERROR ", " Internal Error with drive_cmd ");
|
||||||
return;
|
return;
|
||||||
} /* endif */
|
} /* endif */
|
||||||
|
|
||||||
j = 0;
|
j = 0;
|
||||||
for (i=0; i < 26; i++) {
|
for (i=0; i < 26; i++) {
|
||||||
if ( (uDriveMap<<(31-i)) >> 31) {
|
if ( (uDriveMap<<(31-i)) >> 31) {
|
||||||
@ -163,9 +163,9 @@ static void drive_cmd()
|
|||||||
add_widgetl (drive_dlg,
|
add_widgetl (drive_dlg,
|
||||||
button_new (5, (m_drv-i-1)*2+4 - (MAX_LGH*2 - nDrivesAvail) * 2,
|
button_new (5, (m_drv-i-1)*2+4 - (MAX_LGH*2 - nDrivesAvail) * 2,
|
||||||
B_DRIVE_BASE+((int) szTempBuf[0] - (int) 'A'),
|
B_DRIVE_BASE+((int) szTempBuf[0] - (int) 'A'),
|
||||||
szTempBuf,
|
HIDDEN_BUTTON,
|
||||||
szTempBuf[0],
|
szTempBuf,
|
||||||
0, NULL, NULL, NULL),
|
0, NULL, NULL),
|
||||||
XV_WLAY_RIGHTOF);
|
XV_WLAY_RIGHTOF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -176,10 +176,9 @@ static void drive_cmd()
|
|||||||
button_new (3,
|
button_new (3,
|
||||||
(m_drv-i-1)*2+4,
|
(m_drv-i-1)*2+4,
|
||||||
B_DRIVE_BASE+((int)szTempBuf[0] - (int) 'A'),
|
B_DRIVE_BASE+((int)szTempBuf[0] - (int) 'A'),
|
||||||
szTempBuf,
|
HIDDEN_BUTTON,
|
||||||
szTempBuf[0],
|
szTempBuf,
|
||||||
0,
|
0,
|
||||||
NULL,
|
|
||||||
NULL,
|
NULL,
|
||||||
NULL),
|
NULL),
|
||||||
XV_WLAY_RIGHTOF);
|
XV_WLAY_RIGHTOF);
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
#ifndef __os2__
|
#ifndef __os2__
|
||||||
#error This file is for OS/2 systems.
|
#error This file is for OS/2 systems.
|
||||||
#else
|
#else
|
||||||
@ -31,7 +32,6 @@
|
|||||||
#define INCL_DOSERRORS
|
#define INCL_DOSERRORS
|
||||||
#define INCL_WININPUT
|
#define INCL_WININPUT
|
||||||
#include <os2.h>
|
#include <os2.h>
|
||||||
#include <config.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "mouse.h"
|
#include "mouse.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
@ -240,7 +240,7 @@ int get_key_code (int no_delay)
|
|||||||
if (no_delay) {
|
if (no_delay) {
|
||||||
/* Check if any input pending, otherwise return */
|
/* Check if any input pending, otherwise return */
|
||||||
nodelay (stdscr, TRUE);
|
nodelay (stdscr, TRUE);
|
||||||
inp_ch = SLsys_getkey_ndelay();
|
inp_ch = SLsys_input_pending();
|
||||||
if (inp_ch == 0) {
|
if (inp_ch == 0) {
|
||||||
return 0;
|
return 0;
|
||||||
} /* endif */
|
} /* endif */
|
||||||
@ -364,7 +364,7 @@ extern int max_dirt_limit;
|
|||||||
/* Also takes care of generated mouse events */
|
/* Also takes care of generated mouse events */
|
||||||
/* Returns 0 if it is a mouse event */
|
/* Returns 0 if it is a mouse event */
|
||||||
/* The current behavior is to block allways */
|
/* The current behavior is to block allways */
|
||||||
int get_event (Gpm_Event *event, int redo_event)
|
int get_event (Gpm_Event *event, int redo_event, int block)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
@ -403,7 +403,7 @@ int mi_getch ()
|
|||||||
Gpm_Event ev;
|
Gpm_Event ev;
|
||||||
int key;
|
int key;
|
||||||
|
|
||||||
while ((key = get_event (&ev, 0)) == 0)
|
while ((key = get_event (&ev, 0, 1)) == 0)
|
||||||
;
|
;
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
@ -445,4 +445,7 @@ void learn_keys()
|
|||||||
{
|
{
|
||||||
message (1, "Learn Keys", "Sorry, no learn keys on OS/2");
|
message (1, "Learn Keys", "Sorry, no learn keys on OS/2");
|
||||||
}
|
}
|
||||||
|
void init_key_input_fd (void)
|
||||||
|
{
|
||||||
|
}
|
||||||
#endif /* __os2__ */
|
#endif /* __os2__ */
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Slang interface to the Midnight Commander for OS/2
|
/* Slang interface to the Midnight Commander for Windows NT and OS/2
|
||||||
This emulates some features of ncurses on top of slang
|
This emulates some features of ncurses on top of slang
|
||||||
S-lang is not fully consistent between its Unix and non-Unix versions.
|
S-lang is not fully consistent between its Unix and non-Unix versions.
|
||||||
|
|
||||||
@ -17,9 +17,8 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include "config.h"
|
#include <config.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <os2.h>
|
|
||||||
#include "tty.h"
|
#include "tty.h"
|
||||||
#include "mad.h"
|
#include "mad.h"
|
||||||
#include "color.h"
|
#include "color.h"
|
||||||
@ -31,6 +30,47 @@
|
|||||||
|
|
||||||
#ifdef HAVE_SLANG
|
#ifdef HAVE_SLANG
|
||||||
|
|
||||||
|
/* {{{ Copied from ../slang/slgetkey.c, removed the DEC_8Bit_HACK, */
|
||||||
|
extern unsigned int SLang_Input_Buffer_Len;
|
||||||
|
extern unsigned char SLang_Input_Buffer [];
|
||||||
|
extern unsigned int SLsys_getkey (void);
|
||||||
|
extern int SLsys_input_pending (int);
|
||||||
|
|
||||||
|
static unsigned int SLang_getkey2 (void)
|
||||||
|
{
|
||||||
|
unsigned int imax;
|
||||||
|
unsigned int ch;
|
||||||
|
|
||||||
|
if (SLang_Input_Buffer_Len)
|
||||||
|
{
|
||||||
|
ch = (unsigned int) *SLang_Input_Buffer;
|
||||||
|
SLang_Input_Buffer_Len--;
|
||||||
|
imax = SLang_Input_Buffer_Len;
|
||||||
|
|
||||||
|
memcpy ((char *) SLang_Input_Buffer,
|
||||||
|
(char *) (SLang_Input_Buffer + 1), imax);
|
||||||
|
return(ch);
|
||||||
|
}
|
||||||
|
else return(SLsys_getkey ());
|
||||||
|
}
|
||||||
|
|
||||||
|
static int SLang_input_pending2 (int tsecs)
|
||||||
|
{
|
||||||
|
int n;
|
||||||
|
unsigned char c;
|
||||||
|
if (SLang_Input_Buffer_Len) return (int) SLang_Input_Buffer_Len;
|
||||||
|
|
||||||
|
n = SLsys_input_pending (tsecs);
|
||||||
|
|
||||||
|
if (n <= 0) return 0;
|
||||||
|
|
||||||
|
c = (unsigned char) SLang_getkey2 ();
|
||||||
|
SLang_ungetkey_string (&c, 1);
|
||||||
|
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
//??
|
//??
|
||||||
static void slang_sigterm ()
|
static void slang_sigterm ()
|
||||||
{
|
{
|
||||||
@ -41,7 +81,7 @@ static int slinterrupt;
|
|||||||
|
|
||||||
void enable_interrupt_key(void)
|
void enable_interrupt_key(void)
|
||||||
{
|
{
|
||||||
// SLang_set_abort_signal(NULL);
|
SLang_set_abort_signal(NULL);
|
||||||
slinterrupt = 1;
|
slinterrupt = 1;
|
||||||
}
|
}
|
||||||
void disable_interrupt_key(void)
|
void disable_interrupt_key(void)
|
||||||
@ -83,7 +123,7 @@ void slang_shutdown ()
|
|||||||
{
|
{
|
||||||
slang_shell_mode ();
|
slang_shell_mode ();
|
||||||
do_exit_ca_mode ();
|
do_exit_ca_mode ();
|
||||||
// SLang_reset_tty ();
|
SLang_reset_tty ();
|
||||||
|
|
||||||
/* reset the colors to those that were
|
/* reset the colors to those that were
|
||||||
* active when the program was started up
|
* active when the program was started up
|
||||||
@ -192,7 +232,11 @@ void load_terminfo_keys ()
|
|||||||
|
|
||||||
int getch ()
|
int getch ()
|
||||||
{
|
{
|
||||||
return _getch();
|
if (no_slang_delay)
|
||||||
|
if (SLang_input_pending2 (0) == 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
return SLang_getkey2 ();
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int slow_terminal;
|
extern int slow_terminal;
|
||||||
@ -208,6 +252,7 @@ int got_interrupt ()
|
|||||||
|
|
||||||
void mc_refresh (void)
|
void mc_refresh (void)
|
||||||
{
|
{
|
||||||
|
/* if (!we_are_background) (no background mode yet) */
|
||||||
refresh ();
|
refresh ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,2 +1,7 @@
|
|||||||
/* Nothing, just dummy */
|
/* 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
|
||||||
|
@ -33,10 +33,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
@ -45,7 +42,6 @@
|
|||||||
#include <limits.h> /* INT_MAX */
|
#include <limits.h> /* INT_MAX */
|
||||||
#include <sys/time.h> /* select: timeout */
|
#include <sys/time.h> /* select: timeout */
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
@ -366,12 +362,13 @@ char *tilde_expand (char *directory)
|
|||||||
return strdup (directory);
|
return strdup (directory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __EMX__
|
||||||
void
|
void
|
||||||
sleep(unsigned long dwMiliSecs)
|
sleep(unsigned long dwMiliSecs)
|
||||||
{
|
{
|
||||||
DosSleep(dwMiliSecs);
|
DosSleep(dwMiliSecs);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Canonicalize path, and return a new path. Do everything in situ.
|
/* Canonicalize path, and return a new path. Do everything in situ.
|
||||||
@ -690,6 +687,7 @@ geteuid(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __EMX__
|
||||||
char *
|
char *
|
||||||
getcwd(char *buffer, int size)
|
getcwd(char *buffer, int size)
|
||||||
{
|
{
|
||||||
@ -717,6 +715,7 @@ getcwd(char *buffer, int size)
|
|||||||
return NULL;
|
return NULL;
|
||||||
} /* endif */
|
} /* endif */
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
mc_chdir(char *pathname)
|
mc_chdir(char *pathname)
|
||||||
@ -762,7 +761,7 @@ conv_os2_unx_rc(int os2rc)
|
|||||||
case ERROR_SHARING_VIOLATION:
|
case ERROR_SHARING_VIOLATION:
|
||||||
case ERROR_SHARING_BUFFER_EXCEEDED:
|
case ERROR_SHARING_BUFFER_EXCEEDED:
|
||||||
case ERROR_ACCESS_DENIED:
|
case ERROR_ACCESS_DENIED:
|
||||||
errCode = EOS2ERR;
|
errCode = EACCES;
|
||||||
break;
|
break;
|
||||||
case ERROR_INVALID_PARAMETER:
|
case ERROR_INVALID_PARAMETER:
|
||||||
errCode = EINVAL;
|
errCode = EINVAL;
|
||||||
@ -876,7 +875,7 @@ getpid (void)
|
|||||||
int
|
int
|
||||||
errno_dir_not_empty (int err)
|
errno_dir_not_empty (int err)
|
||||||
{
|
{
|
||||||
if (err == EACCESS)
|
if (err == ENOTEMPTY)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -891,3 +890,14 @@ get_mc_lib_dir ()
|
|||||||
return mchome;
|
return mchome;
|
||||||
} /* endif */
|
} /* endif */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int get_user_rights (struct stat *buf)
|
||||||
|
{
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
void init_groups (void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void delete_groups (void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user