cdb-full 0.5a
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.
- data/COPYING +6 -0
- data/FILES +88 -0
- data/README +163 -0
- data/VERSION +1 -0
- data/cdb-0.75/CHANGES +16 -0
- data/cdb-0.75/FILES +78 -0
- data/cdb-0.75/Makefile +320 -0
- data/cdb-0.75/README +7 -0
- data/cdb-0.75/SYSDEPS +3 -0
- data/cdb-0.75/TARGETS +66 -0
- data/cdb-0.75/TODO +1 -0
- data/cdb-0.75/VERSION +1 -0
- data/cdb-0.75/alloc.c +32 -0
- data/cdb-0.75/alloc.h +8 -0
- data/cdb-0.75/auto-str.c +44 -0
- data/cdb-0.75/auto_home.h +6 -0
- data/cdb-0.75/buffer.c +10 -0
- data/cdb-0.75/buffer.h +56 -0
- data/cdb-0.75/buffer_0.c +12 -0
- data/cdb-0.75/buffer_1.c +6 -0
- data/cdb-0.75/buffer_1s.c +6 -0
- data/cdb-0.75/buffer_2.c +6 -0
- data/cdb-0.75/buffer_copy.c +16 -0
- data/cdb-0.75/buffer_get.c +67 -0
- data/cdb-0.75/buffer_put.c +88 -0
- data/cdb-0.75/byte.h +13 -0
- data/cdb-0.75/byte_copy.c +14 -0
- data/cdb-0.75/byte_cr.c +16 -0
- data/cdb-0.75/byte_diff.c +16 -0
- data/cdb-0.75/cdb.c +136 -0
- data/cdb-0.75/cdb.h +37 -0
- data/cdb-0.75/cdb_hash.c +21 -0
- data/cdb-0.75/cdb_make.c +153 -0
- data/cdb-0.75/cdb_make.h +39 -0
- data/cdb-0.75/cdbdump.c +83 -0
- data/cdb-0.75/cdbget.c +67 -0
- data/cdb-0.75/cdbmake-12.sh +8 -0
- data/cdb-0.75/cdbmake-sv.sh +22 -0
- data/cdb-0.75/cdbmake.c +110 -0
- data/cdb-0.75/cdbstats.c +125 -0
- data/cdb-0.75/cdbtest.c +119 -0
- data/cdb-0.75/choose.sh +18 -0
- data/cdb-0.75/conf-cc +3 -0
- data/cdb-0.75/conf-home +3 -0
- data/cdb-0.75/conf-ld +3 -0
- data/cdb-0.75/error.c +109 -0
- data/cdb-0.75/error.h +25 -0
- data/cdb-0.75/error_str.c +271 -0
- data/cdb-0.75/exit.h +6 -0
- data/cdb-0.75/find-systype.sh +159 -0
- data/cdb-0.75/fmt.h +25 -0
- data/cdb-0.75/fmt_ulong.c +13 -0
- data/cdb-0.75/hier.c +15 -0
- data/cdb-0.75/install.c +149 -0
- data/cdb-0.75/instcheck.c +108 -0
- data/cdb-0.75/open.h +10 -0
- data/cdb-0.75/open_read.c +6 -0
- data/cdb-0.75/open_trunc.c +6 -0
- data/cdb-0.75/random.cdb +0 -0
- data/cdb-0.75/readwrite.h +7 -0
- data/cdb-0.75/rts.exp +251 -0
- data/cdb-0.75/rts.sh +1 -0
- data/cdb-0.75/rts.tests +210 -0
- data/cdb-0.75/scan.h +28 -0
- data/cdb-0.75/scan_ulong.c +11 -0
- data/cdb-0.75/seek.h +15 -0
- data/cdb-0.75/seek_cur.c +7 -0
- data/cdb-0.75/seek_set.c +7 -0
- data/cdb-0.75/str.h +14 -0
- data/cdb-0.75/str_len.c +14 -0
- data/cdb-0.75/strerr.h +78 -0
- data/cdb-0.75/strerr_die.c +31 -0
- data/cdb-0.75/strerr_sys.c +12 -0
- data/cdb-0.75/testzero.c +35 -0
- data/cdb-0.75/trycpp.c +7 -0
- data/cdb-0.75/tryulong32.c +11 -0
- data/cdb-0.75/uint32.h1 +11 -0
- data/cdb-0.75/uint32.h2 +11 -0
- data/cdb-0.75/uint32_pack.c +21 -0
- data/cdb-0.75/uint32_unpack.c +31 -0
- data/cdb-0.75/warn-auto.sh +2 -0
- data/cdb-0.75/x86cpuid.c +38 -0
- data/cdb.c +372 -0
- data/depend +1 -0
- data/extconf.rb +11 -0
- data/lib/cdb.rb +90 -0
- data/sample/sample.rb +35 -0
- metadata +152 -0
data/COPYING
ADDED
data/FILES
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
COPYING
|
2
|
+
FILES
|
3
|
+
README
|
4
|
+
VERSION
|
5
|
+
cdb
|
6
|
+
cdb-0.75/uint32_unpack.c
|
7
|
+
cdb-0.75/TODO
|
8
|
+
cdb-0.75/CHANGES
|
9
|
+
cdb-0.75/VERSION
|
10
|
+
cdb-0.75/FILES
|
11
|
+
cdb-0.75/SYSDEPS
|
12
|
+
cdb-0.75/TARGETS
|
13
|
+
cdb-0.75/conf-cc
|
14
|
+
cdb-0.75/conf-ld
|
15
|
+
cdb-0.75/conf-home
|
16
|
+
cdb-0.75/Makefile
|
17
|
+
cdb-0.75/cdbget.c
|
18
|
+
cdb-0.75/cdbmake.c
|
19
|
+
cdb-0.75/cdbdump.c
|
20
|
+
cdb-0.75/cdbstats.c
|
21
|
+
cdb-0.75/cdbtest.c
|
22
|
+
cdb-0.75/cdbmake-12.sh
|
23
|
+
cdb-0.75/cdbmake-sv.sh
|
24
|
+
cdb-0.75/cdb.h
|
25
|
+
cdb-0.75/cdb.c
|
26
|
+
cdb-0.75/cdb_hash.c
|
27
|
+
cdb-0.75/cdb_make.h
|
28
|
+
cdb-0.75/cdb_make.c
|
29
|
+
cdb-0.75/rts.sh
|
30
|
+
cdb-0.75/rts.tests
|
31
|
+
cdb-0.75/rts.exp
|
32
|
+
cdb-0.75/testzero.c
|
33
|
+
cdb-0.75/random.cdb
|
34
|
+
cdb-0.75/choose.sh
|
35
|
+
cdb-0.75/warn-auto.sh
|
36
|
+
cdb-0.75/find-systype.sh
|
37
|
+
cdb-0.75/trycpp.c
|
38
|
+
cdb-0.75/x86cpuid.c
|
39
|
+
cdb-0.75/alloc.c
|
40
|
+
cdb-0.75/alloc.h
|
41
|
+
cdb-0.75/auto-str.c
|
42
|
+
cdb-0.75/auto_home.h
|
43
|
+
cdb-0.75/buffer.c
|
44
|
+
cdb-0.75/buffer.h
|
45
|
+
cdb-0.75/buffer_0.c
|
46
|
+
cdb-0.75/buffer_1.c
|
47
|
+
cdb-0.75/buffer_1s.c
|
48
|
+
cdb-0.75/buffer_2.c
|
49
|
+
cdb-0.75/buffer_copy.c
|
50
|
+
cdb-0.75/buffer_get.c
|
51
|
+
cdb-0.75/buffer_put.c
|
52
|
+
cdb-0.75/byte.h
|
53
|
+
cdb-0.75/byte_copy.c
|
54
|
+
cdb-0.75/byte_cr.c
|
55
|
+
cdb-0.75/byte_diff.c
|
56
|
+
cdb-0.75/error.c
|
57
|
+
cdb-0.75/error.h
|
58
|
+
cdb-0.75/error_str.c
|
59
|
+
cdb-0.75/exit.h
|
60
|
+
cdb-0.75/fmt.h
|
61
|
+
cdb-0.75/fmt_ulong.c
|
62
|
+
cdb-0.75/hier.c
|
63
|
+
cdb-0.75/install.c
|
64
|
+
cdb-0.75/instcheck.c
|
65
|
+
cdb-0.75/open.h
|
66
|
+
cdb-0.75/open_read.c
|
67
|
+
cdb-0.75/open_trunc.c
|
68
|
+
cdb-0.75/readwrite.h
|
69
|
+
cdb-0.75/scan.h
|
70
|
+
cdb-0.75/scan_ulong.c
|
71
|
+
cdb-0.75/seek.h
|
72
|
+
cdb-0.75/seek_cur.c
|
73
|
+
cdb-0.75/seek_set.c
|
74
|
+
cdb-0.75/str.h
|
75
|
+
cdb-0.75/str_len.c
|
76
|
+
cdb-0.75/strerr.h
|
77
|
+
cdb-0.75/strerr_die.c
|
78
|
+
cdb-0.75/strerr_sys.c
|
79
|
+
cdb-0.75/tryulong32.c
|
80
|
+
cdb-0.75/uint32.h1
|
81
|
+
cdb-0.75/uint32.h2
|
82
|
+
cdb-0.75/uint32_pack.c
|
83
|
+
cdb-0.75/README
|
84
|
+
cdb.c
|
85
|
+
depend
|
86
|
+
extconf.rb
|
87
|
+
lib/cdb.rb
|
88
|
+
sample/sample.rb
|
data/README
ADDED
@@ -0,0 +1,163 @@
|
|
1
|
+
==========
|
2
|
+
ruby-cdb
|
3
|
+
==========
|
4
|
+
|
5
|
+
This package provides Ruby interface to Dan Bernstein's cdb (constant
|
6
|
+
database) library. For the information about cdb itself, see library
|
7
|
+
author's website http://cr.yp.to/cdb.html.
|
8
|
+
|
9
|
+
|
10
|
+
Installation Process
|
11
|
+
======================
|
12
|
+
|
13
|
+
% tar xvzf ruby-cdb-x.y.tar.gz
|
14
|
+
% cd ruby-cdb
|
15
|
+
% more README
|
16
|
+
% (cd cdb; make)
|
17
|
+
% ruby extconf.rb
|
18
|
+
% make
|
19
|
+
% strip cdb.so (optional)
|
20
|
+
% su root -c 'make site-install'
|
21
|
+
|
22
|
+
done.
|
23
|
+
|
24
|
+
|
25
|
+
Note for Linux users
|
26
|
+
======================
|
27
|
+
|
28
|
+
If you are using Linux, you may encounter errors like this.
|
29
|
+
|
30
|
+
./load cdbget cdb.a buffer.a unix.a byte.a
|
31
|
+
cdb.a(cdb.o)(.text+0x11e):cdb.c: undefined reference to `_errno'
|
32
|
+
cdb.a(cdb.o)(.text+0x19b):cdb.c: undefined reference to `_errno'
|
33
|
+
|
34
|
+
If this is your case, try adding gcc -include option.
|
35
|
+
|
36
|
+
% echo gcc -O2 -include /usr/include/errno.h > cdb/conf-cc
|
37
|
+
% (cd cdb; make)
|
38
|
+
|
39
|
+
See following URLs for details.
|
40
|
+
|
41
|
+
http://cr.yp.to/docs/unixport.html#errno
|
42
|
+
http://www.thedjbway.org/errno.html
|
43
|
+
|
44
|
+
|
45
|
+
Reporting Bugs
|
46
|
+
================
|
47
|
+
|
48
|
+
If you find bugs, please contact <okahashi@gmail.com>.
|
49
|
+
|
50
|
+
|
51
|
+
Usage
|
52
|
+
=======
|
53
|
+
|
54
|
+
* class CDB
|
55
|
+
|
56
|
+
obj = CDB.new(file)
|
57
|
+
open file and setup it as a CDB object.
|
58
|
+
|
59
|
+
CDB.open(file) {|obj| .. }
|
60
|
+
same as:
|
61
|
+
|
62
|
+
obj = CDB.new(file)
|
63
|
+
begin
|
64
|
+
..
|
65
|
+
ensure
|
66
|
+
obj.close
|
67
|
+
end
|
68
|
+
|
69
|
+
CDB.each(file) {|key, data| .. }
|
70
|
+
same as:
|
71
|
+
|
72
|
+
CDB.open(file) {|obj|
|
73
|
+
obj.each {|key, data|
|
74
|
+
..
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
CDB.each(file, key) {|data| .. }
|
79
|
+
same as:
|
80
|
+
|
81
|
+
CDB.open(file) {|obj|
|
82
|
+
obj.each(key) {|data|
|
83
|
+
..
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
CDB.create(file, tmp, mode = 0644) {|obj| .. }
|
88
|
+
same as:
|
89
|
+
|
90
|
+
CDBMake.open(tmp, mode) {|obj|
|
91
|
+
..
|
92
|
+
}
|
93
|
+
File.rename(tmp, file)
|
94
|
+
|
95
|
+
CDB.edit(file, tmp, mode = nil) {|ary| .. }
|
96
|
+
open and read file <file>, yield block with an associative array
|
97
|
+
<ary>, write updated <ary> to <tmp> as cdb, and rename <tmp> to
|
98
|
+
<file>. (<ary> = [ [key, data], [key, data] .. ])
|
99
|
+
If <mode> is unspecified, File.stat(file).mode is used.
|
100
|
+
|
101
|
+
Note that in case <file> contains a large amount of data, they
|
102
|
+
are all read into memory (<ary>). If this is not preferable,
|
103
|
+
using CDB.update or class CDBMake directly is recommended.
|
104
|
+
|
105
|
+
CDB.update(file, tmp, mode = nil) {|read, write| .. }
|
106
|
+
same as:
|
107
|
+
|
108
|
+
CDB.open(file) {|read|
|
109
|
+
CDBMake.open(tmp, mode) {|write|
|
110
|
+
..
|
111
|
+
}
|
112
|
+
}
|
113
|
+
File.rename(tmp, file)
|
114
|
+
|
115
|
+
If <mode> is unspecified, File.stat(file).mode is used.
|
116
|
+
|
117
|
+
CDB.dump(file)
|
118
|
+
dump cdb data in cdbdump(1) format.
|
119
|
+
|
120
|
+
obj.find(key)
|
121
|
+
obj[key]
|
122
|
+
return the first data associated with <key>.
|
123
|
+
|
124
|
+
obj.each {|key, data| .. }
|
125
|
+
iterate over data in whole database.
|
126
|
+
|
127
|
+
obj.each(key) {|data| .. }
|
128
|
+
iterate over data associated with <key>.
|
129
|
+
|
130
|
+
obj.close
|
131
|
+
unmmap and close file.
|
132
|
+
|
133
|
+
obj.read(pos, len)
|
134
|
+
read <len> bytes from the byte position <pos> in the database.
|
135
|
+
Since file size check is not performed for now, too large arguments
|
136
|
+
may cause segmentation fault.
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
* class CDBMake
|
141
|
+
|
142
|
+
obj = CDBMake.new(file, mode = 0644)
|
143
|
+
open write-only file <file>. <mode> is passed to open(2).
|
144
|
+
|
145
|
+
CDBMake.open(file, mode = 0644) {|obj| .. }
|
146
|
+
same as:
|
147
|
+
|
148
|
+
obj = CDBMake.new(file, mode)
|
149
|
+
begin
|
150
|
+
..
|
151
|
+
ensure
|
152
|
+
obj.finish
|
153
|
+
end
|
154
|
+
|
155
|
+
obj.add(key, data)
|
156
|
+
obj[key] = data
|
157
|
+
store <data> under <key> in the database. Note that multiple
|
158
|
+
calls with the same <key> DO NOT override former data.
|
159
|
+
|
160
|
+
obj.finish
|
161
|
+
sync added data to the disk and close file.
|
162
|
+
|
163
|
+
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.5a
|
data/cdb-0.75/CHANGES
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
20000215
|
2
|
+
api: rewrote almost everything from scratch. tnx Ken Lalonde for
|
3
|
+
suggesting mmap.
|
4
|
+
20000216
|
5
|
+
ui: cdbget supports skip.
|
6
|
+
version: cdb 0.70, beta.
|
7
|
+
20000219
|
8
|
+
bug: cdb_make_addbegin() didn't explicitly return 0. impact:
|
9
|
+
database creation could fail on systems that didn't
|
10
|
+
follow the traditional C return behavior. fix: obvious.
|
11
|
+
tnx Uwe Ohse.
|
12
|
+
internal: increased bspace in cdb_make.h from 1024 to 8192.
|
13
|
+
internal: switched cdbmake to PUTC, GETC. 3x speedup here.
|
14
|
+
internal: added testzero to rts.
|
15
|
+
ui: posplus() sets nomem if it passes 4GB.
|
16
|
+
version: cdb 0.75, beta.
|
data/cdb-0.75/FILES
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
README
|
2
|
+
TODO
|
3
|
+
CHANGES
|
4
|
+
VERSION
|
5
|
+
FILES
|
6
|
+
SYSDEPS
|
7
|
+
TARGETS
|
8
|
+
conf-cc
|
9
|
+
conf-ld
|
10
|
+
conf-home
|
11
|
+
Makefile
|
12
|
+
cdbget.c
|
13
|
+
cdbmake.c
|
14
|
+
cdbdump.c
|
15
|
+
cdbstats.c
|
16
|
+
cdbtest.c
|
17
|
+
cdbmake-12.sh
|
18
|
+
cdbmake-sv.sh
|
19
|
+
cdb.h
|
20
|
+
cdb.c
|
21
|
+
cdb_hash.c
|
22
|
+
cdb_make.h
|
23
|
+
cdb_make.c
|
24
|
+
rts.sh
|
25
|
+
rts.tests
|
26
|
+
rts.exp
|
27
|
+
testzero.c
|
28
|
+
random.cdb
|
29
|
+
choose.sh
|
30
|
+
warn-auto.sh
|
31
|
+
find-systype.sh
|
32
|
+
trycpp.c
|
33
|
+
x86cpuid.c
|
34
|
+
alloc.c
|
35
|
+
alloc.h
|
36
|
+
auto-str.c
|
37
|
+
auto_home.h
|
38
|
+
buffer.c
|
39
|
+
buffer.h
|
40
|
+
buffer_0.c
|
41
|
+
buffer_1.c
|
42
|
+
buffer_1s.c
|
43
|
+
buffer_2.c
|
44
|
+
buffer_copy.c
|
45
|
+
buffer_get.c
|
46
|
+
buffer_put.c
|
47
|
+
byte.h
|
48
|
+
byte_copy.c
|
49
|
+
byte_cr.c
|
50
|
+
byte_diff.c
|
51
|
+
error.c
|
52
|
+
error.h
|
53
|
+
error_str.c
|
54
|
+
exit.h
|
55
|
+
fmt.h
|
56
|
+
fmt_ulong.c
|
57
|
+
hier.c
|
58
|
+
install.c
|
59
|
+
instcheck.c
|
60
|
+
open.h
|
61
|
+
open_read.c
|
62
|
+
open_trunc.c
|
63
|
+
readwrite.h
|
64
|
+
scan.h
|
65
|
+
scan_ulong.c
|
66
|
+
seek.h
|
67
|
+
seek_cur.c
|
68
|
+
seek_set.c
|
69
|
+
str.h
|
70
|
+
str_len.c
|
71
|
+
strerr.h
|
72
|
+
strerr_die.c
|
73
|
+
strerr_sys.c
|
74
|
+
tryulong32.c
|
75
|
+
uint32.h1
|
76
|
+
uint32.h2
|
77
|
+
uint32_pack.c
|
78
|
+
uint32_unpack.c
|
data/cdb-0.75/Makefile
ADDED
@@ -0,0 +1,320 @@
|
|
1
|
+
# Don't edit Makefile! Use conf-* for configuration.
|
2
|
+
|
3
|
+
SHELL=/bin/sh
|
4
|
+
|
5
|
+
default: it
|
6
|
+
|
7
|
+
alloc.a: \
|
8
|
+
makelib alloc.o
|
9
|
+
./makelib alloc.a alloc.o
|
10
|
+
|
11
|
+
alloc.o: \
|
12
|
+
compile alloc.c alloc.h error.h
|
13
|
+
./compile alloc.c
|
14
|
+
|
15
|
+
auto-str: \
|
16
|
+
load auto-str.o buffer.a unix.a byte.a
|
17
|
+
./load auto-str buffer.a unix.a byte.a
|
18
|
+
|
19
|
+
auto-str.o: \
|
20
|
+
compile auto-str.c buffer.h readwrite.h exit.h
|
21
|
+
./compile auto-str.c
|
22
|
+
|
23
|
+
auto_home.c: \
|
24
|
+
auto-str conf-home
|
25
|
+
./auto-str auto_home `head -1 conf-home` > auto_home.c
|
26
|
+
|
27
|
+
auto_home.o: \
|
28
|
+
compile auto_home.c
|
29
|
+
./compile auto_home.c
|
30
|
+
|
31
|
+
buffer.a: \
|
32
|
+
makelib strerr_sys.o buffer.o buffer_put.o buffer_2.o strerr_die.o \
|
33
|
+
buffer_get.o buffer_copy.o buffer_1.o buffer_0.o buffer_1s.o
|
34
|
+
./makelib buffer.a strerr_sys.o buffer.o buffer_put.o \
|
35
|
+
buffer_2.o strerr_die.o buffer_get.o buffer_copy.o \
|
36
|
+
buffer_1.o buffer_0.o buffer_1s.o
|
37
|
+
|
38
|
+
buffer.o: \
|
39
|
+
compile buffer.c buffer.h
|
40
|
+
./compile buffer.c
|
41
|
+
|
42
|
+
buffer_0.o: \
|
43
|
+
compile buffer_0.c readwrite.h buffer.h
|
44
|
+
./compile buffer_0.c
|
45
|
+
|
46
|
+
buffer_1.o: \
|
47
|
+
compile buffer_1.c readwrite.h buffer.h
|
48
|
+
./compile buffer_1.c
|
49
|
+
|
50
|
+
buffer_1s.o: \
|
51
|
+
compile buffer_1s.c readwrite.h buffer.h
|
52
|
+
./compile buffer_1s.c
|
53
|
+
|
54
|
+
buffer_2.o: \
|
55
|
+
compile buffer_2.c readwrite.h buffer.h
|
56
|
+
./compile buffer_2.c
|
57
|
+
|
58
|
+
buffer_copy.o: \
|
59
|
+
compile buffer_copy.c buffer.h
|
60
|
+
./compile buffer_copy.c
|
61
|
+
|
62
|
+
buffer_get.o: \
|
63
|
+
compile buffer_get.c buffer.h byte.h error.h
|
64
|
+
./compile buffer_get.c
|
65
|
+
|
66
|
+
buffer_put.o: \
|
67
|
+
compile buffer_put.c buffer.h str.h byte.h error.h
|
68
|
+
./compile buffer_put.c
|
69
|
+
|
70
|
+
byte.a: \
|
71
|
+
makelib byte_copy.o byte_cr.o str_len.o fmt_ulong.o uint32_unpack.o \
|
72
|
+
byte_diff.o uint32_pack.o scan_ulong.o
|
73
|
+
./makelib byte.a byte_copy.o byte_cr.o str_len.o \
|
74
|
+
fmt_ulong.o uint32_unpack.o byte_diff.o uint32_pack.o \
|
75
|
+
scan_ulong.o
|
76
|
+
|
77
|
+
byte_copy.o: \
|
78
|
+
compile byte_copy.c byte.h
|
79
|
+
./compile byte_copy.c
|
80
|
+
|
81
|
+
byte_cr.o: \
|
82
|
+
compile byte_cr.c byte.h
|
83
|
+
./compile byte_cr.c
|
84
|
+
|
85
|
+
byte_diff.o: \
|
86
|
+
compile byte_diff.c byte.h
|
87
|
+
./compile byte_diff.c
|
88
|
+
|
89
|
+
cdb.a: \
|
90
|
+
makelib cdb.o cdb_hash.o cdb_make.o
|
91
|
+
./makelib cdb.a cdb.o cdb_hash.o cdb_make.o
|
92
|
+
|
93
|
+
cdb.o: \
|
94
|
+
compile cdb.c readwrite.h error.h seek.h byte.h cdb.h uint32.h
|
95
|
+
./compile cdb.c
|
96
|
+
|
97
|
+
cdb_hash.o: \
|
98
|
+
compile cdb_hash.c cdb.h uint32.h
|
99
|
+
./compile cdb_hash.c
|
100
|
+
|
101
|
+
cdb_make.o: \
|
102
|
+
compile cdb_make.c readwrite.h seek.h error.h alloc.h cdb.h uint32.h \
|
103
|
+
cdb_make.h buffer.h uint32.h
|
104
|
+
./compile cdb_make.c
|
105
|
+
|
106
|
+
cdbdump: \
|
107
|
+
load cdbdump.o buffer.a unix.a byte.a
|
108
|
+
./load cdbdump buffer.a unix.a byte.a
|
109
|
+
|
110
|
+
cdbdump.o: \
|
111
|
+
compile cdbdump.c uint32.h fmt.h buffer.h strerr.h
|
112
|
+
./compile cdbdump.c
|
113
|
+
|
114
|
+
cdbget: \
|
115
|
+
load cdbget.o cdb.a buffer.a unix.a byte.a
|
116
|
+
./load cdbget cdb.a buffer.a unix.a byte.a
|
117
|
+
|
118
|
+
cdbget.o: \
|
119
|
+
compile cdbget.c exit.h scan.h str.h buffer.h strerr.h cdb.h uint32.h
|
120
|
+
./compile cdbget.c
|
121
|
+
|
122
|
+
cdbmake: \
|
123
|
+
load cdbmake.o cdb.a alloc.a buffer.a unix.a byte.a
|
124
|
+
./load cdbmake cdb.a alloc.a buffer.a unix.a byte.a
|
125
|
+
|
126
|
+
cdbmake-12: \
|
127
|
+
warn-auto.sh cdbmake-12.sh conf-home
|
128
|
+
cat warn-auto.sh cdbmake-12.sh \
|
129
|
+
| sed s}HOME}"`head -1 conf-home`"}g \
|
130
|
+
> cdbmake-12
|
131
|
+
chmod 755 cdbmake-12
|
132
|
+
|
133
|
+
cdbmake-sv: \
|
134
|
+
warn-auto.sh cdbmake-sv.sh conf-home
|
135
|
+
cat warn-auto.sh cdbmake-sv.sh \
|
136
|
+
| sed s}HOME}"`head -1 conf-home`"}g \
|
137
|
+
> cdbmake-sv
|
138
|
+
chmod 755 cdbmake-sv
|
139
|
+
|
140
|
+
cdbmake.o: \
|
141
|
+
compile cdbmake.c error.h open.h strerr.h cdb_make.h buffer.h \
|
142
|
+
uint32.h cdb.h uint32.h
|
143
|
+
./compile cdbmake.c
|
144
|
+
|
145
|
+
cdbstats: \
|
146
|
+
load cdbstats.o cdb.a buffer.a unix.a byte.a
|
147
|
+
./load cdbstats cdb.a buffer.a unix.a byte.a
|
148
|
+
|
149
|
+
cdbstats.o: \
|
150
|
+
compile cdbstats.c uint32.h fmt.h buffer.h strerr.h seek.h cdb.h \
|
151
|
+
uint32.h
|
152
|
+
./compile cdbstats.c
|
153
|
+
|
154
|
+
cdbtest: \
|
155
|
+
load cdbtest.o cdb.a buffer.a unix.a byte.a
|
156
|
+
./load cdbtest cdb.a buffer.a unix.a byte.a
|
157
|
+
|
158
|
+
cdbtest.o: \
|
159
|
+
compile cdbtest.c uint32.h fmt.h buffer.h strerr.h seek.h cdb.h \
|
160
|
+
uint32.h
|
161
|
+
./compile cdbtest.c
|
162
|
+
|
163
|
+
check: \
|
164
|
+
it instcheck
|
165
|
+
./instcheck
|
166
|
+
|
167
|
+
compile: \
|
168
|
+
warn-auto.sh conf-cc
|
169
|
+
( cat warn-auto.sh; \
|
170
|
+
echo exec "`head -1 conf-cc`" '-c $${1+"$$@"}' \
|
171
|
+
) > compile
|
172
|
+
chmod 755 compile
|
173
|
+
|
174
|
+
error.o: \
|
175
|
+
compile error.c error.h
|
176
|
+
./compile error.c
|
177
|
+
|
178
|
+
error_str.o: \
|
179
|
+
compile error_str.c error.h
|
180
|
+
./compile error_str.c
|
181
|
+
|
182
|
+
fmt_ulong.o: \
|
183
|
+
compile fmt_ulong.c fmt.h
|
184
|
+
./compile fmt_ulong.c
|
185
|
+
|
186
|
+
hier.o: \
|
187
|
+
compile hier.c auto_home.h
|
188
|
+
./compile hier.c
|
189
|
+
|
190
|
+
install: \
|
191
|
+
load install.o hier.o auto_home.o buffer.a unix.a byte.a
|
192
|
+
./load install hier.o auto_home.o buffer.a unix.a byte.a
|
193
|
+
|
194
|
+
install.o: \
|
195
|
+
compile install.c buffer.h strerr.h error.h open.h readwrite.h exit.h
|
196
|
+
./compile install.c
|
197
|
+
|
198
|
+
instcheck: \
|
199
|
+
load instcheck.o hier.o auto_home.o buffer.a unix.a byte.a
|
200
|
+
./load instcheck hier.o auto_home.o buffer.a unix.a byte.a
|
201
|
+
|
202
|
+
instcheck.o: \
|
203
|
+
compile instcheck.c strerr.h error.h readwrite.h exit.h
|
204
|
+
./compile instcheck.c
|
205
|
+
|
206
|
+
it: \
|
207
|
+
prog install instcheck
|
208
|
+
|
209
|
+
load: \
|
210
|
+
warn-auto.sh conf-ld
|
211
|
+
( cat warn-auto.sh; \
|
212
|
+
echo 'main="$$1"; shift'; \
|
213
|
+
echo exec "`head -1 conf-ld`" \
|
214
|
+
'-o "$$main" "$$main".o $${1+"$$@"}' \
|
215
|
+
) > load
|
216
|
+
chmod 755 load
|
217
|
+
|
218
|
+
makelib: \
|
219
|
+
warn-auto.sh systype
|
220
|
+
( cat warn-auto.sh; \
|
221
|
+
echo 'main="$$1"; shift'; \
|
222
|
+
echo 'rm -f "$$main"'; \
|
223
|
+
echo 'ar cr "$$main" $${1+"$$@"}'; \
|
224
|
+
case "`cat systype`" in \
|
225
|
+
sunos-5.*) ;; \
|
226
|
+
unix_sv*) ;; \
|
227
|
+
irix64-*) ;; \
|
228
|
+
irix-*) ;; \
|
229
|
+
dgux-*) ;; \
|
230
|
+
hp-ux-*) ;; \
|
231
|
+
sco*) ;; \
|
232
|
+
*) echo 'ranlib "$$main"' ;; \
|
233
|
+
esac \
|
234
|
+
) > makelib
|
235
|
+
chmod 755 makelib
|
236
|
+
|
237
|
+
open_read.o: \
|
238
|
+
compile open_read.c open.h
|
239
|
+
./compile open_read.c
|
240
|
+
|
241
|
+
open_trunc.o: \
|
242
|
+
compile open_trunc.c open.h
|
243
|
+
./compile open_trunc.c
|
244
|
+
|
245
|
+
prog: \
|
246
|
+
cdbget cdbmake cdbdump cdbstats cdbtest cdbmake-12 cdbmake-sv rts \
|
247
|
+
testzero
|
248
|
+
|
249
|
+
rts: \
|
250
|
+
warn-auto.sh rts.sh conf-home
|
251
|
+
cat warn-auto.sh rts.sh \
|
252
|
+
| sed s}HOME}"`head -1 conf-home`"}g \
|
253
|
+
> rts
|
254
|
+
chmod 755 rts
|
255
|
+
|
256
|
+
scan_ulong.o: \
|
257
|
+
compile scan_ulong.c scan.h
|
258
|
+
./compile scan_ulong.c
|
259
|
+
|
260
|
+
seek_cur.o: \
|
261
|
+
compile seek_cur.c seek.h
|
262
|
+
./compile seek_cur.c
|
263
|
+
|
264
|
+
seek_set.o: \
|
265
|
+
compile seek_set.c seek.h
|
266
|
+
./compile seek_set.c
|
267
|
+
|
268
|
+
setup: \
|
269
|
+
it install
|
270
|
+
./install
|
271
|
+
|
272
|
+
str_len.o: \
|
273
|
+
compile str_len.c str.h
|
274
|
+
./compile str_len.c
|
275
|
+
|
276
|
+
strerr_die.o: \
|
277
|
+
compile strerr_die.c buffer.h exit.h strerr.h
|
278
|
+
./compile strerr_die.c
|
279
|
+
|
280
|
+
strerr_sys.o: \
|
281
|
+
compile strerr_sys.c error.h strerr.h
|
282
|
+
./compile strerr_sys.c
|
283
|
+
|
284
|
+
systype: \
|
285
|
+
find-systype.sh conf-cc conf-ld trycpp.c x86cpuid.c
|
286
|
+
( cat warn-auto.sh; \
|
287
|
+
echo CC=\'`head -1 conf-cc`\'; \
|
288
|
+
echo LD=\'`head -1 conf-ld`\'; \
|
289
|
+
cat find-systype.sh; \
|
290
|
+
) | sh > systype
|
291
|
+
|
292
|
+
testzero: \
|
293
|
+
load testzero.o cdb.a alloc.a buffer.a unix.a byte.a
|
294
|
+
./load testzero cdb.a alloc.a buffer.a unix.a byte.a
|
295
|
+
|
296
|
+
testzero.o: \
|
297
|
+
compile testzero.c uint32.h scan.h strerr.h cdb_make.h buffer.h \
|
298
|
+
uint32.h
|
299
|
+
./compile testzero.c
|
300
|
+
|
301
|
+
uint32.h: \
|
302
|
+
tryulong32.c compile load uint32.h1 uint32.h2
|
303
|
+
( ( ./compile tryulong32.c && ./load tryulong32 && \
|
304
|
+
./tryulong32 ) >/dev/null 2>&1 \
|
305
|
+
&& cat uint32.h2 || cat uint32.h1 ) > uint32.h
|
306
|
+
rm -f tryulong32.o tryulong32
|
307
|
+
|
308
|
+
uint32_pack.o: \
|
309
|
+
compile uint32_pack.c uint32.h
|
310
|
+
./compile uint32_pack.c
|
311
|
+
|
312
|
+
uint32_unpack.o: \
|
313
|
+
compile uint32_unpack.c uint32.h
|
314
|
+
./compile uint32_unpack.c
|
315
|
+
|
316
|
+
unix.a: \
|
317
|
+
makelib error.o open_read.o open_trunc.o error_str.o seek_set.o \
|
318
|
+
seek_cur.o
|
319
|
+
./makelib unix.a error.o open_read.o open_trunc.o \
|
320
|
+
error_str.o seek_set.o seek_cur.o
|