From: MORIOKA Tomohiko Date: Fri, 15 Mar 2019 09:35:28 +0000 (+0900) Subject: - Require `chiset-common'. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=38da16a8937a6953a31b9c26cf429e41148e586d;p=chise%2Fest.git - Require `chiset-common'. - Move `est-uri-decode-feature-name-body' and `est-uri-encode-feature-name-body' to chiset-common.el. --- diff --git a/cwiki-common.el b/cwiki-common.el index b5bf4c0..f1eead3 100644 --- a/cwiki-common.el +++ b/cwiki-common.el @@ -1,5 +1,6 @@ ;; -*- coding: utf-8-mcs-er -*- (require 'char-db-util) +(require 'chiset-common) ;; (require 'concord-images) (setq file-name-coding-system 'utf-8-mcs-er) @@ -409,42 +410,46 @@ ;;; @ URI representation ;;; -(defun est-uri-decode-feature-name-body (uri-feature) - (let ((len (length uri-feature)) - (i 0) - ch dest) - (while (< i len) - (setq dest - (concat - dest - (if (eq (aref uri-feature i) ?\.) - (if (and (< (+ i 2) len) - (eq (aref uri-feature (+ i 2)) ?\.)) - (prog1 - (cond - ((eq (setq ch (aref uri-feature (1+ i))) ?\.) - "/") - ((eq ch ?-) - "*") - (t - (substring uri-feature i (+ i 3)) - )) - (setq i (+ i 3))) - (setq i (1+ i)) - ".") - (prog1 - (char-to-string (aref uri-feature i)) - (setq i (1+ i))))))) - dest)) - -(defun est-uri-encode-feature-name-body (feature) - (mapconcat (lambda (c) - (cond ((eq c ?*) - ".-.") - ((eq c ?/) - "...") - (t (char-to-string c)))) - feature "")) +;; (defun est-uri-decode-feature-name-body (uri-feature) +;; (let ((len (length uri-feature)) +;; (i 0) +;; ch dest) +;; (while (< i len) +;; (setq dest +;; (concat +;; dest +;; (if (eq (aref uri-feature i) ?\.) +;; (if (and (< (+ i 2) len) +;; (eq (aref uri-feature (+ i 2)) ?\.)) +;; (prog1 +;; (cond +;; ((eq (setq ch (aref uri-feature (1+ i))) ?\.) +;; "/") +;; ((eq ch ?-) +;; "*") +;; ((eq ch ?_) +;; "+") +;; (t +;; (substring uri-feature i (+ i 3)) +;; )) +;; (setq i (+ i 3))) +;; (setq i (1+ i)) +;; ".") +;; (prog1 +;; (char-to-string (aref uri-feature i)) +;; (setq i (1+ i))))))) +;; dest)) + +;; (defun est-uri-encode-feature-name-body (feature) +;; (mapconcat (lambda (c) +;; (cond ((eq c ?*) +;; ".-.") +;; ((eq c ?/) +;; "...") +;; ((eq c ?+) +;; "._.") +;; (t (char-to-string c)))) +;; feature "")) (defun www-uri-decode-feature-name (uri-feature) (let (feature)