]> git.eshelyaron.com Git - emacs.git/commitdiff
Added new files from the v5_10 branch of Gnus.
authorReiner Steib <Reiner.Steib@gmx.de>
Mon, 2 Aug 2004 15:06:12 +0000 (15:06 +0000)
committerReiner Steib <Reiner.Steib@gmx.de>
Mon, 2 Aug 2004 15:06:12 +0000 (15:06 +0000)
17 files changed:
lisp/gnus/ChangeLog
lisp/gnus/blink.pbm [new file with mode: 0644]
lisp/gnus/blink.xpm [new file with mode: 0644]
lisp/gnus/braindamaged.xpm [new file with mode: 0644]
lisp/gnus/cry.xpm [new file with mode: 0644]
lisp/gnus/dead.xpm [new file with mode: 0644]
lisp/gnus/evil.xpm [new file with mode: 0644]
lisp/gnus/forced.xpm [new file with mode: 0644]
lisp/gnus/frown.xpm [new file with mode: 0644]
lisp/gnus/grin.xpm [new file with mode: 0644]
lisp/gnus/indifferent.xpm [new file with mode: 0644]
lisp/gnus/reverse-smile.xpm [new file with mode: 0644]
lisp/gnus/sad.pbm [new file with mode: 0644]
lisp/gnus/sad.xpm [new file with mode: 0644]
lisp/gnus/smile.xpm [new file with mode: 0644]
lisp/gnus/time-date.el [new file with mode: 0644]
lisp/gnus/wry.xpm [new file with mode: 0644]

index a73d6f760bcd075424f58c8712e0d7cdbebee3e5..a2de1352162cd5bc8ebf75a652ef91be0a073a17 100644 (file)
@@ -1,3 +1,10 @@
+2004-08-02  Reiner Steib  <Reiner.Steib@gmx.de>
+
+       * blink.pbm, blink.xpm, braindamaged.xpm, cry.xpm, dead.xpm,
+       evil.xpm, forced.xpm, frown.xpm, grin.xpm, indifferent.xpm,
+       reverse-smile.xpm, sad.pbm, sad.xpm, smile.xpm, time-date.el,
+       wry.xpm: Added new files from the v5_10 branch of Gnus.
+
 2004-07-22  Andreas Schwab  <schwab@suse.de>
 
        Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
diff --git a/lisp/gnus/blink.pbm b/lisp/gnus/blink.pbm
new file mode 100644 (file)
index 0000000..6c7531b
Binary files /dev/null and b/lisp/gnus/blink.pbm differ
diff --git a/lisp/gnus/blink.xpm b/lisp/gnus/blink.xpm
new file mode 100644 (file)
index 0000000..5035122
--- /dev/null
@@ -0,0 +1,20 @@
+/* XPM */
+static char * blink_xpm[] = {
+"13 14 3 1",
+"      c None",
+".     c #000000",
+"+     c #FFDD00",
+"   .......   ",
+"  ..+++++..  ",
+" .+++++++++. ",
+".+++++++++++.",
+".+++++++..++.",
+".+++++++..++.",
+".++...++++++.",
+".+++++++++++.",
+".++++++++.++.",
+".++.+++++.++.",
+".+++.....+++.",
+" .+++++++++. ",
+"  ..+++++..  ",
+"   .......   "};
diff --git a/lisp/gnus/braindamaged.xpm b/lisp/gnus/braindamaged.xpm
new file mode 100644 (file)
index 0000000..25bd3e7
--- /dev/null
@@ -0,0 +1,20 @@
+/* XPM */
+static char * mad_xpm[] = {
+"13 14 3 1",
+"      c None",
+".     c #000000",
+"+     c #FFDD00",
+"   .......   ",
+"  ..+++++..  ",
+" .+++++++++. ",
+".++...++++++.",
+".++.+.+...++.",
+".++...+.+.++.",
+".++++++...++.",
+".+.+++++++.+.",
+".+.+++++++.+.",
+".++.+++++.++.",
+".+++.....+++.",
+" .+++++++++. ",
+"  ..+++++..  ",
+"   .......   "};
diff --git a/lisp/gnus/cry.xpm b/lisp/gnus/cry.xpm
new file mode 100644 (file)
index 0000000..8d8558d
--- /dev/null
@@ -0,0 +1,20 @@
+/* XPM */
+static char * cry_xpm[] = {
+"13 14 3 1",
+"      c None",
+".     c #000000",
+"+     c #FFDD00",
+"   .......   ",
+"  ..+++++..  ",
+" .+++++++++. ",
+".+++++++++++.",
+".++..+++..++.",
+".++++++++.++.",
+".+++++++.+.+.",
+".+++++++.+.+.",
+".++++++++..+.",
+".+++.....+++.",
+".++.+++++.++.",
+" .+++++++++. ",
+"  ..+++++..  ",
+"   .......   "};
diff --git a/lisp/gnus/dead.xpm b/lisp/gnus/dead.xpm
new file mode 100644 (file)
index 0000000..56463a7
--- /dev/null
@@ -0,0 +1,20 @@
+/* XPM */
+static char * dead_xpm[] = {
+"13 14 3 1",
+"      c None",
+".     c #000000",
+"+     c #FFDD00",
+"   .......   ",
+"  ..+++++..  ",
+" .+++++++++. ",
+".+++++++++++.",
+".++.+.+.+.++.",
+".+++.+++.+++.",
+".++.+.+.+.++.",
+".+++++++++++.",
+".+++++++++++.",
+".+.+++++++.+.",
+".++.......++.",
+" .+++++++++. ",
+"  ..+++++..  ",
+"   .......   "};
diff --git a/lisp/gnus/evil.xpm b/lisp/gnus/evil.xpm
new file mode 100644 (file)
index 0000000..c364ac3
--- /dev/null
@@ -0,0 +1,20 @@
+/* XPM */
+static char * diabolic_xpm[] = {
+"13 14 3 1",
+"      c None",
+".     c #000000",
+"+     c #FFDD00",
+"   .......   ",
+"  ..+++++..  ",
+" .+++++++++. ",
+".++.+++++.++.",
+".++..+++..++.",
+".++...+...++.",
+".+++++++++++.",
+".+.+++++++.+.",
+".++.+++++.++.",
+".+++.+++.+++.",
+".++++...++++.",
+" .+++++++++. ",
+"  ..+++++..  ",
+"   .......   "};
diff --git a/lisp/gnus/forced.xpm b/lisp/gnus/forced.xpm
new file mode 100644 (file)
index 0000000..43ba8d2
--- /dev/null
@@ -0,0 +1,20 @@
+/* XPM */
+static char * forced_xpm[] = {
+"13 14 3 1",
+"      c None",
+".     c #000000",
+"+     c #FFDD00",
+"   .......   ",
+"  ..+++++..  ",
+" .+++++++++. ",
+".+++++++++++.",
+".++..+++..++.",
+".++..+++..++.",
+".+++++++++++.",
+".+++++++++++.",
+".+.+++++++.+.",
+".+.+++++++.+.",
+".+.........+.",
+".+++++++++++.",
+" ...+++++... ",
+"   .......   "};
diff --git a/lisp/gnus/frown.xpm b/lisp/gnus/frown.xpm
new file mode 100644 (file)
index 0000000..25ca99d
--- /dev/null
@@ -0,0 +1,20 @@
+/* XPM */
+static char * frown_xpm[] = {
+"13 14 3 1",
+"      c None",
+".     c #000000",
+"+     c #FFDD00",
+"   .......   ",
+"  ..+++++..  ",
+" .+++++++++. ",
+".++..+++..++.",
+".++++.+.++++.",
+".+...+++...+.",
+".+...+++...+.",
+".+++++++++++.",
+".+++.....+++.",
+".++.+++++.++.",
+".++.+++++.++.",
+" .+++++++++. ",
+"  ..+++++..  ",
+"   .......   "};
diff --git a/lisp/gnus/grin.xpm b/lisp/gnus/grin.xpm
new file mode 100644 (file)
index 0000000..292cb11
--- /dev/null
@@ -0,0 +1,21 @@
+/* XPM */
+static char * grin_xpm[] = {
+"13 14 4 1",
+"      c None",
+".     c #000000",
+"+     c #FFDD00",
+"@     c #FFFFFF",
+"   .......   ",
+"  ..+++++..  ",
+" .+++++++++. ",
+".+++++++++++.",
+".++..+++..++.",
+".++..+++..++.",
+".+++++++++++.",
+".+.........+.",
+".+.@@@@@@@.+.",
+".++.@@@@@.++.",
+".+++.....+++.",
+" .+++++++++. ",
+"  ..+++++..  ",
+"   .......   "};
diff --git a/lisp/gnus/indifferent.xpm b/lisp/gnus/indifferent.xpm
new file mode 100644 (file)
index 0000000..6395238
--- /dev/null
@@ -0,0 +1,20 @@
+/* XPM */
+static char * indifferent_xpm[] = {
+"13 14 3 1",
+"      c None",
+".     c #000000",
+"+     c #FFDD00",
+"   .......   ",
+"  ..+++++..  ",
+" .+++++++++. ",
+".+++++++++++.",
+".++..+++..++.",
+".++..+++..++.",
+".+++++++++++.",
+".+++++++++++.",
+".+++++++++++.",
+".++.......++.",
+".+++++++++++.",
+" .+++++++++. ",
+"  ..+++++..  ",
+"   .......   "};
diff --git a/lisp/gnus/reverse-smile.xpm b/lisp/gnus/reverse-smile.xpm
new file mode 100644 (file)
index 0000000..56db090
--- /dev/null
@@ -0,0 +1,20 @@
+/* XPM */
+static char * reverse_smile_xpm[] = {
+"13 14 3 1",
+"      c None",
+".     c #000000",
+"+     c #FFDD00",
+"   .......   ",
+"  ..+++++..  ",
+" .+++++++++. ",
+".+++.....+++.",
+".++.+++++.++.",
+".++.+++++.++.",
+".+++++++++++.",
+".+++++++++++.",
+".++..+++..++.",
+".++..+++..++.",
+".+++++++++++.",
+" .+++++++++. ",
+"  ..+++++..  ",
+"   .......   "};
diff --git a/lisp/gnus/sad.pbm b/lisp/gnus/sad.pbm
new file mode 100644 (file)
index 0000000..892e343
Binary files /dev/null and b/lisp/gnus/sad.pbm differ
diff --git a/lisp/gnus/sad.xpm b/lisp/gnus/sad.xpm
new file mode 100644 (file)
index 0000000..b0acef4
--- /dev/null
@@ -0,0 +1,20 @@
+/* XPM */
+static char * sad_xpm[] = {
+"13 14 3 1",
+"      c None",
+".     c #000000",
+"+     c #FFDD00",
+"   .......   ",
+"  ..+++++..  ",
+" .+++++++++. ",
+".+++++++++++.",
+".++..+++..++.",
+".++..+++..++.",
+".+++++++++++.",
+".+++++++++++.",
+".+++.....+++.",
+".++.+++++.++.",
+".++.+++++.++.",
+" .+++++++++. ",
+"  ..+++++..  ",
+"   .......   "};
diff --git a/lisp/gnus/smile.xpm b/lisp/gnus/smile.xpm
new file mode 100644 (file)
index 0000000..374d240
--- /dev/null
@@ -0,0 +1,20 @@
+/* XPM */
+static char * smile_xpm[] = {
+"13 14 3 1",
+"      c None",
+".     c #000000",
+"+     c #FFDD00",
+"   .......   ",
+"  ..+++++..  ",
+" .+++++++++. ",
+".+++++++++++.",
+".++..+++..++.",
+".++..+++..++.",
+".+++++++++++.",
+".+++++++++++.",
+".++.+++++.++.",
+".++.+++++.++.",
+".+++.....+++.",
+" .+++++++++. ",
+"  ..+++++..  ",
+"   .......   "};
diff --git a/lisp/gnus/time-date.el b/lisp/gnus/time-date.el
new file mode 100644 (file)
index 0000000..662625c
--- /dev/null
@@ -0,0 +1,195 @@
+;;; time-date.el --- Date and time handling functions
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
+;;     Masanobu Umeda <umerin@mse.kyutech.ac.jp>
+;; Keywords: mail news util
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'parse-time)
+
+(autoload 'timezone-make-date-arpa-standard "timezone")
+
+;;;###autoload
+(defun date-to-time (date)
+  "Parse a string that represents a date-time and return a time value."
+  (condition-case ()
+      (apply 'encode-time
+            (parse-time-string
+             ;; `parse-time-string' isn't sufficiently general or
+             ;; robust.  It fails to grok some of the formats that
+             ;; timezone does (e.g. dodgy post-2000 stuff from some
+             ;; Elms) and either fails or returns bogus values.  Lars
+             ;; reverted this change, but that loses non-trivially
+             ;; often for me.  -- fx
+             (timezone-make-date-arpa-standard date)))
+    (error (error "Invalid date: %s" date))))
+
+(defun time-to-seconds (time)
+  "Convert time value TIME to a floating point number.
+You can use `float-time' instead."
+  (+ (* (car time) 65536.0)
+     (cadr time)
+     (/ (or (nth 2 time) 0) 1000000.0)))
+
+;;;###autoload
+(defun seconds-to-time (seconds)
+  "Convert SECONDS (a floating point number) to a time value."
+  (list (floor seconds 65536)
+       (floor (mod seconds 65536))
+       (floor (* (- seconds (ffloor seconds)) 1000000))))
+
+;;;###autoload
+(defun time-less-p (t1 t2)
+  "Say whether time value T1 is less than time value T2."
+  (or (< (car t1) (car t2))
+      (and (= (car t1) (car t2))
+          (< (nth 1 t1) (nth 1 t2)))))
+
+;;;###autoload
+(defun days-to-time (days)
+  "Convert DAYS into a time value."
+  (let* ((seconds (* 1.0 days 60 60 24))
+        (rest (expt 2 16))
+        (ms (condition-case nil (floor (/ seconds rest))
+              (range-error (expt 2 16)))))
+    (list ms (condition-case nil (round (- seconds (* ms rest)))
+              (range-error (expt 2 16))))))
+
+;;;###autoload
+(defun time-since (time)
+  "Return the time elapsed since TIME.
+TIME should be either a time value or a date-time string."
+  (when (stringp time)
+    ;; Convert date strings to internal time.
+    (setq time (date-to-time time)))
+  (let* ((current (current-time))
+        (rest (when (< (nth 1 current) (nth 1 time))
+                (expt 2 16))))
+    (list (- (+ (car current) (if rest -1 0)) (car time))
+         (- (+ (or rest 0) (nth 1 current)) (nth 1 time)))))
+
+;;;###autoload
+(defalias 'subtract-time 'time-subtract)
+
+;;;###autoload
+(defun time-subtract (t1 t2)
+  "Subtract two time values.
+Return the difference in the format of a time value."
+  (let ((borrow (< (cadr t1) (cadr t2))))
+    (list (- (car t1) (car t2) (if borrow 1 0))
+         (- (+ (if borrow 65536 0) (cadr t1)) (cadr t2)))))
+
+;;;###autoload
+(defun time-add (t1 t2)
+  "Add two time values.  One should represent a time difference."
+  (let ((high (car t1))
+       (low (if (consp (cdr t1)) (nth 1 t1) (cdr t1)))
+       (micro (if (numberp (car-safe (cdr-safe (cdr t1))))
+                  (nth 2 t1)
+                0))
+       (high2 (car t2))
+       (low2 (if (consp (cdr t2)) (nth 1 t2) (cdr t2)))
+       (micro2 (if (numberp (car-safe (cdr-safe (cdr t2))))
+                   (nth 2 t2)
+                 0)))
+    ;; Add
+    (setq micro (+ micro micro2))
+    (setq low (+ low low2))
+    (setq high (+ high high2))
+
+    ;; Normalize
+    ;; `/' rounds towards zero while `mod' returns a positive number,
+    ;; so we can't rely on (= a (+ (* 100 (/ a 100)) (mod a 100))).
+    (setq low (+ low (/ micro 1000000) (if (< micro 0) -1 0)))
+    (setq micro (mod micro 1000000))
+    (setq high (+ high (/ low 65536) (if (< low 0) -1 0)))
+    (setq low (logand low 65535))
+
+    (list high low micro)))
+
+;;;###autoload
+(defun date-to-day (date)
+  "Return the number of days between year 1 and DATE.
+DATE should be a date-time string."
+  (time-to-days (date-to-time date)))
+
+;;;###autoload
+(defun days-between (date1 date2)
+  "Return the number of days between DATE1 and DATE2.
+DATE1 and DATE2 should be date-time strings."
+  (- (date-to-day date1) (date-to-day date2)))
+
+;;;###autoload
+(defun date-leap-year-p (year)
+  "Return t if YEAR is a leap year."
+  (or (and (zerop (% year 4))
+          (not (zerop (% year 100))))
+      (zerop (% year 400))))
+
+;;;###autoload
+(defun time-to-day-in-year (time)
+  "Return the day number within the year of the date month/day/year."
+  (let* ((tim (decode-time time))
+        (month (nth 4 tim))
+        (day (nth 3 tim))
+        (year (nth 5 tim))
+        (day-of-year (+ day (* 31 (1- month)))))
+    (when (> month 2)
+      (setq day-of-year (- day-of-year (/ (+ 23 (* 4 month)) 10)))
+      (when (date-leap-year-p year)
+       (setq day-of-year (1+ day-of-year))))
+    day-of-year))
+
+;;;###autoload
+(defun time-to-days (time)
+  "The number of days between the Gregorian date 0001-12-31bce and TIME.
+TIME should be a time value.
+The Gregorian date Sunday, December 31, 1bce is imaginary."
+  (let* ((tim (decode-time time))
+        (month (nth 4 tim))
+        (day (nth 3 tim))
+        (year (nth 5 tim)))
+    (+ (time-to-day-in-year time)      ;       Days this year
+       (* 365 (1- year))               ;       + Days in prior years
+       (/ (1- year) 4)                 ;       + Julian leap years
+       (- (/ (1- year) 100))           ;       - century years
+       (/ (1- year) 400))))            ;       + Gregorian leap years
+
+(defun time-to-number-of-days (time)
+  "Return the number of days represented by TIME.
+The number of days will be returned as a floating point number."
+  (/ (+ (* 1.0 65536 (car time)) (cadr time)) (* 60 60 24)))
+
+;;;###autoload
+(defun safe-date-to-time (date)
+  "Parse a string that represents a date-time and return a time value.
+If DATE is malformed, return a time value of zeros."
+  (condition-case ()
+      (date-to-time date)
+    (error '(0 0))))
+
+(provide 'time-date)
+
+;;; arch-tag: addcf07b-b20a-465b-af72-550b8ac5190f
+;;; time-date.el ends here
diff --git a/lisp/gnus/wry.xpm b/lisp/gnus/wry.xpm
new file mode 100644 (file)
index 0000000..8cd8ded
--- /dev/null
@@ -0,0 +1,20 @@
+/* XPM */
+static char * wry_xpm[] = {
+"13 14 3 1",
+"      c None",
+".     c #000000",
+"+     c #FFDD00",
+"   .......   ",
+"  ..+++++..  ",
+" .+++++++++. ",
+".+++++++++++.",
+".+++++++..++.",
+".++..+++..++.",
+".++..+++++++.",
+".+++++++++++.",
+".+++++++...+.",
+".+++++...+++.",
+".++++..+++++.",
+" .+++.+++++. ",
+"  ..+++++..  ",
+"   .......   "};