Compare commits
735 Commits
LIBGTOP_2_
...
LIBGTOP_2_
Author | SHA1 | Date | |
---|---|---|---|
|
7bd1293665 | ||
|
5edf277435 | ||
|
3f307e8e30 | ||
|
b375457834 | ||
|
79e8b914ed | ||
|
faacbd7f8b | ||
|
dde57bee91 | ||
|
08798f05f5 | ||
|
486e6b0260 | ||
|
1c96e35cc0 | ||
|
83a3d5f76d | ||
|
80aeb305c2 | ||
|
4c8ae9e25c | ||
|
bae16b467f | ||
|
5e28a55218 | ||
|
4d0bca118a | ||
|
c3011b646c | ||
|
b94a36c719 | ||
|
7aaa4454ab | ||
|
6572ee1baf | ||
|
c95d39dde7 | ||
|
a32503df9b | ||
|
d31e33d4bf | ||
|
09becf3b7d | ||
|
6e9589702f | ||
|
ab7f98d2ff | ||
|
75b2832076 | ||
|
142a323364 | ||
|
3a4a550e06 | ||
|
2fc6e07c0f | ||
|
2d4db7f03f | ||
|
9b87f4586e | ||
|
9ff3af644c | ||
|
ffb5f13711 | ||
|
6dbc1e0d4a | ||
|
c660c08b6f | ||
|
2ce38167e1 | ||
|
7cad52aaa0 | ||
|
61f8cb7ff2 | ||
|
f05ee369d5 | ||
|
c3bfcf38a8 | ||
|
1552efa493 | ||
|
9bb1b80751 | ||
|
40140ad487 | ||
|
47e518d612 | ||
|
4e4cf10334 | ||
|
b02653eef9 | ||
|
bfb2d1b25c | ||
|
1042379d6d | ||
|
240d07da28 | ||
|
fb2247a58b | ||
|
c04ee88f00 | ||
|
1b44968284 | ||
|
47bad7fac1 | ||
|
7691d85225 | ||
|
d0863b7406 | ||
|
7afa0e0be7 | ||
|
0c260bfef1 | ||
|
312baf1bc2 | ||
|
1dc0883059 | ||
|
222b93c33f | ||
|
db93479a51 | ||
|
236d2b18e7 | ||
|
08956770d2 | ||
|
7a7c6baf55 | ||
|
5bfb085021 | ||
|
dfb9d6f967 | ||
|
530cc00ae7 | ||
|
a3557112a7 | ||
|
3f34aafc6e | ||
|
d6630b9f7a | ||
|
3b7c109916 | ||
|
c5fcc9aad6 | ||
|
f4fc67f85c | ||
|
bcc4ec968e | ||
|
543b3b9160 | ||
|
aac46b6daf | ||
|
407514e4d7 | ||
|
1491ccc594 | ||
|
14b462fdc5 | ||
|
1c64d5c704 | ||
|
21ecc84514 | ||
|
b7acfa6441 | ||
|
de0391e6a4 | ||
|
56e7068a8b | ||
|
ed9140570e | ||
|
ae5ecfe538 | ||
|
fdd8cb8d27 | ||
|
2c986b988f | ||
|
46cf060788 | ||
|
6ded77b938 | ||
|
b730035db5 | ||
|
38755e23a3 | ||
|
94a24147c7 | ||
|
5e08479a71 | ||
|
bb24644744 | ||
|
eb8fd1d1be | ||
|
f349d3a624 | ||
|
a0b236f4f7 | ||
|
e5e1729baf | ||
|
b035190e66 | ||
|
427504e7ac | ||
|
33c49d7c14 | ||
|
c24b7f3bc4 | ||
|
e76a450779 | ||
|
c0fc0f4cb4 | ||
|
5c597901ad | ||
|
d3145d1b8b | ||
|
1ac0f147b7 | ||
|
fdb4a824fc | ||
|
2449e92804 | ||
|
7846ac218d | ||
|
5b34c23069 | ||
|
b6ee365761 | ||
|
e4f5543f9d | ||
|
a7f8debaa2 | ||
|
34e8918003 | ||
|
478be2d170 | ||
|
8a78a93e0c | ||
|
622eb0ea5b | ||
|
455118131e | ||
|
74ab42d100 | ||
|
d294298c7e | ||
|
4befe086c4 | ||
|
98930be564 | ||
|
16b81f0d91 | ||
|
dfd678599f | ||
|
6e4f80b8e2 | ||
|
f704c4becf | ||
|
9ab1889a3f | ||
|
201e78d00a | ||
|
d8cb698ae4 | ||
|
876b2725c0 | ||
|
c06a084fcf | ||
|
cee38c53bc | ||
|
81b009733e | ||
|
035b387463 | ||
|
158dec2b2a | ||
|
752d5b47d2 | ||
|
c15ff3f342 | ||
|
7a7e7d1bc3 | ||
|
6511ad348b | ||
|
5b1eb2290a | ||
|
00aed22f17 | ||
|
15c1ad1bd9 | ||
|
e1d552d9f7 | ||
|
60749e0bef | ||
|
bd01a45455 | ||
|
54529c2425 | ||
|
cf62a380bf | ||
|
ab2a4e6e6a | ||
|
7a9428a0e5 | ||
|
da80f53deb | ||
|
ae15c4159c | ||
|
eaee97b2bf | ||
|
94882bbc60 | ||
|
1e02e69b4a | ||
|
8277cc4d67 | ||
|
29858d29d8 | ||
|
984baf22f2 | ||
|
cdd3862061 | ||
|
c7cec23cf4 | ||
|
55b6e2e082 | ||
|
7d481fc8e9 | ||
|
50a02de454 | ||
|
1fcdf1af86 | ||
|
c62a74fb5a | ||
|
608ac42afe | ||
|
99a3b1fe82 | ||
|
ec00e62a54 | ||
|
29060eb6ce | ||
|
5301e8a86a | ||
|
dc103ad41d | ||
|
de91c11f87 | ||
|
b6091762ac | ||
|
4719557dae | ||
|
f4a05d8fc9 | ||
|
0ff66c2eaa | ||
|
a40a438ec8 | ||
|
718cd38098 | ||
|
6b88dcd4aa | ||
|
29b428608d | ||
|
e487fc30f4 | ||
|
578e5a5194 | ||
|
fb08ec7144 | ||
|
a51ffb6b73 | ||
|
0ecdde94c2 | ||
|
969260c9a9 | ||
|
fe00191113 | ||
|
60f0ea7dc2 | ||
|
d6c8167076 | ||
|
26b2aaa2db | ||
|
0b45f63e61 | ||
|
a790130414 | ||
|
f36d5e5370 | ||
|
5dbfe42493 | ||
|
76f1fb641c | ||
|
7b30b1ec86 | ||
|
9e2a8f7db8 | ||
|
d6a6d70c75 | ||
|
da16460aad | ||
|
444ede9949 | ||
|
b25b0cf4d4 | ||
|
f282240c0c | ||
|
8d6e26a8d6 | ||
|
62af029665 | ||
|
e43f1a64c5 | ||
|
f92c264826 | ||
|
350e4e799d | ||
|
6c6d8e006e | ||
|
df3901571d | ||
|
a4db88252e | ||
|
48440ac59b | ||
|
c3a55796c2 | ||
|
33a659ab06 | ||
|
5e8644d736 | ||
|
14e7219160 | ||
|
5f0246b07d | ||
|
fa20de8904 | ||
|
00d9dd7065 | ||
|
0a3a0c1a34 | ||
|
a9ed25e7fc | ||
|
e577aa3d08 | ||
|
8bcbf2f86c | ||
|
1e9cb3ea2a | ||
|
7e24f71432 | ||
|
4dad0e5b8c | ||
|
9dc214b3e7 | ||
|
7700a6525e | ||
|
28150c48f7 | ||
|
1f6916b5d0 | ||
|
36c36b9afb | ||
|
6402efe196 | ||
|
00a32c887c | ||
|
c92bf0f9a9 | ||
|
44027f6bd2 | ||
|
3fec7a0946 | ||
|
47d4322965 | ||
|
7ae71b3d8f | ||
|
a73800ae2d | ||
|
b124998639 | ||
|
238d03677a | ||
|
0f3babc8e9 | ||
|
55ff827b50 | ||
|
0daf65ef73 | ||
|
2eab7cfc48 | ||
|
a691993a86 | ||
|
d3e83afb0a | ||
|
129e4bc0ac | ||
|
faec393b8d | ||
|
a7d39be2b5 | ||
|
8892637796 | ||
|
00a9f98ee0 | ||
|
4b8a9ece16 | ||
|
fc8645245a | ||
|
2d4553adf2 | ||
|
5f02295a63 | ||
|
8b1dd440ee | ||
|
77a1a6a43d | ||
|
e9c8125828 | ||
|
3212af2fb4 | ||
|
52dbe1469d | ||
|
837ee6bcc6 | ||
|
8a85be8f00 | ||
|
3455d025a2 | ||
|
d2f4502e74 | ||
|
2144fab671 | ||
|
e8c90833e8 | ||
|
d567c86818 | ||
|
931ba0fa8d | ||
|
8da7cfd032 | ||
|
3fa1063b74 | ||
|
e2d5319441 | ||
|
85a7719f39 | ||
|
490a05d01c | ||
|
b54197c2e1 | ||
|
86dbeab484 | ||
|
15da337d8a | ||
|
992e064952 | ||
|
26ff5dbd79 | ||
|
473ecd6b3a | ||
|
e5b75b86fc | ||
|
d826c3e48c | ||
|
f10223b8eb | ||
|
7e28d2d5dc | ||
|
d8aa36d637 | ||
|
9deecf345e | ||
|
dd17bc8f92 | ||
|
f11195b104 | ||
|
74f688c5d1 | ||
|
65b08749cf | ||
|
f7b69ebfae | ||
|
371371b633 | ||
|
d423559605 | ||
|
f3d309441a | ||
|
fabb12370f | ||
|
5af2aab0bf | ||
|
dd8c31ebda | ||
|
4d402ecc14 | ||
|
b660c7a0f7 | ||
|
20c306fc6d | ||
|
2a86a5de49 | ||
|
7ba17b2bee | ||
|
31067e703d | ||
|
12e32ffc24 | ||
|
b4122165eb | ||
|
c17f8f2421 | ||
|
e2e5c3a1cc | ||
|
8d532c6298 | ||
|
50f0929ae8 | ||
|
62c59f6087 | ||
|
f0aab5a724 | ||
|
27bf526b85 | ||
|
bb15be7198 | ||
|
fe86288e76 | ||
|
fc4f288ce1 | ||
|
7e20f2f5f2 | ||
|
720cb52cf3 | ||
|
d74c329404 | ||
|
b8fec13607 | ||
|
8b8e1de19a | ||
|
38d6f5ad0c | ||
|
4e42a2aa17 | ||
|
8491b51264 | ||
|
c164df664d | ||
|
fa592c3a94 | ||
|
cb96ce0ad2 | ||
|
938a444edf | ||
|
995b506920 | ||
|
ba466fe572 | ||
|
c2e40852b6 | ||
|
a1c574c502 | ||
|
9b8fd192d0 | ||
|
c37460ad3d | ||
|
d1e708b2cb | ||
|
8745316574 | ||
|
ec5b8790ec | ||
|
d9105dfe8a | ||
|
386f66d7e2 | ||
|
fa5d2af7ea | ||
|
e0d9f28674 | ||
|
6fe80f02ce | ||
|
cdfee65492 | ||
|
44016ac371 | ||
|
58fa4a5955 | ||
|
cd9c5b7967 | ||
|
141c863f54 | ||
|
24743243a8 | ||
|
c2848e73af | ||
|
57d102425f | ||
|
68a40b5cba | ||
|
75ed7287d1 | ||
|
8797d18587 | ||
|
a567f1a8d1 | ||
|
945ec9b0b1 | ||
|
adc575dcdf | ||
|
e593861d7f | ||
|
36c0941dda | ||
|
f1a6e1ead8 | ||
|
d7f088bef0 | ||
|
f489ea871d | ||
|
7ae08dcf4f | ||
|
de90df6a63 | ||
|
addb3101f2 | ||
|
e162a06a1a | ||
|
b9abc7c3ef | ||
|
c76bf0bfab | ||
|
e7b42a66b1 | ||
|
bbb539ef56 | ||
|
dbb5f9b636 | ||
|
1979cb8104 | ||
|
91e94f9c0d | ||
|
42cbc7cf0c | ||
|
595553ae0b | ||
|
e03b665dd1 | ||
|
d0441219cb | ||
|
ac0cce9d6f | ||
|
1ad3a69d8f | ||
|
d86a386ad8 | ||
|
d66768ac55 | ||
|
567ceac52f | ||
|
47a0ef64d8 | ||
|
5f649a7613 | ||
|
d4b712db86 | ||
|
339e1f4557 | ||
|
da42214e86 | ||
|
c5ebf9c12e | ||
|
6b201a78e0 | ||
|
d2d8d38db4 | ||
|
0dee417e1d | ||
|
a0056665ae | ||
|
9b245d8113 | ||
|
d098b19d4d | ||
|
3aaa326bab | ||
|
1a25c3ade9 | ||
|
881c2a2086 | ||
|
a33f4df47e | ||
|
4748c6c4d7 | ||
|
18af9297ea | ||
|
c138d87c30 | ||
|
709c5378f8 | ||
|
8e9a0fbe99 | ||
|
117af5f59b | ||
|
4dccb636e2 | ||
|
c40788c5b2 | ||
|
ca27a66593 | ||
|
713a076df3 | ||
|
abaa37c51f | ||
|
4a2fb0a871 | ||
|
5ddf25c66a | ||
|
ff9f90c7e6 | ||
|
d48d48cafb | ||
|
2bb9bc624d | ||
|
069eb707f0 | ||
|
c1cae4e9ba | ||
|
f5efccc8d6 | ||
|
f6e4fefd66 | ||
|
66bab0ec49 | ||
|
2b501953ce | ||
|
150d9c9961 | ||
|
e5b62ecc0b | ||
|
b621d3cf1c | ||
|
9abff2143d | ||
|
5d224583a1 | ||
|
fdc5890b09 | ||
|
f850409d45 | ||
|
d58748ac66 | ||
|
4a01752467 | ||
|
53f9d03e30 | ||
|
776b6965fb | ||
|
aeeef43f45 | ||
|
b60b7fd201 | ||
|
f918792bb6 | ||
|
abb3ba2c6a | ||
|
566e05bb33 | ||
|
6380440c00 | ||
|
f8e6fb5674 | ||
|
ac83dcc3b3 | ||
|
b746f488b0 | ||
|
e5a7a5b0e5 | ||
|
f8aae8f544 | ||
|
3f8ad111b2 | ||
|
81176f8181 | ||
|
cdc8e43a79 | ||
|
ae69444b3b | ||
|
28257e906b | ||
|
7a9bb6e43d | ||
|
507f171b63 | ||
|
1dadfb6d15 | ||
|
2dc529b19f | ||
|
a5dd7e9063 | ||
|
eae892c9b1 | ||
|
71e81ccad3 | ||
|
eeaa766456 | ||
|
17627bab9f | ||
|
7327906fde | ||
|
3c3dfcd77d | ||
|
0adc3bd9ab | ||
|
0c3e5cd755 | ||
|
34714be205 | ||
|
77cf90cfb0 | ||
|
359f5511d7 | ||
|
9043e29b18 | ||
|
d59b8e5220 | ||
|
ebbeb1a058 | ||
|
afeb4d50a5 | ||
|
7fb4f43469 | ||
|
ca0cdbae5a | ||
|
879b173ae4 | ||
|
58b341ceec | ||
|
98981183d8 | ||
|
2747d6bd2a | ||
|
e76df47af0 | ||
|
04fbf58c18 | ||
|
10dcb079f7 | ||
|
8da7856780 | ||
|
78a6bcd553 | ||
|
66dd76be8f | ||
|
2174194bbd | ||
|
d58d11fa29 | ||
|
20bc40ac18 | ||
|
7881e4212f | ||
|
aaca4e7cd6 | ||
|
3250583253 | ||
|
be4c952542 | ||
|
5656ad7f6c | ||
|
ed3ab3d31d | ||
|
7c0f91b7f5 | ||
|
8619b3a79b | ||
|
f71e60619d | ||
|
3274a72cda | ||
|
c285171500 | ||
|
16156b8e27 | ||
|
56f34dd385 | ||
|
4d910a33fc | ||
|
e0ec7f5c67 | ||
|
886896137c | ||
|
e0a91cb479 | ||
|
bc51f8c734 | ||
|
a396e42fa8 | ||
|
009c491b9b | ||
|
9667d88e60 | ||
|
de68843eda | ||
|
cb52909ded | ||
|
52c9bb06c7 | ||
|
2957ec5b57 | ||
|
f384aae3a4 | ||
|
3a3899fda1 | ||
|
9cba48fbc9 | ||
|
86fbcede24 | ||
|
6e7ba4a9ca | ||
|
8f02d15fb9 | ||
|
cecae08c13 | ||
|
9152479981 | ||
|
2814206ffa | ||
|
a5c839da3a | ||
|
e3c3db72e2 | ||
|
1318d89456 | ||
|
68f97794bd | ||
|
9bd351abae | ||
|
60a6d0876e | ||
|
6b11b4b581 | ||
|
58cfb44e52 | ||
|
df3fb1c6fa | ||
|
71bda8b99d | ||
|
331e128116 | ||
|
69de36e70f | ||
|
b9cbea40e7 | ||
|
7654d547d7 | ||
|
995e9ffd47 | ||
|
11e6109a4a | ||
|
9e79025aef | ||
|
c1ea6cd689 | ||
|
4322ef4b37 | ||
|
e56d9e3fb0 | ||
|
833170d18c | ||
|
9ef8c5739b | ||
|
b8cdd9e090 | ||
|
cad4a8da0d | ||
|
432adade05 | ||
|
e9baa3543e | ||
|
d5c8af57f3 | ||
|
deeadb6648 | ||
|
f8f0ee6882 | ||
|
76be244662 | ||
|
d97a151695 | ||
|
c9dfc76155 | ||
|
506023c898 | ||
|
0e9245ba28 | ||
|
091811a4d6 | ||
|
18f4bccb37 | ||
|
37af4964cc | ||
|
f248d99d7a | ||
|
ca80d88a74 | ||
|
56765d966f | ||
|
d169afcafa | ||
|
1f4b738639 | ||
|
981668a56b | ||
|
b55257d0d3 | ||
|
ae6f746cf2 | ||
|
68e7b7a1d4 | ||
|
7b7071cf6d | ||
|
b1e908e6b6 | ||
|
f91050a7c7 | ||
|
e3f9aa526b | ||
|
7db0c756d6 | ||
|
c1bd844673 | ||
|
914354adb2 | ||
|
2ac4fb92c2 | ||
|
0c1dd954eb | ||
|
116767b8b8 | ||
|
3eb5394474 | ||
|
953f59195f | ||
|
309f3998d7 | ||
|
887c4013a0 | ||
|
f232ddcdcb | ||
|
bd0424ee7d | ||
|
62824e1537 | ||
|
36e7d3133b | ||
|
20c69951ab | ||
|
d9d8cdf043 | ||
|
29fba02b4a | ||
|
1954718e3f | ||
|
6712cae260 | ||
|
6ddf213d5d | ||
|
b700a17efa | ||
|
bedec591a2 | ||
|
2c4568119c | ||
|
efd8e2f343 | ||
|
f29793c868 | ||
|
e8bbb15f7e | ||
|
fdb2e5eb7b | ||
|
da58e7edb4 | ||
|
e81b8ba479 | ||
|
cfbe553724 | ||
|
17634e05d4 | ||
|
7d216d364e | ||
|
9e16f6e88c | ||
|
f23e8b3d1c | ||
|
04d988357f | ||
|
14ed950dad | ||
|
f107c34f82 | ||
|
9b5bfd33ef | ||
|
8fc6c79b6d | ||
|
2d838b9f09 | ||
|
c1649507e9 | ||
|
a246a6390f | ||
|
6a9317238a | ||
|
0a45542477 | ||
|
03be66c857 | ||
|
777c371be9 | ||
|
d8bb202fbd | ||
|
f0f9167682 | ||
|
6fbde2ea22 | ||
|
2378f459de | ||
|
1b4ae67f51 | ||
|
ec67c56cc7 | ||
|
393c1dba75 | ||
|
5b76314ef4 | ||
|
0ca2053a27 | ||
|
c2c209d19a | ||
|
de5137ff28 | ||
|
ffb4b0fade | ||
|
bfd03680cc | ||
|
82280b673e | ||
|
27dbd28c5c | ||
|
4d55985151 | ||
|
2635e545bf | ||
|
e8a3a40691 | ||
|
3a7d7778a0 | ||
|
437c7585cc | ||
|
507766bff6 | ||
|
74d11991ab | ||
|
217a1e92c6 | ||
|
83bc7b831d | ||
|
1071b2ee69 | ||
|
3753ac5ee6 | ||
|
6120c5e4a8 | ||
|
b252a80b7e | ||
|
d67182f411 | ||
|
fec8f23ad4 | ||
|
ab7f1cc3be | ||
|
3f65468299 | ||
|
333d0c5709 | ||
|
8c47939ad2 | ||
|
664d24f258 | ||
|
f8adb23062 | ||
|
a2a4b1d170 | ||
|
aa6f26f9fb | ||
|
fd2ddf8b50 | ||
|
0408c86065 | ||
|
e1555fc335 | ||
|
75141bdb65 | ||
|
3951c8863f | ||
|
bdc1579a9c | ||
|
8e1c6601af | ||
|
1c634bd736 | ||
|
2868191440 | ||
|
a567adcce5 | ||
|
5db1ee8fc4 | ||
|
a6729d9454 | ||
|
57f7039795 | ||
|
5c3775c6ee | ||
|
1cec9b70a2 | ||
|
eca34c37d9 | ||
|
58acfc4042 | ||
|
feab865203 | ||
|
754f09cdad | ||
|
fac354623b | ||
|
5967e6c3e4 | ||
|
174f316a62 | ||
|
c9651a012e | ||
|
3130d7db33 | ||
|
30af079f99 | ||
|
3ccae8efee | ||
|
5b946cb261 | ||
|
885045ca55 | ||
|
01d728ac6b | ||
|
f9e670f464 | ||
|
868e1677e3 | ||
|
84407de2aa | ||
|
7011b04cb2 | ||
|
ede4594dd9 | ||
|
3a7f02352a | ||
|
e2cb4ed031 | ||
|
24a1fe55bb | ||
|
66dddd9799 | ||
|
b3b2411cb7 | ||
|
eb71d82ecc | ||
|
298fc043ff | ||
|
63f678210a | ||
|
7a38246284 | ||
|
5390903a22 | ||
|
4b9e977fdc | ||
|
6a9a681559 | ||
|
a6e919767c | ||
|
290e9ac767 | ||
|
cd8ac36e9b | ||
|
3068969b51 | ||
|
e947e72169 | ||
|
86a53dbfc9 | ||
|
aa5c5c4553 | ||
|
1f93237ee3 | ||
|
3d248e9ad2 | ||
|
ec9aedea0b | ||
|
33021311b2 | ||
|
2a3d9e080a | ||
|
b528d0b1db | ||
|
a429e9c3f9 | ||
|
b90d2c1c90 | ||
|
27dc7ef79a | ||
|
76441b1d5f | ||
|
d2e3577784 | ||
|
4a0344182f | ||
|
ddc496cdaa | ||
|
746981611b | ||
|
c1beefce3a | ||
|
1667cc8a8d | ||
|
0aea46a643 | ||
|
820ab2210e | ||
|
f40e8a57b4 | ||
|
005357e821 | ||
|
5fcfc95280 | ||
|
dfc9e912b5 | ||
|
a6385288aa | ||
|
2f6457b3f7 | ||
|
ba2f0f753b | ||
|
38554dbcbe | ||
|
fe98fde338 | ||
|
c3ea69f26a | ||
|
367e1f047c | ||
|
7db1ed695c | ||
|
26b4615262 | ||
|
c4ccf53aad | ||
|
8fe9163e6b |
61
ChangeLog
61
ChangeLog
@@ -1,3 +1,64 @@
|
||||
2003-10-21 Bastien Nocera <hadess@hadess.net>
|
||||
|
||||
* lib/read.c: (glibtop_read_l):
|
||||
* lib/read_data.c: (glibtop_read_data_l):
|
||||
* lib/write.c: (glibtop_write_l):
|
||||
reverted string freeze breakage
|
||||
|
||||
2003-10-20 Bastien Nocera <hadess@hadess.net>
|
||||
|
||||
* lib/read.c: (glibtop_read_l):
|
||||
* lib/read_data.c: (glibtop_read_data_l):
|
||||
* lib/write.c: (glibtop_write_l): apply patch for ngettext support
|
||||
by Christian Neumair <chris@gnome-de.org>
|
||||
|
||||
2003-10-20 Bastien Nocera <hadess@hadess.net>
|
||||
|
||||
* src/inodedb/Makefile.am: link to libgtop_suid_common-2.0.la
|
||||
(Closes: #107990)
|
||||
|
||||
2003-10-20 Bastien Nocera <hadess@hadess.net>
|
||||
|
||||
* configure.in: make it compile
|
||||
|
||||
2003-10-19 Carlos Perelló Marín <carlos@gnome.org>
|
||||
|
||||
* support/*: Reverted libgtop changes. It's a common module
|
||||
and I should not modify it.
|
||||
* Added/removed files. Now the move should be done.
|
||||
|
||||
2003-10-19 Carlos Perelló Marín <carlos@gnome.org>
|
||||
|
||||
* libgtop-GNOME-2-0-branch moved to HEAD.
|
||||
|
||||
2003-09-30 Laurent Dhima <laurenti@alblinux.net>
|
||||
|
||||
* configure.in: Added "sq" to ALL_LINGUAS.
|
||||
|
||||
2003-09-17 Fatih Demir <kabalak@gtranslator.org>
|
||||
|
||||
* configure.in: Added "ta" (Tamil) to the languages' list.
|
||||
|
||||
2003-09-13 Carlos Perelló Marín <carlos@gnome.org>
|
||||
|
||||
* configure.in (ALL_LINGUAS): Removed es_ES.
|
||||
|
||||
2003-09-08 Kevin Vandersloot
|
||||
|
||||
* configure.in: release 2.0.5
|
||||
|
||||
2003-09-06 Taneem Ahmed <taneem@bengalinux.org>
|
||||
|
||||
* configure.in: Added "bn" to ALL_LINGUAS.
|
||||
|
||||
2003-08-24 Kevin Vandersloot
|
||||
|
||||
* configure.in: release 2.0.4
|
||||
|
||||
2003-08-13 Guntupalli Karunakar <karunakar@freedomink.org>
|
||||
|
||||
* configure.in: Added "hi" (Hindi) in ALL_LINGUAS.
|
||||
|
||||
2003-08-13 Andrew Sobala <aes@gnome.org>
|
||||
|
||||
* configure.in: release 2.0.3
|
||||
|
2
MAINTAINERS
Normal file
2
MAINTAINERS
Normal file
@@ -0,0 +1,2 @@
|
||||
Email: martin@home-of-linux.org
|
||||
Email: dave@srce.hr
|
50
RELNOTES-1.1.x
Normal file
50
RELNOTES-1.1.x
Normal file
@@ -0,0 +1,50 @@
|
||||
RELEASE NOTES FOR LIBGTOP 1.1.2
|
||||
===============================
|
||||
|
||||
This is a snapshot release for Solaris users of October GNOME. It contains
|
||||
a first version of the Solaris port of LibGTop which works at least on
|
||||
Solaris 7.
|
||||
|
||||
Please use LibGTop 1.0.x if you're not on a Solaris system
|
||||
(look at the README file for details).
|
||||
|
||||
IMPORTANT CHANGES SINCE 1.0:
|
||||
----------------------------
|
||||
|
||||
* All `glibtop_get_<feature>_* ()' and all `glibtop_init_<feature>_* ()'
|
||||
functions now have an `int' return value and return 0 on success and -1
|
||||
on failure.
|
||||
|
||||
* glibtop_cpu: Added `xcpu_flags'
|
||||
|
||||
* glibtop_proc_state: Changed `state' from char to unsigned and added
|
||||
GLIBTOP_PROCESS_RUNNING, GLIBTOP_PROCESS_INTERRUPTIBLE,
|
||||
GLIBTOP_PROCESS_UNINTERRUPTIBLE, GLIBTOP_PROCESS_ZOMBIE,
|
||||
GLIBTOP_PROCESS_STOPPED, GLIBTOP_PROCESS_SWAPPING constants for it.
|
||||
|
||||
* `GLIBTOP_MOUNTENTRY_LEN' and `GLIBTOP_MAX_GROUPS' are now defined in
|
||||
<glibtop/limits.h>
|
||||
|
||||
* Removed the `GLIBTOP_SYSDEPS_FEATURES' and `GLIBTOP_SYSDEPS_POINTER_SIZE'
|
||||
constants from <glibtop/sysdeps.h> and let numbering start at zero for
|
||||
`GLIBTOP_SYSDEPS_CPU'.
|
||||
|
||||
OTHER CHANGES SINCE 1.0:
|
||||
-----------------------
|
||||
|
||||
* Use G_GNUC_UNUSED in <glibtop/error.h> to avoid compiler warnings.
|
||||
|
||||
* The `libgtop-config' script now accepts `--cflags', `--libs' and
|
||||
`--extra-libs' parameter.
|
||||
|
||||
* The libraries are now called -lgtop-1.1 etc. so you can use 1.0.x and
|
||||
1.1.x in parallel.
|
||||
|
||||
CHANGES SINCE 1.0 MAINLY INTERESTING FOR DEVELOPERS:
|
||||
---------------------------------------------------
|
||||
|
||||
* We create a `glibtop-config.h' now which gets included from <glibtop.h>
|
||||
when we're _IN_LIBGTOP. It contains things such as `u_int64_t' etc.
|
||||
|
||||
October 1999
|
||||
Martin Baulig
|
5
backends/.cvsignore
Normal file
5
backends/.cvsignore
Normal file
@@ -0,0 +1,5 @@
|
||||
.deps
|
||||
.libs
|
||||
Makefile
|
||||
Makefile.in
|
||||
*.lo
|
15
backends/Makefile.am
Normal file
15
backends/Makefile.am
Normal file
@@ -0,0 +1,15 @@
|
||||
if NEED_LIBGTOP
|
||||
server_dir = server
|
||||
else
|
||||
server_dir =
|
||||
endif
|
||||
|
||||
if HAVE_SYSDEPS
|
||||
sysdeps_dir = sysdeps
|
||||
else
|
||||
sysdeps_dir =
|
||||
endif
|
||||
|
||||
SUBDIRS = $(server_dir) $(sysdeps_dir) common
|
||||
|
||||
DIST_SUBDIRS = server sysdeps common
|
7
backends/common/.cvsignore
Normal file
7
backends/common/.cvsignore
Normal file
@@ -0,0 +1,7 @@
|
||||
.deps
|
||||
.libs
|
||||
Makefile
|
||||
Makefile.in
|
||||
*.lo
|
||||
*.la
|
||||
marshal.c
|
42
backends/common/ChangeLog
Normal file
42
backends/common/ChangeLog
Normal file
@@ -0,0 +1,42 @@
|
||||
2000-11-26 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* glibtop-backend-private.h: Removed.
|
||||
|
||||
* backend-common.h: New files.
|
||||
|
||||
* backend-common.c (_open_common): Don't overwrite
|
||||
`backend->_priv'.
|
||||
|
||||
2000-11-22 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* Makefile.am: Link libgtop_backend_common.la against
|
||||
$(top_builddir)/sysdeps/common/libgtop_common.la and
|
||||
$(top_builddir)/lib/libgtop_server.la.
|
||||
|
||||
2000-02-22 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* backend-sysdeps.c (LibGTopBackendInfo): Call this
|
||||
`LibGTopBackendInfo_Common' when we don't use gmodule.
|
||||
|
||||
2000-02-22 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* Makefile.am: Only install the libs in $(LIBGTOP_BACKEND_DIR)
|
||||
when we LIBGTOP_USE_GMODULE and in $(libdir) otherwise.
|
||||
|
||||
2000-01-12 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* Makefile.am: Install everything in $(LIBGTOP_BACKEND_DIR).
|
||||
|
||||
* libgtop-common.backend: New file.
|
||||
|
||||
* backend-common.c (glibtop_backend_common): Renamed to
|
||||
`LibGTopBackendInfo'.
|
||||
|
||||
2000-01-12 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
Initial version of the "glibtop-backend-common" backend.
|
||||
|
||||
* backend-common.c: New file.
|
||||
* glibtop-backend-private.h: New file.
|
||||
* marshal.pl: New file. Automatically creates `marshal.c'.
|
||||
|
47
backends/common/Makefile.am
Normal file
47
backends/common/Makefile.am
Normal file
@@ -0,0 +1,47 @@
|
||||
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
INCLUDES = @INCLUDES@
|
||||
|
||||
backenddir = @LIBGTOP_BACKEND_DIR@
|
||||
|
||||
if LIBGTOP_USE_GMODULE
|
||||
backendlibdir = $(backenddir)
|
||||
else
|
||||
backendlibdir = $(libdir)
|
||||
endif
|
||||
|
||||
dynamic_ldflags = @libgtop_dynamic_ldflags@
|
||||
|
||||
backend_DATA = \
|
||||
libgtop-common.backend
|
||||
|
||||
noinst_HEADERS = \
|
||||
backend-common.h
|
||||
|
||||
backendlib_LTLIBRARIES = \
|
||||
libgtop_backend_common.la
|
||||
|
||||
libgtop_backend_common_la_SOURCES = \
|
||||
backend-common.c \
|
||||
marshal.c
|
||||
|
||||
libgtop_backend_common_la_LDFLAGS = \
|
||||
$(LT_VERSION_INFO) $(dynamic_ldflags)
|
||||
|
||||
libgtop_backend_common_la_LIBADD = \
|
||||
$(top_builddir)/sysdeps/common/libgtop_common.la \
|
||||
$(top_builddir)/lib/libgtop_server.la
|
||||
|
||||
BUILT_SOURCES = \
|
||||
marshal.c
|
||||
|
||||
EXTRA_DIST = \
|
||||
marshal.pl \
|
||||
libgtop-common.backend
|
||||
|
||||
CLEANFILES = $(BUILT_SOURCES)
|
||||
|
||||
marshal.c: marshal.pl $(top_builddir)/config.h $(top_srcdir)/features.def $(top_srcdir)/scripts/c_types.pl
|
||||
$(PERL) -I $(top_srcdir)/scripts $(srcdir)/marshal.pl < $(top_srcdir)/features.def > tmp-t
|
||||
mv tmp-t marshal.c
|
||||
|
61
backends/common/backend-common.c
Normal file
61
backends/common/backend-common.c
Normal file
@@ -0,0 +1,61 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <backend-common.h>
|
||||
|
||||
static int
|
||||
_open_common (glibtop_server *, glibtop_backend *, u_int64_t, const char **);
|
||||
|
||||
static int
|
||||
_close_common (glibtop_server *, glibtop_backend *, void *closure);
|
||||
|
||||
extern glibtop_call_vector glibtop_backend_common_call_vector;
|
||||
|
||||
#ifdef LIBGTOP_USE_GMODULE
|
||||
glibtop_backend_info LibGTopBackendInfo = {
|
||||
"glibtop-backend-common", _open_common, _close_common,
|
||||
&glibtop_backend_common_call_vector
|
||||
};
|
||||
#else
|
||||
glibtop_backend_info LibGTopBackendInfo_Common = {
|
||||
"glibtop-backend-common", _open_common, _close_common,
|
||||
&glibtop_backend_common_call_vector
|
||||
};
|
||||
#endif
|
||||
|
||||
static int
|
||||
_open_common (glibtop_server *server, glibtop_backend *backend,
|
||||
u_int64_t features, const char **backend_args)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
_close_common (glibtop_server *server, glibtop_backend *backend,
|
||||
void *closure)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
37
backends/common/backend-common.h
Normal file
37
backends/common/backend-common.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_BACKEND_COMMON_H__
|
||||
#define __GLIBTOP_BACKEND_COMMON_H__
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/global.h>
|
||||
|
||||
#include <glibtop/open.h>
|
||||
#include <glibtop/xmalloc.h>
|
||||
#include <glibtop/glibtop-backend.h>
|
||||
#include <glibtop/glibtop-backend-info.h>
|
||||
|
||||
#endif
|
13
backends/common/libgtop-common.backend
Normal file
13
backends/common/libgtop-common.backend
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?> <!-- -*-xml-*- -->
|
||||
<!DOCTYPE libgtop:backends SYSTEM 'libgtop-backends.dtd'>
|
||||
<libgtop:Backends xmlns:libgtop="http://www.home-of-linux.org/libgtop/1.1">
|
||||
|
||||
<libgtop:Backend>
|
||||
<libgtop:Name>glibtop-backend-common</libgtop:Name>
|
||||
<libgtop:Location>
|
||||
<libgtop:LibtoolName>libgtop_backend_common.la</libgtop:LibtoolName>
|
||||
<libgtop:ShlibName>libgtop_backend_common.so</libgtop:ShlibName>
|
||||
</libgtop:Location>
|
||||
</libgtop:Backend>
|
||||
|
||||
</libgtop:Backends>
|
175
backends/common/marshal.pl
Normal file
175
backends/common/marshal.pl
Normal file
@@ -0,0 +1,175 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
require 'c_types.pl';
|
||||
|
||||
$[ = 1; # set array base to 1
|
||||
$, = ' '; # set output field separator
|
||||
$\ = "\n"; # set output record separator
|
||||
|
||||
$always_use_temp_storage = 1;
|
||||
|
||||
sub toupper {
|
||||
local($_) = @_;
|
||||
tr/a-z/A-Z/;
|
||||
return $_;
|
||||
}
|
||||
|
||||
sub tolower {
|
||||
local($_) = @_;
|
||||
tr/A-Z/a-z/;
|
||||
return $_;
|
||||
}
|
||||
|
||||
print '/* marshal.c */';
|
||||
print "/* This is a generated file. Please modify `marshal.pl' */";
|
||||
print '';
|
||||
|
||||
print '#include <backend-common.h>';
|
||||
print '';
|
||||
print '#include <glibtop/sysdeps.h>';
|
||||
print '#include <glibtop/union.h>';
|
||||
print '';
|
||||
print '#include <glibtop/call-vector.h>';
|
||||
print '';
|
||||
|
||||
$feature_count = 0;
|
||||
|
||||
while (<>) {
|
||||
chop; # strip record separator
|
||||
|
||||
if (/^[^#]/) {
|
||||
&output($_);
|
||||
}
|
||||
}
|
||||
|
||||
sub output {
|
||||
local($line) = @_;
|
||||
@line_fields = split(/\|/, $line, 9999);
|
||||
$retval = $line_fields[1];
|
||||
$feature = $line_fields[2];
|
||||
$param_def = $line_fields[4];
|
||||
|
||||
$orig = $feature;
|
||||
$feature =~ s/^@//;
|
||||
$space = $feature;
|
||||
$space =~ s/./ /g;
|
||||
|
||||
$features{++$feature_count} = $orig;
|
||||
|
||||
return unless $orig =~ /^@/;
|
||||
|
||||
if ($retval eq 'retval') {
|
||||
$retval_param = '&retval';
|
||||
$call_prefix = '';
|
||||
$call_prefix_space = '';
|
||||
$prefix = 'retval = ';
|
||||
$prefix_space = ' ';
|
||||
$retval = 'int';
|
||||
}
|
||||
elsif ($retval !~ /^void$/) {
|
||||
$retval_param = 'NULL';
|
||||
$prefix = 'retval = ';
|
||||
$prefix_space = ' ';
|
||||
$call_prefix = 'retval = ';
|
||||
$call_prefix_space = ' ';
|
||||
}
|
||||
else {
|
||||
$retval_param = 'NULL';
|
||||
$call_prefix = '';
|
||||
$call_prefix_space = '';
|
||||
$prefix = '';
|
||||
$prefix_space = '';
|
||||
}
|
||||
|
||||
if ($retval =~ /^(array|pointer)\((.*)\)$/) {
|
||||
$retval = ($2 eq 'string') ? 'char **' : "$2 *";
|
||||
}
|
||||
|
||||
$need_temp_storage = $always_use_temp_storage;
|
||||
$first_param_name = '';
|
||||
|
||||
$call_param = '';
|
||||
$param_decl = '';
|
||||
$need_temp_len = 0;
|
||||
$nr_params = (@params = split(/:/, $param_def, 9999));
|
||||
for ($param = 1; $param <= $nr_params; $param++) {
|
||||
$list = $params[$param];
|
||||
$type = $params[$param];
|
||||
$type =~ s/\(.*//;
|
||||
$list =~ s/^.*\(//;
|
||||
$list =~ s/\)$//;
|
||||
$count = (@fields = split(/,/, $list, 9999));
|
||||
for ($field = 1; $field <= $count; $field++) {
|
||||
my $c_type = $typeinfo->{$type}->[1];
|
||||
|
||||
if ($first_param_name eq '') {
|
||||
$first_param_name = $fields[$field];
|
||||
}
|
||||
|
||||
if ($typeinfo->{$type}->[2]) {
|
||||
$need_temp_storage = 1;
|
||||
}
|
||||
|
||||
if ($param_decl eq '') {
|
||||
$param_decl = ",\n " . $space . ' ';
|
||||
}
|
||||
else {
|
||||
$param_decl = $param_decl . ', ';
|
||||
}
|
||||
$param_decl = $param_decl . $c_type . ' ' . $fields[$field];
|
||||
$call_param = $call_param . ', ' . $fields[$field];
|
||||
}
|
||||
}
|
||||
|
||||
if ($line_fields[3] eq '') {
|
||||
$total_code = sprintf
|
||||
("\treturn glibtop_get_%s_s (server%s);\n", $feature, $call_param);
|
||||
} elsif ($line_fields[3] eq 'array') {
|
||||
$total_code = sprintf
|
||||
("\treturn glibtop_get_%s_s (server, array%s);\n", $feature, $call_param);
|
||||
} elsif ($line_fields[3] =~ /^array/) {
|
||||
$total_code = sprintf
|
||||
("\treturn glibtop_get_%s_s (server, array, buf%s);\n", $feature, $call_param);
|
||||
} else {
|
||||
$total_code = sprintf
|
||||
("\treturn glibtop_get_%s_s (server, buf%s);\n", $feature, $call_param);
|
||||
}
|
||||
|
||||
$func_decl = 'static '.$retval."\n";
|
||||
if ($line_fields[3] eq '') {
|
||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure%s)\n",
|
||||
$feature, $param_decl);
|
||||
} elsif ($line_fields[3] eq 'array') {
|
||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure, glibtop_array *array%s)\n",
|
||||
$feature, $param_decl);
|
||||
} elsif ($line_fields[3] =~ /^array/) {
|
||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure, glibtop_array *array, %s *buf%s)\n",
|
||||
$feature, 'glibtop_'.$feature, $param_decl);
|
||||
} else {
|
||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure, %s *buf%s)\n",
|
||||
$feature, 'glibtop_'.$feature, $param_decl);
|
||||
}
|
||||
|
||||
$total_code = sprintf ("%s{\n%s\n%s}\n", $func_decl, $total_code);
|
||||
|
||||
print $total_code;
|
||||
}
|
||||
|
||||
$call_vector_code = '';
|
||||
for ($nr = 1; $nr <= $feature_count; $nr++) {
|
||||
$feature = $features{$nr};
|
||||
|
||||
if ($feature =~ /^@/) {
|
||||
$feature =~ s/^@//;
|
||||
|
||||
$call_vector_code .= sprintf (qq[\t_glibtop_get_%s_c,\n], $feature);
|
||||
} else {
|
||||
$call_vector_code .= sprintf (qq[\tNULL,\n]);
|
||||
}
|
||||
}
|
||||
|
||||
print 'glibtop_call_vector glibtop_backend_common_call_vector = {';
|
||||
print $call_vector_code;
|
||||
print '};';
|
||||
print '';
|
||||
|
10
backends/server/.cvsignore
Normal file
10
backends/server/.cvsignore
Normal file
@@ -0,0 +1,10 @@
|
||||
.deps
|
||||
.libs
|
||||
Makefile
|
||||
Makefile.in
|
||||
*.lo
|
||||
*.la
|
||||
marshal.c
|
||||
demarshal.c
|
||||
libgtop_server
|
||||
command.h
|
85
backends/server/ChangeLog
Normal file
85
backends/server/ChangeLog
Normal file
@@ -0,0 +1,85 @@
|
||||
2000-11-27 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* backend-server.c (backend_server_quark): New global variable.
|
||||
(_open_server, _close_server): Use the quark.
|
||||
* commands.c: Likewise.
|
||||
|
||||
2000-11-26 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* backend-server.h: New file.
|
||||
(backend_server_private): New struct, formerly known
|
||||
as glibtop_backend_private.
|
||||
|
||||
* glibtop-backend-private.h: Removed.
|
||||
|
||||
* backend-server.c: (_open_server): Use g_object_set_data()
|
||||
to set add the backend_server_private data to the glibtop_backend,
|
||||
don't override `backend->_priv'.
|
||||
(_close_server): Use g_object_get_data() to get the data.
|
||||
[FIXME: Use quarks directly.]
|
||||
|
||||
* read.c: (glibtop_read_i): Replaced the glibtop_server and
|
||||
glibtop_backend arguments with backend_server_private.
|
||||
* read_data.c: (glibtop_read_data_i): Likewise.
|
||||
* write.c: (glibtop_write_i): Likewise.
|
||||
|
||||
2000-02-22 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* backend-sysdeps.c (LibGTopBackendInfo): Call this
|
||||
`LibGTopBackendInfo_Server' when we don't use gmodule.
|
||||
|
||||
2000-02-22 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* Makefile.am: Only install the libs in $(LIBGTOP_BACKEND_DIR)
|
||||
when we LIBGTOP_USE_GMODULE and in $(libdir) otherwise.
|
||||
|
||||
2000-01-18 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* demarshal.pl: Only emit code for functions which are
|
||||
really suid/sgid.
|
||||
|
||||
2000-01-13 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* write.c (glibtop_write_i): The buffer which we write is
|
||||
now a `const'.
|
||||
|
||||
2000-01-12 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* Makefile.am: Install everything except the server binary
|
||||
in $(LIBGTOP_BACKEND_DIR).
|
||||
|
||||
* libgtop-server.backend: New file.
|
||||
|
||||
* backend-server.c (glibtop_backend_server): Renamed to
|
||||
`LibGTopBackendInfo'.
|
||||
|
||||
2000-01-08 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* command.h.in (glibtop_response): New structure.
|
||||
|
||||
2000-01-02 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* command.pl: New file. Creates `command.h' from `command.h.in'.
|
||||
* command.h.in: New file. Template file for `command.h'.
|
||||
|
||||
* io.c, version.c: New files. Copied here from `src/daemon'.
|
||||
|
||||
* demarshal.pl: New file. Automatically creates `demarshal.c'.
|
||||
* demarshal.c: This automatically created file handles the
|
||||
demarshalling in the libgtop_server.
|
||||
|
||||
* Makefile.am: Build the `libgtop_server' here.
|
||||
* server.c, server.h: New files. Copied here from `src/daemon'.
|
||||
|
||||
2000-01-01 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
Initial version of the "glibtop-backend-server" backend.
|
||||
|
||||
* command.c, read.c, read_data.c, write.c: New files. Moved here
|
||||
from the `lib' directory.
|
||||
|
||||
* backend-server.c: New file.
|
||||
* glibtop-backend-private.h: New file.
|
||||
|
||||
* marshal.pl: New file. Automatically creates `marshal.c'.
|
||||
|
85
backends/server/Makefile.am
Normal file
85
backends/server/Makefile.am
Normal file
@@ -0,0 +1,85 @@
|
||||
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
INCLUDES = @INCLUDES@ -D_BSD \
|
||||
-DLIBGTOP_COMPILE_SYSTEM=\"`uname -s`\" \
|
||||
-DLIBGTOP_COMPILE_RELEASE=\"`uname -r`\" \
|
||||
-DLIBGTOP_COMPILE_MACHINE=\"`uname -m`\"
|
||||
|
||||
backenddir = @LIBGTOP_BACKEND_DIR@
|
||||
|
||||
if LIBGTOP_USE_GMODULE
|
||||
backendlibdir = $(backenddir)
|
||||
else
|
||||
backendlibdir = $(libdir)
|
||||
endif
|
||||
|
||||
dynamic_ldflags = @libgtop_dynamic_ldflags@
|
||||
|
||||
backend_DATA = \
|
||||
libgtop-server.backend
|
||||
|
||||
noinst_HEADERS = \
|
||||
backend-server.h
|
||||
|
||||
backendlib_LTLIBRARIES = \
|
||||
libgtop_backend_server.la
|
||||
|
||||
bin_PROGRAMS = \
|
||||
@server_programs@
|
||||
|
||||
EXTRA_PROGRAMS = \
|
||||
libgtop_server
|
||||
|
||||
libgtop_backend_server_la_SOURCES = \
|
||||
backend-server.c \
|
||||
marshal.c \
|
||||
command.c \
|
||||
read.c \
|
||||
read_data.c \
|
||||
write.c
|
||||
|
||||
libgtop_backend_server_la_LDFLAGS = \
|
||||
$(LT_VERSION_INFO) $(dynamic_ldflags)
|
||||
|
||||
libgtop_server_SOURCES = \
|
||||
server.c \
|
||||
server.h \
|
||||
demarshal.c \
|
||||
version.c \
|
||||
io.c
|
||||
|
||||
libgtop_server_LDADD = \
|
||||
$(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps_suid.la \
|
||||
$(top_builddir)/sysdeps/common/libgtop_suid_common.la \
|
||||
@LIBSUPPORT@
|
||||
|
||||
if ENABLE_STATIC
|
||||
libgtop_server_LDFLAGS = -static
|
||||
endif
|
||||
|
||||
BUILT_SOURCES = \
|
||||
marshal.c \
|
||||
demarshal.c \
|
||||
command.h
|
||||
|
||||
EXTRA_DIST = \
|
||||
marshal.pl \
|
||||
demarshal.pl \
|
||||
command.pl \
|
||||
command.h.in \
|
||||
libgtop-server.backend
|
||||
|
||||
CLEANFILES = $(BUILT_SOURCES)
|
||||
|
||||
marshal.c: marshal.pl $(top_builddir)/config.h $(top_srcdir)/features.def $(top_srcdir)/scripts/c_types.pl
|
||||
$(PERL) -I $(top_srcdir)/scripts $(srcdir)/marshal.pl < $(top_srcdir)/features.def > tmp-t
|
||||
mv tmp-t marshal.c
|
||||
|
||||
demarshal.c: demarshal.pl $(top_builddir)/config.h $(top_srcdir)/features.def $(top_srcdir)/scripts/c_types.pl
|
||||
$(PERL) -I $(top_srcdir)/scripts $(srcdir)/demarshal.pl < $(top_srcdir)/features.def > tmp-t
|
||||
mv tmp-t demarshal.c
|
||||
|
||||
command.h: command.pl command.h.in $(top_builddir)/config.h $(top_srcdir)/features.def $(top_srcdir)/scripts/c_types.pl
|
||||
$(PERL) -I $(top_srcdir)/scripts $(srcdir)/command.pl $(top_srcdir)/features.def $(srcdir)/command.h.in > tmp-t
|
||||
mv tmp-t command.h
|
||||
|
113
backends/server/backend-server.c
Normal file
113
backends/server/backend-server.c
Normal file
@@ -0,0 +1,113 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <backend-server.h>
|
||||
|
||||
static int
|
||||
_open_server (glibtop_server *, glibtop_backend *, u_int64_t, const char **);
|
||||
|
||||
static int
|
||||
_close_server (glibtop_server *, glibtop_backend *, void *);
|
||||
|
||||
extern glibtop_call_vector glibtop_backend_server_call_vector;
|
||||
|
||||
#ifdef LIBGTOP_USE_GMODULE
|
||||
glibtop_backend_info LibGTopBackendInfo = {
|
||||
"glibtop-backend-server", _open_server, _close_server,
|
||||
&glibtop_backend_server_call_vector
|
||||
};
|
||||
#else
|
||||
glibtop_backend_info LibGTopBackendInfo_Server = {
|
||||
"glibtop-backend-server", _open_server, _close_server,
|
||||
&glibtop_backend_server_call_vector
|
||||
};
|
||||
#endif
|
||||
|
||||
static int
|
||||
_open_server (glibtop_server *server, glibtop_backend *backend,
|
||||
u_int64_t features, const char **backend_args)
|
||||
{
|
||||
backend_server_private *priv;
|
||||
|
||||
priv = glibtop_calloc_r (server, 1, sizeof (backend_server_private));
|
||||
|
||||
glibtop_backend_set_closure_data (backend, priv);
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "open_server - %p, %p, %p\n", server, backend, priv);
|
||||
|
||||
fprintf (stderr, "Opening pipe to server (%s).\n", LIBGTOP_SERVER);
|
||||
#endif
|
||||
|
||||
if (pipe (priv->input) || pipe (priv->output)) {
|
||||
glibtop_warn_io_r (server, "cannot make a pipe");
|
||||
return -1;
|
||||
}
|
||||
|
||||
priv->pid = fork ();
|
||||
|
||||
if (priv->pid < 0) {
|
||||
glibtop_warn_io_r (server, "fork failed");
|
||||
return -1;
|
||||
} else if (priv->pid == 0) {
|
||||
close (0); close (1);
|
||||
close (priv->input [0]);
|
||||
close (priv->output [1]);
|
||||
dup2 (priv->input [1], 1);
|
||||
dup2 (priv->output [0], 0);
|
||||
execl (LIBGTOP_SERVER, "libgtop-server", NULL);
|
||||
glibtop_error_io_r (server, "execl (%s)",
|
||||
LIBGTOP_SERVER);
|
||||
_exit (2);
|
||||
}
|
||||
|
||||
close (priv->input [1]);
|
||||
close (priv->output [0]);
|
||||
|
||||
glibtop_server_ref (server);
|
||||
priv->server = server;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
_close_server (glibtop_server *server, glibtop_backend *backend,
|
||||
void *closure)
|
||||
{
|
||||
backend_server_private *priv = closure;
|
||||
|
||||
kill (priv->pid, SIGKILL);
|
||||
close (priv->input [0]);
|
||||
close (priv->output [1]);
|
||||
|
||||
glibtop_server_unref (priv->server);
|
||||
|
||||
priv->pid = 0;
|
||||
|
||||
g_free (priv);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
66
backends/server/backend-server.h
Normal file
66
backends/server/backend-server.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_BACKEND_COMMON_H__
|
||||
#define __GLIBTOP_BACKEND_COMMON_H__
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/global.h>
|
||||
|
||||
#include <glibtop/open.h>
|
||||
#include <glibtop/xmalloc.h>
|
||||
#include <glibtop/glibtop-backend.h>
|
||||
#include <glibtop/glibtop-backend-info.h>
|
||||
|
||||
typedef struct _backend_server_private backend_server_private;
|
||||
|
||||
struct _backend_server_private
|
||||
{
|
||||
u_int64_t flags;
|
||||
int input [2]; /* Pipe client <- server */
|
||||
int output [2]; /* Pipe client -> server */
|
||||
pid_t pid; /* PID of the server */
|
||||
|
||||
glibtop_server *server;
|
||||
};
|
||||
|
||||
void *
|
||||
glibtop_call_i (glibtop_server *server, backend_server_private *priv,
|
||||
unsigned command, size_t send_size, const void *send_ptr,
|
||||
size_t data_size, const void *data_ptr,
|
||||
size_t recv_size, void *recv_ptr,
|
||||
int *retval_ptr);
|
||||
|
||||
void
|
||||
glibtop_read_i (backend_server_private *priv, size_t size, void *buf);
|
||||
|
||||
void *
|
||||
glibtop_read_data_i (backend_server_private *priv);
|
||||
|
||||
void
|
||||
glibtop_write_i (backend_server_private *priv, size_t size, const void *buf);
|
||||
|
||||
#endif
|
||||
|
100
backends/server/command.c
Normal file
100
backends/server/command.c
Normal file
@@ -0,0 +1,100 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <backend-server.h>
|
||||
|
||||
#include "command.h"
|
||||
|
||||
void *
|
||||
glibtop_call_i (glibtop_server *server, backend_server_private *priv,
|
||||
unsigned command, size_t send_size, const void *send_buf,
|
||||
size_t data_size, const void *data_buf,
|
||||
size_t recv_size, void *recv_ptr,
|
||||
int *retval_ptr)
|
||||
{
|
||||
glibtop_command cmnd;
|
||||
glibtop_response resp;
|
||||
#if 0
|
||||
int retval;
|
||||
#endif
|
||||
|
||||
memset (&cmnd, 0, sizeof (glibtop_command));
|
||||
memset (&resp, 0, sizeof (glibtop_response));
|
||||
|
||||
cmnd.command = command;
|
||||
|
||||
/* If send_size is less than _GLIBTOP_PARAM_SIZE (normally 16 Bytes), we
|
||||
* send it together with command, so we only need one system call instead
|
||||
* of two. */
|
||||
|
||||
if (send_size <= _GLIBTOP_PARAM_SIZE) {
|
||||
memcpy (cmnd.parameter, send_buf, send_size);
|
||||
cmnd.param_size = send_size;
|
||||
} else {
|
||||
cmnd.send_size = send_size;
|
||||
}
|
||||
|
||||
cmnd.data_size = data_size;
|
||||
|
||||
glibtop_write_i (priv, sizeof (glibtop_command), &cmnd);
|
||||
|
||||
if (data_size) {
|
||||
#ifdef SLAVE_DEBUG
|
||||
fprintf (stderr, "SENDING %d bytes of DATA.\n", data_size);
|
||||
#endif
|
||||
glibtop_write_i (priv, data_size, data_buf);
|
||||
}
|
||||
|
||||
glibtop_read_i (priv, sizeof (glibtop_response), &resp);
|
||||
|
||||
#ifdef SLAVE_DEBUG
|
||||
fprintf (stderr, "RESPONSE: %d - %d - %ld - %ld - %p - %ld\n",
|
||||
resp.retval, resp.glibtop_errno,
|
||||
(long) resp.recv_size, (long) resp.data_size,
|
||||
recv_ptr, (long) recv_size);
|
||||
#endif
|
||||
|
||||
if (retval_ptr)
|
||||
*retval_ptr = resp.glibtop_errno;
|
||||
|
||||
if (resp.recv_size != recv_size) {
|
||||
glibtop_warn_r (server, "Expected %ld bytes, but got %ld.",
|
||||
(long) recv_size, (long) resp.recv_size);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (recv_ptr)
|
||||
glibtop_read_i (priv, recv_size, recv_ptr);
|
||||
|
||||
if (resp.data_size) {
|
||||
void *ptr = glibtop_malloc_r (server, resp.data_size);
|
||||
|
||||
glibtop_read_i (priv, resp.data_size, ptr);
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
59
backends/server/command.h.in
Normal file
59
backends/server/command.h.in
Normal file
@@ -0,0 +1,59 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
@@AUTOGEN_COMMENT@@
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_COMMAND_H__
|
||||
#define __GLIBTOP_COMMAND_H__
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/union.h>
|
||||
|
||||
BEGIN_LIBGTOP_DECLS
|
||||
|
||||
@@GLIBTOP_COMMAND_CONSTANTS@@
|
||||
|
||||
#define _GLIBTOP_PARAM_SIZE 16
|
||||
|
||||
typedef struct _glibtop_command glibtop_command;
|
||||
typedef struct _glibtop_response glibtop_response;
|
||||
|
||||
struct _glibtop_command
|
||||
{
|
||||
u_int64_t command;
|
||||
u_int64_t param_size, send_size, data_size;
|
||||
char parameter [_GLIBTOP_PARAM_SIZE];
|
||||
};
|
||||
|
||||
struct _glibtop_response
|
||||
{
|
||||
int retval;
|
||||
int glibtop_errno;
|
||||
u_int64_t recv_size, data_size;
|
||||
};
|
||||
|
||||
END_LIBGTOP_DECLS
|
||||
|
||||
#endif
|
76
backends/server/command.pl
Normal file
76
backends/server/command.pl
Normal file
@@ -0,0 +1,76 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
require 'c_types.pl';
|
||||
|
||||
die "Usage: $0 features.def command.h.in" unless $#ARGV == 1;
|
||||
|
||||
$[ = 1; # set array base to 1
|
||||
$, = ' '; # set output field separator
|
||||
$\ = "\n"; # set output record separator
|
||||
|
||||
sub toupper {
|
||||
local($_) = @_;
|
||||
tr/a-z/A-Z/;
|
||||
return $_;
|
||||
}
|
||||
|
||||
sub tolower {
|
||||
local($_) = @_;
|
||||
tr/A-Z/a-z/;
|
||||
return $_;
|
||||
}
|
||||
|
||||
$constants_decl_code = '';
|
||||
|
||||
open FEATURESDEF, $ARGV[1] or
|
||||
die "open ($ARGV[1]): $!";
|
||||
|
||||
while (<FEATURESDEF>) {
|
||||
chop; # strip record separator
|
||||
|
||||
if (/^[^\#]/) {
|
||||
&parse_features_def ($_);
|
||||
}
|
||||
}
|
||||
|
||||
close FEATURESDEF;
|
||||
|
||||
sub parse_features_def {
|
||||
local($line) = @_;
|
||||
@line_fields = split(/\|/, $line, 9999);
|
||||
$retval = $line_fields[1];
|
||||
$element_def = $line_fields[3];
|
||||
$feature = $line_fields[2];
|
||||
$param_def = $line_fields[4];
|
||||
|
||||
$orig = $feature;
|
||||
$feature =~ s/^@//;
|
||||
$space = $feature;
|
||||
$space =~ s/./ /g;
|
||||
|
||||
$constants_decl_code .= sprintf
|
||||
(qq[\#define %-40s %d\n], 'GLIBTOP_CMND_'.&toupper($feature),
|
||||
++$feature_count);
|
||||
|
||||
$features{$feature_count} = $feature;
|
||||
}
|
||||
|
||||
chop $constants_decl_code;
|
||||
|
||||
$auto_gen_comment = sprintf
|
||||
(qq[/*\n * This file is automatically generated.\n * Please modify `command.pl' and `command.h.in'.\n */]);
|
||||
|
||||
open COMMAND, $ARGV[2] or
|
||||
die "open ($ARGV[2]): $!";
|
||||
|
||||
while (<COMMAND>) {
|
||||
chop;
|
||||
|
||||
s/^\s*\@\@GLIBTOP_COMMAND_CONSTANTS\@\@\s*$/$constants_decl_code/;
|
||||
|
||||
s/^\s*\@\@AUTOGEN_COMMENT\@\@\s*$/$auto_gen_comment/;
|
||||
} continue {
|
||||
print $_;
|
||||
}
|
||||
|
||||
close COMMAND;
|
386
backends/server/demarshal.pl
Normal file
386
backends/server/demarshal.pl
Normal file
@@ -0,0 +1,386 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
require 'c_types.pl';
|
||||
|
||||
$[ = 1; # set array base to 1
|
||||
$, = ' '; # set output field separator
|
||||
$\ = "\n"; # set output record separator
|
||||
|
||||
$always_use_temp_storage = 0;
|
||||
|
||||
sub toupper {
|
||||
local($_) = @_;
|
||||
tr/a-z/A-Z/;
|
||||
return $_;
|
||||
}
|
||||
|
||||
sub tolower {
|
||||
local($_) = @_;
|
||||
tr/A-Z/a-z/;
|
||||
return $_;
|
||||
}
|
||||
|
||||
print '/* demarshal.c */';
|
||||
print "/* This is a generated file. Please modify `demarshal.pl' */";
|
||||
print '';
|
||||
|
||||
print '#include <glibtop.h>';
|
||||
print '#include <glibtop/open.h>';
|
||||
print '#include <glibtop/xmalloc.h>';
|
||||
print '';
|
||||
print '#include <glibtop/sysdeps.h>';
|
||||
print '#include <glibtop/union.h>';
|
||||
print '';
|
||||
print '#include <glibtop/backend.h>';
|
||||
print '';
|
||||
print '#include <glibtop-backend-private.h>';
|
||||
print '#include "server.h"';
|
||||
print '';
|
||||
|
||||
$feature_count = 0;
|
||||
|
||||
while (<>) {
|
||||
chop; # strip record separator
|
||||
|
||||
if (/^[^\#]/) {
|
||||
&output($_);
|
||||
}
|
||||
}
|
||||
|
||||
sub output {
|
||||
local($line) = @_;
|
||||
@line_fields = split(/\|/, $line, 9999);
|
||||
$retval = $line_fields[1];
|
||||
$element_def = $line_fields[3];
|
||||
$feature = $line_fields[2];
|
||||
$param_def = $line_fields[4];
|
||||
|
||||
return if $feature =~ /^@/;
|
||||
$name = 'glibtop_'.$feature;
|
||||
|
||||
$orig = $feature;
|
||||
$feature =~ s/^@//;
|
||||
$space = $feature;
|
||||
$space =~ s/./ /g;
|
||||
|
||||
$features{++$feature_count} = $feature;
|
||||
|
||||
$orig_retval = $retval;
|
||||
|
||||
if ($retval eq 'retval') {
|
||||
$retval_param = '&retval';
|
||||
$call_prefix = '';
|
||||
$call_prefix_space = '';
|
||||
$prefix = 'retval = ';
|
||||
$prefix_space = ' ';
|
||||
$retval = 'int';
|
||||
} elsif ($retval !~ /^void$/) {
|
||||
$retval_param = 'NULL';
|
||||
$prefix = 'retval = ';
|
||||
$prefix_space = ' ';
|
||||
$call_prefix = 'retval = ';
|
||||
$call_prefix_space = ' ';
|
||||
} else {
|
||||
$retval_param = 'NULL';
|
||||
$call_prefix = '';
|
||||
$call_prefix_space = '';
|
||||
$prefix = '';
|
||||
$prefix_space = '';
|
||||
}
|
||||
|
||||
if ($retval =~ /^(array|pointer)\((.*)\)$/) {
|
||||
$retval = ($2 eq 'string') ? 'char **' : "$2 *";
|
||||
}
|
||||
|
||||
$need_temp_storage = $always_use_temp_storage;
|
||||
$first_param_name = '';
|
||||
$size_code = "\t/* send size */\n";
|
||||
$size_code .= "\t_LIBGTOP_SEND_len = 0;\n";
|
||||
|
||||
$local_var_decl_code = '';
|
||||
$local_var_decl_code .= "\tsize_t _LIBGTOP_SEND_len, _LIBGTOP_RECV_len;\n";
|
||||
$local_var_decl_code .= "\toff_t _LIBGTOP_SEND_offset;\n";
|
||||
$local_var_decl_code .= "\tchar *_LIBGTOP_RECV_buf, *_LIBGTOP_RECV_ptr;\n";
|
||||
$local_var_decl_code .= "\tconst char *_LIBGTOP_SEND_ptr;\n";
|
||||
$local_var_decl_code .= sprintf
|
||||
(qq[\tglibtop_%s %s;\n], $feature, $feature);
|
||||
if ($retval !~ /^void$/) {
|
||||
$local_var_decl_code .= sprintf ("\t%s retval = (%s) 0;\n",
|
||||
$retval, $retval);
|
||||
}
|
||||
|
||||
$init_local_var_code = "\t/* variable initialization */\n";
|
||||
$init_local_var_code .= sprintf
|
||||
(qq[\tmemset (&%s, 0, sizeof (glibtop_%s));\n], $feature, $feature);
|
||||
$init_local_var_code .= "\t_LIBGTOP_SEND_offset = 0;\n";
|
||||
$init_local_var_code .= "\t_LIBGTOP_SEND_ptr = ".
|
||||
"(char *) send_ptr;\n";
|
||||
|
||||
$demarshal_code = '';
|
||||
|
||||
$call_param = '';
|
||||
$param_decl = '';
|
||||
$need_temp_len = 0;
|
||||
$nr_params = (@params = split(/:/, $param_def, 9999));
|
||||
for ($param = 1; $param <= $nr_params; $param++) {
|
||||
$list = $params[$param];
|
||||
$type = $params[$param];
|
||||
$type =~ s/\(.*//;
|
||||
$list =~ s/^.*\(//;
|
||||
$list =~ s/\)$//;
|
||||
$count = (@fields = split(/,/, $list, 9999));
|
||||
for ($field = 1; $field <= $count; $field++) {
|
||||
my $c_type = $typeinfo->{$type}->[1];
|
||||
|
||||
if ($first_param_name eq '') {
|
||||
$first_param_name = $fields[$field];
|
||||
}
|
||||
|
||||
if ($typeinfo->{$type}->[2]) {
|
||||
$need_temp_storage = 1;
|
||||
}
|
||||
|
||||
if ($param_decl eq '') {
|
||||
$param_decl = ",\n " . $space . ' ';
|
||||
} else {
|
||||
$param_decl = $param_decl . ', ';
|
||||
}
|
||||
$param_decl = $param_decl . $c_type . ' ' . $fields[$field];
|
||||
$call_param = $call_param . ', _LIBGTOP_demarshal_' . $fields[$field];
|
||||
|
||||
$size_code .= "\t_LIBGTOP_SEND_len += ";
|
||||
if ($typeinfo->{$type}->[2]) {
|
||||
$size_code .= sprintf ("sizeof (size_t)");
|
||||
} else {
|
||||
$size_code .= sprintf ("sizeof (%s)", $c_type);
|
||||
}
|
||||
$size_code .= ";\n";
|
||||
|
||||
$local_var_decl_code .= sprintf
|
||||
(qq[\t%s _LIBGTOP_demarshal_%s;\n], $c_type, $fields[$field]);
|
||||
$init_local_var_code .= sprintf
|
||||
(qq[\tmemset (&_LIBGTOP_demarshal_%s, 0, sizeof (%s));\n],
|
||||
$fields[$field], $c_type);
|
||||
|
||||
$demarshal_code .= "\t_LIBGTOP_SEND_ptr = ".
|
||||
"(char *) send_ptr + _LIBGTOP_SEND_offset;\n";
|
||||
|
||||
if ($typeinfo->{$type}->[2]) {
|
||||
$demarshal_code .= sprintf ("\tmemcpy (&_LIBGTOP_TEMP_len, _LIBGTOP_SEND_ptr, sizeof (size_t));\n");
|
||||
$demarshal_code .= sprintf
|
||||
(qq[\t_LIBGTOP_DATA_len += _LIBGTOP_TEMP_len;\n]);
|
||||
$demarshal_code .= sprintf
|
||||
(qq[\tif (_LIBGTOP_DATA_len > data_size)\n\t\treturn -GLIBTOP_ERROR_DEMARSHAL_ERROR;\n]);
|
||||
$demarshal_code .= sprintf
|
||||
(qq[\t_LIBGTOP_DATA_offset += _LIBGTOP_TEMP_len;\n]);
|
||||
}
|
||||
|
||||
if (defined $demarshal_funcs->{$type}) {
|
||||
$demarshal_code .= $demarshal_funcs->{$type}->($c_type, $fields[$field], "\t");
|
||||
} else {
|
||||
$demarshal_code .= sprintf ("\tmemcpy (&_LIBGTOP_demarshal_%s, _LIBGTOP_SEND_ptr, %s);\n",
|
||||
$fields[$field], "sizeof ($c_type)");
|
||||
}
|
||||
|
||||
$demarshal_code .= "\t_LIBGTOP_SEND_offset += ";
|
||||
if ($typeinfo->{$type}->[2]) {
|
||||
$demarshal_code .= sprintf ("sizeof (size_t)");
|
||||
} else {
|
||||
$demarshal_code .= sprintf ("sizeof (%s)", $c_type);
|
||||
}
|
||||
$demarshal_code .= ";\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (!($demarshal_code eq '')) {
|
||||
$demarshal_code = sprintf (qq[\t/* demarshal start */\n%s\n],
|
||||
$demarshal_code);
|
||||
}
|
||||
|
||||
if ($line_fields[3] eq '') {
|
||||
$call_code = sprintf
|
||||
("\tretval = glibtop_get_%s_p (server%s);\n",
|
||||
$feature, $call_param);
|
||||
} elsif ($line_fields[3] eq 'array') {
|
||||
$call_code = sprintf
|
||||
("\tretval = glibtop_get_%s_p (server, &array%s);\n",
|
||||
$feature, $call_param);
|
||||
$local_var_decl_code .= sprintf (qq[\tglibtop_array array;\n]);
|
||||
} elsif ($line_fields[3] =~ /^array/) {
|
||||
$call_code = sprintf
|
||||
("\tretval = glibtop_get_%s_p (server, &array, &%s%s);\n",
|
||||
$feature, $feature, $call_param);
|
||||
$local_var_decl_code .= sprintf (qq[\tglibtop_array array;\n]);
|
||||
} else {
|
||||
$call_code = sprintf
|
||||
("\tretval = glibtop_get_%s_p (server, &%s%s);\n",
|
||||
$feature, $feature, $call_param);
|
||||
}
|
||||
|
||||
if ($orig_retval eq 'retval') {
|
||||
$call_code .= sprintf
|
||||
(qq[\tif (retval_ptr)\n\t\t*retval_ptr = retval;\n]);
|
||||
} else {
|
||||
$call_code .= sprintf
|
||||
(qq[\tif (retval_ptr)\n\t\t*retval_ptr = server->glibtop_errno;\n]);
|
||||
}
|
||||
|
||||
$size_code .= sprintf
|
||||
(qq[\tif (_LIBGTOP_SEND_len != send_size)\n\t\treturn -GLIBTOP_ERROR_DEMARSHAL_ERROR;\n\n]);
|
||||
|
||||
$size_code .= "\t/* recv size */\n";
|
||||
$size_code .= "\t_LIBGTOP_RECV_len = 0;\n";
|
||||
if ($line_fields[3] eq '') {
|
||||
} elsif ($line_fields[3] eq 'array') {
|
||||
$size_code .= "\t_LIBGTOP_RECV_len += sizeof (glibtop_array);\n";
|
||||
} elsif ($line_fields[3] =~ /^array/) {
|
||||
$size_code .= "\t_LIBGTOP_RECV_len += sizeof (glibtop_array);\n";
|
||||
$size_code .= sprintf
|
||||
(qq[\t_LIBGTOP_RECV_len += sizeof (glibtop_%s);\n], $feature);
|
||||
} else {
|
||||
$size_code .= sprintf
|
||||
(qq[\t_LIBGTOP_RECV_len += sizeof (glibtop_%s);\n], $feature);
|
||||
}
|
||||
$size_code .= "\n";
|
||||
|
||||
$size_code .= "\t/* recv buffer */\n";
|
||||
if ($line_fields[3] eq '') {
|
||||
$size_code .= "\t_LIBGTOP_RECV_buf = NULL;\n";
|
||||
} else {
|
||||
$size_code .= "\t_LIBGTOP_RECV_buf = glibtop_malloc_r (server, _LIBGTOP_RECV_len);\n";
|
||||
}
|
||||
$size_code .= "\t_LIBGTOP_RECV_ptr = _LIBGTOP_RECV_buf;\n\n";
|
||||
|
||||
$recv_buf_code = '';
|
||||
if ($line_fields[3] eq '') {
|
||||
} elsif ($line_fields[3] eq 'array') {
|
||||
$recv_buf_code = "\t/* write recv buffer */\n";
|
||||
$recv_buf_code .= sprintf
|
||||
(qq[\tmemcpy (_LIBGTOP_RECV_ptr, &array, sizeof (glibtop_array));\n]);
|
||||
$recv_buf_code .= sprintf
|
||||
(qq[\t_LIBGTOP_RECV_ptr += sizeof (glibtop_array);\n]);
|
||||
} elsif ($line_fields[3] =~ /^array/) {
|
||||
$recv_buf_code = "\t/* write recv buffer */\n";
|
||||
$recv_buf_code .= sprintf
|
||||
(qq[\tmemcpy (_LIBGTOP_RECV_ptr, &array, sizeof (glibtop_array));\n]);
|
||||
$recv_buf_code .= sprintf
|
||||
(qq[\t_LIBGTOP_RECV_ptr += sizeof (glibtop_array);\n]);
|
||||
$recv_buf_code .= sprintf
|
||||
(qq[\tmemcpy (_LIBGTOP_RECV_ptr, &%s, sizeof (glibtop_%s));\n],
|
||||
$feature, $feature);
|
||||
$recv_buf_code .= sprintf
|
||||
(qq[\t_LIBGTOP_RECV_ptr += sizeof (glibtop_%s);\n], $feature);
|
||||
} else {
|
||||
$recv_buf_code = "\t/* write recv buffer */\n";
|
||||
$recv_buf_code .= sprintf
|
||||
(qq[\tmemcpy (_LIBGTOP_RECV_ptr, &%s, sizeof (glibtop_%s));\n],
|
||||
$feature, $feature);
|
||||
$recv_buf_code .= sprintf
|
||||
(qq[\t_LIBGTOP_RECV_ptr += sizeof (glibtop_%s);\n], $feature);
|
||||
}
|
||||
|
||||
$recv_buf_code .= "\n";
|
||||
$recv_buf_code .= "\t*recv_buf_ptr = _LIBGTOP_RECV_buf;\n";
|
||||
$recv_buf_code .= "\t*recv_size_ptr = _LIBGTOP_RECV_len;\n";
|
||||
|
||||
if ($orig_retval eq 'pointer(string)') {
|
||||
$need_temp_storage = 1;
|
||||
$local_var_decl_code .= "\tchar **_LIBGTOP_TEMP_ptr;\n";
|
||||
$local_var_decl_code .= "\tchar *_LIBGTOP_ARRAY_ptr;\n";
|
||||
$local_var_decl_code .= "\tchar *_LIBGTOP_ARRAY_base;\n";
|
||||
$local_var_decl_code .= "\toff_t _LIBGTOP_ARRAY_offset;\n";
|
||||
$local_var_decl_code .= "\toff_t *_LIBGTOP_ARRAY_off_ptr;\n";
|
||||
|
||||
$recv_buf_code .= "\n";
|
||||
$recv_buf_code .= "\t_LIBGTOP_TEMP_len = 0;\n";
|
||||
$recv_buf_code .= "\t_LIBGTOP_TEMP_ptr = retval;\n";
|
||||
$recv_buf_code .= "\tfor (_LIBGTOP_TEMP_ptr = retval; _LIBGTOP_TEMP_ptr && *_LIBGTOP_TEMP_ptr; _LIBGTOP_TEMP_ptr++)\n";
|
||||
$recv_buf_code .= "\t\t_LIBGTOP_TEMP_len += strlen (*_LIBGTOP_TEMP_ptr)+1;\n";
|
||||
$recv_buf_code .= "\n";
|
||||
$recv_buf_code .= "\t_LIBGTOP_TEMP_len += sizeof (off_t) + 1;\n";
|
||||
$recv_buf_code .= "\t_LIBGTOP_TEMP_len += array.number * sizeof (off_t);\n";
|
||||
$recv_buf_code .= "\t_LIBGTOP_ARRAY_base = glibtop_malloc_r (server, _LIBGTOP_TEMP_len);";
|
||||
$recv_buf_code .= "\t_LIBGTOP_ARRAY_ptr = _LIBGTOP_ARRAY_base;\n";
|
||||
$recv_buf_code .= "\t_LIBGTOP_ARRAY_offset = array.number * sizeof (off_t);\n";
|
||||
$recv_buf_code .= "\t_LIBGTOP_ARRAY_offset += sizeof (off_t);\n";
|
||||
$recv_buf_code .= "\t_LIBGTOP_ARRAY_off_ptr = (off_t *) _LIBGTOP_ARRAY_ptr;\n";
|
||||
$recv_buf_code .= "\n";
|
||||
$recv_buf_code .= "\t*_LIBGTOP_ARRAY_off_ptr++ = _LIBGTOP_ARRAY_offset;\n";
|
||||
$recv_buf_code .= "\tfor (_LIBGTOP_TEMP_ptr = retval; _LIBGTOP_TEMP_ptr && *_LIBGTOP_TEMP_ptr; _LIBGTOP_TEMP_ptr++) {\n";
|
||||
$recv_buf_code .= "\t\t*_LIBGTOP_ARRAY_off_ptr++ = _LIBGTOP_ARRAY_offset;\n";
|
||||
$recv_buf_code .= "\t\t_LIBGTOP_ARRAY_offset += strlen (*_LIBGTOP_TEMP_ptr)+1;\n";
|
||||
$recv_buf_code .= "\t}\n\n";
|
||||
$recv_buf_code .= "\t_LIBGTOP_ARRAY_ptr = (char *) _LIBGTOP_ARRAY_off_ptr;\n";
|
||||
$recv_buf_code .= "\tfor (_LIBGTOP_TEMP_ptr = retval; _LIBGTOP_TEMP_ptr && *_LIBGTOP_TEMP_ptr; _LIBGTOP_TEMP_ptr++) {\n";
|
||||
$recv_buf_code .= "\t\tstrcpy (_LIBGTOP_ARRAY_ptr, *_LIBGTOP_TEMP_ptr);\n";
|
||||
$recv_buf_code .= "\t\t_LIBGTOP_ARRAY_ptr += strlen (*_LIBGTOP_TEMP_ptr)+1;\n";
|
||||
$recv_buf_code .= "\t}\n\n";
|
||||
$recv_buf_code .= "\tif (recv_data_ptr) {\n";
|
||||
$recv_buf_code .= "\t\t*recv_data_ptr = _LIBGTOP_ARRAY_base;\n";
|
||||
$recv_buf_code .= "\t\t*recv_data_size_ptr = _LIBGTOP_TEMP_len;\n";
|
||||
$recv_buf_code .= "\t}\n";
|
||||
|
||||
} elsif ($line_fields[3] =~ /^array/) {
|
||||
$recv_buf_code .= "\n";
|
||||
$recv_buf_code .= "\tif (recv_data_ptr) {\n";
|
||||
$recv_buf_code .= "\t\t*recv_data_ptr = retval;\n";
|
||||
$recv_buf_code .= "\t\t*recv_data_size_ptr = array.total;\n";
|
||||
$recv_buf_code .= "\t}\n";
|
||||
}
|
||||
|
||||
if ($need_temp_storage) {
|
||||
$local_var_decl_code .= "\tsize_t _LIBGTOP_TEMP_len;\n";
|
||||
$local_var_decl_code .= "\tsize_t _LIBGTOP_DATA_len;\n";
|
||||
$local_var_decl_code .= "\toff_t _LIBGTOP_DATA_offset;\n";
|
||||
$local_var_decl_code .= "\tchar *_LIBGTOP_DATA_ptr;\n";
|
||||
|
||||
$init_local_var_code .= "\t_LIBGTOP_DATA_len = 0;\n";
|
||||
$init_local_var_code .= "\t_LIBGTOP_DATA_offset = 0;\n";
|
||||
$init_local_var_code .= "\t_LIBGTOP_DATA_ptr = ".
|
||||
"(char *) data_ptr;\n";
|
||||
}
|
||||
|
||||
$func_decl_code = sprintf
|
||||
(qq[static int\n_glibtop_demarshal_%s_i (glibtop *server, glibtop_backend *backend, const void *send_ptr, size_t send_size, void *data_ptr, size_t data_size, void **recv_buf_ptr, size_t *recv_size_ptr, void **recv_data_ptr, size_t *recv_data_size_ptr, int *retval_ptr)\n], $feature);
|
||||
|
||||
if (!($call_code eq '')) {
|
||||
$call_code .= "\n";
|
||||
}
|
||||
|
||||
$func_body_code = sprintf
|
||||
(qq[%s%s%s%s], $size_code, $demarshal_code, $call_code, $recv_buf_code);
|
||||
|
||||
$total_code = sprintf
|
||||
(qq[%s{\n%s\n%s\n%s\n\treturn 0;\n}\n],
|
||||
$func_decl_code, $local_var_decl_code, $init_local_var_code,
|
||||
$func_body_code);
|
||||
|
||||
$total_code = sprintf ("#if GLIBTOP_SUID_%s\n\n%s\n#endif /* GLIBTOP_SUID_%s */\n\n",
|
||||
&toupper($feature), $total_code,
|
||||
&toupper($feature));
|
||||
|
||||
print $total_code;
|
||||
}
|
||||
|
||||
$func_decl_code = sprintf
|
||||
(qq[int\nglibtop_demarshal_func_i (glibtop *server, glibtop_backend *backend, unsigned command, const void *send_ptr, size_t send_size, void *data_ptr, size_t data_size, void **recv_buf_ptr, size_t *recv_size_ptr, void **recv_data_ptr, size_t *recv_data_size_ptr, int *retval_ptr)]);
|
||||
|
||||
$switch_body_code = '';
|
||||
|
||||
for ($nr = 1; $nr <= $feature_count; $nr++) {
|
||||
$feature = $features{$nr};
|
||||
|
||||
$switch_body_code .= sprintf
|
||||
(qq[#if GLIBTOP_SUID_%s\n\tcase GLIBTOP_CMND_%s:\n\t\treturn _glibtop_demarshal_%s_i\n\t\t\t(server, backend, send_ptr, send_size,\n\t\t\t data_ptr, data_size,\n\t\t\t recv_buf_ptr, recv_size_ptr,\n\t\t\t recv_data_ptr, recv_data_size_ptr, retval_ptr);\n#endif /* GLIBTOP_SUID_%s */\n],
|
||||
&toupper ($feature), &toupper ($feature), $feature, &toupper ($feature));
|
||||
}
|
||||
|
||||
$switch_code = sprintf
|
||||
(qq[\tswitch (command) {\n%s\tdefault:\n\t\treturn -GLIBTOP_ERROR_INVALID_ARGUMENT;\n\t}\n], $switch_body_code);
|
||||
|
||||
$total_code = sprintf
|
||||
(qq[%s\n{\n%s}\n\n], $func_decl_code, $switch_code);
|
||||
|
||||
print $total_code;
|
||||
|
||||
1;
|
114
backends/server/io.c
Normal file
114
backends/server/io.c
Normal file
@@ -0,0 +1,114 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "server.h"
|
||||
|
||||
void
|
||||
do_output (int s, glibtop_response *resp, const void *recv_ptr,
|
||||
const void *data_ptr)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "Really writing %d bytes.\n",
|
||||
sizeof (glibtop_response));
|
||||
#endif
|
||||
|
||||
if (s == 0) {
|
||||
if (write (1, (const void *) resp, sizeof (glibtop_response)) < 0)
|
||||
glibtop_warn_io ("write");
|
||||
} else {
|
||||
if (send (s, (const void *) resp, sizeof (glibtop_response), 0) < 0)
|
||||
glibtop_warn_io ("send");
|
||||
}
|
||||
|
||||
if (resp->recv_size) {
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "Writing %ld bytes of data.\n",
|
||||
(long) resp->recv_size);
|
||||
#endif
|
||||
|
||||
if (s == 0) {
|
||||
if (write (1, recv_ptr, resp->recv_size) < 0)
|
||||
glibtop_warn_io ("write");
|
||||
} else {
|
||||
if (send (s, recv_ptr, resp->recv_size, 0) < 0)
|
||||
glibtop_warn_io ("send");
|
||||
}
|
||||
}
|
||||
|
||||
if (resp->data_size) {
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "Writing %ld bytes of extra data.\n",
|
||||
(long) resp->data_size);
|
||||
#endif
|
||||
|
||||
if (s == 0) {
|
||||
if (write (1, data_ptr, resp->data_size) < 0)
|
||||
glibtop_warn_io ("write");
|
||||
} else {
|
||||
if (send (s, data_ptr, resp->data_size, 0) < 0)
|
||||
glibtop_warn_io ("send");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
do_read (int s, void *ptr, size_t total_size)
|
||||
{
|
||||
int nread;
|
||||
char *tmp_ptr;
|
||||
size_t already_read = 0, remaining = total_size;
|
||||
|
||||
while (already_read < total_size) {
|
||||
if (s)
|
||||
nread = recv (s, ptr, remaining, 0);
|
||||
else
|
||||
nread = read (0, ptr, remaining);
|
||||
|
||||
if ((already_read == 0) && (nread == 0)) {
|
||||
glibtop_warn ("pid %d received eof.", getpid ());
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (nread <= 0) {
|
||||
glibtop_warn_io ("recv");
|
||||
return 0;
|
||||
}
|
||||
|
||||
already_read += nread;
|
||||
remaining -= nread;
|
||||
/* (char *) ptr += nread; */
|
||||
tmp_ptr = ptr;
|
||||
tmp_ptr += nread;
|
||||
ptr = tmp_ptr;
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "READ (%d): %d - %d - %d\n",
|
||||
nread, already_read, remaining, total_size);
|
||||
#endif
|
||||
}
|
||||
|
||||
return already_read;
|
||||
}
|
13
backends/server/libgtop-server.backend
Normal file
13
backends/server/libgtop-server.backend
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?> <!-- -*-xml-*- -->
|
||||
<!DOCTYPE libgtop:backends SYSTEM 'libgtop-backends.dtd'>
|
||||
<libgtop:Backends xmlns:libgtop="http://www.home-of-linux.org/libgtop/1.1">
|
||||
|
||||
<libgtop:Backend>
|
||||
<libgtop:Name>glibtop-backend-server</libgtop:Name>
|
||||
<libgtop:Location>
|
||||
<libgtop:LibtoolName>libgtop_backend_server.la</libgtop:LibtoolName>
|
||||
<libgtop:ShlibName>libgtop_backend_server.so</libgtop:ShlibName>
|
||||
</libgtop:Location>
|
||||
</libgtop:Backend>
|
||||
|
||||
</libgtop:Backends>
|
305
backends/server/marshal.pl
Normal file
305
backends/server/marshal.pl
Normal file
@@ -0,0 +1,305 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
require 'c_types.pl';
|
||||
|
||||
$[ = 1; # set array base to 1
|
||||
$, = ' '; # set output field separator
|
||||
$\ = "\n"; # set output record separator
|
||||
|
||||
$always_use_temp_storage = 1;
|
||||
|
||||
sub toupper {
|
||||
local($_) = @_;
|
||||
tr/a-z/A-Z/;
|
||||
return $_;
|
||||
}
|
||||
|
||||
sub tolower {
|
||||
local($_) = @_;
|
||||
tr/A-Z/a-z/;
|
||||
return $_;
|
||||
}
|
||||
|
||||
print '/* marshal.c */';
|
||||
print "/* This is a generated file. Please modify `marshal.pl' */";
|
||||
print '';
|
||||
|
||||
print '#include <backend-server.h>';
|
||||
print '';
|
||||
print '#include <glibtop/sysdeps.h>';
|
||||
print '#include <glibtop/union.h>';
|
||||
print '';
|
||||
print '#include "command.h"';
|
||||
print '#include <glibtop/call-vector.h>';
|
||||
print '';
|
||||
|
||||
$feature_count = 0;
|
||||
|
||||
while (<>) {
|
||||
chop; # strip record separator
|
||||
|
||||
if (/^[^#]/) {
|
||||
&output($_);
|
||||
}
|
||||
}
|
||||
|
||||
sub output {
|
||||
local($line) = @_;
|
||||
@line_fields = split(/\|/, $line, 9999);
|
||||
$retval = $line_fields[1];
|
||||
$feature = $line_fields[2];
|
||||
$param_def = $line_fields[4];
|
||||
|
||||
$orig = $feature;
|
||||
$feature =~ s/^@//;
|
||||
$space = $feature;
|
||||
$space =~ s/./ /g;
|
||||
|
||||
$features{++$feature_count} = $orig;
|
||||
return if $orig =~ /^@/;
|
||||
|
||||
$orig_retval = $retval;
|
||||
if ($retval eq 'retval') {
|
||||
$retval_param = '&retval';
|
||||
$call_prefix = '';
|
||||
$call_prefix_space = '';
|
||||
$prefix = 'retval = ';
|
||||
$prefix_space = ' ';
|
||||
$retval = 'int';
|
||||
}
|
||||
elsif ($retval !~ /^void$/) {
|
||||
$retval_param = 'NULL';
|
||||
$prefix = 'retval = ';
|
||||
$prefix_space = ' ';
|
||||
$call_prefix = 'retval = ';
|
||||
$call_prefix_space = ' ';
|
||||
}
|
||||
else {
|
||||
$retval_param = 'NULL';
|
||||
$call_prefix = '';
|
||||
$call_prefix_space = '';
|
||||
$prefix = '';
|
||||
$prefix_space = '';
|
||||
}
|
||||
|
||||
if ($retval =~ /^(array|pointer)\((.*)\)$/) {
|
||||
$retval = ($2 eq 'string') ? 'char **' : "$2 *";
|
||||
}
|
||||
|
||||
$need_temp_storage = $always_use_temp_storage;
|
||||
$local_var_init_code = "\t/* variable initialization */\n";
|
||||
$local_var_init_code .= "\t_LIBGTOP_SEND_len = 0;\n";
|
||||
$local_var_init_code .= "\t_LIBGTOP_DATA_len = 0;\n";
|
||||
$local_var_init_code .= "\t_LIBGTOP_SEND_offset = 0;\n";
|
||||
$local_var_init_code .= "\t_LIBGTOP_SEND_ptr = ".
|
||||
"(char *) _LIBGTOP_SEND_buf;\n";
|
||||
$marshal_code = "\t/* marshal start */\n";
|
||||
$marshal_code .= "\tmemset (_LIBGTOP_SEND_buf, 0, _LIBGTOP_SEND_len);\n";
|
||||
$first_param_name = '';
|
||||
$size_code = '';
|
||||
|
||||
$call_param = '';
|
||||
$param_decl = '';
|
||||
$need_temp_len = 0;
|
||||
$nr_params = (@params = split(/:/, $param_def, 9999));
|
||||
for ($param = 1; $param <= $nr_params; $param++) {
|
||||
$list = $params[$param];
|
||||
$type = $params[$param];
|
||||
$type =~ s/\(.*//;
|
||||
$list =~ s/^.*\(//;
|
||||
$list =~ s/\)$//;
|
||||
$count = (@fields = split(/,/, $list, 9999));
|
||||
for ($field = 1; $field <= $count; $field++) {
|
||||
my $c_type = $typeinfo->{$type}->[1];
|
||||
|
||||
if ($first_param_name eq '') {
|
||||
$first_param_name = $fields[$field];
|
||||
}
|
||||
|
||||
if ($typeinfo->{$type}->[2]) {
|
||||
$need_temp_storage = 1;
|
||||
}
|
||||
|
||||
if ($param_decl eq '') {
|
||||
$param_decl = ",\n " . $space . ' ';
|
||||
}
|
||||
else {
|
||||
$param_decl = $param_decl . ', ';
|
||||
}
|
||||
$param_decl = $param_decl . $c_type . ' ' . $fields[$field];
|
||||
$call_param = $call_param . ', ' . $fields[$field];
|
||||
|
||||
$size_code .= "\t_LIBGTOP_SEND_len += ";
|
||||
if ($typeinfo->{$type}->[2]) {
|
||||
$size_code .= sprintf ("sizeof (size_t)");
|
||||
} else {
|
||||
$size_code .= sprintf ("sizeof (%s)", $c_type);
|
||||
}
|
||||
$size_code .= ";\n";
|
||||
|
||||
if (defined $sizeof_funcs->{$type}) {
|
||||
$size_code .= "\t_LIBGTOP_DATA_len += ";
|
||||
$size_code .= $sizeof_funcs->{$type}->($fields[$field]);
|
||||
$size_code .= ";\n";
|
||||
}
|
||||
|
||||
$marshal_code .= "\t_LIBGTOP_SEND_ptr = ".
|
||||
"(char *) _LIBGTOP_SEND_buf + _LIBGTOP_SEND_offset;\n";
|
||||
|
||||
if (defined $marshal_funcs->{$type}) {
|
||||
$marshal_code .= $marshal_funcs->{$type}->($c_type, $fields[$field], "\t");
|
||||
} else {
|
||||
$marshal_code .= sprintf ("\tmemcpy (_LIBGTOP_SEND_ptr, %s, %s);\n",
|
||||
'&'.$fields[$field], "sizeof ($c_type)");
|
||||
}
|
||||
|
||||
$marshal_code .= "\t_LIBGTOP_SEND_offset += ";
|
||||
if ($typeinfo->{$type}->[2]) {
|
||||
$marshal_code .= sprintf ("sizeof (size_t)");
|
||||
} else {
|
||||
$marshal_code .= sprintf ("sizeof (%s)", $c_type);
|
||||
}
|
||||
$marshal_code .= ";\n";
|
||||
}
|
||||
}
|
||||
|
||||
$local_var_code = "";
|
||||
$local_var_code .= "\tunsigned _LIBGTOP_SEND_offset, _LIBGTOP_SEND_len;\n";
|
||||
$local_var_code .= "\tunsigned _LIBGTOP_DATA_len;\n";
|
||||
if ($need_temp_len) {
|
||||
$local_var_code .= "\tunsigned _LIBGTOP_SEND_temp_len;\n";
|
||||
}
|
||||
$local_var_code .= "\tvoid *_LIBGTOP_SEND_buf, *_LIBGTOP_DATA_buf;\n";
|
||||
$local_var_code .= "\tchar *_LIBGTOP_SEND_ptr, *_LIBGTOP_DATA_ptr;\n";
|
||||
if ($retval !~ /^void$/) {
|
||||
$local_var_code .= sprintf ("\t%s retval = (%s) 0;\n",
|
||||
$retval, $retval);
|
||||
}
|
||||
|
||||
$total_code = '';
|
||||
|
||||
$send_buf_code = "\t/* send buffer */\n";
|
||||
$send_buf_code .= "\t_LIBGTOP_SEND_buf = ";
|
||||
if ($need_temp_storage) {
|
||||
$send_buf_code .= "glibtop_malloc_r (server, _LIBGTOP_SEND_len+1)";
|
||||
} else {
|
||||
$send_buf_code .= '(void *) &'.$first_param_name;
|
||||
}
|
||||
$send_buf_code .= ";\n\n";
|
||||
|
||||
$send_buf_code .= "\t/* data buffer */\n";
|
||||
$send_buf_code .= "\t_LIBGTOP_DATA_buf = ";
|
||||
if ($need_temp_storage) {
|
||||
$send_buf_code .= "glibtop_malloc_r (server, _LIBGTOP_DATA_len+1)";
|
||||
} else {
|
||||
$send_buf_code .= 'NULL';
|
||||
}
|
||||
$send_buf_code .= ";\n";
|
||||
$send_buf_code .= "\t_LIBGTOP_DATA_ptr = _LIBGTOP_DATA_buf;\n";
|
||||
|
||||
$call_code = '';
|
||||
$call_code .= sprintf ("\t%sglibtop_call_i (server, closure, GLIBTOP_CMND_%s,\n",
|
||||
$call_prefix, &toupper($feature));
|
||||
$call_code .= sprintf ("\t\t\t%s%s, %s,\n", $call_prefix_space,
|
||||
"_LIBGTOP_SEND_len", "_LIBGTOP_SEND_buf");
|
||||
$call_code .= sprintf ("\t\t\t%s%s, %s,\n", $call_prefix_space,
|
||||
"_LIBGTOP_DATA_len", "_LIBGTOP_DATA_buf");
|
||||
if ($line_fields[3] eq '') {
|
||||
$call_code .= sprintf ("\t\t\t%s0, NULL,\n", $call_prefix_space);
|
||||
} elsif ($line_fields[3] eq 'array') {
|
||||
$call_code .= sprintf ("\t\t\t%ssizeof (glibtop_array), array,\n",
|
||||
$call_prefix_space);
|
||||
} else {
|
||||
$call_code .= sprintf ("\t\t\t%ssizeof (glibtop_%s), buf,\n",
|
||||
$call_prefix_space, $feature);
|
||||
}
|
||||
$call_code .= sprintf ("\t\t\t%s%s);\n", $call_prefix_space, $retval_param);
|
||||
|
||||
if ($need_temp_storage) {
|
||||
$send_buf_free_code = "\tglibtop_free_r (server, _LIBGTOP_SEND_buf);\n";
|
||||
$send_buf_free_code .= "\tglibtop_free_r (server, _LIBGTOP_DATA_buf);\n";
|
||||
} else {
|
||||
$send_buf_free_code = "";
|
||||
}
|
||||
|
||||
if (!($size_code eq '')) {
|
||||
$size_code = sprintf (qq[\t/* send size */\n%s\n], $size_code);
|
||||
}
|
||||
|
||||
if ($orig_retval eq 'pointer(string)') {
|
||||
$call_code .= "\n";
|
||||
$local_var_code .= "\tchar *_LIBGTOP_ARRAY_ptr, **ptrlist;\n";
|
||||
$local_var_code .= "\toff_t *_LIBGTOP_ARRAY_off_ptr;\n";
|
||||
$local_var_code .= "\tint i;\n";
|
||||
$call_code .= "\tptrlist = glibtop_calloc_r (server, array->number+1, sizeof (char *));\n";
|
||||
$call_code .= "\t_LIBGTOP_ARRAY_off_ptr = (off_t *) retval;\n";
|
||||
$call_code .= "\t_LIBGTOP_ARRAY_ptr = (char *) retval;\n";
|
||||
$call_code .= "\t_LIBGTOP_ARRAY_off_ptr++;\n\n";
|
||||
$call_code .= "\tfor (i = 0; i < array->number; i++)\n";
|
||||
$call_code .= "\t\tptrlist [i] = glibtop_strdup_r (server, _LIBGTOP_ARRAY_ptr + *_LIBGTOP_ARRAY_off_ptr++);\n";
|
||||
$call_code .= "\tptrlist [array->number] = NULL;\n\n";
|
||||
$call_code .= "\tglibtop_free_r (server, retval);\n";
|
||||
$call_code .= "\tretval = ptrlist;\n";
|
||||
}
|
||||
|
||||
$total_code .= sprintf ("%s%s\n%s\n%s\n%s\n",
|
||||
$size_code, $send_buf_code, $marshal_code,
|
||||
$call_code, $send_buf_free_code);
|
||||
|
||||
$return_code = '';
|
||||
if ($retval !~ /^void$/) {
|
||||
$return_code .= "\treturn retval;\n";
|
||||
} else {
|
||||
$return_code .= "\treturn;\n";
|
||||
}
|
||||
|
||||
$total_code .= $return_code;
|
||||
|
||||
$func_decl = 'static '.$retval."\n";
|
||||
if ($line_fields[3] eq '') {
|
||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure%s)\n",
|
||||
$feature, $param_decl);
|
||||
} elsif ($line_fields[3] eq 'array') {
|
||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure, glibtop_array *array%s)\n",
|
||||
$feature, $param_decl);
|
||||
} elsif ($line_fields[3] =~ /^array/) {
|
||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure, glibtop_array *array, %s *buf%s)\n",
|
||||
$feature, 'glibtop_'.$feature, $param_decl);
|
||||
} else {
|
||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure, %s *buf%s)\n",
|
||||
$feature, 'glibtop_'.$feature, $param_decl);
|
||||
}
|
||||
|
||||
$total_code = sprintf ("%s{\n%s\n%s\n%s\n%s}\n", $func_decl,
|
||||
$local_var_code, $local_var_init_code,
|
||||
$total_code);
|
||||
|
||||
|
||||
$total_code = sprintf ("#if GLIBTOP_SUID_%s\n\n%s\n#endif /* GLIBTOP_SUID_%s */\n\n",
|
||||
&toupper($feature), $total_code,
|
||||
&toupper($feature));
|
||||
|
||||
print $total_code;
|
||||
}
|
||||
|
||||
$call_vector_code = '';
|
||||
for ($nr = 1; $nr <= $feature_count; $nr++) {
|
||||
$feature = $features{$nr};
|
||||
|
||||
$orig = $feature;
|
||||
$feature =~ s/^@//;
|
||||
|
||||
if ($orig =~ /^@/) {
|
||||
$call_vector_code .= sprintf (qq[\tNULL,\n]);
|
||||
} else {
|
||||
$call_vector_code .= sprintf
|
||||
(qq[\#if GLIBTOP_SUID_%s\n\t_glibtop_get_%s_c,\n\#else\n\tNULL,\n\#endif\n],
|
||||
&toupper($feature), $feature);
|
||||
}
|
||||
}
|
||||
|
||||
print 'glibtop_call_vector glibtop_backend_server_call_vector = {';
|
||||
print $call_vector_code;
|
||||
print '};';
|
||||
print '';
|
||||
|
46
backends/server/read.c
Normal file
46
backends/server/read.c
Normal file
@@ -0,0 +1,46 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <backend-server.h>
|
||||
|
||||
void
|
||||
glibtop_read_i (backend_server_private *priv, size_t size, void *buf)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "LIBRARY: really reading %d bytes from %d.\n",
|
||||
size, priv->input [0]);
|
||||
#endif
|
||||
|
||||
ret = read (priv->input [0], buf, size);
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "LIBRARY: read %d bytes.\n", ret);
|
||||
#endif
|
||||
|
||||
if (ret < 0)
|
||||
glibtop_error_io_r (priv->server, "read %d bytes", size);
|
||||
}
|
58
backends/server/read_data.c
Normal file
58
backends/server/read_data.c
Normal file
@@ -0,0 +1,58 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <backend-server.h>
|
||||
|
||||
void *
|
||||
glibtop_read_data_i (backend_server_private *priv)
|
||||
{
|
||||
size_t size;
|
||||
void *ptr;
|
||||
int ret;
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "LIBRARY: reading %d data bytes.\n", sizeof (size_t));
|
||||
#endif
|
||||
|
||||
ret = read (priv->input [0], (void *)&size, sizeof (size_t));
|
||||
|
||||
if (ret < 0)
|
||||
glibtop_error_io_r (priv->server, "read data size");
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "LIBRARY: really reading %d data bytes (ret = %d).\n", size, ret);
|
||||
#endif
|
||||
|
||||
if (!size) return NULL;
|
||||
|
||||
ptr = glibtop_malloc_r (priv->server, size);
|
||||
|
||||
ret = read (priv->input [0], ptr, size);
|
||||
|
||||
if (ret < 0)
|
||||
glibtop_error_io_r (priv->server, "read data %d bytes");
|
||||
|
||||
return ptr;
|
||||
}
|
190
backends/server/server.c
Normal file
190
backends/server/server.c
Normal file
@@ -0,0 +1,190 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "server.h"
|
||||
|
||||
static glibtop _glibtop_global_server;
|
||||
glibtop *glibtop_global_server = &_glibtop_global_server;
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/union.h>
|
||||
#include <glibtop/sysdeps.h>
|
||||
|
||||
#include <sys/utsname.h>
|
||||
|
||||
const unsigned long glibtop_server_features =
|
||||
GLIBTOP_SUID_CPU +
|
||||
GLIBTOP_SUID_MEM +
|
||||
GLIBTOP_SUID_SWAP +
|
||||
GLIBTOP_SUID_UPTIME +
|
||||
GLIBTOP_SUID_LOADAVG +
|
||||
GLIBTOP_SUID_SHM_LIMITS +
|
||||
GLIBTOP_SUID_MSG_LIMITS +
|
||||
GLIBTOP_SUID_SEM_LIMITS +
|
||||
GLIBTOP_SUID_PROCLIST +
|
||||
GLIBTOP_SUID_PROC_STATE +
|
||||
GLIBTOP_SUID_PROC_UID +
|
||||
GLIBTOP_SUID_PROC_MEM +
|
||||
GLIBTOP_SUID_PROC_TIME +
|
||||
GLIBTOP_SUID_PROC_SIGNAL +
|
||||
GLIBTOP_SUID_PROC_KERNEL +
|
||||
GLIBTOP_SUID_PROC_SEGMENT +
|
||||
GLIBTOP_SUID_PROC_ARGS +
|
||||
GLIBTOP_SUID_PROC_MAP +
|
||||
GLIBTOP_SUID_NETINFO +
|
||||
GLIBTOP_SUID_NETLOAD +
|
||||
GLIBTOP_SUID_INTERFACE_NAMES +
|
||||
GLIBTOP_SUID_PPP;
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <locale.h>
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
struct utsname uts;
|
||||
int uid, euid, gid, egid;
|
||||
glibtop *server;
|
||||
|
||||
/* !!! WE ARE ROOT HERE - CHANGE WITH CAUTION !!! */
|
||||
|
||||
uid = getuid (); euid = geteuid ();
|
||||
gid = getgid (); egid = getegid ();
|
||||
|
||||
if (uname (&uts) < 0) _exit (1);
|
||||
|
||||
if (strcmp (uts.sysname, LIBGTOP_COMPILE_SYSTEM) ||
|
||||
strcmp (uts.release, LIBGTOP_COMPILE_RELEASE) ||
|
||||
strcmp (uts.machine, LIBGTOP_COMPILE_MACHINE)) {
|
||||
fprintf (stderr, "Can only run on %s %s %s\n",
|
||||
LIBGTOP_COMPILE_SYSTEM,
|
||||
LIBGTOP_COMPILE_RELEASE,
|
||||
LIBGTOP_COMPILE_MACHINE);
|
||||
_exit (1);
|
||||
}
|
||||
|
||||
server = glibtop_global_server;
|
||||
|
||||
if (!server->_priv)
|
||||
server->_priv = glibtop_calloc_r
|
||||
(server, 1, sizeof (glibtop_server_private));
|
||||
|
||||
glibtop_init_p (server, 0, 0);
|
||||
|
||||
if (setreuid (euid, uid)) _exit (1);
|
||||
|
||||
if (setregid (egid, gid)) _exit (1);
|
||||
|
||||
/* !!! END OF SUID ROOT PART !!! */
|
||||
|
||||
handle_slave_connection (0, 0);
|
||||
|
||||
_exit (0);
|
||||
}
|
||||
|
||||
void
|
||||
handle_slave_connection (int input, int output)
|
||||
{
|
||||
glibtop_command _cmnd, *cmnd = &_cmnd;
|
||||
glibtop *server = glibtop_global_server;
|
||||
|
||||
// glibtop_send_version_i (glibtop_global_server, output);
|
||||
|
||||
while (do_read (input, cmnd, sizeof (glibtop_command))) {
|
||||
size_t recv_size = 0, send_size = 0, recv_data_size = 0;
|
||||
void *recv_ptr = NULL, *recv_data_ptr = NULL, *data_ptr = NULL;
|
||||
char parameter [BUFSIZ];
|
||||
int retval, func_retval;
|
||||
glibtop_response resp;
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "Slave %d received command "
|
||||
"%ld from client.\n", getpid (), (long) cmnd->command);
|
||||
#endif
|
||||
|
||||
if (cmnd->send_size >= BUFSIZ)
|
||||
glibtop_error ("Client sent %d bytes, but buffer is %d",
|
||||
cmnd->send_size, BUFSIZ);
|
||||
else if (cmnd->param_size >= BUFSIZ)
|
||||
glibtop_error ("Client sent %d bytes, but buffer is %d",
|
||||
cmnd->param_size, BUFSIZ);
|
||||
|
||||
memset (parameter, 0, sizeof (parameter));
|
||||
|
||||
if (cmnd->send_size) {
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "Client has %d bytes of data.\n",
|
||||
cmnd->send_size);
|
||||
#endif
|
||||
|
||||
send_size = cmnd->send_size;
|
||||
do_read (input, parameter, send_size);
|
||||
} else if (cmnd->param_size) {
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "Client has %d bytes of parameter data.\n",
|
||||
cmnd->param_size);
|
||||
#endif
|
||||
send_size = cmnd->param_size;
|
||||
memcpy (parameter, cmnd->parameter, send_size);
|
||||
}
|
||||
|
||||
if (cmnd->data_size) {
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "CLIENT has %d bytes of extra data for us.\n",
|
||||
cmnd->data_size);
|
||||
#endif
|
||||
|
||||
data_ptr = glibtop_malloc_r (server, cmnd->data_size);
|
||||
do_read (input, data_ptr, cmnd->data_size);
|
||||
}
|
||||
|
||||
retval = glibtop_demarshal_func_i (server, NULL,
|
||||
cmnd->command,
|
||||
parameter, send_size,
|
||||
data_ptr, cmnd->data_size,
|
||||
&recv_ptr, &recv_size,
|
||||
&recv_data_ptr, &recv_data_size,
|
||||
&func_retval);
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "Retval %d / %d - %p - %d\n",
|
||||
retval, func_retval, recv_ptr, recv_size);
|
||||
|
||||
if (recv_data_size) {
|
||||
fprintf (stderr, "Returning %d bytes of data from %p.\n",
|
||||
recv_data_size, recv_data_ptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
memset (&resp, 0, sizeof (glibtop_response));
|
||||
|
||||
resp.retval = retval;
|
||||
resp.glibtop_errno = func_retval;
|
||||
resp.recv_size = recv_size;
|
||||
resp.data_size = recv_data_size;
|
||||
|
||||
do_output (output, &resp, recv_ptr, recv_data_ptr);
|
||||
}
|
||||
}
|
85
backends/server/server.h
Normal file
85
backends/server/server.h
Normal file
@@ -0,0 +1,85 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_DAEMON_H__
|
||||
#define __GLIBTOP_DAEMON_H__
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
|
||||
#include <glibtop/open.h>
|
||||
#include <glibtop/union.h>
|
||||
#include <glibtop/xmalloc.h>
|
||||
#include <glibtop/parameter.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/socket.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <glibtop/backend.h>
|
||||
#include <glibtop-backend-private.h>
|
||||
|
||||
#include "command.h"
|
||||
|
||||
BEGIN_LIBGTOP_DECLS
|
||||
|
||||
/* Some don't have LOG_PERROR */
|
||||
#ifndef LOG_PERROR
|
||||
#define LOG_PERROR 0
|
||||
#endif
|
||||
|
||||
#define LIBGTOP_VERSION_STRING "Libgtop %s server version %s (%u,%u,%u,%u)."
|
||||
|
||||
#if defined(HAVE_GETDTABLESIZE)
|
||||
#define GET_MAX_FDS() getdtablesize()
|
||||
#else
|
||||
/* Fallthrough case - please add other #elif cases above
|
||||
for different OS's as necessary */
|
||||
#define GET_MAX_FDS() 256
|
||||
#endif
|
||||
|
||||
void
|
||||
do_output (int s, glibtop_response *resp, const void *recv_ptr,
|
||||
const void *data_ptr);
|
||||
|
||||
int
|
||||
do_read (int s, void *ptr, size_t total_size);
|
||||
|
||||
void
|
||||
handle_slave_connection (int input, int output);
|
||||
|
||||
int
|
||||
glibtop_demarshal_func_i (glibtop *server, glibtop_backend *backend, unsigned command, const void *send_ptr, size_t send_size, void *data_ptr, size_t data_size, void **recv_buf_ptr, size_t *recv_size_ptr, void **recv_data_ptr, size_t *recv_data_size_ptr, int *retval_ptr);
|
||||
|
||||
void
|
||||
glibtop_send_version_i (glibtop *server, int fd);
|
||||
|
||||
extern int enable_debug;
|
||||
extern int verbose_output;
|
||||
|
||||
END_LIBGTOP_DECLS
|
||||
|
||||
#endif
|
62
backends/server/version.c
Normal file
62
backends/server/version.c
Normal file
@@ -0,0 +1,62 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "server.h"
|
||||
|
||||
void
|
||||
glibtop_send_version_i (glibtop *server, int fd)
|
||||
{
|
||||
char buffer [BUFSIZ];
|
||||
size_t size;
|
||||
|
||||
sprintf (buffer, LIBGTOP_VERSION_STRING,
|
||||
LIBGTOP_VERSION, LIBGTOP_SERVER_VERSION,
|
||||
sizeof (glibtop_command),
|
||||
sizeof (glibtop_response),
|
||||
sizeof (glibtop_union),
|
||||
sizeof (glibtop_sysdeps));
|
||||
|
||||
size = strlen (buffer) + 1;
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "SERVER ID: |%s|\n", buffer);
|
||||
#endif
|
||||
|
||||
if (fd == 0) {
|
||||
if (write (1, (const void *) &size, sizeof (size)) < 0)
|
||||
glibtop_warn_io_r (server, "write");
|
||||
} else {
|
||||
if (send (fd, (const void *) &size, sizeof (size), 0) < 0)
|
||||
glibtop_warn_io_r (server, "send");
|
||||
}
|
||||
|
||||
if (fd == 0) {
|
||||
if (write (1, (const void *) buffer, size) < 0)
|
||||
glibtop_warn_io_r (server, "write");
|
||||
} else {
|
||||
if (send (fd, (const void *) buffer, size, 0) < 0)
|
||||
glibtop_warn_io_r (server, "send");
|
||||
}
|
||||
}
|
43
backends/server/write.c
Normal file
43
backends/server/write.c
Normal file
@@ -0,0 +1,43 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <backend-server.h>
|
||||
|
||||
void
|
||||
glibtop_write_i (backend_server_private *priv, size_t size, const void *buf)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (size == 0) return;
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "LIBRARY: really writing %d bytes.\n", size);
|
||||
#endif
|
||||
|
||||
ret = write (priv->output [1], buf, size);
|
||||
|
||||
if (ret < 0)
|
||||
glibtop_error_io_r (priv->server, "write %d bytes", size);
|
||||
}
|
7
backends/sysdeps/.cvsignore
Normal file
7
backends/sysdeps/.cvsignore
Normal file
@@ -0,0 +1,7 @@
|
||||
.deps
|
||||
.libs
|
||||
Makefile
|
||||
Makefile.in
|
||||
*.lo
|
||||
*.la
|
||||
marshal.c
|
60
backends/sysdeps/ChangeLog
Normal file
60
backends/sysdeps/ChangeLog
Normal file
@@ -0,0 +1,60 @@
|
||||
2000-11-26 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* glibtop-backend-private.h: Removed.
|
||||
|
||||
* backend-sysdeps.h: New files.
|
||||
|
||||
* backend-sysdeps.c (_open_sysdeps): Don't overwrite
|
||||
`backend->_priv'.
|
||||
|
||||
2000-11-22 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* Makefile.am: Link libgtop_backend_sysdeps.la against
|
||||
$(top_builddir)/sysdeps/$(sysdeps_dir)/libgtop_sysdeps.la and
|
||||
$(top_builddir)/lib/libgtop_server.la.
|
||||
|
||||
* libgtop-sysdeps.backend: Removed the ExtraLibs section.
|
||||
|
||||
2000-02-22 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* backend-sysdeps.c (LibGTopBackendInfo): Call this
|
||||
`LibGTopBackendInfo_Sysdeps' when we don't use gmodule.
|
||||
|
||||
2000-02-22 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* Makefile.am: Only install the libs in $(LIBGTOP_BACKEND_DIR)
|
||||
when we LIBGTOP_USE_GMODULE and in $(libdir) otherwise.
|
||||
|
||||
2000-01-22 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* libgtop-sysdeps.backend: Added "ExtraLibs" section to
|
||||
load `-lgtop_sysdeps'.
|
||||
|
||||
2000-01-12 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* Makefile.am: Install everything in $(LIBGTOP_BACKEND_DIR).
|
||||
|
||||
* libgtop-sysdeps.backend: New file.
|
||||
|
||||
* backend-sysdeps.c (glibtop_backend_sysdeps): Renamed to
|
||||
`LibGTopBackendInfo'.
|
||||
|
||||
2000-01-12 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* marshal.pl: Create the `_glibtop_init_hook_s' as well.
|
||||
|
||||
* marshal.pl: Don't create code for things which are now
|
||||
in the new `glibtop-backend-common' backend.
|
||||
|
||||
2000-01-02 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* marshal.pl: New file. Automatically creates `marshal.c'.
|
||||
* call-vector.c: Removed.
|
||||
|
||||
2000-01-01 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
Initial version of the "glibtop-backend-sysdeps" backend.
|
||||
|
||||
* backend-sysdeps.c: New file.
|
||||
* glibtop-backend-private.h: New file.
|
||||
|
47
backends/sysdeps/Makefile.am
Normal file
47
backends/sysdeps/Makefile.am
Normal file
@@ -0,0 +1,47 @@
|
||||
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
INCLUDES = @INCLUDES@
|
||||
|
||||
backenddir = @LIBGTOP_BACKEND_DIR@
|
||||
|
||||
if LIBGTOP_USE_GMODULE
|
||||
backendlibdir = $(backenddir)
|
||||
else
|
||||
backendlibdir = $(libdir)
|
||||
endif
|
||||
|
||||
dynamic_ldflags = @libgtop_dynamic_ldflags@
|
||||
|
||||
backend_DATA = \
|
||||
libgtop-sysdeps.backend
|
||||
|
||||
noinst_HEADERS = \
|
||||
backend-sysdeps.h
|
||||
|
||||
backendlib_LTLIBRARIES = \
|
||||
libgtop_backend_sysdeps.la
|
||||
|
||||
libgtop_backend_sysdeps_la_SOURCES = \
|
||||
backend-sysdeps.c \
|
||||
marshal.c
|
||||
|
||||
libgtop_backend_sysdeps_la_LDFLAGS = \
|
||||
$(LT_VERSION_INFO) $(dynamic_ldflags)
|
||||
|
||||
libgtop_backend_sysdeps_la_LIBADD = \
|
||||
$(top_builddir)/sysdeps/$(sysdeps_dir)/libgtop_sysdeps.la
|
||||
$(top_builddir)/lib/libgtop_server.la
|
||||
|
||||
BUILT_SOURCES = \
|
||||
marshal.c
|
||||
|
||||
EXTRA_DIST = \
|
||||
marshal.pl \
|
||||
libgtop-sysdeps.backend
|
||||
|
||||
CLEANFILES = $(BUILT_SOURCES)
|
||||
|
||||
marshal.c: marshal.pl $(top_builddir)/config.h $(top_srcdir)/features.def $(top_srcdir)/scripts/c_types.pl
|
||||
$(PERL) -I $(top_srcdir)/scripts $(srcdir)/marshal.pl < $(top_srcdir)/features.def > tmp-t
|
||||
mv tmp-t marshal.c
|
||||
|
76
backends/sysdeps/backend-sysdeps.c
Normal file
76
backends/sysdeps/backend-sysdeps.c
Normal file
@@ -0,0 +1,76 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <backend-sysdeps.h>
|
||||
|
||||
static int
|
||||
_open_sysdeps (glibtop_server *, glibtop_backend *, u_int64_t, const char **);
|
||||
|
||||
static int
|
||||
_close_sysdeps (glibtop_server *, glibtop_backend *, void *);
|
||||
|
||||
extern glibtop_call_vector glibtop_backend_sysdeps_call_vector;
|
||||
|
||||
#ifdef LIBGTOP_USE_GMODULE
|
||||
glibtop_backend_info LibGTopBackendInfo = {
|
||||
"glibtop-backend-sysdeps", _open_sysdeps, _close_sysdeps,
|
||||
&glibtop_backend_sysdeps_call_vector
|
||||
};
|
||||
#else
|
||||
glibtop_backend_info LibGTopBackendInfo_Sysdeps = {
|
||||
"glibtop-backend-sysdeps", _open_sysdeps, _close_sysdeps,
|
||||
&glibtop_backend_sysdeps_call_vector
|
||||
};
|
||||
#endif
|
||||
|
||||
static int
|
||||
_open_sysdeps (glibtop_server *server, glibtop_backend *backend,
|
||||
u_int64_t features, const char **backend_args)
|
||||
{
|
||||
glibtop_init_func_t *init_fkt;
|
||||
|
||||
/* Do the initialization, but only if not already initialized. */
|
||||
|
||||
if ((server->flags & _GLIBTOP_INIT_STATE_SYSDEPS) == 0) {
|
||||
glibtop_open_s (server, "glibtop", features, 0);
|
||||
|
||||
for (init_fkt = _glibtop_init_hook_s; *init_fkt; init_fkt++)
|
||||
(*init_fkt) (server);
|
||||
|
||||
server->info->sysdeps.pointer_size = sizeof (void*)*8;
|
||||
|
||||
server->flags |= _GLIBTOP_INIT_STATE_SYSDEPS;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
_close_sysdeps (glibtop_server *server, glibtop_backend *backend,
|
||||
void *closure)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
37
backends/sysdeps/backend-sysdeps.h
Normal file
37
backends/sysdeps/backend-sysdeps.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_BACKEND_SYSDEPS_H__
|
||||
#define __GLIBTOP_BACKEND_SYSDEPS_H__
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/global.h>
|
||||
|
||||
#include <glibtop/open.h>
|
||||
#include <glibtop/xmalloc.h>
|
||||
#include <glibtop/glibtop-backend.h>
|
||||
#include <glibtop/glibtop-backend-info.h>
|
||||
|
||||
#endif
|
13
backends/sysdeps/libgtop-sysdeps.backend
Normal file
13
backends/sysdeps/libgtop-sysdeps.backend
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?> <!-- -*-xml-*- -->
|
||||
<!DOCTYPE libgtop:backends SYSTEM 'libgtop-backends.dtd'>
|
||||
<libgtop:Backends xmlns:libgtop="http://www.home-of-linux.org/libgtop/1.1">
|
||||
|
||||
<libgtop:Backend>
|
||||
<libgtop:Name>glibtop-backend-sysdeps</libgtop:Name>
|
||||
<libgtop:Location>
|
||||
<libgtop:LibtoolName>libgtop_backend_sysdeps.la</libgtop:LibtoolName>
|
||||
<libgtop:ShlibName>libgtop_backend_sysdeps.so</libgtop:ShlibName>
|
||||
</libgtop:Location>
|
||||
</libgtop:Backend>
|
||||
|
||||
</libgtop:Backends>
|
195
backends/sysdeps/marshal.pl
Normal file
195
backends/sysdeps/marshal.pl
Normal file
@@ -0,0 +1,195 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
require 'c_types.pl';
|
||||
|
||||
$[ = 1; # set array base to 1
|
||||
$, = ' '; # set output field separator
|
||||
$\ = "\n"; # set output record separator
|
||||
|
||||
$always_use_temp_storage = 1;
|
||||
|
||||
sub toupper {
|
||||
local($_) = @_;
|
||||
tr/a-z/A-Z/;
|
||||
return $_;
|
||||
}
|
||||
|
||||
sub tolower {
|
||||
local($_) = @_;
|
||||
tr/A-Z/a-z/;
|
||||
return $_;
|
||||
}
|
||||
|
||||
print '/* marshal.c */';
|
||||
print "/* This is a generated file. Please modify `marshal.pl' */";
|
||||
print '';
|
||||
|
||||
print '#include <backend-sysdeps.h>';
|
||||
print '';
|
||||
print '#include <glibtop/sysdeps.h>';
|
||||
print '#include <glibtop/union.h>';
|
||||
print '';
|
||||
print '#include <glibtop/call-vector.h>';
|
||||
print '';
|
||||
|
||||
$feature_count = 0;
|
||||
|
||||
while (<>) {
|
||||
chop; # strip record separator
|
||||
|
||||
if (/^[^#]/) {
|
||||
&output($_);
|
||||
}
|
||||
}
|
||||
|
||||
sub output {
|
||||
local($line) = @_;
|
||||
@line_fields = split(/\|/, $line, 9999);
|
||||
$retval = $line_fields[1];
|
||||
$feature = $line_fields[2];
|
||||
$param_def = $line_fields[4];
|
||||
|
||||
$orig = $feature;
|
||||
$feature =~ s/^@//;
|
||||
$space = $feature;
|
||||
$space =~ s/./ /g;
|
||||
|
||||
$features{++$feature_count} = $orig;
|
||||
|
||||
return if $orig =~ /^@/;
|
||||
|
||||
if ($retval eq 'retval') {
|
||||
$retval_param = '&retval';
|
||||
$call_prefix = '';
|
||||
$call_prefix_space = '';
|
||||
$prefix = 'retval = ';
|
||||
$prefix_space = ' ';
|
||||
$retval = 'int';
|
||||
}
|
||||
elsif ($retval !~ /^void$/) {
|
||||
$retval_param = 'NULL';
|
||||
$prefix = 'retval = ';
|
||||
$prefix_space = ' ';
|
||||
$call_prefix = 'retval = ';
|
||||
$call_prefix_space = ' ';
|
||||
}
|
||||
else {
|
||||
$retval_param = 'NULL';
|
||||
$call_prefix = '';
|
||||
$call_prefix_space = '';
|
||||
$prefix = '';
|
||||
$prefix_space = '';
|
||||
}
|
||||
|
||||
if ($retval =~ /^(array|pointer)\((.*)\)$/) {
|
||||
$retval = ($2 eq 'string') ? 'char **' : "$2 *";
|
||||
}
|
||||
|
||||
$need_temp_storage = $always_use_temp_storage;
|
||||
$first_param_name = '';
|
||||
|
||||
$call_param = '';
|
||||
$param_decl = '';
|
||||
$need_temp_len = 0;
|
||||
$nr_params = (@params = split(/:/, $param_def, 9999));
|
||||
for ($param = 1; $param <= $nr_params; $param++) {
|
||||
$list = $params[$param];
|
||||
$type = $params[$param];
|
||||
$type =~ s/\(.*//;
|
||||
$list =~ s/^.*\(//;
|
||||
$list =~ s/\)$//;
|
||||
$count = (@fields = split(/,/, $list, 9999));
|
||||
for ($field = 1; $field <= $count; $field++) {
|
||||
my $c_type = $typeinfo->{$type}->[1];
|
||||
|
||||
if ($first_param_name eq '') {
|
||||
$first_param_name = $fields[$field];
|
||||
}
|
||||
|
||||
if ($typeinfo->{$type}->[2]) {
|
||||
$need_temp_storage = 1;
|
||||
}
|
||||
|
||||
if ($param_decl eq '') {
|
||||
$param_decl = ",\n " . $space . ' ';
|
||||
}
|
||||
else {
|
||||
$param_decl = $param_decl . ', ';
|
||||
}
|
||||
$param_decl = $param_decl . $c_type . ' ' . $fields[$field];
|
||||
$call_param = $call_param . ', ' . $fields[$field];
|
||||
}
|
||||
}
|
||||
|
||||
if ($line_fields[3] eq '') {
|
||||
$total_code = sprintf
|
||||
("\treturn glibtop_get_%s_s (server%s);\n", $feature, $call_param);
|
||||
} elsif ($line_fields[3] eq 'array') {
|
||||
$total_code = sprintf
|
||||
("\treturn glibtop_get_%s_s (server, array%s);\n", $feature, $call_param);
|
||||
} elsif ($line_fields[3] =~ /^array/) {
|
||||
$total_code = sprintf
|
||||
("\treturn glibtop_get_%s_s (server, array, buf%s);\n", $feature, $call_param);
|
||||
} else {
|
||||
$total_code = sprintf
|
||||
("\treturn glibtop_get_%s_s (server, buf%s);\n", $feature, $call_param);
|
||||
}
|
||||
|
||||
$func_decl = 'static '.$retval."\n";
|
||||
if ($line_fields[3] eq '') {
|
||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure%s)\n",
|
||||
$feature, $param_decl);
|
||||
} elsif ($line_fields[3] eq 'array') {
|
||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure, glibtop_array *array%s)\n",
|
||||
$feature, $param_decl);
|
||||
} elsif ($line_fields[3] =~ /^array/) {
|
||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure, glibtop_array *array, %s *buf%s)\n",
|
||||
$feature, 'glibtop_'.$feature, $param_decl);
|
||||
} else {
|
||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure, %s *buf%s)\n",
|
||||
$feature, 'glibtop_'.$feature, $param_decl);
|
||||
}
|
||||
|
||||
$total_code = sprintf ("%s{\n%s\n%s}\n", $func_decl, $total_code);
|
||||
|
||||
$total_code = sprintf ("#if (!GLIBTOP_SUID_%s)\n\n%s\n#endif /* not GLIBTOP_SUID_%s */\n\n",
|
||||
&toupper($feature), $total_code,
|
||||
&toupper($feature));
|
||||
|
||||
print $total_code;
|
||||
}
|
||||
|
||||
$init_hook_code = '';
|
||||
$call_vector_code = '';
|
||||
for ($nr = 1; $nr <= $feature_count; $nr++) {
|
||||
$feature = $features{$nr};
|
||||
|
||||
if ($feature =~ /^@/) {
|
||||
$call_vector_code .= sprintf (qq[\tNULL,\n]);
|
||||
} else {
|
||||
$call_vector_code .= sprintf
|
||||
(qq[\#if GLIBTOP_SUID_%s\n\tNULL,\n\#else\n\t_glibtop_get_%s_c,\n\#endif\n],
|
||||
&toupper($feature), $feature);
|
||||
}
|
||||
|
||||
if (!($feature =~ /^@/)) {
|
||||
$init_hook_code .= sprintf
|
||||
(qq[\#if !GLIBTOP_SUID_%s\n\tglibtop_init_%s_s,\n\#endif\n],
|
||||
&toupper($feature), $feature);
|
||||
}
|
||||
}
|
||||
$init_hook_code .= sprintf (qq[\tNULL\n]);
|
||||
|
||||
chop $init_hook_code;
|
||||
chop $call_vector_code;
|
||||
|
||||
print 'glibtop_call_vector glibtop_backend_sysdeps_call_vector = {';
|
||||
print $call_vector_code;
|
||||
print '};';
|
||||
print '';
|
||||
|
||||
print 'glibtop_init_func_t _glibtop_init_hook_s [] = {';
|
||||
print $init_hook_code;
|
||||
print '};';
|
||||
print '';
|
||||
|
10
configure.in
10
configure.in
@@ -8,11 +8,11 @@ AC_CANONICAL_SYSTEM
|
||||
|
||||
LIBGTOP_MAJOR_VERSION=2
|
||||
LIBGTOP_MINOR_VERSION=0
|
||||
LIBGTOP_MICRO_VERSION=3
|
||||
LIBGTOP_MICRO_VERSION=5
|
||||
LIBGTOP_VERSION=$LIBGTOP_MAJOR_VERSION.$LIBGTOP_MINOR_VERSION.$LIBGTOP_MICRO_VERSION
|
||||
AM_INIT_AUTOMAKE(libgtop, $LIBGTOP_VERSION)
|
||||
LIBGTOP_INTERFACE_AGE=3
|
||||
LIBGTOP_BINARY_AGE=3
|
||||
LIBGTOP_INTERFACE_AGE=5
|
||||
LIBGTOP_BINARY_AGE=5
|
||||
|
||||
# you can set this to `-snap' for instance to create
|
||||
# a `libgtop-1.x.y-snap.tar.gz' tarball.
|
||||
@@ -285,8 +285,7 @@ AC_TYPE_SIGNAL
|
||||
AC_FUNC_STRFTIME
|
||||
AC_CHECK_FUNCS(getcwd gettimeofday getwd putenv strdup strtoul uname)
|
||||
|
||||
dnl ## 'es_ES' is only needed for format numbers different of 'es'
|
||||
ALL_LINGUAS="am ar az be bg ca cs cy da de el es es_ES et fa fi fr ga gl he hu id it ja ko lv mk ml mn ms nl nn no pl pt pt_BR ro ru sk sl sr sr@Latn sv tr uk vi zh_CN zh_TW"
|
||||
ALL_LINGUAS="am ar az be bg bn ca cs cy da de el es et fa fi fr ga gl he hi hu id it ja ko lv mk ml mn ms nl nn no pl pt pt_BR ro ru sk sl sq sr sr@Latn sv ta tr uk vi zh_CN zh_TW"
|
||||
|
||||
GETTEXT_PACKAGE=libgtop-2.0
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
@@ -480,5 +479,6 @@ lib/Makefile
|
||||
examples/Makefile
|
||||
doc/Makefile
|
||||
support/Makefile
|
||||
support/gnome-support-2.0.pc
|
||||
libgtop-2.0.pc
|
||||
])
|
||||
|
5
debian/libgtop2.README.Debian
vendored
Normal file
5
debian/libgtop2.README.Debian
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
The Debian package of libgtop, a GNOME library.
|
||||
|
||||
--
|
||||
Ian Lynagh <ian@lynagh.demon.co.uk>
|
12
debian/libgtop2.copyright
vendored
Normal file
12
debian/libgtop2.copyright
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
libgtop is released under the GPL.
|
||||
On Debian GNU/Linux systems, the complete text of the GNU General
|
||||
Public License can be found in /usr/share/common-licenses/GPL
|
||||
|
||||
Original authors: Martin Baulig <martin@home-of-linux.org>
|
||||
Drazen Kacar <dave@srce.hr>
|
||||
|
||||
Originally Debianised by Jim Pick <jim@jimpick.com>
|
||||
Then re-Debianised in October 1998 by Martin Schulze
|
||||
<joey@finlandia.infodrom.north.de> before being taken over by Ian Lynagh
|
||||
<ian@lynagh.demon.co.uk> in November 1998.
|
7
debian/libgtop2.docs
vendored
Normal file
7
debian/libgtop2.docs
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
RELNOTES-0.25
|
||||
RELNOTES-1.0
|
||||
RELNOTES-1.1.x
|
||||
NEWS
|
||||
AUTHORS
|
||||
TODO
|
||||
debian/changelog
|
2
debian/libgtop2.files.in
vendored
Normal file
2
debian/libgtop2.files.in
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
@PREFIX@/lib/libgtop*-1.1.so.*.*
|
||||
@PREFIX@/lib/libgtop*-1.1.so.*
|
107
doc/internals.texi
Normal file
107
doc/internals.texi
Normal file
@@ -0,0 +1,107 @@
|
||||
@node LibGTop Internals, , Reference Manual, Top
|
||||
@chapter LibGTop Internals
|
||||
|
||||
@menu
|
||||
* General Internals:: General Internals
|
||||
* Sysdeps Internals:: Sysdeps Internals
|
||||
@end menu
|
||||
|
||||
@node General Internals, Sysdeps Internals, LibGTop Internals, LibGTop Internals
|
||||
@section General Internals
|
||||
|
||||
@menu
|
||||
* glibtop:: The server structure
|
||||
@end menu
|
||||
|
||||
@node glibtop, , General Internals, General Internals
|
||||
@subsection The server structure - @code{glibtop}
|
||||
|
||||
@example
|
||||
@cartouche
|
||||
typedef struct _glibtop glibtop;
|
||||
|
||||
struct _glibtop
|
||||
@{
|
||||
unsigned flags;
|
||||
unsigned method;
|
||||
unsigned error_method;
|
||||
#ifdef HAVE_GLIBTOP_MACHINE_H
|
||||
glibtop_machine machine;
|
||||
#endif
|
||||
int input [2];
|
||||
int output [2];
|
||||
int socket;
|
||||
int ncpu;
|
||||
unsigned long os_version_code;
|
||||
const char *name;
|
||||
const char *server_command;
|
||||
const char *server_host;
|
||||
const char *server_user;
|
||||
const char *server_rsh;
|
||||
unsigned long features;
|
||||
unsigned long server_port;
|
||||
glibtop_sysdeps sysdeps;
|
||||
glibtop_sysdeps required;
|
||||
glibtop_sysdeps wanted;
|
||||
pid_t pid;
|
||||
@};
|
||||
@end cartouche
|
||||
@end example
|
||||
|
||||
@node Sysdeps Internals, , General Internals, LibGTop Internals
|
||||
@section Sysdeps Internals
|
||||
|
||||
@menu
|
||||
* glibtop_open_s:: Non-privileged initializations
|
||||
* glibtop_close_s:: Non-privileged cleanups
|
||||
@end menu
|
||||
|
||||
@node glibtop_open_s, glibtop_close_s, Sysdeps Internals, Sysdeps Internals
|
||||
@subsection glibtop_open_s
|
||||
|
||||
This function is used in the non-suid sysdeps library @samp{-lgtop_sysdeps} to
|
||||
initialize a server. It should do all initializations that do not need any
|
||||
privileges.
|
||||
|
||||
@example
|
||||
@cartouche
|
||||
void
|
||||
glibtop_open_s (glibtop *server, const char *program_name,
|
||||
const unsigned long features,
|
||||
const unsigned flags);
|
||||
@end cartouche
|
||||
@end example
|
||||
|
||||
@table @code
|
||||
@item server
|
||||
Pointer to the @code{glibtop} server structure.
|
||||
@item program_name
|
||||
Name of the calling program; the implementation will usually
|
||||
set @samp{server->name} to this so it'll be used as the program
|
||||
name in error messages.
|
||||
@end table
|
||||
|
||||
Typically, this function will set @code{server->name}, @code{server->ncpu} and
|
||||
@code{server->os_version_code} and initialize any of the @code{server->machine}
|
||||
fields which do not need any privileges.
|
||||
|
||||
It is normally implemented in @file{open.c} in the sysdeps directory.
|
||||
|
||||
@node glibtop_close_s, , glibtop_open_s, Sysdeps Internals
|
||||
@subsection glibtop_close_s
|
||||
|
||||
This function is used in the non-suid sysdeps library @samp{-lgtop_sysdeps} to
|
||||
clean-up a server when it's no longer used.
|
||||
|
||||
It must free all resources that were allocated in @code{glibtop_open_s}.
|
||||
|
||||
@example
|
||||
@cartouche
|
||||
void
|
||||
glibtop_close_s (glibtop *server);
|
||||
@end cartouche
|
||||
@end example
|
||||
|
||||
It is normally implemented in @file{close.c} in the sysdeps directory, but may
|
||||
be empty.
|
||||
|
2
dtd/.cvsignore
Normal file
2
dtd/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
Makefile.in
|
||||
Makefile
|
9
dtd/Makefile.am
Normal file
9
dtd/Makefile.am
Normal file
@@ -0,0 +1,9 @@
|
||||
backenddir = @LIBGTOP_BACKEND_DIR@
|
||||
|
||||
backend_DATA = \
|
||||
libgtop-backends.dtd \
|
||||
libgtop-backend-info.dtd
|
||||
|
||||
EXTRA_DIST = |
|
||||
$(backend_DATA)
|
||||
|
23
dtd/libgtop-backend-info.dtd
Normal file
23
dtd/libgtop-backend-info.dtd
Normal file
@@ -0,0 +1,23 @@
|
||||
<!ELEMENT BackendInfo (name,description?,comments?,authors,legalnotice)>
|
||||
<!ELEMENT name (short_name,long_name?)>
|
||||
<!ELEMENT short_name (#PCDATA)>
|
||||
<!ELEMENT long_name (#PCDATA)>
|
||||
|
||||
<!ELEMENT description (#PCDATA)>
|
||||
|
||||
<!ELEMENT authors (author)+>
|
||||
<!ELEMENT author (author_name,author_email?)>
|
||||
<!ELEMENT author_name (#PCDATA)>
|
||||
<!ELEMENT author_email (#PCDATA)>
|
||||
|
||||
<!ELEMENT legalnotice (license,copyright?)>
|
||||
<!ELEMENT license (#PCDATA)>
|
||||
|
||||
<!ELEMENT copyright (holder)+>
|
||||
<!ELEMENT holder (holder_year?,holder_name,holder_email?)>
|
||||
<!ELEMENT holder_year (#PCDATA)>
|
||||
<!ELEMENT holder_name (#PCDATA)>
|
||||
<!ELEMENT holder_email (#PCDATA)>
|
||||
|
||||
<!ELEMENT comments (comment)+>
|
||||
<!ELEMENT comment (#PCDATA)>
|
11
dtd/libgtop-backends.dtd
Normal file
11
dtd/libgtop-backends.dtd
Normal file
@@ -0,0 +1,11 @@
|
||||
<!ELEMENT Backends (Backend)+>
|
||||
|
||||
<!ELEMENT Backend (Name,Location)>
|
||||
<!ELEMENT Name (#PCDATA)>
|
||||
|
||||
<!ELEMENT Location (LibtoolName?,ShlibName,ExtraLibs?)>
|
||||
<!ELEMENT LibtoolName (#PCDATA)>
|
||||
<!ELEMENT ShlibName (#PCDATA)>
|
||||
|
||||
<!ELEMENT ExtraLibs (ExtraLib)+>
|
||||
<!ELEMENT ExtraLib (LibtoolName?,ShlibName)>
|
50
include/glibtop/array.h
Normal file
50
include/glibtop/array.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_ARRAY_H__
|
||||
#define __GLIBTOP_ARRAY_H__
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/global.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GLIBTOP_ARRAY_NUMBER 0
|
||||
#define GLIBTOP_ARRAY_SIZE 1
|
||||
#define GLIBTOP_ARRAY_TOTAL 2
|
||||
|
||||
#define GLIBTOP_MAX_ARRAY 3
|
||||
|
||||
typedef struct _glibtop_array glibtop_array;
|
||||
|
||||
struct _glibtop_array
|
||||
{
|
||||
u_int64_t flags,
|
||||
number, /* GLIBTOP_ARRAY_NUMBER */
|
||||
size, /* GLIBTOP_ARRAY_SIZE */
|
||||
total; /* GLIBTOP_ARRAY_TOTAL */
|
||||
};
|
||||
|
||||
#endif
|
43
include/glibtop/call-vector.h.in
Normal file
43
include/glibtop/call-vector.h.in
Normal file
@@ -0,0 +1,43 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
@@AUTOGEN_COMMENT@@
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_CALL_VECTOR_H__
|
||||
#define __GLIBTOP_CALL_VECTOR_H__
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/union.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
struct _glibtop_call_vector
|
||||
{
|
||||
@@GLIBTOP_CALL_VECTOR@@
|
||||
};
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
116
include/glibtop/call-vector.pl
Normal file
116
include/glibtop/call-vector.pl
Normal file
@@ -0,0 +1,116 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
require 'c_types.pl';
|
||||
|
||||
die "Usage: $0 features.def call-vector.h.in" unless $#ARGV == 1;
|
||||
|
||||
$[ = 1; # set array base to 1
|
||||
$, = ' '; # set output field separator
|
||||
$\ = "\n"; # set output record separator
|
||||
|
||||
sub toupper {
|
||||
local($_) = @_;
|
||||
tr/a-z/A-Z/;
|
||||
return $_;
|
||||
}
|
||||
|
||||
sub tolower {
|
||||
local($_) = @_;
|
||||
tr/A-Z/a-z/;
|
||||
return $_;
|
||||
}
|
||||
|
||||
$func_decl_code = '';
|
||||
|
||||
open FEATURESDEF, $ARGV[1] or
|
||||
die "open ($ARGV[1]): $!";
|
||||
|
||||
while (<FEATURESDEF>) {
|
||||
chop; # strip record separator
|
||||
|
||||
if (/^[^\#]/) {
|
||||
&parse_features_def ($_);
|
||||
}
|
||||
}
|
||||
|
||||
close FEATURESDEF;
|
||||
|
||||
sub parse_features_def {
|
||||
local($line) = @_;
|
||||
@line_fields = split(/\|/, $line, 9999);
|
||||
$retval = $line_fields[1];
|
||||
$element_def = $line_fields[3];
|
||||
$feature = $line_fields[2];
|
||||
$param_def = $line_fields[4];
|
||||
|
||||
$orig = $feature;
|
||||
$feature =~ s/^@//;
|
||||
$space = $feature;
|
||||
$space =~ s/./ /g;
|
||||
|
||||
if ($retval eq 'retval') {
|
||||
$retval_param = '&retval';
|
||||
$retval = 'int';
|
||||
}
|
||||
elsif ($retval !~ /^void$/) {
|
||||
$retval_param = 'NULL';
|
||||
}
|
||||
else {
|
||||
$retval_param = 'NULL';
|
||||
}
|
||||
|
||||
if ($retval =~ /^(array|pointer)\((.*)\)$/) {
|
||||
$retval = ($2 eq 'string') ? 'char **' : "$2 *";
|
||||
}
|
||||
|
||||
$param_decl = '';
|
||||
$nr_params = (@params = split(/:/, $param_def, 9999));
|
||||
for ($param = 1; $param <= $nr_params; $param++) {
|
||||
$list = $params[$param];
|
||||
$type = $params[$param];
|
||||
$type =~ s/\(.*//;
|
||||
$list =~ s/^.*\(//;
|
||||
$list =~ s/\)$//;
|
||||
$count = (@fields = split(/,/, $list, 9999));
|
||||
for ($field = 1; $field <= $count; $field++) {
|
||||
my $c_type = $typeinfo->{$type}->[1];
|
||||
|
||||
$param_decl = $param_decl . ', ';
|
||||
$param_decl = $param_decl . $c_type;
|
||||
}
|
||||
}
|
||||
|
||||
if ($line_fields[3] eq '') {
|
||||
$func_decl_code .= sprintf
|
||||
(qq[\t%s (*%s) (glibtop_server *, glibtop_closure *%s);\n], $retval, $feature, $param_decl);
|
||||
} elsif ($line_fields[3] eq 'array') {
|
||||
$func_decl_code .= sprintf
|
||||
(qq[\t%s (*%s) (glibtop_server *, glibtop_closure *, glibtop_array *%s);\n], $retval, $feature, $param_decl);
|
||||
} elsif ($line_fields[3] =~ /^array/) {
|
||||
$func_decl_code .= sprintf
|
||||
(qq[\t%s (*%s) (glibtop_server *, glibtop_closure *, glibtop_array *, %s *%s);\n], $retval, $feature, 'glibtop_'.$feature, $param_decl);
|
||||
} else {
|
||||
$func_decl_code .= sprintf
|
||||
(qq[\t%s (*%s) (glibtop_server *, glibtop_closure *, %s *%s);\n], $retval, $feature, 'glibtop_'.$feature, $param_decl);
|
||||
}
|
||||
}
|
||||
|
||||
chop $func_decl_code;
|
||||
|
||||
$auto_gen_comment = sprintf
|
||||
(qq[/*\n * This file is automatically generated.\n * Please modify `call-vector.pl' and `call-vector.h.in'.\n */]);
|
||||
|
||||
open CALLVECTOR, $ARGV[2] or
|
||||
die "open ($ARGV[2]): $!";
|
||||
|
||||
while (<CALLVECTOR>) {
|
||||
chop;
|
||||
|
||||
s/^\s*\@\@GLIBTOP_CALL_VECTOR\@\@\s*$/$func_decl_code/;
|
||||
|
||||
s/^\s*\@\@AUTOGEN_COMMENT\@\@\s*$/$auto_gen_comment/;
|
||||
} continue {
|
||||
print $_;
|
||||
}
|
||||
|
||||
close CALLVECTOR;
|
91
include/glibtop/compat_10.h
Normal file
91
include/glibtop/compat_10.h
Normal file
@@ -0,0 +1,91 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_COMPAT10_H__
|
||||
#define __GLIBTOP_COMPAT10_H__
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/global.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* glibtop_cpu */
|
||||
|
||||
#define GLIBTOP_XCPU_TOTAL GLIBTOP_CPU_XCPU_TOTAL
|
||||
#define GLIBTOP_XCPU_USER GLIBTOP_CPU_XCPU_USER
|
||||
#define GLIBTOP_XCPU_NICE GLIBTOP_CPU_XCPU_NICE
|
||||
#define GLIBTOP_XCPU_SYS GLIBTOP_CPU_XCPU_SYS
|
||||
#define GLIBTOP_XCPU_IDLE GLIBTOP_CPU_XCPU_IDLE
|
||||
#define GLIBTOP_XCPU_FLAGS GLIBTOP_CPU_XCPU_FLAGS
|
||||
|
||||
/* glibtop_proclist */
|
||||
|
||||
#define GLIBTOP_PROCLIST_NUMBER GLIBTOP_ARRAY_NUMBER
|
||||
#define GLIBTOP_PROCLIST_SIZE GLIBTOP_ARRAY_SIZE
|
||||
#define GLIBTOP_PROCLIST_TOTAL GLIBTOP_ARRAY_TOTAL
|
||||
|
||||
#define GLIBTOP_MAX_PROCLIST GLIBTOP_MAX_ARRAY
|
||||
|
||||
typedef struct _glibtop_array glibtop_proclist;
|
||||
|
||||
/* glibtop_mountlist */
|
||||
|
||||
#define GLIBTOP_MOUNTLIST_NUMBER GLIBTOP_ARRAY_NUMBER
|
||||
#define GLIBTOP_MOUNTLIST_SIZE GLIBTOP_ARRAY_SIZE
|
||||
#define GLIBTOP_MOUNTLIST_TOTAL GLIBTOP_ARRAY_TOTAL
|
||||
|
||||
#define GLIBTOP_MAX_MOUNTLIST GLIBTOP_MAX_ARRAY
|
||||
|
||||
typedef struct _glibtop_array glibtop_mountlist;
|
||||
|
||||
/* glibtop_proc_args */
|
||||
|
||||
#define GLIBTOP_PROC_ARGS_SIZE 0
|
||||
|
||||
#define GLIBTOP_MAX_PROC_ARGS 1
|
||||
|
||||
typedef struct _glibtop_array glibtop_proc_args;
|
||||
|
||||
/* glibtop_proc_map */
|
||||
|
||||
#define GLIBTOP_PROC_MAP_NUMBER GLIBTOP_ARRAY_NUMBER
|
||||
#define GLIBTOP_PROC_MAP_SIZE GLIBTOP_ARRAY_SIZE
|
||||
#define GLIBTOP_PROC_MAP_TOTAL GLIBTOP_ARRAY_TOTAL
|
||||
|
||||
#define GLIBTOP_MAX_PROC_MAP GLIBTOP_MAX_ARRAY
|
||||
|
||||
typedef struct _glibtop_array glibtop_proc_map;
|
||||
|
||||
/* glibtop_interface_names */
|
||||
|
||||
#define GLIBTOP_INTERFACE_NAMES_NUMBER GLIBTOP_ARRAY_NUMBER
|
||||
#define GLIBTOP_INTERFACE_NAMES_SIZE GLIBTOP_ARRAY_SIZE
|
||||
#define GLIBTOP_INTERFACE_NAMES_TOTAL GLIBTOP_ARRAY_TOTAL
|
||||
|
||||
#define GLIBTOP_MAX_INTERFACE_NAMES GLIBTOP_MAX_ARRAY
|
||||
|
||||
typedef struct _glibtop_array glibtop_interface_names;
|
||||
|
||||
#endif
|
95
include/glibtop/errors.h
Normal file
95
include/glibtop/errors.h
Normal file
@@ -0,0 +1,95 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_ERRORS_H__
|
||||
#define __GLIBTOP_ERRORS_H__
|
||||
|
||||
#include <glibtop.h>
|
||||
|
||||
#include <glib/gerror.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GLIBTOP_ERROR glibtop_error_quark ()
|
||||
|
||||
GQuark glibtop_error_quark (void) G_GNUC_CONST;
|
||||
|
||||
typedef enum {
|
||||
GLIBTOP_ERROR_NO_ERROR = 0,
|
||||
GLIBTOP_ERROR_UNKNOWN,
|
||||
GLIBTOP_ERROR_INVALID_ARGUMENT,
|
||||
GLIBTOP_ERROR_NO_SUCH_PARAMETER,
|
||||
GLIBTOP_ERROR_READONLY_VALUE,
|
||||
GLIBTOP_ERROR_SIZE_MISMATCH,
|
||||
|
||||
GLIBTOP_ERROR_SERVER_COMM_FAILURE,
|
||||
|
||||
GLIBTOP_ERROR_NO_SUCH_PROCESS,
|
||||
|
||||
GLIBTOP_ERROR_NO_KERNEL_SUPPORT,
|
||||
GLIBTOP_ERROR_INCOMPATIBLE_KERNEL,
|
||||
|
||||
GLIBTOP_ERROR_NO_SUCH_BACKEND,
|
||||
GLIBTOP_ERROR_NOT_IMPLEMENTED,
|
||||
GLIBTOP_ERROR_NO_BACKEND_OPENED,
|
||||
|
||||
GLIBTOP_ERROR_DEMARSHAL_ERROR
|
||||
} glibtop_error;
|
||||
|
||||
void
|
||||
glibtop_error_vl (glibtop_client *client, glibtop_error code,
|
||||
const char *format, va_list args);
|
||||
|
||||
void
|
||||
glibtop_error_io_vl (glibtop_client *client, glibtop_error code,
|
||||
int io_errno, const char *format, va_list args);
|
||||
|
||||
void
|
||||
glibtop_warn_vl (glibtop_client *client, glibtop_error code,
|
||||
const char *format, va_list args);
|
||||
|
||||
void
|
||||
glibtop_warn_io_vl (glibtop_client *client, glibtop_error code,
|
||||
int io_errno, const char *format, va_list args);
|
||||
|
||||
void
|
||||
glibtop_error_l (glibtop_client *client, glibtop_error code,
|
||||
char *format, ...);
|
||||
|
||||
void
|
||||
glibtop_warn_l (glibtop_client *client, glibtop_error code,
|
||||
char *format, ...);
|
||||
|
||||
void
|
||||
glibtop_error_io_l (glibtop_client *client, glibtop_error code,
|
||||
char *format, ...);
|
||||
|
||||
void
|
||||
glibtop_warn_io_l (glibtop_client *client, glibtop_error code,
|
||||
char *format, ...);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
50
include/glibtop/glib-arrays.h
Normal file
50
include/glibtop/glib-arrays.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_GLIB_ARRAYS_H__
|
||||
#define __GLIBTOP_GLIB_ARRAYS_H__
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/array.h>
|
||||
#include <glibtop/global.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
GPtrArray *
|
||||
glibtop_get_proc_args_as_array_l (glibtop_client *client, pid_t pid);
|
||||
|
||||
GArray *
|
||||
glibtop_get_proclist_as_array_l (glibtop_client *client, int64_t which, int64_t arg);
|
||||
|
||||
GPtrArray *
|
||||
glibtop_get_proc_map_as_array_l (glibtop_client *client, pid_t pid);
|
||||
|
||||
GPtrArray *
|
||||
glibtop_get_mountlist_as_array_l (glibtop_client *client, int all_fs);
|
||||
|
||||
G_END_DECLS
|
||||
#endif
|
102
include/glibtop/glibtop-backend-info.h
Normal file
102
include/glibtop/glibtop-backend-info.h
Normal file
@@ -0,0 +1,102 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_BACKEND_INFO_H__
|
||||
#define __GLIBTOP_BACKEND_INFO_H__
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/global.h>
|
||||
|
||||
#include <glibtop/glibtop-server.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _glibtop_backend_info glibtop_backend_info;
|
||||
typedef struct _glibtop_backend_entry glibtop_backend_entry;
|
||||
typedef struct _glibtop_backend_module glibtop_backend_module;
|
||||
|
||||
typedef struct _glibtop_call_vector glibtop_call_vector;
|
||||
|
||||
typedef int (*glibtop_backend_open_func_t) (glibtop_server *, glibtop_backend *,
|
||||
u_int64_t, const char **);
|
||||
typedef int (*glibtop_backend_close_func_t) (glibtop_server *, glibtop_backend *,
|
||||
glibtop_closure *);
|
||||
|
||||
struct _glibtop_backend_info
|
||||
{
|
||||
const char *name;
|
||||
glibtop_backend_open_func_t open;
|
||||
glibtop_backend_close_func_t close;
|
||||
glibtop_call_vector *call_vector;
|
||||
};
|
||||
|
||||
#ifdef _IN_LIBGTOP
|
||||
|
||||
#include <gmodule.h>
|
||||
|
||||
/* private structure */
|
||||
struct _glibtop_backend_module
|
||||
{
|
||||
int refcount;
|
||||
GModule *module;
|
||||
GSList *extra_modules;
|
||||
};
|
||||
|
||||
struct _glibtop_backend_entry
|
||||
{
|
||||
char *name;
|
||||
char *libtool_name;
|
||||
char *shlib_name;
|
||||
|
||||
GSList *extra_libs;
|
||||
|
||||
/* This is const since you must not attempt to
|
||||
* write into gmodule loaded memory. */
|
||||
const glibtop_backend_info *info;
|
||||
|
||||
/* private pointer */
|
||||
glibtop_backend_module *_priv;
|
||||
};
|
||||
|
||||
#endif /* _IN_LIBGTOP */
|
||||
|
||||
long
|
||||
glibtop_register_backend (glibtop_backend_entry *entry);
|
||||
|
||||
void
|
||||
glibtop_unregister_backend (long id);
|
||||
|
||||
glibtop_backend_entry *
|
||||
glibtop_backend_by_id (long id);
|
||||
|
||||
glibtop_backend_entry *
|
||||
glibtop_backend_by_name (const char *backend_name);
|
||||
|
||||
void
|
||||
glibtop_init_backends (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
85
include/glibtop/glibtop-backend.h
Normal file
85
include/glibtop/glibtop-backend.h
Normal file
@@ -0,0 +1,85 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 2.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_BACKEND_H__
|
||||
#define __GLIBTOP_BACKEND_H__
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GLIBTOP_TYPE_BACKEND (glibtop_backend_get_type ())
|
||||
#define GLIBTOP_BACKEND(backend) (G_TYPE_CHECK_INSTANCE_CAST ((backend), GLIBTOP_TYPE_BACKEND, glibtop_backend))
|
||||
#define GLIBTOP_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLIBTOP_TYPE_BACKEND, glibtop_backend_class))
|
||||
#define GLIBTOP_IS_BACKEND(backend) (G_TYPE_CHECK_INSTANCE_TYPE ((backend), GLIBTOP_TYPE_BACKEND))
|
||||
#define GLIBTOP_IS_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLIBTOP_TYPE_BACKEND))
|
||||
#define GLIBTOP_BACKEND_GET_CLASS(backend)(G_TYPE_INSTANCE_GET_CLASS ((backend), GLIBTOP_TYPE_BACKEND, glibtop_backend_class))
|
||||
|
||||
#define GLIBTOP_BACKEND_TYPE(backend) (G_TYPE_FROM_INSTANCE (backend))
|
||||
#define GLIBTOP_BACKEND_TYPE_NAME(backend)(g_type_name (GLIBTOP_BACKEND_TYPE (backend)))
|
||||
|
||||
/* --- typedefs & structures --- */
|
||||
typedef struct _glibtop_backend glibtop_backend;
|
||||
typedef struct _glibtop_backend_class glibtop_backend_class;
|
||||
typedef struct _glibtop_backend_private glibtop_backend_private;
|
||||
|
||||
#include <glibtop/glibtop-backend-info.h>
|
||||
|
||||
struct _glibtop_backend
|
||||
{
|
||||
GObject object;
|
||||
|
||||
/* <private> */
|
||||
glibtop_backend_private *_priv;
|
||||
};
|
||||
|
||||
struct _glibtop_backend_class
|
||||
{
|
||||
GObjectClass parent_class;;
|
||||
};
|
||||
|
||||
GType
|
||||
glibtop_backend_get_type (void);
|
||||
|
||||
glibtop_backend *
|
||||
glibtop_backend_get (const char *backend_name, u_int64_t features,
|
||||
const char **backend_args, GError **error);
|
||||
|
||||
void
|
||||
glibtop_backend_set_closure_data (glibtop_backend *backend, glibtop_closure *closure);
|
||||
|
||||
glibtop_closure *
|
||||
glibtop_backend_get_closure_data (glibtop_backend *backend);
|
||||
|
||||
glibtop_call_vector *
|
||||
glibtop_backend_get_call_vector (glibtop_backend *backend);
|
||||
|
||||
glibtop_server *
|
||||
glibtop_backend_get_server (glibtop_backend *backend);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
97
include/glibtop/glibtop-client.h
Normal file
97
include/glibtop/glibtop-client.h
Normal file
@@ -0,0 +1,97 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 2.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_CLIENT_H__
|
||||
#define __GLIBTOP_CLIENT_H__
|
||||
|
||||
#include <glibtop.h>
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#include <glibtop/glibtop-backend.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GLIBTOP_TYPE_CLIENT (glibtop_client_get_type ())
|
||||
#define GLIBTOP_CLIENT(client) (G_TYPE_CHECK_INSTANCE_CAST ((client), GLIBTOP_TYPE_CLIENT, glibtop_client))
|
||||
#define GLIBTOP_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLIBTOP_TYPE_CLIENT, glibtop_client_class))
|
||||
#define GLIBTOP_IS_CLIENT(client) (G_TYPE_CHECK_INSTANCE_TYPE ((client), GLIBTOP_TYPE_CLIENT))
|
||||
#define GLIBTOP_IS_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLIBTOP_TYPE_CLIENT))
|
||||
#define GLIBTOP_CLIENT_GET_CLASS(client)(G_TYPE_INSTANCE_GET_CLASS ((client), GLIBTOP_TYPE_CLIENT, glibtop_client_class))
|
||||
|
||||
#define GLIBTOP_CLIENT_TYPE(client) (G_TYPE_FROM_INSTANCE (client))
|
||||
#define GLIBTOP_CLIENT_TYPE_NAME(client)(g_type_name (GLIBTOP_CLIENT_TYPE (client)))
|
||||
|
||||
/* --- typedefs & structures --- */
|
||||
typedef struct _glibtop_client glibtop_client;
|
||||
typedef struct _glibtop_client_class glibtop_client_class;
|
||||
typedef struct _glibtop_client_private glibtop_client_private;
|
||||
|
||||
struct _glibtop_client
|
||||
{
|
||||
GObject object;
|
||||
|
||||
/* <public> */
|
||||
GError *error;
|
||||
|
||||
/* <private> */
|
||||
glibtop_client_private *_priv;
|
||||
};
|
||||
|
||||
struct _glibtop_client_class
|
||||
{
|
||||
GObjectClass parent_class;;
|
||||
|
||||
void (*error) (glibtop_client *client, GError *error);
|
||||
void (*warning) (glibtop_client *client, GError *error);
|
||||
};
|
||||
|
||||
GType
|
||||
glibtop_client_get_type (void);
|
||||
|
||||
glibtop_client *
|
||||
glibtop_client_new (void);
|
||||
|
||||
void
|
||||
glibtop_client_propagate_error (glibtop_client *client, GError *error);
|
||||
|
||||
void
|
||||
glibtop_client_propagate_warning (glibtop_client *client, GError *error);
|
||||
|
||||
void
|
||||
glibtop_client_open_backend (glibtop_client *client, const char *backend_name,
|
||||
u_int64_t features, const char **backend_args);
|
||||
|
||||
void
|
||||
glibtop_client_add_backend (glibtop_client *client,
|
||||
glibtop_backend *backend);
|
||||
|
||||
void
|
||||
glibtop_client_remove_backend (glibtop_client *client,
|
||||
glibtop_backend *backend);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
75
include/glibtop/glibtop-server.h
Normal file
75
include/glibtop/glibtop-server.h
Normal file
@@ -0,0 +1,75 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 2.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_SERVER_H__
|
||||
#define __GLIBTOP_SERVER_H__
|
||||
|
||||
#include <glibtop/global.h>
|
||||
#include <glibtop/sysdeps.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _glibtop_server glibtop_server;
|
||||
typedef struct _glibtop_server_info glibtop_server_info;
|
||||
|
||||
typedef struct _glibtop_closure glibtop_closure;
|
||||
|
||||
typedef int (*glibtop_init_func_t) (glibtop_server *, glibtop_closure *);
|
||||
|
||||
extern glibtop_init_func_t _glibtop_init_hook_s [];
|
||||
extern glibtop_init_func_t _glibtop_init_hook_p [];
|
||||
|
||||
struct _glibtop_server_info
|
||||
{
|
||||
int ncpu; /* Number of CPUs, zero if single-processor */
|
||||
unsigned long features; /* Server is required for this features */
|
||||
glibtop_sysdeps sysdeps; /* Detailed feature list */
|
||||
glibtop_sysdeps required; /* Required feature list */
|
||||
glibtop_sysdeps wanted; /* We only want this features */
|
||||
};
|
||||
|
||||
struct _glibtop_server
|
||||
{
|
||||
glibtop_server_info *info;
|
||||
|
||||
int refcount;
|
||||
unsigned flags;
|
||||
const char *name;
|
||||
|
||||
void *_priv;
|
||||
};
|
||||
|
||||
glibtop_server *
|
||||
glibtop_server_new (void);
|
||||
|
||||
void
|
||||
glibtop_server_ref (glibtop_server *server);
|
||||
|
||||
void
|
||||
glibtop_server_unref (glibtop_server *server);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
203
include/glibtop/interfaces.h
Normal file
203
include/glibtop/interfaces.h
Normal file
@@ -0,0 +1,203 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_INTERFACES_H__
|
||||
#define __GLIBTOP_INTERFACES_H__
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/global.h>
|
||||
|
||||
#include <glibtop/compat_10.h>
|
||||
#include <glibtop/array.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GLIBTOP_INTERFACE_IF_FLAGS 0
|
||||
#define GLIBTOP_INTERFACE_TRANSPORT 1
|
||||
#define GLIBTOP_INTERFACE_TYPE 2
|
||||
#define GLIBTOP_INTERFACE_NUMBER 3
|
||||
#define GLIBTOP_INTERFACE_INSTANCE 4
|
||||
#define GLIBTOP_INTERFACE_NUM_LOGICAL 5
|
||||
#define GLIBTOP_INTERFACE_NAME 6
|
||||
|
||||
#define GLIBTOP_MAX_INTERFACE 7
|
||||
|
||||
#define GLIBTOP_IFADDR_TRANSPORT 0
|
||||
#define GLIBTOP_IFADDR_ADDR_LEN 1
|
||||
#define GLIBTOP_IFADDR_ADDRESS 2
|
||||
#define GLIBTOP_IFADDR_SUBNET 3
|
||||
#define GLIBTOP_IFADDR_SCOPE 4
|
||||
|
||||
#define GLIBTOP_MAX_IFADDR 5
|
||||
|
||||
typedef struct _glibtop_interface glibtop_interface;
|
||||
typedef struct _glibtop_ifaddr glibtop_ifaddr;
|
||||
|
||||
typedef enum _glibtop_interface_type glibtop_interface_type;
|
||||
typedef enum _glibtop_transport glibtop_transport;
|
||||
typedef enum _glibtop_protocol glibtop_protocol;
|
||||
|
||||
typedef enum _glibtop_ipv6_scope glibtop_ipv6_scope;
|
||||
|
||||
typedef enum _glibtop_strategy glibtop_strategy;
|
||||
typedef enum _glibtop_interface_flags glibtop_interface_flags;
|
||||
|
||||
enum _glibtop_protocol {
|
||||
GLIBTOP_PROTOCOL_OTHERS = 0,
|
||||
GLIBTOP_PROTOCOL_ICMP = 1 << 0,
|
||||
GLIBTOP_PROTOCOL_TCP = 1 << 1,
|
||||
GLIBTOP_PROTOCOL_UDP = 1 << 2,
|
||||
GLIBTOP_PROTOCOL_IGMP = 1 << 3,
|
||||
GLIBTOP_PROTOCOL_RAW = 1 << 4,
|
||||
GLIBTOP_PROTOCOL_ICMP6 = 1 << 5,
|
||||
GLIBTOP_PROTOCOL_TCP6 = 1 << 6,
|
||||
GLIBTOP_PROTOCOL_UDP6 = 1 << 7,
|
||||
GLIBTOP_PROTOCOL_IGMP6 = 1 << 8,
|
||||
GLIBTOP_PROTOCOL_RAW6 = 1 << 9
|
||||
};
|
||||
|
||||
enum _glibtop_transport {
|
||||
GLIBTOP_TRANSPORT_DEFAULT = 0,
|
||||
GLIBTOP_TRANSPORT_IPV4 = 1 << 0,
|
||||
GLIBTOP_TRANSPORT_IPV6 = 1 << 1,
|
||||
GLIBTOP_TRANSPORT_IPX = 1 << 2,
|
||||
GLIBTOP_TRANSPORT_X25 = 1 << 3,
|
||||
GLIBTOP_TRANSPORT_DECNET = 1 << 4,
|
||||
GLIBTOP_TRANSPORT_APPLETALK = 1 << 5,
|
||||
GLIBTOP_TRANSPORT_NETBEUI = 1 << 6
|
||||
};
|
||||
|
||||
#define GLIBTOP_TRANSPORT_ALL GLIBTOP_UNLIMITED
|
||||
#define GLIBTOP_PROTOCOL_ALL GLIBTOP_UNLIMITED
|
||||
|
||||
enum _glibtop_interface_type {
|
||||
GLIBTOP_INTERFACE_ALL = 0,
|
||||
GLIBTOP_INTERFACE_OTHER,
|
||||
/* Network interfaces */
|
||||
GLIBTOP_INTERFACE_ETHERNET = 101,
|
||||
GLIBTOP_INTERFACE_FDDI,
|
||||
GLIBTOP_INTERFACE_FRAME_RELAY,
|
||||
GLIBTOP_INTERFACE_TOKEN_RING,
|
||||
GLIBTOP_INTERFACE_ARCNET,
|
||||
GLIBTOP_INTERFACE_ATM,
|
||||
/* Dummy interfaces */
|
||||
GLIBTOP_INTERFACE_LOOPBACK = 501,
|
||||
GLIBTOP_INTERFACE_DUMMY,
|
||||
/* Dialup interfaces */
|
||||
GLIBTOP_INTERFACE_PARA = 801,
|
||||
GLIBTOP_INTERFACE_SLIP,
|
||||
GLIBTOP_INTERFACE_PPP,
|
||||
GLIBTOP_INTERFACE_ISDN
|
||||
};
|
||||
|
||||
enum _glibtop_ipv6_scope {
|
||||
GLIBTOP_IPV6_SCOPE_GLOBAL = 0,
|
||||
GLIBTOP_IPV6_SCOPE_LOOPBACK = 1 << 1,
|
||||
GLIBTOP_IPV6_SCOPE_LINKLOCAL = 1 << 2,
|
||||
GLIBTOP_IPV6_SCOPE_SITELOCAL = 1 << 3,
|
||||
GLIBTOP_IPV6_SCOPE_COMPATv4 = 1 << 4,
|
||||
GLIBTOP_IPV6_SCOPE_UNKNOWN = 1 << 5
|
||||
};
|
||||
|
||||
enum _glibtop_strategy {
|
||||
GLIBTOP_INTERFACES_ALL = 0,
|
||||
GLIBTOP_INTERFACES_BEST_MATCHING,
|
||||
GLIBTOP_INTERFACES_ONLY_THIS_ONE,
|
||||
GLIBTOP_INTERFACES_INCLUDE_LOGICAL = 1 << 7
|
||||
};
|
||||
|
||||
#define GLIBTOP_STRATEGY_FLAGS_MASK (1 << 7)
|
||||
|
||||
enum _glibtop_interface_flags {
|
||||
GLIBTOP_IF_FLAGS_UP = 1,
|
||||
GLIBTOP_IF_FLAGS_BROADCAST,
|
||||
GLIBTOP_IF_FLAGS_DEBUG,
|
||||
GLIBTOP_IF_FLAGS_LOOPBACK,
|
||||
GLIBTOP_IF_FLAGS_POINTOPOINT,
|
||||
GLIBTOP_IF_FLAGS_RUNNING,
|
||||
GLIBTOP_IF_FLAGS_NOARP,
|
||||
GLIBTOP_IF_FLAGS_PROMISC,
|
||||
GLIBTOP_IF_FLAGS_ALLMULTI,
|
||||
GLIBTOP_IF_FLAGS_OACTIVE,
|
||||
GLIBTOP_IF_FLAGS_SIMPLEX,
|
||||
GLIBTOP_IF_FLAGS_LINK0,
|
||||
GLIBTOP_IF_FLAGS_LINK1,
|
||||
GLIBTOP_IF_FLAGS_LINK2,
|
||||
GLIBTOP_IF_FLAGS_ALTPHYS,
|
||||
GLIBTOP_IF_FLAGS_MULTICAST
|
||||
};
|
||||
|
||||
struct _glibtop_ifaddr
|
||||
{
|
||||
u_int64_t flags,
|
||||
transport; /* GLIBTOP_IFADDR_TRANSPORT */
|
||||
u_int8_t addr_len, /* GLIBTOP_IFADDR_ADDR_LEN */
|
||||
address [GLIBTOP_IFADDR_LEN]; /* GLIBTOP_IFADDR_ADDRESS */
|
||||
u_int64_t subnet, /* GLIBTOP_IFADDR_SUBNET */
|
||||
scope; /* GLIBTOP_IFADDR_SCOPE */
|
||||
};
|
||||
|
||||
struct _glibtop_interface
|
||||
{
|
||||
u_int64_t flags,
|
||||
if_flags, /* GLIBTOP_INTERFACE_IF_FLAGS */
|
||||
transport, /* GLIBTOP_INTERFACE_TRANSPORT */
|
||||
type, /* GLIBTOP_INTERFACE_TYPE */
|
||||
number, /* GLIBTOP_INTERFACE_NUMBER */
|
||||
instance, /* GLIBTOP_INTERFACE_INSTANCE */
|
||||
num_logical; /* GLIBTOP_INTERFACE_NUM_LOGICAL */
|
||||
char name [GLIBTOP_INTERFACE_LEN];
|
||||
};
|
||||
|
||||
#if GLIBTOP_SUID_INTERFACE_NAMES
|
||||
#define glibtop_get_interface_names_r glibtop_get_interface_names_p
|
||||
#else
|
||||
#define glibtop_get_interface_names_r glibtop_get_interface_names_s
|
||||
#endif
|
||||
|
||||
glibtop_interface *glibtop_get_interface_names_l (glibtop_client *client, glibtop_array *array, u_int64_t interface, u_int64_t number, u_int64_t instance, u_int64_t strategy);
|
||||
|
||||
#if GLIBTOP_SUID_INTERFACE_NAMES
|
||||
int glibtop_init_interface_names_p (glibtop_server *server, glibtop_closure *closure);
|
||||
glibtop_interface *glibtop_get_interface_names_p (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, u_int64_t interface, u_int64_t number, u_int64_t instance, u_int64_t strategy);
|
||||
#else
|
||||
int glibtop_init_interface_names_s (glibtop_server *server, glibtop_closure *closure);
|
||||
glibtop_interface *glibtop_get_interface_names_s (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, u_int64_t interface, u_int64_t number, u_int64_t instance, u_int64_t strategy);
|
||||
#endif
|
||||
|
||||
#ifdef GLIBTOP_NAMES
|
||||
|
||||
/* You need to link with -lgtop_names to get this stuff here. */
|
||||
|
||||
extern const char *glibtop_names_interface_names [];
|
||||
extern const unsigned glibtop_types_interface_names [];
|
||||
extern const char *glibtop_labels_interface_names [];
|
||||
extern const char *glibtop_descriptions_interface_names [];
|
||||
|
||||
#endif
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
56
include/glibtop/limits.h
Normal file
56
include/glibtop/limits.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_LIMITS_H__
|
||||
#define __GLIBTOP_LIMITS_H__
|
||||
|
||||
#include <glibtop/global.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* Nobody should really be using more than 64 processors. */
|
||||
#define GLIBTOP_NCPU 64
|
||||
|
||||
/* Maximum number of process groups in glibtop_proc_uid. */
|
||||
#define GLIBTOP_MAX_GROUPS 32
|
||||
|
||||
/* Maximum length of a mountpoint/device name in glibtop_mountlist. */
|
||||
#define GLIBTOP_MOUNTENTRY_LEN 79
|
||||
|
||||
/* Maximum length of a network interface name. */
|
||||
#define GLIBTOP_INTERFACE_LEN 32
|
||||
|
||||
/* Length of a network interface address in bytes. */
|
||||
#define GLIBTOP_IFADDR_LEN 16
|
||||
|
||||
/* This is ((u_int64_t)-1) */
|
||||
#define GLIBTOP_UNLIMITED (~(u_int64_t)0)
|
||||
|
||||
/* Maximum length of a backend name. */
|
||||
#define GLIBTOP_BACKEND_NAME_LEN 40
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
83
include/glibtop/netinfo.h
Normal file
83
include/glibtop/netinfo.h
Normal file
@@ -0,0 +1,83 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_NETINFO_H__
|
||||
#define __GLIBTOP_NETINFO_H__
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/global.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GLIBTOP_NETINFO_IF_FLAGS 0
|
||||
#define GLIBTOP_NETINFO_TRANSPORT 1
|
||||
#define GLIBTOP_NETINFO_MTU 2
|
||||
#define GLIBTOP_NETINFO_SUBNET 3
|
||||
#define GLIBTOP_NETINFO_ADDRESS 4
|
||||
|
||||
#define GLIBTOP_MAX_NETINFO 5
|
||||
|
||||
typedef struct _glibtop_netinfo glibtop_netinfo;
|
||||
|
||||
#include <glibtop/interfaces.h>
|
||||
|
||||
struct _glibtop_netinfo
|
||||
{
|
||||
u_int64_t flags,
|
||||
if_flags, /* GLIBTOP_NETINFO_IF_FLAGS */
|
||||
transport, /* GLIBTOP_NETINFO_TRANSPORT */
|
||||
mtu; /* GLIBTOP_NETINFO_MTU */
|
||||
};
|
||||
|
||||
#if GLIBTOP_SUID_NETINFO
|
||||
#define glibtop_get_netinfo_r glibtop_get_netinfo_p
|
||||
#else
|
||||
#define glibtop_get_netinfo_r glibtop_get_netinfo_s
|
||||
#endif
|
||||
|
||||
glibtop_ifaddr *glibtop_get_netinfo_l (glibtop_client *client, glibtop_array *array, glibtop_netinfo *buf, const char *interface, u_int64_t transport);
|
||||
|
||||
#if GLIBTOP_SUID_NETINFO
|
||||
int glibtop_init_netinfo_p (glibtop_server *server, glibtop_closure *closure);
|
||||
glibtop_ifaddr *glibtop_get_netinfo_p (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, glibtop_netinfo *buf, const char *interface, u_int64_t transport);
|
||||
#else
|
||||
int glibtop_init_netinfo_s (glibtop_server *server, glibtop_closure *closure);
|
||||
glibtop_ifaddr *glibtop_get_netinfo_s (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, glibtop_netinfo *buf, const char *interface, u_int64_t transport);
|
||||
#endif
|
||||
|
||||
#ifdef GLIBTOP_NAMES
|
||||
|
||||
/* You need to link with -lgtop_names to get this stuff here. */
|
||||
|
||||
extern const char *glibtop_names_netinfo [];
|
||||
extern const unsigned glibtop_types_netinfo [];
|
||||
extern const char *glibtop_labels_netinfo [];
|
||||
extern const char *glibtop_descriptions_netinfo [];
|
||||
|
||||
#endif
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
81
include/glibtop/proccwd.h
Normal file
81
include/glibtop/proccwd.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_PROCCWD_H__
|
||||
#define __GLIBTOP_PROCCWD_H__
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/global.h>
|
||||
|
||||
#include <glibtop/array.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GLIBTOP_PROC_CWD_SIZE 0
|
||||
#define GLIBTOP_PROC_CWD_DEVICE 1
|
||||
#define GLIBTOP_PROC_CWD_INODE 2
|
||||
|
||||
#define GLIBTOP_MAX_PROC_CWD 3
|
||||
|
||||
typedef struct _glibtop_proc_cwd glibtop_proc_cwd;
|
||||
|
||||
/* Cwd stuff */
|
||||
|
||||
struct _glibtop_proc_cwd
|
||||
{
|
||||
u_int64_t flags,
|
||||
size,
|
||||
device,
|
||||
inode;
|
||||
};
|
||||
|
||||
#if GLIBTOP_SUID_PROC_CWD
|
||||
#define glibtop_get_proc_cwd_r glibtop_get_proc_cwd_p
|
||||
#else
|
||||
#define glibtop_get_proc_cwd_r glibtop_get_proc_cwd_s
|
||||
#endif
|
||||
|
||||
char *glibtop_get_proc_cwd_l (glibtop_client *client, glibtop_proc_cwd *buf, pid_t pid);
|
||||
|
||||
#if GLIBTOP_SUID_PROC_CWD
|
||||
int glibtop_init_proc_cwd_p (glibtop_server *server, glibtop_closure *closure);
|
||||
char *glibtop_get_proc_cwd_p (glibtop_server *server, glibtop_closure *closure, glibtop_proc_cwd *buf, pid_t pid);
|
||||
#else
|
||||
int glibtop_init_proc_cwd_s (glibtop_server *server, glibtop_closure *closure);
|
||||
char *glibtop_get_proc_cwd_s (glibtop_server *server, glibtop_closure *closure, glibtop_proc_cwd *buf, pid_t pid);
|
||||
#endif
|
||||
|
||||
#ifdef GLIBTOP_NAMES
|
||||
|
||||
/* You need to link with -lgtop_names to get this stuff here. */
|
||||
|
||||
extern const char *glibtop_names_proc_cwd [];
|
||||
extern const unsigned glibtop_types_proc_cwd [];
|
||||
extern const char *glibtop_labels_proc_cwd [];
|
||||
extern const char *glibtop_descriptions_proc_cwd [];
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
93
kernel/sysctl/patch-2.2.x
Normal file
93
kernel/sysctl/patch-2.2.x
Normal file
@@ -0,0 +1,93 @@
|
||||
diff -ru kernel-source-2.2.12/Makefile hacker-2.2.12/Makefile
|
||||
--- kernel-source-2.2.12/Makefile Thu Aug 26 02:29:45 1999
|
||||
+++ hacker-2.2.12/Makefile Sat Dec 18 17:33:04 1999
|
||||
@@ -113,6 +113,7 @@
|
||||
DRIVERS =drivers/block/block.a \
|
||||
drivers/char/char.a \
|
||||
drivers/misc/misc.a
|
||||
+EXTRAS =
|
||||
LIBS =$(TOPDIR)/lib/lib.a
|
||||
SUBDIRS =kernel drivers mm fs net ipc lib
|
||||
|
||||
@@ -202,6 +203,11 @@
|
||||
DRIVERS := $(DRIVERS) drivers/net/irda/irda_drivers.a
|
||||
endif
|
||||
|
||||
+ifdef CONFIG_LIBGTOP
|
||||
+SUBDIRS := $(SUBDIRS) libgtop
|
||||
+EXTRAS := $(EXTRAS) libgtop/kernel.o
|
||||
+endif
|
||||
+
|
||||
include arch/$(ARCH)/Makefile
|
||||
|
||||
.S.s:
|
||||
@@ -222,6 +228,7 @@
|
||||
$(FILESYSTEMS) \
|
||||
$(NETWORKS) \
|
||||
$(DRIVERS) \
|
||||
+ $(EXTRAS) \
|
||||
$(LIBS) \
|
||||
--end-group \
|
||||
-o vmlinux
|
||||
diff -ru kernel-source-2.2.12/arch/i386/config.in hacker-2.2.12/arch/i386/config.in
|
||||
--- kernel-source-2.2.12/arch/i386/config.in Thu Oct 14 00:57:46 1999
|
||||
+++ hacker-2.2.12/arch/i386/config.in Sat Dec 18 17:33:04 1999
|
||||
@@ -88,6 +88,9 @@
|
||||
bool 'System V IPC' CONFIG_SYSVIPC
|
||||
bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
|
||||
bool 'Sysctl support' CONFIG_SYSCTL
|
||||
+if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
|
||||
+ tristate 'LibGTop support' CONFIG_LIBGTOP
|
||||
+fi
|
||||
tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
|
||||
tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
|
||||
tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
|
||||
diff -ru kernel-source-2.2.12/include/linux/autoconf.h hacker-2.2.12/include/linux/autoconf.h
|
||||
--- kernel-source-2.2.12/include/linux/autoconf.h Sat Dec 4 01:20:30 1999
|
||||
+++ hacker-2.2.12/include/linux/autoconf.h Sat Dec 18 17:41:44 1999
|
||||
@@ -53,6 +53,8 @@
|
||||
#define CONFIG_SYSVIPC 1
|
||||
#define CONFIG_BSD_PROCESS_ACCT 1
|
||||
#define CONFIG_SYSCTL 1
|
||||
+#undef CONFIG_LIBGTOP
|
||||
+#define CONFIG_LIBGTOP_MODULE 1
|
||||
#undef CONFIG_BINFMT_AOUT
|
||||
#define CONFIG_BINFMT_AOUT_MODULE 1
|
||||
#define CONFIG_BINFMT_ELF 1
|
||||
diff -ru kernel-source-2.2.12/include/linux/sysctl.h hacker-2.2.12/include/linux/sysctl.h
|
||||
--- kernel-source-2.2.12/include/linux/sysctl.h Mon Aug 9 21:05:13 1999
|
||||
+++ hacker-2.2.12/include/linux/sysctl.h Sat Dec 18 17:34:38 1999
|
||||
@@ -57,7 +57,8 @@
|
||||
CTL_FS=5, /* Filesystems */
|
||||
CTL_DEBUG=6, /* Debugging */
|
||||
CTL_DEV=7, /* Devices */
|
||||
- CTL_BUS=8 /* Buses */
|
||||
+ CTL_BUS=8, /* Buses */
|
||||
+ CTL_LIBGTOP=408 /* LibGTop */
|
||||
};
|
||||
|
||||
/* CTL_BUS names: */
|
||||
diff -ru kernel-source-2.2.12/kernel/sysctl.c hacker-2.2.12/kernel/sysctl.c
|
||||
--- kernel-source-2.2.12/kernel/sysctl.c Mon Aug 9 21:05:13 1999
|
||||
+++ hacker-2.2.12/kernel/sysctl.c Sat Dec 18 17:33:04 1999
|
||||
@@ -83,7 +83,9 @@
|
||||
static ctl_table fs_table[];
|
||||
static ctl_table debug_table[];
|
||||
static ctl_table dev_table[];
|
||||
-
|
||||
+#ifdef CONFIG_LIBGTOP
|
||||
+extern ctl_table libgtop_table[];
|
||||
+#endif
|
||||
|
||||
/* /proc declarations: */
|
||||
|
||||
@@ -149,6 +151,9 @@
|
||||
{CTL_FS, "fs", NULL, 0, 0555, fs_table},
|
||||
{CTL_DEBUG, "debug", NULL, 0, 0555, debug_table},
|
||||
{CTL_DEV, "dev", NULL, 0, 0555, dev_table},
|
||||
+#ifdef CONFIG_LIBGTOP
|
||||
+ {CTL_LIBGTOP, "libgtop", NULL, 0, 0555, libgtop_table},
|
||||
+#endif
|
||||
{0}
|
||||
};
|
||||
|
170
lib/error.c
Normal file
170
lib/error.c
Normal file
@@ -0,0 +1,170 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <glibtop/error.h>
|
||||
|
||||
#define DEFAULT_NAME "LibGTop-Server"
|
||||
|
||||
/* Prints error message and exits. */
|
||||
|
||||
static void
|
||||
print_server_name (glibtop_server *server)
|
||||
{
|
||||
fprintf (stderr, "%s: ", server ?
|
||||
(server->name ? server->name : DEFAULT_NAME)
|
||||
: DEFAULT_NAME);
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_error_vr (glibtop_server *server, char *format, va_list args)
|
||||
{
|
||||
print_server_name (server);
|
||||
vfprintf (stderr, format, args);
|
||||
fprintf (stderr, "\n");
|
||||
|
||||
#ifdef LIBGTOP_ENABLE_DEBUG
|
||||
abort ();
|
||||
#else
|
||||
exit (1);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_error_io_vr (glibtop_server *server, char *format, int error, va_list args)
|
||||
{
|
||||
print_server_name (server);
|
||||
vfprintf (stderr, format, args);
|
||||
fprintf (stderr, ": %s\n", strerror (error));
|
||||
|
||||
#ifdef LIBGTOP_ENABLE_DEBUG
|
||||
abort ();
|
||||
#else
|
||||
exit (1);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_warn_vr (glibtop_server *server, char *format, va_list args)
|
||||
{
|
||||
print_server_name (server);
|
||||
vfprintf (stderr, format, args);
|
||||
fprintf (stderr, "\n");
|
||||
|
||||
#ifdef LIBGTOP_FATAL_WARNINGS
|
||||
abort ();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_warn_io_vr (glibtop_server *server, char *format, int error, va_list args)
|
||||
{
|
||||
print_server_name (server);
|
||||
vfprintf (stderr, format, args);
|
||||
fprintf (stderr, ": %s\n", strerror (error));
|
||||
|
||||
#ifdef LIBGTOP_FATAL_WARNINGS
|
||||
abort ();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_error_r (glibtop_server *server, char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
glibtop_error_vr (server, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_warn_r (glibtop_server *server, char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
glibtop_warn_vr (server, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_error_io_r (glibtop_server *server, char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
glibtop_error_io_vr (server, format, errno, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_warn_io_r (glibtop_server *server, char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
glibtop_warn_io_vr (server, format, errno, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
#ifndef __GNUC__
|
||||
|
||||
static void
|
||||
glibtop_error (char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start (args, format);
|
||||
glibtop_error_vr (glibtop_global_server, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
static void
|
||||
glibtop_warn (char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start (args, format);
|
||||
glibtop_warn_vr (glibtop_global_server, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
static void
|
||||
glibtop_error_io (char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start (args, format);
|
||||
glibtop_error_io_vr (glibtop_global_server, format, errno, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
static void
|
||||
glibtop_warn_io (char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start (args, format);
|
||||
glibtop_warn_io_vr (glibtop_global_server, format, errno, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
#endif /* no __GNUC__ */
|
156
lib/errors.c
Normal file
156
lib/errors.c
Normal file
@@ -0,0 +1,156 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/global.h>
|
||||
#include <glibtop/errors.h>
|
||||
|
||||
/* Error quark */
|
||||
GQuark
|
||||
glibtop_error_quark (void)
|
||||
{
|
||||
static GQuark q = 0;
|
||||
if (q == 0)
|
||||
q = g_quark_from_static_string ("glibtop-error-quark");
|
||||
|
||||
return q;
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_error_vl (glibtop_client *client, glibtop_error code,
|
||||
const char *format, va_list args)
|
||||
{
|
||||
gchar *message;
|
||||
GError *error;
|
||||
|
||||
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
|
||||
message = g_strdup_vprintf (format, args);
|
||||
|
||||
error = g_error_new_literal (GLIBTOP_ERROR, code, message);
|
||||
glibtop_client_propagate_error (client, error);
|
||||
|
||||
g_error_free (error);
|
||||
g_free (message);
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_error_io_vl (glibtop_client *client, glibtop_error code,
|
||||
int io_errno, const char *format, va_list args)
|
||||
{
|
||||
gchar *message, *fullmessage;
|
||||
GError *error;
|
||||
|
||||
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
|
||||
message = g_strdup_vprintf (format, args);
|
||||
fullmessage = g_strdup_printf ("%s: %s", message, strerror (io_errno));
|
||||
|
||||
error = g_error_new_literal (GLIBTOP_ERROR, code, message);
|
||||
glibtop_client_propagate_error (client, error);
|
||||
|
||||
g_error_free (error);
|
||||
g_free (fullmessage);
|
||||
g_free (message);
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_warn_vl (glibtop_client *client, glibtop_error code,
|
||||
const char *format, va_list args)
|
||||
{
|
||||
gchar *message;
|
||||
GError *error;
|
||||
|
||||
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
|
||||
message = g_strdup_vprintf (format, args);
|
||||
|
||||
error = g_error_new_literal (GLIBTOP_ERROR, code, message);
|
||||
glibtop_client_propagate_warning (client, error);
|
||||
|
||||
g_error_free (error);
|
||||
g_free (message);
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_warn_io_vl (glibtop_client *client, glibtop_error code,
|
||||
int io_errno, const char *format, va_list args)
|
||||
{
|
||||
gchar *message, *fullmessage;
|
||||
GError *error;
|
||||
|
||||
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
|
||||
message = g_strdup_vprintf (format, args);
|
||||
fullmessage = g_strdup_printf ("%s: %s", message, strerror (io_errno));
|
||||
|
||||
error = g_error_new_literal (GLIBTOP_ERROR, code, message);
|
||||
glibtop_client_propagate_warning (client, error);
|
||||
|
||||
g_error_free (error);
|
||||
g_free (fullmessage);
|
||||
g_free (message);
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_error_l (glibtop_client *client, glibtop_error code,
|
||||
char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
glibtop_error_vl (client, code, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_warn_l (glibtop_client *client, glibtop_error code,
|
||||
char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
glibtop_warn_vl (client, code, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_error_io_l (glibtop_client *client, glibtop_error code,
|
||||
char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
glibtop_error_io_vl (client, code, errno, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_warn_io_l (glibtop_client *client, glibtop_error code,
|
||||
char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
glibtop_warn_io_vl (client, code, errno, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
120
lib/glib-arrays.c
Normal file
120
lib/glib-arrays.c
Normal file
@@ -0,0 +1,120 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/union.h>
|
||||
|
||||
#include <glibtop/glib-arrays.h>
|
||||
|
||||
GArray *
|
||||
glibtop_get_proclist_as_array_l (glibtop_client *client, int64_t which,
|
||||
int64_t arg)
|
||||
{
|
||||
glibtop_array array;
|
||||
GArray *retval;
|
||||
unsigned *ptr;
|
||||
int i;
|
||||
|
||||
ptr = glibtop_get_proclist_l (client, &array, which, arg);
|
||||
if (!ptr) return NULL;
|
||||
|
||||
retval = g_array_new (FALSE, TRUE, sizeof (guint));
|
||||
retval = g_array_set_size (retval, array.number);
|
||||
|
||||
for (i = 0; i < array.number; i++)
|
||||
g_array_index (retval, guint, i) = ptr [i];
|
||||
|
||||
g_free (ptr);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
GPtrArray *
|
||||
glibtop_get_proc_args_as_array_l (glibtop_client *client, pid_t pid)
|
||||
{
|
||||
glibtop_array array;
|
||||
GPtrArray *retval;
|
||||
char **ptr;
|
||||
int i;
|
||||
|
||||
ptr = glibtop_get_proc_args_l (client, &array, pid);
|
||||
if (!ptr) return NULL;
|
||||
|
||||
retval = g_ptr_array_new ();
|
||||
g_ptr_array_set_size (retval, array.number);
|
||||
|
||||
for (i = 0; i < array.number; i++) {
|
||||
retval->pdata [i] = g_strdup (ptr [i]);
|
||||
g_free (ptr [i]);
|
||||
}
|
||||
|
||||
g_free (ptr);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
GPtrArray *
|
||||
glibtop_get_proc_map_as_array_l (glibtop_client *client, pid_t pid)
|
||||
{
|
||||
glibtop_array array;
|
||||
GPtrArray *retval;
|
||||
glibtop_map_entry *ptr;
|
||||
int i;
|
||||
|
||||
ptr = glibtop_get_proc_map_l (client, &array, pid);
|
||||
if (!ptr) return NULL;
|
||||
|
||||
retval = g_ptr_array_new ();
|
||||
g_ptr_array_set_size (retval, array.number);
|
||||
|
||||
for (i = 0; i < array.number; i++)
|
||||
retval->pdata [i] = g_memdup (ptr+i, sizeof (glibtop_map_entry));
|
||||
|
||||
g_free (ptr);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
GPtrArray *
|
||||
glibtop_get_mountlist_as_array_l (glibtop_client *client, int all_fs)
|
||||
{
|
||||
glibtop_array array;
|
||||
GPtrArray *retval;
|
||||
glibtop_mountentry *ptr;
|
||||
int i;
|
||||
|
||||
ptr = glibtop_get_mountlist_l (client, &array, all_fs);
|
||||
if (!ptr) return NULL;
|
||||
|
||||
retval = g_ptr_array_new ();
|
||||
g_ptr_array_set_size (retval, array.number);
|
||||
|
||||
for (i = 0; i < array.number; i++)
|
||||
retval->pdata [i] = g_memdup (ptr+i, sizeof (glibtop_mountentry));
|
||||
|
||||
g_free (ptr);
|
||||
|
||||
return retval;
|
||||
}
|
280
lib/glibtop-backend-info.c
Normal file
280
lib/glibtop-backend-info.c
Normal file
@@ -0,0 +1,280 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/global.h>
|
||||
|
||||
#include <glibtop/glibtop-backend.h>
|
||||
#include <glibtop/glibtop-backend-info.h>
|
||||
|
||||
static GHashTable *_glibtop_backend_list = NULL;
|
||||
static long _glibtop_backend_nr = 0;
|
||||
|
||||
#define LIBGTOP_XML_NAMESPACE "http://www.home-of-linux.org/libgtop/1.1"
|
||||
|
||||
#include <libxml/parser.h>
|
||||
|
||||
#include <dirent.h>
|
||||
|
||||
static void _glibtop_init_gmodule_backends (const char *);
|
||||
|
||||
void
|
||||
glibtop_init_backends (void)
|
||||
{
|
||||
static int backends_initialized = 0;
|
||||
|
||||
if (backends_initialized)
|
||||
return;
|
||||
backends_initialized = 1;
|
||||
|
||||
LIBXML_TEST_VERSION;
|
||||
|
||||
_glibtop_init_gmodule_backends (LIBGTOP_BACKEND_DIR);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
_get_library_filename (xmlDocPtr doc, xmlNodePtr cur, const char *directory)
|
||||
{
|
||||
char *filename = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1);
|
||||
gchar *retval;
|
||||
|
||||
if (!filename)
|
||||
return NULL;
|
||||
|
||||
/* already absolute */
|
||||
if (filename [0] == '/')
|
||||
retval = g_strdup (filename);
|
||||
else
|
||||
retval = g_strdup_printf ("%s/%s", directory, filename);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
static GSList *
|
||||
_parse_extra_libs (xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, const char *dir)
|
||||
{
|
||||
GSList *list = NULL;
|
||||
|
||||
/* We don't care what the top level element name is */
|
||||
cur = cur->xmlChildrenNode;
|
||||
while (cur != NULL) {
|
||||
if ((!strcmp (cur->name, "ExtraLib")) && (cur->ns == ns)) {
|
||||
xmlNodePtr sub = cur->xmlChildrenNode;
|
||||
|
||||
while (sub != NULL) {
|
||||
if ((!strcmp (sub->name, "ShlibName")) && (sub->ns == ns))
|
||||
list = g_slist_append
|
||||
(list, _get_library_filename (doc, sub, dir));
|
||||
|
||||
sub = sub->next;
|
||||
}
|
||||
}
|
||||
|
||||
cur = cur->next;
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
static glibtop_backend_entry *
|
||||
_parseBackend (xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, const char *dir)
|
||||
{
|
||||
glibtop_backend_entry *ret = NULL;
|
||||
|
||||
/*
|
||||
* allocate the struct
|
||||
*/
|
||||
ret = g_new0 (glibtop_backend_entry, 1);
|
||||
|
||||
/* We don't care what the top level element name is */
|
||||
cur = cur->xmlChildrenNode;
|
||||
while (cur != NULL) {
|
||||
if ((!strcmp (cur->name, "Name")) && (cur->ns == ns))
|
||||
ret->name = xmlNodeListGetString
|
||||
(doc, cur->xmlChildrenNode, 1);
|
||||
|
||||
if ((!strcmp (cur->name, "Location")) && (cur->ns == ns)) {
|
||||
xmlNodePtr sub = cur->xmlChildrenNode;
|
||||
|
||||
while (sub != NULL) {
|
||||
if ((!strcmp (sub->name, "LibtoolName")) && (sub->ns == ns))
|
||||
ret->libtool_name = _get_library_filename (doc, sub, dir);
|
||||
if ((!strcmp (sub->name, "ShlibName")) && (sub->ns == ns))
|
||||
ret->shlib_name = _get_library_filename (doc, sub, dir);
|
||||
|
||||
if ((!strcmp (sub->name, "ExtraLibs")) && (sub->ns == ns))
|
||||
ret->extra_libs = _parse_extra_libs (doc, ns, sub, dir);
|
||||
|
||||
sub = sub->next;
|
||||
}
|
||||
}
|
||||
|
||||
cur = cur->next;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
_glibtop_init_gmodule_backends (const char *directory)
|
||||
{
|
||||
DIR *dir;
|
||||
struct dirent *entry;
|
||||
|
||||
dir = opendir (directory);
|
||||
if (!dir) return;
|
||||
|
||||
while ((entry = readdir (dir)) != NULL) {
|
||||
size_t len = strlen (entry->d_name);
|
||||
gchar *filename;
|
||||
xmlDocPtr doc;
|
||||
xmlNsPtr ns;
|
||||
xmlNodePtr cur;
|
||||
|
||||
if (len < 8)
|
||||
continue;
|
||||
|
||||
if (strcmp (entry->d_name+len-8, ".backend"))
|
||||
continue;
|
||||
|
||||
filename = g_strdup_printf ("%s/%s", directory, entry->d_name);
|
||||
|
||||
doc = xmlParseFile (filename);
|
||||
|
||||
if (!doc) {
|
||||
g_warning ("Cannot parse %s", filename);
|
||||
g_free (filename);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Make sure the document is of the right kind */
|
||||
|
||||
cur = xmlDocGetRootElement (doc);
|
||||
if (!cur) {
|
||||
xmlFreeDoc (doc);
|
||||
g_free (filename);
|
||||
continue;
|
||||
}
|
||||
|
||||
ns = xmlSearchNsByHref (doc, cur, LIBGTOP_XML_NAMESPACE);
|
||||
if (!ns) {
|
||||
g_warning ("File %s of wrong type; LibGTop Namespace not found",
|
||||
filename);
|
||||
g_free (filename);
|
||||
xmlFreeDoc (doc);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strcmp (cur->name, "Backends")) {
|
||||
g_warning ("File %s of the wrong type, root node != 'Backends'",
|
||||
filename);
|
||||
g_free (filename);
|
||||
xmlFreeDoc (doc);
|
||||
continue;
|
||||
}
|
||||
|
||||
cur = cur->xmlChildrenNode;
|
||||
while (cur != NULL) {
|
||||
glibtop_backend_entry *backend;
|
||||
|
||||
if ((!strcmp(cur->name, "Backend")) && (cur->ns == ns)) {
|
||||
backend = _parseBackend (doc, ns, cur, directory);
|
||||
if (!backend) {
|
||||
g_warning ("File %s of wrong type; cannot parse",
|
||||
filename);
|
||||
continue;
|
||||
}
|
||||
|
||||
glibtop_register_backend (backend);
|
||||
}
|
||||
cur = cur->next;
|
||||
}
|
||||
|
||||
g_free (filename);
|
||||
xmlFreeDoc (doc);
|
||||
}
|
||||
|
||||
closedir (dir);
|
||||
}
|
||||
|
||||
long
|
||||
glibtop_register_backend (glibtop_backend_entry *entry)
|
||||
{
|
||||
long id;
|
||||
|
||||
if (!_glibtop_backend_list)
|
||||
_glibtop_backend_list = g_hash_table_new (NULL, NULL);
|
||||
|
||||
id = ++_glibtop_backend_nr;
|
||||
|
||||
g_hash_table_insert (_glibtop_backend_list,
|
||||
GINT_TO_POINTER (id),
|
||||
entry);
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_unregister_backend (long id)
|
||||
{
|
||||
g_hash_table_remove (_glibtop_backend_list,
|
||||
GINT_TO_POINTER (id));
|
||||
}
|
||||
|
||||
glibtop_backend_entry *
|
||||
glibtop_backend_by_id (long id)
|
||||
{
|
||||
return g_hash_table_lookup (_glibtop_backend_list,
|
||||
GINT_TO_POINTER (id));
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
const char *backend_name;
|
||||
glibtop_backend_entry *entry;
|
||||
} _find_by_name_param_t;
|
||||
|
||||
static void
|
||||
find_by_name (gpointer key, gpointer value, gpointer user_data)
|
||||
{
|
||||
_find_by_name_param_t *param = (_find_by_name_param_t *) user_data;
|
||||
glibtop_backend_entry *entry = (glibtop_backend_entry *) value;
|
||||
|
||||
if (!entry || !entry->name || param->entry)
|
||||
return;
|
||||
|
||||
if (!strcmp (entry->name, param->backend_name))
|
||||
param->entry = entry;
|
||||
}
|
||||
|
||||
glibtop_backend_entry *
|
||||
glibtop_backend_by_name (const char *backend_name)
|
||||
{
|
||||
_find_by_name_param_t param = { backend_name, NULL };
|
||||
|
||||
g_hash_table_foreach (_glibtop_backend_list,
|
||||
find_by_name, ¶m);
|
||||
|
||||
return param.entry;
|
||||
}
|
271
lib/glibtop-backend.c
Normal file
271
lib/glibtop-backend.c
Normal file
@@ -0,0 +1,271 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 2.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <glibtop.h>
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#include <glibtop/glibtop-backend.h>
|
||||
#include <glibtop/glibtop-backend-info.h>
|
||||
|
||||
static void glibtop_backend_class_init (glibtop_backend_class *klass);
|
||||
static void glibtop_backend_init (glibtop_backend *backend);
|
||||
static void glibtop_backend_finalize (GObject *object);
|
||||
|
||||
static gpointer parent_class = NULL;
|
||||
|
||||
|
||||
/* Internal data */
|
||||
|
||||
struct _glibtop_backend_private
|
||||
{
|
||||
const glibtop_backend_info *info;
|
||||
|
||||
glibtop_closure *closure_data;
|
||||
|
||||
glibtop_server *server;
|
||||
glibtop_backend_module *module;
|
||||
};
|
||||
|
||||
GType
|
||||
glibtop_backend_get_type (void)
|
||||
{
|
||||
static GType glibtop_backend_type = 0;
|
||||
|
||||
if (!glibtop_backend_type) {
|
||||
static const GTypeInfo glibtop_backend_info = {
|
||||
sizeof (glibtop_backend_class),
|
||||
NULL, /* base_class_init */
|
||||
NULL, /* base_class_finalize */
|
||||
(GClassInitFunc) glibtop_backend_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (glibtop_backend),
|
||||
16, /* n_preallocs */
|
||||
(GInstanceInitFunc) glibtop_backend_init,
|
||||
};
|
||||
|
||||
glibtop_backend_type = g_type_register_static
|
||||
(G_TYPE_OBJECT, "glibtop_backend", &glibtop_backend_info, 0);
|
||||
}
|
||||
|
||||
return glibtop_backend_type;
|
||||
}
|
||||
|
||||
static void
|
||||
glibtop_backend_class_init (glibtop_backend_class *class)
|
||||
{
|
||||
GObjectClass *gobject_class;
|
||||
|
||||
gobject_class = (GObjectClass *) class;
|
||||
|
||||
parent_class = g_type_class_ref (G_TYPE_OBJECT);
|
||||
|
||||
gobject_class->finalize = glibtop_backend_finalize;
|
||||
}
|
||||
|
||||
static void
|
||||
glibtop_backend_init (glibtop_backend *backend)
|
||||
{
|
||||
glibtop_backend_private *priv;
|
||||
|
||||
priv = g_new0 (glibtop_backend_private, 1);
|
||||
backend->_priv = priv;
|
||||
}
|
||||
|
||||
static void
|
||||
glibtop_backend_finalize (GObject *object)
|
||||
{
|
||||
glibtop_backend *glibtop;
|
||||
glibtop_backend_private *priv = NULL;
|
||||
|
||||
glibtop = GLIBTOP_BACKEND (object);
|
||||
priv = glibtop->_priv;
|
||||
|
||||
g_free (priv);
|
||||
|
||||
if (G_OBJECT_CLASS (parent_class)->finalize)
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
unload_module (gpointer data, gpointer user_data)
|
||||
{
|
||||
g_module_close (data);
|
||||
}
|
||||
|
||||
static int
|
||||
load_extra_libs (glibtop_backend_entry *entry, GError **error)
|
||||
{
|
||||
GSList *list;
|
||||
GSList *loaded_here = NULL;
|
||||
|
||||
for (list = entry->extra_libs; list; list = list->next) {
|
||||
const gchar *filename = list->data;
|
||||
GModule *module;
|
||||
|
||||
module = g_module_open (filename, G_MODULE_BIND_LAZY);
|
||||
if (!module) {
|
||||
g_set_error (error, GLIBTOP_ERROR, GLIBTOP_ERROR_NO_SUCH_BACKEND,
|
||||
"Cannot open extra shared library `%s' "
|
||||
"for backend `%s' (%s)", filename, entry->name,
|
||||
g_module_error ());
|
||||
g_slist_foreach (loaded_here, unload_module, NULL);
|
||||
return -GLIBTOP_ERROR_NO_SUCH_BACKEND;
|
||||
}
|
||||
|
||||
loaded_here = g_slist_prepend (loaded_here, module);
|
||||
}
|
||||
|
||||
entry->_priv->extra_modules = g_slist_concat
|
||||
(loaded_here, entry->_priv->extra_modules);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
glibtop_backend *
|
||||
glibtop_backend_get (const char *backend_name, u_int64_t features,
|
||||
const char **backend_args, GError **error)
|
||||
{
|
||||
const glibtop_backend_info *info;
|
||||
glibtop_backend_entry *entry;
|
||||
glibtop_backend *backend;
|
||||
|
||||
glibtop_init_backends ();
|
||||
|
||||
entry = glibtop_backend_by_name (backend_name);
|
||||
if (!entry) {
|
||||
g_set_error (error, GLIBTOP_ERROR, GLIBTOP_ERROR_NO_SUCH_BACKEND,
|
||||
"No backend with this name");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!entry->_priv) {
|
||||
entry->_priv = g_new0 (glibtop_backend_module, 1);
|
||||
|
||||
if (entry->extra_libs) {
|
||||
int retval;
|
||||
|
||||
retval = load_extra_libs (entry, error);
|
||||
if (retval < 0)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
entry->_priv->module = g_module_open (entry->shlib_name,
|
||||
G_MODULE_BIND_LAZY);
|
||||
if (!entry->_priv->module) {
|
||||
g_set_error (error, GLIBTOP_ERROR, GLIBTOP_ERROR_NO_SUCH_BACKEND,
|
||||
"Cannot open shared library `%s' "
|
||||
"for backend `%s' (%s)", entry->shlib_name,
|
||||
entry->name, g_module_error ());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!g_module_symbol (entry->_priv->module,
|
||||
"LibGTopBackendInfo",
|
||||
(gpointer*) &entry->info)) {
|
||||
g_set_error (error, GLIBTOP_ERROR, GLIBTOP_ERROR_NO_SUCH_BACKEND,
|
||||
"Library `%s' is not a valid "
|
||||
"LibGTop Backend library (start symbol not found)",
|
||||
entry->shlib_name);
|
||||
|
||||
g_module_close (entry->_priv->module);
|
||||
g_free (entry->_priv);
|
||||
entry->_priv = NULL;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
info = entry->info;
|
||||
if (!info) {
|
||||
g_set_error (error, GLIBTOP_ERROR, GLIBTOP_ERROR_NO_SUCH_BACKEND,
|
||||
"Can't get backend info");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
backend = g_object_new (GLIBTOP_TYPE_BACKEND, NULL);
|
||||
|
||||
backend->_priv->module = entry->_priv;
|
||||
backend->_priv->info = info;
|
||||
|
||||
backend->_priv->server = glibtop_server_new ();
|
||||
|
||||
if (info->open) {
|
||||
int retval;
|
||||
|
||||
retval = info->open (backend->_priv->server, backend, features,
|
||||
backend_args);
|
||||
if (retval) {
|
||||
g_set_error (error, GLIBTOP_ERROR, GLIBTOP_ERROR_NO_SUCH_BACKEND,
|
||||
"Backend open function return error condition");
|
||||
|
||||
g_object_unref (G_OBJECT (backend));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
entry->_priv->refcount++;
|
||||
|
||||
return backend;
|
||||
}
|
||||
|
||||
glibtop_call_vector *
|
||||
glibtop_backend_get_call_vector (glibtop_backend *backend)
|
||||
{
|
||||
g_return_val_if_fail (GLIBTOP_IS_BACKEND (backend), NULL);
|
||||
|
||||
g_assert (backend->_priv->info != NULL);
|
||||
|
||||
return backend->_priv->info->call_vector;
|
||||
}
|
||||
|
||||
glibtop_server *
|
||||
glibtop_backend_get_server (glibtop_backend *backend)
|
||||
{
|
||||
g_return_val_if_fail (GLIBTOP_IS_BACKEND (backend), NULL);
|
||||
|
||||
glibtop_server_ref (backend->_priv->server);
|
||||
|
||||
return backend->_priv->server;
|
||||
}
|
||||
|
||||
glibtop_closure *
|
||||
glibtop_backend_get_closure_data (glibtop_backend *backend)
|
||||
{
|
||||
g_return_val_if_fail (GLIBTOP_IS_BACKEND (backend), NULL);
|
||||
|
||||
return backend->_priv->closure_data;
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_backend_set_closure_data (glibtop_backend *backend,
|
||||
glibtop_closure *closure)
|
||||
{
|
||||
g_return_if_fail (GLIBTOP_IS_BACKEND (backend));
|
||||
g_return_if_fail (backend->_priv->closure_data == NULL);
|
||||
|
||||
backend->_priv->closure_data = closure;
|
||||
}
|
34
lib/glibtop-client-private.h
Normal file
34
lib/glibtop-client-private.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 2.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_CLIENT_PRIVATE_H__
|
||||
#define __GLIBTOP_CLIENT_PRIVATE_H__
|
||||
|
||||
struct _glibtop_client_private
|
||||
{
|
||||
GSList *backend_list;
|
||||
};
|
||||
|
||||
#endif
|
257
lib/glibtop-client.c
Normal file
257
lib/glibtop-client.c
Normal file
@@ -0,0 +1,257 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 2.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <glibtop.h>
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
static void glibtop_client_class_init (glibtop_client_class *klass);
|
||||
static void glibtop_client_init (glibtop_client *client);
|
||||
static void glibtop_client_finalize (GObject *object);
|
||||
|
||||
static gpointer parent_class = NULL;
|
||||
|
||||
#include <glibtop-client-private.h>
|
||||
|
||||
enum {
|
||||
GLIBTOP_CLIENT_SIGNAL_ERROR,
|
||||
GLIBTOP_CLIENT_SIGNAL_WARNING,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
static guint glibtop_client_signals [LAST_SIGNAL] = { 0 };
|
||||
|
||||
GType
|
||||
glibtop_client_get_type (void)
|
||||
{
|
||||
static GType glibtop_client_type = 0;
|
||||
|
||||
if (!glibtop_client_type) {
|
||||
static const GTypeInfo glibtop_client_info = {
|
||||
sizeof (glibtop_client_class),
|
||||
NULL, /* base_class_init */
|
||||
NULL, /* base_class_finalize */
|
||||
(GClassInitFunc) glibtop_client_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (glibtop_client),
|
||||
16, /* n_preallocs */
|
||||
(GInstanceInitFunc) glibtop_client_init,
|
||||
};
|
||||
|
||||
glibtop_client_type = g_type_register_static
|
||||
(G_TYPE_OBJECT, "glibtop_client", &glibtop_client_info, 0);
|
||||
}
|
||||
|
||||
return glibtop_client_type;
|
||||
}
|
||||
|
||||
static void
|
||||
glibtop_client_error_handler (glibtop_client *client, GError *error)
|
||||
{
|
||||
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
|
||||
|
||||
if (error == NULL)
|
||||
return;
|
||||
|
||||
g_error ("%s (%d): %s", g_quark_to_string (error->domain),
|
||||
error->code, error->message);
|
||||
}
|
||||
|
||||
static void
|
||||
glibtop_client_warning_handler (glibtop_client *client, GError *error)
|
||||
{
|
||||
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
|
||||
|
||||
if (error == NULL)
|
||||
return;
|
||||
|
||||
g_warning ("%s (%d): %s", g_quark_to_string (error->domain),
|
||||
error->code, error->message);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
glibtop_client_class_init (glibtop_client_class *klass)
|
||||
{
|
||||
GObjectClass *gobject_class;
|
||||
|
||||
gobject_class = (GObjectClass *) klass;
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
glibtop_client_signals [GLIBTOP_CLIENT_SIGNAL_ERROR] =
|
||||
g_signal_new ("error",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (glibtop_client_class, error),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__POINTER,
|
||||
G_TYPE_NONE, 1, G_TYPE_POINTER, NULL);
|
||||
|
||||
glibtop_client_signals [GLIBTOP_CLIENT_SIGNAL_WARNING] =
|
||||
g_signal_new ("warning",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (glibtop_client_class, warning),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__POINTER,
|
||||
G_TYPE_NONE, 1, G_TYPE_POINTER, NULL);
|
||||
|
||||
klass->error = glibtop_client_error_handler;
|
||||
klass->warning = glibtop_client_warning_handler;
|
||||
|
||||
gobject_class->finalize = glibtop_client_finalize;
|
||||
}
|
||||
|
||||
static void
|
||||
glibtop_client_init (glibtop_client *glibtop)
|
||||
{
|
||||
glibtop_client_private *priv;
|
||||
|
||||
priv = g_new0 (glibtop_client_private, 1);
|
||||
glibtop->_priv = priv;
|
||||
}
|
||||
|
||||
static void
|
||||
glibtop_client_finalize (GObject *object)
|
||||
{
|
||||
glibtop_client *glibtop;
|
||||
glibtop_client_private *priv = NULL;
|
||||
GSList *c;
|
||||
|
||||
glibtop = GLIBTOP_CLIENT (object);
|
||||
priv = glibtop->_priv;
|
||||
|
||||
for (c = priv->backend_list; c; c = c->next)
|
||||
g_object_unref (G_OBJECT (c->data));
|
||||
g_slist_free (priv->backend_list);
|
||||
|
||||
g_free (priv);
|
||||
|
||||
if (G_OBJECT_CLASS (parent_class)->finalize)
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
glibtop_client *
|
||||
glibtop_client_new (void)
|
||||
{
|
||||
return g_object_new (GLIBTOP_TYPE_CLIENT, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_client_propagate_error (glibtop_client *client, GError *error)
|
||||
{
|
||||
GValue params [2] = { { 0, }, { 0, } };
|
||||
|
||||
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
|
||||
|
||||
if (error == NULL)
|
||||
return;
|
||||
|
||||
g_value_init (params, GLIBTOP_CLIENT_TYPE (client));
|
||||
g_value_set_object (params, G_OBJECT (client));
|
||||
|
||||
g_value_init (params + 1, G_TYPE_POINTER);
|
||||
g_value_set_pointer (params + 1, error);
|
||||
|
||||
g_signal_emitv (params,
|
||||
glibtop_client_signals [GLIBTOP_CLIENT_SIGNAL_ERROR],
|
||||
0, NULL);
|
||||
|
||||
g_value_unset (params + 1);
|
||||
g_value_unset (params + 0);
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_client_propagate_warning (glibtop_client *client, GError *error)
|
||||
{
|
||||
GValue params [2] = { { 0, }, { 0, } };
|
||||
|
||||
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
|
||||
|
||||
if (error == NULL)
|
||||
return;
|
||||
|
||||
g_value_init (params, GLIBTOP_CLIENT_TYPE (client));
|
||||
g_value_set_object (params, G_OBJECT (client));
|
||||
|
||||
g_value_init (params + 1, G_TYPE_POINTER);
|
||||
g_value_set_pointer (params + 1, error);
|
||||
|
||||
g_signal_emitv (params,
|
||||
glibtop_client_signals [GLIBTOP_CLIENT_SIGNAL_WARNING],
|
||||
0, NULL);
|
||||
|
||||
g_value_unset (params + 1);
|
||||
g_value_unset (params + 0);
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_client_open_backend (glibtop_client *client, const char *backend_name,
|
||||
u_int64_t features, const char **backend_args)
|
||||
{
|
||||
glibtop_backend *backend;
|
||||
GError *error = NULL;
|
||||
|
||||
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
|
||||
|
||||
backend = glibtop_backend_get (backend_name, features, backend_args,
|
||||
&error);
|
||||
if (!backend) {
|
||||
glibtop_client_propagate_error (client, error);
|
||||
g_error_free (error);
|
||||
return;
|
||||
}
|
||||
|
||||
glibtop_client_add_backend (client, backend);
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_client_add_backend (glibtop_client *client,
|
||||
glibtop_backend *backend)
|
||||
{
|
||||
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
|
||||
g_return_if_fail (GLIBTOP_IS_BACKEND (backend));
|
||||
|
||||
client->_priv->backend_list = g_slist_append
|
||||
(client->_priv->backend_list, backend);
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_client_remove_backend (glibtop_client *client,
|
||||
glibtop_backend *backend)
|
||||
{
|
||||
GSList *c;
|
||||
|
||||
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
|
||||
g_return_if_fail (GLIBTOP_IS_BACKEND (backend));
|
||||
|
||||
c = g_slist_find (client->_priv->backend_list, backend);
|
||||
if (!c) return;
|
||||
|
||||
g_slist_remove_link (client->_priv->backend_list, c);
|
||||
g_object_unref (G_OBJECT (backend));
|
||||
}
|
38
lib/glibtop-server-private.h
Normal file
38
lib/glibtop-server-private.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GLIBTOP_SERVER_PRIVATE_H__
|
||||
#define __GLIBTOP_SERVER_PRIVATE_H__
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
typedef struct _glibtop_server_private glibtop_server_private;
|
||||
|
||||
struct _glibtop_server_private
|
||||
{
|
||||
GSList *backend_list;
|
||||
};
|
||||
|
||||
#endif
|
58
lib/glibtop-server.c
Normal file
58
lib/glibtop-server.c
Normal file
@@ -0,0 +1,58 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 2.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop-server-private.h>
|
||||
|
||||
glibtop_server *
|
||||
glibtop_server_new (void)
|
||||
{
|
||||
glibtop_server *retval;
|
||||
|
||||
retval = g_new0 (glibtop_server, 1);
|
||||
retval->info = g_new0 (glibtop_server_info, 1);
|
||||
retval->_priv = g_new0 (glibtop_server_private, 1);
|
||||
retval->refcount = 1;
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_server_ref (glibtop_server *server)
|
||||
{
|
||||
server->refcount++;
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_server_unref (glibtop_server *server)
|
||||
{
|
||||
server->refcount--;
|
||||
|
||||
if (server->refcount <= 0) {
|
||||
g_free (server->_priv);
|
||||
g_free (server->info);
|
||||
g_free (server);
|
||||
}
|
||||
}
|
104
lib/structures.pl
Normal file
104
lib/structures.pl
Normal file
@@ -0,0 +1,104 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
die "Usage: $0 features.def structures.def" unless $#ARGV == 2;
|
||||
|
||||
$[ = 1; # set array base to 1
|
||||
$, = ' '; # set output field separator
|
||||
$\ = "\n"; # set output record separator
|
||||
|
||||
sub toupper {
|
||||
local($_) = @_;
|
||||
tr/a-z/A-Z/;
|
||||
return $_;
|
||||
}
|
||||
|
||||
sub tolower {
|
||||
local($_) = @_;
|
||||
tr/A-Z/a-z/;
|
||||
return $_;
|
||||
}
|
||||
|
||||
$structures{$structure_count++} = 'glibtop';
|
||||
|
||||
open FEATURESDEF, $ARGV[1] or
|
||||
die "open ($ARGV[1]): $!";
|
||||
|
||||
while (<FEATURESDEF>) {
|
||||
chop; # strip record separator
|
||||
|
||||
if (/^[^\#]/) {
|
||||
&parse_features_def ($_);
|
||||
}
|
||||
}
|
||||
|
||||
close FEATURESDEF;
|
||||
|
||||
open STRUCTDEF, $ARGV[2] or
|
||||
die "open ($ARGV[2]): $!";
|
||||
|
||||
while (<STRUCTDEF>) {
|
||||
chop; # strip record separator
|
||||
|
||||
if (/^[^\#]/) {
|
||||
&parse_structure_def ($_);
|
||||
}
|
||||
}
|
||||
|
||||
close STRUCTDEF;
|
||||
|
||||
$init_structures_code = sprintf
|
||||
(qq[\tscm_glibtop_structure_tags [GLIBTOP_STRUCTURE_GLIBTOP] = scm_make_structure_type\n\t\t("glibtop", sizeof (glibtop));\n]);
|
||||
|
||||
for ($nr = 0; $nr < $structure_count; $nr++) {
|
||||
$structure = $structures{$nr};
|
||||
|
||||
$init_structures_code .= sprintf
|
||||
(qq[\tscm_glibtop_structure_tags [GLIBTOP_STRUCTURE_%s] = scm_make_structure_type\n\t\t("%s", sizeof (%s));\n],
|
||||
toupper($structure), $structure, $structure);
|
||||
}
|
||||
|
||||
print qq[/* structures.h */];
|
||||
print qq[/* This is a generated file. Please modify \`guile.pl\' */];
|
||||
print '';
|
||||
print qq[\#ifndef __GLIBTOP_STRUCTURES_H__];
|
||||
print qq[\#define __GLIBTOP_STRUCTURES_H__];
|
||||
print '';
|
||||
print qq[\#include <glibtop.h>];
|
||||
print '';
|
||||
print qq[BEGIN_LIBGTOP_DECLS];
|
||||
print '';
|
||||
|
||||
for ($nr = 0; $nr < $structure_count; $nr++) {
|
||||
$structure = $structures{$nr};
|
||||
|
||||
printf (qq[\#define %-40s\t%d\n], 'GLIBTOP_STRUCTURE_'.&toupper($structure), $nr);
|
||||
}
|
||||
|
||||
print '';
|
||||
printf (qq[\#define %-40s\t%d\n], 'GLIBTOP_MAX_STRUCTURES', $structure_count);
|
||||
print '';
|
||||
print qq[END_LIBGTOP_DECLS];
|
||||
print '';
|
||||
print qq[\#endif /* __GLIBTOP_STRUCTURES_H__ */];
|
||||
|
||||
sub parse_features_def {
|
||||
local($line) = @_;
|
||||
@line_fields = split(/\|/, $line, 9999);
|
||||
$retval = $line_fields[1];
|
||||
$element_def = $line_fields[3];
|
||||
$feature = $line_fields[2];
|
||||
$param_def = $line_fields[4];
|
||||
|
||||
$feature =~ s/^@//;
|
||||
$features{$feature} = $feature;
|
||||
|
||||
$structures{$structure_count++} = 'glibtop_'.$feature;
|
||||
}
|
||||
|
||||
sub parse_structure_def {
|
||||
local($line) = @_;
|
||||
@line_fields = split(/\|/, $line, 9999);
|
||||
$name = $line_fields[1];
|
||||
|
||||
$structures{$structure_count++} = $name;
|
||||
}
|
74
lib/test-backends.c
Normal file
74
lib/test-backends.c
Normal file
@@ -0,0 +1,74 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <glibtop.h>
|
||||
|
||||
#include <glibtop/cpu.h>
|
||||
|
||||
int
|
||||
main (int argc, char *argv [])
|
||||
{
|
||||
glibtop_client *client;
|
||||
glibtop_backend *backend_common;
|
||||
glibtop_backend *backend_sysdeps;
|
||||
GError *error = NULL;
|
||||
glibtop_cpu cpu;
|
||||
|
||||
g_type_init ();
|
||||
|
||||
client = glibtop_client_new ();
|
||||
|
||||
backend_common = glibtop_backend_get ("glibtop-backend-common",
|
||||
0, NULL, &error);
|
||||
|
||||
if (error != NULL) {
|
||||
glibtop_client_propagate_warning (client, error);
|
||||
g_error_free (error);
|
||||
error = NULL;
|
||||
}
|
||||
|
||||
g_message (G_STRLOC ": backend = %p", backend_common);
|
||||
|
||||
if (backend_common != NULL)
|
||||
glibtop_client_add_backend (client, backend_common);
|
||||
|
||||
backend_sysdeps = glibtop_backend_get ("glibtop-backend-sysdeps-stub",
|
||||
0, NULL, &error);
|
||||
|
||||
if (error != NULL) {
|
||||
glibtop_client_propagate_warning (client, error);
|
||||
g_error_free (error);
|
||||
error = NULL;
|
||||
}
|
||||
|
||||
g_message (G_STRLOC ": backend = %p", backend_sysdeps);
|
||||
|
||||
if (backend_sysdeps != NULL)
|
||||
glibtop_client_add_backend (client, backend_sysdeps);
|
||||
|
||||
glibtop_get_cpu_l (client, &cpu);
|
||||
|
||||
exit (0);
|
||||
}
|
98
lib/xmalloc.c
Normal file
98
lib/xmalloc.c
Normal file
@@ -0,0 +1,98 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1998-99 Martin Baulig
|
||||
This file is part of LibGTop 1.0.
|
||||
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
LibGTop 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 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
LibGTop 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 LibGTop; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <glibtop/xmalloc.h>
|
||||
|
||||
#ifdef LIBGTOP_USE_GLIB_MALLOC
|
||||
#include <glib.h>
|
||||
#endif
|
||||
|
||||
/* Wrappers to malloc, calloc, realloc ... */
|
||||
|
||||
void *
|
||||
glibtop_malloc_r (glibtop_server *server, size_t size)
|
||||
{
|
||||
#ifdef LIBGTOP_USE_GLIB_MALLOC
|
||||
return g_malloc0 (size);
|
||||
#else
|
||||
void *buf = malloc (size);
|
||||
|
||||
if (!buf)
|
||||
glibtop_error_io_r (server, "malloc %d bytes", size);
|
||||
|
||||
return buf;
|
||||
#endif
|
||||
}
|
||||
|
||||
void *
|
||||
glibtop_calloc_r (glibtop_server *server, size_t nmemb, size_t size)
|
||||
{
|
||||
#ifdef LIBGTOP_USE_GLIB_MALLOC
|
||||
return g_malloc0 (size * nmemb);
|
||||
#else
|
||||
void *buf = calloc (nmemb, size);
|
||||
|
||||
if (!buf)
|
||||
glibtop_error_io_r (server, "calloc %d blocks (%d bytes each)",
|
||||
nmemb, size);
|
||||
|
||||
return buf;
|
||||
#endif
|
||||
}
|
||||
|
||||
void *
|
||||
glibtop_realloc_r (glibtop_server *server, void *ptr, size_t size)
|
||||
{
|
||||
#ifdef LIBGTOP_USE_GLIB_MALLOC
|
||||
return g_realloc (ptr, size);
|
||||
#else
|
||||
void *buf = realloc (ptr, size);
|
||||
|
||||
if (!buf)
|
||||
glibtop_error_io_r (server, "realloc %d bytes", size);
|
||||
|
||||
return buf;
|
||||
#endif
|
||||
}
|
||||
|
||||
char *
|
||||
glibtop_strdup_r (glibtop_server *server, const char *string)
|
||||
{
|
||||
#ifdef LIBGTOP_USE_GLIB_MALLOC
|
||||
return g_strdup (string);
|
||||
#else
|
||||
return strcpy (glibtop_malloc_r (server, strlen (string) + 1), string);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
glibtop_free_r (glibtop_server *server, void *ptr)
|
||||
{
|
||||
#ifdef LIBGTOP_USE_GLIB_MALLOC
|
||||
g_free (ptr);
|
||||
#else
|
||||
if (ptr) free ((void *) ptr);
|
||||
#endif
|
||||
}
|
8
misc/README.indent
Normal file
8
misc/README.indent
Normal file
@@ -0,0 +1,8 @@
|
||||
The indentation in LibGTop was done with the following command:
|
||||
|
||||
find . -name \*.[ch] | xargs -i emacs -batch {} \
|
||||
-l /gnome/compile/libgtop/misc/format.el -f save-buffer
|
||||
|
||||
December 26, 1999
|
||||
Martin
|
||||
|
5
misc/format.el
Normal file
5
misc/format.el
Normal file
@@ -0,0 +1,5 @@
|
||||
(setq c-basic-offset 4)
|
||||
(if (not (word-search-forward "Mode: C" nil t))
|
||||
(insert-string "/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */\n\n"))
|
||||
(mark-whole-buffer)
|
||||
(indent-region (region-beginning) (region-end) nil)
|
76
po/ChangeLog
76
po/ChangeLog
@@ -1,3 +1,79 @@
|
||||
2003-10-25 Christian Neumair <chris@gnome-de.org>
|
||||
|
||||
* de.po: Updated German translation.
|
||||
|
||||
2003-10-22 Vincent van Adrighem <adrighem@gnome.org>
|
||||
|
||||
* nl.po: Dutch translation updated by Vincent van Adrighem.
|
||||
|
||||
2003-10-22 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* sv.po: Updated Swedish translation.
|
||||
|
||||
2003-10-21 Christian Neumair <chris@gnome-de.org>
|
||||
|
||||
* de.po: Updated German translation.
|
||||
|
||||
2003-10-21 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* sv.po: Updated Swedish translation.
|
||||
|
||||
2003-10-19 Carlos Perelló Marín <carlos@gnome.org>
|
||||
|
||||
* POTFILES.ignore: Removed, we use now POTFILES.skip
|
||||
|
||||
2003-10-01 Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>
|
||||
|
||||
* pt_BR.po: Applied revision by Augusta Marques da Silva
|
||||
<augusta.marques@gmx.net>.
|
||||
|
||||
2003-09-30 Laurent Dhima <laurenti@alblinux.net>
|
||||
|
||||
* sq.po: Added Albanian translation.
|
||||
|
||||
2003-09-17 Fatih Demir <kabalak@gtranslator.org>
|
||||
|
||||
* ta.po: Committed new Tamil translation by Dinesh.
|
||||
|
||||
2003-09-13 Carlos Perelló Marín <carlos@gnome.org>
|
||||
|
||||
* es_ES.po, LEEME.es: Removed, it's only for one string that is a
|
||||
comment and procman is not using it. This modules is not maintained
|
||||
and all people tells that should die so I don't think that any other
|
||||
application will use it in the near future. This one is related with
|
||||
the bug #105676
|
||||
|
||||
2003-09-08 Mugurel Tudor <mugurelu@go.ro>
|
||||
|
||||
* ro.po: Updated Romanian translation by
|
||||
Mişu Moldovan <dumol@go.ro>
|
||||
|
||||
2003-09-06 Taneem Ahmed <taneem@bengalinux.org>
|
||||
|
||||
* bn.po: Added Bangla translation by Vat
|
||||
of Ankur group <gnome-translation@bengalinux.org>.
|
||||
|
||||
2003-08-28 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
|
||||
|
||||
* es.po: Revision of Spanish translation by
|
||||
Francisco Javier F. Serrador <serrador@arrakis.es>.
|
||||
|
||||
2003-08-28 Alessio Frusciante <algol@firenze.linux.it>
|
||||
|
||||
* it.po: Updated Italian translation.
|
||||
|
||||
2003-08-25 Duarte Loreto <happyguy_pt@hotmail.com>
|
||||
|
||||
* pt.po: Fixed typos in Portuguese translation.
|
||||
|
||||
2003-08-18 Metin Amiroff <metin@karegen.com>
|
||||
|
||||
* az.po: Updated Azerbaijani translation.
|
||||
|
||||
2003-08-13 Guntupalli Karunakar <karunakar@freedomink.org>
|
||||
|
||||
* hi.po: Added Hindi translation.
|
||||
|
||||
2003-08-09 Dafydd Harries <daf@parnassus.ath.cx>
|
||||
|
||||
* cy.po: Added Welsh translation.
|
||||
|
29
po/LEEME.es
29
po/LEEME.es
@@ -1,29 +0,0 @@
|
||||
[ This file explains why there is a incomplete es_ES.po in adition
|
||||
to the es.po; that is on purpose ]
|
||||
|
||||
El archivo para el locale es_ES solo existe porque en este paises se usa
|
||||
una representaci<EFBFBD>n de los n<EFBFBD>meros diferente de la que se usa en los dem<EFBFBD>s
|
||||
paises de habla espa<EFBFBD>ola, en el continente americano usan el sistema
|
||||
anglosaj<EFBFBD>n, esdecir 1,000 en vez de 1.000 para 'mil' y como son m<EFBFBD>s los paises
|
||||
que usan el sistema anglosaj<EFBFBD>n se ha dejado esa representaci<EFBFBD>n en el es.po.
|
||||
|
||||
Por ello solo es necesario traducir aquellas ocurrencias donde aparezcan
|
||||
n<EFBFBD>meros; no hace falta perder el tiempo traduciendo en doble lo dem<EFBFBD>s;
|
||||
el sistema de internacionalizaci<EFBFBD>n de GNU gettext es lo suficientemente
|
||||
inteligente como para buscar las traducciones en la locale 'es' cuando no
|
||||
las encuentra en una 'es_ES' m<EFBFBD>s espec<EFBFBD>fica.
|
||||
|
||||
Tambi<EFBFBD>n podriase crear un es_ES para traducir aquellos terminos que difieren
|
||||
en Espa<EFBFBD>a y Am<EFBFBD>rica (ej: computadora/ordenador, archivo/fichero, <EFBFBD>cono/icono),
|
||||
si alg<EFBFBD>n espa<EFBFBD>ol tiene ganas de encargarse de ello, bienvenido.
|
||||
Notese que solo es necesario traducir aquellas cadenas de texto para las
|
||||
cuales se usan terminos diferentes en Espa<EFBFBD>a; no es necesario traducir las
|
||||
dem<EFBFBD>s, con que est<EFBFBD>n en la traducci<EFBFBD>n general 'es' ya basta.
|
||||
|
||||
Pablo Saratxaga
|
||||
<srtxg@chanae.alphanet.ch>
|
||||
|
||||
Actualizado por
|
||||
Carlos Perell<EFBFBD> Mar<EFBFBD>n
|
||||
<carlos@gnome-db.org>
|
||||
|
248
po/Makefile.in.in.in
Normal file
248
po/Makefile.in.in.in
Normal file
@@ -0,0 +1,248 @@
|
||||
# Makefile for program source directory in GNU NLS utilities package.
|
||||
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
||||
#
|
||||
# This file file be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
|
||||
PACKAGE = @LIBGTOP_PACKAGE@
|
||||
VERSION = @VERSION@
|
||||
|
||||
SHELL = /bin/sh
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
datadir = $(prefix)/@DATADIRNAME@
|
||||
localedir = $(datadir)/locale
|
||||
gnulocaledir = $(prefix)/share/locale
|
||||
gettextsrcdir = $(prefix)/share/gettext/po
|
||||
subdir = po
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
|
||||
|
||||
CC = @CC@
|
||||
GENCAT = @GENCAT@
|
||||
GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
|
||||
MSGFMT = @MSGFMT@
|
||||
XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
|
||||
MSGMERGE = PATH=../src:$$PATH msgmerge
|
||||
|
||||
DEFS = @DEFS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
|
||||
INCLUDES = -I.. -I$(top_srcdir)/intl
|
||||
|
||||
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
|
||||
|
||||
SOURCES = cat-id-tbl.c
|
||||
POFILES = @POFILES@
|
||||
GMOFILES = @GMOFILES@
|
||||
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
|
||||
stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
|
||||
|
||||
POTFILES = \
|
||||
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) $<
|
||||
|
||||
.po.pox:
|
||||
$(MAKE) $(PACKAGE).pot
|
||||
$(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
|
||||
|
||||
.po.mo:
|
||||
$(MSGFMT) -o $@ $<
|
||||
|
||||
.po.gmo:
|
||||
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
|
||||
&& rm -f $$file && $(GMSGFMT) -o $$file $<
|
||||
|
||||
.po.cat:
|
||||
sed -f ../intl/po2msg.sed < $< > $*.msg \
|
||||
&& rm -f $@ && $(GENCAT) $@ $*.msg
|
||||
|
||||
|
||||
all: all-@USE_NLS@
|
||||
|
||||
all-yes: cat-id-tbl.c $(CATALOGS)
|
||||
all-no:
|
||||
|
||||
$(srcdir)/$(PACKAGE).pot: $(POTFILES)
|
||||
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
|
||||
--add-comments --keyword=_ --keyword=N_ \
|
||||
--files-from=$(srcdir)/POTFILES.in \
|
||||
&& test ! -f $(PACKAGE).po \
|
||||
|| ( rm -f $(srcdir)/$(PACKAGE).pot \
|
||||
&& mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
|
||||
|
||||
$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
|
||||
$(srcdir)/stamp-cat-id: $(PACKAGE).pot
|
||||
rm -f cat-id-tbl.tmp
|
||||
sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
|
||||
| sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
|
||||
if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
|
||||
rm cat-id-tbl.tmp; \
|
||||
else \
|
||||
echo cat-id-tbl.c changed; \
|
||||
rm -f $(srcdir)/cat-id-tbl.c; \
|
||||
mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
|
||||
fi
|
||||
cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
|
||||
|
||||
|
||||
install: install-exec install-data
|
||||
install-exec:
|
||||
install-data: install-data-@USE_NLS@
|
||||
install-data-no: all
|
||||
install-data-yes: all
|
||||
if test -r "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $(datadir); \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $(datadir); \
|
||||
fi
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
case "$$cat" in \
|
||||
*.gmo) destdir=$(gnulocaledir);; \
|
||||
*) destdir=$(localedir);; \
|
||||
esac; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
dir=$$destdir/$$lang/LC_MESSAGES; \
|
||||
if test -r "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $$dir; \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
|
||||
fi; \
|
||||
if test -r $$cat; then \
|
||||
$(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
|
||||
echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
|
||||
else \
|
||||
$(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
|
||||
echo "installing $(srcdir)/$$cat as" \
|
||||
"$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
|
||||
fi; \
|
||||
if test -r $$cat.m; then \
|
||||
$(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
|
||||
else \
|
||||
if test -r $(srcdir)/$$cat.m ; then \
|
||||
$(INSTALL_DATA) $(srcdir)/$$cat.m \
|
||||
$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
echo "installing $(srcdir)/$$cat as" \
|
||||
"$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
|
||||
else \
|
||||
true; \
|
||||
fi; \
|
||||
fi; \
|
||||
done
|
||||
if test "$(PACKAGE)" = "gettext"; then \
|
||||
if test -r "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $(gettextsrcdir); \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
|
||||
fi; \
|
||||
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
|
||||
$(gettextsrcdir)/Makefile.in.in; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
|
||||
# Define this as empty until I found a useful application.
|
||||
installcheck:
|
||||
|
||||
uninstall:
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
|
||||
rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
|
||||
rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
done
|
||||
rm -f $(gettextsrcdir)/po-Makefile.in.in
|
||||
|
||||
check: all
|
||||
|
||||
cat-id-tbl.o: ../intl/libgettext.h
|
||||
|
||||
dvi info tags TAGS ID:
|
||||
|
||||
mostlyclean:
|
||||
rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
|
||||
rm -fr *.o
|
||||
|
||||
clean: mostlyclean
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
|
||||
|
||||
maintainer-clean: distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
rm -f $(GMOFILES)
|
||||
|
||||
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
dist distdir: update-po $(DISTFILES)
|
||||
dists="$(DISTFILES)"; \
|
||||
for file in $$dists; do \
|
||||
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|
||||
|| cp -p $(srcdir)/$$file $(distdir); \
|
||||
done
|
||||
|
||||
update-po: Makefile
|
||||
$(MAKE) $(PACKAGE).pot
|
||||
PATH=`pwd`/../src:$$PATH; \
|
||||
cd $(srcdir); \
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
mv $$lang.po $$lang.old.po; \
|
||||
echo "$$lang:"; \
|
||||
if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
|
||||
rm -f $$lang.old.po; \
|
||||
else \
|
||||
echo "msgmerge for $$cat failed!"; \
|
||||
rm -f $$lang.po; \
|
||||
mv $$lang.old.po $$lang.po; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
POTFILES: POTFILES.in
|
||||
( if test 'x$(srcdir)' != 'x.'; then \
|
||||
posrcprefix='$(top_srcdir)/'; \
|
||||
else \
|
||||
posrcprefix="../"; \
|
||||
fi; \
|
||||
rm -f $@-t $@ \
|
||||
&& (sed -e '/^#/d' -e '/^[ ]*$$/d' \
|
||||
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
|
||||
| sed -e '$$s/\\$$//') > $@-t \
|
||||
&& chmod a-w $@-t \
|
||||
&& mv $@-t $@ )
|
||||
|
||||
Makefile: Makefile.in.in ../config.status POTFILES
|
||||
cd .. \
|
||||
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
|
||||
$(SHELL) ./config.status
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make not to export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
@@ -1,6 +0,0 @@
|
||||
#Please remember + in front of the files that should be ignored
|
||||
#Please keep these files in alphabetic order
|
||||
|
||||
#Shouldn't be translated according to Martin:
|
||||
+kernel/table20/unistd-i386.h
|
||||
+kernel/table21/unistd-i386.h
|
4
po/POTFILES.skip
Normal file
4
po/POTFILES.skip
Normal file
@@ -0,0 +1,4 @@
|
||||
support/error.c
|
||||
support/getopt.c
|
||||
support/popt.c
|
||||
support/popthelp.c
|
446
po/az.po
446
po/az.po
@@ -5,7 +5,8 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop\n"
|
||||
"POT-Creation-Date: 2003-07-10 05:08+0200\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2003-08-11 12:38+0200\n"
|
||||
"PO-Revision-Date: 2003-07-10 21:45+0200\n"
|
||||
"Last-Translator: Mətin Əmirov <metin@karegen.com>\n"
|
||||
"Language-Team: Azerbaijani <gnome@azitt.com>\n"
|
||||
@@ -22,13 +23,11 @@ msgstr "Tiklər (saniyə başına %ld):"
|
||||
msgid "Total"
|
||||
msgstr "Toplam"
|
||||
|
||||
#: examples/smp.c:74
|
||||
#: sysdeps/names/mem.c:47
|
||||
#: examples/smp.c:74 sysdeps/names/mem.c:47
|
||||
msgid "User"
|
||||
msgstr "İstifadəçi"
|
||||
|
||||
#: examples/smp.c:74
|
||||
#: sysdeps/names/procuid.c:58
|
||||
#: examples/smp.c:74 sysdeps/names/procuid.c:58
|
||||
msgid "Nice"
|
||||
msgstr "Nice"
|
||||
|
||||
@@ -42,9 +41,11 @@ msgstr "Idle"
|
||||
|
||||
#: examples/smp.c:76
|
||||
#, c-format
|
||||
msgid "CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
|
||||
msgid ""
|
||||
"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
|
||||
"\n"
|
||||
msgstr "CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
|
||||
msgstr ""
|
||||
"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
|
||||
"\n"
|
||||
|
||||
#: examples/smp.c:80
|
||||
@@ -78,9 +79,11 @@ msgstr "Idle (%)"
|
||||
|
||||
#: examples/smp.c:101
|
||||
#, c-format
|
||||
msgid "CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
|
||||
msgid ""
|
||||
"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
|
||||
"\n"
|
||||
msgstr "CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
|
||||
msgstr ""
|
||||
"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
|
||||
"\n"
|
||||
|
||||
#: examples/smp.c:117
|
||||
@@ -145,9 +148,11 @@ msgstr "INETD"
|
||||
|
||||
#: src/daemon/gnuserv.c:493
|
||||
#, c-format
|
||||
msgid "Error on option %s: %s.\n"
|
||||
msgid ""
|
||||
"Error on option %s: %s.\n"
|
||||
"Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr "%s şərhində xəta oldü %s.\n"
|
||||
msgstr ""
|
||||
"%s şərhində xəta oldü %s.\n"
|
||||
"'%s --help' əmrindən bütün əmr sətiri seçənəkləri üçün işə salın.\n"
|
||||
|
||||
#: support/error.c:109
|
||||
@@ -169,8 +174,7 @@ msgstr "%s: '--%s' seçənəyi arqument almır\n"
|
||||
msgid "%s: option `%c%s' doesn't allow an argument\n"
|
||||
msgstr "%s; '%c%s' seçənəyi arqument almır\n"
|
||||
|
||||
#: support/getopt.c:715
|
||||
#: support/getopt.c:888
|
||||
#: support/getopt.c:715 support/getopt.c:888
|
||||
#, c-format
|
||||
msgid "%s: option `%s' requires an argument\n"
|
||||
msgstr "%s: '%s' seçənəyi arqumentə ehtiyac hiss edər\n"
|
||||
@@ -199,8 +203,7 @@ msgid "%s: invalid option -- %c\n"
|
||||
msgstr "%s: %c -- seçənəyi keçərsizdir\n"
|
||||
|
||||
#. 1003.2 specifies the format of this message.
|
||||
#: support/getopt.c:807
|
||||
#: support/getopt.c:937
|
||||
#: support/getopt.c:807 support/getopt.c:937
|
||||
#, c-format
|
||||
msgid "%s: option requires an argument -- %c\n"
|
||||
msgstr "%s: seçənəyi arqumentə ehtiyac hiss edir --%c\n"
|
||||
@@ -267,28 +270,23 @@ msgstr "SMP Sistem Modunda işlədilən CPU vaxtı"
|
||||
msgid "SMP CPU Time in the Idle Task"
|
||||
msgstr "SMP Idle oturumu CPU vaxtı"
|
||||
|
||||
#: sysdeps/names/cpu.c:58
|
||||
#: sysdeps/names/cpu.c:64
|
||||
#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64
|
||||
msgid "Number of clock ticks since system boot"
|
||||
msgstr "Sistem başladıldığından e'tibarən keçen saat tikləri"
|
||||
|
||||
#: sysdeps/names/cpu.c:59
|
||||
#: sysdeps/names/cpu.c:65
|
||||
#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65
|
||||
msgid "Number of clock ticks the system spent in user mode"
|
||||
msgstr "Sistemin istifadəçi modunda keçirdiyi saat tikləri"
|
||||
|
||||
#: sysdeps/names/cpu.c:60
|
||||
#: sysdeps/names/cpu.c:66
|
||||
#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66
|
||||
msgid "Number of clock ticks the system spent in user mode (nice)"
|
||||
msgstr "Sistemin istifadəçi modunda keçirdiyi saat tikləri (nice)"
|
||||
|
||||
#: sysdeps/names/cpu.c:61
|
||||
#: sysdeps/names/cpu.c:67
|
||||
#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67
|
||||
msgid "Number of clock ticks the system spent in system mode"
|
||||
msgstr "Sistemin sistem modunda keçirdiyi saat tikləri"
|
||||
|
||||
#: sysdeps/names/cpu.c:62
|
||||
#: sysdeps/names/cpu.c:68
|
||||
#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68
|
||||
msgid "Number of clock ticks the system spent in the idle task"
|
||||
msgstr "Sistemin idle oturumunda keçirdiyi saat tikləri"
|
||||
|
||||
@@ -296,8 +294,7 @@ msgstr "Sistemin idle oturumunda keçirdiyi saat tikləri"
|
||||
msgid "Tick frequency (default is 100)"
|
||||
msgstr "Tick sıxlığı (əsas 100 dür)"
|
||||
|
||||
#: sysdeps/names/fsusage.c:39
|
||||
#: sysdeps/names/fsusage.c:48
|
||||
#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48
|
||||
msgid "Total blocks"
|
||||
msgstr "Total blok sayısı"
|
||||
|
||||
@@ -309,13 +306,11 @@ msgstr "Boş blok sayısı"
|
||||
msgid "Available blocks"
|
||||
msgstr "Mövcud blok sayısı"
|
||||
|
||||
#: sysdeps/names/fsusage.c:42
|
||||
#: sysdeps/names/fsusage.c:51
|
||||
#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51
|
||||
msgid "Total file nodes"
|
||||
msgstr "Ümumi dosye düyümləri"
|
||||
|
||||
#: sysdeps/names/fsusage.c:43
|
||||
#: sysdeps/names/fsusage.c:52
|
||||
#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52
|
||||
msgid "Free file nodes"
|
||||
msgstr "Boş dosye düyümləri"
|
||||
|
||||
@@ -339,8 +334,7 @@ msgstr "İşləyən Vəzifə"
|
||||
msgid "Number of Tasks"
|
||||
msgstr "Vəzifə Sayısı"
|
||||
|
||||
#: sysdeps/names/loadavg.c:42
|
||||
#: sysdeps/names/loadavg.c:50
|
||||
#: sysdeps/names/loadavg.c:42 sysdeps/names/loadavg.c:50
|
||||
msgid "Last PID"
|
||||
msgstr "Son PID"
|
||||
|
||||
@@ -416,70 +410,53 @@ msgstr "İstifadəçi gedişatlarında işlədilan yaddaş miqdarı (kb'larla)"
|
||||
msgid "Memory in locked pages in kB"
|
||||
msgstr "Qıfıllı səhifalərdə qalan yaddaş miqdarı (kb'larla)"
|
||||
|
||||
#: sysdeps/names/mountlist.c:38
|
||||
#: sysdeps/names/mountlist.c:45
|
||||
#: sysdeps/names/proclist.c:38
|
||||
#: sysdeps/names/proclist.c:45
|
||||
#: sysdeps/names/procmap.c:38
|
||||
#: sysdeps/names/procmap.c:45
|
||||
#: sysdeps/names/mountlist.c:38 sysdeps/names/mountlist.c:45
|
||||
#: sysdeps/names/proclist.c:38 sysdeps/names/proclist.c:45
|
||||
#: sysdeps/names/procmap.c:38 sysdeps/names/procmap.c:45
|
||||
msgid "Number of list elements"
|
||||
msgstr "Seqment siyahısı sayısı"
|
||||
|
||||
#: sysdeps/names/mountlist.c:39
|
||||
#: sysdeps/names/mountlist.c:46
|
||||
#: sysdeps/names/proclist.c:39
|
||||
#: sysdeps/names/proclist.c:46
|
||||
#: sysdeps/names/procmap.c:39
|
||||
#: sysdeps/names/procmap.c:46
|
||||
#: sysdeps/names/mountlist.c:39 sysdeps/names/mountlist.c:46
|
||||
#: sysdeps/names/proclist.c:39 sysdeps/names/proclist.c:46
|
||||
#: sysdeps/names/procmap.c:39 sysdeps/names/procmap.c:46
|
||||
msgid "Total size of list"
|
||||
msgstr "Siyahının ümumi böyüklüyü"
|
||||
|
||||
#: sysdeps/names/mountlist.c:40
|
||||
#: sysdeps/names/mountlist.c:47
|
||||
#: sysdeps/names/proclist.c:40
|
||||
#: sysdeps/names/proclist.c:47
|
||||
#: sysdeps/names/procmap.c:40
|
||||
#: sysdeps/names/procmap.c:47
|
||||
#: sysdeps/names/mountlist.c:40 sysdeps/names/mountlist.c:47
|
||||
#: sysdeps/names/proclist.c:40 sysdeps/names/proclist.c:47
|
||||
#: sysdeps/names/procmap.c:40 sysdeps/names/procmap.c:47
|
||||
msgid "Size of a single list element"
|
||||
msgstr "Tək siyahı elementinin böyüklüyü"
|
||||
|
||||
#: sysdeps/names/msg_limits.c:40
|
||||
#: sysdeps/names/msg_limits.c:51
|
||||
#: sysdeps/names/msg_limits.c:40 sysdeps/names/msg_limits.c:51
|
||||
msgid "Size in kilobytes of message pool"
|
||||
msgstr "Xəbər hovuzunun böyüklüyü (kb'larla)"
|
||||
|
||||
#: sysdeps/names/msg_limits.c:41
|
||||
#: sysdeps/names/msg_limits.c:52
|
||||
#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52
|
||||
msgid "Number of entries in message map"
|
||||
msgstr "Xəbər xəritəsindəki giriş sayısı"
|
||||
|
||||
#: sysdeps/names/msg_limits.c:42
|
||||
#: sysdeps/names/msg_limits.c:53
|
||||
#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53
|
||||
msgid "Max size of message"
|
||||
msgstr "Maksimal xəbər böyüklüyü"
|
||||
|
||||
#: sysdeps/names/msg_limits.c:43
|
||||
#: sysdeps/names/msg_limits.c:54
|
||||
#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54
|
||||
msgid "Default max size of queue"
|
||||
msgstr "Maksimal əsas istək böyüklüyü"
|
||||
|
||||
#: sysdeps/names/msg_limits.c:44
|
||||
#: sysdeps/names/msg_limits.c:55
|
||||
#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55
|
||||
msgid "Max queues system wide"
|
||||
msgstr "Maksimal istak sistemi genişliyi"
|
||||
|
||||
#: sysdeps/names/msg_limits.c:45
|
||||
#: sysdeps/names/msg_limits.c:56
|
||||
#: sysdeps/names/msg_limits.c:45 sysdeps/names/msg_limits.c:56
|
||||
msgid "Message segment size"
|
||||
msgstr "Xəbər parçası böyüklüyü"
|
||||
|
||||
#: sysdeps/names/msg_limits.c:46
|
||||
#: sysdeps/names/msg_limits.c:57
|
||||
#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57
|
||||
msgid "Number of system message headers"
|
||||
msgstr "Sistem xəbərləri başlıqları sayısı"
|
||||
|
||||
#: sysdeps/names/netload.c:45
|
||||
#: sysdeps/names/netload.c:63
|
||||
#: sysdeps/names/netload.c:45 sysdeps/names/netload.c:63
|
||||
msgid "Interface Flags"
|
||||
msgstr "Ara üz bayraqları"
|
||||
|
||||
@@ -487,63 +464,51 @@ msgstr "Ara üz bayraqları"
|
||||
msgid "MTU"
|
||||
msgstr "MTU"
|
||||
|
||||
#: sysdeps/names/netload.c:47
|
||||
#: sysdeps/names/netload.c:65
|
||||
#: sysdeps/names/netload.c:47 sysdeps/names/netload.c:65
|
||||
msgid "Subnet"
|
||||
msgstr "Subnet"
|
||||
|
||||
#: sysdeps/names/netload.c:48
|
||||
#: sysdeps/names/netload.c:66
|
||||
#: sysdeps/names/netload.c:48 sysdeps/names/netload.c:66
|
||||
msgid "Address"
|
||||
msgstr "Ünvan"
|
||||
|
||||
#: sysdeps/names/netload.c:49
|
||||
#: sysdeps/names/netload.c:67
|
||||
#: sysdeps/names/netload.c:49 sysdeps/names/netload.c:67
|
||||
msgid "Packets In"
|
||||
msgstr "Alınan Paketlər"
|
||||
|
||||
#: sysdeps/names/netload.c:50
|
||||
#: sysdeps/names/netload.c:68
|
||||
#: sysdeps/names/netload.c:50 sysdeps/names/netload.c:68
|
||||
msgid "Packets Out"
|
||||
msgstr "Atılan Paketlər"
|
||||
|
||||
#: sysdeps/names/netload.c:51
|
||||
#: sysdeps/names/netload.c:69
|
||||
#: sysdeps/names/netload.c:51 sysdeps/names/netload.c:69
|
||||
msgid "Packets Total"
|
||||
msgstr "Ümumi Paket sayısı"
|
||||
|
||||
#: sysdeps/names/netload.c:52
|
||||
#: sysdeps/names/netload.c:70
|
||||
#: sysdeps/names/netload.c:52 sysdeps/names/netload.c:70
|
||||
msgid "Bytes In"
|
||||
msgstr "Alınan Byte"
|
||||
|
||||
#: sysdeps/names/netload.c:53
|
||||
#: sysdeps/names/netload.c:71
|
||||
#: sysdeps/names/netload.c:53 sysdeps/names/netload.c:71
|
||||
msgid "Bytes Out"
|
||||
msgstr "Gedən Bayt"
|
||||
|
||||
#: sysdeps/names/netload.c:54
|
||||
#: sysdeps/names/netload.c:72
|
||||
#: sysdeps/names/netload.c:54 sysdeps/names/netload.c:72
|
||||
msgid "Bytes Total"
|
||||
msgstr "Ümumi Bayt"
|
||||
|
||||
#: sysdeps/names/netload.c:55
|
||||
#: sysdeps/names/netload.c:73
|
||||
#: sysdeps/names/netload.c:55 sysdeps/names/netload.c:73
|
||||
msgid "Errors In"
|
||||
msgstr "Gələn xətalar"
|
||||
|
||||
#: sysdeps/names/netload.c:56
|
||||
#: sysdeps/names/netload.c:74
|
||||
#: sysdeps/names/netload.c:56 sysdeps/names/netload.c:74
|
||||
msgid "Errors Out"
|
||||
msgstr "Çıxan Xətalat"
|
||||
|
||||
#: sysdeps/names/netload.c:57
|
||||
#: sysdeps/names/netload.c:75
|
||||
#: sysdeps/names/netload.c:57 sysdeps/names/netload.c:75
|
||||
msgid "Errors Total"
|
||||
msgstr "Ümumi Xəta Sayısı"
|
||||
|
||||
#: sysdeps/names/netload.c:58
|
||||
#: sysdeps/names/netload.c:76
|
||||
#: sysdeps/names/netload.c:58 sysdeps/names/netload.c:76
|
||||
msgid "Collisions"
|
||||
msgstr "Kollision"
|
||||
|
||||
@@ -551,8 +516,7 @@ msgstr "Kollision"
|
||||
msgid "Maximum Transfer Unit"
|
||||
msgstr "Maksimal Daşıma Vahidi"
|
||||
|
||||
#: sysdeps/names/ppp.c:38
|
||||
#: sysdeps/names/ppp.c:45
|
||||
#: sysdeps/names/ppp.c:38 sysdeps/names/ppp.c:45
|
||||
msgid "PPP State"
|
||||
msgstr "PPP Vəziyyəti"
|
||||
|
||||
@@ -572,8 +536,7 @@ msgstr "Giriş Bayt Sayısı"
|
||||
msgid "Number of output bytes"
|
||||
msgstr "Çıxış Bayt Sayısı"
|
||||
|
||||
#: sysdeps/names/procargs.c:38
|
||||
#: sysdeps/names/procmem.c:47
|
||||
#: sysdeps/names/procargs.c:38 sysdeps/names/procmem.c:47
|
||||
msgid "Size"
|
||||
msgstr "Böyüklük"
|
||||
|
||||
@@ -622,7 +585,8 @@ msgstr "WChan"
|
||||
msgid ""
|
||||
"Kernel flags of the process.\n"
|
||||
"\n"
|
||||
"On Linux, currently every flag has the math bit set, because crt0.s checks for math emulation, so this is not included in the output.\n"
|
||||
"On Linux, currently every flag has the math bit set, because crt0.s checks "
|
||||
"for math emulation, so this is not included in the output.\n"
|
||||
"\n"
|
||||
"This is probably a bug, as not every process is a compiled C program.\n"
|
||||
"\n"
|
||||
@@ -630,21 +594,32 @@ msgid ""
|
||||
msgstr ""
|
||||
"Gedişatın Kernel bayraqları.\n"
|
||||
"\n"
|
||||
"Linuxda, hazırda hər bayrağın riyazı bayt seti vardır. crt0.s riyaziemulyasiyanı yoxladığına görə naticədə proqram çıxışında biz bunu görmürük. \n"
|
||||
"Linuxda, hazırda hər bayrağın riyazı bayt seti vardır. crt0.s "
|
||||
"riyaziemulyasiyanı yoxladığına görə naticədə proqram çıxışında biz bunu "
|
||||
"görmürük. \n"
|
||||
"\n"
|
||||
"Bu bir bug ola bilər, çünkü hər əməliiyat C proqramı quruluşuna sahib deyil kimi görünür. \n"
|
||||
"Bu bir bug ola bilər, çünkü hər əməliiyat C proqramı quruluşuna sahib deyil "
|
||||
"kimi görünür. \n"
|
||||
"\n"
|
||||
"Riyazi bayt onluq 4, trace edilmiş bit onluq 10 olmalıdır"
|
||||
|
||||
#. Min_Flt
|
||||
#: sysdeps/names/prockernel.c:59
|
||||
msgid "The number of minor faults the process has made, those which have not required loading a memory page from disk."
|
||||
msgstr "Diskdən yaddaş səhifəsinə yüklənməmasi lazım gələnkiçik sistem xətaları sayısı."
|
||||
msgid ""
|
||||
"The number of minor faults the process has made, those which have not "
|
||||
"required loading a memory page from disk."
|
||||
msgstr ""
|
||||
"Diskdən yaddaş səhifəsinə yüklənməmasi lazım gələnkiçik sistem xətaları "
|
||||
"sayısı."
|
||||
|
||||
#. Maj_Flt
|
||||
#: sysdeps/names/prockernel.c:62
|
||||
msgid "The number of major faults the process has made, those which have required loading a memory page from disk."
|
||||
msgstr "Diskdən yaddaş səhifəsinə yüklənməmasi lazım gələnböyük sistem xətaları sayısı."
|
||||
msgid ""
|
||||
"The number of major faults the process has made, those which have required "
|
||||
"loading a memory page from disk."
|
||||
msgstr ""
|
||||
"Diskdən yaddaş səhifəsinə yüklənməmasi lazım gələnböyük sistem xətaları "
|
||||
"sayısı."
|
||||
|
||||
#. CMin_Flt
|
||||
#: sysdeps/names/prockernel.c:65
|
||||
@@ -658,8 +633,12 @@ msgstr "Gedişat və törəmələrinin səbəb olduğu böyük sistem xətaları
|
||||
|
||||
#. KStk_ESP
|
||||
#: sysdeps/names/prockernel.c:71
|
||||
msgid "The current value of esp (32-bit stack pointer), as found in the kernel stack page for the process."
|
||||
msgstr "Əmaliyyat üçün çəkirdəyin çıxartdığı stack səhifəsində tapılan esp'in hazırkı qiyməti (32-bit stack pointer)"
|
||||
msgid ""
|
||||
"The current value of esp (32-bit stack pointer), as found in the kernel "
|
||||
"stack page for the process."
|
||||
msgstr ""
|
||||
"Əmaliyyat üçün çəkirdəyin çıxartdığı stack səhifəsində tapılan esp'in "
|
||||
"hazırkı qiyməti (32-bit stack pointer)"
|
||||
|
||||
#. KStk_EIP
|
||||
#: sysdeps/names/prockernel.c:74
|
||||
@@ -668,8 +647,16 @@ msgstr "Hazırkı EIP (32-bit instruction pointer)."
|
||||
|
||||
#. NWChan
|
||||
#: sysdeps/names/prockernel.c:76
|
||||
msgid "This is the \"channel\" in which the process is waiting. This is the address of a system call, and can be looked up in a namelist if you need a textual name. (If you have an up-to-date /etc/psdatabase, then try ps -l to see the WCHAN field in action)"
|
||||
msgstr "Bu, əmaliyyatın gözlədiyi kanaldır. Bu ayrıca sistem çağırışı ünvanıdır və mətni adını istəyirsəniz adlar siyahısında görəbilərsiniz. ( əgər güncəl /etc/psdatabase mə'lumatınız varsa, ps -l'i sınayın və per harəkətlar qismindəki WCHAN qiymətinə baxın)"
|
||||
msgid ""
|
||||
"This is the \"channel\" in which the process is waiting. This is the "
|
||||
"address of a system call, and can be looked up in a namelist if you need a "
|
||||
"textual name. (If you have an up-to-date /etc/psdatabase, then try ps -l to "
|
||||
"see the WCHAN field in action)"
|
||||
msgstr ""
|
||||
"Bu, əmaliyyatın gözlədiyi kanaldır. Bu ayrıca sistem çağırışı ünvanıdır və "
|
||||
"mətni adını istəyirsəniz adlar siyahısında görəbilərsiniz. ( əgər güncəl /"
|
||||
"etc/psdatabase mə'lumatınız varsa, ps -l'i sınayın və per harəkətlar "
|
||||
"qismindəki WCHAN qiymətinə baxın)"
|
||||
|
||||
#. WChan
|
||||
#: sysdeps/names/prockernel.c:81
|
||||
@@ -713,12 +700,23 @@ msgid "Number of pages of shared (mmap'd) memory"
|
||||
msgstr "Bölüşülmüş yaddaş səhifələri sayısı (mmap'd)"
|
||||
|
||||
#: sysdeps/names/procmem.c:57
|
||||
msgid "Number of pages the process has in real memory, minus 3 for administrative purposes. This is just the pages which count towards text, data, or stack space. This does not include pages which have not been demand-loaded in, or which are swapped out."
|
||||
msgstr "Həqiqi yaddaşdakı səhifə sayısından idari məqsədlilərdəki 3 nün çıxardıldığından sonra qalan səhifə sayısı. Bu mətn, veri üçün ayrılmış səhifələrdir. Buraya deamonlar tərəfindən yüklənənlər və silinənlər daxil deyildir."
|
||||
msgid ""
|
||||
"Number of pages the process has in real memory, minus 3 for administrative "
|
||||
"purposes. This is just the pages which count towards text, data, or stack "
|
||||
"space. This does not include pages which have not been demand-loaded in, or "
|
||||
"which are swapped out."
|
||||
msgstr ""
|
||||
"Həqiqi yaddaşdakı səhifə sayısından idari məqsədlilərdəki 3 nün "
|
||||
"çıxardıldığından sonra qalan səhifə sayısı. Bu mətn, veri üçün ayrılmış "
|
||||
"səhifələrdir. Buraya deamonlar tərəfindən yüklənənlər və silinənlər daxil "
|
||||
"deyildir."
|
||||
|
||||
#: sysdeps/names/procmem.c:62
|
||||
msgid "Current limit in bytes on the rss of the process (usually 2,147,483,647)."
|
||||
msgstr "Gedişatın rss'sinin baytlarla göstərilan hazırkı sərhədləri (çox vaxt 2.147.483.647)."
|
||||
msgid ""
|
||||
"Current limit in bytes on the rss of the process (usually 2,147,483,647)."
|
||||
msgstr ""
|
||||
"Gedişatın rss'sinin baytlarla göstərilan hazırkı sərhədləri (çox vaxt "
|
||||
"2.147.483.647)."
|
||||
|
||||
#: sysdeps/names/procsegment.c:42
|
||||
msgid "Text_RSS"
|
||||
@@ -894,7 +892,8 @@ msgstr "XUCP_STime"
|
||||
|
||||
#: sysdeps/names/proctime.c:51
|
||||
msgid "Start time of process in seconds since the epoch"
|
||||
msgstr "Gedişatın başlanğıc vaxtının epoch'dan e'tibarən keçən saniyəlarlə müddəti"
|
||||
msgstr ""
|
||||
"Gedişatın başlanğıc vaxtının epoch'dan e'tibarən keçən saniyəlarlə müddəti"
|
||||
|
||||
#: sysdeps/names/proctime.c:52
|
||||
msgid "Real time accumulated by process (should be utime + stime)"
|
||||
@@ -921,8 +920,12 @@ msgid "The time (in jiffies) of the process's next timeout"
|
||||
msgstr "Gedişatın sonrakı vaxt dolması zamanı "
|
||||
|
||||
#: sysdeps/names/proctime.c:58
|
||||
msgid "The time (in jiffies) before the next SIGALRM is sent to the process due to an interval timer."
|
||||
msgstr "İnterval timera bağlı olaraq gedişata göndərilən sonrakı SIGALRM əvvəlində keçən vaxt."
|
||||
msgid ""
|
||||
"The time (in jiffies) before the next SIGALRM is sent to the process due to "
|
||||
"an interval timer."
|
||||
msgstr ""
|
||||
"İnterval timera bağlı olaraq gedişata göndərilən sonrakı SIGALRM əvvəlində "
|
||||
"keçən vaxt."
|
||||
|
||||
#: sysdeps/names/proctime.c:60
|
||||
msgid "Tick frequency"
|
||||
@@ -1028,93 +1031,75 @@ msgstr "Kernel vaxtlaşdırma səlahiyyəti"
|
||||
msgid "Standard unix nice level of process"
|
||||
msgstr "Gedişatın standart unix səviyyəsi"
|
||||
|
||||
#: sysdeps/names/sem_limits.c:42
|
||||
#: sysdeps/names/sem_limits.c:56
|
||||
#: sysdeps/names/sem_limits.c:42 sysdeps/names/sem_limits.c:56
|
||||
msgid "Number of entries in semaphore map"
|
||||
msgstr "Semaphore xəritəsindəki giriş sayısı"
|
||||
|
||||
#: sysdeps/names/sem_limits.c:43
|
||||
#: sysdeps/names/sem_limits.c:57
|
||||
#: sysdeps/names/sem_limits.c:43 sysdeps/names/sem_limits.c:57
|
||||
msgid "Max number of arrays"
|
||||
msgstr "Maksimal ox sayısı"
|
||||
|
||||
#: sysdeps/names/sem_limits.c:44
|
||||
#: sysdeps/names/sem_limits.c:58
|
||||
#: sysdeps/names/sem_limits.c:44 sysdeps/names/sem_limits.c:58
|
||||
msgid "Max semaphores system wide"
|
||||
msgstr "Maksimal semaphore sistem genişliyi"
|
||||
|
||||
#: sysdeps/names/sem_limits.c:45
|
||||
#: sysdeps/names/sem_limits.c:59
|
||||
#: sysdeps/names/sem_limits.c:45 sysdeps/names/sem_limits.c:59
|
||||
msgid "Number of undo structures system wide"
|
||||
msgstr "Arxaya dönüş quruluşları sistemi genişliyi qiyməti"
|
||||
|
||||
#: sysdeps/names/sem_limits.c:46
|
||||
#: sysdeps/names/sem_limits.c:60
|
||||
#: sysdeps/names/sem_limits.c:46 sysdeps/names/sem_limits.c:60
|
||||
msgid "Max semaphores per array"
|
||||
msgstr "Array başına düşən semafor sayısı"
|
||||
|
||||
#: sysdeps/names/sem_limits.c:47
|
||||
#: sysdeps/names/sem_limits.c:61
|
||||
#: sysdeps/names/sem_limits.c:47 sysdeps/names/sem_limits.c:61
|
||||
msgid "Max ops per semop call"
|
||||
msgstr "Maksimal hər semop çağırışı başına op gedişat sayısı"
|
||||
|
||||
#: sysdeps/names/sem_limits.c:48
|
||||
#: sysdeps/names/sem_limits.c:62
|
||||
#: sysdeps/names/sem_limits.c:48 sysdeps/names/sem_limits.c:62
|
||||
msgid "Max number of undo entries per process"
|
||||
msgstr "Gedişat başına ayrılan maksimal undo sayısı"
|
||||
|
||||
#: sysdeps/names/sem_limits.c:49
|
||||
#: sysdeps/names/sem_limits.c:63
|
||||
#: sysdeps/names/sem_limits.c:49 sysdeps/names/sem_limits.c:63
|
||||
msgid "sizeof struct sem_undo"
|
||||
msgstr "sem_undo quruluşunun böyüklüyü"
|
||||
|
||||
#: sysdeps/names/sem_limits.c:50
|
||||
#: sysdeps/names/sem_limits.c:64
|
||||
#: sysdeps/names/sem_limits.c:50 sysdeps/names/sem_limits.c:64
|
||||
msgid "Semaphore max value"
|
||||
msgstr "Maksimal semafor qiyməti"
|
||||
|
||||
#: sysdeps/names/sem_limits.c:51
|
||||
#: sysdeps/names/sem_limits.c:65
|
||||
#: sysdeps/names/sem_limits.c:51 sysdeps/names/sem_limits.c:65
|
||||
msgid "Adjust on exit max value"
|
||||
msgstr "Çıxışda maksimal qiyməti saxla"
|
||||
|
||||
#: sysdeps/names/shm_limits.c:39
|
||||
#: sysdeps/names/shm_limits.c:48
|
||||
#: sysdeps/names/shm_limits.c:39 sysdeps/names/shm_limits.c:48
|
||||
msgid "Max segment size"
|
||||
msgstr "Maksimal seqment böyüklüyü"
|
||||
|
||||
#: sysdeps/names/shm_limits.c:40
|
||||
#: sysdeps/names/shm_limits.c:49
|
||||
#: sysdeps/names/shm_limits.c:40 sysdeps/names/shm_limits.c:49
|
||||
msgid "Min segment size"
|
||||
msgstr "Minimal seqment böyüklüyü"
|
||||
|
||||
#: sysdeps/names/shm_limits.c:41
|
||||
#: sysdeps/names/shm_limits.c:50
|
||||
#: sysdeps/names/shm_limits.c:41 sysdeps/names/shm_limits.c:50
|
||||
msgid "Max number of segments"
|
||||
msgstr "Maksimal seqment sayısı"
|
||||
|
||||
#: sysdeps/names/shm_limits.c:42
|
||||
#: sysdeps/names/shm_limits.c:51
|
||||
#: sysdeps/names/shm_limits.c:42 sysdeps/names/shm_limits.c:51
|
||||
msgid "Max shared segments per process"
|
||||
msgstr "Gedişat başına düşən bölüşülmüş seqment sayısı"
|
||||
|
||||
#: sysdeps/names/shm_limits.c:43
|
||||
#: sysdeps/names/shm_limits.c:52
|
||||
#: sysdeps/names/shm_limits.c:43 sysdeps/names/shm_limits.c:52
|
||||
msgid "Max total shared memory"
|
||||
msgstr "Maksimal ümumi seqment sayısı"
|
||||
|
||||
#: sysdeps/names/swap.c:39
|
||||
#: sysdeps/names/swap.c:48
|
||||
#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48
|
||||
msgid "Total Swap Space"
|
||||
msgstr "Ümumi Dəyiş Toqquş Sahəsi"
|
||||
|
||||
#: sysdeps/names/swap.c:40
|
||||
#: sysdeps/names/swap.c:49
|
||||
#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49
|
||||
msgid "Used Swap Space"
|
||||
msgstr "İstifadədə olan Dəyiş Toqquş Sahəsi"
|
||||
|
||||
#: sysdeps/names/swap.c:41
|
||||
#: sysdeps/names/swap.c:50
|
||||
#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50
|
||||
msgid "Free Swap Space"
|
||||
msgstr "Boş Dəyiş Toqquş Sahəsi"
|
||||
|
||||
@@ -1134,88 +1119,71 @@ msgstr "Sistem başladığından bəri alınan Dəyiş Toqquş səhifələri say
|
||||
msgid "Total number of swap pages that have been brought out since system boot"
|
||||
msgstr "Sistem başladığından bəri atılan Dəyiş Toqquş səhifələri sayısı"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:49
|
||||
#: sysdeps/names/sysdeps.c:76
|
||||
#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76
|
||||
msgid "Server Features"
|
||||
msgstr "Verici Xüsusiyyətləri"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:50
|
||||
#: sysdeps/names/sysdeps.c:77
|
||||
#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77
|
||||
msgid "CPU Usage"
|
||||
msgstr "CPU İStifadəsi"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:51
|
||||
#: sysdeps/names/sysdeps.c:78
|
||||
#: sysdeps/names/sysdeps.c:51 sysdeps/names/sysdeps.c:78
|
||||
msgid "Memory Usage"
|
||||
msgstr "Yaddaş İstifadəsi"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:52
|
||||
#: sysdeps/names/sysdeps.c:79
|
||||
#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79
|
||||
msgid "Swap Usage"
|
||||
msgstr "Dəyiş Toqquş Sahəsi İstifadəsi"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:53
|
||||
#: sysdeps/names/sysdeps.c:80
|
||||
#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80
|
||||
msgid "System Uptime"
|
||||
msgstr "Sistem Uptime'ı"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:54
|
||||
#: sysdeps/names/sysdeps.c:81
|
||||
#: sysdeps/names/sysdeps.c:54 sysdeps/names/sysdeps.c:81
|
||||
msgid "Load Averange"
|
||||
msgstr "Ortalama Yük"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:55
|
||||
#: sysdeps/names/sysdeps.c:82
|
||||
#: sysdeps/names/sysdeps.c:55 sysdeps/names/sysdeps.c:82
|
||||
msgid "Shared Memory Limits"
|
||||
msgstr "Bölüşülmüş Yaddaş Limitləri"
|
||||
msgstr "Bölüşülmüş Yaddaş Hüdudları"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:56
|
||||
#: sysdeps/names/sysdeps.c:83
|
||||
#: sysdeps/names/sysdeps.c:56 sysdeps/names/sysdeps.c:83
|
||||
msgid "Message Queue Limits"
|
||||
msgstr "Xəbər İstəyi Limitləri"
|
||||
msgstr "Xəbər İstəyi Hüdudları"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:57
|
||||
#: sysdeps/names/sysdeps.c:84
|
||||
#: sysdeps/names/sysdeps.c:57 sysdeps/names/sysdeps.c:84
|
||||
msgid "Semaphore Set Limits"
|
||||
msgstr "Semafor Seçkisi Limitləri"
|
||||
msgstr "Semafor Seçkisi Hüdudları"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:58
|
||||
#: sysdeps/names/sysdeps.c:85
|
||||
#: sysdeps/names/sysdeps.c:58 sysdeps/names/sysdeps.c:85
|
||||
msgid "List of running Processes"
|
||||
msgstr "Fəal gedişatlar siyahısı"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:59
|
||||
#: sysdeps/names/sysdeps.c:86
|
||||
#: sysdeps/names/sysdeps.c:59 sysdeps/names/sysdeps.c:86
|
||||
msgid "Process Status information"
|
||||
msgstr "Gedişat Halı mə'lumatı"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:60
|
||||
#: sysdeps/names/sysdeps.c:87
|
||||
#: sysdeps/names/sysdeps.c:60 sysdeps/names/sysdeps.c:87
|
||||
msgid "Process UID and TTY information"
|
||||
msgstr "Gedişat UID və TTY mə'lumatı"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:61
|
||||
#: sysdeps/names/sysdeps.c:88
|
||||
#: sysdeps/names/sysdeps.c:61 sysdeps/names/sysdeps.c:88
|
||||
msgid "Process Memory information"
|
||||
msgstr "Gedişat Yaddaşı mə'lumatı"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:62
|
||||
#: sysdeps/names/sysdeps.c:89
|
||||
#: sysdeps/names/sysdeps.c:62 sysdeps/names/sysdeps.c:89
|
||||
msgid "Process Time information"
|
||||
msgstr "Gedişat Vaxtı mə'lumatı"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:63
|
||||
#: sysdeps/names/sysdeps.c:90
|
||||
#: sysdeps/names/sysdeps.c:63 sysdeps/names/sysdeps.c:90
|
||||
msgid "Process Signal information"
|
||||
msgstr "Gedişat Signal mə'lumatı"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:64
|
||||
#: sysdeps/names/sysdeps.c:91
|
||||
#: sysdeps/names/sysdeps.c:64 sysdeps/names/sysdeps.c:91
|
||||
msgid "Process Kernel Data information"
|
||||
msgstr "Gedişat Kernel Data mə'lumatı"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:65
|
||||
#: sysdeps/names/sysdeps.c:92
|
||||
#: sysdeps/names/sysdeps.c:65 sysdeps/names/sysdeps.c:92
|
||||
msgid "Process Segment information"
|
||||
msgstr "Gedişat Seqment Mə'lumatları"
|
||||
|
||||
@@ -1223,8 +1191,7 @@ msgstr "Gedişat Seqment Mə'lumatları"
|
||||
msgid "Process Arguments"
|
||||
msgstr "Gedişat Arqumentləri"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:67
|
||||
#: sysdeps/names/sysdeps.c:94
|
||||
#: sysdeps/names/sysdeps.c:67 sysdeps/names/sysdeps.c:94
|
||||
msgid "Process Memory Map"
|
||||
msgstr "Gedişat Yaddaşı Xəritəsi"
|
||||
|
||||
@@ -1232,18 +1199,15 @@ msgstr "Gedişat Yaddaşı Xəritəsi"
|
||||
msgid "Mount List"
|
||||
msgstr "Bağlanmış Avadanlıq Siyahısı"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:69
|
||||
#: sysdeps/names/sysdeps.c:96
|
||||
#: sysdeps/names/sysdeps.c:69 sysdeps/names/sysdeps.c:96
|
||||
msgid "File System Usage"
|
||||
msgstr "Dosye Sistemi İstifadəsi"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:70
|
||||
#: sysdeps/names/sysdeps.c:97
|
||||
#: sysdeps/names/sysdeps.c:70 sysdeps/names/sysdeps.c:97
|
||||
msgid "Network Load"
|
||||
msgstr "Network Yükü"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:71
|
||||
#: sysdeps/names/sysdeps.c:98
|
||||
#: sysdeps/names/sysdeps.c:71 sysdeps/names/sysdeps.c:98
|
||||
msgid "PPP Statistics"
|
||||
msgstr "PPP Statistikaları"
|
||||
|
||||
@@ -1271,158 +1235,126 @@ msgstr "Sistem başladığından bəri keçən vaxt"
|
||||
msgid "Time in seconds the system spent in the idle task since system boot"
|
||||
msgstr "Sistem başladığından bəri sistem idle taskda keçirdiyi müddət"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:28
|
||||
#: sysdeps/sun4/siglist.c:28
|
||||
#: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28
|
||||
msgid "Hangup"
|
||||
msgstr "Hangup"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:29
|
||||
#: sysdeps/sun4/siglist.c:29
|
||||
#: sysdeps/osf1/siglist.c:29 sysdeps/sun4/siglist.c:29
|
||||
msgid "Interrupt"
|
||||
msgstr "Interrupt"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:30
|
||||
#: sysdeps/sun4/siglist.c:30
|
||||
#: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30
|
||||
msgid "Quit"
|
||||
msgstr "Çıx"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:31
|
||||
#: sysdeps/sun4/siglist.c:31
|
||||
#: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31
|
||||
msgid "Illegal instruction"
|
||||
msgstr "Hökmsüz tə'limat"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:32
|
||||
#: sysdeps/sun4/siglist.c:32
|
||||
#: sysdeps/osf1/siglist.c:32 sysdeps/sun4/siglist.c:32
|
||||
msgid "Trace trap"
|
||||
msgstr "İzləmə trapı"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:33
|
||||
#: sysdeps/sun4/siglist.c:33
|
||||
#: sysdeps/osf1/siglist.c:33 sysdeps/sun4/siglist.c:33
|
||||
msgid "Abort"
|
||||
msgstr "Ləğv Et"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:34
|
||||
#: sysdeps/sun4/siglist.c:34
|
||||
#: sysdeps/osf1/siglist.c:34 sysdeps/sun4/siglist.c:34
|
||||
msgid "EMT error"
|
||||
msgstr "EMT Xətası"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:35
|
||||
#: sysdeps/sun4/siglist.c:35
|
||||
#: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35
|
||||
msgid "Floating-point exception"
|
||||
msgstr "Floating-point exception"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:36
|
||||
#: sysdeps/sun4/siglist.c:36
|
||||
#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
|
||||
msgid "Kill"
|
||||
msgstr "Öldür"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:37
|
||||
#: sysdeps/sun4/siglist.c:37
|
||||
#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
|
||||
msgid "Bus error"
|
||||
msgstr "Bus Xətası"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:38
|
||||
#: sysdeps/sun4/siglist.c:38
|
||||
#: sysdeps/osf1/siglist.c:38 sysdeps/sun4/siglist.c:38
|
||||
msgid "Segmentation violation"
|
||||
msgstr "Seqmentlərə Bölmə Qaydası Pozulması"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:39
|
||||
#: sysdeps/sun4/siglist.c:39
|
||||
#: sysdeps/osf1/siglist.c:39 sysdeps/sun4/siglist.c:39
|
||||
msgid "Bad argument to system call"
|
||||
msgstr "Sistem çağırışı üçün xətalı arqument"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:40
|
||||
#: sysdeps/sun4/siglist.c:40
|
||||
#: sysdeps/osf1/siglist.c:40 sysdeps/sun4/siglist.c:40
|
||||
msgid "Broken pipe"
|
||||
msgstr "Qırıq Boru"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:41
|
||||
#: sysdeps/sun4/siglist.c:41
|
||||
#: sysdeps/osf1/siglist.c:41 sysdeps/sun4/siglist.c:41
|
||||
msgid "Alarm clock"
|
||||
msgstr "Zəngli Saat"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:42
|
||||
#: sysdeps/sun4/siglist.c:42
|
||||
#: sysdeps/osf1/siglist.c:42 sysdeps/sun4/siglist.c:42
|
||||
msgid "Termination"
|
||||
msgstr "Qurtarma"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:43
|
||||
#: sysdeps/sun4/siglist.c:43
|
||||
#: sysdeps/osf1/siglist.c:43 sysdeps/sun4/siglist.c:43
|
||||
msgid "Urgent condition on socket"
|
||||
msgstr "Qapıdakı tə'cili hal"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:44
|
||||
#: sysdeps/sun4/siglist.c:44
|
||||
#: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44
|
||||
msgid "Stop"
|
||||
msgstr "Dayandır"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:45
|
||||
#: sysdeps/sun4/siglist.c:45
|
||||
#: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45
|
||||
msgid "Keyboard stop"
|
||||
msgstr "Klaviaturadan dayandır"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:46
|
||||
#: sysdeps/sun4/siglist.c:46
|
||||
#: sysdeps/osf1/siglist.c:46 sysdeps/sun4/siglist.c:46
|
||||
msgid "Continue"
|
||||
msgstr "Davam Et"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:47
|
||||
#: sysdeps/sun4/siglist.c:47
|
||||
#: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47
|
||||
msgid "Child status has changed"
|
||||
msgstr "Törəmə halı dəyişdi"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:48
|
||||
#: sysdeps/sun4/siglist.c:48
|
||||
#: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48
|
||||
msgid "Background read from tty"
|
||||
msgstr "tty'dən arxa plan gedişatı mə'lumatı"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:49
|
||||
#: sysdeps/sun4/siglist.c:49
|
||||
#: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49
|
||||
msgid "Background write to tty"
|
||||
msgstr "tty'yə yazma əməliyyatı"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:50
|
||||
#: sysdeps/sun4/siglist.c:50
|
||||
#: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50
|
||||
msgid "I/O now possible"
|
||||
msgstr "I/O indi mümkündür"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:51
|
||||
#: sysdeps/sun4/siglist.c:51
|
||||
#: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51
|
||||
msgid "CPU limit exceeded"
|
||||
msgstr "CPU sərhədi aşıldı"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:52
|
||||
#: sysdeps/sun4/siglist.c:52
|
||||
#: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52
|
||||
msgid "File size limit exceeded"
|
||||
msgstr "Dosye böyüklüyü sərhədi aşıldı"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:53
|
||||
#: sysdeps/sun4/siglist.c:53
|
||||
#: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53
|
||||
msgid "Virtual alarm clock"
|
||||
msgstr "Virtual Zəngli Saat"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:54
|
||||
#: sysdeps/sun4/siglist.c:54
|
||||
#: sysdeps/osf1/siglist.c:54 sysdeps/sun4/siglist.c:54
|
||||
msgid "Profiling alarm clock"
|
||||
msgstr "Profil Zəngli Saati"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:55
|
||||
#: sysdeps/sun4/siglist.c:55
|
||||
#: sysdeps/osf1/siglist.c:55 sysdeps/sun4/siglist.c:55
|
||||
msgid "Window size change"
|
||||
msgstr "Pəncərə Böyüklüyü Dəyişikliyi"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:56
|
||||
#: sysdeps/sun4/siglist.c:56
|
||||
#: sysdeps/osf1/siglist.c:56 sysdeps/sun4/siglist.c:56
|
||||
msgid "Information request"
|
||||
msgstr "Mə'lumat sifarişi"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:57
|
||||
#: sysdeps/sun4/siglist.c:57
|
||||
#: sysdeps/osf1/siglist.c:57 sysdeps/sun4/siglist.c:57
|
||||
msgid "User defined signal 1"
|
||||
msgstr "İstifadəçi siqnal 1 təsvir etdi"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:58
|
||||
#: sysdeps/sun4/siglist.c:58
|
||||
#: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58
|
||||
msgid "User defined signal 2"
|
||||
msgstr "İstifadəçi siqnal 2 təsvir etdi"
|
||||
|
||||
|
106
po/es.po
106
po/es.po
@@ -1,50 +1,53 @@
|
||||
# translation of libgtop.libgtop-GNOME-2-0-port.po to Spanish
|
||||
# Translation into spanish of glibtop
|
||||
# Pablo Saratxaga <srtxg@chanae.alphanet.ch>, 1998-2000
|
||||
# FIXME: the strings still left empty are the ones I've no idea how
|
||||
# to translate them; if anyone has a suggestion...
|
||||
# Germán Poo Caamaño <gpoo@ubiobio.cl>, 2002
|
||||
# Pablo Saratxaga <srtxg@chanae.alphanet.ch>, 1998-2000.
|
||||
# Germán Poo Caamaño <gpoo@ubiobio.cl>, 2002.
|
||||
# Pablo Saratxaga <srtxg@chanae.alphanet.ch>, 2002.
|
||||
# Juan Manuel García Molina <juanma_gm@wanadoo.es>, 2002.
|
||||
# Francisco Javier F. Serrador <serrador@arrakis.es>, 2003.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: glibtop 1.1.1\n"
|
||||
"POT-Creation-Date: 2002-06-02 13:22+0200\n"
|
||||
"PO-Revision-Date: 2002-06-02 18:17+0100\n"
|
||||
"Last-Translator: Juan Manuel García Molina <juanma_gm@wanadoo.es>\n"
|
||||
"Project-Id-Version: libgtop.libgtop-GNOME-2-0-port\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2003-08-28 04:41+0200\n"
|
||||
"PO-Revision-Date: 2003-08-28 11:48+0200\n"
|
||||
"Last-Translator: Francisco Javier F. Serrador <serrador@arrakis.es>\n"
|
||||
"Language-Team: Spanish <traductores@es.gnome.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"First-Translator: Pablo Saratxaga <srtxg@chanae.alphanet.ch>\n"
|
||||
"X-Generator: KBabel 0.9.6\n"
|
||||
"X-Generator: KBabel 1.0.2\n"
|
||||
|
||||
#: examples/smp.c:68
|
||||
#: examples/smp.c:71
|
||||
#, c-format
|
||||
msgid "Ticks (%ld per second):"
|
||||
msgstr "Tics (%ld por segundo):"
|
||||
|
||||
#: examples/smp.c:71
|
||||
#: examples/smp.c:74
|
||||
msgid "Total"
|
||||
msgstr "Total"
|
||||
|
||||
#: examples/smp.c:71 sysdeps/names/mem.c:47
|
||||
#: examples/smp.c:74 sysdeps/names/mem.c:47
|
||||
msgid "User"
|
||||
msgstr "Usuario"
|
||||
|
||||
#: examples/smp.c:71 sysdeps/names/procuid.c:58
|
||||
#: examples/smp.c:74 sysdeps/names/procuid.c:58
|
||||
msgid "Nice"
|
||||
msgstr "Nice"
|
||||
|
||||
#: examples/smp.c:71
|
||||
#: examples/smp.c:74
|
||||
msgid "Sys"
|
||||
msgstr "Sis"
|
||||
|
||||
#: examples/smp.c:71
|
||||
#: examples/smp.c:74
|
||||
msgid "Idle"
|
||||
msgstr "Inact"
|
||||
|
||||
#: examples/smp.c:73
|
||||
#: examples/smp.c:76
|
||||
#, c-format
|
||||
msgid ""
|
||||
"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
|
||||
@@ -53,36 +56,36 @@ msgstr ""
|
||||
"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
|
||||
"\n"
|
||||
|
||||
#: examples/smp.c:77
|
||||
#: examples/smp.c:80
|
||||
#, c-format
|
||||
msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
|
||||
msgstr "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
|
||||
|
||||
#: examples/smp.c:94
|
||||
#: examples/smp.c:97
|
||||
msgid "Percent:"
|
||||
msgstr "Porcentaje:"
|
||||
|
||||
#: examples/smp.c:95
|
||||
#: examples/smp.c:98
|
||||
msgid "Total (%)"
|
||||
msgstr "Total (%)"
|
||||
|
||||
#: examples/smp.c:95
|
||||
#: examples/smp.c:98
|
||||
msgid "User (%)"
|
||||
msgstr "Usuario (%)"
|
||||
|
||||
#: examples/smp.c:95
|
||||
#: examples/smp.c:98
|
||||
msgid "Nice (%)"
|
||||
msgstr "Nice (%)"
|
||||
|
||||
#: examples/smp.c:95
|
||||
#: examples/smp.c:98
|
||||
msgid "Sys (%)"
|
||||
msgstr "Sis (%)"
|
||||
|
||||
#: examples/smp.c:96
|
||||
#: examples/smp.c:99
|
||||
msgid "Idle (%)"
|
||||
msgstr "Inact (%)"
|
||||
|
||||
#: examples/smp.c:98
|
||||
#: examples/smp.c:101
|
||||
#, c-format
|
||||
msgid ""
|
||||
"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
|
||||
@@ -91,12 +94,12 @@ msgstr ""
|
||||
"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
|
||||
"\n"
|
||||
|
||||
#: examples/smp.c:114
|
||||
#: examples/smp.c:117
|
||||
#, c-format
|
||||
msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
|
||||
msgstr "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
|
||||
|
||||
#: examples/smp.c:120
|
||||
#: examples/smp.c:123
|
||||
msgid "Spin:"
|
||||
msgstr "Spin:"
|
||||
|
||||
@@ -119,46 +122,47 @@ msgstr "leídos %d bytes de datos"
|
||||
msgid "write %d bytes"
|
||||
msgstr "escritos %d bytes"
|
||||
|
||||
#: src/daemon/gnuserv.c:448
|
||||
#: src/daemon/gnuserv.c:453
|
||||
msgid "Enable debugging"
|
||||
msgstr "Activar depuración"
|
||||
|
||||
#: src/daemon/gnuserv.c:448
|
||||
#: src/daemon/gnuserv.c:453
|
||||
msgid "DEBUG"
|
||||
msgstr "DEPURACIÓN"
|
||||
|
||||
#: src/daemon/gnuserv.c:450
|
||||
#: src/daemon/gnuserv.c:455
|
||||
msgid "Enable verbose output"
|
||||
msgstr "Activa salida detallada"
|
||||
|
||||
#: src/daemon/gnuserv.c:450
|
||||
#: src/daemon/gnuserv.c:455
|
||||
msgid "VERBOSE"
|
||||
msgstr "DETALLADO"
|
||||
|
||||
#: src/daemon/gnuserv.c:452
|
||||
#: src/daemon/gnuserv.c:457
|
||||
msgid "Don't fork into background"
|
||||
msgstr "No se pudo abrir un proceso en segundo plano"
|
||||
|
||||
#: src/daemon/gnuserv.c:452
|
||||
#: src/daemon/gnuserv.c:457
|
||||
msgid "NO-DAEMON"
|
||||
msgstr "NO-DAEMON"
|
||||
|
||||
#: src/daemon/gnuserv.c:454
|
||||
#: src/daemon/gnuserv.c:459
|
||||
msgid "Invoked from inetd"
|
||||
msgstr "Invocado desde inetd"
|
||||
|
||||
#: src/daemon/gnuserv.c:454
|
||||
#: src/daemon/gnuserv.c:459
|
||||
msgid "INETD"
|
||||
msgstr "INETD"
|
||||
|
||||
#: src/daemon/gnuserv.c:488
|
||||
#: src/daemon/gnuserv.c:493
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Error on option %s: %s.\n"
|
||||
"Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr ""
|
||||
"Error con la opción %s: %s.\n"
|
||||
"Ejecute '%s --help' para ver una lista completa de las opciones disponibles.\n"
|
||||
"Ejecute '%s --help' para ver una lista completa de las opciones "
|
||||
"disponibles.\n"
|
||||
|
||||
#: support/error.c:109
|
||||
msgid "Unknown system error"
|
||||
@@ -346,7 +350,7 @@ msgstr "Último PID"
|
||||
#: sysdeps/names/loadavg.c:47
|
||||
msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes"
|
||||
msgstr ""
|
||||
"Cantidad de procesos corriendo simultáneamente, media de los últimos 1, 5 y "
|
||||
"Cantidad de procesos ejecutándose simultáneamente, media de los últimos 1, 5 y "
|
||||
"15 minutos"
|
||||
|
||||
#: sysdeps/names/loadavg.c:48
|
||||
@@ -375,7 +379,7 @@ msgstr "Memoria compartida"
|
||||
|
||||
#: sysdeps/names/mem.c:45
|
||||
msgid "Buffers"
|
||||
msgstr "Búfers"
|
||||
msgstr "Búferes"
|
||||
|
||||
#: sysdeps/names/mem.c:46
|
||||
msgid "Cached"
|
||||
@@ -403,7 +407,7 @@ msgstr "Memoria compartida (en KB)"
|
||||
|
||||
#: sysdeps/names/mem.c:57
|
||||
msgid "Size of buffers kB"
|
||||
msgstr "Tamaño de los búfers (en KB)"
|
||||
msgstr "Tamaño de los búferes (en KB)"
|
||||
|
||||
#: sysdeps/names/mem.c:58
|
||||
msgid "Size of cached memory in kB"
|
||||
@@ -481,7 +485,7 @@ msgstr "Dirección"
|
||||
|
||||
#: sysdeps/names/netload.c:49 sysdeps/names/netload.c:67
|
||||
msgid "Packets In"
|
||||
msgstr "Páquetes de entrada"
|
||||
msgstr "Paquetes de entrada"
|
||||
|
||||
#: sysdeps/names/netload.c:50 sysdeps/names/netload.c:68
|
||||
msgid "Packets Out"
|
||||
@@ -660,8 +664,8 @@ msgid ""
|
||||
"textual name. (If you have an up-to-date /etc/psdatabase, then try ps -l to "
|
||||
"see the WCHAN field in action)"
|
||||
msgstr ""
|
||||
"Este es el \"canal\" en el cual el proceso está esperando. Esta es la "
|
||||
"dirección de una llamada sistema, y puede ser buscada en una lista de "
|
||||
"Este es el «canal» en el cual el proceso está esperando. Esta es la "
|
||||
"dirección de una llamada de sistema, y puede ser buscada en una lista de "
|
||||
"nombres si necesita un nombre textual. (Si tiene un /etc/psdatabasa "
|
||||
"actualizado, entonces pruebe \"ps -l\" para ver el campo WCHAN en acción)"
|
||||
|
||||
@@ -700,7 +704,7 @@ msgstr "Cantidad de páginas de memoria virtual"
|
||||
|
||||
#: sysdeps/names/procmem.c:55
|
||||
msgid "Number of resident set (non-swapped) pages"
|
||||
msgstr "Cantidad de páginas de conjuntos residentes (que no están en swap)"
|
||||
msgstr "Cantidad de páginas de conjuntos residentes (que no están en intercambio)"
|
||||
|
||||
#: sysdeps/names/procmem.c:56
|
||||
msgid "Number of pages of shared (mmap'd) memory"
|
||||
@@ -716,7 +720,7 @@ msgstr ""
|
||||
"Cantidad de páginas del proceso en memoria real, menos 3 par administración. "
|
||||
"Esto es solo las páginas que se cuentan entre texto, datos, o espacio de "
|
||||
"pila. Esto no incluye páginas que no han sido cargadas a la demanda, o que "
|
||||
"se encuentran en el dispositivo de swap."
|
||||
"se encuentran en el dispositivo de intercambio."
|
||||
|
||||
# In México, Dominican Republic, Guatemala, Honduras, Panama, Peru
|
||||
# and El Salvador, Number formats are the same as in the US, so no
|
||||
@@ -1104,15 +1108,15 @@ msgstr "Total máximo de memoria compartida"
|
||||
|
||||
#: sysdeps/names/swap.c:39 sysdeps/names/swap.c:48
|
||||
msgid "Total Swap Space"
|
||||
msgstr "Espacio de swap total"
|
||||
msgstr "Espacio de intercambio total"
|
||||
|
||||
#: sysdeps/names/swap.c:40 sysdeps/names/swap.c:49
|
||||
msgid "Used Swap Space"
|
||||
msgstr "Espacio de swap usado"
|
||||
msgstr "Espacio de intercambio usado"
|
||||
|
||||
#: sysdeps/names/swap.c:41 sysdeps/names/swap.c:50
|
||||
msgid "Free Swap Space"
|
||||
msgstr "Espacio de swap libre"
|
||||
msgstr "Espacio de intercambio libre"
|
||||
|
||||
#: sysdeps/names/swap.c:42
|
||||
msgid "Page In"
|
||||
@@ -1125,18 +1129,18 @@ msgstr "Páginas salidas"
|
||||
#: sysdeps/names/swap.c:51
|
||||
msgid "Total number of swap pages that have been brought in since system boot"
|
||||
msgstr ""
|
||||
"Cantidad total de páginas que han sido entradas al swap, desde el inicio del "
|
||||
"Cantidad total de páginas que han sido entradas al intercambio, desde el inicio del "
|
||||
"sistema"
|
||||
|
||||
#: sysdeps/names/swap.c:53
|
||||
msgid "Total number of swap pages that have been brought out since system boot"
|
||||
msgstr ""
|
||||
"Cantidad total de páginas que han sido sacadas del swap, desde el inicio del "
|
||||
"Cantidad total de páginas que han sido sacadas del intercambio, desde el inicio del "
|
||||
"sistema"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76
|
||||
msgid "Server Features"
|
||||
msgstr "Particularidades del Servidor"
|
||||
msgstr "Características del servidor"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77
|
||||
msgid "CPU Usage"
|
||||
@@ -1148,7 +1152,7 @@ msgstr "Uso de la memoria"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:52 sysdeps/names/sysdeps.c:79
|
||||
msgid "Swap Usage"
|
||||
msgstr "Uso del swap"
|
||||
msgstr "Uso del intercambio"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:53 sysdeps/names/sysdeps.c:80
|
||||
msgid "System Uptime"
|
||||
@@ -1236,7 +1240,7 @@ msgstr "Lista de los sistemas de archivos actualmente montados"
|
||||
|
||||
#: sysdeps/names/uptime.c:38
|
||||
msgid "Uptime"
|
||||
msgstr "Uptime"
|
||||
msgstr "Tiempo activo"
|
||||
|
||||
#: sysdeps/names/uptime.c:39
|
||||
msgid "Idletime"
|
||||
@@ -1282,7 +1286,7 @@ msgstr "Error EMT"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:35 sysdeps/sun4/siglist.c:35
|
||||
msgid "Floating-point exception"
|
||||
msgstr "Excepción de punto flotante"
|
||||
msgstr "Excepción de coma flotante"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
|
||||
msgid "Kill"
|
||||
|
119
po/it.po
119
po/it.po
@@ -5,8 +5,9 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop\n"
|
||||
"POT-Creation-Date: 2003-01-25 08:30+0100\n"
|
||||
"PO-Revision-Date: 2003-01-25 15:51+0100\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2003-08-28 13:59+0200\n"
|
||||
"PO-Revision-Date: 2003-08-28 14:23+0200\n"
|
||||
"Last-Translator: Alessio Frusciante <algol@firenze.linux.it>\n"
|
||||
"Language-Team: Italian <tp@lists.linux.it>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -16,7 +17,7 @@ msgstr ""
|
||||
#: examples/smp.c:71
|
||||
#, c-format
|
||||
msgid "Ticks (%ld per second):"
|
||||
msgstr ""
|
||||
msgstr "Tick (%ld per secondo):"
|
||||
|
||||
#: examples/smp.c:74
|
||||
msgid "Total"
|
||||
@@ -92,67 +93,68 @@ msgstr "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
|
||||
|
||||
#: examples/smp.c:123
|
||||
msgid "Spin:"
|
||||
msgstr ""
|
||||
msgstr "Spin:"
|
||||
|
||||
#: lib/read.c:75
|
||||
#, c-format
|
||||
msgid "read %d bytes"
|
||||
msgstr ""
|
||||
msgstr "letti %d byte"
|
||||
|
||||
#: lib/read_data.c:49
|
||||
msgid "read data size"
|
||||
msgstr ""
|
||||
msgstr "dimensione dei dati letti"
|
||||
|
||||
#: lib/read_data.c:66
|
||||
#, c-format
|
||||
msgid "read data %d bytes"
|
||||
msgstr ""
|
||||
msgstr "letti %d byte di dati"
|
||||
|
||||
#: lib/write.c:48
|
||||
#, c-format
|
||||
msgid "write %d bytes"
|
||||
msgstr ""
|
||||
msgstr "scrittura di %d byte"
|
||||
|
||||
#: src/daemon/gnuserv.c:448
|
||||
#: src/daemon/gnuserv.c:453
|
||||
msgid "Enable debugging"
|
||||
msgstr "Abilita debug"
|
||||
|
||||
#: src/daemon/gnuserv.c:448
|
||||
#: src/daemon/gnuserv.c:453
|
||||
msgid "DEBUG"
|
||||
msgstr "DEBUG"
|
||||
|
||||
#: src/daemon/gnuserv.c:450
|
||||
#: src/daemon/gnuserv.c:455
|
||||
msgid "Enable verbose output"
|
||||
msgstr ""
|
||||
msgstr "Abilita output prolisso"
|
||||
|
||||
#: src/daemon/gnuserv.c:450
|
||||
#: src/daemon/gnuserv.c:455
|
||||
msgid "VERBOSE"
|
||||
msgstr "VERBOSE"
|
||||
|
||||
#: src/daemon/gnuserv.c:452
|
||||
#: src/daemon/gnuserv.c:457
|
||||
msgid "Don't fork into background"
|
||||
msgstr "Non fare fork in background"
|
||||
|
||||
#: src/daemon/gnuserv.c:452
|
||||
#: src/daemon/gnuserv.c:457
|
||||
msgid "NO-DAEMON"
|
||||
msgstr "NO-DAEMON"
|
||||
|
||||
#: src/daemon/gnuserv.c:454
|
||||
#: src/daemon/gnuserv.c:459
|
||||
msgid "Invoked from inetd"
|
||||
msgstr "Invocato da inetd"
|
||||
|
||||
#: src/daemon/gnuserv.c:454
|
||||
#: src/daemon/gnuserv.c:459
|
||||
msgid "INETD"
|
||||
msgstr "INETD"
|
||||
|
||||
#: src/daemon/gnuserv.c:488
|
||||
#: src/daemon/gnuserv.c:493
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Error on option %s: %s.\n"
|
||||
"Run '%s --help' to see a full list of available command line options.\n"
|
||||
msgstr ""
|
||||
"Errore nell'opzione %s: %s.\n"
|
||||
"Eseguire '%s --help' per vedere una lista completa delle opzioni per la linea di comando.\n"
|
||||
"Eseguire '%s --help' per vedere una lista completa delle opzioni per la "
|
||||
"linea di comando.\n"
|
||||
|
||||
#: support/error.c:109
|
||||
msgid "Unknown system error"
|
||||
@@ -247,51 +249,51 @@ msgstr "Tempo di CPU in idle"
|
||||
|
||||
#: sysdeps/names/cpu.c:48
|
||||
msgid "Tick Frequency"
|
||||
msgstr ""
|
||||
msgstr "Frequenza dei tick"
|
||||
|
||||
#: sysdeps/names/cpu.c:49
|
||||
msgid "SMP Total CPU Time"
|
||||
msgstr ""
|
||||
msgstr "Tempo di CPU totale SMP"
|
||||
|
||||
#: sysdeps/names/cpu.c:50
|
||||
msgid "SMP CPU Time in User Mode"
|
||||
msgstr ""
|
||||
msgstr "Tempo di CPU SMP in modalit? utente"
|
||||
|
||||
#: sysdeps/names/cpu.c:51
|
||||
msgid "SMP CPU Time in User Mode (nice)"
|
||||
msgstr ""
|
||||
msgstr "Tempo di CPU SMP in modalit? utente (nice)"
|
||||
|
||||
#: sysdeps/names/cpu.c:52
|
||||
msgid "SMP CPU Time in System Mode"
|
||||
msgstr ""
|
||||
msgstr "Tempo di CPU SMP in modalit? di sistema"
|
||||
|
||||
#: sysdeps/names/cpu.c:53
|
||||
msgid "SMP CPU Time in the Idle Task"
|
||||
msgstr ""
|
||||
msgstr "Tempo di CPU SMP in idle"
|
||||
|
||||
#: sysdeps/names/cpu.c:58 sysdeps/names/cpu.c:64
|
||||
msgid "Number of clock ticks since system boot"
|
||||
msgstr ""
|
||||
msgstr "Numero di tick dall'avvio del sistema"
|
||||
|
||||
#: sysdeps/names/cpu.c:59 sysdeps/names/cpu.c:65
|
||||
msgid "Number of clock ticks the system spent in user mode"
|
||||
msgstr ""
|
||||
msgstr "Numero di tick trascorsi in modalit? utente"
|
||||
|
||||
#: sysdeps/names/cpu.c:60 sysdeps/names/cpu.c:66
|
||||
msgid "Number of clock ticks the system spent in user mode (nice)"
|
||||
msgstr ""
|
||||
msgstr "Numero di tick trascorsi in modalit? utente (nice)"
|
||||
|
||||
#: sysdeps/names/cpu.c:61 sysdeps/names/cpu.c:67
|
||||
msgid "Number of clock ticks the system spent in system mode"
|
||||
msgstr ""
|
||||
msgstr "Numero di tick trascorsi in modalit? di sistema"
|
||||
|
||||
#: sysdeps/names/cpu.c:62 sysdeps/names/cpu.c:68
|
||||
msgid "Number of clock ticks the system spent in the idle task"
|
||||
msgstr ""
|
||||
msgstr "Numero di tick trascorsi in idle"
|
||||
|
||||
#: sysdeps/names/cpu.c:63
|
||||
msgid "Tick frequency (default is 100)"
|
||||
msgstr ""
|
||||
msgstr "Frequenza dei tick (il valore predefinito è 100)"
|
||||
|
||||
#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48
|
||||
msgid "Total blocks"
|
||||
@@ -306,12 +308,10 @@ msgid "Available blocks"
|
||||
msgstr "Blocchi disponibili"
|
||||
|
||||
#: sysdeps/names/fsusage.c:42 sysdeps/names/fsusage.c:51
|
||||
#, fuzzy
|
||||
msgid "Total file nodes"
|
||||
msgstr "Nodi file totali"
|
||||
|
||||
#: sysdeps/names/fsusage.c:43 sysdeps/names/fsusage.c:52
|
||||
#, fuzzy
|
||||
msgid "Free file nodes"
|
||||
msgstr "Nodi file liberi"
|
||||
|
||||
@@ -328,12 +328,10 @@ msgid "Load Average"
|
||||
msgstr "Media di carico"
|
||||
|
||||
#: sysdeps/names/loadavg.c:40
|
||||
#, fuzzy
|
||||
msgid "Running Tasks"
|
||||
msgstr "Processi in esecuzione"
|
||||
|
||||
#: sysdeps/names/loadavg.c:41
|
||||
#, fuzzy
|
||||
msgid "Number of Tasks"
|
||||
msgstr "Numero di processi"
|
||||
|
||||
@@ -346,7 +344,6 @@ msgid "Number of jobs running simultaneously averaged over 1, 5 and 15 minutes"
|
||||
msgstr "Numero di job eseguiti simultaneamente (media su 1, 5 e 15 minuti)"
|
||||
|
||||
#: sysdeps/names/loadavg.c:48
|
||||
#, fuzzy
|
||||
msgid "Number of tasks currently running"
|
||||
msgstr "Numero di processi attualmente in esecuzione"
|
||||
|
||||
@@ -376,11 +373,11 @@ msgstr "Buffer"
|
||||
|
||||
#: sysdeps/names/mem.c:46
|
||||
msgid "Cached"
|
||||
msgstr ""
|
||||
msgstr "In cache"
|
||||
|
||||
#: sysdeps/names/mem.c:48
|
||||
msgid "Locked"
|
||||
msgstr ""
|
||||
msgstr "Bloccata"
|
||||
|
||||
#: sysdeps/names/mem.c:53
|
||||
msgid "Total physical memory in kB"
|
||||
@@ -404,7 +401,7 @@ msgstr "Dimensione dei buffer in kB"
|
||||
|
||||
#: sysdeps/names/mem.c:58
|
||||
msgid "Size of cached memory in kB"
|
||||
msgstr ""
|
||||
msgstr "Dimensione della memoria in cache in kB"
|
||||
|
||||
#: sysdeps/names/mem.c:59
|
||||
msgid "Memory used from user processes in kB"
|
||||
@@ -412,7 +409,7 @@ msgstr "Memoria usata nei processi utente in kB"
|
||||
|
||||
#: sysdeps/names/mem.c:60
|
||||
msgid "Memory in locked pages in kB"
|
||||
msgstr ""
|
||||
msgstr "Memoria in pagine bloccate in kB"
|
||||
|
||||
#: sysdeps/names/mountlist.c:38 sysdeps/names/mountlist.c:45
|
||||
#: sysdeps/names/proclist.c:38 sysdeps/names/proclist.c:45
|
||||
@@ -458,11 +455,11 @@ msgstr ""
|
||||
|
||||
#: sysdeps/names/msg_limits.c:46 sysdeps/names/msg_limits.c:57
|
||||
msgid "Number of system message headers"
|
||||
msgstr ""
|
||||
msgstr "Numero di intestazioni dei messaggi di sistema"
|
||||
|
||||
#: sysdeps/names/netload.c:45 sysdeps/names/netload.c:63
|
||||
msgid "Interface Flags"
|
||||
msgstr ""
|
||||
msgstr "Flag delle interfacce"
|
||||
|
||||
#: sysdeps/names/netload.c:46
|
||||
msgid "MTU"
|
||||
@@ -518,7 +515,7 @@ msgstr "Collisioni"
|
||||
|
||||
#: sysdeps/names/netload.c:64
|
||||
msgid "Maximum Transfer Unit"
|
||||
msgstr ""
|
||||
msgstr "Massima unit? di trasferimento"
|
||||
|
||||
#: sysdeps/names/ppp.c:38 sysdeps/names/ppp.c:45
|
||||
msgid "PPP State"
|
||||
@@ -546,7 +543,7 @@ msgstr "Dimensioni"
|
||||
|
||||
#: sysdeps/names/procargs.c:43
|
||||
msgid "Length in bytes of the returned string."
|
||||
msgstr ""
|
||||
msgstr "Lunghezza in byte della stringa restituita."
|
||||
|
||||
#: sysdeps/names/prockernel.c:42
|
||||
msgid "K_Flags"
|
||||
@@ -623,11 +620,12 @@ msgstr ""
|
||||
|
||||
#. KStk_ESP
|
||||
#: sysdeps/names/prockernel.c:71
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"The current value of esp (32-bit stack pointer), as found in the kernel "
|
||||
"stack page for the process."
|
||||
msgstr "Il valore di ESP (stack pointer a 32 bit)"
|
||||
msgstr ""
|
||||
"Il valore di ESP (stack pointer a 32 bit) come fornito dalla pagina dello "
|
||||
"stack per il processo."
|
||||
|
||||
#. KStk_EIP
|
||||
#: sysdeps/names/prockernel.c:74
|
||||
@@ -658,7 +656,7 @@ msgstr "Residente"
|
||||
|
||||
#: sysdeps/names/procmem.c:47
|
||||
msgid "Share"
|
||||
msgstr ""
|
||||
msgstr "Condivisa"
|
||||
|
||||
#: sysdeps/names/procmem.c:48
|
||||
msgid "Resident Set Size"
|
||||
@@ -792,7 +790,7 @@ msgstr "Maschera dei segnali ignorati"
|
||||
|
||||
#: sysdeps/names/procsignal.c:48
|
||||
msgid "Mask of caught signals"
|
||||
msgstr ""
|
||||
msgstr "Maschera dei segnali catturati"
|
||||
|
||||
#: sysdeps/names/procstate.c:40
|
||||
msgid "Cmd"
|
||||
@@ -852,7 +850,7 @@ msgstr "CSTime"
|
||||
|
||||
#: sysdeps/names/proctime.c:45
|
||||
msgid "TimeOut"
|
||||
msgstr ""
|
||||
msgstr "TimeOut"
|
||||
|
||||
#: sysdeps/names/proctime.c:45
|
||||
msgid "It_Real_Value"
|
||||
@@ -906,15 +904,15 @@ msgstr ""
|
||||
|
||||
#: sysdeps/names/proctime.c:60
|
||||
msgid "Tick frequency"
|
||||
msgstr ""
|
||||
msgstr "Frequenza dei tick"
|
||||
|
||||
#: sysdeps/names/proctime.c:61
|
||||
msgid "SMP user-mode CPU time accumulated by process"
|
||||
msgstr ""
|
||||
msgstr "Tempo di CPU SMP modalit? utente accumulato dal processo"
|
||||
|
||||
#: sysdeps/names/proctime.c:62
|
||||
msgid "SMP kernel-mode CPU time accumulated by process"
|
||||
msgstr ""
|
||||
msgstr "Tempo di CPU SMP modalit? kernel accumulato dal processo "
|
||||
|
||||
#: sysdeps/names/procuid.c:56
|
||||
msgid "Uid"
|
||||
@@ -1098,7 +1096,7 @@ msgstr "Totale di pagine di swap scaricate dall'avvio del sistema"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:49 sysdeps/names/sysdeps.c:76
|
||||
msgid "Server Features"
|
||||
msgstr ""
|
||||
msgstr "Funzionalit? del server"
|
||||
|
||||
#: sysdeps/names/sysdeps.c:50 sysdeps/names/sysdeps.c:77
|
||||
msgid "CPU Usage"
|
||||
@@ -1210,7 +1208,8 @@ msgstr "Tempo in secondi dall'avvio del sistema"
|
||||
|
||||
#: sysdeps/names/uptime.c:45
|
||||
msgid "Time in seconds the system spent in the idle task since system boot"
|
||||
msgstr "Tempo in secondi che il sistema ha passato in idle dall'avvio del sistema"
|
||||
msgstr ""
|
||||
"Tempo in secondi che il sistema ha passato in idle dall'avvio del sistema"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:28 sysdeps/sun4/siglist.c:28
|
||||
msgid "Hangup"
|
||||
@@ -1290,27 +1289,27 @@ msgstr ""
|
||||
|
||||
#: sysdeps/osf1/siglist.c:47 sysdeps/sun4/siglist.c:47
|
||||
msgid "Child status has changed"
|
||||
msgstr ""
|
||||
msgstr "Lo stato del figlio è cambiato"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:48 sysdeps/sun4/siglist.c:48
|
||||
msgid "Background read from tty"
|
||||
msgstr ""
|
||||
msgstr "Lettura in background dalla tty"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:49 sysdeps/sun4/siglist.c:49
|
||||
msgid "Background write to tty"
|
||||
msgstr ""
|
||||
msgstr "Scrittura in background sulla tty"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:50 sysdeps/sun4/siglist.c:50
|
||||
msgid "I/O now possible"
|
||||
msgstr ""
|
||||
msgstr "I/O adesso possibile"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:51 sysdeps/sun4/siglist.c:51
|
||||
msgid "CPU limit exceeded"
|
||||
msgstr ""
|
||||
msgstr "Superato il limite della CPU"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:52 sysdeps/sun4/siglist.c:52
|
||||
msgid "File size limit exceeded"
|
||||
msgstr ""
|
||||
msgstr "Superato il limite nella dimensione dei file"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:53 sysdeps/sun4/siglist.c:53
|
||||
msgid "Virtual alarm clock"
|
||||
|
25
po/nl.po
25
po/nl.po
@@ -6,13 +6,14 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop CVS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2003-06-21 12:58+0200\n"
|
||||
"POT-Creation-Date: 2003-10-21 19:07+0200\n"
|
||||
"PO-Revision-Date: 2002-10-29 13:14+0100\n"
|
||||
"Last-Translator: Jeroen van der Vegt <A.J.vanderVegt@ITS.TUDelft.nl>\n"
|
||||
"Language-Team: Dutch <nl@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: examples/smp.c:71
|
||||
#, c-format
|
||||
@@ -93,8 +94,10 @@ msgstr "Draaiing:"
|
||||
|
||||
#: lib/read.c:75
|
||||
#, c-format
|
||||
msgid "read %d bytes"
|
||||
msgstr "%d bytes gelezen"
|
||||
msgid "read %d byte"
|
||||
msgid_plural "read %d bytes"
|
||||
msgstr[0] "%d byte gelezen"
|
||||
msgstr[1] "%d bytes gelezen"
|
||||
|
||||
#: lib/read_data.c:49
|
||||
msgid "read data size"
|
||||
@@ -102,13 +105,17 @@ msgstr "grootte van de gelezen data"
|
||||
|
||||
#: lib/read_data.c:66
|
||||
#, c-format
|
||||
msgid "read data %d bytes"
|
||||
msgstr "lees %d bytes"
|
||||
msgid "read data %d byte"
|
||||
msgid_plural "read data %d bytes"
|
||||
msgstr[0] "lees %d byte"
|
||||
msgstr[1] "lees %d bytes"
|
||||
|
||||
#: lib/write.c:48
|
||||
#, c-format
|
||||
msgid "write %d bytes"
|
||||
msgstr "schrijf %d bytes"
|
||||
msgid "write %d byte"
|
||||
msgid_plural "write %d bytes"
|
||||
msgstr[0] "schrijf %d byte"
|
||||
msgstr[1] "schrijf %d bytes"
|
||||
|
||||
#: src/daemon/gnuserv.c:453
|
||||
msgid "Enable debugging"
|
||||
@@ -214,11 +221,11 @@ msgstr "%s: optie '-W %s' is dubbelzinnig\n"
|
||||
msgid "%s: option `-W %s' doesn't allow an argument\n"
|
||||
msgstr "%s: optie '-W %s' staat geen argument toe\n"
|
||||
|
||||
#: support/popthelp.c:35
|
||||
#: support/popthelp.c:23
|
||||
msgid "Show this help message"
|
||||
msgstr "Laat deze uitleg zien"
|
||||
|
||||
#: support/popthelp.c:36
|
||||
#: support/popthelp.c:24
|
||||
msgid "Display brief usage message"
|
||||
msgstr "Toon een korte handleiding"
|
||||
|
||||
|
74
po/pt.po
74
po/pt.po
@@ -1,44 +1,46 @@
|
||||
# libgtop's Portuguese Translation
|
||||
# Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
# Duarte Loreto <happyguy_pt@hotmail.com>, 2001, 2002
|
||||
# Copyright (C) 2001 libgtop
|
||||
# Distributed under the same licence as the libgtop package
|
||||
# Duarte Loreto <happyguy_pt@hotmail.com>, 2001, 2002, 2003
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 1.4.1\n"
|
||||
"POT-Creation-Date: 2002-05-06 01:18+0100\n"
|
||||
"PO-Revision-Date: 2002-04-02 00:06+0000\n"
|
||||
"Project-Id-Version: 2.4\n"
|
||||
"Report-Msgid-Bugs-To: Duarte Loreto <happyguy_pt@hotmail.com>\n"
|
||||
"POT-Creation-Date: 2003-08-25 19:14+0100\n"
|
||||
"PO-Revision-Date: 2002-08-25 19:16+0000\n"
|
||||
"Last-Translator: Duarte Loreto <happyguy_pt@hotmail.com>\n"
|
||||
"Language-Team: Portuguese <gnome_pt@yahoogroups.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: examples/smp.c:68
|
||||
#: examples/smp.c:71
|
||||
#, c-format
|
||||
msgid "Ticks (%ld per second):"
|
||||
msgstr "Batidas (%ld por segundo):"
|
||||
|
||||
#: examples/smp.c:71
|
||||
#: examples/smp.c:74
|
||||
msgid "Total"
|
||||
msgstr "Total"
|
||||
|
||||
#: examples/smp.c:71 sysdeps/names/mem.c:47
|
||||
#: examples/smp.c:74 sysdeps/names/mem.c:47
|
||||
msgid "User"
|
||||
msgstr "Utilizador"
|
||||
|
||||
#: examples/smp.c:71 sysdeps/names/procuid.c:58
|
||||
#: examples/smp.c:74 sysdeps/names/procuid.c:58
|
||||
msgid "Nice"
|
||||
msgstr "Nice"
|
||||
|
||||
#: examples/smp.c:71
|
||||
#: examples/smp.c:74
|
||||
msgid "Sys"
|
||||
msgstr "Sis"
|
||||
|
||||
#: examples/smp.c:71
|
||||
#: examples/smp.c:74
|
||||
msgid "Idle"
|
||||
msgstr "Inactivo"
|
||||
|
||||
#: examples/smp.c:73
|
||||
#: examples/smp.c:76
|
||||
#, c-format
|
||||
msgid ""
|
||||
"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
|
||||
@@ -47,36 +49,36 @@ msgstr ""
|
||||
"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
|
||||
"\n"
|
||||
|
||||
#: examples/smp.c:77
|
||||
#: examples/smp.c:80
|
||||
#, c-format
|
||||
msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
|
||||
msgstr "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
|
||||
|
||||
#: examples/smp.c:94
|
||||
#: examples/smp.c:97
|
||||
msgid "Percent:"
|
||||
msgstr "Percentagem:"
|
||||
|
||||
#: examples/smp.c:95
|
||||
#: examples/smp.c:98
|
||||
msgid "Total (%)"
|
||||
msgstr "Total (%)"
|
||||
|
||||
#: examples/smp.c:95
|
||||
#: examples/smp.c:98
|
||||
msgid "User (%)"
|
||||
msgstr "Utilizador (%)"
|
||||
|
||||
#: examples/smp.c:95
|
||||
#: examples/smp.c:98
|
||||
msgid "Nice (%)"
|
||||
msgstr "Nice (%)"
|
||||
|
||||
#: examples/smp.c:95
|
||||
#: examples/smp.c:98
|
||||
msgid "Sys (%)"
|
||||
msgstr "Sis (%)"
|
||||
|
||||
#: examples/smp.c:96
|
||||
#: examples/smp.c:99
|
||||
msgid "Idle (%)"
|
||||
msgstr "Inactivo (%)"
|
||||
|
||||
#: examples/smp.c:98
|
||||
#: examples/smp.c:101
|
||||
#, c-format
|
||||
msgid ""
|
||||
"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
|
||||
@@ -85,12 +87,12 @@ msgstr ""
|
||||
"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
|
||||
"\n"
|
||||
|
||||
#: examples/smp.c:114
|
||||
#: examples/smp.c:117
|
||||
#, c-format
|
||||
msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
|
||||
msgstr "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
|
||||
|
||||
#: examples/smp.c:120
|
||||
#: examples/smp.c:123
|
||||
msgid "Spin:"
|
||||
msgstr "Rotações:"
|
||||
|
||||
@@ -113,39 +115,39 @@ msgstr "dados lidos %d bytes"
|
||||
msgid "write %d bytes"
|
||||
msgstr "escreveu %d bytes"
|
||||
|
||||
#: src/daemon/gnuserv.c:448
|
||||
#: src/daemon/gnuserv.c:453
|
||||
msgid "Enable debugging"
|
||||
msgstr "Activar depuração"
|
||||
|
||||
#: src/daemon/gnuserv.c:448
|
||||
#: src/daemon/gnuserv.c:453
|
||||
msgid "DEBUG"
|
||||
msgstr "DEBUG"
|
||||
|
||||
#: src/daemon/gnuserv.c:450
|
||||
#: src/daemon/gnuserv.c:455
|
||||
msgid "Enable verbose output"
|
||||
msgstr "Activar resultados extensos"
|
||||
|
||||
#: src/daemon/gnuserv.c:450
|
||||
#: src/daemon/gnuserv.c:455
|
||||
msgid "VERBOSE"
|
||||
msgstr "VERBOSE"
|
||||
|
||||
#: src/daemon/gnuserv.c:452
|
||||
#: src/daemon/gnuserv.c:457
|
||||
msgid "Don't fork into background"
|
||||
msgstr "Não fazer fork em background"
|
||||
|
||||
#: src/daemon/gnuserv.c:452
|
||||
#: src/daemon/gnuserv.c:457
|
||||
msgid "NO-DAEMON"
|
||||
msgstr "NO-DAEMON"
|
||||
|
||||
#: src/daemon/gnuserv.c:454
|
||||
#: src/daemon/gnuserv.c:459
|
||||
msgid "Invoked from inetd"
|
||||
msgstr "Invocado do inetd"
|
||||
|
||||
#: src/daemon/gnuserv.c:454
|
||||
#: src/daemon/gnuserv.c:459
|
||||
msgid "INETD"
|
||||
msgstr "INETD"
|
||||
|
||||
#: src/daemon/gnuserv.c:488
|
||||
#: src/daemon/gnuserv.c:493
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Error on option %s: %s.\n"
|
||||
@@ -292,7 +294,7 @@ msgstr "Número de batidas de relógio inactivas"
|
||||
|
||||
#: sysdeps/names/cpu.c:63
|
||||
msgid "Tick frequency (default is 100)"
|
||||
msgstr "Frequência batidas (defeito é 100)"
|
||||
msgstr "Frequência batidas (omissão é 100)"
|
||||
|
||||
#: sysdeps/names/fsusage.c:39 sysdeps/names/fsusage.c:48
|
||||
msgid "Total blocks"
|
||||
@@ -435,7 +437,7 @@ msgstr "Tamanho em kB da fila de mensagens"
|
||||
|
||||
#: sysdeps/names/msg_limits.c:41 sysdeps/names/msg_limits.c:52
|
||||
msgid "Number of entries in message map"
|
||||
msgstr "Número de entrasas no mapa de mensagens"
|
||||
msgstr "Número de entradas no mapa de mensagens"
|
||||
|
||||
#: sysdeps/names/msg_limits.c:42 sysdeps/names/msg_limits.c:53
|
||||
msgid "Max size of message"
|
||||
@@ -443,7 +445,7 @@ msgstr "Tamanho máx das mensagens"
|
||||
|
||||
#: sysdeps/names/msg_limits.c:43 sysdeps/names/msg_limits.c:54
|
||||
msgid "Default max size of queue"
|
||||
msgstr "Tamanho máx defeito da fila"
|
||||
msgstr "Tamanho máx por omissão da fila"
|
||||
|
||||
#: sysdeps/names/msg_limits.c:44 sysdeps/names/msg_limits.c:55
|
||||
msgid "Max queues system wide"
|
||||
@@ -601,7 +603,7 @@ msgstr ""
|
||||
"Isto poderá ser um bug, já que nem todos os processos são aplicações "
|
||||
"compiladas em C.\n"
|
||||
"\n"
|
||||
"O bit math deverá ser um decimal 4, e o bit de trace é decimal 10."
|
||||
"O bit math deverá ser um décimal 4, e o bit de trace é décimal 10."
|
||||
|
||||
#. Min_Flt
|
||||
#: sysdeps/names/prockernel.c:59
|
||||
@@ -922,7 +924,7 @@ msgid ""
|
||||
"an interval timer."
|
||||
msgstr ""
|
||||
"O tempo (em jiffies) antes do próximo SIGALRM ser enviado ao processo devido "
|
||||
"ao temporizador de intrevalo."
|
||||
"ao temporizador de intervalo."
|
||||
|
||||
#: sysdeps/names/proctime.c:60
|
||||
msgid "Tick frequency"
|
||||
|
90
po/pt_BR.po
90
po/pt_BR.po
@@ -1,43 +1,45 @@
|
||||
#
|
||||
# Brazilian Portuguese translation of libgtop
|
||||
# Copyright (C) 2001-2003 Free Software Foundation, Inc.
|
||||
# E. A. Tacão <tacao@conectiva.com.br>, 2001
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: LibGTOP\n"
|
||||
"POT-Creation-Date: 2002-07-05 19:54-0300\n"
|
||||
"PO-Revision-Date: 2002-07-05 19:59GMT-0300\n"
|
||||
"Project-Id-Version: libgtop 2.0.4\n"
|
||||
"POT-Creation-Date: 2003-10-01 17:21-0400\n"
|
||||
"PO-Revision-Date: 2003-10-01 17:20-0400\n"
|
||||
"Last-Translator: Evandro Fernandes Giovanini <evandrofg@ig.com.br>\n"
|
||||
"Language-Team: Brazilian Portuguese <ldp-br@bazar.conectiva.com.br>\n"
|
||||
"Language-Team: Brazilian Portuguese <gnome-l10n-br@listas.cipsga.org.br>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
|
||||
#: examples/smp.c:68
|
||||
#: examples/smp.c:71
|
||||
#, c-format
|
||||
msgid "Ticks (%ld per second):"
|
||||
msgstr "Pulsos (%ld por segundo):"
|
||||
|
||||
#: examples/smp.c:71
|
||||
#: examples/smp.c:74
|
||||
msgid "Total"
|
||||
msgstr "Total"
|
||||
|
||||
#: examples/smp.c:71 sysdeps/names/mem.c:47
|
||||
#: examples/smp.c:74 sysdeps/names/mem.c:47
|
||||
msgid "User"
|
||||
msgstr "Usuário"
|
||||
|
||||
#: examples/smp.c:71 sysdeps/names/procuid.c:58
|
||||
#: examples/smp.c:74 sysdeps/names/procuid.c:58
|
||||
msgid "Nice"
|
||||
msgstr "Prioridade"
|
||||
|
||||
#: examples/smp.c:71
|
||||
#: examples/smp.c:74
|
||||
msgid "Sys"
|
||||
msgstr "Sys"
|
||||
|
||||
#: examples/smp.c:71
|
||||
#: examples/smp.c:74
|
||||
msgid "Idle"
|
||||
msgstr "Tempo ocioso"
|
||||
|
||||
#: examples/smp.c:73
|
||||
#: examples/smp.c:76
|
||||
#, c-format
|
||||
msgid ""
|
||||
"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
|
||||
@@ -46,36 +48,36 @@ msgstr ""
|
||||
"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
|
||||
"\n"
|
||||
|
||||
#: examples/smp.c:77
|
||||
#: examples/smp.c:80
|
||||
#, c-format
|
||||
msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
|
||||
msgstr "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
|
||||
|
||||
#: examples/smp.c:94
|
||||
#: examples/smp.c:97
|
||||
msgid "Percent:"
|
||||
msgstr "Percentual:"
|
||||
|
||||
#: examples/smp.c:95
|
||||
#: examples/smp.c:98
|
||||
msgid "Total (%)"
|
||||
msgstr "Total (%)"
|
||||
|
||||
#: examples/smp.c:95
|
||||
#: examples/smp.c:98
|
||||
msgid "User (%)"
|
||||
msgstr "Usuário (%)"
|
||||
|
||||
#: examples/smp.c:95
|
||||
#: examples/smp.c:98
|
||||
msgid "Nice (%)"
|
||||
msgstr "Prioridade (%)"
|
||||
|
||||
#: examples/smp.c:95
|
||||
#: examples/smp.c:98
|
||||
msgid "Sys (%)"
|
||||
msgstr "Sys (%)"
|
||||
|
||||
#: examples/smp.c:96
|
||||
#: examples/smp.c:99
|
||||
msgid "Idle (%)"
|
||||
msgstr "Tempo ocioso (%)"
|
||||
|
||||
#: examples/smp.c:98
|
||||
#: examples/smp.c:101
|
||||
#, c-format
|
||||
msgid ""
|
||||
"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
|
||||
@@ -84,12 +86,12 @@ msgstr ""
|
||||
"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
|
||||
"\n"
|
||||
|
||||
#: examples/smp.c:114
|
||||
#: examples/smp.c:117
|
||||
#, c-format
|
||||
msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
|
||||
msgstr "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
|
||||
|
||||
#: examples/smp.c:120
|
||||
#: examples/smp.c:123
|
||||
msgid "Spin:"
|
||||
msgstr "Spin:"
|
||||
|
||||
@@ -112,39 +114,39 @@ msgstr "ler %d bytes de dados"
|
||||
msgid "write %d bytes"
|
||||
msgstr "escrever %d bytes"
|
||||
|
||||
#: src/daemon/gnuserv.c:448
|
||||
#: src/daemon/gnuserv.c:453
|
||||
msgid "Enable debugging"
|
||||
msgstr "Habilitar depuração"
|
||||
|
||||
#: src/daemon/gnuserv.c:448
|
||||
#: src/daemon/gnuserv.c:453
|
||||
msgid "DEBUG"
|
||||
msgstr "DEBUG"
|
||||
|
||||
#: src/daemon/gnuserv.c:450
|
||||
#: src/daemon/gnuserv.c:455
|
||||
msgid "Enable verbose output"
|
||||
msgstr "Habilitar saída com mensagens detalhadas "
|
||||
|
||||
#: src/daemon/gnuserv.c:450
|
||||
#: src/daemon/gnuserv.c:455
|
||||
msgid "VERBOSE"
|
||||
msgstr "VERBOSE"
|
||||
|
||||
#: src/daemon/gnuserv.c:452
|
||||
#: src/daemon/gnuserv.c:457
|
||||
msgid "Don't fork into background"
|
||||
msgstr "Não passar para segundo plano"
|
||||
|
||||
#: src/daemon/gnuserv.c:452
|
||||
#: src/daemon/gnuserv.c:457
|
||||
msgid "NO-DAEMON"
|
||||
msgstr "NO-DAEMON"
|
||||
|
||||
#: src/daemon/gnuserv.c:454
|
||||
#: src/daemon/gnuserv.c:459
|
||||
msgid "Invoked from inetd"
|
||||
msgstr "Acionado pelo inetd"
|
||||
|
||||
#: src/daemon/gnuserv.c:454
|
||||
#: src/daemon/gnuserv.c:459
|
||||
msgid "INETD"
|
||||
msgstr "INETD"
|
||||
|
||||
#: src/daemon/gnuserv.c:488
|
||||
#: src/daemon/gnuserv.c:493
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Error on option %s: %s.\n"
|
||||
@@ -475,15 +477,15 @@ msgstr "Endereço"
|
||||
|
||||
#: sysdeps/names/netload.c:49 sysdeps/names/netload.c:67
|
||||
msgid "Packets In"
|
||||
msgstr "Páginas em Processamento"
|
||||
msgstr "Pacotes recebidos"
|
||||
|
||||
#: sysdeps/names/netload.c:50 sysdeps/names/netload.c:68
|
||||
msgid "Packets Out"
|
||||
msgstr "Página em Espera"
|
||||
msgstr "Pacotes enviados"
|
||||
|
||||
#: sysdeps/names/netload.c:51 sysdeps/names/netload.c:69
|
||||
msgid "Packets Total"
|
||||
msgstr "Total de Páginas"
|
||||
msgstr "Total de pacotes"
|
||||
|
||||
#: sysdeps/names/netload.c:52 sysdeps/names/netload.c:70
|
||||
msgid "Bytes In"
|
||||
@@ -593,14 +595,14 @@ msgid ""
|
||||
"\n"
|
||||
"The math bit should be a decimal 4, and the traced bit is decimal 10."
|
||||
msgstr ""
|
||||
"Parâmetros do kernel para o processo.\n"
|
||||
"Sinalizadores do kernel para o processo.\n"
|
||||
"\n"
|
||||
"No Linux, cada parâmetro tem o bit matemático habilitado, pois crt0.s "
|
||||
"No Linux, cada sinalizador tem o bit matemático definido, pois crt0.s "
|
||||
"verifica se há emulação matemática, de modo que não seja incluída na saída.\n"
|
||||
"\n"
|
||||
"Isto é provavelmente um problema, já que nem todo processo é um programa C.\n"
|
||||
"Isto é provavelmente um erro, já que nem todo os processos são programas C.\n"
|
||||
"\n"
|
||||
"O bit matemático deve ser um 4 decimal, e o bit verificado é o decimal 10."
|
||||
"O bit matemático deve ser um 4 decimal, e o bit verificado é o 10 decimal."
|
||||
|
||||
#. Min_Flt
|
||||
#: sysdeps/names/prockernel.c:59
|
||||
@@ -608,8 +610,8 @@ msgid ""
|
||||
"The number of minor faults the process has made, those which have not "
|
||||
"required loading a memory page from disk."
|
||||
msgstr ""
|
||||
"O número de falhas menores do processo, são aquelas que não provocaram a "
|
||||
"busca de uma página de memória do disco."
|
||||
"O número de falhas menores do processo; aquelas que não provocaram a carga "
|
||||
"de uma página de memória do disco."
|
||||
|
||||
#. Maj_Flt
|
||||
#: sysdeps/names/prockernel.c:62
|
||||
@@ -676,11 +678,11 @@ msgstr "Compartilhado"
|
||||
|
||||
#: sysdeps/names/procmem.c:48
|
||||
msgid "Resident Set Size"
|
||||
msgstr "Configuração do Tamanho Residente"
|
||||
msgstr "Tamanho do conjunto residente"
|
||||
|
||||
#: sysdeps/names/procmem.c:48
|
||||
msgid "Resident Set Size Limit"
|
||||
msgstr "Limite da Parte Residente"
|
||||
msgstr "Limite do tamanho do conjunto residente"
|
||||
|
||||
#: sysdeps/names/procmem.c:53
|
||||
msgid "Total # of pages of memory"
|
||||
@@ -692,7 +694,7 @@ msgstr "Número de páginas na memória virtual"
|
||||
|
||||
#: sysdeps/names/procmem.c:55
|
||||
msgid "Number of resident set (non-swapped) pages"
|
||||
msgstr "Número de páginas residentes (fora da troca)"
|
||||
msgstr "Número de páginas no conjunto residente (fora da troca)"
|
||||
|
||||
#: sysdeps/names/procmem.c:56
|
||||
msgid "Number of pages of shared (mmap'd) memory"
|
||||
@@ -749,7 +751,7 @@ msgstr "Start_Stack"
|
||||
|
||||
#: sysdeps/names/procsegment.c:48
|
||||
msgid "Text resident set size"
|
||||
msgstr "Parte residente do código"
|
||||
msgstr "Tamanho do conjunto residente texto"
|
||||
|
||||
#: sysdeps/names/procsegment.c:49
|
||||
msgid "Shared-Lib resident set size"
|
||||
|
27
po/sv.po
27
po/sv.po
@@ -9,13 +9,14 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: libgtop\n"
|
||||
"POT-Creation-Date: 2003-02-09 23:12+0100\n"
|
||||
"PO-Revision-Date: 2003-02-09 23:13+0100\n"
|
||||
"POT-Creation-Date: 2003-10-22 00:07+0200\n"
|
||||
"PO-Revision-Date: 2003-10-22 00:08+0200\n"
|
||||
"Last-Translator: Christian Rose <menthos@menthos.com>\n"
|
||||
"Language-Team: Swedish <sv@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: examples/smp.c:71
|
||||
#, c-format
|
||||
@@ -117,39 +118,39 @@ msgstr "läste %d byte data"
|
||||
msgid "write %d bytes"
|
||||
msgstr "skrev %d byte"
|
||||
|
||||
#: src/daemon/gnuserv.c:448
|
||||
#: src/daemon/gnuserv.c:453
|
||||
msgid "Enable debugging"
|
||||
msgstr "Aktivera felsökning"
|
||||
|
||||
#: src/daemon/gnuserv.c:448
|
||||
#: src/daemon/gnuserv.c:453
|
||||
msgid "DEBUG"
|
||||
msgstr "FELSÖK"
|
||||
|
||||
#: src/daemon/gnuserv.c:450
|
||||
#: src/daemon/gnuserv.c:455
|
||||
msgid "Enable verbose output"
|
||||
msgstr "Aktivera utförlig utskrift"
|
||||
|
||||
#: src/daemon/gnuserv.c:450
|
||||
#: src/daemon/gnuserv.c:455
|
||||
msgid "VERBOSE"
|
||||
msgstr "UTFÖRLIG"
|
||||
|
||||
#: src/daemon/gnuserv.c:452
|
||||
#: src/daemon/gnuserv.c:457
|
||||
msgid "Don't fork into background"
|
||||
msgstr "Grena inte i bakgrunden"
|
||||
|
||||
#: src/daemon/gnuserv.c:452
|
||||
#: src/daemon/gnuserv.c:457
|
||||
msgid "NO-DAEMON"
|
||||
msgstr "INGEN-DEMON"
|
||||
|
||||
#: src/daemon/gnuserv.c:454
|
||||
#: src/daemon/gnuserv.c:459
|
||||
msgid "Invoked from inetd"
|
||||
msgstr "Startad från inetd"
|
||||
|
||||
#: src/daemon/gnuserv.c:454
|
||||
#: src/daemon/gnuserv.c:459
|
||||
msgid "INETD"
|
||||
msgstr "INETD"
|
||||
|
||||
#: src/daemon/gnuserv.c:488
|
||||
#: src/daemon/gnuserv.c:493
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Error on option %s: %s.\n"
|
||||
@@ -222,11 +223,11 @@ msgstr "%s: flaggan \"-W %s\" är tvetydig\n"
|
||||
msgid "%s: option `-W %s' doesn't allow an argument\n"
|
||||
msgstr "%s: flaggan \"-W %s\" tillåter inga argument\n"
|
||||
|
||||
#: support/popthelp.c:35
|
||||
#: support/popthelp.c:23
|
||||
msgid "Show this help message"
|
||||
msgstr "Visa denna hjälptext"
|
||||
|
||||
#: support/popthelp.c:36
|
||||
#: support/popthelp.c:24
|
||||
msgid "Display brief usage message"
|
||||
msgstr "Visa kortfattad användningstext"
|
||||
|
||||
|
@@ -1,92 +1,93 @@
|
||||
# Spain diffs with es.po for libgtop
|
||||
# Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
# Carlos Perelló Marín <carlos@gnome-db.org>, 2002.
|
||||
#
|
||||
# Tamil translation of Tamil Libgtop 2.4.
|
||||
# Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
# Dinesh Nadarajah <n_dinesh@yahoo.com>, 2003.
|
||||
#
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: glibtop 1.90.2\n"
|
||||
"POT-Creation-Date: 2002-05-28 15:54+0200\n"
|
||||
"PO-Revision-Date: 2002-05-28 15:50+0200\n"
|
||||
"Last-Translator: Carlos Perelló Marín <carlos@gnome-db.org>\n"
|
||||
"Language-Team: Spanish <traductores@es.gnome.org>\n"
|
||||
msgstr "Project-Id-Version: Tamil Libgtop 2.4"
|
||||
"POT-Creation-Date: 2003-09-16 17:19-0500\n"
|
||||
"PO-Revision-Date: 2003-09-16 17:19-0500\n"
|
||||
"Last-Translator: Dinesh Nadarajah <n_dinesh@yahoo.com>\n"
|
||||
"Language-Team: Tamil <tamilinix@yahoogroups.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
""
|
||||
|
||||
#: examples/smp.c:68
|
||||
#: examples/smp.c:71
|
||||
#, c-format
|
||||
msgid "Ticks (%ld per second):"
|
||||
msgstr ""
|
||||
|
||||
#: examples/smp.c:71
|
||||
#: examples/smp.c:74
|
||||
msgid "Total"
|
||||
msgstr ""
|
||||
|
||||
#: examples/smp.c:71 sysdeps/names/mem.c:47
|
||||
#: examples/smp.c:74 sysdeps/names/mem.c:47
|
||||
msgid "User"
|
||||
msgstr ""
|
||||
msgstr "பயனர்"
|
||||
|
||||
#: examples/smp.c:71 sysdeps/names/procuid.c:58
|
||||
#: examples/smp.c:74 sysdeps/names/procuid.c:58
|
||||
msgid "Nice"
|
||||
msgstr ""
|
||||
|
||||
#: examples/smp.c:71
|
||||
#: examples/smp.c:74
|
||||
msgid "Sys"
|
||||
msgstr ""
|
||||
|
||||
#: examples/smp.c:71
|
||||
#: examples/smp.c:74
|
||||
msgid "Idle"
|
||||
msgstr ""
|
||||
|
||||
#: examples/smp.c:73
|
||||
#: examples/smp.c:76
|
||||
#, c-format
|
||||
msgid ""
|
||||
"CPU (0x%08lx): %12.0f %12.0f %12.0f %12.0f %12.0f\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
|
||||
#: examples/smp.c:77
|
||||
#: examples/smp.c:80
|
||||
#, c-format
|
||||
msgid "CPU %3d (0x%08lx): %12lu %12lu %12lu %12lu %12lu\n"
|
||||
msgstr ""
|
||||
|
||||
#: examples/smp.c:94
|
||||
#: examples/smp.c:97
|
||||
msgid "Percent:"
|
||||
msgstr ""
|
||||
|
||||
#: examples/smp.c:95
|
||||
#: examples/smp.c:98
|
||||
msgid "Total (%)"
|
||||
msgstr ""
|
||||
|
||||
#: examples/smp.c:95
|
||||
#: examples/smp.c:98
|
||||
msgid "User (%)"
|
||||
msgstr ""
|
||||
|
||||
#: examples/smp.c:95
|
||||
#: examples/smp.c:98
|
||||
msgid "Nice (%)"
|
||||
msgstr ""
|
||||
|
||||
#: examples/smp.c:95
|
||||
#: examples/smp.c:98
|
||||
msgid "Sys (%)"
|
||||
msgstr ""
|
||||
|
||||
#: examples/smp.c:96
|
||||
#: examples/smp.c:99
|
||||
msgid "Idle (%)"
|
||||
msgstr ""
|
||||
|
||||
#: examples/smp.c:98
|
||||
#: examples/smp.c:101
|
||||
#, c-format
|
||||
msgid ""
|
||||
"CPU (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
|
||||
#: examples/smp.c:114
|
||||
#: examples/smp.c:117
|
||||
#, c-format
|
||||
msgid "CPU %3d (0x%08lx): %12.3f %12.3f %12.3f %12.3f %12.3f\n"
|
||||
msgstr ""
|
||||
|
||||
#: examples/smp.c:120
|
||||
#: examples/smp.c:123
|
||||
msgid "Spin:"
|
||||
msgstr ""
|
||||
|
||||
@@ -109,39 +110,39 @@ msgstr ""
|
||||
msgid "write %d bytes"
|
||||
msgstr ""
|
||||
|
||||
#: src/daemon/gnuserv.c:448
|
||||
#: src/daemon/gnuserv.c:453
|
||||
msgid "Enable debugging"
|
||||
msgstr ""
|
||||
|
||||
#: src/daemon/gnuserv.c:448
|
||||
#: src/daemon/gnuserv.c:453
|
||||
msgid "DEBUG"
|
||||
msgstr ""
|
||||
|
||||
#: src/daemon/gnuserv.c:450
|
||||
#: src/daemon/gnuserv.c:455
|
||||
msgid "Enable verbose output"
|
||||
msgstr ""
|
||||
|
||||
#: src/daemon/gnuserv.c:450
|
||||
#: src/daemon/gnuserv.c:455
|
||||
msgid "VERBOSE"
|
||||
msgstr ""
|
||||
|
||||
#: src/daemon/gnuserv.c:452
|
||||
#: src/daemon/gnuserv.c:457
|
||||
msgid "Don't fork into background"
|
||||
msgstr ""
|
||||
|
||||
#: src/daemon/gnuserv.c:452
|
||||
#: src/daemon/gnuserv.c:457
|
||||
msgid "NO-DAEMON"
|
||||
msgstr ""
|
||||
|
||||
#: src/daemon/gnuserv.c:454
|
||||
#: src/daemon/gnuserv.c:459
|
||||
msgid "Invoked from inetd"
|
||||
msgstr ""
|
||||
|
||||
#: src/daemon/gnuserv.c:454
|
||||
#: src/daemon/gnuserv.c:459
|
||||
msgid "INETD"
|
||||
msgstr ""
|
||||
|
||||
#: src/daemon/gnuserv.c:488
|
||||
#: src/daemon/gnuserv.c:493
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Error on option %s: %s.\n"
|
||||
@@ -317,7 +318,7 @@ msgstr ""
|
||||
|
||||
#: sysdeps/names/loadavg.c:39
|
||||
msgid "Load Average"
|
||||
msgstr ""
|
||||
msgstr "சுமாராக ஏற்று"
|
||||
|
||||
#: sysdeps/names/loadavg.c:40
|
||||
msgid "Running Tasks"
|
||||
@@ -463,7 +464,7 @@ msgstr ""
|
||||
|
||||
#: sysdeps/names/netload.c:48 sysdeps/names/netload.c:66
|
||||
msgid "Address"
|
||||
msgstr ""
|
||||
msgstr "_முகவரி"
|
||||
|
||||
#: sysdeps/names/netload.c:49 sysdeps/names/netload.c:67
|
||||
msgid "Packets In"
|
||||
@@ -531,7 +532,7 @@ msgstr ""
|
||||
|
||||
#: sysdeps/names/procargs.c:38 sysdeps/names/procmem.c:47
|
||||
msgid "Size"
|
||||
msgstr ""
|
||||
msgstr "அளவு"
|
||||
|
||||
#: sysdeps/names/procargs.c:43
|
||||
msgid "Length in bytes of the returned string."
|
||||
@@ -680,21 +681,10 @@ msgid ""
|
||||
"which are swapped out."
|
||||
msgstr ""
|
||||
|
||||
#
|
||||
# In México, Dominican Republic, Guatemala, Honduras, Panama, Peru
|
||||
# and El Salvador, Number formats are the same as in the US, so no
|
||||
# translation is required for them (the use es.po string).
|
||||
# Spain use "." chars instead of "," so the msgstr MUST be filled; otherwise
|
||||
# it will default to es.po which uses the US format for numbers.
|
||||
# On the other hand, strings that are the same here and in es.po can
|
||||
# be left out.
|
||||
#
|
||||
#: sysdeps/names/procmem.c:62
|
||||
msgid ""
|
||||
"Current limit in bytes on the rss of the process (usually 2,147,483,647)."
|
||||
msgstr ""
|
||||
"Límite actual en bytes de conjunto compartido (RSS) del proceso "
|
||||
"(habitualmente 2.147.483.647)."
|
||||
|
||||
#: sysdeps/names/procsegment.c:42
|
||||
msgid "Text_RSS"
|
||||
@@ -798,7 +788,7 @@ msgstr ""
|
||||
|
||||
#: sysdeps/names/procstate.c:40
|
||||
msgid "State"
|
||||
msgstr ""
|
||||
msgstr "நிலமை"
|
||||
|
||||
#: sysdeps/names/procstate.c:40
|
||||
msgid "UID"
|
||||
@@ -1220,7 +1210,7 @@ msgstr ""
|
||||
|
||||
#: sysdeps/osf1/siglist.c:30 sysdeps/sun4/siglist.c:30
|
||||
msgid "Quit"
|
||||
msgstr ""
|
||||
msgstr "வெளிச்செல்"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:31 sysdeps/sun4/siglist.c:31
|
||||
msgid "Illegal instruction"
|
||||
@@ -1276,7 +1266,7 @@ msgstr ""
|
||||
|
||||
#: sysdeps/osf1/siglist.c:44 sysdeps/sun4/siglist.c:44
|
||||
msgid "Stop"
|
||||
msgstr ""
|
||||
msgstr "நிறுத்து"
|
||||
|
||||
#: sysdeps/osf1/siglist.c:45 sysdeps/sun4/siglist.c:45
|
||||
msgid "Keyboard stop"
|
||||
@@ -1333,3 +1323,4 @@ msgstr ""
|
||||
#: sysdeps/osf1/siglist.c:58 sysdeps/sun4/siglist.c:58
|
||||
msgid "User defined signal 2"
|
||||
msgstr ""
|
||||
|
2
scripts/.cvsignore
Normal file
2
scripts/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
Makefile.in
|
||||
Makefile
|
9
scripts/ChangeLog
Normal file
9
scripts/ChangeLog
Normal file
@@ -0,0 +1,9 @@
|
||||
2000-01-02 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* c_types.pl ($demarshal_funcs): New variable.
|
||||
|
||||
1999-11-28 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* c_types.pl: New file.
|
||||
This is included in `$(top_srcdir)/lib/lib.pl'.
|
||||
|
1
scripts/Makefile.am
Normal file
1
scripts/Makefile.am
Normal file
@@ -0,0 +1 @@
|
||||
EXTRA_DIST = c_types.pl
|
71
scripts/c_types.pl
Normal file
71
scripts/c_types.pl
Normal file
@@ -0,0 +1,71 @@
|
||||
# Internal functions
|
||||
|
||||
my $c_strlen_func = sub {
|
||||
local ($_) = @_;
|
||||
|
||||
return "strlen ($_) + 1";
|
||||
};
|
||||
|
||||
my $c_marshal_func = sub {
|
||||
my ($type, $param, $indent) = @_;
|
||||
|
||||
my $code = '';
|
||||
$code .= sprintf ("%s_LIBGTOP_SEND_temp_len = strlen (%s)+1;\n",
|
||||
$indent, $param);
|
||||
$code .= sprintf ("%smemcpy (_LIBGTOP_SEND_ptr, %s, %s);\n",
|
||||
$indent, "&_LIBGTOP_SEND_temp_len", "sizeof (size_t)");
|
||||
$code .= sprintf ("%s_LIBGTOP_SEND_ptr += sizeof (size_t);\n", $indent);
|
||||
$code .= sprintf ("%smemcpy (_LIBGTOP_DATA_ptr, %s, %s);\n",
|
||||
$indent, $param, "strlen ($param)+1");
|
||||
$code .= sprintf ("%s_LIBGTOP_DATA_ptr += strlen ($param)+1;\n",
|
||||
$indent);
|
||||
|
||||
$need_temp_len = 1;
|
||||
|
||||
return $code;
|
||||
};
|
||||
|
||||
my $c_demarshal_func = sub {
|
||||
my ($type, $param, $indent) = @_;
|
||||
|
||||
my $code = '';
|
||||
$code .= sprintf ("%s_LIBGTOP_demarshal_%s = _LIBGTOP_DATA_ptr;\n",
|
||||
$indent, $param);
|
||||
$code .= sprintf ("%sif (_LIBGTOP_TEMP_len) --_LIBGTOP_TEMP_len;\n",
|
||||
$indent);
|
||||
$code .= sprintf ("%s*(_LIBGTOP_DATA_ptr + _LIBGTOP_TEMP_len) = 0;\n",
|
||||
$indent);
|
||||
|
||||
$need_temp_len = 1;
|
||||
|
||||
return $code;
|
||||
};
|
||||
|
||||
|
||||
|
||||
# Typeinfo array fields:
|
||||
# ---------------------
|
||||
# * C type name
|
||||
# * Flag specifying whether we need to copy the parameter into temp storage
|
||||
#
|
||||
|
||||
$typeinfo = {'long' => ['int64_t', 0],
|
||||
'ulong' => ['u_int64_t', 0],
|
||||
'pid_t' => ['pid_t', 0],
|
||||
'int' => ['int', 0],
|
||||
'retval' => ['int', 0],
|
||||
'ushort' => ['unsigned short', 0],
|
||||
'unsigned' => ['unsigned', 0],
|
||||
'string' => ['const char *', 1],
|
||||
};
|
||||
|
||||
$sizeof_funcs = {'string' => $c_strlen_func,
|
||||
};
|
||||
|
||||
$marshal_funcs = {'string' => $c_marshal_func,
|
||||
};
|
||||
|
||||
$demarshal_funcs = {'string' => $c_demarshal_func,
|
||||
};
|
||||
|
||||
1;
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user