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 +4 -4
- data/ext/ezmlm/hash/hash.c +12 -4
- data/ext/ezmlm/hash/hash.h +7 -7
- data/lib/ezmlm.rb +2 -2
- data/lib/ezmlm/list.rb +11 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a255b2d3807466ae69a474e75ffeccf6f245c478
|
4
|
+
data.tar.gz: 5c06a675c3be6edab4a804a5ef9e916c100b60c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff96a67813867191d1333d3947a15f8861b461e2b73d6089d972f4f2aa3766d26b548b033a86a5198653819547dc0e5ba7f1b8a3e0870663e6058f4659f5d82d
|
7
|
+
data.tar.gz: e5962affdda9dd00308d12e94b37f6c7281136b9148bd7288b6df40e7dca5575b0e197515f0c947d373cc04e24ea7d631921914db432e6e317e113a97c7cfa24
|
data/ext/ezmlm/hash/hash.c
CHANGED
@@ -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
|
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
|
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
|
|
data/ext/ezmlm/hash/hash.h
CHANGED
@@ -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
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
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
|
data/lib/ezmlm.rb
CHANGED
@@ -11,10 +11,10 @@ require 'pathname'
|
|
11
11
|
# end
|
12
12
|
#
|
13
13
|
module Ezmlm
|
14
|
-
# $Id: ezmlm.rb,v
|
14
|
+
# $Id: ezmlm.rb,v f8873b391f3d 2017/05/24 22:42:39 mahlon $
|
15
15
|
|
16
16
|
# Package version
|
17
|
-
VERSION = '1.0
|
17
|
+
VERSION = '1.1.0'
|
18
18
|
|
19
19
|
# Suck in the components.
|
20
20
|
#
|
data/lib/ezmlm/list.rb
CHANGED
@@ -14,7 +14,7 @@ require 'ezmlm' unless defined?( Ezmlm )
|
|
14
14
|
#
|
15
15
|
#---
|
16
16
|
class Ezmlm::List
|
17
|
-
# $Id: list.rb,v
|
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
|
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-
|
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.
|
82
|
+
rubygems_version: 2.6.12
|
83
83
|
signing_key:
|
84
84
|
specification_version: 4
|
85
85
|
summary: Interact with Ezmlm-IDX mailing lists.
|