ezmlm 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 78e12cc82acb6040783c230b8f4777c933961a2d
4
- data.tar.gz: 5b60f5ef80fdd35da55570814ebcb2fa6ceccb05
3
+ metadata.gz: a255b2d3807466ae69a474e75ffeccf6f245c478
4
+ data.tar.gz: 5c06a675c3be6edab4a804a5ef9e916c100b60c3
5
5
  SHA512:
6
- metadata.gz: f4d4450a5d16017bc402cbd9ae70b93165c164bcd63c5c1924d5357c51124a1cef90b73caccf7c278af3339142f69feaa253623999164ff495129da4ccd11bcd
7
- data.tar.gz: 5af8684aed468b3e91b9cce5a36a162d80e43de4d9ac53eaaf24667affaf98cf5bd1c89fd26128e3095133e3c3bc34dd56b2969040e25c4362521a6a412edb40
6
+ metadata.gz: ff96a67813867191d1333d3947a15f8861b461e2b73d6089d972f4f2aa3766d26b548b033a86a5198653819547dc0e5ba7f1b8a3e0870663e6058f4659f5d82d
7
+ data.tar.gz: e5962affdda9dd00308d12e94b37f6c7281136b9148bd7288b6df40e7dca5575b0e197515f0c947d373cc04e24ea7d631921914db432e6e317e113a97c7cfa24
@@ -13,6 +13,7 @@
13
13
  *
14
14
  */
15
15
 
16
+ static
16
17
  void surf(unsigned int out[8],const unsigned int in[12],const unsigned int seed[32])
17
18
  {
18
19
  unsigned int t[12]; unsigned int x; unsigned int sum = 0;
@@ -32,6 +33,7 @@ void surf(unsigned int out[8],const unsigned int in[12],const unsigned int seed[
32
33
  }
33
34
  }
34
35
 
36
+ static
35
37
  void surfpcs_init(surfpcs *s,const unsigned int k[32])
36
38
  {
37
39
  int i;
@@ -41,6 +43,7 @@ void surfpcs_init(surfpcs *s,const unsigned int k[32])
41
43
  s->todo = 0;
42
44
  }
43
45
 
46
+ static
44
47
  void surfpcs_add(surfpcs *s,const char *x,unsigned int n)
45
48
  {
46
49
  int i;
@@ -59,6 +62,7 @@ void surfpcs_add(surfpcs *s,const char *x,unsigned int n)
59
62
  }
60
63
  }
61
64
 
65
+ static
62
66
  void surfpcs_addlc(surfpcs *s,const char *x,unsigned int n)
63
67
  /* modified from surfpcs_add by case-independence and skipping ' ' & '\t' */
64
68
  {
@@ -84,6 +88,7 @@ void surfpcs_addlc(surfpcs *s,const char *x,unsigned int n)
84
88
  }
85
89
  }
86
90
 
91
+ static
87
92
  void surfpcs_out(surfpcs *s,unsigned char h[32])
88
93
  {
89
94
  int i;
@@ -95,6 +100,7 @@ void surfpcs_out(surfpcs *s,unsigned char h[32])
95
100
  for (i = 0;i < 32;++i) h[i] = outdata[end[i]];
96
101
  }
97
102
 
103
+ static
98
104
  void makehash(const char *indata,unsigned int inlen,char *hash)
99
105
  /* makes hash[COOKIE=20] from stralloc *indata, ignoring case and */
100
106
  /* SPACE/TAB */
@@ -112,6 +118,7 @@ void makehash(const char *indata,unsigned int inlen,char *hash)
112
118
  hash[i] = 'a' + (h[i] & 15);
113
119
  }
114
120
 
121
+ static
115
122
  unsigned int subhashb(const char *s,long len)
116
123
  {
117
124
  unsigned long h;
@@ -121,6 +128,7 @@ unsigned int subhashb(const char *s,long len)
121
128
  return h % 53;
122
129
  }
123
130
 
131
+ static
124
132
  unsigned int subhashs(const char *s)
125
133
  {
126
134
  return subhashb(s,strlen(s));
@@ -132,7 +140,7 @@ unsigned int subhashs(const char *s)
132
140
 
133
141
 
134
142
  /*
135
- * call­seq:
143
+ * call-seq:
136
144
  * Ezmlm::Hash.address( email ) -> String
137
145
  *
138
146
  * Call the Surf hashing function on an +email+ address, returning
@@ -141,7 +149,7 @@ unsigned int subhashs(const char *s)
141
149
  * the '<' character.)
142
150
  *
143
151
  */
144
- VALUE
152
+ static VALUE
145
153
  address( VALUE klass, VALUE email ) {
146
154
  char hash[20];
147
155
  char *input;
@@ -158,14 +166,14 @@ address( VALUE klass, VALUE email ) {
158
166
 
159
167
 
160
168
  /*
161
- * call­seq:
169
+ * call-seq:
162
170
  * Ezmlm::Hash.subscriber( address ) -> String
163
171
  *
164
172
  * Call the subscriber hashing function on an email +address+, returning
165
173
  * the index character referring to the file containing subscriber presence.
166
174
  *
167
175
  */
168
- VALUE
176
+ static VALUE
169
177
  subscriber( VALUE klass, VALUE email ) {
170
178
  unsigned int prefix;
171
179
 
@@ -27,19 +27,19 @@ static const unsigned int littleendian[8] = {
27
27
  #define data ((unsigned char *) s->in)
28
28
  #define outdata ((unsigned char *) s->out)
29
29
 
30
- extern void surf( unsigned int out[8], const unsigned int in[12], const unsigned int seed[32] );
31
- extern void surfpcs_init( surfpcs *s, const unsigned int k[32] );
32
- extern void surfpcs_add( surfpcs *s, const char *x,unsigned int n );
33
- extern void surfpcs_addlc( surfpcs *s, const char *x,unsigned int n );
34
- extern void surfpcs_out( surfpcs *s, unsigned char h[32] );
30
+ static void surf( unsigned int out[8], const unsigned int in[12], const unsigned int seed[32] );
31
+ static void surfpcs_init( surfpcs *s, const unsigned int k[32] );
32
+ static void surfpcs_add( surfpcs *s, const char *x,unsigned int n );
33
+ static void surfpcs_addlc( surfpcs *s, const char *x,unsigned int n );
34
+ static void surfpcs_out( surfpcs *s, unsigned char h[32] );
35
35
  #endif
36
36
 
37
37
 
38
38
  #ifndef SUBHASH_H
39
39
  #define SUBHASH_H
40
40
 
41
- unsigned int subhashs(const char *s);
42
- unsigned int subhashb(const char *s,long len);
41
+ static unsigned int subhashs(const char *s);
42
+ static unsigned int subhashb(const char *s,long len);
43
43
  #define subhashsa(SA) subhashb((SA)->s,(SA)->len)
44
44
 
45
45
  #endif
@@ -11,10 +11,10 @@ require 'pathname'
11
11
  # end
12
12
  #
13
13
  module Ezmlm
14
- # $Id: ezmlm.rb,v d1b9dd767e3a 2017/05/16 23:03:03 mahlon $
14
+ # $Id: ezmlm.rb,v f8873b391f3d 2017/05/24 22:42:39 mahlon $
15
15
 
16
16
  # Package version
17
- VERSION = '1.0.2'
17
+ VERSION = '1.1.0'
18
18
 
19
19
  # Suck in the components.
20
20
  #
@@ -14,7 +14,7 @@ require 'ezmlm' unless defined?( Ezmlm )
14
14
  #
15
15
  #---
16
16
  class Ezmlm::List
17
- # $Id: list.rb,v 9d59d30685cb 2017/05/16 22:52:05 mahlon $
17
+ # $Id: list.rb,v f8873b391f3d 2017/05/24 22:42:39 mahlon $
18
18
 
19
19
  # Valid subdirectories/sections for subscriptions.
20
20
  SUBSCRIPTION_DIRS = %w[ deny mod digest allow ]
@@ -664,6 +664,16 @@ class Ezmlm::List
664
664
  end
665
665
 
666
666
 
667
+ ### Return a Time object for the last activity on the list, or nil
668
+ ### if archiving is disabled or there are no posts.
669
+ ###
670
+ def last_activity
671
+ file = self.listdir + 'archnum'
672
+ return unless file.exist?
673
+ return file.stat.mtime
674
+ end
675
+
676
+
667
677
  ### Parse all thread indexes into a single array that can be used
668
678
  ### as a lookup table.
669
679
  ###
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ezmlm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mahlon E. Smith
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-05-16 00:00:00.000000000 Z
13
+ date: 2017-05-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mail
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  version: '0'
80
80
  requirements: []
81
81
  rubyforge_project:
82
- rubygems_version: 2.6.8
82
+ rubygems_version: 2.6.12
83
83
  signing_key:
84
84
  specification_version: 4
85
85
  summary: Interact with Ezmlm-IDX mailing lists.