[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/net/tramp-smb.el
From: |
Kai Großjohann |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/net/tramp-smb.el |
Date: |
Sat, 29 Mar 2003 10:16:58 -0500 |
Index: emacs/lisp/net/tramp-smb.el
diff -c emacs/lisp/net/tramp-smb.el:1.4 emacs/lisp/net/tramp-smb.el:1.5
*** emacs/lisp/net/tramp-smb.el:1.4 Fri Feb 28 13:28:47 2003
--- emacs/lisp/net/tramp-smb.el Sat Mar 29 10:16:57 2003
***************
*** 754,774 ****
;; They should have the format
;;
;; \s-\{2,2} - leading spaces
! ;; \S-\(.*\S-\)\s-* - file name, 32 chars, left bound
;; \s- - space delimeter
! ;; \s-*[ADHRS]* - permissions, 5 chars, right bound
! ;; \s- - space delimeter
! ;; \s-*[0-9]+ - size, 8 (Samba) or 7 (Windows)
! ;; chars, right bound
;; \s-\{2,2\} - space delimeter
;; \w\{3,3\} - weekday
;; \s- - space delimeter
;; [ 19][0-9] - day
;; \s- - space delimeter
;; [0-9]\{2,2\}:[0-9]\{2,2\}:[0-9]\{2,2\} - time
;; \s- - space delimeter
;; [0-9]\{4,4\} - year
;;
;; Problems:
;; * Modern regexp constructs, like spy groups and counted repetitions, aren't
;; available in older Emacsen.
--- 754,791 ----
;; They should have the format
;;
;; \s-\{2,2} - leading spaces
! ;; \S-\(.*\S-\)\s-* - file name, 30 chars, left bound
! ;; \s-+[ADHRSV]* - permissions, 7 chars, right bound
;; \s- - space delimeter
! ;; \s-+[0-9]+ - size, 8 chars, right bound
;; \s-\{2,2\} - space delimeter
;; \w\{3,3\} - weekday
;; \s- - space delimeter
+ ;; \w\{3,3\} - month
+ ;; \s- - space delimeter
;; [ 19][0-9] - day
;; \s- - space delimeter
;; [0-9]\{2,2\}:[0-9]\{2,2\}:[0-9]\{2,2\} - time
;; \s- - space delimeter
;; [0-9]\{4,4\} - year
;;
+ ;; samba/src/client.c (http://samba.org/doxygen/samba/client_8c-source.html)
+ ;; has function display_finfo:
+ ;;
+ ;; d_printf(" %-30s%7.7s %8.0f %s",
+ ;; finfo->name,
+ ;; attrib_string(finfo->mode),
+ ;; (double)finfo->size,
+ ;; asctime(LocalTime(&t)));
+ ;;
+ ;; in Samba 1.9, there's the following code:
+ ;;
+ ;; DEBUG(0,(" %-30s%7.7s%10d %s",
+ ;; CNV_LANG(finfo->name),
+ ;; attrib_string(finfo->mode),
+ ;; finfo->size,
+ ;; asctime(LocalTime(&t))));
+ ;;
;; Problems:
;; * Modern regexp constructs, like spy groups and counted repetitions, aren't
;; available in older Emacsen.
***************
*** 828,854 ****
;; size
(if (string-match "\\([0-9]+\\)$" line)
! (setq
! size (string-to-number (match-string 1 line))
! line (substring
! line 0 (- (max 8 (1+ (length (match-string 1 line)))))))
(return))
! ;; mode
! (if (string-match "\\(\\([ADHRS]+\\)?\\s-?\\)$" line)
(setq
! mode (or (match-string 2 line) "")
mode (save-match-data (format
"%s%s"
(if (string-match "D" mode) "d" "-")
(mapconcat
(lambda (x) "") " "
(concat "r" (if (string-match "R" mode) "-" "w") "x"))))
! line (substring line 0 (- (1+ (length (match-string 2 line))))))
(return))
;; localname
! (if (string-match "^\\s-+\\(\\S-\\(.*\\S-\\)?\\)\\s-+$" line)
(setq localname (match-string 1 line))
(return))))
--- 845,872 ----
;; size
(if (string-match "\\([0-9]+\\)$" line)
! (let ((length (- (max 10 (1+ (length (match-string 1 line)))))))
! (setq size (string-to-number (match-string 1 line)))
! (when (string-match "\\([ADHRSV]+\\)" (substring line length))
! (setq length (+ length (match-end 0))))
! (setq line (substring line 0 length)))
(return))
! ;; mode: ARCH, DIR, HIDDEN, RONLY, SYSTEM, VOLID
! (if (string-match "\\([ADHRSV]+\\)?$" line)
(setq
! mode (or (match-string 1 line) "")
mode (save-match-data (format
"%s%s"
(if (string-match "D" mode) "d" "-")
(mapconcat
(lambda (x) "") " "
(concat "r" (if (string-match "R" mode) "-" "w") "x"))))
! line (substring line 0 -7))
(return))
;; localname
! (if (string-match "^\\s-+\\(\\S-\\(.*\\S-\\)?\\)\\s-*$" line)
(setq localname (match-string 1 line))
(return))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/net/tramp-smb.el,
Kai Großjohann <=