Commit 764c4f5e authored by MORIOKA Tomohiko's avatar MORIOKA Tomohiko
Browse files

(est-uri-decode-feature-name): New function.

parent 34f8420a
......@@ -91,6 +91,75 @@
(t (char-to-string c))))
feature ""))
(defun est-uri-decode-feature-name (uri-feature)
(let (feature)
(setq uri-feature (decode-uri-string uri-feature 'utf-8-mcs-er))
(cond
((string-match "^from\\." uri-feature)
(intern (format "<-%s"
(est-uri-decode-feature-name-body
(substring uri-feature (match-end 0)))))
)
((string-match "^to\\." uri-feature)
(intern (format "->%s"
(est-uri-decode-feature-name-body
(substring uri-feature (match-end 0)))))
)
((string-match "^meta\\." uri-feature)
(intern (format "*%s"
(est-uri-decode-feature-name-body
(substring uri-feature (match-end 0)))))
)
((string-match "^rep\\." uri-feature)
(intern (format "=%s"
(est-uri-decode-feature-name-body
(substring uri-feature (match-end 0)))))
)
((string-match "^rep[2i]\\." uri-feature)
(intern (format "===%s"
(est-uri-decode-feature-name-body
(substring uri-feature (match-end 0)))))
)
((string-match "^g\\." uri-feature)
(intern (format "=>>%s"
(est-uri-decode-feature-name-body
(substring uri-feature (match-end 0)))))
)
((string-match "^g[i2]\\." uri-feature)
(intern (format "==%s"
(est-uri-decode-feature-name-body
(substring uri-feature (match-end 0)))))
)
((string-match "^gi\\([0-9]+\\)\\." uri-feature)
(intern (format "=>>%s%s"
(make-string (string-to-int
(match-string 1 uri-feature))
?>)
(est-uri-decode-feature-name-body
(substring uri-feature (match-end 0)))))
)
((string-match "^o\\." uri-feature)
(intern (format "=+>%s"
(est-uri-decode-feature-name-body
(substring uri-feature (match-end 0)))))
)
((string-match "^a\\." uri-feature)
(intern (format "=>%s"
(est-uri-decode-feature-name-body
(substring uri-feature (match-end 0)))))
)
((string-match "^a\\([0-9]+\\)\\." uri-feature)
(intern (format "%s>%s"
(make-string (string-to-int
(match-string 1 uri-feature))
?=)
(est-uri-decode-feature-name-body
(substring uri-feature (match-end 0)))))
)
(t
(intern (est-uri-decode-feature-name-body uri-feature))
))))
(defun www-uri-decode-feature-name (uri-feature)
(let (feature)
(setq uri-feature (decode-uri-string uri-feature 'utf-8-mcs-er))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment