Mercurial > hg > xemacs-beta
comparison lisp/w3/url-gopher.el @ 120:cca96a509cfe r20-1b12
Import from CVS: tag r20-1b12
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:25:29 +0200 |
parents | c53a95d3c46d |
children |
comparison
equal
deleted
inserted
replaced
119:d101af7320b8 | 120:cca96a509cfe |
---|---|
1 ;;; url-gopher.el --- Gopher Uniform Resource Locator retrieval code | 1 ;;; url-gopher.el --- Gopher Uniform Resource Locator retrieval code |
2 ;; Author: wmperry | 2 ;; Author: wmperry |
3 ;; Created: 1997/03/18 01:02:58 | 3 ;; Created: 1997/04/07 13:24:21 |
4 ;; Version: 1.7 | 4 ;; Version: 1.8 |
5 ;; Keywords: comm, data, processes | 5 ;; Keywords: comm, data, processes |
6 | 6 |
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
8 ;;; Copyright (c) 1993-1996 by William M. Perry (wmperry@cs.indiana.edu) | 8 ;;; Copyright (c) 1993-1996 by William M. Perry (wmperry@cs.indiana.edu) |
9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc. | 9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc. |
267 (if (> (length selector) 0) | 267 (if (> (length selector) 0) |
268 (setq selector (substring selector 1 nil))) | 268 (setq selector (substring selector 1 nil))) |
269 (if (not (processp proc)) | 269 (if (not (processp proc)) |
270 nil | 270 nil |
271 (save-excursion | 271 (save-excursion |
272 (set-process-sentinel proc 'ignore) | |
272 (process-send-string proc (concat selector "\r\n")) | 273 (process-send-string proc (concat selector "\r\n")) |
273 (while (and (or (not wait-for) | 274 (while (and (or (not wait-for) |
274 (progn | 275 (progn |
275 (goto-char (point-min)) | 276 (goto-char (point-min)) |
276 (not (re-search-forward wait-for nil t)))) | 277 (not (re-search-forward wait-for nil t)))) |
306 (url-lazy-message "Read... %d bytes." (point-max))) | 307 (url-lazy-message "Read... %d bytes." (point-max))) |
307 (url-accept-process-output proc)) | 308 (url-accept-process-output proc)) |
308 (condition-case () | 309 (condition-case () |
309 (url-kill-process proc) | 310 (url-kill-process proc) |
310 (error nil)) | 311 (error nil)) |
311 (url-replace-regexp "\n*Connection closed.*\n*" "") | |
312 (url-replace-regexp "\n*Process .*gopher.*\n*" "") | |
313 (while (looking-at "\r") (delete-char 1)))))) | 312 (while (looking-at "\r") (delete-char 1)))))) |
314 | 313 |
315 (defun url-do-gopher-cso-search (descr) | 314 (defun url-do-gopher-cso-search (descr) |
316 ;; Do a gopher CSO search and return a plaintext document | 315 ;; Do a gopher CSO search and return a plaintext document |
317 (let ((host (nth 0 descr)) | 316 (let ((host (nth 0 descr)) |