+
+;;; @@ about rightful dividing for multi-octet string
+;;;
+;; by mol. 1993/9/26
+(defun rightful-boundary-short-string (str width)
+ (substring str 0
+ (let ((i 0) (w 0) chr (len (length str)))
+ (catch 'label
+ (while (< i len)
+ (setq chr (elt str i))
+ (setq w (+ w (char-width chr)))
+ (if (> w width)
+ (throw 'label i))
+ (setq i (+ i (char-bytes chr)))
+ )
+ i))
+ ))
+
+
+;;; @@ RCS version
+;;;
+
+(defun get-version-string (id)
+ (and (string-match "[0-9][0-9.]*" id)
+ (substring id (match-beginning 0)(match-end 0))
+ ))
+
+
+;;; @@ file name
+;;;
+(defun replace-as-filename (str)
+ (let ((dest "")
+ (i 0)(len (length str))
+ chr)
+ (while (< i len)
+ (setq chr (elt str i))
+ (if (or (and (<= ?+ chr)(<= chr ?.))
+ (and (<= ?0 chr)(<= chr ?:))
+ (= chr ?=)
+ (and (<= ?@ chr)(<= chr ?\[))
+ (and (<= ?\] chr)(<= chr ?_))
+ (and (<= ?a chr)(<= chr ?{))
+ (and (<= ?} chr)(<= chr ?~))
+ )
+ (setq dest (concat dest
+ (char-to-string chr)))
+ )
+ (setq i (+ i 1))
+ )
+ dest))
+
+
+;;; @@ message editing utilities
+;;;
+(defvar cited-prefix-regexp "^[^ \t>]*[>|]+[ \t#]*")
+