Sweden-Number/debugger/readline/editline.c

1280 lines
20 KiB
C
Raw Normal View History

Release 0.4.3 Tue Sep 28 19:59:21 1993 David Metcalfe * [windows/win.c] Implemented support for windows with no borders. Added GetParent(), GetDlgCtrlID(), GetWindowText() and GetWindowTextLength() functions. * [misc/xt.c] Added processing of WM_GETTEXT and WM_GETTEXTLENGTH messages to DefWindowProc and Implemented MessageBeep(). * [windows/syscolor.c] Added preliminary system color support. * [controls/button1.c] Mods to new button control and integration with Wine. Tue Sep 28 19:59:21 1993 Johannes Ruscheinski * [controls/button1.c] New button control using GDI functions. Tue Sep 28 19:59:21 1993 Eric Youngdale * [debugger/*] Added debugging capabilities to Wine Sat Sep 25 13:22:50 1993 Alexandre Julliard (julliard@di.epfl.ch) * [objects/region.c] Bug fix Fri Sep 24 07:35:11 1993 Bob Amstadt (bob at pooh) * [tools/build.c] Changed the entry point code to reduce the standard entry point size from 22 bytes to 10 bytes. This leaves about 4000 free entry points instead of the 800 in version 0.4.2. * [loader/resource.c] Rewrote functions to allow loading of resources from any DLL. * [loader/wine.c] [include/wine.h] Added functions GetFilenameFromInstance() and GetFileInfo() to search for a loaded file based on its instance handle. Added a field in struct w_files to make searching by an instance handle faster. Tue Sep 21 09:57:01 1993 miguel@roxanne.nuclecu.unam.mx (Miguel de Icaza) * [misc/profile.c] Implementation of .INI file handling Mon Sep 20 10:54:32 1993 David Metcalfe * [misc/profile.c.old] Implementation of .INI file handling Mon Sep 20 10:54:32 1993 John Brezak * [controls/WinButton.c] Bug fix with call to XtVaSetValues. Mon Sep 20 10:54:32 1993 Alexandre Julliard * [windows/win.c] Quick patch to get colormaps to work with button widget. Mon Sep 20 02:42:54 1993 (yngvi@hafro.is) * misc/keyboard.c: Ifdefed out some bogus Ansi<->Oem conversion functions * misc/lstr.c: New file with string functions like lstr* IsChar* *Ansi* Wed Sep 15 20:35:10 1993 John Brezak * [loader/signal.c] Additional changes to support NetBSD. Wed Sep 15 22:19:22 1993 Martin Ayotte * [windows/graphics.c] Added FrameRect function Tue Sep 14 13:54:45 1993 Alexandre Julliard * [objects/color.c] [objects/palette.c] Preliminary support for private color map. * [windows/class.c] Implemented CS_CLASSDC style. * [windows/dce.c] Moved DCEs to USER heap. Implemented class and window DCs. * [windows/event.c] Implemented CS_DBLCLKS style. * [windows/graphics.c] Bug fix in SetPixel(). * [windows/win.c] Implemented CS_OWNDC style. Implemented Get/SetWindowLong(). * [controls/menu.c] [windows/class.c] [windows/clipping.c] [windows/dce.c] [windows/message.c] [windows/win.c] Moved windows from global heap to USER heap.
1993-09-29 13:21:49 +01:00
/* $Revision: 1.4 $
**
** Main editing routines for editline library.
*/
#include "editline.h"
#include <ctype.h>
Release 941122 Sun Nov 20 18:30:06 1994 Alexandre Julliard (julliard@lamisun.epfl.ch) * [controls/scroll.c] [include/scroll.h] Rewritten most of scroll-bar code for better Windows look & feel. Implemented EnableScrollBar(). Preliminary keyboard support. * [objects/bitblt.c] Fixed BadMatch error for BitBlt() and StretchBlt() when reading bits from outside the visible region. * [objects/oembitmap.c] [include/bitmaps/obm_*] Use XPM symbolic colors to load bitmaps. This allows the colors of the bitmaps to depend on the system colors. * [tools/make_debug] Made the make_debug script more robust. * [windows/dialog.c] Fixed CheckRadioButton(). * [windows/nonclient.c] A few changes to scroll-bar drawing and tracking. * [windows/winpos.c] Renamed NextWindowFromPoint() to WINPOS_NextWindowFromPoint() to avoid confusion, and optimized it somewhat. Nov 19, 94 Martin Ayotte (wine@trgcorp.mksinfo.qc.ca) * [misc/audio.c] * [misc/mcianim.c] more coding but nothing spectacular. * [misc/mmaux.c] some coding to access '/dev/mixer'. * [misc/midi.c] some coding to read .MID files, but it's not playing yet. Sun Nov 13 19:31:03 1994 James Youngman (mbcstjy@afs.man.ac.uk) * [objects/dib.c] Reimplemented DIB_SetImageBits_RLE8() so that it would cope with bitmaps which don't end 0x00, 0x02 (previously it blew up). This includes some bitmaps output by Paint Shop Pro. Implementation is possibly now too lax. Please see the notes on the function about why. * [controls/desktop.c] The desktop pattern should be painted if the wallpaper doesn't cover the whole screen width OR the whole screen height. Sun Nov 13 00:07:11 MET 1994 Erik Bos <erik@xs4all.nl> * [objects/dib.c] Small bug in DIB_SetImageBits() fixed, bitmaps in 16,24 bpp now work. * [loader/ne_resource.c] [include/resource.h] Some cleanup. Thu Nov 10 20:44:58 1994 Martin von Loewis (martin@cs.csufresno.edu) * [Configure] [rc/sysres.rc] Primitive compile-time support for multiple languages * [rc/sysres_De.rc] New file * [loader/resource.c] LoadBitmap: Recognize end of sysresbm properly * [rc/Imakefile] Rules to compile resources simplified, dependencies changed * [rc/sysresbm.rc] Don't use sysresbm if using XPM * [windows/dialog.c] CreateDialogIndirectParam: Reverse Z-order of controls * [windows/message.c] MSG_TranslateMouseMsg: Fix HTTRANSPARENT handling * [windows/winpos.c] NextWindowFromPoint: New function * [controls/button.c] WM_NCHITTEST: Group Box is HTTRANSPARENT BUTTON_CheckAutoRadioButton: New function BM_SETCHECK: Added call to BUTTON_CheckAutoRadioButton Mon Nov 7 11:20:26 1994 Paul Falstad (pf@zoof.cts.com) * [objects/text.c] Fix hang when using DrawText(..., DT_WORDBREAK) with a word that is too long to break. * [objects/font.c] Don't assume helvetica if there is no font family; let the other font attributes decide what font to use. * [controls/widgets.c] Listboxes and combo boxes need to be notified of double-clicks. * [controls/listbox.c] [include/listbox.h] scrolling to bottom of list box should display last item at the bottom, not at the top. list boxes need to allocate a separate heap for their item data, rather than using the user heap. Otherwise, it's very easy to run out of memory for list box items. removed redundant code in ListBoxAddString(). Implemented simple version of LBS_SORT. Don't put [.] in the list box when using DDL_DIRECTORY. * [controls/combo.c] Combos should pass CBS_SORT onto their list box. * [windows/win.c] If window creation is aborted, remove the window from the linked lists. * [controls/static.c] static controls with SS_ICON were always returning 0 from WM_NCCREATE. Make sure static controls have text to draw before drawing it.
1994-11-22 17:31:29 +01:00
#include <stdlib.h>
Release 0.4.3 Tue Sep 28 19:59:21 1993 David Metcalfe * [windows/win.c] Implemented support for windows with no borders. Added GetParent(), GetDlgCtrlID(), GetWindowText() and GetWindowTextLength() functions. * [misc/xt.c] Added processing of WM_GETTEXT and WM_GETTEXTLENGTH messages to DefWindowProc and Implemented MessageBeep(). * [windows/syscolor.c] Added preliminary system color support. * [controls/button1.c] Mods to new button control and integration with Wine. Tue Sep 28 19:59:21 1993 Johannes Ruscheinski * [controls/button1.c] New button control using GDI functions. Tue Sep 28 19:59:21 1993 Eric Youngdale * [debugger/*] Added debugging capabilities to Wine Sat Sep 25 13:22:50 1993 Alexandre Julliard (julliard@di.epfl.ch) * [objects/region.c] Bug fix Fri Sep 24 07:35:11 1993 Bob Amstadt (bob at pooh) * [tools/build.c] Changed the entry point code to reduce the standard entry point size from 22 bytes to 10 bytes. This leaves about 4000 free entry points instead of the 800 in version 0.4.2. * [loader/resource.c] Rewrote functions to allow loading of resources from any DLL. * [loader/wine.c] [include/wine.h] Added functions GetFilenameFromInstance() and GetFileInfo() to search for a loaded file based on its instance handle. Added a field in struct w_files to make searching by an instance handle faster. Tue Sep 21 09:57:01 1993 miguel@roxanne.nuclecu.unam.mx (Miguel de Icaza) * [misc/profile.c] Implementation of .INI file handling Mon Sep 20 10:54:32 1993 David Metcalfe * [misc/profile.c.old] Implementation of .INI file handling Mon Sep 20 10:54:32 1993 John Brezak * [controls/WinButton.c] Bug fix with call to XtVaSetValues. Mon Sep 20 10:54:32 1993 Alexandre Julliard * [windows/win.c] Quick patch to get colormaps to work with button widget. Mon Sep 20 02:42:54 1993 (yngvi@hafro.is) * misc/keyboard.c: Ifdefed out some bogus Ansi<->Oem conversion functions * misc/lstr.c: New file with string functions like lstr* IsChar* *Ansi* Wed Sep 15 20:35:10 1993 John Brezak * [loader/signal.c] Additional changes to support NetBSD. Wed Sep 15 22:19:22 1993 Martin Ayotte * [windows/graphics.c] Added FrameRect function Tue Sep 14 13:54:45 1993 Alexandre Julliard * [objects/color.c] [objects/palette.c] Preliminary support for private color map. * [windows/class.c] Implemented CS_CLASSDC style. * [windows/dce.c] Moved DCEs to USER heap. Implemented class and window DCs. * [windows/event.c] Implemented CS_DBLCLKS style. * [windows/graphics.c] Bug fix in SetPixel(). * [windows/win.c] Implemented CS_OWNDC style. Implemented Get/SetWindowLong(). * [controls/menu.c] [windows/class.c] [windows/clipping.c] [windows/dce.c] [windows/message.c] [windows/win.c] Moved windows from global heap to USER heap.
1993-09-29 13:21:49 +01:00
/*
** Manifest constants.
*/
#define SCREEN_WIDTH 80
#define SCREEN_ROWS 24
#define NO_ARG (-1)
#define DEL 127
#define CTL(x) ((x) & 0x1F)
#define ISCTL(x) ((x) && (x) < ' ')
#define UNCTL(x) ((x) + 64)
#define META(x) ((x) | 0x80)
#define ISMETA(x) ((x) & 0x80)
#define UNMETA(x) ((x) & 0x7F)
#if !defined(HIST_SIZE)
#define HIST_SIZE 20
#endif /* !defined(HIST_SIZE) */
/*
** Command status codes.
*/
typedef enum _STATUS {
CSdone, CSeof, CSmove, CSdispatch, CSstay
} STATUS;
/*
** The type of case-changing to perform.
*/
typedef enum _CASE {
TOupper, TOlower
} CASE;
/*
** Key to command mapping.
*/
typedef struct _KEYMAP {
CHAR Key;
STATUS (*Function)();
} KEYMAP;
/*
** Command history structure.
*/
typedef struct _HISTORY {
int Size;
int Pos;
CHAR *Lines[HIST_SIZE];
} HISTORY;
/*
** Globals.
*/
int rl_eof;
int rl_erase;
int rl_intr;
int rl_kill;
STATIC CHAR NIL[] = "";
STATIC CONST CHAR *Input = NIL;
STATIC CHAR *Line;
STATIC CONST char *Prompt;
STATIC CHAR *Yanked;
STATIC char *Screen;
STATIC char NEWLINE[]= CRLF;
STATIC HISTORY H;
int rl_quit;
STATIC int Repeat;
STATIC int End;
STATIC int Mark;
STATIC int OldPoint;
STATIC int Point;
STATIC int PushBack;
STATIC int Pushed;
Release 950727 Sat Jul 22 22:39:09 IDT 1995 Michael Veksler <e1678223@tochnapc2.technion.ac.il> * [ipc/*] New directory. This directory contains the new inter-wine communications support. It enables DDE protocols between two wine instances. Currently it is limited to DDE, but can be enhanced to support OLE between 2 different wine instances. This is very important for libwine.a DDE/OLE support. * [tools/ipcl] A script to delete garbage IPC handles (shared memory, semaphores and message queues). The current inter-wine communication is not perfect, and sometimes leaves garbage behind. * [if1632/relay.c] [include/atom.h] [include/global.h] [loader/selector.c] [loader/task.c] [loader/module.c] [loader/signal.c] [memory/global.c] [misc/atom.c] [windows/class.c] [windows/message.c] [windows/win.c] [Imakefile] Hooks for inter-wine DDE support, current Global.*Atom functions renamed to Local.*Atom since Global.*Atom are used for Inter-Wine DDE communication. (The first call to these functions sets up the IPC structures - which otherwise cause unneeded overhead. Mon Jul 17 19:55:21 1995 Alexandre Julliard <julliard@sunsite.unc.edu> * [controls/menu.c] Don't crash if a NULL string is passed to menu functions. * [memory/selector.c] We now use a bit in ldt_flags_copy to indicate free LDT entries. Fixed a bug in SELECTOR_ReallocBlock that could cause it to overwrite valid LDT entries when growing a block. * [miscemu/instr.c] Emulate int xx instruction by storing the interrupt vector in CS:IP and returning directly. This allows a program to install an interrupt vector. * [windows/win.c] Added function WIN_GetTopParent to get the top-level parent of a window. Sun Jul 16 18:17:17 1995 Gregory Trubetskoy <grisha@mira.com> * [loader/resource.c] Added LoadIconHandler. It doesn't do anything yet, but now you can use borland help files with winhelp.exe. Sun Jul 16 11:58:45 1995 Anand Kumria <akumria@ozemail.com.au> * [misc/main.c] Fixed to return 386 Enhanced mode correctly. Also return the same type of CPU, for both Enhanced and Standard mode, namely a 386. Sun Jul 16 00:02:04 1995 Martin von Loewis <loewis@informatik.hu-berlin.de> * [Configure] [include/options.h] [include/wineopts.h] [misc/main.c][misc/spy.c] Removed support of spy file. Redirected spy messages to stddeb. Removed -spy option. Added -debugmsg +spy option. * [debugger/dbg.y][debugger/debug.l] Enabled segmented addresses (seg:offs) for break and x commands. * [if1632/gdi.spec] [objects/region.c] [windows/graphics.c] [include/region.h] FrameRgn, REGION_FrameRgn: New functions * [if1632/kernel.spec] IsWinOldApTask: Return false * [if1632/mouse.spec] CplApplet: Removed * [if1632/user.spec] [windows/win.c] ShowOwnedPopups: New function * [if1632/winsock.spec] [misc/winsocket.c] inet_addr, select: New prototypes in relay code Fixed memory layout for netdb functions (getXbyY). WINSOCK_ioctlsocket: Translated FIONREAD, FIONBIO, and FIOASYNC * [objects/clipping.c] RectVisible: Fixed call to LPToDP * [rc/winerc.c] main: Removed extra argument to getopt for Linux. Tue Jul 11 00:14:41 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> * [controls/listbox.c] Yet another fix for ListBoxDirectory(). * [loader/module.c] [if1632/kernel.spec] Make GetModuleHandle() accept instance handles as parameter. * [if1632/relay.c] [loader/task.c] Put a magic cookie at the bottom of the 32 bit stack, and check on each return from a 32 bit function whether it's still there. Complain if it's not. * [if1632/user.spec] Wrong entry for CloseDriver(). * [misc/dos_fs.c] [loader/task.c] [include/dos_fs.h] [misc/file.c] [miscemu/int21.c] Large parts of dos_fs.c simplified. Changed it to use one current drive/directory per task, which is set to the module path on task creation. Prevent CorelPaint from closing stdin. open() with O_CREAT set must be passed three parameters. DOS FindFirst()/FindNext() could crash when FA_LABEL was set. Fixed, it's in DOS_readdir() now. * [misc/profile.c] Some badly written software (Lotus Freelance Graphics) passes a bogus size parameter that caused Wine to write off the end of a segment. Fixed. (It's probably too paranoid now.) * [multimedia/mmsystem.c] [multimedia/time.c] [multimedia/joystick.c] [multimedia/Imakefile] [if1632/winprocs.spec] 16 bit entry point for MMSysTimeCallback. Split off time.c and joystick.c from mmsystem.c. * [objects/dib.c] GetDIBits(): call XGetImage() via CallTo32_LargeStack. * [windows/cursor.c] DestroyCursor(): do nothing for builtin cursors. * [windows/mdi.c] Half of WM_MDISETMENU implemented. * [windows/win.c] EnumWindows() and EnumTaskWindows() never enumerated any windows. Fixed. * [windows/*.c] Fixed GetParent() to return correct values for owned windows. * [windows/message.c] Don't try to activate disabled top-level windows. * [windows/nonclient.c] Work around a bug in gcc-2.7.0. * [tools/build.c] [include/stackframe.h] [memory/global.c] [loader/task.c] [memory/selector.c] Some Visual Basic programs (and possibly others, too) expect ES to be preserved by a call to an API function, so we have to save it. In GlobalFree() and FreeSelector(), we must clear CURRENT_STACK16->es to prevent segfaults if ES contained the selector to be freed. Sun Jul 9 20:21:20 1995 Jon Tombs <jon@gtex02.us.es> * [*/*] Added missing prototypes to header files and relevant includes to reduce compile time warnings. Sun Jul 9 18:32:56 1995 Michael Patra <micky@marie.physik.tu-berlin.de> * [configure.in] [include/config.h] [*/Makefile.in] New configuration scheme based on autoconf. Sat Jul 8 14:12:45 1995 Morten Welinder <terra+@cs.cmu.edu> * [miscemu/ioports.c] Revamp to have only one in- and one out- variant, both really implemented. * [miscemu/instr.c] INSTR_EmulateInstruction: Use new ioport interface. Implement string io. Correct instruction pointer for 32-bit code. * [include/miscemu.h] Update port function prototypes. * [include/registers.h] Defined FS and GS. Sat Jul 8 13:38:54 1995 Hans de Graaff <graaff@twi72.twi.tudelft.nl> * [misc/dos_fs.c] ChopOffSlash(): A path consisting off a single slash is left intact, and multiple slashes are all removed.
1995-07-29 15:09:43 +02:00
STATIC KEYMAP Map[33];
STATIC KEYMAP MetaMap[16];
Release 0.4.3 Tue Sep 28 19:59:21 1993 David Metcalfe * [windows/win.c] Implemented support for windows with no borders. Added GetParent(), GetDlgCtrlID(), GetWindowText() and GetWindowTextLength() functions. * [misc/xt.c] Added processing of WM_GETTEXT and WM_GETTEXTLENGTH messages to DefWindowProc and Implemented MessageBeep(). * [windows/syscolor.c] Added preliminary system color support. * [controls/button1.c] Mods to new button control and integration with Wine. Tue Sep 28 19:59:21 1993 Johannes Ruscheinski * [controls/button1.c] New button control using GDI functions. Tue Sep 28 19:59:21 1993 Eric Youngdale * [debugger/*] Added debugging capabilities to Wine Sat Sep 25 13:22:50 1993 Alexandre Julliard (julliard@di.epfl.ch) * [objects/region.c] Bug fix Fri Sep 24 07:35:11 1993 Bob Amstadt (bob at pooh) * [tools/build.c] Changed the entry point code to reduce the standard entry point size from 22 bytes to 10 bytes. This leaves about 4000 free entry points instead of the 800 in version 0.4.2. * [loader/resource.c] Rewrote functions to allow loading of resources from any DLL. * [loader/wine.c] [include/wine.h] Added functions GetFilenameFromInstance() and GetFileInfo() to search for a loaded file based on its instance handle. Added a field in struct w_files to make searching by an instance handle faster. Tue Sep 21 09:57:01 1993 miguel@roxanne.nuclecu.unam.mx (Miguel de Icaza) * [misc/profile.c] Implementation of .INI file handling Mon Sep 20 10:54:32 1993 David Metcalfe * [misc/profile.c.old] Implementation of .INI file handling Mon Sep 20 10:54:32 1993 John Brezak * [controls/WinButton.c] Bug fix with call to XtVaSetValues. Mon Sep 20 10:54:32 1993 Alexandre Julliard * [windows/win.c] Quick patch to get colormaps to work with button widget. Mon Sep 20 02:42:54 1993 (yngvi@hafro.is) * misc/keyboard.c: Ifdefed out some bogus Ansi<->Oem conversion functions * misc/lstr.c: New file with string functions like lstr* IsChar* *Ansi* Wed Sep 15 20:35:10 1993 John Brezak * [loader/signal.c] Additional changes to support NetBSD. Wed Sep 15 22:19:22 1993 Martin Ayotte * [windows/graphics.c] Added FrameRect function Tue Sep 14 13:54:45 1993 Alexandre Julliard * [objects/color.c] [objects/palette.c] Preliminary support for private color map. * [windows/class.c] Implemented CS_CLASSDC style. * [windows/dce.c] Moved DCEs to USER heap. Implemented class and window DCs. * [windows/event.c] Implemented CS_DBLCLKS style. * [windows/graphics.c] Bug fix in SetPixel(). * [windows/win.c] Implemented CS_OWNDC style. Implemented Get/SetWindowLong(). * [controls/menu.c] [windows/class.c] [windows/clipping.c] [windows/dce.c] [windows/message.c] [windows/win.c] Moved windows from global heap to USER heap.
1993-09-29 13:21:49 +01:00
STATIC SIZE_T Length;
STATIC SIZE_T ScreenCount;
STATIC SIZE_T ScreenSize;
STATIC char *backspace;
STATIC int TTYwidth;
STATIC int TTYrows;
/* Display print 8-bit chars as `M-x' or as the actual 8-bit char? */
int rl_meta_chars = 1;
/*
** Declarations.
*/
STATIC CHAR *editinput();
extern int read();
extern int write();
#if defined(USE_TERMCAP)
extern char *getenv();
extern char *tgetstr();
extern int tgetent();
#endif /* defined(USE_TERMCAP) */
/*
** TTY input/output functions.
*/
STATIC void
TTYflush()
{
if (ScreenCount) {
(void)write(1, Screen, ScreenCount);
ScreenCount = 0;
}
}
STATIC void
TTYput(c)
CHAR c;
{
Screen[ScreenCount] = c;
if (++ScreenCount >= ScreenSize - 1) {
ScreenSize += SCREEN_INC;
RENEW(Screen, char, ScreenSize);
}
}
STATIC void
TTYputs(p)
CHAR *p;
{
while (*p)
TTYput(*p++);
}
STATIC void
TTYshow(c)
CHAR c;
{
if (c == DEL) {
TTYput('^');
TTYput('?');
}
else if (ISCTL(c)) {
TTYput('^');
TTYput(UNCTL(c));
}
else if (rl_meta_chars && ISMETA(c)) {
TTYput('M');
TTYput('-');
TTYput(UNMETA(c));
}
else
TTYput(c);
}
STATIC void
TTYstring(p)
CHAR *p;
{
while (*p)
TTYshow(*p++);
}
STATIC unsigned int
TTYget()
{
CHAR c;
TTYflush();
if (Pushed) {
Pushed = 0;
return PushBack;
}
if (*Input)
return *Input++;
return read(0, &c, (SIZE_T)1) == 1 ? c : EOF;
}
#define TTYback() (backspace ? TTYputs((CHAR *)backspace) : TTYput('\b'))
STATIC void
TTYbackn(n)
int n;
{
while (--n >= 0)
TTYback();
}
STATIC void
TTYinfo()
{
static int init;
#if defined(USE_TERMCAP)
char *term;
char buff[2048];
char *bp;
#endif /* defined(USE_TERMCAP) */
#if defined(TIOCGWINSZ)
struct winsize W;
#endif /* defined(TIOCGWINSZ) */
if (init) {
#if defined(TIOCGWINSZ)
/* Perhaps we got resized. */
if (ioctl(0, TIOCGWINSZ, &W) >= 0
&& W.ws_col > 0 && W.ws_row > 0) {
TTYwidth = (int)W.ws_col;
TTYrows = (int)W.ws_row;
}
#endif /* defined(TIOCGWINSZ) */
return;
}
init++;
TTYwidth = TTYrows = 0;
#if defined(USE_TERMCAP)
bp = &buff[0];
if ((term = getenv("TERM")) == NULL)
term = "dumb";
if (tgetent(buff, term) < 0) {
TTYwidth = SCREEN_WIDTH;
TTYrows = SCREEN_ROWS;
return;
}
backspace = tgetstr("le", &bp);
TTYwidth = tgetnum("co");
TTYrows = tgetnum("li");
#endif /* defined(USE_TERMCAP) */
#if defined(TIOCGWINSZ)
if (ioctl(0, TIOCGWINSZ, &W) >= 0) {
TTYwidth = (int)W.ws_col;
TTYrows = (int)W.ws_row;
}
#endif /* defined(TIOCGWINSZ) */
if (TTYwidth <= 0 || TTYrows <= 0) {
TTYwidth = SCREEN_WIDTH;
TTYrows = SCREEN_ROWS;
}
}
STATIC void
reposition()
{
int i;
CHAR *p;
TTYput('\r');
TTYputs((CHAR *)Prompt);
for (i = Point, p = Line; --i >= 0; p++)
TTYshow(*p);
}
STATIC void
left(Change)
STATUS Change;
{
TTYback();
if (Point) {
if (ISCTL(Line[Point - 1]))
TTYback();
else if (rl_meta_chars && ISMETA(Line[Point - 1])) {
TTYback();
TTYback();
}
}
if (Change == CSmove)
Point--;
}
STATIC void
right(Change)
STATUS Change;
{
TTYshow(Line[Point]);
if (Change == CSmove)
Point++;
}
STATIC STATUS
ring_bell()
{
TTYput('\07');
TTYflush();
return CSstay;
}
STATIC STATUS
do_macro(c)
unsigned int c;
{
CHAR name[4];
name[0] = '_';
name[1] = c;
name[2] = '_';
name[3] = '\0';
if ((Input = (CHAR *)getenv((char *)name)) == NULL) {
Input = NIL;
return ring_bell();
}
return CSstay;
}
STATIC STATUS
do_forward(move)
STATUS move;
{
int i;
CHAR *p;
i = 0;
do {
p = &Line[Point];
for ( ; Point < End && (*p == ' ' || !isalnum(*p)); Point++, p++)
if (move == CSmove)
right(CSstay);
for (; Point < End && isalnum(*p); Point++, p++)
if (move == CSmove)
right(CSstay);
if (Point == End)
break;
} while (++i < Repeat);
return CSstay;
}
STATIC STATUS
do_case(type)
CASE type;
{
int i;
int end;
int count;
CHAR *p;
(void)do_forward(CSstay);
if (OldPoint != Point) {
if ((count = Point - OldPoint) < 0)
count = -count;
Point = OldPoint;
if ((end = Point + count) > End)
end = End;
for (i = Point, p = &Line[i]; i < end; i++, p++) {
if (type == TOupper) {
if (islower(*p))
*p = toupper(*p);
}
else if (isupper(*p))
*p = tolower(*p);
right(CSmove);
}
}
return CSstay;
}
STATIC STATUS
case_down_word()
{
return do_case(TOlower);
}
STATIC STATUS
case_up_word()
{
return do_case(TOupper);
}
STATIC void
ceol()
{
int extras;
int i;
CHAR *p;
for (extras = 0, i = Point, p = &Line[i]; i <= End; i++, p++) {
TTYput(' ');
if (ISCTL(*p)) {
TTYput(' ');
extras++;
}
else if (rl_meta_chars && ISMETA(*p)) {
TTYput(' ');
TTYput(' ');
extras += 2;
}
}
for (i += extras; i > Point; i--)
TTYback();
}
STATIC void
clear_line()
{
Point = -strlen(Prompt);
TTYput('\r');
ceol();
Point = 0;
End = 0;
Line[0] = '\0';
}
STATIC STATUS
insert_string(p)
CHAR *p;
{
SIZE_T len;
int i;
CHAR *new;
CHAR *q;
len = strlen((char *)p);
if (End + len >= Length) {
if ((new = NEW(CHAR, Length + len + MEM_INC)) == NULL)
return CSstay;
if (Length) {
COPYFROMTO(new, Line, Length);
DISPOSE(Line);
}
Line = new;
Length += len + MEM_INC;
}
for (q = &Line[Point], i = End - Point; --i >= 0; )
q[len + i] = q[i];
COPYFROMTO(&Line[Point], p, len);
End += len;
Line[End] = '\0';
TTYstring(&Line[Point]);
Point += len;
return Point == End ? CSstay : CSmove;
}
STATIC CHAR *
next_hist()
{
return H.Pos >= H.Size - 1 ? NULL : H.Lines[++H.Pos];
}
STATIC CHAR *
prev_hist()
{
return H.Pos == 0 ? NULL : H.Lines[--H.Pos];
}
STATIC STATUS
do_insert_hist(p)
CHAR *p;
{
if (p == NULL)
return ring_bell();
Point = 0;
reposition();
ceol();
End = 0;
return insert_string(p);
}
STATIC STATUS
do_hist(move)
CHAR *(*move)();
{
CHAR *p;
int i;
i = 0;
do {
if ((p = (*move)()) == NULL)
return ring_bell();
} while (++i < Repeat);
return do_insert_hist(p);
}
STATIC STATUS
h_next()
{
return do_hist(next_hist);
}
STATIC STATUS
h_prev()
{
return do_hist(prev_hist);
}
STATIC STATUS
h_first()
{
return do_insert_hist(H.Lines[H.Pos = 0]);
}
STATIC STATUS
h_last()
{
return do_insert_hist(H.Lines[H.Pos = H.Size - 1]);
}
/*
** Return zero if pat appears as a substring in text.
*/
STATIC int
substrcmp(text, pat, len)
char *text;
char *pat;
int len;
{
CHAR c;
if ((c = *pat) == '\0')
return *text == '\0';
for ( ; *text; text++)
if ((CHAR)*text == c && strncmp(text, pat, len) == 0)
Release 0.4.3 Tue Sep 28 19:59:21 1993 David Metcalfe * [windows/win.c] Implemented support for windows with no borders. Added GetParent(), GetDlgCtrlID(), GetWindowText() and GetWindowTextLength() functions. * [misc/xt.c] Added processing of WM_GETTEXT and WM_GETTEXTLENGTH messages to DefWindowProc and Implemented MessageBeep(). * [windows/syscolor.c] Added preliminary system color support. * [controls/button1.c] Mods to new button control and integration with Wine. Tue Sep 28 19:59:21 1993 Johannes Ruscheinski * [controls/button1.c] New button control using GDI functions. Tue Sep 28 19:59:21 1993 Eric Youngdale * [debugger/*] Added debugging capabilities to Wine Sat Sep 25 13:22:50 1993 Alexandre Julliard (julliard@di.epfl.ch) * [objects/region.c] Bug fix Fri Sep 24 07:35:11 1993 Bob Amstadt (bob at pooh) * [tools/build.c] Changed the entry point code to reduce the standard entry point size from 22 bytes to 10 bytes. This leaves about 4000 free entry points instead of the 800 in version 0.4.2. * [loader/resource.c] Rewrote functions to allow loading of resources from any DLL. * [loader/wine.c] [include/wine.h] Added functions GetFilenameFromInstance() and GetFileInfo() to search for a loaded file based on its instance handle. Added a field in struct w_files to make searching by an instance handle faster. Tue Sep 21 09:57:01 1993 miguel@roxanne.nuclecu.unam.mx (Miguel de Icaza) * [misc/profile.c] Implementation of .INI file handling Mon Sep 20 10:54:32 1993 David Metcalfe * [misc/profile.c.old] Implementation of .INI file handling Mon Sep 20 10:54:32 1993 John Brezak * [controls/WinButton.c] Bug fix with call to XtVaSetValues. Mon Sep 20 10:54:32 1993 Alexandre Julliard * [windows/win.c] Quick patch to get colormaps to work with button widget. Mon Sep 20 02:42:54 1993 (yngvi@hafro.is) * misc/keyboard.c: Ifdefed out some bogus Ansi<->Oem conversion functions * misc/lstr.c: New file with string functions like lstr* IsChar* *Ansi* Wed Sep 15 20:35:10 1993 John Brezak * [loader/signal.c] Additional changes to support NetBSD. Wed Sep 15 22:19:22 1993 Martin Ayotte * [windows/graphics.c] Added FrameRect function Tue Sep 14 13:54:45 1993 Alexandre Julliard * [objects/color.c] [objects/palette.c] Preliminary support for private color map. * [windows/class.c] Implemented CS_CLASSDC style. * [windows/dce.c] Moved DCEs to USER heap. Implemented class and window DCs. * [windows/event.c] Implemented CS_DBLCLKS style. * [windows/graphics.c] Bug fix in SetPixel(). * [windows/win.c] Implemented CS_OWNDC style. Implemented Get/SetWindowLong(). * [controls/menu.c] [windows/class.c] [windows/clipping.c] [windows/dce.c] [windows/message.c] [windows/win.c] Moved windows from global heap to USER heap.
1993-09-29 13:21:49 +01:00
return 0;
return 1;
}
STATIC CHAR *
search_hist(search, move)
CHAR *search;
CHAR *(*move)();
{
static CHAR *old_search;
int len;
int pos;
int (*match)();
char *pat;
/* Save or get remembered search pattern. */
if (search && *search) {
if (old_search)
DISPOSE(old_search);
old_search = (CHAR *)strdup((char *)search);
}
else {
if (old_search == NULL || *old_search == '\0')
return NULL;
search = old_search;
}
/* Set up pattern-finder. */
if (*search == '^') {
match = strncmp;
pat = (char *)(search + 1);
}
else {
match = substrcmp;
pat = (char *)search;
}
len = strlen(pat);
for (pos = H.Pos; (*move)() != NULL; )
if ((*match)((char *)H.Lines[H.Pos], pat, len) == 0)
return H.Lines[H.Pos];
H.Pos = pos;
return NULL;
}
STATIC STATUS
h_search()
{
static int Searching;
CONST char *old_prompt;
CHAR *(*move)();
CHAR *p;
if (Searching)
return ring_bell();
Searching = 1;
clear_line();
old_prompt = Prompt;
Prompt = "Search: ";
TTYputs((CHAR *)Prompt);
move = Repeat == NO_ARG ? prev_hist : next_hist;
p = search_hist(editinput(), move);
clear_line();
Prompt = old_prompt;
TTYputs((CHAR *)Prompt);
Searching = 0;
return do_insert_hist(p);
}
STATIC STATUS
fd_char()
{
int i;
i = 0;
do {
if (Point >= End)
break;
right(CSmove);
} while (++i < Repeat);
return CSstay;
}
STATIC void
save_yank(begin, i)
int begin;
int i;
{
if (Yanked) {
DISPOSE(Yanked);
Yanked = NULL;
}
if (i < 1)
return;
if ((Yanked = NEW(CHAR, (SIZE_T)i + 1)) != NULL) {
COPYFROMTO(Yanked, &Line[begin], i);
Yanked[i] = '\0';
}
}
STATIC STATUS
delete_string(count)
int count;
{
int i;
CHAR *p;
if (count <= 0 || End == Point)
return ring_bell();
if (count == 1 && Point == End - 1) {
/* Optimize common case of delete at end of line. */
End--;
p = &Line[Point];
i = 1;
TTYput(' ');
if (ISCTL(*p)) {
i = 2;
TTYput(' ');
}
else if (rl_meta_chars && ISMETA(*p)) {
i = 3;
TTYput(' ');
TTYput(' ');
}
TTYbackn(i);
*p = '\0';
return CSmove;
}
if (Point + count > End && (count = End - Point) <= 0)
return CSstay;
if (count > 1)
save_yank(Point, count);
for (p = &Line[Point], i = End - (Point + count) + 1; --i >= 0; p++)
p[0] = p[count];
ceol();
End -= count;
TTYstring(&Line[Point]);
return CSmove;
}
STATIC STATUS
bk_char()
{
int i;
i = 0;
do {
if (Point == 0)
break;
left(CSmove);
} while (++i < Repeat);
return CSstay;
}
STATIC STATUS
bk_del_char()
{
int i;
i = 0;
do {
if (Point == 0)
break;
left(CSmove);
} while (++i < Repeat);
return delete_string(i);
}
STATIC STATUS
redisplay()
{
TTYputs((CHAR *)NEWLINE);
TTYputs((CHAR *)Prompt);
TTYstring(Line);
return CSmove;
}
STATIC STATUS
kill_line()
{
int i;
if (Repeat != NO_ARG) {
if (Repeat < Point) {
i = Point;
Point = Repeat;
reposition();
(void)delete_string(i - Point);
}
else if (Repeat > Point) {
right(CSmove);
(void)delete_string(Repeat - Point - 1);
}
return CSmove;
}
save_yank(Point, End - Point);
Line[Point] = '\0';
ceol();
End = Point;
return CSstay;
}
STATIC STATUS
insert_char(c)
int c;
{
STATUS s;
CHAR buff[2];
CHAR *p;
CHAR *q;
int i;
if (Repeat == NO_ARG || Repeat < 2) {
buff[0] = c;
buff[1] = '\0';
return insert_string(buff);
}
if ((p = NEW(CHAR, Repeat + 1)) == NULL)
return CSstay;
for (i = Repeat, q = p; --i >= 0; )
*q++ = c;
*q = '\0';
Repeat = 0;
s = insert_string(p);
DISPOSE(p);
return s;
}
STATIC STATUS
meta()
{
unsigned int c;
KEYMAP *kp;
if ((c = TTYget()) == EOF)
return CSeof;
#if defined(ANSI_ARROWS)
/* Also include VT-100 arrows. */
if (c == '[' || c == 'O')
switch (c = TTYget()) {
default: return ring_bell();
case EOF: return CSeof;
case 'A': return h_prev();
case 'B': return h_next();
case 'C': return fd_char();
case 'D': return bk_char();
}
#endif /* defined(ANSI_ARROWS) */
if (isdigit(c)) {
for (Repeat = c - '0'; (c = TTYget()) != EOF && isdigit(c); )
Repeat = Repeat * 10 + c - '0';
Pushed = 1;
PushBack = c;
return CSstay;
}
if (isupper(c))
return do_macro(c);
for (OldPoint = Point, kp = MetaMap; kp->Function; kp++)
if (kp->Key == c)
return (*kp->Function)();
return ring_bell();
}
STATIC STATUS
emacs(c)
unsigned int c;
{
STATUS s;
KEYMAP *kp;
if (ISMETA(c)) {
Pushed = 1;
PushBack = UNMETA(c);
return meta();
}
for (kp = Map; kp->Function; kp++)
if (kp->Key == c)
break;
s = kp->Function ? (*kp->Function)() : insert_char((int)c);
if (!Pushed)
/* No pushback means no repeat count; hacky, but true. */
Repeat = NO_ARG;
return s;
}
STATIC STATUS
TTYspecial(c)
unsigned int c;
{
if (ISMETA(c))
return CSdispatch;
if (c == rl_erase || c == DEL)
return bk_del_char();
if (c == rl_kill) {
if (Point != 0) {
Point = 0;
reposition();
}
Repeat = NO_ARG;
return kill_line();
}
if (c == rl_intr || c == rl_quit) {
Point = End = 0;
Line[0] = '\0';
return redisplay();
}
if (c == rl_eof && Point == 0 && End == 0)
return CSeof;
return CSdispatch;
}
STATIC CHAR *
editinput()
{
unsigned int c;
Repeat = NO_ARG;
OldPoint = Point = Mark = End = 0;
Line[0] = '\0';
while ((c = TTYget()) != EOF)
switch (TTYspecial(c)) {
case CSdone:
return Line;
case CSeof:
return NULL;
case CSmove:
reposition();
break;
case CSdispatch:
switch (emacs(c)) {
case CSdone:
return Line;
case CSeof:
return NULL;
case CSmove:
reposition();
break;
case CSdispatch:
case CSstay:
break;
}
break;
case CSstay:
break;
}
return NULL;
}
STATIC void
hist_add(p)
CHAR *p;
{
int i;
if ((p = (CHAR *)strdup((char *)p)) == NULL)
return;
if (H.Size < HIST_SIZE)
H.Lines[H.Size++] = p;
else {
DISPOSE(H.Lines[0]);
for (i = 0; i < HIST_SIZE - 1; i++)
H.Lines[i] = H.Lines[i + 1];
H.Lines[i] = p;
}
H.Pos = H.Size - 1;
}
/*
** For compatibility with FSF readline.
*/
/* ARGSUSED0 */
void
rl_reset_terminal(p)
char *p;
{
}
void
rl_initialize()
{
}
char *
readline(prompt)
CONST char *prompt;
{
CHAR *line;
if (Line == NULL) {
Length = MEM_INC;
if ((Line = NEW(CHAR, Length)) == NULL)
return NULL;
}
TTYinfo();
rl_ttyset(0);
hist_add(NIL);
ScreenSize = SCREEN_INC;
Screen = NEW(char, ScreenSize);
Prompt = prompt ? prompt : (char *)NIL;
TTYputs((CHAR *)Prompt);
if ((line = editinput()) != NULL) {
line = (CHAR *)strdup((char *)line);
TTYputs((CHAR *)NEWLINE);
TTYflush();
}
rl_ttyset(1);
DISPOSE(Screen);
DISPOSE(H.Lines[--H.Size]);
return (char *)line;
}
void
add_history(p)
char *p;
{
if (p == NULL || *p == '\0')
return;
#if defined(UNIQUE_HISTORY)
if (H.Pos && strcmp(p, H.Lines[H.Pos - 1]) == 0)
return;
#endif /* defined(UNIQUE_HISTORY) */
hist_add((CHAR *)p);
}
STATIC STATUS
beg_line()
{
if (Point) {
Point = 0;
return CSmove;
}
return CSstay;
}
STATIC STATUS
del_char()
{
return delete_string(Repeat == NO_ARG ? 1 : Repeat);
}
STATIC STATUS
end_line()
{
if (Point != End) {
Point = End;
return CSmove;
}
return CSstay;
}
STATIC STATUS
accept_line()
{
Line[End] = '\0';
return CSdone;
}
STATIC STATUS
transpose()
{
CHAR c;
if (Point) {
if (Point == End)
left(CSmove);
c = Line[Point - 1];
left(CSstay);
Line[Point - 1] = Line[Point];
TTYshow(Line[Point - 1]);
Line[Point++] = c;
TTYshow(c);
}
return CSstay;
}
STATIC STATUS
quote()
{
unsigned int c;
return (c = TTYget()) == EOF ? CSeof : insert_char((int)c);
}
STATIC STATUS
wipe()
{
int i;
if (Mark > End)
return ring_bell();
if (Point > Mark) {
i = Point;
Point = Mark;
Mark = i;
reposition();
}
return delete_string(Mark - Point);
}
STATIC STATUS
mk_set()
{
Mark = Point;
return CSstay;
}
STATIC STATUS
exchange()
{
unsigned int c;
if ((c = TTYget()) != CTL('X'))
return c == EOF ? CSeof : ring_bell();
if ((c = Mark) <= End) {
Mark = Point;
Point = c;
return CSmove;
}
return CSstay;
}
STATIC STATUS
yank()
{
if (Yanked && *Yanked)
return insert_string(Yanked);
return CSstay;
}
STATIC STATUS
copy_region()
{
if (Mark > End)
return ring_bell();
if (Point > Mark)
save_yank(Mark, Point - Mark);
else
save_yank(Point, Mark - Point);
return CSstay;
}
STATIC STATUS
move_to_char()
{
unsigned int c;
int i;
CHAR *p;
if ((c = TTYget()) == EOF)
return CSeof;
for (i = Point + 1, p = &Line[i]; i < End; i++, p++)
if (*p == c) {
Point = i;
return CSmove;
}
return CSstay;
}
STATIC STATUS
fd_word()
{
return do_forward(CSmove);
}
STATIC STATUS
fd_kill_word()
{
int i;
(void)do_forward(CSstay);
if (OldPoint != Point) {
i = Point - OldPoint;
Point = OldPoint;
return delete_string(i);
}
return CSstay;
}
STATIC STATUS
bk_word()
{
int i;
CHAR *p;
i = 0;
do {
for (p = &Line[Point]; p > Line && !isalnum(p[-1]); p--)
left(CSmove);
for (; p > Line && p[-1] != ' ' && isalnum(p[-1]); p--)
left(CSmove);
if (Point == 0)
break;
} while (++i < Repeat);
return CSstay;
}
STATIC STATUS
bk_kill_word()
{
(void)bk_word();
if (OldPoint != Point)
return delete_string(OldPoint - Point);
return CSstay;
}
STATIC int
argify(line, avp)
CHAR *line;
CHAR ***avp;
{
CHAR *c;
CHAR **p;
CHAR **new;
int ac;
int i;
i = MEM_INC;
if ((*avp = p = NEW(CHAR*, i))== NULL)
return 0;
for (c = line; isspace(*c); c++)
continue;
if (*c == '\n' || *c == '\0')
return 0;
for (ac = 0, p[ac++] = c; *c && *c != '\n'; ) {
if (isspace(*c)) {
*c++ = '\0';
if (*c && *c != '\n') {
if (ac + 1 == i) {
new = NEW(CHAR*, i + MEM_INC);
if (new == NULL) {
p[ac] = NULL;
return ac;
}
COPYFROMTO(new, p, i * sizeof (char **));
i += MEM_INC;
DISPOSE(p);
*avp = p = new;
}
p[ac++] = c;
}
}
else
c++;
}
*c = '\0';
p[ac] = NULL;
return ac;
}
STATIC STATUS
last_argument()
{
CHAR **av;
CHAR *p;
STATUS s;
int ac;
if (H.Size == 1 || (p = H.Lines[H.Size - 2]) == NULL)
return ring_bell();
if ((p = (CHAR *)strdup((char *)p)) == NULL)
return CSstay;
ac = argify(p, &av);
if (Repeat != NO_ARG)
s = Repeat < ac ? insert_string(av[Repeat]) : ring_bell();
else
s = ac ? insert_string(av[ac - 1]) : CSstay;
if (ac)
DISPOSE(av);
DISPOSE(p);
return s;
}
STATIC KEYMAP Map[33] = {
{ CTL('@'), ring_bell },
{ CTL('A'), beg_line },
{ CTL('B'), bk_char },
{ CTL('D'), del_char },
{ CTL('E'), end_line },
{ CTL('F'), fd_char },
{ CTL('G'), ring_bell },
{ CTL('H'), bk_del_char },
Release 950727 Sat Jul 22 22:39:09 IDT 1995 Michael Veksler <e1678223@tochnapc2.technion.ac.il> * [ipc/*] New directory. This directory contains the new inter-wine communications support. It enables DDE protocols between two wine instances. Currently it is limited to DDE, but can be enhanced to support OLE between 2 different wine instances. This is very important for libwine.a DDE/OLE support. * [tools/ipcl] A script to delete garbage IPC handles (shared memory, semaphores and message queues). The current inter-wine communication is not perfect, and sometimes leaves garbage behind. * [if1632/relay.c] [include/atom.h] [include/global.h] [loader/selector.c] [loader/task.c] [loader/module.c] [loader/signal.c] [memory/global.c] [misc/atom.c] [windows/class.c] [windows/message.c] [windows/win.c] [Imakefile] Hooks for inter-wine DDE support, current Global.*Atom functions renamed to Local.*Atom since Global.*Atom are used for Inter-Wine DDE communication. (The first call to these functions sets up the IPC structures - which otherwise cause unneeded overhead. Mon Jul 17 19:55:21 1995 Alexandre Julliard <julliard@sunsite.unc.edu> * [controls/menu.c] Don't crash if a NULL string is passed to menu functions. * [memory/selector.c] We now use a bit in ldt_flags_copy to indicate free LDT entries. Fixed a bug in SELECTOR_ReallocBlock that could cause it to overwrite valid LDT entries when growing a block. * [miscemu/instr.c] Emulate int xx instruction by storing the interrupt vector in CS:IP and returning directly. This allows a program to install an interrupt vector. * [windows/win.c] Added function WIN_GetTopParent to get the top-level parent of a window. Sun Jul 16 18:17:17 1995 Gregory Trubetskoy <grisha@mira.com> * [loader/resource.c] Added LoadIconHandler. It doesn't do anything yet, but now you can use borland help files with winhelp.exe. Sun Jul 16 11:58:45 1995 Anand Kumria <akumria@ozemail.com.au> * [misc/main.c] Fixed to return 386 Enhanced mode correctly. Also return the same type of CPU, for both Enhanced and Standard mode, namely a 386. Sun Jul 16 00:02:04 1995 Martin von Loewis <loewis@informatik.hu-berlin.de> * [Configure] [include/options.h] [include/wineopts.h] [misc/main.c][misc/spy.c] Removed support of spy file. Redirected spy messages to stddeb. Removed -spy option. Added -debugmsg +spy option. * [debugger/dbg.y][debugger/debug.l] Enabled segmented addresses (seg:offs) for break and x commands. * [if1632/gdi.spec] [objects/region.c] [windows/graphics.c] [include/region.h] FrameRgn, REGION_FrameRgn: New functions * [if1632/kernel.spec] IsWinOldApTask: Return false * [if1632/mouse.spec] CplApplet: Removed * [if1632/user.spec] [windows/win.c] ShowOwnedPopups: New function * [if1632/winsock.spec] [misc/winsocket.c] inet_addr, select: New prototypes in relay code Fixed memory layout for netdb functions (getXbyY). WINSOCK_ioctlsocket: Translated FIONREAD, FIONBIO, and FIOASYNC * [objects/clipping.c] RectVisible: Fixed call to LPToDP * [rc/winerc.c] main: Removed extra argument to getopt for Linux. Tue Jul 11 00:14:41 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> * [controls/listbox.c] Yet another fix for ListBoxDirectory(). * [loader/module.c] [if1632/kernel.spec] Make GetModuleHandle() accept instance handles as parameter. * [if1632/relay.c] [loader/task.c] Put a magic cookie at the bottom of the 32 bit stack, and check on each return from a 32 bit function whether it's still there. Complain if it's not. * [if1632/user.spec] Wrong entry for CloseDriver(). * [misc/dos_fs.c] [loader/task.c] [include/dos_fs.h] [misc/file.c] [miscemu/int21.c] Large parts of dos_fs.c simplified. Changed it to use one current drive/directory per task, which is set to the module path on task creation. Prevent CorelPaint from closing stdin. open() with O_CREAT set must be passed three parameters. DOS FindFirst()/FindNext() could crash when FA_LABEL was set. Fixed, it's in DOS_readdir() now. * [misc/profile.c] Some badly written software (Lotus Freelance Graphics) passes a bogus size parameter that caused Wine to write off the end of a segment. Fixed. (It's probably too paranoid now.) * [multimedia/mmsystem.c] [multimedia/time.c] [multimedia/joystick.c] [multimedia/Imakefile] [if1632/winprocs.spec] 16 bit entry point for MMSysTimeCallback. Split off time.c and joystick.c from mmsystem.c. * [objects/dib.c] GetDIBits(): call XGetImage() via CallTo32_LargeStack. * [windows/cursor.c] DestroyCursor(): do nothing for builtin cursors. * [windows/mdi.c] Half of WM_MDISETMENU implemented. * [windows/win.c] EnumWindows() and EnumTaskWindows() never enumerated any windows. Fixed. * [windows/*.c] Fixed GetParent() to return correct values for owned windows. * [windows/message.c] Don't try to activate disabled top-level windows. * [windows/nonclient.c] Work around a bug in gcc-2.7.0. * [tools/build.c] [include/stackframe.h] [memory/global.c] [loader/task.c] [memory/selector.c] Some Visual Basic programs (and possibly others, too) expect ES to be preserved by a call to an API function, so we have to save it. In GlobalFree() and FreeSelector(), we must clear CURRENT_STACK16->es to prevent segfaults if ES contained the selector to be freed. Sun Jul 9 20:21:20 1995 Jon Tombs <jon@gtex02.us.es> * [*/*] Added missing prototypes to header files and relevant includes to reduce compile time warnings. Sun Jul 9 18:32:56 1995 Michael Patra <micky@marie.physik.tu-berlin.de> * [configure.in] [include/config.h] [*/Makefile.in] New configuration scheme based on autoconf. Sat Jul 8 14:12:45 1995 Morten Welinder <terra+@cs.cmu.edu> * [miscemu/ioports.c] Revamp to have only one in- and one out- variant, both really implemented. * [miscemu/instr.c] INSTR_EmulateInstruction: Use new ioport interface. Implement string io. Correct instruction pointer for 32-bit code. * [include/miscemu.h] Update port function prototypes. * [include/registers.h] Defined FS and GS. Sat Jul 8 13:38:54 1995 Hans de Graaff <graaff@twi72.twi.tudelft.nl> * [misc/dos_fs.c] ChopOffSlash(): A path consisting off a single slash is left intact, and multiple slashes are all removed.
1995-07-29 15:09:43 +02:00
{ CTL('I'), ring_bell },
Release 0.4.3 Tue Sep 28 19:59:21 1993 David Metcalfe * [windows/win.c] Implemented support for windows with no borders. Added GetParent(), GetDlgCtrlID(), GetWindowText() and GetWindowTextLength() functions. * [misc/xt.c] Added processing of WM_GETTEXT and WM_GETTEXTLENGTH messages to DefWindowProc and Implemented MessageBeep(). * [windows/syscolor.c] Added preliminary system color support. * [controls/button1.c] Mods to new button control and integration with Wine. Tue Sep 28 19:59:21 1993 Johannes Ruscheinski * [controls/button1.c] New button control using GDI functions. Tue Sep 28 19:59:21 1993 Eric Youngdale * [debugger/*] Added debugging capabilities to Wine Sat Sep 25 13:22:50 1993 Alexandre Julliard (julliard@di.epfl.ch) * [objects/region.c] Bug fix Fri Sep 24 07:35:11 1993 Bob Amstadt (bob at pooh) * [tools/build.c] Changed the entry point code to reduce the standard entry point size from 22 bytes to 10 bytes. This leaves about 4000 free entry points instead of the 800 in version 0.4.2. * [loader/resource.c] Rewrote functions to allow loading of resources from any DLL. * [loader/wine.c] [include/wine.h] Added functions GetFilenameFromInstance() and GetFileInfo() to search for a loaded file based on its instance handle. Added a field in struct w_files to make searching by an instance handle faster. Tue Sep 21 09:57:01 1993 miguel@roxanne.nuclecu.unam.mx (Miguel de Icaza) * [misc/profile.c] Implementation of .INI file handling Mon Sep 20 10:54:32 1993 David Metcalfe * [misc/profile.c.old] Implementation of .INI file handling Mon Sep 20 10:54:32 1993 John Brezak * [controls/WinButton.c] Bug fix with call to XtVaSetValues. Mon Sep 20 10:54:32 1993 Alexandre Julliard * [windows/win.c] Quick patch to get colormaps to work with button widget. Mon Sep 20 02:42:54 1993 (yngvi@hafro.is) * misc/keyboard.c: Ifdefed out some bogus Ansi<->Oem conversion functions * misc/lstr.c: New file with string functions like lstr* IsChar* *Ansi* Wed Sep 15 20:35:10 1993 John Brezak * [loader/signal.c] Additional changes to support NetBSD. Wed Sep 15 22:19:22 1993 Martin Ayotte * [windows/graphics.c] Added FrameRect function Tue Sep 14 13:54:45 1993 Alexandre Julliard * [objects/color.c] [objects/palette.c] Preliminary support for private color map. * [windows/class.c] Implemented CS_CLASSDC style. * [windows/dce.c] Moved DCEs to USER heap. Implemented class and window DCs. * [windows/event.c] Implemented CS_DBLCLKS style. * [windows/graphics.c] Bug fix in SetPixel(). * [windows/win.c] Implemented CS_OWNDC style. Implemented Get/SetWindowLong(). * [controls/menu.c] [windows/class.c] [windows/clipping.c] [windows/dce.c] [windows/message.c] [windows/win.c] Moved windows from global heap to USER heap.
1993-09-29 13:21:49 +01:00
{ CTL('J'), accept_line },
{ CTL('K'), kill_line },
{ CTL('L'), redisplay },
{ CTL('M'), accept_line },
{ CTL('N'), h_next },
{ CTL('O'), ring_bell },
{ CTL('P'), h_prev },
{ CTL('Q'), ring_bell },
{ CTL('R'), h_search },
{ CTL('S'), ring_bell },
{ CTL('T'), transpose },
{ CTL('U'), ring_bell },
{ CTL('V'), quote },
{ CTL('W'), wipe },
{ CTL('X'), exchange },
{ CTL('Y'), yank },
{ CTL('Z'), ring_bell },
{ CTL('['), meta },
{ CTL(']'), move_to_char },
{ CTL('^'), ring_bell },
{ CTL('_'), ring_bell },
{ 0, NULL }
};
STATIC KEYMAP MetaMap[16]= {
{ CTL('H'), bk_kill_word },
{ DEL, bk_kill_word },
{ ' ', mk_set },
{ '.', last_argument },
{ '<', h_first },
{ '>', h_last },
Release 950727 Sat Jul 22 22:39:09 IDT 1995 Michael Veksler <e1678223@tochnapc2.technion.ac.il> * [ipc/*] New directory. This directory contains the new inter-wine communications support. It enables DDE protocols between two wine instances. Currently it is limited to DDE, but can be enhanced to support OLE between 2 different wine instances. This is very important for libwine.a DDE/OLE support. * [tools/ipcl] A script to delete garbage IPC handles (shared memory, semaphores and message queues). The current inter-wine communication is not perfect, and sometimes leaves garbage behind. * [if1632/relay.c] [include/atom.h] [include/global.h] [loader/selector.c] [loader/task.c] [loader/module.c] [loader/signal.c] [memory/global.c] [misc/atom.c] [windows/class.c] [windows/message.c] [windows/win.c] [Imakefile] Hooks for inter-wine DDE support, current Global.*Atom functions renamed to Local.*Atom since Global.*Atom are used for Inter-Wine DDE communication. (The first call to these functions sets up the IPC structures - which otherwise cause unneeded overhead. Mon Jul 17 19:55:21 1995 Alexandre Julliard <julliard@sunsite.unc.edu> * [controls/menu.c] Don't crash if a NULL string is passed to menu functions. * [memory/selector.c] We now use a bit in ldt_flags_copy to indicate free LDT entries. Fixed a bug in SELECTOR_ReallocBlock that could cause it to overwrite valid LDT entries when growing a block. * [miscemu/instr.c] Emulate int xx instruction by storing the interrupt vector in CS:IP and returning directly. This allows a program to install an interrupt vector. * [windows/win.c] Added function WIN_GetTopParent to get the top-level parent of a window. Sun Jul 16 18:17:17 1995 Gregory Trubetskoy <grisha@mira.com> * [loader/resource.c] Added LoadIconHandler. It doesn't do anything yet, but now you can use borland help files with winhelp.exe. Sun Jul 16 11:58:45 1995 Anand Kumria <akumria@ozemail.com.au> * [misc/main.c] Fixed to return 386 Enhanced mode correctly. Also return the same type of CPU, for both Enhanced and Standard mode, namely a 386. Sun Jul 16 00:02:04 1995 Martin von Loewis <loewis@informatik.hu-berlin.de> * [Configure] [include/options.h] [include/wineopts.h] [misc/main.c][misc/spy.c] Removed support of spy file. Redirected spy messages to stddeb. Removed -spy option. Added -debugmsg +spy option. * [debugger/dbg.y][debugger/debug.l] Enabled segmented addresses (seg:offs) for break and x commands. * [if1632/gdi.spec] [objects/region.c] [windows/graphics.c] [include/region.h] FrameRgn, REGION_FrameRgn: New functions * [if1632/kernel.spec] IsWinOldApTask: Return false * [if1632/mouse.spec] CplApplet: Removed * [if1632/user.spec] [windows/win.c] ShowOwnedPopups: New function * [if1632/winsock.spec] [misc/winsocket.c] inet_addr, select: New prototypes in relay code Fixed memory layout for netdb functions (getXbyY). WINSOCK_ioctlsocket: Translated FIONREAD, FIONBIO, and FIOASYNC * [objects/clipping.c] RectVisible: Fixed call to LPToDP * [rc/winerc.c] main: Removed extra argument to getopt for Linux. Tue Jul 11 00:14:41 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> * [controls/listbox.c] Yet another fix for ListBoxDirectory(). * [loader/module.c] [if1632/kernel.spec] Make GetModuleHandle() accept instance handles as parameter. * [if1632/relay.c] [loader/task.c] Put a magic cookie at the bottom of the 32 bit stack, and check on each return from a 32 bit function whether it's still there. Complain if it's not. * [if1632/user.spec] Wrong entry for CloseDriver(). * [misc/dos_fs.c] [loader/task.c] [include/dos_fs.h] [misc/file.c] [miscemu/int21.c] Large parts of dos_fs.c simplified. Changed it to use one current drive/directory per task, which is set to the module path on task creation. Prevent CorelPaint from closing stdin. open() with O_CREAT set must be passed three parameters. DOS FindFirst()/FindNext() could crash when FA_LABEL was set. Fixed, it's in DOS_readdir() now. * [misc/profile.c] Some badly written software (Lotus Freelance Graphics) passes a bogus size parameter that caused Wine to write off the end of a segment. Fixed. (It's probably too paranoid now.) * [multimedia/mmsystem.c] [multimedia/time.c] [multimedia/joystick.c] [multimedia/Imakefile] [if1632/winprocs.spec] 16 bit entry point for MMSysTimeCallback. Split off time.c and joystick.c from mmsystem.c. * [objects/dib.c] GetDIBits(): call XGetImage() via CallTo32_LargeStack. * [windows/cursor.c] DestroyCursor(): do nothing for builtin cursors. * [windows/mdi.c] Half of WM_MDISETMENU implemented. * [windows/win.c] EnumWindows() and EnumTaskWindows() never enumerated any windows. Fixed. * [windows/*.c] Fixed GetParent() to return correct values for owned windows. * [windows/message.c] Don't try to activate disabled top-level windows. * [windows/nonclient.c] Work around a bug in gcc-2.7.0. * [tools/build.c] [include/stackframe.h] [memory/global.c] [loader/task.c] [memory/selector.c] Some Visual Basic programs (and possibly others, too) expect ES to be preserved by a call to an API function, so we have to save it. In GlobalFree() and FreeSelector(), we must clear CURRENT_STACK16->es to prevent segfaults if ES contained the selector to be freed. Sun Jul 9 20:21:20 1995 Jon Tombs <jon@gtex02.us.es> * [*/*] Added missing prototypes to header files and relevant includes to reduce compile time warnings. Sun Jul 9 18:32:56 1995 Michael Patra <micky@marie.physik.tu-berlin.de> * [configure.in] [include/config.h] [*/Makefile.in] New configuration scheme based on autoconf. Sat Jul 8 14:12:45 1995 Morten Welinder <terra+@cs.cmu.edu> * [miscemu/ioports.c] Revamp to have only one in- and one out- variant, both really implemented. * [miscemu/instr.c] INSTR_EmulateInstruction: Use new ioport interface. Implement string io. Correct instruction pointer for 32-bit code. * [include/miscemu.h] Update port function prototypes. * [include/registers.h] Defined FS and GS. Sat Jul 8 13:38:54 1995 Hans de Graaff <graaff@twi72.twi.tudelft.nl> * [misc/dos_fs.c] ChopOffSlash(): A path consisting off a single slash is left intact, and multiple slashes are all removed.
1995-07-29 15:09:43 +02:00
{ '?', ring_bell },
Release 0.4.3 Tue Sep 28 19:59:21 1993 David Metcalfe * [windows/win.c] Implemented support for windows with no borders. Added GetParent(), GetDlgCtrlID(), GetWindowText() and GetWindowTextLength() functions. * [misc/xt.c] Added processing of WM_GETTEXT and WM_GETTEXTLENGTH messages to DefWindowProc and Implemented MessageBeep(). * [windows/syscolor.c] Added preliminary system color support. * [controls/button1.c] Mods to new button control and integration with Wine. Tue Sep 28 19:59:21 1993 Johannes Ruscheinski * [controls/button1.c] New button control using GDI functions. Tue Sep 28 19:59:21 1993 Eric Youngdale * [debugger/*] Added debugging capabilities to Wine Sat Sep 25 13:22:50 1993 Alexandre Julliard (julliard@di.epfl.ch) * [objects/region.c] Bug fix Fri Sep 24 07:35:11 1993 Bob Amstadt (bob at pooh) * [tools/build.c] Changed the entry point code to reduce the standard entry point size from 22 bytes to 10 bytes. This leaves about 4000 free entry points instead of the 800 in version 0.4.2. * [loader/resource.c] Rewrote functions to allow loading of resources from any DLL. * [loader/wine.c] [include/wine.h] Added functions GetFilenameFromInstance() and GetFileInfo() to search for a loaded file based on its instance handle. Added a field in struct w_files to make searching by an instance handle faster. Tue Sep 21 09:57:01 1993 miguel@roxanne.nuclecu.unam.mx (Miguel de Icaza) * [misc/profile.c] Implementation of .INI file handling Mon Sep 20 10:54:32 1993 David Metcalfe * [misc/profile.c.old] Implementation of .INI file handling Mon Sep 20 10:54:32 1993 John Brezak * [controls/WinButton.c] Bug fix with call to XtVaSetValues. Mon Sep 20 10:54:32 1993 Alexandre Julliard * [windows/win.c] Quick patch to get colormaps to work with button widget. Mon Sep 20 02:42:54 1993 (yngvi@hafro.is) * misc/keyboard.c: Ifdefed out some bogus Ansi<->Oem conversion functions * misc/lstr.c: New file with string functions like lstr* IsChar* *Ansi* Wed Sep 15 20:35:10 1993 John Brezak * [loader/signal.c] Additional changes to support NetBSD. Wed Sep 15 22:19:22 1993 Martin Ayotte * [windows/graphics.c] Added FrameRect function Tue Sep 14 13:54:45 1993 Alexandre Julliard * [objects/color.c] [objects/palette.c] Preliminary support for private color map. * [windows/class.c] Implemented CS_CLASSDC style. * [windows/dce.c] Moved DCEs to USER heap. Implemented class and window DCs. * [windows/event.c] Implemented CS_DBLCLKS style. * [windows/graphics.c] Bug fix in SetPixel(). * [windows/win.c] Implemented CS_OWNDC style. Implemented Get/SetWindowLong(). * [controls/menu.c] [windows/class.c] [windows/clipping.c] [windows/dce.c] [windows/message.c] [windows/win.c] Moved windows from global heap to USER heap.
1993-09-29 13:21:49 +01:00
{ 'b', bk_word },
{ 'd', fd_kill_word },
{ 'f', fd_word },
{ 'l', case_down_word },
{ 'u', case_up_word },
{ 'y', yank },
{ 'w', copy_region },
{ 0, NULL }
};