comparison lisp/w3/url-gw.el @ 124:9b50b4588a93 r20-1b15

Import from CVS: tag r20-1b15
author cvs
date Mon, 13 Aug 2007 09:26:39 +0200
parents 7d55a9ba150c
children
comparison
equal deleted inserted replaced
123:c77884c6318d 124:9b50b4588a93
1 ;;; url-gw.el --- Gateway munging for URL loading 1 ;;; url-gw.el --- Gateway munging for URL loading
2 ;; Author: wmperry 2 ;; Author: wmperry
3 ;; Created: 1997/03/27 21:29:24 3 ;; Created: 1997/04/11 14:39:18
4 ;; Version: 1.8 4 ;; Version: 1.9
5 ;; Keywords: comm, data, processes 5 ;; Keywords: comm, data, processes
6 6
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8 ;;; Copyright (c) 1997 Free Software Foundation, Inc. 8 ;;; Copyright (c) 1997 Free Software Foundation, Inc.
9 ;;; 9 ;;;
24 ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 24 ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 ;;; Boston, MA 02111-1307, USA. 25 ;;; Boston, MA 02111-1307, USA.
26 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 26 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
27 (require 'cl) 27 (require 'cl)
28 28
29 (defvar url-gateway-local-host-regexp nil 29 (defgroup url-gateway nil
30 "*A regular expression specifying local hostnames/machines.") 30 "URL gateway variables"
31 31 :group 'url)
32 (defvar url-gateway-prompt-pattern 32
33 (defcustom url-gateway-local-host-regexp nil
34 "*A regular expression specifying local hostnames/machines."
35 :type '(choice (const nil) regexp)
36 :group 'url-gateway)
37
38 (defcustom url-gateway-prompt-pattern
33 "^[^#$%>;]*[#$%>;] *" ;; "bash\\|\$ *\r?$\\|> *\r?" 39 "^[^#$%>;]*[#$%>;] *" ;; "bash\\|\$ *\r?$\\|> *\r?"
34 "*A regular expression matching a shell prompt.") 40 "*A regular expression matching a shell prompt."
35 41 :type 'regexp
36 (defvar url-gateway-rlogin-host nil 42 :group 'url-gateway)
37 "*What hostname to actually rlog into before doing a telnet.") 43
38 44 (defcustom url-gateway-rlogin-host nil
39 (defvar url-gateway-rlogin-user-name nil 45 "*What hostname to actually rlog into before doing a telnet."
40 "*Username to log into the remote machine with when using rlogin.") 46 :type '(choice (const nil) string)
41 47 :group 'url-gateway)
42 (defvar url-gateway-rlogin-parameters '("telnet" "-8") 48
49 (defcustom url-gateway-rlogin-user-name nil
50 "*Username to log into the remote machine with when using rlogin."
51 :type '(choice (const nil) string)
52 :group 'url-gateway)
53
54 (defcustom url-gateway-rlogin-parameters '("telnet" "-8")
43 "*Parameters to `url-open-rlogin'. 55 "*Parameters to `url-open-rlogin'.
44 This list will be used as the parameter list given to rsh.") 56 This list will be used as the parameter list given to rsh."
45 57 :type '(repeat string)
46 (defvar url-gateway-telnet-host nil 58 :group 'url-gateway)
47 "*What hostname to actually login to before doing a telnet.") 59
48 60 (defcustom url-gateway-telnet-host nil
49 (defvar url-gateway-telnet-parameters '("exec" "telnet" "-8") 61 "*What hostname to actually login to before doing a telnet."
62 :type '(choice (const nil) string)
63 :group 'url-gateway)
64
65 (defcustom url-gateway-telnet-parameters '("exec" "telnet" "-8")
50 "*Parameters to `url-open-telnet'. 66 "*Parameters to `url-open-telnet'.
51 This list will be executed as a command after logging in via telnet.") 67 This list will be executed as a command after logging in via telnet."
52 68 :type '(repeat string)
53 (defvar url-gateway-telnet-login-prompt "^\r*.?login:" 69 :group 'url-gateway)
54 "*Prompt that tells us we should send our username when loggin in w/telnet.") 70
55 71 (defcustom url-gateway-telnet-login-prompt "^\r*.?login:"
56 (defvar url-gateway-telnet-password-prompt "^\r*.?password:" 72 "*Prompt that tells us we should send our username when loggin in w/telnet."
57 "*Prompt that tells us we should send our password when loggin in w/telnet.") 73 :type 'regexp
58 74 :group 'url-gateway)
59 (defvar url-gateway-telnet-user-name nil 75
60 "User name to log in via telnet with.") 76 (defcustom url-gateway-telnet-password-prompt "^\r*.?password:"
61 77 "*Prompt that tells us we should send our password when loggin in w/telnet."
62 (defvar url-gateway-telnet-password nil 78 :type 'regexp
63 "Password to use to log in via telnet with.") 79 :group 'url-gateway)
64 80
65 (defvar url-gateway-broken-resolution nil 81 (defcustom url-gateway-telnet-user-name nil
82 "User name to log in via telnet with."
83 :type '(choice (const nil) string)
84 :group 'url-gateway)
85
86 (defcustom url-gateway-telnet-password nil
87 "Password to use to log in via telnet with."
88 :type '(choice (const nil) string)
89 :group 'url-gateway)
90
91 (defcustom url-gateway-broken-resolution nil
66 "*Whether to use nslookup to resolve hostnames. 92 "*Whether to use nslookup to resolve hostnames.
67 This should be used when your version of Emacs cannot correctly use DNS, 93 This should be used when your version of Emacs cannot correctly use DNS,
68 but your machine can. This usually happens if you are running a statically 94 but your machine can. This usually happens if you are running a statically
69 linked Emacs under SunOS 4.x") 95 linked Emacs under SunOS 4.x"
70 96 :type 'boolean
71 (defvar url-gateway-nslookup-program "nslookup" 97 :group 'url-gateway)
72 "*If non-NIL then a string naming nslookup program." ) 98
99 (defcustom url-gateway-nslookup-program "nslookup"
100 "*If non-NIL then a string naming nslookup program."
101 :type '(choice (const :tag "None" :value nil) string)
102 :group 'url-gateway)
73 103
74 ;; Stolen from ange-ftp 104 ;; Stolen from ange-ftp
75 ;;;###autoload 105 ;;;###autoload
76 (defun url-gateway-nslookup-host (host) 106 (defun url-gateway-nslookup-host (host)
77 "Attempt to resolve the given HOSTNAME using nslookup if possible." 107 "Attempt to resolve the given HOSTNAME using nslookup if possible."