1 |
;;; -*- coding: iso-2022-7bit; -*- |
;;; -*- coding: iso-2022-7bit; -*- |
2 |
;;; tramp-uu.el --- uuencode in Lisp |
;;; tramp-uu.el --- uuencode in Lisp |
3 |
|
|
4 |
;; Copyright (C) 2002 Free Software Foundation, Inc. |
;; Copyright (C) 2002, 2004 Free Software Foundation, Inc. |
5 |
|
|
6 |
;; Author: Kai Gro,A_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> |
;; Author: Kai Gro,A_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> |
7 |
;; Keywords: comm, terminals |
;; Keywords: comm, terminals |
63 |
(setq c (char-after (point))) |
(setq c (char-after (point))) |
64 |
(delete-char 1) |
(delete-char 1) |
65 |
(if (equal c ?=) |
(if (equal c ?=) |
66 |
;; "=" means padding. Insert "`" instead. |
;; "=" means padding. Insert "`" instead. Not counted for length. |
67 |
(insert "`") |
(progn (insert "`") (setq len (1- len))) |
68 |
(insert (tramp-uu-byte-to-uu-char (tramp-uu-b64-char-to-byte c)))) |
(insert (tramp-uu-byte-to-uu-char (tramp-uu-b64-char-to-byte c))) |
69 |
(setq i (1+ i)) |
(setq i (1+ i))) |
70 |
;; Every 60 characters, add "M" at beginning of line (as |
;; Every 60 characters, add "M" at beginning of line (as |
71 |
;; length byte) and insert a newline. |
;; length byte) and insert a newline. |
72 |
(when (zerop (% i 60)) |
(when (zerop (% i 60)) |