Add 2012 to FSF copyright years for Emacs files
[bpt/emacs.git] / lisp / dos-fns.el
index 5834afa..074fd64 100644 (file)
@@ -1,10 +1,11 @@
 ;;; dos-fns.el --- MS-Dos specific functions
 
-;; Copyright (C) 1991, 1993, 1995, 1996, 2001, 2002, 2003, 2004, 2005,
-;;   2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+;; Copyright (C) 1991, 1993, 1995-1996, 2001-2012
+;;   Free Software Foundation, Inc.
 
 ;; Maintainer: Morten Welinder <terra@diku.dk>
 ;; Keywords: internal
+;; Package: emacs
 
 ;; This file is part of GNU Emacs.
 
 (declare-function int86 "dosfns.c")
 (declare-function msdos-long-file-names "msdos.c")
 
-;; This overrides a trivial definition in files.el.
+;; See convert-standard-filename in files.el.
 (defun dos-convert-standard-filename (filename)
-  "Convert a standard file's name to something suitable for the current OS.
+  "Convert a standard file's name to something suitable for MS-DOS.
 This means to guarantee valid names and perhaps to canonicalize
 certain patterns.
 
+This function is called by `convert-standard-filename'.
+
 On Windows and DOS, replace invalid characters.  On DOS, make
-sure to obey the 8.3 limitations.  On Windows, turn Cygwin names
-into native names, and also turn slashes into backslashes if the
-shell requires it (see `w32-shell-dos-semantics')."
+sure to obey the 8.3 limitations."
   (if (or (not (stringp filename))
          ;; This catches the case where FILENAME is "x:" or "x:/" or
          ;; "/", thus preventing infinite recursion.
@@ -128,11 +129,6 @@ shell requires it (see `w32-shell-dos-semantics')."
                    (dos-convert-standard-filename dir))
                  string))))))
 
-;; Only redirect convert-standard-filename if it has a chance of working,
-;; otherwise loading dos-fns.el might make your non-DOS Emacs misbehave.
-(when (fboundp 'msdos-long-file-names)
-  (defalias 'convert-standard-filename 'dos-convert-standard-filename))
-
 (defun dos-8+3-filename (filename)
   "Truncate FILENAME to DOS 8+3 limits."
   (if (or (not (stringp filename))
@@ -163,7 +159,7 @@ shell requires it (see `w32-shell-dos-semantics')."
               (string (copy-sequence (file-name-nondirectory filename)))
               (strlen (length string))
               (lastchar (aref string (1- strlen)))
-              firstdot)
+              firstdot)
          (setq firstdot (string-match "\\." string))
          (cond
           (firstdot
@@ -243,9 +239,14 @@ returned unaltered."
     (al . (0 . 0)) (bl . (1 . 0)) (cl . (2 . 0)) (dl . (3 . 0))
     (ah . (0 . 1)) (bh . (1 . 1)) (ch . (2 . 1)) (dh . (3 . 1))))
 
+(define-obsolete-variable-alias
+  'register-name-alist 'dos-register-name-alist "24.1")
+
 (defun dos-make-register ()
   (make-vector 8 0))
 
+(define-obsolete-function-alias 'make-register 'dos-make-register "24.1")
+
 (defun dos-register-value (regs name)
   (let ((where (cdr (assoc name dos-register-name-alist))))
     (cond ((consp where)
@@ -257,6 +258,8 @@ returned unaltered."
           (aref regs where))
          (t nil))))
 
+(define-obsolete-function-alias 'register-value 'dos-register-value "24.1")
+
 (defun dos-set-register-value (regs name value)
   (and (numberp value)
        (>= value 0)
@@ -273,9 +276,18 @@ returned unaltered."
                (aset regs where (logand value 65535))))))
   regs)
 
+(define-obsolete-function-alias
+  'set-register-value 'dos-set-register-value "24.1")
+
 (defsubst dos-intdos (regs)
+  "Issue the DOS Int 21h with registers REGS.
+
+REGS should be a vector produced by `dos-make-register'
+and `dos-set-register-value', which see."
   (int86 33 regs))
 
+(define-obsolete-function-alias 'intdos 'dos-intdos "24.1")
+
 ;; Backward compatibility for obsolescent functions which
 ;; set screen size.
 
@@ -284,6 +296,8 @@ returned unaltered."
   (interactive)
   (set-frame-size (selected-frame) 80 25))
 
+(define-obsolete-function-alias 'mode25 'dos-mode25 "24.1")
+
 (defun dos-mode4350 ()
   "Changes the number of rows to 43 or 50.
 Emacs always tries to set the screen height to 50 rows first.
@@ -295,7 +309,8 @@ that your video hardware might not support 50-line mode."
       nil  ; the original built-in function returned nil
     (set-frame-size (selected-frame) 80 43)))
 
+(define-obsolete-function-alias 'mode4350 'dos-mode4350 "24.1")
+
 (provide 'dos-fns)
 
-;; arch-tag: 00b03579-8ebb-4a02-8762-5c5a929774ad
 ;;; dos-fns.el ends here