annotate src/dosfns.c @ 13433:21a9f15132d7

[win32] (face-menu-read-color, list-colors-display, facemenu-color-equal, face-menu-get-face): Test for 'win32 window system as well as 'x.
author Geoff Voelker <voelker@cs.washington.edu>
date Tue, 07 Nov 1995 07:48:36 +0000
parents 59663cba4b02
children 342d919f52b2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 /* MS-DOS specific Lisp utilities. Coded by Manabu Higashida, 1991.
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2 Major changes May-July 1993 Morten Welinder (only 10% original code left)
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3 Copyright (C) 1991, 1993 Free Software Foundation, Inc.
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5 This file is part of GNU Emacs.
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
7 GNU Emacs is free software; you can redistribute it and/or modify
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8 it under the terms of the GNU General Public License as published by
10504
8a1bd0598b49 Comment change.
Richard M. Stallman <rms@gnu.org>
parents: 9572
diff changeset
9 the Free Software Foundation; either version 2, or (at your option)
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10 any later version.
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
11
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
12 GNU Emacs is distributed in the hope that it will be useful,
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
15 GNU General Public License for more details.
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
16
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
18 along with GNU Emacs; see the file COPYING. If not, write to
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
19 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
20
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
21
5980
a203b7c30300 Use <...> for config.h.
Richard M. Stallman <rms@gnu.org>
parents: 5503
diff changeset
22 #include <config.h>
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
23
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
24 #ifdef MSDOS
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
25 /* The entire file is within this conditional */
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 #include <stdio.h>
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28 #include <dos.h>
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29 #include "lisp.h"
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30 #include "buffer.h"
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31 #include "termchar.h"
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32 #include "termhooks.h"
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
33 #include "frame.h"
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
34 #include "dosfns.h"
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
35 #include "msdos.h"
13180
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
36 #include <go32.h>
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
37
7272
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
38 DEFUN ("mode25", Fmode25, Smode25, 0, 0, "", "\
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
39 Changes the number of rows to 25.")
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
40 ()
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
41 {
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
42 union REGS regs;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
43
7272
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
44 #ifdef HAVE_X_WINDOWS
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
45 if (!inhibit_window_system)
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
46 return Qnil;
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
47 #endif
12990
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
48 mouse_off ();
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
49 regs.x.ax = 3;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
50 int86 (0x10, &regs, &regs);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
51 regs.x.ax = 0x1101;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
52 regs.h.bl = 0;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
53 int86 (0x10, &regs, &regs);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
54 regs.x.ax = 0x1200;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
55 regs.h.bl = 32;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
56 int86 (0x10, &regs, &regs);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
57 regs.x.ax = 3;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
58 int86 (0x10, &regs, &regs);
7272
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
59 Fset_frame_size (Fselected_frame (), ScreenCols (), ScreenRows ());
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
60 Frecenter (Qnil);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
61 Fredraw_display ();
7272
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
62 if (have_mouse) mouse_init ();
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
63 return Qnil;
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
64 }
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
65
7272
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
66 DEFUN ("mode4350", Fmode4350, Smode4350, 0, 0, "", "\
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
67 Changes the number of rows to 43 (EGA) or 50 (VGA).")
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
68 ()
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
69 {
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
70 union REGS regs;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
71
7272
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
72 #ifdef HAVE_X_WINDOWS
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
73 if (!inhibit_window_system)
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
74 return Qnil;
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
75 #endif
12990
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
76 mouse_off ();
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
77 regs.x.ax = 3;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
78 int86 (0x10, &regs, &regs);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
79 regs.x.ax = 0x1112;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
80 regs.h.bl = 0;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
81 int86 (0x10, &regs, &regs);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
82 regs.x.ax = 0x1200;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
83 regs.h.bl = 32;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
84 int86 (0x10, &regs, &regs);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
85 regs.x.ax = 0x0100;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
86 regs.x.cx = 7;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
87 int86 (0x10, &regs, &regs);
7272
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
88 Fset_frame_size (Fselected_frame (), ScreenCols (), ScreenRows ());
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
89 Frecenter (Qnil);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
90 Fredraw_display ();
7272
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
91 if (have_mouse) mouse_init ();
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
92 return Qnil;
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
93 }
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
94
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
95 DEFUN ("int86", Fint86, Sint86, 2, 2, 0,
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
96 "Call specific MSDOS interrupt number INTERRUPT with REGISTERS.\n\
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
97 Return the updated REGISTER vector.\n\
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
98 \n\
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
99 INTERRUPT should be an integer in the range 0 to 255.\n\
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
100 REGISTERS should be a vector produced by `make-register' and\n\
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
101 `set-register-value'.")
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
102 (intno, regs)
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
103 Lisp_Object intno, regs;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
104 {
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
105 register int i;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
106 int no;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
107 union REGS inregs, outregs;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
108 Lisp_Object val;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
109
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
110 CHECK_NUMBER (intno, 0);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
111 no = (unsigned long) XINT (intno);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
112 CHECK_VECTOR (regs, 1);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
113 if (no < 0 || no > 0xff || XVECTOR (regs)-> size != 8)
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
114 return Qnil;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
115 for (i = 0; i < 8; i++)
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
116 CHECK_NUMBER (XVECTOR (regs)->contents[i], 1);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
117
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
118 inregs.x.ax = (unsigned long) XFASTINT (XVECTOR (regs)->contents[0]);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
119 inregs.x.bx = (unsigned long) XFASTINT (XVECTOR (regs)->contents[1]);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
120 inregs.x.cx = (unsigned long) XFASTINT (XVECTOR (regs)->contents[2]);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
121 inregs.x.dx = (unsigned long) XFASTINT (XVECTOR (regs)->contents[3]);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
122 inregs.x.si = (unsigned long) XFASTINT (XVECTOR (regs)->contents[4]);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
123 inregs.x.di = (unsigned long) XFASTINT (XVECTOR (regs)->contents[5]);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
124 inregs.x.cflag = (unsigned long) XFASTINT (XVECTOR (regs)->contents[6]);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
125 inregs.x.flags = (unsigned long) XFASTINT (XVECTOR (regs)->contents[7]);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
126
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
127 int86 (no, &inregs, &outregs);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
128
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
129 XVECTOR (regs)->contents[0] = make_number (outregs.x.ax);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
130 XVECTOR (regs)->contents[1] = make_number (outregs.x.bx);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
131 XVECTOR (regs)->contents[2] = make_number (outregs.x.cx);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
132 XVECTOR (regs)->contents[3] = make_number (outregs.x.dx);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
133 XVECTOR (regs)->contents[4] = make_number (outregs.x.si);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
134 XVECTOR (regs)->contents[5] = make_number (outregs.x.di);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
135 XVECTOR (regs)->contents[6] = make_number (outregs.x.cflag);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
136 XVECTOR (regs)->contents[7] = make_number (outregs.x.flags);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
137
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
138 return regs;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
139 }
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
140
13180
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
141 DEFUN ("msdos-memget", Fdos_memget, Sdos_memget, 2, 2, 0,
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
142 "Read DOS memory at offset ADDRESS into VECTOR.\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
143 Return the updated VECTOR.")
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
144 (addr, v)
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
145 Lisp_Object addr, v;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
146 {
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
147 register int i;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
148 int offs, len;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
149 char *buf;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
150 Lisp_Object val;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
151
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
152 CHECK_NUMBER (addr, 0);
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
153 offs = (unsigned long) XINT (addr);
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
154 CHECK_VECTOR (v, 1);
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
155 len = XVECTOR (v)-> size;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
156 if (len < 1 || len > 2048 || addr < 0 || addr > 0xfffff - len)
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
157 return Qnil;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
158 buf = alloca (len);
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
159 dosmemget (offs, len, buf);
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
160
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
161 for (i = 0; i < len; i++)
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
162 XVECTOR (v)->contents[i] = make_number (buf[i]);
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
163
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
164 return v;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
165 }
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
166
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
167 DEFUN ("msdos-memput", Fdos_memput, Sdos_memput, 2, 2, 0,
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
168 "Write DOS memory at offset ADDRESS from VECTOR.")
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
169 (addr, v)
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
170 Lisp_Object addr, v;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
171 {
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
172 register int i;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
173 int offs, len;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
174 char *buf;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
175 Lisp_Object val;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
176
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
177 CHECK_NUMBER (addr, 0);
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
178 offs = (unsigned long) XINT (addr);
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
179 CHECK_VECTOR (v, 1);
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
180 len = XVECTOR (v)-> size;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
181 if (len < 1 || len > 2048 || addr < 0 || addr > 0xfffff - len)
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
182 return Qnil;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
183 buf = alloca (len);
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
184
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
185 for (i = 0; i < len; i++)
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
186 {
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
187 CHECK_NUMBER (XVECTOR (v)->contents[i], 1);
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
188 buf[i] = (unsigned char) XFASTINT (XVECTOR (v)->contents[i]) & 0xFF;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
189 }
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
190
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
191 dosmemput (buf, len, offs);
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
192 return Qt;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
193 }
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
194
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
195 DEFUN ("msdos-set-keyboard", Fmsdos_set_keyboard, Smsdos_set_keyboard, 1, 2, 0,
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
196 "Set keyboard layout according to COUNTRY.\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
197 If the optional argument ALLKEYS is non-nil, the keyboard is mapped for\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
198 all keys; otherwise it is only used when the ALT key is pressed.\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
199 The current keyboard layout is available in dos-keyboard-code.")
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
200 (country_code, allkeys)
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
201 Lisp_Object country_code;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
202 {
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
203 CHECK_NUMBER (country_code, 0);
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
204 if (!dos_set_keyboard (XINT (country_code), !NILP (allkeys)))
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
205 return Qnil;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
206 return Qt;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
207 }
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
208
9572
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
209 #ifndef HAVE_X_WINDOWS
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
210 /* Later we might want to control the mouse interface with this function,
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
211 e.g., with respect to non-80 column screen modes. */
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
212
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
213 DEFUN ("msdos-mouse-p", Fmsdos_mouse_p, Smsdos_mouse_p, 0, 0, 0, "\
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
214 Report whether a mouse is present.")
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
215 ()
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
216 {
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
217 if (have_mouse)
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
218 return Qt;
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
219 else
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
220 return Qnil;
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
221 }
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
222
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
223 DEFUN ("set-mouse-position", Fset_mouse_position, Sset_mouse_position, 3, 3, 0,
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
224 "Move the mouse pointer to the center of character cell (X,Y) in FRAME.\n\
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
225 WARNING: If you use this under X windows,\n\
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
226 you should call `unfocus-frame' afterwards.")
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
227 (frame, x, y)
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
228 Lisp_Object frame, x, y;
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
229 {
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
230 mouse_moveto (XINT (x), XINT (y));
12990
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
231 return Qnil;
9572
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
232 }
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
233
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
234 /* Function to translate colour names to integers. See lisp/term/pc-win.el
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
235 for its definition. */
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
236
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
237 Lisp_Object Qmsdos_color_translate;
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
238 #endif
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
239
12990
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
240
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
241 DEFUN ("msdos-mouse-init", Fmsdos_mouse_init, Smsdos_mouse_init, 0, 0, "",
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
242 "Initialize and enable mouse if available.")
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
243 ()
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
244 {
13180
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
245 if (have_mouse)
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
246 {
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
247 have_mouse = 1;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
248 mouse_init ();
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
249 return Qt;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
250 }
12990
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
251 return Qnil;
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
252 }
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
253
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
254 DEFUN ("msdos-mouse-enable", Fmsdos_mouse_enable, Smsdos_mouse_enable, 0, 0, "",
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
255 "Enable mouse if available.")
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
256 ()
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
257 {
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
258 if (have_mouse)
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
259 {
13180
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
260 have_mouse = 1;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
261 mouse_on ();
12990
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
262 }
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
263 return have_mouse ? Qt : Qnil;
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
264 }
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
265
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
266 DEFUN ("msdos-mouse-disable", Fmsdos_mouse_disable, Smsdos_mouse_disable, 0, 0, "",
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
267 "Disable mouse if available.")
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
268 ()
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
269 {
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
270 mouse_off ();
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
271 if (have_mouse) have_mouse = -1;
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
272 return Qnil;
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
273 }
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
274
13180
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
275 DEFUN ("insert-startup-screen", Finsert_startup_screen, Sinsert_startup_screen, 0, 0, "", "\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
276 Insert copy of screen contents prior to starting emacs.\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
277 Return nil if startup screen is not available.")
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
278 ()
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
279 {
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
280 char *s;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
281 int rows, cols;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
282 int i, j;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
283
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
284 if (!dos_get_saved_screen (&s, &rows, &cols))
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
285 return Qnil;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
286
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
287 for (i = 0; i < rows; i++)
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
288 {
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
289 for (j = 0; j < cols; j++)
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
290 {
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
291 insert_char (*s, 1);
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
292 s += 2;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
293 }
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
294 insert_char ('\n', 1);
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
295 }
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
296
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
297 return Qt;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
298 }
12990
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
299
9572
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
300
13180
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
301 /* country info */
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
302 int dos_country_code;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
303 int dos_codepage;
13180
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
304 int dos_timezone_offset;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
305 int dos_decimal_point;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
306 int dos_keyboard_layout;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
307 unsigned char dos_country_info[DOS_COUNTRY_INFO];
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
308
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
309 int dos_hyper_key;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
310 int dos_super_key;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
311 int dos_keypad_mode;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
312
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
313 Lisp_Object Vdos_version;
13180
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
314 Lisp_Object Vdos_display_scancodes;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
315 Lisp_Object Vdos_menubar_clock;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
316 Lisp_Object Vdos_timer_hooks;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
317
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
318 void
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
319 init_dosfns ()
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
320 {
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
321 union REGS regs;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
322 _go32_dpmi_seginfo info;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
323 _go32_dpmi_registers dpmiregs;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
324
9572
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
325 #ifndef SYSTEM_MALLOC
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
326 get_lim_data (); /* why the hell isn't this called elsewhere? */
9572
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
327 #endif
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
328
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
329 regs.x.ax = 0x3000;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
330 intdos (&regs, &regs);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
331 Vdos_version = Fcons (make_number (regs.h.al), make_number (regs.h.ah));
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
332
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
333 /* Obtain the country code by calling Dos via Dpmi. Don't rely on GO32. */
13180
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
334 info.size = (sizeof(dos_country_info) + 15) / 16;
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
335 if (_go32_dpmi_allocate_dos_memory (&info))
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
336 dos_country_code = 1;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
337 else
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
338 {
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
339 dpmiregs.x.ax = 0x3800;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
340 dpmiregs.x.ds = info.rm_segment;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
341 dpmiregs.x.dx = 0;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
342 dpmiregs.x.ss = dpmiregs.x.sp = 0;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
343 _go32_dpmi_simulate_int (0x21, &dpmiregs);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
344 dos_country_code = dpmiregs.x.bx;
13180
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
345 dosmemget (info.rm_segment * 16, DOS_COUNTRY_INFO, dos_country_info);
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
346 _go32_dpmi_free_dos_memory (&info);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
347 }
13180
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
348 dos_set_keyboard (dos_country_code, 0);
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
349
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
350 regs.x.ax = 0x6601;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
351 intdos (&regs, &regs);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
352 if (regs.x.cflag)
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
353 /* Estimate code page from country code */
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
354 switch (dos_country_code)
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
355 {
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
356 case 45: /* Denmark */
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
357 case 47: /* Norway */
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
358 dos_codepage = 865;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
359 break;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
360 default:
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
361 /* US */
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
362 dos_codepage = 437;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
363 }
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
364 else
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
365 dos_codepage = regs.x.bx & 0xffff;
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
366 }
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
367
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
368 /*
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
369 * Define everything
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
370 */
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
371 syms_of_dosfns ()
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
372 {
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
373 defsubr (&Smode25);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
374 defsubr (&Smode4350);
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
375 defsubr (&Sint86);
13180
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
376 defsubr (&Sdos_memget);
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
377 defsubr (&Sdos_memput);
12990
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
378 defsubr (&Smsdos_mouse_init);
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
379 defsubr (&Smsdos_mouse_enable);
13180
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
380 defsubr (&Smsdos_set_keyboard);
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
381 defsubr (&Sinsert_startup_screen);
12990
93cc41315528 (Fmsdos_mouse_enable, Fmsdos_mouse_disable)
Richard M. Stallman <rms@gnu.org>
parents: 10504
diff changeset
382 defsubr (&Smsdos_mouse_disable);
9572
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
383 #ifndef HAVE_X_WINDOWS
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
384 defsubr (&Smsdos_mouse_p);
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
385 defsubr (&Sset_mouse_position);
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
386
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
387 Qmsdos_color_translate = intern ("msdos-color-translate");
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
388 staticpro (&Qmsdos_color_translate);
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7272
diff changeset
389 #endif
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
390
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
391 DEFVAR_INT ("dos-country-code", &dos_country_code,
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
392 "The country code returned by Dos when Emacs was started.\n\
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
393 Usually this is the international telephone prefix.");
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
394
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
395 DEFVAR_INT ("dos-codepage", &dos_codepage,
13180
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
396 "The codepage active when Emacs was started.\n\
7272
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
397 The following are known:\n\
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
398 437 United States\n\
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
399 850 Multilingual (Latin I)\n\
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
400 852 Slavic (Latin II)\n\
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
401 857 Turkish\n\
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
402 860 Portugal\n\
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
403 861 Iceland\n\
b5f74966c9da Finish downcasing mouse_init1, mouse_off,
Richard M. Stallman <rms@gnu.org>
parents: 5980
diff changeset
404 863 Canada (French)\n\
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
405 865 Norway/Denmark");
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
406
13180
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
407 DEFVAR_INT ("dos-timezone-offset", &dos_timezone_offset,
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
408 "The current timezone offset to UTC in minutes.
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
409 Implicitly modified when the TZ variable is changed.");
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
410
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
411 DEFVAR_LISP ("dos-version", &Vdos_version,
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
412 "The (MAJOR . MINOR) Dos version (subject to modification with setver).");
13180
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
413
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
414 DEFVAR_LISP ("dos-display-scancodes", &Vdos_display_scancodes,
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
415 "*When non-nil, the keyboard scan-codes are displayed at the bottom right\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
416 corner of the display (typically at the end of the mode line).\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
417 The output format is: scan code:char code*modifiers.");
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
418 Vdos_display_scancodes = Qnil;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
419
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
420 DEFVAR_LISP ("dos-menubar-clock", &Vdos_menubar_clock,
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
421 "*When non-nil, the current time is displayed in the upper right\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
422 corner of the screen (typically at the end of the menu bar).");
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
423 Vdos_menubar_clock = Qt;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
424
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
425 DEFVAR_LISP ("dos-timer-hooks", &Vdos_timer_hooks,
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
426 "List of hooks which are run every second.");
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
427 Vdos_timer_hooks = Qnil;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
428
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
429 DEFVAR_INT ("dos-hyper-key", &dos_hyper_key,
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
430 "*If set to 1, use right ALT key as hyper key.\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
431 If set to 2, use right CTRL key as hyper key.");
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
432 dos_hyper_key = 0;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
433
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
434 DEFVAR_INT ("dos-super-key", &dos_super_key,
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
435 "*If set to 1, use right ALT key as super key.\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
436 If set to 2, use right CTRL key as super key.");
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
437 dos_super_key = 0;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
438
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
439 DEFVAR_INT ("dos-keypad-mode", &dos_keypad_mode,
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
440 "*Controls what key code is returned by a key in the numeric keypad.\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
441 The `numlock ON' action is only taken if no modifier keys are pressed.\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
442 The value is an integer constructed by adding the following bits together:\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
443 \n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
444 0x00 Digit key returns digit (if numlock ON)\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
445 0x01 Digit key returns kp-digit (if numlock ON)\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
446 0x02 Digit key returns M-digit (if numlock ON)\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
447 0x03 Digit key returns edit key (if numlock ON)\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
448 \n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
449 0x00 Grey key returns char (if numlock ON)\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
450 0x04 Grey key returns kp-key (if numlock ON)\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
451 \n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
452 0x00 Digit key returns digit (if numlock OFF)\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
453 0x10 Digit key returns kp-digit (if numlock OFF)\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
454 0x20 Digit key returns M-digit (if numlock OFF)\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
455 0x30 Digit key returns edit key (if numlock OFF)\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
456 \n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
457 0x00 Grey key returns char (if numlock OFF)\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
458 0x40 Grey key returns kp-key (if numlock OFF)\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
459 \n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
460 0x200 ALT-0..ALT-9 in top-row produces shifted codes.");
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
461 dos_keypad_mode = 0x70;
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
462
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
463 DEFVAR_INT ("dos-keyboard-layout", &dos_keyboard_layout,
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
464 "Contains the country code for the current keyboard layout.\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
465 Use msdos-set-keyboard to select another keyboard layout.");
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
466 dos_keyboard_layout = 1; /* US */
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
467
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
468 DEFVAR_INT ("dos-decimal-point", &dos_decimal_point,
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
469 "If non-zero, it contains the character to be returned when the\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
470 decimal point key in the numeric keypad is pressed when Num Lock is on.\n\
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
471 If zero, the decimal point key returns the country code specific value.");
59663cba4b02 (insert-startup-screen): New function.
Kim F. Storm <storm@cua.dk>
parents: 12990
diff changeset
472 dos_decimal_point = 0;
5503
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
473 }
003e84b91d21 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
474 #endif /* MSDOS */