.cvsignores for the Midnight Commander

This commit is contained in:
Miguel de Icaza 1998-03-07 20:34:15 +00:00
parent b52d3a73ca
commit 177bbf7262
11 changed files with 493 additions and 0 deletions

4
doc/.cvsignore Normal file
View File

@ -0,0 +1,4 @@
mc.1
mcserv.8
mcedit.1
Makefile

1
icons/.cvsignore Normal file
View File

@ -0,0 +1 @@
Makefile

2
lib/.cvsignore Normal file
View File

@ -0,0 +1,2 @@
Makefile
mc.ext

0
os2/.cvsignore Normal file
View File

59
os2/Makefile.EMX Normal file
View File

@ -0,0 +1,59 @@
# 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=
# ---- 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=d:/emx/bin
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) $+

149
os2/Makefile.OS2 Normal file
View File

@ -0,0 +1,149 @@
# 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 \
mouse.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
os2/direct.h Normal file
View File

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

261
slang/slos2tty.c Normal file
View File

@ -0,0 +1,261 @@
/* Copyright (c) 1992, 1995 John E. Davis
* All rights reserved.
*
* You may distribute under the terms of either the GNU General Public
* License or the Perl Artistic License.
*/
#include "config.h"
#include <stdio.h>
#include "slang.h"
#include "_slang.h"
#define INCL_BASE
#define INCL_NOPM
#define INCL_VIO
#define INCL_KBD
#define INCL_DOS
#if 0
# define INCL_DOSSEMAPHORES
#endif
#ifdef LONG
#undef LONG
#endif
#ifdef VOID
#undef VOID
#endif
#include <os2.h>
#include <signal.h>
#include <process.h>
KBDINFO initialKbdInfo; /* keyboard info */
/* Code to read keystrokes in a separate thread */
typedef struct kbdcodes {
UCHAR ascii;
UCHAR scan;
/* USHORT shift; */
} KBDCODES;
#define BUFFER_LEN 4096
static KBDCODES threadKeys[BUFFER_LEN];
static int atEnd = 0;
static int startBuf;
static int endBuf;
/* Original code used semaphores to control access to threadKeys.
* It is expected that the semaphore code will be deleted after 0.97.
*/
#if 0
#ifdef __os2_16__
typedef USHORT APIRET;
static HSEM Hmtx;
#define DosRequestMutexSem(hmtx,timeout) DosSemRequest(hmtx,timeout)
#define DosReleaseMutexSem(hmtx) DosSemClear(hmtx)
#define DosCloseMutexSem(hmtx) DosCloseSem(hmtx)
#else /* !defined(__os2_16__) */
static HMTX Hmtx; /* Mutex Semaphore */
#endif
static APIRET CreateSem(void)
{
#ifdef __os2_16__
char SemName[32];
sprintf(SemName, "\\SEM\\jed\\%u", getpid());
return ( DosCreateSem (0, &Hmtx, SemName) );
#else
return ( DosCreateMutexSem (NULL, &Hmtx, 0, 0) );
#endif
}
static APIRET RequestSem(void)
{
return ( DosRequestMutexSem (Hmtx, -1) );
}
static APIRET ReleaseSem(void)
{
return ( DosReleaseMutexSem (Hmtx) );
}
static APIRET CloseSem(void)
{
return( DosCloseMutexSem (Hmtx) );
}
#else
#define CreateSem()
#define RequestSem()
#define ReleaseSem()
#define CloseSem()
#endif
static void set_kbd(void)
{
KBDINFO kbdInfo;
kbdInfo = initialKbdInfo;
kbdInfo.fsMask &= ~0x0001; /* not echo on */
kbdInfo.fsMask |= 0x0002; /* echo off */
kbdInfo.fsMask &= ~0x0008; /* cooked mode off */
kbdInfo.fsMask |= 0x0004; /* raw mode */
kbdInfo.fsMask &= ~0x0100; /* shift report off */
KbdSetStatus(&kbdInfo, 0);
}
static void thread_getkey ()
{
KBDKEYINFO keyInfo;
int n;
while (!atEnd) { /* at end is a flag */
set_kbd();
KbdCharIn(&keyInfo, IO_NOWAIT, 0); /* get a character */
if (keyInfo.fbStatus & 0x040) { /* found a char process it */
if (keyInfo.chChar == SLang_Abort_Char) {
if (SLang_Ignore_User_Abort == 0) SLang_Error = USER_BREAK;
SLKeyBoard_Quit = 1;
}
n = (endBuf + 1) % BUFFER_LEN;
if (n == startBuf) {
DosBeep (500, 20);
KbdFlushBuffer(0);
continue;
}
RequestSem();
threadKeys [n].ascii = keyInfo.chChar;
threadKeys [n].scan = keyInfo.chScan;
/* threadKeys [n].shift = keyInfo.fsState; */
endBuf = n;
ReleaseSem();
} else /* no char available*/
DosSleep (20);
}
}
static void thread_code (void *Args)
{
(void) Args;
startBuf = -1; /* initialize the buffer pointers */
endBuf = -1;
thread_getkey ();
atEnd = 0; /* reset the flag */
_endthread();
}
/* The code below is in the main thread */
int SLang_init_tty(int abort_char, int dum2, int dum3)
{
VIOCURSORINFO cursorInfo, OldcursorInfo;
(void) dum2; (void) dum3;
if (abort_char == -1) abort_char = 3; /* ^C */
SLang_Abort_Char = abort_char;
/* set ^C off */
signal (SIGINT, SIG_IGN);
signal (SIGBREAK, SIG_IGN);
/* set up the keyboard */
initialKbdInfo.cb = sizeof(initialKbdInfo);
KbdGetStatus(&initialKbdInfo, 0);
set_kbd();
/* open a semaphore */
CreateSem();
/* start a separate thread to read the keyboard */
#if defined(__BORLANDC__)
_beginthread (thread_code, 8096, NULL);
#else
_beginthread (thread_code, NULL, 8096, NULL);
#endif
VioGetCurType (&OldcursorInfo, 0);
cursorInfo.yStart = 1;
cursorInfo.cEnd = 15;
cursorInfo.cx = 1;
cursorInfo.attr = 1;
if (VioSetCurType (&cursorInfo, 0))
VioSetCurType (&OldcursorInfo, 0); /* reset to previous value */
return 0;
}
void SLang_reset_tty (void)
{
atEnd = 1; /* set flag and wait until thread ends */
while (atEnd) {DosSleep (0);}
CloseSem();
/* close the keyboard */
KbdSetStatus(&initialKbdInfo, 0); /* restore original state */
}
#define keyWaiting() (endBuf != startBuf)
/* sleep for *tsecs tenths of a sec waiting for input */
int SLsys_input_pending(int tsecs)
{
int count = tsecs * 5;
if (count)
{
while(count > 0)
{
DosSleep(20); /* 20 ms or 1/50 sec */
if (keyWaiting ()) break;
count--;
}
return(count);
}
else return(keyWaiting ());
}
unsigned int SLsys_getkey ()
{
unsigned int c;
unsigned char scan;
int tsecs = 300;
if (!keyWaiting())
while (!SLsys_input_pending(tsecs));
/* read codes from buffer */
RequestSem();
startBuf = (startBuf + 1) % BUFFER_LEN;
c = threadKeys [startBuf].ascii;
scan = threadKeys [startBuf].scan;
ReleaseSem();
if ((c == 8) && (scan == 0x0e)) c = 127;
if (c == 0xE0) c = 0;
if (c == 0) SLang_ungetkey (scan);
return (c);
}
void SLang_set_abort_signal (void (*dum)(int))
{
(void) dum;
}

6
src/.cvsignore Normal file
View File

@ -0,0 +1,6 @@
cons.saver
mcmft
mcmfmt
mfmt
mc
Makefile

2
vfs/.cvsignore Normal file
View File

@ -0,0 +1,2 @@
mcserv
Makefile

8
vfs/extfs/.cvsignore Normal file
View File

@ -0,0 +1,8 @@
rar
deb
cpio
lha
lslR
zoo
zip
ftplist