[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vcard c1fa6a26be 10/13: (vcard-char-to-int): New defali
From: |
Stefan Monnier |
Subject: |
[elpa] externals/vcard c1fa6a26be 10/13: (vcard-char-to-int): New defalias. |
Date: |
Tue, 12 Jul 2022 00:17:02 -0400 (EDT) |
branch: externals/vcard
commit c1fa6a26be49c6066464acc9b0703231e8321112
Author: Noah Friedman <friedman@splode.com>
Commit: Noah Friedman <friedman@splode.com>
(vcard-char-to-int): New defalias.
(vcard-region-decode-base64-table): Use it.
(vcard-region-decode-base64): Here too.
---
vcard.el | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/vcard.el b/vcard.el
index 842ee09cd4..90014663fd 100644
--- a/vcard.el
+++ b/vcard.el
@@ -7,7 +7,7 @@
;; Keywords: vcard, mail, news
;; Created: 1997-09-27
-;; $Id: vcard.el,v 1.9 2000/02/03 20:51:51 friedman Exp $
+;; $Id: vcard.el,v 1.10 2000/02/23 19:39:15 friedman Exp $
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -109,6 +109,11 @@ the function `vcard-standard-filter' is supplied as the
second argument to
;;; No user-settable options below.
+;; XEmacs 21 ints and chars are disjoint types.
+;; For all else, treat them as the same.
+(defalias 'vcard-char-to-int
+ (if (fboundp 'char-to-int) 'char-to-int 'identity))
+
;; This is just the version number for this package; it does not refer to
;; the vcard format specification. Currently, this package does not yet
;; support the full vcard 3.0 specification.
@@ -139,7 +144,7 @@ the function `vcard-standard-filter' is supplied as the
second argument to
(tbl (make-vector 123 nil))
(i 0))
(while (< i len)
- (aset tbl (char-to-int (aref a i)) i)
+ (aset tbl (vcard-char-to-int (aref a i)) i)
(setq i (1+ i)))
tbl))
@@ -498,7 +503,7 @@ US domestic telephone numbers are replaced with
international format."
(delete-region (point) (point-max)))
(t
(setq n (+ n (aref vcard-region-decode-base64-table
- (char-to-int c))))
+ (vcard-char-to-int c))))
(setq count (1+ count))
(cond ((= count 4)
(insert (logand 255 (lsh n -16))
- [elpa] externals/vcard ef82e79ac7 01/13: *** empty log message ***, (continued)
- [elpa] externals/vcard ef82e79ac7 01/13: *** empty log message ***, Stefan Monnier, 2022/07/12
- [elpa] externals/vcard d0ec40a5c6 08/13: Complete rewrite., Stefan Monnier, 2022/07/12
- [elpa] externals/vcard a50b9e4395 04/13: (vcard-format-lines): Handle case where 2nd column has more lines than, Stefan Monnier, 2022/07/12
- [elpa] externals/vcard 4bf38d79fc 05/13: (vcard-parse-string): Handle "key:field" type entries, i.e. no whitespace, Stefan Monnier, 2022/07/12
- [elpa] externals/vcard 0200b96343 13/13: Adjust package to the new `vcard.el` file, Stefan Monnier, 2022/07/12
- [elpa] externals/vcard 49301aa94d 12/13: Merge branch 'vcard-friedman' into externals/vcard, Stefan Monnier, 2022/07/12
- [elpa] externals/vcard 6283103cc6 11/13: (vcard-hexstring-to-ascii): New macro., Stefan Monnier, 2022/07/12
- [elpa] externals/vcard 1399f2b8cb 06/13: (vcard-format-box): Return empty string if no data to present; don't, Stefan Monnier, 2022/07/12
- [elpa] externals/vcard 5f5af1f780 07/13: (vcard-parse-string): Bind case-fold-search to t., Stefan Monnier, 2022/07/12
- [elpa] externals/vcard a3e60e2883 09/13: (vcard-parse-region-value): Do not use `new-marker';, Stefan Monnier, 2022/07/12
- [elpa] externals/vcard c1fa6a26be 10/13: (vcard-char-to-int): New defalias.,
Stefan Monnier <=