20 |
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
21 |
Boston, MA 02111-1307, USA. */ |
Boston, MA 02111-1307, USA. */ |
22 |
|
|
|
|
|
23 |
#include <config.h> |
#include <config.h> |
24 |
|
|
25 |
#ifdef MSDOS |
#ifdef MSDOS |
67 |
CHECK_NUMBER (interrupt); |
CHECK_NUMBER (interrupt); |
68 |
no = (unsigned long) XINT (interrupt); |
no = (unsigned long) XINT (interrupt); |
69 |
CHECK_VECTOR (registers); |
CHECK_VECTOR (registers); |
70 |
if (no < 0 || no > 0xff || XVECTOR (registers)-> size != 8) |
if (no < 0 || no > 0xff || XVECTOR (registers)-> size != 8) |
71 |
return Qnil; |
return Qnil; |
72 |
for (i = 0; i < 8; i++) |
for (i = 0; i < 8; i++) |
73 |
CHECK_NUMBER (XVECTOR (registers)->contents[i]); |
CHECK_NUMBER (XVECTOR (registers)->contents[i]); |
110 |
offs = (unsigned long) XINT (address); |
offs = (unsigned long) XINT (address); |
111 |
CHECK_VECTOR (vector); |
CHECK_VECTOR (vector); |
112 |
len = XVECTOR (vector)-> size; |
len = XVECTOR (vector)-> size; |
113 |
if (len < 1 || len > 2048 || address < 0 || address > 0xfffff - len) |
if (len < 1 || len > 2048 || address < 0 || address > 0xfffff - len) |
114 |
return Qnil; |
return Qnil; |
115 |
buf = alloca (len); |
buf = alloca (len); |
116 |
dosmemget (offs, len, buf); |
dosmemget (offs, len, buf); |
117 |
|
|
118 |
for (i = 0; i < len; i++) |
for (i = 0; i < len; i++) |
119 |
XVECTOR (vector)->contents[i] = make_number (buf[i]); |
XVECTOR (vector)->contents[i] = make_number (buf[i]); |
120 |
|
|
135 |
offs = (unsigned long) XINT (address); |
offs = (unsigned long) XINT (address); |
136 |
CHECK_VECTOR (vector); |
CHECK_VECTOR (vector); |
137 |
len = XVECTOR (vector)-> size; |
len = XVECTOR (vector)-> size; |
138 |
if (len < 1 || len > 2048 || address < 0 || address > 0xfffff - len) |
if (len < 1 || len > 2048 || address < 0 || address > 0xfffff - len) |
139 |
return Qnil; |
return Qnil; |
140 |
buf = alloca (len); |
buf = alloca (len); |
141 |
|
|
178 |
} |
} |
179 |
#endif |
#endif |
180 |
|
|
|
|
|
181 |
DEFUN ("msdos-mouse-init", Fmsdos_mouse_init, Smsdos_mouse_init, 0, 0, "", |
DEFUN ("msdos-mouse-init", Fmsdos_mouse_init, Smsdos_mouse_init, 0, 0, "", |
182 |
doc: /* Initialize and enable mouse if available. */) |
doc: /* Initialize and enable mouse if available. */) |
183 |
() |
() |
218 |
() |
() |
219 |
{ |
{ |
220 |
char *s; |
char *s; |
221 |
int rows, cols; |
int rows, cols, i, j; |
222 |
int i, j; |
|
|
|
|
223 |
if (!dos_get_saved_screen (&s, &rows, &cols)) |
if (!dos_get_saved_screen (&s, &rows, &cols)) |
224 |
return Qnil; |
return Qnil; |
225 |
|
|
226 |
for (i = 0; i < rows; i++) |
for (i = 0; i < rows; i++) |
227 |
{ |
{ |
228 |
for (j = 0; j < cols; j++) |
for (j = 0; j < cols; j++) |
282 |
delay (50); |
delay (50); |
283 |
} |
} |
284 |
#endif /* !HAVE_X_WINDOWS */ |
#endif /* !HAVE_X_WINDOWS */ |
285 |
|
|
286 |
void |
void |
287 |
init_dosfns () |
init_dosfns () |
288 |
{ |
{ |
321 |
intdos (®s, ®s); |
intdos (®s, ®s); |
322 |
if (regs.x.cflag) |
if (regs.x.cflag) |
323 |
/* Estimate code page from country code */ |
/* Estimate code page from country code */ |
324 |
switch (dos_country_code) |
switch (dos_country_code) |
325 |
{ |
{ |
326 |
case 45: /* Denmark */ |
case 45: /* Denmark */ |
327 |
case 47: /* Norway */ |
case 47: /* Norway */ |
587 |
DEFVAR_INT ("dos-timezone-offset", &dos_timezone_offset, |
DEFVAR_INT ("dos-timezone-offset", &dos_timezone_offset, |
588 |
doc: /* The current timezone offset to UTC in minutes. |
doc: /* The current timezone offset to UTC in minutes. |
589 |
Implicitly modified when the TZ variable is changed. */); |
Implicitly modified when the TZ variable is changed. */); |
590 |
|
|
591 |
DEFVAR_LISP ("dos-version", &Vdos_version, |
DEFVAR_LISP ("dos-version", &Vdos_version, |
592 |
doc: /* The (MAJOR . MINOR) Dos version (subject to modification with setver). */); |
doc: /* The (MAJOR . MINOR) Dos version (subject to modification with setver). */); |
593 |
|
|
603 |
The output format is: scan code:char code*modifiers. */); |
The output format is: scan code:char code*modifiers. */); |
604 |
|
|
605 |
Vdos_display_scancodes = Qnil; |
Vdos_display_scancodes = Qnil; |
606 |
|
|
607 |
DEFVAR_INT ("dos-hyper-key", &dos_hyper_key, |
DEFVAR_INT ("dos-hyper-key", &dos_hyper_key, |
608 |
doc: /* *If set to 1, use right ALT key as hyper key. |
doc: /* *If set to 1, use right ALT key as hyper key. |
609 |
If set to 2, use right CTRL key as hyper key. */); |
If set to 2, use right CTRL key as hyper key. */); |
610 |
dos_hyper_key = 0; |
dos_hyper_key = 0; |
611 |
|
|
612 |
DEFVAR_INT ("dos-super-key", &dos_super_key, |
DEFVAR_INT ("dos-super-key", &dos_super_key, |
613 |
doc: /* *If set to 1, use right ALT key as super key. |
doc: /* *If set to 1, use right ALT key as super key. |
614 |
If set to 2, use right CTRL key as super key. */); |
If set to 2, use right CTRL key as super key. */); |
615 |
dos_super_key = 0; |
dos_super_key = 0; |
616 |
|
|
617 |
DEFVAR_INT ("dos-keypad-mode", &dos_keypad_mode, |
DEFVAR_INT ("dos-keypad-mode", &dos_keypad_mode, |
618 |
doc: /* *Controls what key code is returned by a key in the numeric keypad. |
doc: /* *Controls what key code is returned by a key in the numeric keypad. |
619 |
The `numlock ON' action is only taken if no modifier keys are pressed. |
The `numlock ON' action is only taken if no modifier keys are pressed. |
637 |
|
|
638 |
0x200 ALT-0..ALT-9 in top-row produces shifted codes. */); |
0x200 ALT-0..ALT-9 in top-row produces shifted codes. */); |
639 |
dos_keypad_mode = 0x75; |
dos_keypad_mode = 0x75; |
640 |
|
|
641 |
DEFVAR_INT ("dos-keyboard-layout", &dos_keyboard_layout, |
DEFVAR_INT ("dos-keyboard-layout", &dos_keyboard_layout, |
642 |
doc: /* Contains the country code for the current keyboard layout. |
doc: /* Contains the country code for the current keyboard layout. |
643 |
Use msdos-set-keyboard to select another keyboard layout. */); |
Use msdos-set-keyboard to select another keyboard layout. */); |
644 |
dos_keyboard_layout = 1; /* US */ |
dos_keyboard_layout = 1; /* US */ |
645 |
|
|
646 |
DEFVAR_INT ("dos-decimal-point", &dos_decimal_point, |
DEFVAR_INT ("dos-decimal-point", &dos_decimal_point, |
647 |
doc: /* The character to produce when kp-decimal key is pressed. |
doc: /* The character to produce when kp-decimal key is pressed. |
648 |
If non-zero, this variable contains the character to be returned when the |
If non-zero, this variable contains the character to be returned when the |