/[emacs]/emacs/src/dosfns.c
ViewVC logotype

Diff of /emacs/src/dosfns.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.35 by monnier, Mon Mar 4 23:41:00 2002 UTC revision 1.36 by eliz, Fri May 17 12:02:50 2002 UTC
# Line 20  along with GNU Emacs; see the file COPYI Line 20  along with GNU Emacs; see the file COPYI
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
# Line 68  REGISTERS should be a vector produced by Line 67  REGISTERS should be a vector produced by
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]);
# Line 111  Return the updated VECTOR.  */) Line 110  Return the updated VECTOR.  */)
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    
# Line 136  DEFUN ("msdos-memput", Fdos_memput, Sdos Line 135  DEFUN ("msdos-memput", Fdos_memput, Sdos
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    
# Line 179  DEFUN ("msdos-mouse-p", Fmsdos_mouse_p, Line 178  DEFUN ("msdos-mouse-p", Fmsdos_mouse_p,
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       ()       ()
# Line 220  Return nil if startup screen is not avai Line 218  Return nil if startup screen is not avai
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++)
# Line 285  restore_parent_vm_title (void) Line 282  restore_parent_vm_title (void)
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  {  {
# Line 324  init_dosfns () Line 321  init_dosfns ()
321    intdos (&regs, &regs);    intdos (&regs, &regs);
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 */
# Line 590  The following are known: Line 587  The following are known:
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    
# Line 606  corner of the display (typically at the Line 603  corner of the display (typically at the
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.
# Line 640  The value is an integer constructed by a Line 637  The value is an integer constructed by a
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

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26