Compare commits
767 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
110927bbc5 | ||
|
|
a16e4e96c0 | ||
|
|
bdea41e2c1 | ||
|
|
d49ec07cae | ||
|
|
1bf8f5e9d2 | ||
|
|
66577acae1 | ||
|
|
e5b9eacd89 | ||
|
|
6d6edd6fe0 | ||
|
|
ae08077dfc | ||
|
|
2391bf499b | ||
|
|
cb0cbcc058 | ||
|
|
8ae5789447 | ||
|
|
65f3e42de3 | ||
|
|
fae0dce708 | ||
|
|
48bd37812b | ||
|
|
13f3017d0f | ||
|
|
32da456ab0 | ||
|
|
180a569fdb | ||
|
|
13fd44bfe4 | ||
|
|
327939843d | ||
|
|
78e2c9d844 | ||
|
|
64dd95dd75 | ||
|
|
05d8ce9adf | ||
|
|
1a58fb46f5 | ||
|
|
cf9f783d26 | ||
|
|
a4ffccb321 | ||
|
|
f4e572919d | ||
|
|
414acab0ce | ||
|
|
5b85366a50 | ||
|
|
11f39e7044 | ||
|
|
39d02c4796 | ||
|
|
9335f91085 | ||
|
|
77b12326c8 | ||
|
|
3c57e50db8 | ||
|
|
cf6807100b | ||
|
|
52db7a2c3d | ||
|
|
0bb70dcda5 | ||
|
|
5fd6cacfa5 | ||
|
|
7bf2509a70 | ||
|
|
9c23a44907 | ||
|
|
7dd7768bb6 | ||
|
|
df59ae64e9 | ||
|
|
b439622d3a | ||
|
|
8083827088 | ||
|
|
db4c08e8f9 | ||
|
|
2fa11b836d | ||
|
|
86c9676f7a | ||
|
|
81cbfad086 | ||
|
|
2084acc37d | ||
|
|
3795e5fc76 | ||
|
|
08893e08e3 | ||
|
|
feebeb90ea | ||
|
|
9b8b370132 | ||
|
|
8c9c572309 | ||
|
|
33088740da | ||
|
|
1fa00797ef | ||
|
|
6859079638 | ||
|
|
773623c066 | ||
|
|
0567bfe14c | ||
|
|
8c8d370470 | ||
|
|
22ec59a073 | ||
|
|
f3e80adbe4 | ||
|
|
7bf7274d9f | ||
|
|
7b409bd6b6 | ||
|
|
dc57bbab7a | ||
|
|
6d0aa9f3b7 | ||
|
|
e59fc829d8 | ||
|
|
a1a6a7fda6 | ||
|
|
107864058b | ||
|
|
2cd72b6aa2 | ||
|
|
3a24f3f780 | ||
|
|
347c184b6f | ||
|
|
48ebb81fb2 | ||
|
|
abf22a8fb2 | ||
|
|
e7ee63f271 | ||
|
|
fa0c6963ce | ||
|
|
878ced39bf | ||
|
|
b3655b4c5e | ||
|
|
fac011a5e1 | ||
|
|
9f4e583e52 | ||
|
|
beead28619 | ||
|
|
eb94b9edcd | ||
|
|
76e291beee | ||
|
|
ab23fbd019 | ||
|
|
26f4603a89 | ||
|
|
2476ebd31b | ||
|
|
482d165ab5 | ||
|
|
02a24525c5 | ||
|
|
cdcac1ccc2 | ||
|
|
633dab0340 | ||
|
|
14a0e55bc9 | ||
|
|
8fd15e2672 | ||
|
|
19aad376ef | ||
|
|
c17aa63200 | ||
|
|
9a39789cb6 | ||
|
|
03260b40fa | ||
|
|
58a3353307 | ||
|
|
4c6438be6f | ||
|
|
780f3205f1 | ||
|
|
8a9863736b | ||
|
|
cdbabfd4fc | ||
|
|
7d589ca5fa | ||
|
|
ca1a82ecab | ||
|
|
f57b886bed | ||
|
|
22262441c7 | ||
|
|
b97bedafe8 | ||
|
|
31b2b81e53 | ||
|
|
5e4b1085b4 | ||
|
|
b516d8e3f3 | ||
|
|
66c33b8731 | ||
|
|
dc2ca88718 | ||
|
|
a2d849bcd4 | ||
|
|
14b0accd81 | ||
|
|
b26cb39296 | ||
|
|
e10f389e9c | ||
|
|
ad3f478452 | ||
|
|
59121a9aaf | ||
|
|
92f5fdc230 | ||
|
|
386e0518b5 | ||
|
|
1c27d3e875 | ||
|
|
7fdbd05b41 | ||
|
|
d948edc4f3 | ||
|
|
222a0863fa | ||
|
|
1e36fd8f69 | ||
|
|
f727da88b0 | ||
|
|
73889487f0 | ||
|
|
200b27e33e | ||
|
|
10398ade49 | ||
|
|
1b3381bee8 | ||
|
|
2bef18210a | ||
|
|
352801cf4c | ||
|
|
c1917e7b66 | ||
|
|
acf4b16b72 | ||
|
|
475f96d0b3 | ||
|
|
a951f21c59 | ||
|
|
26a86e350c | ||
|
|
9519eb0c88 | ||
|
|
759d3523fc | ||
|
|
56214c6aef | ||
|
|
5050d35e87 | ||
|
|
ecc1933c14 | ||
|
|
c1968a0795 | ||
|
|
99e30e1bee | ||
|
|
ce78c1eb88 | ||
|
|
beb5497530 | ||
|
|
96bd4e4ed8 | ||
|
|
8d990b5e8b | ||
|
|
6f6aba0350 | ||
|
|
3e3ae94084 | ||
|
|
0319176f2d | ||
|
|
960a8635bc | ||
|
|
995177f2d9 | ||
|
|
8fa1e28681 | ||
|
|
7004c289f8 | ||
|
|
6414b40d3d | ||
|
|
91841895e0 | ||
|
|
5d25f06e3b | ||
|
|
128e95ffdc | ||
|
|
e09cd1d4d1 | ||
|
|
e1f1452eb5 | ||
|
|
b6c89eed9f | ||
|
|
0357c4d552 | ||
|
|
68532c37ef | ||
|
|
ff98983602 | ||
|
|
6c49b3f32c | ||
|
|
4d69d4313f | ||
|
|
90bbdd3c40 | ||
|
|
d1625cdfe6 | ||
|
|
c6c35eafc8 | ||
|
|
b1aaa27c10 | ||
|
|
2cde0a24d4 | ||
|
|
7dd1869713 | ||
|
|
96eef7332b | ||
|
|
9b3c7e8be7 | ||
|
|
c2acb81782 | ||
|
|
c1049aced1 | ||
|
|
372b1a0939 | ||
|
|
47a2686e41 | ||
|
|
0e8c8d8cdc | ||
|
|
41ed01632f | ||
|
|
4839d23b11 | ||
|
|
279aaa9bdb | ||
|
|
ef8f98d0c8 | ||
|
|
e642197ff7 | ||
|
|
5cce53b5a8 | ||
|
|
5f36c3760f | ||
|
|
f372bd9f8c | ||
|
|
307d4c8f6b | ||
|
|
47f77b4715 | ||
|
|
9a74860957 | ||
|
|
355fbe5770 | ||
|
|
a212acf100 | ||
|
|
9cf9e06003 | ||
|
|
802c6ef076 | ||
|
|
819e3db74d | ||
|
|
2d7893d086 | ||
|
|
240998b25f | ||
|
|
df7d8b2e57 | ||
|
|
b26ecb597e | ||
|
|
052f9d238e | ||
|
|
049149f1da | ||
|
|
a2c02e9c8d | ||
|
|
df20e83412 | ||
|
|
33db9bf473 | ||
|
|
1a8b296adf | ||
|
|
ac899e5f80 | ||
|
|
d173c15ce5 | ||
|
|
521e00d761 | ||
|
|
7fde37f006 | ||
|
|
34319a1ff7 | ||
|
|
efd2236319 | ||
|
|
500b5e3539 | ||
|
|
40f45c8689 | ||
|
|
68b3dfb431 | ||
|
|
658399aeb9 | ||
|
|
e4933a393a | ||
|
|
a75bc41faf | ||
|
|
1cde322359 | ||
|
|
cf785632ed | ||
|
|
3ba29535a3 | ||
|
|
0241d19e4c | ||
|
|
ecc3d7f39e | ||
|
|
d21195f882 | ||
|
|
34654ab41a | ||
|
|
de3d800e67 | ||
|
|
c4e1a131d3 | ||
|
|
cc197ef0ea | ||
|
|
43fee64400 | ||
|
|
b4d6ad0ef6 | ||
|
|
d46156258b | ||
|
|
6fe61499e8 | ||
|
|
9a46f3cf56 | ||
|
|
1e43a12b49 | ||
|
|
dd0491380a | ||
|
|
53ea9d162b | ||
|
|
3b41212d61 | ||
|
|
8d848afb89 | ||
|
|
88b091510b | ||
|
|
9fe015cca3 | ||
|
|
63ba2d63ff | ||
|
|
92b3bd2de6 | ||
|
|
611e98be29 | ||
|
|
5c27385a16 | ||
|
|
99afb85752 | ||
|
|
64bacd20b5 | ||
|
|
3bf6bf45b7 | ||
|
|
4cb991dda1 | ||
|
|
b10283c4e8 | ||
|
|
f3fde7c2fc | ||
|
|
5f07180e8a | ||
|
|
051fc6e05a | ||
|
|
88520c93be | ||
|
|
a9434800df | ||
|
|
4e18b8f9ce | ||
|
|
725490495c | ||
|
|
09898d99d4 | ||
|
|
0bafa91096 | ||
|
|
b0bce4b429 | ||
|
|
8ce2413feb | ||
|
|
465f1e305d | ||
|
|
3f8db49622 | ||
|
|
4be36bf1d4 | ||
|
|
9634571dd6 | ||
|
|
6cb4e885f2 | ||
|
|
6efda54a6c | ||
|
|
316e4d9a67 | ||
|
|
18d70f1478 | ||
|
|
5050aa6ae7 | ||
|
|
4dfaf93bcd | ||
|
|
7a50009b1f | ||
|
|
03bf98015d | ||
|
|
bf521fabaa | ||
|
|
2fe0ddeab4 | ||
|
|
1f0ab55e6d | ||
|
|
528310223b | ||
|
|
cbee08f335 | ||
|
|
cc0da8ab53 | ||
|
|
819d46ac71 | ||
|
|
b881d3ea57 | ||
|
|
8d8e01224b | ||
|
|
12f294c651 | ||
|
|
ea066c8413 | ||
|
|
84de552b28 | ||
|
|
235ab192af | ||
|
|
6b58acd377 | ||
|
|
ac840eb42b | ||
|
|
6e2853705a | ||
|
|
9afd119dd5 | ||
|
|
38068cd152 | ||
|
|
60c65424c3 | ||
|
|
90d307413b | ||
|
|
b2c4cbebab | ||
|
|
cef7fbb41a | ||
|
|
a0238ed022 | ||
|
|
1c9d7f9f5d | ||
|
|
1bacd2f8c7 | ||
|
|
0876dc9860 | ||
|
|
49805175e3 | ||
|
|
4bf831ff39 | ||
|
|
3948bae1e1 | ||
|
|
2071207e84 | ||
|
|
2bfbda0fd7 | ||
|
|
7ab3e8fed7 | ||
|
|
0a24b595a6 | ||
|
|
35dac58a61 | ||
|
|
10ae4f11e0 | ||
|
|
55493c2052 | ||
|
|
4aa302fe4a | ||
|
|
e31677362b | ||
|
|
a0323de1f7 | ||
|
|
0d471de448 | ||
|
|
e76f06ba1c | ||
|
|
565f7d5558 | ||
|
|
2af3904099 | ||
|
|
0b33d8864a | ||
|
|
74bb31b15a | ||
|
|
94a78b8fb3 | ||
|
|
1e9183fe31 | ||
|
|
46055b2543 | ||
|
|
53712748ec | ||
|
|
67b14b1467 | ||
|
|
203ce15247 | ||
|
|
5b387d7527 | ||
|
|
9c9c5dab4c | ||
|
|
a4a222d1d7 | ||
|
|
a18d7978e2 | ||
|
|
a7b2ed0cac | ||
|
|
78aac9113d | ||
|
|
f4a986465a | ||
|
|
a57fcb044c | ||
|
|
ea620fe88b | ||
|
|
0d9109acf6 | ||
|
|
2d6f1bc896 | ||
|
|
6aec0d6363 | ||
|
|
82b182986b | ||
|
|
8119765cbd | ||
|
|
618f5d788c | ||
|
|
4ce8e3b863 | ||
|
|
35ac99d0d4 | ||
|
|
c46dd8123c | ||
|
|
9560bb51ab | ||
|
|
882e145ebb | ||
|
|
fb9cffe268 | ||
|
|
8546fa016e | ||
|
|
7e7bcf8a46 | ||
|
|
4de7b95511 | ||
|
|
1bf501c236 | ||
|
|
af6414ac37 | ||
|
|
4ed131510e | ||
|
|
8bc03b6fdc | ||
|
|
b55999ebcb | ||
|
|
3362cae2f6 | ||
|
|
af7fc3dbc1 | ||
|
|
00ae5dfa27 | ||
|
|
d096f68966 | ||
|
|
09f39cbec6 | ||
|
|
a8785e0793 | ||
|
|
37388ee91e | ||
|
|
de48b41b61 | ||
|
|
7c1fee7868 | ||
|
|
34318edba2 | ||
|
|
90e040455d | ||
|
|
4e90c40e72 | ||
|
|
08020889d3 | ||
|
|
e434b45148 | ||
|
|
221a46e271 | ||
|
|
169ee8498e | ||
|
|
12de5ca7cf | ||
|
|
a711f7e638 | ||
|
|
2c2c5f2156 | ||
|
|
e5e4d49316 | ||
|
|
0a06e07831 | ||
|
|
17276e506e | ||
|
|
d4ddd014a3 | ||
|
|
ee733e6d4c | ||
|
|
60cd6aa04f | ||
|
|
7f7ce56e4e | ||
|
|
e9a2d03497 | ||
|
|
9d6f3f3f60 | ||
|
|
f0b26df170 | ||
|
|
17dcb7212f | ||
|
|
8d9b11a847 | ||
|
|
0fc2b81df8 | ||
|
|
76745fbe5f | ||
|
|
9faa3f13e2 | ||
|
|
3c10ec016c | ||
|
|
c2eeb4e585 | ||
|
|
4058709e0b | ||
|
|
51dd32fb4e | ||
|
|
ae4318dab0 | ||
|
|
3693944492 | ||
|
|
4097379a26 | ||
|
|
b4c43683a5 | ||
|
|
a35ec048d7 | ||
|
|
2be96d00b9 | ||
|
|
e61e830010 | ||
|
|
201d9bf467 | ||
|
|
1748cd1d0f | ||
|
|
d9742c69c0 | ||
|
|
af5c302b48 | ||
|
|
4ee0b41b41 | ||
|
|
cd6f12d53e | ||
|
|
06aca1cc9e | ||
|
|
a4d6d1df37 | ||
|
|
7db63a5b65 | ||
|
|
2c4feca17f | ||
|
|
bbebec6871 | ||
|
|
8eac3b5069 | ||
|
|
bf69261597 | ||
|
|
7e08082ffe | ||
|
|
4ca160f784 | ||
|
|
155d620a14 | ||
|
|
2a2e2be0c4 | ||
|
|
7044489c76 | ||
|
|
1699144136 | ||
|
|
19b9e2be94 | ||
|
|
3f583165c4 | ||
|
|
e1ebaf3821 | ||
|
|
c08f50d9de | ||
|
|
816a165b4b | ||
|
|
150469a646 | ||
|
|
544347c08a | ||
|
|
6636dc3181 | ||
|
|
90661b2def | ||
|
|
123e5e66d3 | ||
|
|
f4f7e04c5b | ||
|
|
75ef81bc42 | ||
|
|
ba8edea860 | ||
|
|
b0f5282de2 | ||
|
|
fe41584102 | ||
|
|
0e9d3c6c28 | ||
|
|
6e82741931 | ||
|
|
f0999a18f0 | ||
|
|
63c8ab94fb | ||
|
|
85b444137b | ||
|
|
425a266a92 | ||
|
|
f4b9601c1b | ||
|
|
827b15fdc0 | ||
|
|
8b6cccc5cc | ||
|
|
ee289d7a2b | ||
|
|
1e6fb08d15 | ||
|
|
66795ecbe1 | ||
|
|
d55655f23a | ||
|
|
e34f96dec2 | ||
|
|
5b89a14514 | ||
|
|
56e6d72282 | ||
|
|
79ea7dd883 | ||
|
|
e47e4edf7f | ||
|
|
c7ccb873f1 | ||
|
|
66149e7aee | ||
|
|
07b9c2b90c | ||
|
|
651216388c | ||
|
|
b7d00efd6d | ||
|
|
d1627cffd0 | ||
|
|
7492cecc27 | ||
|
|
affeda817e | ||
|
|
92325e74b9 | ||
|
|
220ba692e6 | ||
|
|
51b3eec536 | ||
|
|
3a7c0bee6b | ||
|
|
1a6e904583 | ||
|
|
b04a98dc86 | ||
|
|
7960dcf919 | ||
|
|
544d9b0210 | ||
|
|
1cd506612d | ||
|
|
3bc8c72c8b | ||
|
|
c130297a79 | ||
|
|
321590a59d | ||
|
|
e51c95fa7b | ||
|
|
5146fec04c | ||
|
|
ef12311948 | ||
|
|
f597777323 | ||
|
|
d62614cbc4 | ||
|
|
33084397dd | ||
|
|
38552ee7a8 | ||
|
|
b29550e58d | ||
|
|
8816760ea1 | ||
|
|
da13f0b45c | ||
|
|
1bd0ce2832 | ||
|
|
7b36c52efc | ||
|
|
b5bb24c949 | ||
|
|
71e464034d | ||
|
|
21e3c28af2 | ||
|
|
fb62f73a9a | ||
|
|
928a7f535c | ||
|
|
fb2226a9ae | ||
|
|
37f627f2f8 | ||
|
|
07f9ee059f | ||
|
|
908805a2e8 | ||
|
|
20c131cf67 | ||
|
|
5982849325 | ||
|
|
4a938e137a | ||
|
|
d2cd65c967 | ||
|
|
90941714d2 | ||
|
|
cb7fa25d3d | ||
|
|
fedd724086 | ||
|
|
d87b34121f | ||
|
|
b998483369 | ||
|
|
9756d62d93 | ||
|
|
581bc60d0c | ||
|
|
d7ad75adb3 | ||
|
|
9ee2a0d0bc | ||
|
|
ac139dd6a6 | ||
|
|
f7ee9e6996 | ||
|
|
3ea0a8f1d6 | ||
|
|
8c36f8876c | ||
|
|
3dbb2783d3 | ||
|
|
331fc7a6f4 | ||
|
|
c5174aaef3 | ||
|
|
e7a5893245 | ||
|
|
9e2934fd27 | ||
|
|
4eb7aa04f3 | ||
|
|
ff269f8873 | ||
|
|
09a8084943 | ||
|
|
56b24b5909 | ||
|
|
7262358381 | ||
|
|
28fdf444e5 | ||
|
|
d00e6dfacd | ||
|
|
75155dff51 | ||
|
|
9200544269 | ||
|
|
acf2ac244d | ||
|
|
556b3a0028 | ||
|
|
24ccaf1e0f | ||
|
|
2ddb841940 | ||
|
|
ce478115e4 | ||
|
|
40a24b7372 | ||
|
|
90b780b5d7 | ||
|
|
19ed700690 | ||
|
|
2773184d92 | ||
|
|
184e1a6a4e | ||
|
|
8be8ce2086 | ||
|
|
7e0e29d3bb | ||
|
|
8a646adec4 | ||
|
|
984b5366cd | ||
|
|
4a9c8589b2 | ||
|
|
0779835ce4 | ||
|
|
d022eace15 | ||
|
|
2ff25693f3 | ||
|
|
9149e610b3 | ||
|
|
24946bd77a | ||
|
|
35788ff48c | ||
|
|
9956e530d0 | ||
|
|
7ffc01f00c | ||
|
|
e106a87841 | ||
|
|
7cd9f74b51 | ||
|
|
150c50d512 | ||
|
|
a131c7c029 | ||
|
|
8b4ca4a30b | ||
|
|
25f4e58ff4 | ||
|
|
d819a4cf06 | ||
|
|
04fec91362 | ||
|
|
8a0de3bb3f | ||
|
|
650e8a406b | ||
|
|
0f5dfef8b0 | ||
|
|
be77c6119f | ||
|
|
1866609311 | ||
|
|
ca7a21d358 | ||
|
|
71366cd21a | ||
|
|
6c5781ba10 | ||
|
|
c793c43e95 | ||
|
|
31c76660ed | ||
|
|
f26bca74d0 | ||
|
|
9fc5facab2 | ||
|
|
1cc29f626d | ||
|
|
d466ab7be0 | ||
|
|
ef601bbe08 | ||
|
|
aaabe1f865 | ||
|
|
ac0e63aa89 | ||
|
|
6da149adf9 | ||
|
|
3ebac1c886 | ||
|
|
42004f0831 | ||
|
|
47ddfaf44f | ||
|
|
44b52ca67b | ||
|
|
d25385b090 | ||
|
|
258ac42140 | ||
|
|
63a89d386b | ||
|
|
6e8ed7128e | ||
|
|
bf9a8cc23d | ||
|
|
5b1faac336 | ||
|
|
5bf51d3872 | ||
|
|
cbb0f8bde2 | ||
|
|
2c9752291d | ||
|
|
b5b89aeb93 | ||
|
|
022b96f941 | ||
|
|
442f2c5156 | ||
|
|
0468612b4d | ||
|
|
271e972ff0 | ||
|
|
a60e02c950 | ||
|
|
85b19e9110 | ||
|
|
24dd8d6532 | ||
|
|
24342437c7 | ||
|
|
e118acc068 | ||
|
|
7d97ce7baf | ||
|
|
b684805da7 | ||
|
|
7da4e9f28b | ||
|
|
7586495813 | ||
|
|
3b0d14444f | ||
|
|
ec58a99326 | ||
|
|
04d848e6d9 | ||
|
|
27eb13f0fa | ||
|
|
71844ba03a | ||
|
|
67574f483e | ||
|
|
0bd807782a | ||
|
|
1cc0b7fdca | ||
|
|
90594e268a | ||
|
|
0d1e8d66e4 | ||
|
|
92d2bab3ef | ||
|
|
f5deac3d0f | ||
|
|
31925e4517 | ||
|
|
e7a647c343 | ||
|
|
b46df990ad | ||
|
|
dd5328ccbb | ||
|
|
4d29be19c8 | ||
|
|
e364740aea | ||
|
|
86f8b3a163 | ||
|
|
105da33276 | ||
|
|
f754eaadd2 | ||
|
|
0ae0dcd580 | ||
|
|
9c371a24e3 | ||
|
|
462a1997e9 | ||
|
|
810632d666 | ||
|
|
69fbef6e76 | ||
|
|
bd9e7c3c36 | ||
|
|
a0e957bc0d | ||
|
|
f9b6c9b398 | ||
|
|
d7934d4c85 | ||
|
|
de8f833989 | ||
|
|
70e82f3084 | ||
|
|
35d90259ed | ||
|
|
07e97d61c0 | ||
|
|
71348eeb1f | ||
|
|
9e7efa3202 | ||
|
|
df3afdce0d | ||
|
|
66989d6ece | ||
|
|
7c44b68e05 | ||
|
|
ad1daccecc | ||
|
|
4aacee6627 | ||
|
|
629edad237 | ||
|
|
834a69d5a4 | ||
|
|
f45c18daa0 | ||
|
|
0b88ce08cb | ||
|
|
c9f147aba3 | ||
|
|
e7034c6087 | ||
|
|
90bd712c88 | ||
|
|
9c35eb0def | ||
|
|
92c9dd255c | ||
|
|
2a42af1d62 | ||
|
|
16e4168993 | ||
|
|
d0dbb40ef6 | ||
|
|
91d392cd2b | ||
|
|
b9bfc9bc4f | ||
|
|
2dc0f6b2bf | ||
|
|
44e73dfc96 | ||
|
|
9239d742d6 | ||
|
|
43932bd17b | ||
|
|
805c26d1a6 | ||
|
|
d746d90cc3 | ||
|
|
429a5518ea | ||
|
|
bf9da287a0 | ||
|
|
423cbfd743 | ||
|
|
5577aec4e8 | ||
|
|
18f8be0058 | ||
|
|
f8163dc2e7 | ||
|
|
f0f63a82fb | ||
|
|
a547fd1e0e | ||
|
|
6306a11ad6 | ||
|
|
9541f2a1d3 | ||
|
|
d56bd79daf | ||
|
|
e49f123cc0 | ||
|
|
4c780be883 | ||
|
|
220e7fb132 | ||
|
|
756f220a26 | ||
|
|
cf7c9936ad | ||
|
|
9babaf3b38 | ||
|
|
340d6e50c2 | ||
|
|
dabc3cb0df | ||
|
|
e10debd14b | ||
|
|
f1d33d30ce | ||
|
|
8c81d23a7e | ||
|
|
8d458043d1 | ||
|
|
5286ccbaf9 | ||
|
|
ba96f7afac | ||
|
|
a2efc36799 | ||
|
|
e5935973f9 | ||
|
|
13415991e8 | ||
|
|
b7ea9d45bb | ||
|
|
0286ba436e | ||
|
|
c86f714a15 | ||
|
|
9b45ff54ac | ||
|
|
2b78429248 | ||
|
|
c87a411624 | ||
|
|
141c1274c4 | ||
|
|
11b0011b1f | ||
|
|
b4dc9e0944 | ||
|
|
81b1eea10f | ||
|
|
7dc14e81d7 | ||
|
|
4dbcc3cd9e | ||
|
|
1f2a072e33 | ||
|
|
0bf4e146a0 | ||
|
|
bbd96ea838 | ||
|
|
5027a18c2c | ||
|
|
99bf73fe66 | ||
|
|
d7c31c1123 | ||
|
|
6d690a39dc | ||
|
|
ed02216378 | ||
|
|
55d5455abd | ||
|
|
5d8f6250de | ||
|
|
7a6f0d9868 | ||
|
|
145a0450ea | ||
|
|
da721be17a | ||
|
|
234a34d273 | ||
|
|
84ff479b24 | ||
|
|
3206ab4fe0 | ||
|
|
f5d7a8b4fd | ||
|
|
d069ac02d1 | ||
|
|
d63d11be58 | ||
|
|
1a471392c5 | ||
|
|
f6a6b5aa86 | ||
|
|
95b0b5249a | ||
|
|
29d9025381 | ||
|
|
6925bbd360 | ||
|
|
18bd029981 | ||
|
|
7975ed86a7 | ||
|
|
a1a55c79c8 | ||
|
|
2ece167f56 | ||
|
|
0e5faca531 | ||
|
|
939fdbd64d | ||
|
|
293849eb69 | ||
|
|
1013e14a87 | ||
|
|
63aa0f7f16 | ||
|
|
cf037ba969 | ||
|
|
45dfda97d8 | ||
|
|
c9b1dba4a3 | ||
|
|
a417ddca91 | ||
|
|
461b2a9dfe | ||
|
|
962c3c9c21 | ||
|
|
05597197f3 | ||
|
|
f4e75e1256 | ||
|
|
d8346ffb84 | ||
|
|
90d6895e94 | ||
|
|
f1171c3c0e | ||
|
|
723845c0cc | ||
|
|
1d7110d657 | ||
|
|
edebbe6039 | ||
|
|
065bb1e1a0 | ||
|
|
231d3d6979 | ||
|
|
acb6234263 | ||
|
|
8f6c069543 | ||
|
|
fcf32bf3d1 | ||
|
|
aa44841315 | ||
|
|
a299b039c4 | ||
|
|
3088555a15 | ||
|
|
8d7ac1b004 | ||
|
|
82bd1b34f2 | ||
|
|
d19e9916cb | ||
|
|
ed0cb890fb | ||
|
|
fa8f7bf0dc | ||
|
|
6a2273d781 | ||
|
|
627de19ce0 | ||
|
|
7539a829c4 | ||
|
|
a966d991e6 | ||
|
|
635fae3ed0 | ||
|
|
2a4ef924c8 | ||
|
|
a4d2162091 | ||
|
|
6967eec4cb | ||
|
|
7ecc435f5a | ||
|
|
1e328fbd72 |
14
.cvsignore
Normal file
14
.cvsignore
Normal file
@@ -0,0 +1,14 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
confdefs.h
|
||||
config.cache
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
nano
|
||||
nano.info
|
||||
stamp-h
|
||||
stamp-h1
|
||||
@@ -224,3 +224,4 @@ distribution.
|
||||
If December 1997 seems to be old, you may fetch a more recent copy
|
||||
of this `ABOUT-NLS' file on most GNU archive sites.
|
||||
|
||||
$Id$
|
||||
|
||||
11
AUTHORS
11
AUTHORS
@@ -1,3 +1,4 @@
|
||||
$Id$
|
||||
This file lists people who have made significant contribution to the nano
|
||||
editor. Please see the ChangeLog for specific changes by author.
|
||||
-------------------------------------------------------------------------
|
||||
@@ -18,3 +19,13 @@ Robert Siemborski <rjs3@andrew.cmu.edu>
|
||||
* Miscellaneous cut, display, replace, and other bug fixes,
|
||||
original and new "magic line" code, read_line() function, new
|
||||
edit display routines.
|
||||
|
||||
Rocco Corsi <rocco.corsi@sympatico.ca>
|
||||
* Internal spelling code, many optimizations and bug fixes for
|
||||
findnextstr and search-related functions, various display and
|
||||
file handling fixes.
|
||||
|
||||
David Lawrence Ramsey <pooka_regent@sluggy.net>
|
||||
* Multiple buffer support, operating dir (-o) option, bug fixes
|
||||
for display routines, wrapping code, spelling fixes, const
|
||||
mode and various other fixes.
|
||||
|
||||
127
BUGS
127
BUGS
@@ -1,40 +1,133 @@
|
||||
- Marked cutting sometimes leaves a newline in the file unintelligently,
|
||||
such as when all of a line is selected but the mark doesn't proceed to
|
||||
the new line. (8) { Is this an issue? compare to pico 3.5 }
|
||||
the new line. (8) [FIXED/IRRELEVANT]
|
||||
- Certains are not lined up properly when there are tabs in them at
|
||||
certain col values. (9) [FIXED]
|
||||
- edit_refresh() and update_line() do not handle selecting text when the
|
||||
cursor is beyond COLS (10) [FIXED]
|
||||
- no way to do a replace with the empty string. (11)
|
||||
- Spelling support is not elegant like pico's integration of the 'spell'
|
||||
program. Nano only uses ispell (for now) (12)
|
||||
- no way to do a replace with the empty string (11) [FIXED, yay!]
|
||||
- Spelling support is not elegant like Pico's integration of the 'spell'
|
||||
program. Nano only uses ispell (for now) (12) [FIXED]
|
||||
- Moving to the end of a line when close to a multiple of COLS and at
|
||||
least COLS * 2 does not make the screen jump early like it would for
|
||||
if we were around COLS (bugs in edit_refresh, update_line) (13)
|
||||
[FIXED, mostly]
|
||||
- When at the very bottom of the edit window, do_wrap goes berzerk and
|
||||
puts the curor somewhere bad, subsequent keystrokes crash the program
|
||||
- When at the very bottom of the edit window, do_wrap goes berserk and
|
||||
puts the cursor somewhere bad; subsequent keystrokes crash the program
|
||||
(14) [FIXED, mostly]
|
||||
- Doing a replacement of a substring of the replace string (e.g. replacing
|
||||
"ed" with "fred" causes an infinite loop. (15) [FIXED]
|
||||
"ed" with "fred" causes an infinite loop). (15) [FIXED]
|
||||
- Cutting a file with marked text and both marker ends on the same line
|
||||
causes a random segfault (16)
|
||||
- Cutting more than one line resets the KEEP_CUTBUFFER flag in 0.9.3
|
||||
causes a random segfault (16) [FIXED]
|
||||
- Cutting more than one line resets the KEEP_CUTBUFFER flag in 0.9.3.
|
||||
Error is in bitwise assignment (nano.h). (17) [FIXED]
|
||||
- The wrapping code does not work right for lines like the following:
|
||||
* *
|
||||
Error is in do_wrap, must be rewritten (18).
|
||||
- Wrapping a line with autoindent mode sometimes causes a segfault (19).
|
||||
Error is in do_wrap, must be rewritten. (18) [FIXED]
|
||||
- Nano fails to follow symlinks, even though -l isn't being used (20).
|
||||
[Bug in global flag init, FIXED]
|
||||
- When using --help or --version, the SIGINT character gets lost. (21) [FIXED]
|
||||
- When inserting files, the display sometimes fails to display properly
|
||||
until a pageup/down occurs (22).
|
||||
- edit_refresh() and update_line() (and related functions), have
|
||||
trouble when a tab is the character that is the boundry at COLS (23) [FIXED]
|
||||
- there is an off-by-one error in keeping track of totsize. It is caused
|
||||
- edit_refresh() and update_line() (and related functions) have
|
||||
trouble when a tab is the character that is the boundary at COLS (23)
|
||||
[FIXED]
|
||||
- There is an off-by-one error in keeping track of totsize. It is caused
|
||||
by the fact that we count the newline at the end when we read in a file
|
||||
but we do not, in fact, display this newline. This should go away
|
||||
implicitly when the "Magic Line" returns, but it is noted here for
|
||||
documentation's sake. (24) [FIXED]
|
||||
- totsize becomes incorrect after word-wrapping (25)
|
||||
- In replace with completely adjacent strings, every other search string
|
||||
will be missed (try replace ':' in a string like ':::::::::') (28) [FIXED]
|
||||
- If nano opens a read-only file with the --tempfile option, and a change
|
||||
is made to the buffer, and a write is attempted, nano will not give you
|
||||
a dialog about not being able to write the file, and it will not let the
|
||||
user exit (29, discovered by Joshua Jensen) [FIXED]
|
||||
- Using nano -k, marked text is not cut properly. (31) [FIXED]
|
||||
- Invoking -t or -k has the effect of invoking both options. (32) [FIXED]
|
||||
- totsize becomes incorrect after word-wrapping (25) [FIXED]
|
||||
- Wrapping a line with autoindent mode sometimes causes a segfault (19)
|
||||
[FIXED]
|
||||
- When inserting files, the display sometimes fails to display properly
|
||||
until a pageup/down occurs (22) [FIXED]
|
||||
- In search/replace code, there is too much refreshing in bottomwin (26)
|
||||
[FIXED]
|
||||
- In replace, there is no way to accept the default replace string. (27)
|
||||
[FIXED]
|
||||
- Using nano -t, user can not exit until a filename is given via ^O. (30)
|
||||
[FIXED]
|
||||
- totsize problems still abound in do_justify (33) [FIXED]
|
||||
- Using -k, cut text is not pasted properly. (34) [FIXED].
|
||||
- Using -k, pasted text is not updated properly if it goes beyond editbot. (35)
|
||||
[FIXED]
|
||||
- Doing a cut with -k can screw up the filestruct; fault is in cutting
|
||||
code. (36) [FIXED]
|
||||
- Hitting enter on the magic line makes new lines, but they are not
|
||||
written out to disk when saved..... (37). [FIXED]
|
||||
- Page up and page down do not work the same way as in Pico (# of lines). (38)
|
||||
[FIXED]
|
||||
- When doing a search and the marker is set, the screen does not always
|
||||
properly update the inverted text (39). [FIXED]
|
||||
- Searches for a string that only exists on one line multiple times will
|
||||
fail after finding the last occurrence (discovered by Ken Tyler) (40).
|
||||
[FIXED]
|
||||
- Alt-Z is currently broken to toggle suspend. I guess I still don't know
|
||||
signals very well =-) (41) [FIXED].
|
||||
- Unable to cut the entire file using the marker (discovered by Kev Tyler)
|
||||
(42). [FIXED]
|
||||
- The keypad does not work when nano runs in the Gnome terminal (43). [FIXED]
|
||||
- When reading in a file, if the file is a directory, the contents of the
|
||||
file being edited are blown away (discovered by Chris Pimlot) (44). [FIXED]
|
||||
- in certain terms, nano will leave a "ghost" of screen upon exit
|
||||
when called from inside mutt (among other settings) (45). [FIXED]
|
||||
- In replace, hitting the Goto line shortcut key does nothing after a
|
||||
search string is entered (discovered by Rocco Corsi) (46) [FIXED].
|
||||
- When typing in a string in search or replace and hitting CASE_SENSITIVE
|
||||
or the other search string, the current string edit is blown away in
|
||||
favor of the last stored search (47) [FIXED]
|
||||
- If nano fails to open a file when it starts up, doing almost anything
|
||||
causes a segfault (discovered by Ben Roberts) (48). [FIXED]
|
||||
- In certain terminals, nano would not work properly with keypad().
|
||||
Turned out to be the silly timeout(0) call, which is completely
|
||||
unneeded, anyway. (49) [FIXED]
|
||||
- With less than a page of text, doing a page down will move the
|
||||
current line to the top of the screen, which it shouldn't do. (50)
|
||||
[FIXED]
|
||||
- with PDCURSES, running meta-X turns off the keypad. (51) [FIXED]
|
||||
- Resizing the window completely screws up the display if in any other
|
||||
mode than normal editing (help screen, search and replace, file
|
||||
browser..) (52) [FIXED]
|
||||
- Alt speller argument (-s, --speller) does not take a string argument of
|
||||
more than one word. (53) [FIXED].
|
||||
- Cut to end cutting (-k) causes segfaults (try cutting "- Backup making
|
||||
(filename~)?" line in TODO file) (discovered by
|
||||
higuita@cadernoverde.com) (54) [FIXED].
|
||||
- When using autoindent (-i), wrapped text does not get autoindented
|
||||
(55, discovered by Mark Senior) [FIXED].
|
||||
- When using -R (regex) and -p (pico mode), subsequent searches after
|
||||
the first fail if no string is entered (56) [FIXED].
|
||||
- Page down on a file of editwinrows fails (again). Reported by Ryan
|
||||
Krebs (57) [FIXED].
|
||||
- File browser aborts on Solaris in qsort() call. (Reported by
|
||||
Matthias Andree) (58) [FIXED].
|
||||
- Can modify the current file in view mode with ^W^R (discovered by Rocco
|
||||
Corsi) (58) [FIXED].
|
||||
- When page up is used after two page down's, the screen doesn't update
|
||||
properly (discovered by David Lawrence Ramsey) (59) [FIXED].
|
||||
- On BSD systems, marked cutting sna paste often screws up the
|
||||
last line in the cutbuffer (discovered by Barry Pederson) (60) [FIXED]
|
||||
- Blank lines are not kept when cutting with -k (discovered by Rocco)
|
||||
(61) [FIXED].
|
||||
- Nano will not suspend properly inside of mutt (62) [FIXED].
|
||||
- When switching from Pico mode to normal mode, the previous search is
|
||||
not displayed until cancelling the search (63) [FIXED].
|
||||
- If you change search options but don't change the search string in
|
||||
normal mode, hitting enter causes the search/replace to abort (64)
|
||||
(Jordi Mallach) [FIXED].
|
||||
- Cutting one line of text causes the screen to recenter the line
|
||||
(reported and fixed by David Lawrence Ramsey) (65) [FIXED].
|
||||
- When cutting marked text including the bottom of the file, a new
|
||||
"magic line" is not created" (reported by David Lawrence
|
||||
Ramsey, fixed by David Lawrence Ramsey & Chris) (66) [FIXED].
|
||||
|
||||
** Open BUGS **
|
||||
|
||||
$Id$
|
||||
|
||||
2
INSTALL
2
INSTALL
@@ -180,3 +180,5 @@ operates.
|
||||
script, and exit.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
||||
|
||||
$Id$
|
||||
|
||||
26
Makefile.am
26
Makefile.am
@@ -1,22 +1,38 @@
|
||||
## $Id$
|
||||
AUTOMAKE_OPTIONS = gnu no-dependencies
|
||||
M4DIR = $(srcdir)/m4
|
||||
ACLOCAL_AMFLAGS = -I $(M4DIR)
|
||||
ACINCLUDE_INPUTS = $(M4DIR)/gettext.m4 $(M4DIR)/largefile.m4 \
|
||||
$(M4DIR)/lcmessage.m4 $(M4DIR)/progtest.m4
|
||||
|
||||
bin_PROGRAMS = nano
|
||||
nano_SOURCES = cut.c \
|
||||
nano_SOURCES = color.c \
|
||||
cut.c \
|
||||
files.c \
|
||||
global.c \
|
||||
move.c \
|
||||
nano.c \
|
||||
nano.h \
|
||||
proto.h \
|
||||
rcfile.c \
|
||||
search.c \
|
||||
utils.c \
|
||||
winio.c
|
||||
|
||||
man_MANS = nano.1
|
||||
nano_LDADD = @INTLLIBS@
|
||||
nano_LDADD = @GLIB_LIBS@ @INTLLIBS@
|
||||
|
||||
EXTRA_DIST = AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README \
|
||||
TODO install-sh missing mkinstalldirs nano.1 nano.1.html
|
||||
info_TEXINFOS = nano.texi
|
||||
MAKEINFO = makeinfo --no-split
|
||||
|
||||
EXTRA_DIST = ABOUT-NLS AUTHORS BUGS COPYING ChangeLog INSTALL NEWS \
|
||||
README THANKS TODO install-sh missing mkinstalldirs \
|
||||
nano.1 nano.1.html faq.html nanorc.sample $(ACINCLUDE_INPUTS)
|
||||
|
||||
SUBDIRS = po intl
|
||||
|
||||
localedir = $(datadir)/locale
|
||||
localedir = @LOCALE_DIR@
|
||||
INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\" -I@includedir@
|
||||
|
||||
$(srcdir)/acinclude.m4: $(ACINCLUDE_INPUTS)
|
||||
cat $(ACINCLUDE_INPUTS) > $@
|
||||
|
||||
506
Makefile.in
506
Makefile.in
@@ -1,506 +0,0 @@
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = .
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CURSES_LIB = @CURSES_LIB@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
GENCAT = @GENCAT@
|
||||
GLIB_CFLAGS = @GLIB_CFLAGS@
|
||||
GLIB_CONFIG = @GLIB_CONFIG@
|
||||
GLIB_LIBS = @GLIB_LIBS@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GT_NO = @GT_NO@
|
||||
GT_YES = @GT_YES@
|
||||
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
PACKAGE = @PACKAGE@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
l = @l@
|
||||
|
||||
bin_PROGRAMS = nano
|
||||
nano_SOURCES = cut.c files.c global.c move.c nano.c nano.h proto.h search.c utils.c winio.c
|
||||
|
||||
|
||||
man_MANS = nano.1
|
||||
nano_LDADD = @INTLLIBS@
|
||||
|
||||
EXTRA_DIST = AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README TODO install-sh missing mkinstalldirs nano.1 nano.1.html
|
||||
|
||||
|
||||
SUBDIRS = po intl
|
||||
|
||||
localedir = $(datadir)/locale
|
||||
INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\" -I@includedir@
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I.
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
nano_OBJECTS = cut.o files.o global.o move.o nano.o search.o utils.o \
|
||||
winio.o
|
||||
nano_DEPENDENCIES =
|
||||
nano_LDFLAGS =
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
man1dir = $(mandir)/man1
|
||||
MANS = $(man_MANS)
|
||||
|
||||
NROFF = nroff
|
||||
DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \
|
||||
INSTALL Makefile.am Makefile.in NEWS TODO acconfig.h aclocal.m4 \
|
||||
config.h.in configure configure.in install-sh missing mkinstalldirs
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
SOURCES = $(nano_SOURCES)
|
||||
OBJECTS = $(nano_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
$(ACLOCAL_M4): configure.in
|
||||
cd $(srcdir) && $(ACLOCAL)
|
||||
|
||||
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
config.h: stamp-h
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h; \
|
||||
$(MAKE) stamp-h; \
|
||||
else :; fi
|
||||
stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES= CONFIG_HEADERS=config.h:config.h.in \
|
||||
$(SHELL) ./config.status
|
||||
@echo timestamp > stamp-h 2> /dev/null
|
||||
$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
|
||||
@if test ! -f $@; then \
|
||||
rm -f $(srcdir)/stamp-h.in; \
|
||||
$(MAKE) $(srcdir)/stamp-h.in; \
|
||||
else :; fi
|
||||
$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
@echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
|
||||
|
||||
mostlyclean-hdr:
|
||||
|
||||
clean-hdr:
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h
|
||||
|
||||
maintainer-clean-hdr:
|
||||
|
||||
mostlyclean-binPROGRAMS:
|
||||
|
||||
clean-binPROGRAMS:
|
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
|
||||
distclean-binPROGRAMS:
|
||||
|
||||
maintainer-clean-binPROGRAMS:
|
||||
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
|
||||
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
done
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
nano: $(nano_OBJECTS) $(nano_DEPENDENCIES)
|
||||
@rm -f nano
|
||||
$(LINK) $(nano_LDFLAGS) $(nano_OBJECTS) $(nano_LDADD) $(LIBS)
|
||||
|
||||
install-man1:
|
||||
$(mkinstalldirs) $(DESTDIR)$(man1dir)
|
||||
@list='$(man1_MANS)'; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
|
||||
done
|
||||
|
||||
uninstall-man1:
|
||||
@list='$(man1_MANS)'; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
|
||||
rm -f $(DESTDIR)$(man1dir)/$$inst; \
|
||||
done
|
||||
install-man: $(MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-man1
|
||||
uninstall-man:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) uninstall-man1
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
all-recursive install-data-recursive install-exec-recursive \
|
||||
installdirs-recursive install-recursive uninstall-recursive \
|
||||
check-recursive installcheck-recursive info-recursive dvi-recursive:
|
||||
@set fnord $(MAKEFLAGS); amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $(MAKEFLAGS); amf=$$2; \
|
||||
dot_seen=no; \
|
||||
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
rev="$$subdir $$rev"; \
|
||||
test "$$subdir" = "." && dot_seen=yes; \
|
||||
done; \
|
||||
test "$$dot_seen" = "no" && rev=". $$rev"; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
-rm -rf $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
||||
cd $(distdir)/=build \
|
||||
&& ../configure --with-included-gettext --srcdir=.. --prefix=$$dc_install_base \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist
|
||||
-rm -rf $(distdir)
|
||||
@banner="$(distdir).tar.gz is ready for distribution"; \
|
||||
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"
|
||||
dist: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
dist-all: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
distdir: $(DISTFILES)
|
||||
-rm -rf $(distdir)
|
||||
mkdir $(distdir)
|
||||
-chmod 777 $(distdir)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
for subdir in $(SUBDIRS); do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d $(distdir)/$$subdir \
|
||||
|| mkdir $(distdir)/$$subdir \
|
||||
|| exit 1; \
|
||||
chmod 777 $(distdir)/$$subdir; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-recursive
|
||||
dvi-am:
|
||||
dvi: dvi-recursive
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
installcheck-am:
|
||||
installcheck: installcheck-recursive
|
||||
all-recursive-am: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
install-exec: install-exec-recursive
|
||||
|
||||
install-data-am: install-man
|
||||
install-data: install-data-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-recursive
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-man
|
||||
uninstall: uninstall-recursive
|
||||
all-am: Makefile $(PROGRAMS) $(MANS) config.h
|
||||
all-redirect: all-recursive-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \
|
||||
mostlyclean-compile mostlyclean-tags \
|
||||
mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
clean-am: clean-hdr clean-binPROGRAMS clean-compile clean-tags \
|
||||
clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-recursive
|
||||
|
||||
distclean-am: distclean-hdr distclean-binPROGRAMS distclean-compile \
|
||||
distclean-tags distclean-generic clean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f config.status
|
||||
|
||||
maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f config.status
|
||||
|
||||
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
|
||||
mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
|
||||
maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile install-man1 uninstall-man1 install-man \
|
||||
uninstall-man install-data-recursive uninstall-data-recursive \
|
||||
install-exec-recursive uninstall-exec-recursive installdirs-recursive \
|
||||
uninstalldirs-recursive all-recursive check-recursive \
|
||||
installcheck-recursive info-recursive dvi-recursive \
|
||||
mostlyclean-recursive distclean-recursive clean-recursive \
|
||||
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \
|
||||
install-exec-am install-exec install-data-am install-data install-am \
|
||||
install uninstall-am uninstall all-redirect all-am all installdirs-am \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
305
NEWS
305
NEWS
@@ -1,12 +1,273 @@
|
||||
01/05/2002 - GNU nano 1.1.5 is out. The main new feature in this
|
||||
release if the changed behavior of the keypad. Nano now
|
||||
does the Right Thing and used keypad() by default. If
|
||||
you wish to use the keypad arrow keys in certain
|
||||
terminals, you may use the -K or --keypad flag to
|
||||
use the old behavior. Users of other OSes should see
|
||||
better handling of their non-keypad keys in this
|
||||
release. Other changes include more Hurd fixes, fixes
|
||||
parsing the .nanorc, display fixes for the color syntax
|
||||
highlighting, gettext stabilization and many translation
|
||||
updates. This is amost like a stable release, much like
|
||||
in the 0.9.x series when every other release was the
|
||||
mosts stable one :) Have fun!
|
||||
|
||||
12/11/2001 - GNU nano 1.1.4 is released. This release contains
|
||||
rudimentary color syntax support (but it's still
|
||||
broken), compatibility fixes for the Hurd and FreeBSD,
|
||||
spell checker and wrapping fixes, and more. It seems
|
||||
that the amount of interest in the code is inversely
|
||||
proportional to the amount of time since last release,
|
||||
so it's time to show the world all the changes since
|
||||
1.1.3 ;) Have fun with it!
|
||||
|
||||
10/26/2001 - GNU nano 1.1.3 is released. As far as new features go,
|
||||
the help system is now available for all functions in the
|
||||
editor. Also, nano will also now print a message on
|
||||
the status bar when it automatically converts a file from
|
||||
Mac or DOS format, and trying to load a file that
|
||||
has already been loaded in multibuffer mode will now also
|
||||
cause an error message. There is now a "goto previous
|
||||
word" which you can use by hitting Meta-Space Bar.
|
||||
As for fixes, a SEVERE bug in the
|
||||
null_at code which discarded the memory address of
|
||||
reallocated memory has been fixed. This is probably
|
||||
the biggest bug fix in well over the last year of
|
||||
development. There are also some display fixes for when
|
||||
the screen shouldn't center itself on cut or uncut text.
|
||||
Also, the comments in the header files incorectly said
|
||||
that nano was distributed under version 1 of the GPL when
|
||||
the accompanying license was the GPLv2.
|
||||
If you're using nano-1.1, it is highly
|
||||
recommeneded you upgrade to this release. If using 1.0,
|
||||
wait for version 1.0.6 which should be available early
|
||||
next week. Enjoy!
|
||||
|
||||
10/03/2001 - GNU nano 1.1.2 is out there. Many new features in this
|
||||
release, including support for auto-converting from
|
||||
DOS and Mac formatted files, as well as toggles for
|
||||
writing out files in these formats. Pico's -o flag has
|
||||
been implemented, as has some new smooth scrolling code
|
||||
(which can be used in place of the default jerky scrolling
|
||||
behavior). Also, there is now a "find matching
|
||||
bracket/brace/etc" feature (Meta-]). The .nanorc file
|
||||
now accepts setting the tabsize, and the help text at the
|
||||
bottom of the editor is now better spaced out in the
|
||||
search/replace prompts. There are also the usual helping
|
||||
of bugfixes, translation updates and, surely a bug or two.
|
||||
You better get ready!
|
||||
|
||||
07/28/2001 - GNU nano 1.1.1 is released. Our second 1.1 unstable release
|
||||
features many bugfixes from the initial release, in
|
||||
particular fixs for the multibuffer code, and various
|
||||
compiler macro fixes. The shortcut lists for
|
||||
the search and replace prompts are a little more logical
|
||||
(with cancel the last option again), and the included
|
||||
gettext was re-downgraded to 0.10.35 due to problems
|
||||
on the PPC platform. GNU nano now includes its own
|
||||
aclocal macros in the m4/ directory to allow rebuilding
|
||||
the configure script to work on platforms regardless of
|
||||
their gettext version.
|
||||
|
||||
07/15/2001 - GNU nano 1.1.0 is released. This is the first release
|
||||
in the 1.1.x unstable series of GNU nano. It
|
||||
incorporates all changes up to the 1.0.3 release,
|
||||
and also includes many many new features, including
|
||||
appending to as well as overwriting files, writing
|
||||
marked text to a separate file, dynamic wrap length,
|
||||
lots more compatibility with Pico, and new optional
|
||||
features like .nanorc file support and multiple file
|
||||
buffers! All in all, plenty of new stuff that's sure
|
||||
to introduce lots of bugs ;-) Have fun with it, but
|
||||
be careful, unstable means unstable.
|
||||
|
||||
04/06/2001 - GNU nano 1.0.1 is out there. The only new feature is a
|
||||
configure option for those who want to disable all
|
||||
word wrapping from nano, --disable-wrapping. Bug fixes
|
||||
this release include some bugs with autoconf and i18n,
|
||||
and several fixes in the file browser including a
|
||||
segfault on Solaris, symlinks to directories now work
|
||||
properly, and nano now sorts files case insensitively
|
||||
like pilot. Have fun with it.
|
||||
|
||||
03/22/2001 - GNU Nano 1.0 is released! The autoindent wrapping bug
|
||||
has been fixed, as well as strange bug when using Pico
|
||||
mode and regex search. There have also been some minor
|
||||
spelling and documentation updates. As stated on the
|
||||
website, there are currently no known bugs with nano, but
|
||||
some will pop up eventually and they will be addressed in
|
||||
subsequent releases. We hope you enjoy this first stable
|
||||
release of nano, and as always, feedback is welcome!
|
||||
nano@nano-editor.org.
|
||||
|
||||
02/19/2001 - Nano 0.9.99pre3 brings a lot of changes! The most important
|
||||
being that nano is now officially a GNU program. Some
|
||||
changes have been made for GNU compatibility (like the
|
||||
default list of shortcuts, "^G Get Help" is now Listed and
|
||||
"^_ Goto Line" is not). The Yes/No/All keys have
|
||||
finally been internationalized also. All in all, quite
|
||||
a few changes, considering nano is supposed to be in a code
|
||||
freeze. But there are the usual helping of bugfixes, a
|
||||
nasty bug when cutting text in -k mode and some
|
||||
compatibility issues with older ncurses libraries have also
|
||||
been fixed. All in all, a lot to see.
|
||||
|
||||
01/31/2001 - Nano 0.9.99pre2 is released. Not surprisingly, all that is
|
||||
new is bugfixes, bugfixes, bugfixes. There were a few
|
||||
cleanups in unneeded global variables and duplicate
|
||||
functions, but most is just fixing. Specifically, there
|
||||
is now a preliminary (read: needs testing) fix for
|
||||
resizing the editor in any mode other than normal edit
|
||||
mode. Other fixes include some more tab completion
|
||||
segfaults, and an silly segfault that occurred when
|
||||
successfully writing a file on the 2nd try (i.e. after an
|
||||
initial write error). Slowly but surely, on toward 1.0 we
|
||||
travel.
|
||||
|
||||
01/17/2001 - Nano 0.9.99pre1 is released. This is the first pre-1.0
|
||||
release of nano, and is also the first release since the
|
||||
code freeze for nano 1.0. Don't expect (or request) any
|
||||
new features between now and nano 1.0, only bugfixes,
|
||||
optimizations and doc/translation updates. For fixes, a
|
||||
nasty segfault when trying to insert one's home directory
|
||||
(~), some checks for the NumLock key making the keypad
|
||||
go awry, window size sanity checks, many autoconf fixes,
|
||||
and support for the KDE konsole keypad layout. Have fun.
|
||||
|
||||
01/07/2001 - Nano 0.9.25 is the "Just one more feature I swear!" release.
|
||||
It includes one new feature that Pico has had forever, a
|
||||
built-in file browser. Since not everyone may want this
|
||||
option, there is a --disable-browser option to the
|
||||
configure script as well. Other changes include slightly
|
||||
different keypad handling, and a bugfix for crashes when
|
||||
tab completion in certain instances. Have fun and Happy
|
||||
New Year!
|
||||
|
||||
12/18/2000 - Nano 0.9.24 is released. This version contains the last of
|
||||
the security fixes for writing files, as well as for a
|
||||
nasty segfault when nano is unable to open a file for
|
||||
reading, among other fixes. Nano also now cowardly
|
||||
refuses to open device files, to stop silly things like
|
||||
trying to open /dev/zero. New features include being
|
||||
Able to use Meta-Meta-<key> as Control-<key>, better
|
||||
HURD support, and some new flags have been added for Pico
|
||||
compatibility. Upgrading to this version is highly
|
||||
recommended.
|
||||
|
||||
12/08/2000 - Nano 0.9.23 is the "race conditions bite" release. The
|
||||
main reason for this release is the less-than-optimal
|
||||
fix for the security issue in nano with following symbolic
|
||||
links. Hopefully this will fix the problem permanently.
|
||||
The --nofollow option also works again for those who
|
||||
are real security nuts. There are also some display and
|
||||
search fixes, and the --disable-spell function was renamed
|
||||
to --disable-speller to be in line with nano and pico's
|
||||
"speller" term.
|
||||
|
||||
12/02/2000 - Nano 0.9.22 is released, with many more changes and
|
||||
additions than imaginable. The most important change is
|
||||
a fix for unsafe handling of symbolic links which could
|
||||
lead to symlink attacks if nano were to exit because
|
||||
of an error or signal. Also there are better checks when
|
||||
saving files.
|
||||
As for new features, username tab completion is
|
||||
now working well, the internal spell checker code has been
|
||||
tweaked, you can now unjustify if you don't like how the
|
||||
justify formatted your text, and there are more
|
||||
options for configure, including --disable-spell and
|
||||
--disable-justify and --enable-extra (for those who like
|
||||
surprises). All in all, a whole lot of changes in
|
||||
a little over a week.
|
||||
|
||||
11/23/2000 - Happy Thanksgiving! Nano 0.9.21 is our "last version was
|
||||
a big turkey" release. It fixes several bugs introduced
|
||||
by the previous version, as well as a few long-
|
||||
standing display bugs. All 0.9.20 users are strongly
|
||||
encouraged to upgrade to this release.
|
||||
|
||||
11/18/2000 - Nano 0.9.20 is finally out the door. Probably the biggest
|
||||
change is the brand new way nano displays previous search
|
||||
and replace strings (they are now editable!) This is a
|
||||
break from Pico's (inconsistent) interface, so if you
|
||||
don't like the new way, "Pico" mode (-p on the command
|
||||
line or Meta-P within nano) still works the "old"
|
||||
way.
|
||||
Other new features include being able to deal with
|
||||
search strings of any length, a new internal spell feature
|
||||
(courtesy of Mr. Rocco Corsi) and tab completion when
|
||||
reading in or writing out files! There's also the usual
|
||||
billion or so bug fixes. Feedback on this release is
|
||||
welcome because so much has changed, especially with the
|
||||
previous string display in search and replace. Email ->
|
||||
nano@nano-editor.org <-. If you like something, don't like
|
||||
something, or just want to order a pizza, let us know!
|
||||
|
||||
10/02/2000 - Nano 0.9.19 is the "Chris is getting married in less than
|
||||
a week and needs a distraction" release. There are only
|
||||
a few actual code changes, mainly portability and compiler
|
||||
warning fixes. Nano now also supports PDCurses, which
|
||||
enables easily-built nano executables for Windows NT
|
||||
and 95/98 for the brave. The official nano site has
|
||||
changed (again) as well, check out www.nano-editor.org for
|
||||
all the latest nano schtuff.
|
||||
|
||||
09/18/2000 - Nano 0.9.18 is unleashed. It has some new keyboard
|
||||
handling code, cygwin support out of the box, and
|
||||
a more portable handler for the NOHELP toggle. There
|
||||
is also a fix for a somewhat serious bug whereby trying
|
||||
to insert a directory instead of a normal file would
|
||||
destroy the contents of the editor. A must-see. Four
|
||||
stars.
|
||||
|
||||
09/04/2000 - Nano 0.9.17, the Labor Day release, is released after a
|
||||
quiet spell (almost an entire month since last release!)
|
||||
New features include better (not yet perfect) binary
|
||||
display support and toggle support for most of the program
|
||||
flags (M-c, M-i, M-z, M-x, M-p, M-w, M-m, M-k and M-e for
|
||||
-c, -i, -x, -p, -w, -k, and -R).
|
||||
|
||||
08/09/2000 - Nano 0.9.16, after some struggling, is released. This release
|
||||
should fix a few of the holes that 0.9.15 dug. The
|
||||
"cutting text on the first line" bug is fixed, as is the
|
||||
"cutting text on the last line" bug. Nice symmetry there
|
||||
huh? Also the --tabsize argument should now work as well
|
||||
as by using -T.
|
||||
|
||||
08/03/2000 - Nano 0.9.15 is the "I can't think of a release description"
|
||||
release. There are the usual gala of display bugfixes,
|
||||
a fix for the the nasty bug in -k mode that could create a
|
||||
loop in the file being edited, and some other code
|
||||
cleanup. Also, the -T option should now work regardless
|
||||
of the curses library used. Yay.
|
||||
|
||||
07/27/2000 - Nano 0.9.14 is officially the "13 is so unlucky it should
|
||||
be skipped as a version number" release. One typo
|
||||
caused unending problems (calling nano with either -t or
|
||||
-k caused both flags to be used). The -k code is also now
|
||||
closer in functionality to Pico's -k mode; please
|
||||
note that this code is not finished yet. Working on this
|
||||
code has made me realize that there is not enough
|
||||
abstraction in the code, and I will be working on that
|
||||
for the next release. Until then, have fun with this
|
||||
version.
|
||||
|
||||
07/23/2000 - Nano 0.9.13 has a few new bits and bobs, most notably the
|
||||
-k option from Pico (cut to end of line). The majority
|
||||
of changes in this release are bugfixes, however, including
|
||||
the usual display fixes and fixes for writing to symbolic
|
||||
links and un-writeable files. Barring any other major
|
||||
changes, this should be the feature set for nano 1.0,
|
||||
whenever it might be released =-)
|
||||
|
||||
07/07/2000 - Nano 0.9.12 (The "lucky day" release) is bursting with new
|
||||
features, bug fixes, and yummy fruit flavor. For
|
||||
changes, the alternate replace keystroke ^W^T is now
|
||||
^W^R to be compatible with later version of Pico.
|
||||
^W^R to be compatible with later versions of Pico.
|
||||
^W^T is now goto line, again for Pico compatibility.
|
||||
As for new features, the wonderful/hated magic line
|
||||
code has returned with a vengeance! Also, regular
|
||||
expression searches and replaces have been incorporated
|
||||
via the -R flag. And of course there are the usual
|
||||
via the -R flag. And, of course, there are the usual
|
||||
helping of display and other bug fixes to top it all
|
||||
off.
|
||||
|
||||
@@ -20,8 +281,8 @@
|
||||
this function just changes the way tabs LOOK in the
|
||||
editor, the tabs you input are still real tabs of normal
|
||||
width (usually 8 characters); nano just makes them look
|
||||
smaller or bigger whlie in the editor. New in the
|
||||
translation department is an indonesian translation (id).
|
||||
smaller or bigger while in the editor. New in the
|
||||
translation department is an Indonesian translation (id).
|
||||
|
||||
06/06/2000 - Nano 0.9.10 is primarily a bugfix for the loss of SIGINT when
|
||||
using "run and terminate" flags (for example, --help).
|
||||
@@ -40,7 +301,7 @@
|
||||
the resize crash people have been experiencing. It also
|
||||
offers a new input method that should allow nano to do
|
||||
things the right way (like ^S, ^Q, custom suspend keys)
|
||||
and hopefully wont break with non-US keyboards. There
|
||||
and hopefully won't break with non-US keyboards. There
|
||||
are also the obligatory display fixes and speedups. Have
|
||||
fun with it.
|
||||
|
||||
@@ -61,7 +322,7 @@
|
||||
05/01/2000 - Nano 0.9.5 attempts to speed up the display of text
|
||||
to be at least somewhat reasonable. Much
|
||||
code profiling has been done to reduce the
|
||||
rediculous number of redundant display updates. This
|
||||
ridiculous number of redundant display updates. This
|
||||
will probably expose a lot of bugs that can then be
|
||||
fixed, so this release is probably not for the faint
|
||||
of heart. For anyone curious, I would call nano 0.9.2
|
||||
@@ -87,7 +348,7 @@
|
||||
so it is being removed for the time being, and perhaps
|
||||
indefinitely.
|
||||
|
||||
Other new stuff includes a --emable-tiny option to make
|
||||
Other new stuff includes an --enable-tiny option to make
|
||||
nano ultra small (disabling i18n, detailed help and the
|
||||
marker and mouse code), and --with-slang to use the
|
||||
slang libraries instead of ncurses.
|
||||
@@ -114,7 +375,7 @@
|
||||
|
||||
04/07/2000 - Nano 0.9.0 has some updates, new language support and
|
||||
a much better refresh setup (It's still not great, but...)
|
||||
There should also be more stabillity editing long lines,
|
||||
There should also be more stability editing long lines,
|
||||
as there was a stupid mistake in the update_line
|
||||
call. Silly me =)
|
||||
|
||||
@@ -123,13 +384,13 @@
|
||||
Most things work, the rest doesn't doesn't work because
|
||||
(a) I can't fix it or I would have already done so, and
|
||||
(b) the amount of patches I'm receiving right now is quite
|
||||
negligible. Forrunately this release marks the first
|
||||
negligible. Fortunately, this release marks the first
|
||||
release since I have acquired ownership of the nano pages
|
||||
on SourceForge. Here's hoping SF will get us some more
|
||||
visibilitiy, translators and patches.
|
||||
visibility, translators and patches.
|
||||
|
||||
03/12/2000 - After a hiatus, I have finally moved (not unpacked though)
|
||||
to my new home into albany. Thus I should now have more
|
||||
to my new home into Albany. Thus I should now have more
|
||||
time to work on nano. Nano 0.8.8, the "dear god what
|
||||
broke this time?" release, incorporates patches for both
|
||||
i18n and many bugfixes. It is VERY likely something broke
|
||||
@@ -138,8 +399,8 @@
|
||||
|
||||
I would like to announce that I'm going to need
|
||||
translations soonish, so if you are fluent in other
|
||||
languages than english (or even better, if your native
|
||||
language is not english) and you would like to submit a
|
||||
languages than English (or even better, if your native
|
||||
language is not English) and you would like to submit a
|
||||
translation file to me, please feel free to do so. If you
|
||||
do, I will list your name and email in the AUTHORS file as
|
||||
the maintainer of the .po file, and from then on it is
|
||||
@@ -147,9 +408,9 @@
|
||||
|
||||
03/01/2000 - Well, to continue my trend of going back on my previous
|
||||
release's comments, nano 0.8.7 is released. The crashing
|
||||
behavior was still occuring, and this most recent fix also
|
||||
behavior was still occurring, and this most recent fix also
|
||||
fixes some other wrapping problems, so here you go.
|
||||
There may be another relase soon, there may not be, is
|
||||
There may be another release soon, there may not be, is
|
||||
that vague enough? =)
|
||||
|
||||
02/25/2000 - More minor bugfixes in 0.8.6, the bizarre behavior at the end
|
||||
@@ -176,11 +437,11 @@
|
||||
but I may be changing jobs very soon. I will release
|
||||
version 0.8.2 as is (no i18n, no help menu (yet). I
|
||||
expect things to settle down by the end of next week, and
|
||||
then I can try to start on the i18n support and help menu,
|
||||
then I can try to start on the i18n support and help menu;
|
||||
look for these new features in version 0.8.5 to 0.9.0.
|
||||
|
||||
01/28/2000 - Nano 0.8.1 marks our first official step toward
|
||||
internationaliation (i18n) and the help system (^G). I
|
||||
internationalization (i18n) and the help system (^G). I
|
||||
will be merging in Jordi's patches for initial i18n in the
|
||||
next version, and will implement the help system with
|
||||
i18n built into it shortly after that. Please don't
|
||||
@@ -189,14 +450,14 @@
|
||||
|
||||
01/25/2000 - Nano 0.8.0 is officially the 'let's try and be at least a
|
||||
little portable, mmmmkay?' release. There are many
|
||||
portability checks and fixes, many thanks to Andy Kahn for
|
||||
portability checks and fixes; many thanks to Andy Kahn for
|
||||
his patches. I removed the broken do_spell behavior with
|
||||
the 'spell' program, for now we only try to call 'ispell'
|
||||
the 'spell' program; for now, we only try to call 'ispell'
|
||||
until I write a better method to handle the output of the
|
||||
normal 'spell' command.
|
||||
|
||||
01/24/2000 - Nano 0.7.9 features many new features. Among them are a
|
||||
new autoindent feature (-i, --autoondent), tempfile
|
||||
new autoindent feature (-i, --autoindent), tempfile
|
||||
flag like Pico's -t flag (-t, --tempfile), and preliminary
|
||||
spelling program support. The spelling function tries
|
||||
to run 'spell' and then 'ispell' in that order, but you
|
||||
@@ -209,7 +470,7 @@
|
||||
all the changes in this release will cause a few bugs, so
|
||||
0.7.8 will primarily be about fixing those bugs.
|
||||
|
||||
Things added this release include resizeability (kinda),
|
||||
Things added this release include resizability (kinda),
|
||||
new -x and -c flags (see nano -h for help), long command
|
||||
line flag support, and the usual array of bugfixes.
|
||||
|
||||
@@ -224,3 +485,5 @@
|
||||
http://faculty.plattsburgh.edu/astyanax/nano. Please
|
||||
update your bookmarks, tell your friends, and all that
|
||||
jazz.
|
||||
|
||||
$Id$
|
||||
|
||||
95
README
95
README
@@ -1,29 +1,24 @@
|
||||
|
||||
The nano editor (Nano's ANOther editor) by Chris Allegretta
|
||||
|
||||
Manifesto
|
||||
GNU nano - an enhanced clone of the Pico text editor.
|
||||
|
||||
Overview
|
||||
|
||||
The nano project was started because of a few "problems" with the
|
||||
wonderfully easy-to-use and friendly Pico text editor.
|
||||
|
||||
First and foremost is its license: the Pine suite does not use the
|
||||
GPL or a GPL-friendly license, and has unclear restrictions on
|
||||
redistribution. Because of this, Pine and Pico are not included with
|
||||
many GNU/Linux distributions. Also, other features (like goto line
|
||||
number or search and replace) were unavailable until recently or
|
||||
require a command line flag. Yuck.
|
||||
|
||||
Nano is the editor formerly known as TIP (TIP Isn't Pico).
|
||||
The nano project was started because of three main problems with the
|
||||
wonderfully easy-to-use and friendly Pico text editor:
|
||||
|
||||
- It's license is not the GNU GPL, and hence some Linux
|
||||
distributions, including Debian (my favorite) don't always
|
||||
include it/don't include binaries. This is not necessarily a
|
||||
problem, but an issue nonetheless.
|
||||
|
||||
- Until recently, it had no ability to go to a line # from within
|
||||
the editor. There was the +number command line option, but who wants
|
||||
to exit a file to go to a specific line number? When I want to go to
|
||||
a line, since I have to exit anyway, I just call up vi temporarily.
|
||||
|
||||
- No search and replace feature. Well, apparently there is a flag
|
||||
that lets you do a search and replace (-b in newer versions) but,
|
||||
well, I still dont like it.
|
||||
|
||||
nano aims to solve these problems by emulating the functionality of
|
||||
Pico as closely as possible while adressing the problems above and
|
||||
Pico as closely as possible while addressing the problems above and
|
||||
perhaps providing other extra functionality.
|
||||
|
||||
The nano editor is now an official GNU package. For more information
|
||||
on GNU and the Free Software Foundation please see http://www.gnu.org.
|
||||
|
||||
How to compile and install nano
|
||||
|
||||
@@ -34,12 +29,12 @@ How to compile and install nano
|
||||
make
|
||||
make install
|
||||
|
||||
It's that simple. Use --prefix to override the default installation
|
||||
directory of /usr/local.
|
||||
It's that simple. Use --prefix with configure to override the
|
||||
default installation directory of /usr/local.
|
||||
|
||||
Web Page
|
||||
|
||||
http://www.asty.org/nano
|
||||
http://www.nano-editor.org
|
||||
|
||||
Mailing List and Bug Reports
|
||||
|
||||
@@ -54,29 +49,37 @@ Mailing List and Bug Reports
|
||||
with a subject of "subscribe", where <name> is the list you want to
|
||||
subscribe to.
|
||||
For general bug reports, send a description of the problem to
|
||||
nano@asty.org or directly to the development list.
|
||||
nano@nano-editor.org or directly to the development list.
|
||||
|
||||
Current Status
|
||||
|
||||
nano is currently at version 0.9.x, and it will probably remain there
|
||||
for awhile. This reflects the adage that the last 10% of a project
|
||||
takes 90% of the time. Version 1.0 will be released when there are
|
||||
no unresolved bugs, and not before. I am also currently looking for
|
||||
patches for all things listed in the TODO file. If you have a
|
||||
comment or suggestion, please let me know, all help is appreciated.
|
||||
This is the 1.1 or unstable branch of nano. New features
|
||||
will be added and things will be changed around and basically
|
||||
stability is not guaranteed. If this is not what you're
|
||||
interested in, please use the latest 1.0.x release of nano.
|
||||
|
||||
New features in this branch include:
|
||||
+ .nanorc file support (--enable-nanorc configure option,
|
||||
see sample.nanorc file)
|
||||
+ Negative -r value for "#cols from right", allows dynamic adjustment
|
||||
of wrap margin based on window size.
|
||||
+ Write marked text to separate file (^O after selecting with ^^).
|
||||
+ Append to file (Meta-A at write file menu).
|
||||
+ Multiple file buffers! (--enable-multibuffer configure option,
|
||||
--multibuffer, -F cmdline flag, Meta-F toggle, then ^R to load).
|
||||
+ Better compatibility with Pico. Mouse mode now supports clicking
|
||||
shortcuts and files in browser, search toggles that are Pico
|
||||
extensions moved to Meta keys so as to not interfere with Pico
|
||||
control sequences.
|
||||
+ Smooth scrolling through files, instead of the jerky half-page
|
||||
down, half-page up method. This is available by using the
|
||||
-S or --smooth switch, or the Meta-S toggle.
|
||||
+ Better non-*nix file support. GNU nano now automatically
|
||||
converts files from DOS format or Mac format to standard file
|
||||
format. It can also write files in either format by using the
|
||||
appropriate command line (-D, --dos or -M, --mac) or toggle
|
||||
(Meta-D, Meta-O).
|
||||
|
||||
Warning: This program can and possibly will corrupt your data in
|
||||
its current form! It is beta software, so treat it as such!
|
||||
Thank you.
|
||||
|
||||
Note that the primary aim of nano is to emulate Pico while adding a
|
||||
few key "missing" features. I do NOT want just a GPL'ed Pico clone,
|
||||
nor do I want something that strays too far from the Pico design
|
||||
(simple and straightforward). If you don't like this, feel free to
|
||||
fork my code at any time, but please call your editor something
|
||||
else, believe it or not I struggled awhile before coming up with
|
||||
the name nano (and before that TIP), and it would be much easier for
|
||||
everyone if there weren't five versions of the same program. As you
|
||||
can guess, I'm not much of an emacs fan ;)
|
||||
|
||||
Chris Allegretta (chrisa@asty.org)
|
||||
|
||||
$Id$
|
||||
|
||||
42
THANKS
Normal file
42
THANKS
Normal file
@@ -0,0 +1,42 @@
|
||||
The following people have helped GNU nano in some way or another.
|
||||
If we missed you here, let us now!
|
||||
|
||||
Marco Colombo <magicdice@inwind.it> Italian Translator
|
||||
Karl Eichwalder <keichwa@gmx.net> German Translator
|
||||
Jean-Philippe Guérard <jean-philippe.guerard@laposte.net>
|
||||
French Translator
|
||||
Tedi Heriyanto <tedi_h@gmx.net> Indonesian Translator
|
||||
Václav Haisman <V.Haisman@sh.cvut.cz> Czech Translator
|
||||
Szabolcs Horvath <horvaths@janus.gimsz.sulinet.hu>
|
||||
Hungarian Translator
|
||||
Eivind Kjørstad <ekj@vestdata.no> Norwegian (Bokmål) Translator
|
||||
Florian König <floki@bigfoot.com> German Translator
|
||||
Wojciech Kotwica <wkotwica@post.pl> Polish Translator
|
||||
Clement Laforet <clem_laf@wanadoo.fr> French Translator
|
||||
Michael Piefel <piefel@informatik.hu-berlin.de> German Translator
|
||||
Sergey A. Ribalchenko <fisher@obu.ck.ua> Russian, Ukrainian Translator
|
||||
Michel Robitaille <robitail@IRO.UMontreal.CA> French Translator
|
||||
Christian Rose <menthos@menthos.com> Swedish Translator
|
||||
Keld Simonsen <keld@dkuug.dk> Danish Translator
|
||||
Guus Sliepen <guus@nl.linux.org> Dutch Translator
|
||||
Cezary Sliwa <sliwa@cft.edu.pl> Polish Translator
|
||||
Pierre Tane <tanep@bigfoot.com> French Translator
|
||||
Jacobo Tarrío <jtarrio@trasno.net> Galician Translator
|
||||
Miquel Vidal <miquel@sindominio.net> Catalan Translator
|
||||
Pauli Virtanen <pauli.virtanen@saunalahti.fi> Finnish Translator
|
||||
|
||||
Jim Knoble <jmknoble@pobox.com> Pico compat for browser
|
||||
Thomas Dickey <dickey@herndon4.his.com> Curses help and advice
|
||||
Ryan Krebs <fluffy@highwire.stanford.edu> Many bug fixes and testing
|
||||
Ken Tyler <kent@werple.net.au> Super bug tester and advice
|
||||
Bill Soudan <wes0472@rit.edu> Regex code, etc
|
||||
Ben Armstrong <synrg@sanctuary.nslug.ns.ca> Negative -r value idea, code
|
||||
Jeremy Robichaud <robicj@yahoo.com> Beta tester
|
||||
Roy Lanek <lanek@ranahminang.net> Advice and advocacy
|
||||
Sven Guckes <guckes@math.fu-berlin.de> Advice and Advocacy
|
||||
Neil Parks <nparks@acsmail.com> Bug reports n fixes
|
||||
Chuck Mead <csm@MoonGroup.com> Feedback and RPM stuff
|
||||
Mike Melanson <melanson@pcisys.net> Bugs
|
||||
|
||||
|
||||
$Id$
|
||||
33
TODO
33
TODO
@@ -1,14 +1,37 @@
|
||||
TODO file (? means the feature may be implemented, but not definitely)
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
- Implement Spelling [DONE, mostly...]
|
||||
Current Version:
|
||||
- Implement Spelling [DONE]
|
||||
- Implement Help [DONE]
|
||||
- Internationalization [In progress, translators welcome!]
|
||||
- Allow nano to be resized in X. [DONE]
|
||||
- Color syntax highlighting? (certainly seems like there's a demand for it.)
|
||||
- On page up/down, put the cursor on the first line (like Pico), not the
|
||||
center line [DONE]
|
||||
- Undo/Redo key?
|
||||
- single line scroll up/down?
|
||||
- Rewrite edit_refresh, if at all possible [In progress]
|
||||
- Rewrite edit_refresh, if at all possible [DONE]
|
||||
- Implement justify function [DONE]
|
||||
- Cut to end of line [DONE]
|
||||
- Built-in speller command [needed for version 1.0] [DONE]
|
||||
- Better statusbar interaction (scrolling, tab completion for filename)
|
||||
[needed for version 1.0] [DONE]
|
||||
- Now do username completion [DONE].
|
||||
- Unjustify command (^U after ^J) [DONE =-].
|
||||
- Username completion (~user) [DONE =-].
|
||||
|
||||
For Next Version:
|
||||
- Undo/Redo key?
|
||||
- Single line scroll up/down? [DONE]
|
||||
- Color syntax highlighting? (certainly seems like there's a demand for it.)
|
||||
- .nanorc [DONE]
|
||||
- Backup making (filename~)?
|
||||
- Search (etc) string history [1.1]
|
||||
- Implement Pico's -j and -g flags, as they are pretty easy to do. [DONE]
|
||||
- Make mouse support work with clicking on the shortcuts (-m). Must
|
||||
make global variable pointing to current shortcut list to determine what
|
||||
keystroke to ungetch(). [DONE].
|
||||
- Implement -o (chroot of sorts) [DONE]
|
||||
- Allow -r to take a negative argument, meaning right margin instead of
|
||||
left (allows resizing that way), formerly -W arg. [DONE]
|
||||
- UTF-8 support.
|
||||
|
||||
$Id$
|
||||
|
||||
51
acconfig.h
51
acconfig.h
@@ -1,6 +1,14 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Define this if you have the wresize function in your ncurses-type library */
|
||||
#undef HAVE_WRESIZE
|
||||
|
||||
/* Define this if you have the resizeterm function in your ncurses-type library */
|
||||
#undef HAVE_RESIZETERM
|
||||
|
||||
/* Define this if your curses lib has the _use_keypad flag */
|
||||
#undef HAVE_USEKEYPAD
|
||||
|
||||
/* Define this if you have NLS */
|
||||
#undef ENABLE_NLS
|
||||
|
||||
@@ -22,5 +30,44 @@
|
||||
/* Define to use the slang wrappers for curses instead of native curses */
|
||||
#undef USE_SLANG
|
||||
|
||||
/* Define this if you have a behaving TABSIZE global in your curses lib */
|
||||
#undef HAVE_TABSIZE
|
||||
/* Define this to enable the extra stuff */
|
||||
#undef NANO_EXTRA
|
||||
|
||||
/* Define to disable the tab completion code Chris worked so hard on! */
|
||||
#undef DISABLE_TABCOMP
|
||||
|
||||
/* Define this to disable the justify routine */
|
||||
#undef DISABLE_JUSTIFY
|
||||
|
||||
/* Define this to disable the use(full|less) spelling functions */
|
||||
#undef DISABLE_SPELLER
|
||||
|
||||
/* Define this to disable the ^G help menu */
|
||||
#undef DISABLE_HELP
|
||||
|
||||
/* Define this to disable the built-in (crappy) file browser */
|
||||
#undef DISABLE_BROWSER
|
||||
|
||||
/* Define this to disable any and all text wrapping */
|
||||
#undef DISABLE_WRAPPING
|
||||
|
||||
/* Define this to disable the mouse functions */
|
||||
#undef DISABLE_MOUSE
|
||||
|
||||
/* Define this to disable setting of the operating directory (chroot of sorts) */
|
||||
#undef DISABLE_OPERATINGDIR
|
||||
|
||||
/* Define this to enable multiple file buffers; this is disabled if NANO_SMALL is defined */
|
||||
#undef ENABLE_MULTIBUFFER
|
||||
|
||||
/* Define this to use the .nanorc file */
|
||||
#undef ENABLE_NANORC
|
||||
|
||||
/* Define this if your curses library has the use_default_colors command */
|
||||
#undef HAVE_USE_DEFAULT_COLORS
|
||||
|
||||
/* Define this to have syntax hilighting, requires ENABLE_NANORC too! */
|
||||
#undef ENABLE_COLOR
|
||||
|
||||
/* Define this to enable undoing....something */
|
||||
#undef ENABLE_UNDO
|
||||
|
||||
708
aclocal.m4
vendored
708
aclocal.m4
vendored
@@ -1,708 +0,0 @@
|
||||
dnl aclocal.m4 generated automatically by aclocal 1.4
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
# Do all the work for Automake. This macro actually does too much --
|
||||
# some checks are only needed if your package does certain things.
|
||||
# But this isn't really a big deal.
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl Usage:
|
||||
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||
|
||||
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||
PACKAGE=[$1]
|
||||
AC_SUBST(PACKAGE)
|
||||
VERSION=[$2]
|
||||
AC_SUBST(VERSION)
|
||||
dnl test to see if srcdir already configured
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
ifelse([$3],,
|
||||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
|
||||
AC_REQUIRE([AM_SANITY_CHECK])
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])
|
||||
dnl FIXME This is truly gross.
|
||||
missing_dir=`cd $ac_aux_dir && pwd`
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])])
|
||||
|
||||
#
|
||||
# Check to make sure that the build environment is sane.
|
||||
#
|
||||
|
||||
AC_DEFUN(AM_SANITY_CHECK,
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftestfile
|
||||
# Do `set' in a subshell so we don't clobber the current shell's
|
||||
# arguments. Must try -L first in case configure is actually a
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
|
||||
if test "[$]*" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftestfile`
|
||||
fi
|
||||
if test "[$]*" != "X $srcdir/configure conftestfile" \
|
||||
&& test "[$]*" != "X conftestfile $srcdir/configure"; then
|
||||
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||
alias in your environment])
|
||||
fi
|
||||
|
||||
test "[$]2" = conftestfile
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
rm -f conftest*
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
||||
dnl The program must properly implement --version.
|
||||
AC_DEFUN(AM_MISSING_PROG,
|
||||
[AC_MSG_CHECKING(for working $2)
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||
if ($2 --version) < /dev/null > /dev/null 2>&1; then
|
||||
$1=$2
|
||||
AC_MSG_RESULT(found)
|
||||
else
|
||||
$1="$3/missing $2"
|
||||
AC_MSG_RESULT(missing)
|
||||
fi
|
||||
AC_SUBST($1)])
|
||||
|
||||
# Like AC_CONFIG_HEADER, but automatically create stamp file.
|
||||
|
||||
AC_DEFUN(AM_CONFIG_HEADER,
|
||||
[AC_PREREQ([2.12])
|
||||
AC_CONFIG_HEADER([$1])
|
||||
dnl When config.status generates a header, we must update the stamp-h file.
|
||||
dnl This file resides in the same directory as the config header
|
||||
dnl that is generated. We must strip everything past the first ":",
|
||||
dnl and everything past the last "/".
|
||||
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
|
||||
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
|
||||
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
|
||||
<<am_indx=1
|
||||
for am_file in <<$1>>; do
|
||||
case " <<$>>CONFIG_HEADERS " in
|
||||
*" <<$>>am_file "*<<)>>
|
||||
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
|
||||
;;
|
||||
esac
|
||||
am_indx=`expr "<<$>>am_indx" + 1`
|
||||
done<<>>dnl>>)
|
||||
changequote([,]))])
|
||||
|
||||
# Configure paths for GLIB
|
||||
# Owen Taylor 97-11-3
|
||||
|
||||
dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
||||
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
|
||||
dnl gthread is specified in MODULES, pass to glib-config
|
||||
dnl
|
||||
AC_DEFUN(AM_PATH_GLIB,
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the glib-config script
|
||||
dnl
|
||||
AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
|
||||
glib_config_prefix="$withval", glib_config_prefix="")
|
||||
AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
|
||||
glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
|
||||
AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
|
||||
, enable_glibtest=yes)
|
||||
|
||||
if test x$glib_config_exec_prefix != x ; then
|
||||
glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
|
||||
if test x${GLIB_CONFIG+set} != xset ; then
|
||||
GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
|
||||
fi
|
||||
fi
|
||||
if test x$glib_config_prefix != x ; then
|
||||
glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
|
||||
if test x${GLIB_CONFIG+set} != xset ; then
|
||||
GLIB_CONFIG=$glib_config_prefix/bin/glib-config
|
||||
fi
|
||||
fi
|
||||
|
||||
for module in . $4
|
||||
do
|
||||
case "$module" in
|
||||
gmodule)
|
||||
glib_config_args="$glib_config_args gmodule"
|
||||
;;
|
||||
gthread)
|
||||
glib_config_args="$glib_config_args gthread"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
|
||||
min_glib_version=ifelse([$1], ,0.99.7,$1)
|
||||
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
|
||||
no_glib=""
|
||||
if test "$GLIB_CONFIG" = "no" ; then
|
||||
no_glib=yes
|
||||
else
|
||||
GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
|
||||
GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
|
||||
glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
if test "x$enable_glibtest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $GLIB_CFLAGS"
|
||||
LIBS="$GLIB_LIBS $LIBS"
|
||||
dnl
|
||||
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
|
||||
dnl checks the results of glib-config to some extent
|
||||
dnl
|
||||
rm -f conf.glibtest
|
||||
AC_TRY_RUN([
|
||||
#include <glib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int major, minor, micro;
|
||||
char *tmp_version;
|
||||
|
||||
system ("touch conf.glibtest");
|
||||
|
||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
tmp_version = g_strdup("$min_glib_version");
|
||||
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||
printf("%s, bad version string\n", "$min_glib_version");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ((glib_major_version != $glib_config_major_version) ||
|
||||
(glib_minor_version != $glib_config_minor_version) ||
|
||||
(glib_micro_version != $glib_config_micro_version))
|
||||
{
|
||||
printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
|
||||
$glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
|
||||
glib_major_version, glib_minor_version, glib_micro_version);
|
||||
printf ("*** was found! If glib-config was correct, then it is best\n");
|
||||
printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
|
||||
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
|
||||
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
||||
printf("*** required on your system.\n");
|
||||
printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
|
||||
printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
|
||||
printf("*** before re-running configure\n");
|
||||
}
|
||||
else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
|
||||
(glib_minor_version != GLIB_MINOR_VERSION) ||
|
||||
(glib_micro_version != GLIB_MICRO_VERSION))
|
||||
{
|
||||
printf("*** GLIB header files (version %d.%d.%d) do not match\n",
|
||||
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
|
||||
printf("*** library (version %d.%d.%d)\n",
|
||||
glib_major_version, glib_minor_version, glib_micro_version);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((glib_major_version > major) ||
|
||||
((glib_major_version == major) && (glib_minor_version > minor)) ||
|
||||
((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
|
||||
glib_major_version, glib_minor_version, glib_micro_version);
|
||||
printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
|
||||
major, minor, micro);
|
||||
printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
|
||||
printf("***\n");
|
||||
printf("*** If you have already installed a sufficiently new version, this error\n");
|
||||
printf("*** probably means that the wrong copy of the glib-config shell script is\n");
|
||||
printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
||||
printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
|
||||
printf("*** correct copy of glib-config. (In this case, you will have to\n");
|
||||
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
|
||||
printf("*** so that the correct libraries are found at run-time))\n");
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
if test "x$no_glib" = x ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test "$GLIB_CONFIG" = "no" ; then
|
||||
echo "*** The glib-config script installed by GLIB could not be found"
|
||||
echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
|
||||
echo "*** your path, or set the GLIB_CONFIG environment variable to the"
|
||||
echo "*** full path to glib-config."
|
||||
else
|
||||
if test -f conf.glibtest ; then
|
||||
:
|
||||
else
|
||||
echo "*** Could not run GLIB test program, checking why..."
|
||||
CFLAGS="$CFLAGS $GLIB_CFLAGS"
|
||||
LIBS="$LIBS $GLIB_LIBS"
|
||||
AC_TRY_LINK([
|
||||
#include <glib.h>
|
||||
#include <stdio.h>
|
||||
], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
|
||||
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||
echo "*** that the run-time linker is not finding GLIB or finding the wrong"
|
||||
echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
|
||||
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||
echo "*** is required on your system"
|
||||
echo "***"
|
||||
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
|
||||
echo "***"
|
||||
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
|
||||
echo "*** came with the system with the command"
|
||||
echo "***"
|
||||
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
|
||||
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||
echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
|
||||
echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
|
||||
echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
GLIB_CFLAGS=""
|
||||
GLIB_LIBS=""
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
AC_SUBST(GLIB_LIBS)
|
||||
rm -f conf.glibtest
|
||||
])
|
||||
|
||||
# Macro to add for using GNU gettext.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
#
|
||||
# This file can 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.
|
||||
|
||||
# serial 5
|
||||
|
||||
AC_DEFUN(AM_WITH_NLS,
|
||||
[AC_MSG_CHECKING([whether NLS is requested])
|
||||
dnl Default is enabled NLS
|
||||
AC_ARG_ENABLE(nls,
|
||||
[ --disable-nls do not use Native Language Support],
|
||||
USE_NLS=$enableval, USE_NLS=yes)
|
||||
AC_MSG_RESULT($USE_NLS)
|
||||
AC_SUBST(USE_NLS)
|
||||
|
||||
USE_INCLUDED_LIBINTL=no
|
||||
|
||||
dnl If we use NLS figure out what method
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
AC_DEFINE(ENABLE_NLS)
|
||||
AC_MSG_CHECKING([whether included gettext is requested])
|
||||
AC_ARG_WITH(included-gettext,
|
||||
[ --with-included-gettext use the GNU gettext library included here],
|
||||
nls_cv_force_use_gnu_gettext=$withval,
|
||||
nls_cv_force_use_gnu_gettext=no)
|
||||
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
|
||||
|
||||
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
||||
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
||||
dnl User does not insist on using GNU NLS library. Figure out what
|
||||
dnl to use. If gettext or catgets are available (in this order) we
|
||||
dnl use this. Else we have to fall back to GNU NLS library.
|
||||
dnl catgets is only used if permitted by option --with-catgets.
|
||||
nls_cv_header_intl=
|
||||
nls_cv_header_libgt=
|
||||
CATOBJEXT=NONE
|
||||
|
||||
AC_CHECK_HEADER(libintl.h,
|
||||
[AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
|
||||
[AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
|
||||
gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
|
||||
|
||||
if test "$gt_cv_func_gettext_libc" != "yes"; then
|
||||
AC_CHECK_LIB(intl, bindtextdomain,
|
||||
[AC_CACHE_CHECK([for gettext in libintl],
|
||||
gt_cv_func_gettext_libintl,
|
||||
[AC_CHECK_LIB(intl, gettext,
|
||||
gt_cv_func_gettext_libintl=yes,
|
||||
gt_cv_func_gettext_libintl=no)],
|
||||
gt_cv_func_gettext_libintl=no)])
|
||||
fi
|
||||
|
||||
if test "$gt_cv_func_gettext_libc" = "yes" \
|
||||
|| test "$gt_cv_func_gettext_libintl" = "yes"; then
|
||||
AC_DEFINE(HAVE_GETTEXT)
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
|
||||
if test "$MSGFMT" != "no"; then
|
||||
AC_CHECK_FUNCS(dcgettext)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
|
||||
return _nl_msg_cat_cntr],
|
||||
[CATOBJEXT=.gmo
|
||||
DATADIRNAME=share],
|
||||
[CATOBJEXT=.mo
|
||||
DATADIRNAME=lib])
|
||||
INSTOBJEXT=.mo
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
if test "$CATOBJEXT" = "NONE"; then
|
||||
AC_MSG_CHECKING([whether catgets can be used])
|
||||
AC_ARG_WITH(catgets,
|
||||
[ --with-catgets use catgets functions if available],
|
||||
nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
|
||||
AC_MSG_RESULT($nls_cv_use_catgets)
|
||||
|
||||
if test "$nls_cv_use_catgets" = "yes"; then
|
||||
dnl No gettext in C library. Try catgets next.
|
||||
AC_CHECK_LIB(i, main)
|
||||
AC_CHECK_FUNC(catgets,
|
||||
[AC_DEFINE(HAVE_CATGETS)
|
||||
INTLOBJS="\$(CATOBJS)"
|
||||
AC_PATH_PROG(GENCAT, gencat, no)dnl
|
||||
if test "$GENCAT" != "no"; then
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
|
||||
if test "$GMSGFMT" = "no"; then
|
||||
AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
|
||||
fi
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
USE_INCLUDED_LIBINTL=yes
|
||||
CATOBJEXT=.cat
|
||||
INSTOBJEXT=.cat
|
||||
DATADIRNAME=lib
|
||||
INTLDEPS='$(top_builddir)/intl/libintl.a'
|
||||
INTLLIBS=$INTLDEPS
|
||||
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||
nls_cv_header_intl=intl/libintl.h
|
||||
nls_cv_header_libgt=intl/libgettext.h
|
||||
fi])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$CATOBJEXT" = "NONE"; then
|
||||
dnl Neither gettext nor catgets in included in the C library.
|
||||
dnl Fall back on GNU gettext library.
|
||||
nls_cv_use_gnu_gettext=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
dnl Mark actions used to generate GNU NLS library.
|
||||
INTLOBJS="\$(GETTOBJS)"
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
AC_SUBST(MSGFMT)
|
||||
USE_INCLUDED_LIBINTL=yes
|
||||
CATOBJEXT=.gmo
|
||||
INSTOBJEXT=.mo
|
||||
DATADIRNAME=share
|
||||
INTLDEPS='$(top_builddir)/intl/libintl.a'
|
||||
INTLLIBS=$INTLDEPS
|
||||
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||
nls_cv_header_intl=intl/libintl.h
|
||||
nls_cv_header_libgt=intl/libgettext.h
|
||||
fi
|
||||
|
||||
dnl Test whether we really found GNU xgettext.
|
||||
if test "$XGETTEXT" != ":"; then
|
||||
dnl If it is no GNU xgettext we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
|
||||
: ;
|
||||
else
|
||||
AC_MSG_RESULT(
|
||||
[found xgettext program is not GNU xgettext; ignore it])
|
||||
XGETTEXT=":"
|
||||
fi
|
||||
fi
|
||||
|
||||
# We need to process the po/ directory.
|
||||
POSUB=po
|
||||
else
|
||||
DATADIRNAME=share
|
||||
nls_cv_header_intl=intl/libintl.h
|
||||
nls_cv_header_libgt=intl/libgettext.h
|
||||
fi
|
||||
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
|
||||
AC_OUTPUT_COMMANDS(
|
||||
[case "$CONFIG_FILES" in *po/Makefile.in*)
|
||||
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
|
||||
esac])
|
||||
|
||||
|
||||
# If this is used in GNU gettext we have to set USE_NLS to `yes'
|
||||
# because some of the sources are only built for this goal.
|
||||
if test "$PACKAGE" = gettext; then
|
||||
USE_NLS=yes
|
||||
USE_INCLUDED_LIBINTL=yes
|
||||
fi
|
||||
|
||||
dnl These rules are solely for the distribution goal. While doing this
|
||||
dnl we only have to keep exactly one list of the available catalogs
|
||||
dnl in configure.in.
|
||||
for lang in $ALL_LINGUAS; do
|
||||
GMOFILES="$GMOFILES $lang.gmo"
|
||||
POFILES="$POFILES $lang.po"
|
||||
done
|
||||
|
||||
dnl Make all variables we use known to autoconf.
|
||||
AC_SUBST(USE_INCLUDED_LIBINTL)
|
||||
AC_SUBST(CATALOGS)
|
||||
AC_SUBST(CATOBJEXT)
|
||||
AC_SUBST(DATADIRNAME)
|
||||
AC_SUBST(GMOFILES)
|
||||
AC_SUBST(INSTOBJEXT)
|
||||
AC_SUBST(INTLDEPS)
|
||||
AC_SUBST(INTLLIBS)
|
||||
AC_SUBST(INTLOBJS)
|
||||
AC_SUBST(POFILES)
|
||||
AC_SUBST(POSUB)
|
||||
])
|
||||
|
||||
AC_DEFUN(AM_GNU_GETTEXT,
|
||||
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_ISC_POSIX])dnl
|
||||
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||
AC_REQUIRE([AC_C_CONST])dnl
|
||||
AC_REQUIRE([AC_C_INLINE])dnl
|
||||
AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
||||
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
||||
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
||||
|
||||
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
|
||||
unistd.h sys/param.h])
|
||||
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
|
||||
strdup __argz_count __argz_stringify __argz_next])
|
||||
|
||||
if test "${ac_cv_func_stpcpy+set}" != "set"; then
|
||||
AC_CHECK_FUNCS(stpcpy)
|
||||
fi
|
||||
if test "${ac_cv_func_stpcpy}" = "yes"; then
|
||||
AC_DEFINE(HAVE_STPCPY)
|
||||
fi
|
||||
|
||||
AM_LC_MESSAGES
|
||||
AM_WITH_NLS
|
||||
|
||||
if test "x$CATOBJEXT" != "x"; then
|
||||
if test "x$ALL_LINGUAS" = "x"; then
|
||||
LINGUAS=
|
||||
else
|
||||
AC_MSG_CHECKING(for catalogs to be installed)
|
||||
NEW_LINGUAS=
|
||||
for lang in ${LINGUAS=$ALL_LINGUAS}; do
|
||||
case "$ALL_LINGUAS" in
|
||||
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
|
||||
esac
|
||||
done
|
||||
LINGUAS=$NEW_LINGUAS
|
||||
AC_MSG_RESULT($LINGUAS)
|
||||
fi
|
||||
|
||||
dnl Construct list of names of catalog files to be constructed.
|
||||
if test -n "$LINGUAS"; then
|
||||
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl The reference to <locale.h> in the installed <libintl.h> file
|
||||
dnl must be resolved because we cannot expect the users of this
|
||||
dnl to define HAVE_LOCALE_H.
|
||||
if test $ac_cv_header_locale_h = yes; then
|
||||
INCLUDE_LOCALE_H="#include <locale.h>"
|
||||
else
|
||||
INCLUDE_LOCALE_H="\
|
||||
/* The system does not provide the header <locale.h>. Take care yourself. */"
|
||||
fi
|
||||
AC_SUBST(INCLUDE_LOCALE_H)
|
||||
|
||||
dnl Determine which catalog format we have (if any is needed)
|
||||
dnl For now we know about two different formats:
|
||||
dnl Linux libc-5 and the normal X/Open format
|
||||
test -d intl || mkdir intl
|
||||
if test "$CATOBJEXT" = ".cat"; then
|
||||
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
|
||||
|
||||
dnl Transform the SED scripts while copying because some dumb SEDs
|
||||
dnl cannot handle comments.
|
||||
sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
|
||||
fi
|
||||
dnl po2tbl.sed is always needed.
|
||||
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
|
||||
$srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
|
||||
|
||||
dnl In the intl/Makefile.in we have a special dependency which makes
|
||||
dnl only sense for gettext. We comment this out for non-gettext
|
||||
dnl packages.
|
||||
if test "$PACKAGE" = "gettext"; then
|
||||
GT_NO="#NO#"
|
||||
GT_YES=
|
||||
else
|
||||
GT_NO=
|
||||
GT_YES="#YES#"
|
||||
fi
|
||||
AC_SUBST(GT_NO)
|
||||
AC_SUBST(GT_YES)
|
||||
|
||||
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
|
||||
dnl Try to locate is.
|
||||
MKINSTALLDIRS=
|
||||
if test -n "$ac_aux_dir"; then
|
||||
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
||||
fi
|
||||
if test -z "$MKINSTALLDIRS"; then
|
||||
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
||||
fi
|
||||
AC_SUBST(MKINSTALLDIRS)
|
||||
|
||||
dnl *** For now the libtool support in intl/Makefile is not for real.
|
||||
l=
|
||||
AC_SUBST(l)
|
||||
|
||||
dnl Generate list of files to be processed by xgettext which will
|
||||
dnl be included in po/Makefile.
|
||||
test -d po || mkdir po
|
||||
if test "x$srcdir" != "x."; then
|
||||
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
|
||||
posrcprefix="$srcdir/"
|
||||
else
|
||||
posrcprefix="../$srcdir/"
|
||||
fi
|
||||
else
|
||||
posrcprefix="../"
|
||||
fi
|
||||
rm -f po/POTFILES
|
||||
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
|
||||
< $srcdir/po/POTFILES.in > po/POTFILES
|
||||
])
|
||||
|
||||
# Search path for a program which passes the given test.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
#
|
||||
# This file can 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.
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
||||
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
||||
AC_DEFUN(AM_PATH_PROG_WITH_TEST,
|
||||
[# Extract the first word of "$2", so it can be a program name with args.
|
||||
set dummy $2; ac_word=[$]2
|
||||
AC_MSG_CHECKING([for $ac_word])
|
||||
AC_CACHE_VAL(ac_cv_path_$1,
|
||||
[case "[$]$1" in
|
||||
/*)
|
||||
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in ifelse([$5], , $PATH, [$5]); do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
if [$3]; then
|
||||
ac_cv_path_$1="$ac_dir/$ac_word"
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
dnl If no 4th arg is given, leave the cache variable unset,
|
||||
dnl so AC_PATH_PROGS will keep looking.
|
||||
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
|
||||
])dnl
|
||||
;;
|
||||
esac])dnl
|
||||
$1="$ac_cv_path_$1"
|
||||
if test -n "[$]$1"; then
|
||||
AC_MSG_RESULT([$]$1)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AC_SUBST($1)dnl
|
||||
])
|
||||
|
||||
# Check whether LC_MESSAGES is available in <locale.h>.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
#
|
||||
# This file can 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.
|
||||
|
||||
# serial 1
|
||||
|
||||
AC_DEFUN(AM_LC_MESSAGES,
|
||||
[if test $ac_cv_header_locale_h = yes; then
|
||||
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
||||
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
||||
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
|
||||
if test $am_cv_val_LC_MESSAGES = yes; then
|
||||
AC_DEFINE(HAVE_LC_MESSAGES)
|
||||
fi
|
||||
fi])
|
||||
|
||||
7
autogen.sh
Executable file
7
autogen.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
# Generate configure & friends for CVS users.
|
||||
|
||||
aclocal -I ./m4
|
||||
automake --add-missing
|
||||
autoheader
|
||||
autoconf
|
||||
182
color.c
Normal file
182
color.c
Normal file
@@ -0,0 +1,182 @@
|
||||
/* $Id$ */
|
||||
/**************************************************************************
|
||||
* color.c *
|
||||
* *
|
||||
* Copyright (C) 1999-2002 Chris Allegretta *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2, or (at your option) *
|
||||
* any later version. *
|
||||
* *
|
||||
* This program 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 this program; if not, write to the Free Software *
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include "proto.h"
|
||||
#include "nano.h"
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
#include <libintl.h>
|
||||
#define _(string) gettext(string)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#endif
|
||||
|
||||
void color_on(WINDOW *win, int whatever)
|
||||
{
|
||||
/* Temporary fallback, if the color value hasn't been set,
|
||||
turn on hilighting */
|
||||
if (!colors[whatever - FIRST_COLORNUM].set) {
|
||||
wattron(win, A_REVERSE);
|
||||
return;
|
||||
}
|
||||
|
||||
if (colors[whatever - FIRST_COLORNUM].bold)
|
||||
wattron(win, A_BOLD);
|
||||
|
||||
/* If the foreground color is black, we've switched fg and bg (see
|
||||
the comment in colorinit_one() about this) so turn on reverse so
|
||||
it looks like it's supposed to */
|
||||
if (colors[whatever - FIRST_COLORNUM].fg == COLOR_BLACK)
|
||||
wattron(win, A_REVERSE);
|
||||
|
||||
wattron(win, COLOR_PAIR(whatever));
|
||||
|
||||
}
|
||||
|
||||
void color_off(WINDOW *win, int whatever)
|
||||
{
|
||||
if (!colors[whatever - FIRST_COLORNUM].set) {
|
||||
wattroff(win, A_REVERSE);
|
||||
return;
|
||||
}
|
||||
|
||||
wattroff(win, COLOR_PAIR(whatever));
|
||||
|
||||
if (colors[whatever - FIRST_COLORNUM].fg == COLOR_BLACK)
|
||||
wattroff(win, A_REVERSE);
|
||||
|
||||
if (colors[whatever - FIRST_COLORNUM].bold)
|
||||
wattroff(win, A_BOLD);
|
||||
}
|
||||
|
||||
|
||||
void colorinit_one(int colortoset, short fg, short bg, int bold)
|
||||
{
|
||||
colors[colortoset - FIRST_COLORNUM].fg = fg;
|
||||
colors[colortoset - FIRST_COLORNUM].bg = bg;
|
||||
colors[colortoset - FIRST_COLORNUM].bold = bold;
|
||||
colors[colortoset - FIRST_COLORNUM].set = 1;
|
||||
|
||||
/* Okay, so if they want a black foreground, do a switch on the fg
|
||||
and bg, because specifying black as the foreground color gives
|
||||
this ugly grey color. Then in color_on we will turn A_REVERSE
|
||||
which is probably what they want it to look like... */
|
||||
if (fg == COLOR_BLACK)
|
||||
init_pair(colortoset, bg, fg);
|
||||
else
|
||||
init_pair(colortoset, fg, bg);
|
||||
}
|
||||
|
||||
int do_colorinit(void)
|
||||
{
|
||||
int i;
|
||||
colortype *tmpcolor = NULL, *beforenow = NULL;
|
||||
int defok = 0;
|
||||
|
||||
if (has_colors()) {
|
||||
start_color();
|
||||
/* Add in colors, if available */
|
||||
|
||||
#ifdef HAVE_USE_DEFAULT_COLORS
|
||||
if (use_default_colors() != ERR) {
|
||||
defok = 1;
|
||||
#endif
|
||||
|
||||
i = 1;
|
||||
for (tmpcolor = colorstrings; tmpcolor != NULL;
|
||||
tmpcolor = tmpcolor->next) {
|
||||
|
||||
for (beforenow = colorstrings; beforenow != NULL
|
||||
&& beforenow != tmpcolor &&
|
||||
(beforenow->fg != tmpcolor->fg || beforenow->bg != tmpcolor->bg
|
||||
|| beforenow->bright != tmpcolor->bright);
|
||||
beforenow = beforenow->next)
|
||||
;
|
||||
|
||||
if (beforenow != NULL && beforenow != tmpcolor) {
|
||||
tmpcolor->pairnum = beforenow->pairnum;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (defok && tmpcolor->bg == -1)
|
||||
init_pair(i, tmpcolor->fg, -1);
|
||||
else if (tmpcolor->bg == -1)
|
||||
init_pair(i, tmpcolor->fg, COLOR_BLACK);
|
||||
else /* They picked a fg and bg color */
|
||||
init_pair(i, tmpcolor->fg, tmpcolor->bg);
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "Running init_pair with fg = %d and bg = %d\n", tmpcolor->fg, tmpcolor->bg);
|
||||
#endif
|
||||
|
||||
tmpcolor->pairnum = i;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if (use_default_colors() != ERR) {
|
||||
init_pair(COLOR_BLACK, -1, -1);
|
||||
init_pair(COLOR_GREEN, COLOR_GREEN, -1);
|
||||
init_pair(COLOR_WHITE, COLOR_WHITE, -1);
|
||||
init_pair(COLOR_RED, COLOR_RED, -1);
|
||||
init_pair(COLOR_CYAN, COLOR_CYAN, -1);
|
||||
init_pair(COLOR_MAGENTA, COLOR_MAGENTA, -1);
|
||||
init_pair(COLOR_BLUE, COLOR_BLUE, -1);
|
||||
init_pair(COLOR_YELLOW, COLOR_YELLOW, -1);
|
||||
|
||||
} else {
|
||||
init_pair(COLOR_BLACK, COLOR_BLACK, COLOR_BLACK);
|
||||
init_pair(COLOR_GREEN, COLOR_GREEN, COLOR_BLACK);
|
||||
init_pair(COLOR_WHITE, COLOR_WHITE, COLOR_BLACK);
|
||||
init_pair(COLOR_RED, COLOR_RED, COLOR_BLACK);
|
||||
init_pair(COLOR_CYAN, COLOR_CYAN, COLOR_BLACK);
|
||||
init_pair(COLOR_MAGENTA, COLOR_MAGENTA, COLOR_BLACK);
|
||||
init_pair(COLOR_BLUE, COLOR_BLUE, COLOR_BLACK);
|
||||
init_pair(COLOR_YELLOW, COLOR_YELLOW, COLOR_BLACK);
|
||||
}
|
||||
*/
|
||||
|
||||
/* Okay I'll be nice and comment these out for the commit =)
|
||||
colorinit_one(COLOR_TITLEBAR, COLOR_GREEN, COLOR_BLUE, 1);
|
||||
colorinit_one(COLOR_BOTTOMBARS, COLOR_GREEN, COLOR_BLUE, 1);
|
||||
colorinit_one(COLOR_STATUSBAR, COLOR_BLACK, COLOR_CYAN, 0);
|
||||
colorinit_one(COLOR_TEXT, COLOR_WHITE, COLOR_BLACK, 0);
|
||||
colorinit_one(COLOR_MARKER, COLOR_BLACK, COLOR_CYAN, 0);
|
||||
*/
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* ENABLE_COLOR */
|
||||
|
||||
1319
config.guess
vendored
Normal file
1319
config.guess
vendored
Normal file
File diff suppressed because it is too large
Load Diff
183
config.h.in
183
config.h.in
@@ -1,183 +0,0 @@
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Define if using alloca.c. */
|
||||
#undef C_ALLOCA
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
#undef const
|
||||
|
||||
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
|
||||
This function is required for alloca.c support on those systems. */
|
||||
#undef CRAY_STACKSEG_END
|
||||
|
||||
/* Define if you have alloca, as a function or macro. */
|
||||
#undef HAVE_ALLOCA
|
||||
|
||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||
#undef HAVE_ALLOCA_H
|
||||
|
||||
/* Define if you don't have vprintf but do have _doprnt. */
|
||||
#undef HAVE_DOPRNT
|
||||
|
||||
/* Define if you have a working `mmap' system call. */
|
||||
#undef HAVE_MMAP
|
||||
|
||||
/* Define if you have the vprintf function. */
|
||||
#undef HAVE_VPRINTF
|
||||
|
||||
/* Define as __inline if that's what the C compiler calls it. */
|
||||
#undef inline
|
||||
|
||||
/* Define to `long' if <sys/types.h> doesn't define. */
|
||||
#undef off_t
|
||||
|
||||
/* Define if you need to in order for stat and other things to work. */
|
||||
#undef _POSIX_SOURCE
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
#undef size_t
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown
|
||||
*/
|
||||
#undef STACK_DIRECTION
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define this if you have the wresize function in your ncurses-type library */
|
||||
#undef HAVE_WRESIZE
|
||||
|
||||
/* Define this if you have NLS */
|
||||
#undef ENABLE_NLS
|
||||
|
||||
/* Define this is you have the catgets command */
|
||||
#undef HAVE_CATGETS
|
||||
|
||||
/* Define this is you have GNU gettext */
|
||||
#undef HAVE_GETTEXT
|
||||
|
||||
/* Define this for HAVE_LC_MESSAGES */
|
||||
#undef HAVE_LC_MESSAGES
|
||||
|
||||
/* Define this if you have the stpcpy function (cool) */
|
||||
#undef HAVE_STPCPY
|
||||
|
||||
/* Define this to make the nano executable as small as possible */
|
||||
#undef NANO_SMALL
|
||||
|
||||
/* Define to use the slang wrappers for curses instead of native curses */
|
||||
#undef USE_SLANG
|
||||
|
||||
/* Define this if you have a behaving TABSIZE global in your curses lib */
|
||||
#undef HAVE_TABSIZE
|
||||
|
||||
/* Define if you have the __argz_count function. */
|
||||
#undef HAVE___ARGZ_COUNT
|
||||
|
||||
/* Define if you have the __argz_next function. */
|
||||
#undef HAVE___ARGZ_NEXT
|
||||
|
||||
/* Define if you have the __argz_stringify function. */
|
||||
#undef HAVE___ARGZ_STRINGIFY
|
||||
|
||||
/* Define if you have the dcgettext function. */
|
||||
#undef HAVE_DCGETTEXT
|
||||
|
||||
/* Define if you have the getcwd function. */
|
||||
#undef HAVE_GETCWD
|
||||
|
||||
/* Define if you have the getopt_long function. */
|
||||
#undef HAVE_GETOPT_LONG
|
||||
|
||||
/* Define if you have the getpagesize function. */
|
||||
#undef HAVE_GETPAGESIZE
|
||||
|
||||
/* Define if you have the munmap function. */
|
||||
#undef HAVE_MUNMAP
|
||||
|
||||
/* Define if you have the putenv function. */
|
||||
#undef HAVE_PUTENV
|
||||
|
||||
/* Define if you have the setenv function. */
|
||||
#undef HAVE_SETENV
|
||||
|
||||
/* Define if you have the setlocale function. */
|
||||
#undef HAVE_SETLOCALE
|
||||
|
||||
/* Define if you have the snprintf function. */
|
||||
#undef HAVE_SNPRINTF
|
||||
|
||||
/* Define if you have the stpcpy function. */
|
||||
#undef HAVE_STPCPY
|
||||
|
||||
/* Define if you have the strcasecmp function. */
|
||||
#undef HAVE_STRCASECMP
|
||||
|
||||
/* Define if you have the strchr function. */
|
||||
#undef HAVE_STRCHR
|
||||
|
||||
/* Define if you have the strdup function. */
|
||||
#undef HAVE_STRDUP
|
||||
|
||||
/* Define if you have the vsnprintf function. */
|
||||
#undef HAVE_VSNPRINTF
|
||||
|
||||
/* Define if you have the <argz.h> header file. */
|
||||
#undef HAVE_ARGZ_H
|
||||
|
||||
/* Define if you have the <curses.h> header file. */
|
||||
#undef HAVE_CURSES_H
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define if you have the <getopt.h> header file. */
|
||||
#undef HAVE_GETOPT_H
|
||||
|
||||
/* Define if you have the <limits.h> header file. */
|
||||
#undef HAVE_LIMITS_H
|
||||
|
||||
/* Define if you have the <locale.h> header file. */
|
||||
#undef HAVE_LOCALE_H
|
||||
|
||||
/* Define if you have the <malloc.h> header file. */
|
||||
#undef HAVE_MALLOC_H
|
||||
|
||||
/* Define if you have the <ncurses.h> header file. */
|
||||
#undef HAVE_NCURSES_H
|
||||
|
||||
/* Define if you have the <nl_types.h> header file. */
|
||||
#undef HAVE_NL_TYPES_H
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
/* Define if you have the <termio.h> header file. */
|
||||
#undef HAVE_TERMIO_H
|
||||
|
||||
/* Define if you have the <termios.h> header file. */
|
||||
#undef HAVE_TERMIOS_H
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define if you have the i library (-li). */
|
||||
#undef HAVE_LIBI
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
1440
config.sub
vendored
Normal file
1440
config.sub
vendored
Normal file
File diff suppressed because it is too large
Load Diff
251
configure.in
251
configure.in
@@ -1,68 +1,199 @@
|
||||
# $Id$
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(nano.c)
|
||||
AM_INIT_AUTOMAKE(nano, 0.9.12-cvs)
|
||||
AM_INIT_AUTOMAKE(nano, 1.1.5)
|
||||
AM_CONFIG_HEADER(config.h:config.h.in)
|
||||
ALL_LINGUAS="es de fr it id fi"
|
||||
ALL_LINGUAS="es de fr it id fi hu ca cs gl uk ru sv no nl da pl"
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_ISC_POSIX
|
||||
NANO_AC_SYS_LARGEFILE
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(fcntl.h unistd.h malloc.h termios.h termio.h limits.h getopt.h)
|
||||
AC_CHECK_HEADERS(fcntl.h unistd.h malloc.h termios.h termio.h limits.h getopt.h regex.h)
|
||||
|
||||
dnl options
|
||||
AC_ARG_ENABLE(tiny,
|
||||
[ --enable-tiny Disables features for the sake of size
|
||||
[ --enable-tiny Disable features for the sake of size
|
||||
(currently disables detailed help and i18n)],
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(NANO_SMALL) tiny_support=yes
|
||||
AC_DEFINE(DISABLE_TABCOMP)
|
||||
AC_DEFINE(DISABLE_SPELLER)
|
||||
AC_DEFINE(DISABLE_HELP)
|
||||
AC_DEFINE(DISABLE_JUSTIFY)
|
||||
AC_DEFINE(DISABLE_BROWSER)
|
||||
AC_DEFINE(DISABLE_MOUSE)
|
||||
AC_DEFINE(DISABLE_OPERATINGDIR)
|
||||
fi])
|
||||
|
||||
AC_MSG_CHECKING(whether to use slang)
|
||||
AC_ARG_ENABLE(extra,
|
||||
[ --enable-extra Enable extra (optional) functions, including easter eggs],
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(NANO_EXTRA) extra_support=yes
|
||||
AC_DEFINE(ENABLE_MULTIBUFFER) multibuffer_support=yes
|
||||
AC_DEFINE(ENABLE_UNDO) undo_support=yes
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(undo,
|
||||
[ --enable-undo Enable undo support],
|
||||
[if test x$enableval = xyes && test x$tiny_support != xyes; then
|
||||
AC_DEFINE(ENABLE_UNDO) undo_support=yes
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(multibuffer,
|
||||
[ --enable-multibuffer Enable multiple file buffers; this is disabled if --enable-tiny is used],
|
||||
[if test x$enableval = xyes && test x$tiny_support != xyes; then
|
||||
AC_DEFINE(ENABLE_MULTIBUFFER) multibuffer_support=yes
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(nanorc,
|
||||
[ --enable-nanorc Enable use of .nanorc file],
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(ENABLE_NANORC) nanorc_support=yes
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(color,
|
||||
[ --enable-color Enable color and syntax highlighting],
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(ENABLE_NANORC) nanorc_support=yes
|
||||
AC_DEFINE(ENABLE_COLOR) color_support=yes
|
||||
AC_MSG_WARN([
|
||||
|
||||
***********************************************************************
|
||||
*** WARNING: Color support is currently BROKEN. Don't expect it to ***
|
||||
*** work AT ALL until more is implemented. ***
|
||||
***********************************************************************
|
||||
])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(tabcomp,
|
||||
[ --disable-tabcomp Disable tab completion code for a smaller binary],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_TABCOMP)
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(justify,
|
||||
[ --disable-justify Disable justify/unjustify function],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_JUSTIFY)
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(speller,
|
||||
[ --disable-speller Disable spell checker function],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_SPELLER)
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(help,
|
||||
[ --disable-help Disable help function (^G)],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_HELP)
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(browser,
|
||||
[ --disable-browser Disable mini file browser],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_BROWSER)
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(wrapping,
|
||||
[ --disable-wrapping Disable all wrapping of text (and -w flag)],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_WRAPPING)
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(mouse,
|
||||
[ --disable-mouse Disable mouse support (and -m flag)],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_MOUSE)
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(operatingdir,
|
||||
[ --disable-operatingdir Disable setting of operating directory (chroot of sorts)],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_OPERATINGDIR)
|
||||
fi])
|
||||
|
||||
AC_MSG_CHECKING([whether to use slang])
|
||||
CURSES_LIB_NAME=""
|
||||
AC_ARG_WITH(slang,
|
||||
[ --with-slang[=DIR] Use the slang library instead of curses],
|
||||
[ case "$with_slang" in
|
||||
yes)
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
AC_CHECK_HEADER(slcurses.h,
|
||||
AC_CHECK_LIB(slang, SLcurses_newwin,
|
||||
[AC_DEFINE(USE_SLANG) slang_support=yes
|
||||
CURSES_LIB="-lslang" CURSES_LIB_NAME=slang]),
|
||||
AC_MSG_ERROR([
|
||||
*** The header file slcurses.h was not found. If you wish to use
|
||||
*** slang support this header file is required. Please either
|
||||
*** install a version of slang that includes the slcurses.h file or
|
||||
*** do not call the configure script with --with-slang
|
||||
]))
|
||||
;;
|
||||
no)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
# Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
|
||||
# alternate readline path
|
||||
_ldflags=${LDFLAGS}
|
||||
_cppflags=${CPPFLAGS}
|
||||
|
||||
# Add additional search path
|
||||
LDFLAGS="-L$with_slang/lib $LDFLAGS"
|
||||
CPPFLAGS="-I$with_slang/include $CPPFLAGS"
|
||||
if test "$with_slang" != "yes"; then
|
||||
# Add additional search path
|
||||
LDFLAGS="-L$with_slang/lib $LDFLAGS"
|
||||
CPPFLAGS="-I$with_slang/include $CPPFLAGS"
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(slcurses.h,
|
||||
AC_CHECK_LIB(slang, SLcurses_newwin,
|
||||
[AC_DEFINE(USE_SLANG) slang_support=yes
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang"
|
||||
CURSES_LIB_NAME=slang],
|
||||
AC_MSG_ERROR([
|
||||
*** The slang library was not found or the version you have installed
|
||||
*** is incorrect.
|
||||
])),
|
||||
AC_MSG_CHECKING([for SLtt_initialize in -lslang])
|
||||
_libs=$LIBS
|
||||
LIBS="$LIBS -lslang"
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <slcurses.h>
|
||||
int main () { SLtt_initialize (NULL); return 0; }],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG)
|
||||
slang_support=yes
|
||||
if test "$with_slang" != "yes"; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang"
|
||||
else
|
||||
CURSES_LIB="-lslang"
|
||||
fi
|
||||
CURSES_LIB_NAME=slang], [
|
||||
AC_MSG_RESULT(no)
|
||||
# We might need the term library
|
||||
for termlib in ncurses curses termcap terminfo termlib; do
|
||||
AC_CHECK_LIB([${termlib}], tputs, [tcap="-l$termlib"])
|
||||
test -n "$tcap" && break
|
||||
done
|
||||
|
||||
AC_MSG_CHECKING([for SLtt_initialize in -lslang $tcap])
|
||||
LIBS="$LIBS $tcap"
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <slcurses.h>
|
||||
int main () { SLtt_initialize (NULL); return 0; }],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG)
|
||||
slang_support=yes
|
||||
if test "$with_slang" != "yes"; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang $tcap"
|
||||
else
|
||||
CURSES_LIB="-lslang $tcap"
|
||||
fi
|
||||
CURSES_LIB_NAME=slang], [
|
||||
AC_MSG_RESULT(no)
|
||||
# We might need the math library
|
||||
AC_MSG_CHECKING([for SLtt_initialize in -lslang $tcap -lm])
|
||||
LIBS="$LIBS -lm"
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <slcurses.h>
|
||||
int main () { SLtt_initialize (NULL); return 0; }],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG)
|
||||
slang_support=yes
|
||||
if test "$with_slang" != "yes"; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang $tcap -lm"
|
||||
else
|
||||
CURSES_LIB="-lslang $tcap -lm"
|
||||
fi
|
||||
CURSES_LIB_NAME=slang],
|
||||
[AC_MSG_RESULT(no)],
|
||||
AC_MSG_WARN([*** Can not use slang when cross-compiling]))],
|
||||
AC_MSG_WARN([*** Can not use slang when cross-compiling]))],
|
||||
AC_MSG_WARN([*** Can not use slang when cross-compiling])),
|
||||
AC_MSG_ERROR([
|
||||
*** The header file slcurses.h was not found. If you wish to use
|
||||
*** slang support this header file is required. Please either
|
||||
@@ -70,19 +201,23 @@ AC_ARG_WITH(slang,
|
||||
*** do not call the configure script with --with-slang
|
||||
]))
|
||||
|
||||
LDFLAGS=${_ldflags}
|
||||
test "${_libs+set}" = "set" && LIBS=$_libs
|
||||
|
||||
if test "$with_slang" != "yes"; then
|
||||
LDFLAGS=${_ldflags}
|
||||
fi
|
||||
;;
|
||||
esac])
|
||||
esac], [AC_MSG_RESULT(no)])
|
||||
|
||||
dnl Checks for functions
|
||||
AC_CHECK_FUNCS(snprintf vsnprintf)
|
||||
if test "x$ac_cv_func_snprintf" = "xno" -o "xac_cv_func_vsnprintf" = "xno"
|
||||
then
|
||||
AM_PATH_GLIB(1.2.4,,
|
||||
AC_MSG_ERROR([
|
||||
[AC_MSG_ERROR([
|
||||
*** snprintf() and/or vsnprintf() not found. GLIB not found either.
|
||||
*** You need both snprintf() and vsnprintf(). Alternatively you can
|
||||
*** install the GLIB library which can be found at ftp://ftp.gtk.org/.]),
|
||||
*** install the GLIB library which can be found at ftp://ftp.gtk.org/.])],
|
||||
glib)
|
||||
glib_cflags=`$GLIB_CONFIG --cflags glib`
|
||||
glib_libs=`$GLIB_CONFIG --libs glib`
|
||||
@@ -101,19 +236,23 @@ dnl Checks for libraries.
|
||||
if eval "test x$CURSES_LIB_NAME = x"
|
||||
then
|
||||
AC_CHECK_HEADERS(curses.h ncurses.h)
|
||||
AC_CHECK_LIB(ncurses, tgetent,[CURSES_LIB="-lncurses" CURSES_LIB_NAME=ncurses
|
||||
dnl Only ncurses seems to have a working TABSIZE function.
|
||||
AC_DEFINE(HAVE_TABSIZE)])
|
||||
AC_CHECK_LIB(ncurses, tgetent, [CURSES_LIB="-lncurses" CURSES_LIB_NAME=ncurses])
|
||||
fi
|
||||
|
||||
if eval "test x$CURSES_LIB_NAME = x"
|
||||
then
|
||||
AC_CHECK_LIB(curses, tgetent, CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses)
|
||||
AC_CHECK_LIB(curses, tgetent, [CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses])
|
||||
fi
|
||||
|
||||
# Fallback for PDCurses and less useful curses libs...
|
||||
if eval "test x$CURSES_LIB_NAME = x"
|
||||
then
|
||||
AC_CHECK_LIB(curses, initscr, [CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses])
|
||||
fi
|
||||
|
||||
if eval "test x$CURSES_LIB_NAME = x"
|
||||
then
|
||||
AC_CHECK_LIB(termcap, tgetent, CURSES_LIB="-ltermcap" CURSES_LIB_NAME=termcap)
|
||||
AC_CHECK_LIB(termcap, tgetent, [CURSES_LIB="-ltermcap" CURSES_LIB_NAME=termcap])
|
||||
fi
|
||||
|
||||
if eval "test x$CURSES_LIB_NAME = x"
|
||||
@@ -123,11 +262,29 @@ then
|
||||
*** distribution from ftp://ftp.gnu.org/pub/gnu/ncurses if you get
|
||||
*** errors compiling nano.])
|
||||
else
|
||||
AC_MSG_RESULT("Using $CURSES_LIB_NAME as the termcap library")
|
||||
AC_MSG_RESULT([Using $CURSES_LIB_NAME as the termcap library])
|
||||
fi
|
||||
|
||||
|
||||
AC_CHECK_LIB($CURSES_LIB_NAME, wresize, AC_DEFINE(HAVE_WRESIZE))
|
||||
AC_CHECK_LIB([$CURSES_LIB_NAME], use_default_colors, [AC_DEFINE(HAVE_USE_DEFAULT_COLORS)])
|
||||
if test x$slang_support != xyes; then
|
||||
AC_CHECK_LIB([$CURSES_LIB_NAME], wresize, [AC_DEFINE(HAVE_WRESIZE)])
|
||||
AC_CHECK_LIB([$CURSES_LIB_NAME], resizeterm, [AC_DEFINE(HAVE_RESIZETERM)])
|
||||
|
||||
# Taken from aumix (can't tell form the variable name?)
|
||||
AC_CACHE_CHECK([for private member _use_keypad in WINDOW],
|
||||
aumix_cv_struct_window_usekeypad,
|
||||
[AC_TRY_COMPILE([#ifdef HAVE_NCURSES_H
|
||||
#include <ncurses.h>
|
||||
#else
|
||||
#include <curses.h>
|
||||
#endif], [WINDOW w; w._use_keypad;],
|
||||
aumix_cv_struct_window_usekeypad=yes, aumix_cv_struct_window_usekeypad=no)])
|
||||
|
||||
if test $aumix_cv_struct_window_usekeypad = yes; then
|
||||
AC_DEFINE(HAVE_USEKEYPAD)
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Parse any configure options
|
||||
|
||||
@@ -147,6 +304,6 @@ then
|
||||
fi
|
||||
|
||||
dnl i18n stuff - pretty incomplete for now
|
||||
AM_GNU_GETTEXT
|
||||
NANO_AM_GNU_GETTEXT
|
||||
|
||||
AC_OUTPUT([Makefile intl/Makefile po/Makefile.in])
|
||||
|
||||
340
cut.c
340
cut.c
@@ -1,10 +1,11 @@
|
||||
/* $Id$ */
|
||||
/**************************************************************************
|
||||
* cut.c *
|
||||
* *
|
||||
* Copyright (C) 1999 Chris Allegretta *
|
||||
* Copyright (C) 1999-2002 Chris Allegretta *
|
||||
* This program 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 1, or (at your option) *
|
||||
* the Free Software Foundation; either version 2, or (at your option) *
|
||||
* any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
@@ -18,10 +19,11 @@
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "config.h"
|
||||
#include "proto.h"
|
||||
#include "nano.h"
|
||||
|
||||
@@ -37,15 +39,12 @@ static filestruct *cutbottom = NULL; /* Pointer to end of cutbuffer */
|
||||
|
||||
void add_to_cutbuffer(filestruct * inptr)
|
||||
{
|
||||
filestruct *tmp;
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, _("add_to_cutbuffer called with inptr->data = %s\n"),
|
||||
inptr->data);
|
||||
#endif
|
||||
|
||||
totsize -= strlen(inptr->data);
|
||||
tmp = cutbuffer;
|
||||
if (cutbuffer == NULL) {
|
||||
cutbuffer = inptr;
|
||||
inptr->prev = NULL;
|
||||
@@ -59,28 +58,76 @@ void add_to_cutbuffer(filestruct * inptr)
|
||||
}
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
/* Cut a marked segment instead of a whole line. Only called from
|
||||
do_cut_text().
|
||||
destructive is whether to actually modify the file structure, if not then
|
||||
just copy the buffer into cutbuffer and don't pull it from the file */
|
||||
|
||||
void cut_marked_segment(filestruct * top, int top_x, filestruct * bot,
|
||||
int bot_x)
|
||||
int bot_x, int destructive)
|
||||
{
|
||||
filestruct *tmp, *next;
|
||||
filestruct *tmp, *next, *botcopy;
|
||||
char *tmpstr;
|
||||
int newsize;
|
||||
|
||||
/* Special case for cutting part of one line */
|
||||
if (top == bot) {
|
||||
int swap;
|
||||
|
||||
tmp = copy_node(top);
|
||||
newsize = abs(bot_x - top_x) + 1;
|
||||
tmpstr = charalloc(newsize + 1);
|
||||
|
||||
/* Make top_x always be before bot_x */
|
||||
if (top_x > bot_x) {
|
||||
swap = top_x;
|
||||
top_x = bot_x;
|
||||
bot_x = swap;
|
||||
}
|
||||
|
||||
strncpy(tmpstr, &top->data[top_x], newsize);
|
||||
|
||||
if (destructive) {
|
||||
memmove(&top->data[top_x], &top->data[bot_x],
|
||||
strlen(&top->data[bot_x]) + 1);
|
||||
align(&top->data);
|
||||
current_x = top_x;
|
||||
update_cursor();
|
||||
}
|
||||
tmpstr[newsize - 1] = 0;
|
||||
tmp->data = tmpstr;
|
||||
add_to_cutbuffer(tmp);
|
||||
dump_buffer(cutbuffer);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* Set up the beginning of the cutbuffer */
|
||||
tmp = copy_node(top);
|
||||
tmpstr = nmalloc(strlen(&top->data[top_x]) + 1);
|
||||
tmpstr = charalloc(strlen(&top->data[top_x]) + 1);
|
||||
strcpy(tmpstr, &top->data[top_x]);
|
||||
free(tmp->data);
|
||||
tmp->data = tmpstr;
|
||||
|
||||
/* Chop off the end of the first line */
|
||||
tmpstr = nmalloc(top_x + 1);
|
||||
tmpstr = charalloc(top_x + 1);
|
||||
strncpy(tmpstr, top->data, top_x);
|
||||
free(top->data);
|
||||
top->data = tmpstr;
|
||||
|
||||
if (destructive) {
|
||||
free(top->data);
|
||||
top->data = tmpstr;
|
||||
}
|
||||
|
||||
do {
|
||||
next = tmp->next;
|
||||
add_to_cutbuffer(tmp);
|
||||
if (destructive)
|
||||
add_to_cutbuffer(tmp);
|
||||
else {
|
||||
filestruct *tmpcopy = NULL;
|
||||
|
||||
tmpcopy = copy_node(tmp);
|
||||
add_to_cutbuffer(tmpcopy);
|
||||
}
|
||||
totlines--;
|
||||
totsize--; /* newline (add_to_cutbuffer doesn't count newlines) */
|
||||
tmp = next;
|
||||
@@ -90,41 +137,57 @@ void cut_marked_segment(filestruct * top, int top_x, filestruct * bot,
|
||||
dump_buffer(cutbuffer);
|
||||
if (next == NULL)
|
||||
return;
|
||||
|
||||
/* Now, paste bot[bot_x] into top[top_x] */
|
||||
tmpstr = nmalloc(strlen(top->data) + strlen(&bot->data[bot_x]));
|
||||
strncpy(tmpstr, top->data, top_x);
|
||||
strcpy(&tmpstr[top_x], &bot->data[bot_x]);
|
||||
free(top->data);
|
||||
top->data = tmpstr;
|
||||
if (destructive) {
|
||||
|
||||
bot->data[bot_x] = 0;
|
||||
align(&bot->data);
|
||||
next = bot->next;
|
||||
tmpstr = charalloc(top_x + strlen(&bot->data[bot_x]) + 1);
|
||||
strncpy(tmpstr, top->data, top_x);
|
||||
strcpy(&tmpstr[top_x], &bot->data[bot_x]);
|
||||
free(top->data);
|
||||
top->data = tmpstr;
|
||||
|
||||
/* We explicitly don't decrement totlines here because we don't snarf
|
||||
* up a newline when we're grabbing the last line of the mark. For
|
||||
* the same reason we don't do an extra totsize decrement */
|
||||
|
||||
add_to_cutbuffer(bot);
|
||||
top->next = next;
|
||||
if (next != NULL)
|
||||
next->prev = top;
|
||||
|
||||
dump_buffer(cutbuffer);
|
||||
renumber(top);
|
||||
current = top;
|
||||
current_x = top_x;
|
||||
|
||||
/* If we're hitting the end of the buffer we should clean that up. */
|
||||
if (bot == filebot) {
|
||||
if (next != NULL) {
|
||||
filebot = next;
|
||||
} else {
|
||||
filebot = top;
|
||||
}
|
||||
/* We explicitly don't decrement totlines here because we don't snarf
|
||||
* up a newline when we're grabbing the last line of the mark. For
|
||||
* the same reason, we don't do an extra totsize decrement. */
|
||||
}
|
||||
if (top->lineno < edittop->lineno)
|
||||
edit_update(top);
|
||||
|
||||
/* I honestly do not know why this is needed. After many hours of
|
||||
using gdb on an OpenBSD box, I can honestly say something is
|
||||
screwed somewhere. Not doing this causes update_line to annihilate
|
||||
the last line copied into the cutbuffer when the mark is set ?!?!? */
|
||||
botcopy = copy_node(bot);
|
||||
null_at(&botcopy->data, bot_x);
|
||||
next = botcopy->next;
|
||||
add_to_cutbuffer(botcopy);
|
||||
|
||||
|
||||
if (destructive) {
|
||||
free(bot);
|
||||
|
||||
top->next = next;
|
||||
if (next != NULL)
|
||||
next->prev = top;
|
||||
|
||||
dump_buffer(cutbuffer);
|
||||
renumber(top);
|
||||
current = top;
|
||||
current_x = top_x;
|
||||
|
||||
/* If we're hitting the end of the buffer, we should clean that up. */
|
||||
if (bot == filebot) {
|
||||
if (next != NULL) {
|
||||
filebot = next;
|
||||
} else {
|
||||
filebot = top;
|
||||
if (top_x > 0)
|
||||
new_magicline();
|
||||
}
|
||||
}
|
||||
if (top->lineno < edittop->lineno)
|
||||
edit_update(top, CENTER);
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -132,60 +195,100 @@ int do_cut_text(void)
|
||||
{
|
||||
filestruct *tmp, *fileptr = current;
|
||||
#ifndef NANO_SMALL
|
||||
char *tmpstr;
|
||||
int newsize;
|
||||
int dontupdate = 0;
|
||||
int cuttingtoend = 0;
|
||||
#endif
|
||||
|
||||
|
||||
check_statblank();
|
||||
if (fileptr == NULL || fileptr->data == NULL)
|
||||
return 0;
|
||||
|
||||
tmp = fileptr->next;
|
||||
|
||||
if (!ISSET(KEEP_CUTBUFFER) || ISSET(MARK_ISSET)) {
|
||||
if (!ISSET(KEEP_CUTBUFFER)) {
|
||||
free_filestruct(cutbuffer);
|
||||
cutbuffer = NULL;
|
||||
|
||||
marked_cut = 0;
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, _("Blew away cutbuffer =)\n"));
|
||||
#endif
|
||||
}
|
||||
#ifndef NANO_SMALL
|
||||
if (ISSET(MARK_ISSET)) {
|
||||
if (current->lineno == mark_beginbuf->lineno) {
|
||||
tmp = copy_node(current);
|
||||
newsize = abs(strlen(¤t->data[mark_beginx]) -
|
||||
strlen(¤t->data[current_x]));
|
||||
|
||||
tmpstr = nmalloc(newsize);
|
||||
if (current_x < mark_beginx) {
|
||||
strncpy(tmpstr, ¤t->data[current_x], newsize);
|
||||
memmove(¤t->data[current_x],
|
||||
¤t->data[mark_beginx],
|
||||
strlen(¤t->data[mark_beginx] - newsize));
|
||||
} else {
|
||||
strncpy(tmpstr, ¤t->data[mark_beginx], newsize);
|
||||
memmove(¤t->data[mark_beginx],
|
||||
¤t->data[current_x],
|
||||
strlen(¤t->data[current_x] - newsize));
|
||||
current_x = mark_beginx;
|
||||
update_cursor();
|
||||
/* Must let cutbuffer get blown away first before we do this... */
|
||||
if (fileptr == filebot && !ISSET(MARK_ISSET))
|
||||
return 0;
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
if (ISSET(CUT_TO_END) && !ISSET(MARK_ISSET)) {
|
||||
if (current_x == strlen(current->data)) {
|
||||
|
||||
/* If the line is empty and we didn't just cut a non-blank
|
||||
line, create a dummy line and add it to the cutbuffer */
|
||||
if (marked_cut != 1 && current->next != filebot) {
|
||||
|
||||
filestruct *junk;
|
||||
|
||||
junk = NULL;
|
||||
junk = make_new_node(current);
|
||||
junk->data = nmalloc(1 * sizeof (char));
|
||||
junk->data[0] = 0;
|
||||
|
||||
add_to_cutbuffer(junk);
|
||||
dump_buffer(cutbuffer);
|
||||
|
||||
}
|
||||
tmpstr[newsize] = 0;
|
||||
tmp->data = tmpstr;
|
||||
add_to_cutbuffer(tmp);
|
||||
dump_buffer(cutbuffer);
|
||||
align(¤t->data);
|
||||
} else if (current->lineno < mark_beginbuf->lineno)
|
||||
|
||||
do_delete();
|
||||
SET(KEEP_CUTBUFFER);
|
||||
marked_cut = 2;
|
||||
return 1;
|
||||
} else {
|
||||
SET(MARK_ISSET);
|
||||
SET(KEEP_CUTBUFFER);
|
||||
|
||||
mark_beginx = strlen(current->data);
|
||||
mark_beginbuf = current;
|
||||
cuttingtoend = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (ISSET(MARK_ISSET)) {
|
||||
if (current->lineno <= mark_beginbuf->lineno) {
|
||||
/* Don't do_update and move the screen position if the marked
|
||||
area lies entirely within the screen buffer */
|
||||
if (current->lineno == mark_beginbuf->lineno
|
||||
|| (current->lineno >= edittop->lineno
|
||||
&& mark_beginbuf->lineno <= editbot->lineno))
|
||||
dontupdate = 1;
|
||||
|
||||
cut_marked_segment(current, current_x, mark_beginbuf,
|
||||
mark_beginx);
|
||||
else
|
||||
mark_beginx, 1);
|
||||
}
|
||||
else {
|
||||
/* Same as above, easier logic since we know it's a multi-line
|
||||
cut and mark_beginbuf is before current */
|
||||
if (mark_beginbuf->lineno >= edittop->lineno
|
||||
&& current->lineno <= editbot->lineno)
|
||||
dontupdate = 1;
|
||||
|
||||
cut_marked_segment(mark_beginbuf, mark_beginx, current,
|
||||
current_x);
|
||||
current_x, 1);
|
||||
}
|
||||
|
||||
|
||||
placewewant = xplustabs();
|
||||
UNSET(MARK_ISSET);
|
||||
|
||||
marked_cut = 1;
|
||||
set_modified();
|
||||
edit_update(current);
|
||||
if (dontupdate || cuttingtoend) {
|
||||
fix_editbot();
|
||||
edit_refresh();
|
||||
} else
|
||||
edit_update(current, CENTER);
|
||||
|
||||
return 1;
|
||||
#else
|
||||
if (0) {
|
||||
@@ -197,15 +300,15 @@ int do_cut_text(void)
|
||||
tmp = fileptr;
|
||||
fileage = fileptr;
|
||||
add_to_cutbuffer(fileptr->prev);
|
||||
totsize--; /* get the newline */
|
||||
totsize--; /* get the newline */
|
||||
totlines--;
|
||||
fileptr->prev = NULL;
|
||||
edit_update(fileage);
|
||||
current = fileptr;
|
||||
edit_update(fileage, CENTER);
|
||||
} else {
|
||||
add_to_cutbuffer(fileptr);
|
||||
fileage = make_new_node(NULL);
|
||||
fileage->data = nmalloc(1);
|
||||
fileage->data = charalloc(1);
|
||||
fileage->data[0] = '\0';
|
||||
current = fileage;
|
||||
}
|
||||
@@ -217,20 +320,10 @@ int do_cut_text(void)
|
||||
(fileptr->next)->prev = fileptr->prev;
|
||||
current = fileptr->next;
|
||||
totlines--;
|
||||
totsize--; /* get the newline */
|
||||
} else {
|
||||
/* we're deleteing the last line
|
||||
and replacing it with a dummy line,
|
||||
so totlines is the same */
|
||||
tmp = fileptr->prev;
|
||||
tmp->next = make_new_node(tmp);
|
||||
tmp = tmp->next;
|
||||
tmp->data = nmalloc(1);
|
||||
strcpy(tmp->data, "");
|
||||
current = tmp;
|
||||
filebot = tmp;
|
||||
totsize--; /* get the newline */
|
||||
}
|
||||
|
||||
/* No longer an else here, because we never get here anymore...
|
||||
No need to cut the magic line, as it's empty */
|
||||
add_to_cutbuffer(fileptr);
|
||||
}
|
||||
|
||||
@@ -257,10 +350,12 @@ int do_uncut_text(void)
|
||||
filestruct *tmp = current, *fileptr = current, *newbuf, *newend;
|
||||
#ifndef NANO_SMALL
|
||||
char *tmpstr, *tmpstr2;
|
||||
filestruct *hold = current;
|
||||
#endif
|
||||
int i;
|
||||
|
||||
wrap_reset();
|
||||
check_statblank();
|
||||
if (cutbuffer == NULL || fileptr == NULL)
|
||||
return 0; /* AIEEEEEEEEEEEE */
|
||||
|
||||
@@ -272,11 +367,11 @@ int do_uncut_text(void)
|
||||
|
||||
/* Hook newbuf into fileptr */
|
||||
#ifndef NANO_SMALL
|
||||
if (marked_cut == 1) {
|
||||
if (marked_cut) {
|
||||
/* If there's only one line in the cutbuffer */
|
||||
if (cutbuffer->next == NULL) {
|
||||
tmpstr =
|
||||
nmalloc(strlen(current->data) + strlen(cutbuffer->data) +
|
||||
charalloc(strlen(current->data) + strlen(cutbuffer->data) +
|
||||
1);
|
||||
strncpy(tmpstr, current->data, current_x);
|
||||
strcpy(&tmpstr[current_x], cutbuffer->data);
|
||||
@@ -285,20 +380,21 @@ int do_uncut_text(void)
|
||||
current->data = tmpstr;
|
||||
current_x += strlen(cutbuffer->data);
|
||||
totsize += strlen(cutbuffer->data);
|
||||
if (strlen(cutbuffer->data) == 0)
|
||||
totlines++;
|
||||
|
||||
placewewant = xplustabs();
|
||||
update_cursor();
|
||||
renumber(current);
|
||||
} else { /* yuck -- no kidding! */
|
||||
tmp = current->next;
|
||||
/* New beginning */
|
||||
tmpstr = nmalloc(current_x + strlen(newbuf->data) + 1);
|
||||
tmpstr = charalloc(current_x + strlen(newbuf->data) + 1);
|
||||
strncpy(tmpstr, current->data, current_x);
|
||||
strcpy(&tmpstr[current_x], newbuf->data);
|
||||
totsize += strlen(newbuf->data) + strlen(newend->data) + 1;
|
||||
|
||||
/* New end */
|
||||
tmpstr2 = nmalloc(strlen(newend->data) +
|
||||
tmpstr2 = charalloc(strlen(newend->data) +
|
||||
strlen(¤t->data[current_x]) + 1);
|
||||
strcpy(tmpstr2, newend->data);
|
||||
strcat(tmpstr2, ¤t->data[current_x]);
|
||||
@@ -317,13 +413,18 @@ int do_uncut_text(void)
|
||||
newend->next = tmp;
|
||||
|
||||
/* If tmp isn't null, we're in the middle: update the
|
||||
* prev pointer. If it IS null, we're at the end, update
|
||||
* prev pointer. If it IS null, we're at the end; update
|
||||
* the filebot pointer */
|
||||
|
||||
if (tmp != NULL)
|
||||
tmp->prev = newend;
|
||||
else
|
||||
else {
|
||||
/* Fix the editbot pointer too */
|
||||
if (editbot == filebot)
|
||||
editbot = newend;
|
||||
filebot = newend;
|
||||
new_magicline();
|
||||
}
|
||||
|
||||
/* Now why don't we update the totsize also */
|
||||
for (tmp = current->next; tmp != newend; tmp = tmp->next)
|
||||
@@ -331,17 +432,42 @@ int do_uncut_text(void)
|
||||
|
||||
i = editbot->lineno;
|
||||
|
||||
renumber(current);
|
||||
|
||||
current = newend;
|
||||
if (i <= newend->lineno)
|
||||
edit_update(current);
|
||||
if (i < newend->lineno) {
|
||||
edit_update(current, CENTER);
|
||||
}
|
||||
else {
|
||||
edit_refresh();
|
||||
}
|
||||
}
|
||||
|
||||
/* If marked cut == 2, that means that we're doing a cut to end
|
||||
and we don't want anything else on the line, so we have to
|
||||
screw up all the work we just did and separate the line. There
|
||||
must be a better way to do this, but not at 1AM on a work night. */
|
||||
|
||||
if (marked_cut == 2) {
|
||||
tmp = make_new_node(current);
|
||||
tmp->data = charalloc(strlen(¤t->data[current_x]) + 1);
|
||||
strcpy(tmp->data, ¤t->data[current_x]);
|
||||
splice_node(current, tmp, current->next);
|
||||
null_at(¤t->data, current_x);
|
||||
current = current->next;
|
||||
current_x = 0;
|
||||
placewewant = 0;
|
||||
|
||||
/* Extra line added, update stuff */
|
||||
totlines++;
|
||||
totsize++;
|
||||
}
|
||||
/* Renumber from BEFORE where we pasted ;) */
|
||||
renumber(hold);
|
||||
|
||||
dump_buffer(fileage);
|
||||
dump_buffer(cutbuffer);
|
||||
set_modified();
|
||||
edit_refresh();
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
return 0;
|
||||
#else
|
||||
if (0) {
|
||||
@@ -370,8 +496,12 @@ int do_uncut_text(void)
|
||||
|
||||
i = editbot->lineno;
|
||||
renumber(newbuf);
|
||||
if (i < newend->lineno)
|
||||
edit_update(fileptr);
|
||||
if (i < newend->lineno) {
|
||||
edit_update(fileptr, CENTER);
|
||||
}
|
||||
else {
|
||||
edit_refresh();
|
||||
}
|
||||
|
||||
dump_buffer_reverse(fileptr);
|
||||
|
||||
|
||||
707
faq.html
Normal file
707
faq.html
Normal file
@@ -0,0 +1,707 @@
|
||||
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
|
||||
<html>
|
||||
<title>The GNU nano editor FAQ</title>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Mozilla/4.73 [en] (X11; U; Linux 2.2.16 i586) [Netscape]">
|
||||
</head>
|
||||
<body text="#000000" bgcolor="#FFFFFF" link="#0000EF" vlink="#51188E" alink="#FF0000">
|
||||
|
||||
<h1>
|
||||
<font color="#CC0000">The nano FAQ</font></h1>
|
||||
<h2>
|
||||
<font color="#330000">Table of Contents</font></h2>
|
||||
|
||||
<h2>
|
||||
<font color="#330000"><a href="#1">1. General</a></font></h2>
|
||||
|
||||
<blockquote><font color="#330000"><a href="#1.1">1.1 About this FAQ.</a></font>
|
||||
<br><font color="#330000"><a href="#1.2">1.2. How do I contribute to it?</a></font>
|
||||
<br><font color="#330000"><a href="#1.3">1.3. What is GNU nano?</a></font>
|
||||
<br><font color="#330000"><a href="#1.4">1.4. What is the history behind
|
||||
nano?</a></font>
|
||||
<br><font color="#330000"><a href="#1.5">1.5. Why the name change from
|
||||
TIP?</a></font>
|
||||
<br><font color="#330000"><a href="#1.6">1.6. What is the current version
|
||||
of nano?</a></font>
|
||||
<br><font color="#330000"><a href="#1.7">1.7. I want to read the manpage
|
||||
without having to download the program!</a></font></blockquote>
|
||||
|
||||
<h2>
|
||||
<font color="#330000"><a href="#2">2. Where to get GNU
|
||||
nano</a></font></h2>
|
||||
|
||||
<blockquote><font color="#330000"><a href="#2.1">2.1. FTP and WWW sites
|
||||
that carry nano.</a></font>
|
||||
<br><font color="#330000"><a href="#2.2">2.2. Redhat and derivatives (.rpm)
|
||||
packages.</a></font>
|
||||
<br><font color="#330000"><a href="#2.3">2.3. Debian (.deb) packages.</a></font>
|
||||
<br><font color="#330000"><a href="#2.4">2.4. By CVS (for the brave).</a></font></blockquote>
|
||||
|
||||
<h2>
|
||||
<font color="#330000"><a href="#3">3. Installation and Configuration</a></font></h2>
|
||||
|
||||
<blockquote><font color="#330000"><a href="#3.1">3.1. How do install the
|
||||
RPM or DEB package?</a></font>
|
||||
<br><font color="#330000"><a href="#3.2">3.2. Compiling from source: WHAT
|
||||
THE HECK DO I DO NOW?</a></font>
|
||||
<br><font color="#330000"><a href="#3.3">3.3. Why does everything go into
|
||||
/usr/local?</a></font>
|
||||
<br><font color="#330000"><a href="#3.4">3.4. I get errors about 'bindtextdomain',
|
||||
'gettext' and/or 'gettextdomain'. What can I do about it?</a></font>
|
||||
<br><font color="#330000"><a href="#3.5">3.5. Nano should automatically
|
||||
run strip on the binary when installing it!</a></font>
|
||||
<br><font color="#330000"><a href="#3.6">3.6. How can I make the
|
||||
executable smaller? This is too bloated!</a></font>
|
||||
<br><font color="#330000"><a href="#3.7">3.7. Tell me more about this
|
||||
multibuffer stuff!</a></font>
|
||||
<br><font color="#330000"><a href="#3.8">3.8. How do I make a .nanorc file
|
||||
that nano will read when I start it?</a></font></blockquote>
|
||||
|
||||
<h2>
|
||||
<font color="#330000"><a href="#4">4. Running</a></font></h2>
|
||||
|
||||
<blockquote><font color="#330000"><a href="#4.1">4.1. Ack! My backspace/delete/enter/double
|
||||
bucky/meta key doesn't seem to work! What can I do?</a></font>
|
||||
<br><font color="#330000"><a href="#4.2">4.2. Nano crashes when I type
|
||||
<insert keystroke here>!</a></font>
|
||||
<br><font color="#330000"><a href="#4.3">4.3. Nano crashes when I resize
|
||||
my window. How can I fix that?</a></font>
|
||||
<br><font color="#330000"><a href="#4.4">4.4. Why does nano show ^\
|
||||
in the shortcut list instead of ^J?</a></font>
|
||||
<br><font color="#330000"><a href="#4.5">4.5. When I type in a
|
||||
search string, the string I last searched for is already in front of
|
||||
my cursor! What happened?!</a></font>
|
||||
<br><font color="#330000"><a href="#4.6">4.6. I get the message "NumLock
|
||||
glitch detected. Keypad will malfunction with NumLock off." What
|
||||
gives?</a></font>
|
||||
<br><font color="#330000"><a href="#4.7">4.7. How do I make nano my
|
||||
default editor (in Pine, mutt, etc.)?</a></font></blockquote>
|
||||
|
||||
<h2>
|
||||
<font color="#330000"><a href="#5">5. Internationalization</a></font></h2>
|
||||
|
||||
<blockquote><font color="#330000"><a href="#5.1">5.1. There's no translation
|
||||
for my language!</a></font>
|
||||
<br><font color="#330000"><a href="#5.2">5.2. I don't like the translation
|
||||
for <x> in my language. How can I fix it?</a></font></blockquote>
|
||||
|
||||
<h2>
|
||||
<font color="#330000"><a href="#6">6. Advocacy and Licensing</a></font></h2>
|
||||
|
||||
<blockquote><font color="#330000"><a href="#6.1">6.1. Why should I use
|
||||
nano instead of Pico?</a></font>
|
||||
<br><font color="#330000"><a href="#6.2">6.2. Why should I use Pico instead
|
||||
of nano?</a></font>
|
||||
<br><font color="#330000"><a href="#6.3">6.3. What is so bad about the
|
||||
Pine license?</a></font>
|
||||
<br><font color="#330000"><a href="#6.4">6.4. Okay, well what mail program
|
||||
should I use then?</a></font>
|
||||
<br><font color="#330000"><a href="#6.5">6.5. Why doesn't UW simply change
|
||||
their license?</a></font>
|
||||
<br><font color="#330000"><a href="#6.6">6.6. What if tomorrow UW changes
|
||||
the license to be truly Free Software?</a></font></blockquote>
|
||||
|
||||
<h2>
|
||||
<font color="#330000"><a href="#7">7. Miscellaneous</a></font></h2>
|
||||
|
||||
<blockquote><font color="#330000"><a href="#7.1">7.1. Nano related mailing
|
||||
lists.</a></font>
|
||||
<br><font color="#330000"><a href="#7.2">7.2. I want to send the development
|
||||
team a big load of cash (or just a thank you).</a></font>
|
||||
<br><font color="#330000"><a href="#7.3">7.3. How do I submit a patch?</a></font>
|
||||
<br><font color="#330000"><a href="#7.4">7.4. How do I join the development
|
||||
team?</a></font>
|
||||
<br><font color="#330000"><a href="#7.5">7.5. Can I have CVS write access?</a></font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a href="#8">8. ChangeLog</a></h2>
|
||||
|
||||
<hr WIDTH="100%">
|
||||
<br>
|
||||
<h1>
|
||||
<a NAME="1"></a><font color="#330000">1. General</font></h1>
|
||||
|
||||
<h2>
|
||||
<a NAME="1.1"></a><font color="#330000">1.1 About this FAQ.</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">This FAQ was written and is maintained
|
||||
by Chris Allegretta <<a href="mailto:chrisa@asty.org">chrisa@asty.org</a>>,
|
||||
who also happens to be the creator of nano. Maybe someone else
|
||||
will volunteer to maintain this FAQ someday, who knows...</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="1.2"></a><font color="#330000">1.2. How do I contribute to it?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Your best bet is to send it to the nano
|
||||
email address, <a
|
||||
href="mailto:nano@nano-editor.org">nano@nano-editor.org</a> and if
|
||||
it is useful enough it will be included in future versions.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="1.3"></a><font color="#330000">1.3. What is GNU nano?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">GNU Nano is designed to be a free
|
||||
replacement for the Pico text editor, part of the Pine email suite from <a
|
||||
href="http://www.washington.edu/pine">The University of
|
||||
Washington</a>. It aims to "emulate Pico as closely as possible and
|
||||
perhaps include extra functionality.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="1.4"></a><font color="#330000">1.4. What is the history behind
|
||||
nano?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Funny you should ask!</font>
|
||||
<p><b><font color="#330000">In the beginning...</font></b>
|
||||
<p><font color="#330000">For years Pine was THE program used to read email
|
||||
on a Unix system. The Pico text editor is the portion of the program
|
||||
one would use to compose his or her mail messages. Many beginners
|
||||
to Unix flocked to Pico and Pine because of their well organized, easy
|
||||
to use interfaces. With the proliferation of GNU/Linux in the mid to
|
||||
late 90's, many University students became intimately familiar with the
|
||||
strengths (and weaknesses) of Pine and Pico.</font>
|
||||
<p><b><font color="#330000">Then came Debian...</font></b>
|
||||
<p><font color="#330000">The <a href="http://www.debian.org">Debian GNU/Linux</a>
|
||||
distribution, known for its strict standards in distributing truly "free"
|
||||
software (i.e. had no restrictions on redistribution), would not include
|
||||
a binary package for Pine or Pico. Many people had a serious dilemma:
|
||||
they loved these programs, but they were not truly free software in the
|
||||
<a href="http://www.gnu.org/philosophy/free-sw.html">GNU</a>
|
||||
sense of the word.</font>
|
||||
<p><b><font color="#330000">The event...</font></b>
|
||||
<p><font color="#330000">It was in late 1999 when Chris Allegretta (our
|
||||
hero) was yet again complaining to himself about the less-than-perfect
|
||||
license Pico was distributed under, the 1000 makefiles that came with
|
||||
it and how just a few small improvements could make it the Best Editor
|
||||
in the World (TM). Having been a convert from Slackware to Debian,
|
||||
he missed having a simple binary package that included Pine and Pico, and
|
||||
had grown tired of downloading them himself.</font>
|
||||
<p><font color="#330000">Finally something snapped inside and Chris coded
|
||||
and hacked like a madman for many hours straight one weekend to make a
|
||||
(barely usable) Pico clone, at the time called TIP (Tip Isn't Pico).
|
||||
The program could not be invoked without a filename, could not save files,
|
||||
had no help menu, spell checker, and so forth. But over time it improved,
|
||||
and with the help of a few great coders it matured to the (hopefully) stable
|
||||
state it is today.
|
||||
<p><font color="#330000">In February 2001, nano has been declared an
|
||||
official GNU program by Richard Stallman. Nano also reached it's first
|
||||
production release on March 22, 2001.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="1.5"></a><font color="#330000">1.5. Why the name change from TIP?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">On January 10, 2000, TIP was officially
|
||||
renamed to nano because of a namespace conflict with another program called
|
||||
'tip'. The original 'tip' program "establishes a full duplex terminal
|
||||
connection to a remote host", and was included with many older Unix systems
|
||||
(and newer ones like Solaris). The conflict was not noticed at first because
|
||||
there is no 'tip' utility included with most GNU/Linux distributions (where
|
||||
nano was developed).</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="1.6"></a><font color="#330000">1.6 What is the current version
|
||||
of nano?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">The current version of nano *should*
|
||||
be 1.1.5. Of course you should always check the nano homepage to
|
||||
see what the latest and greatest version is.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="1.7"></a><font color="#330000">1.7. I want to read the man page
|
||||
without having to download the program!</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Jeez, demanding, aren't we?
|
||||
Okay, look <a href="http://www.nano-editor.org/dist/nano.1.html">here</a>.</font></blockquote>
|
||||
|
||||
<hr WIDTH="100%">
|
||||
<h1>
|
||||
<a NAME="2"></a><font color="#330000">2. Where to get GNU nano</font></h1>
|
||||
|
||||
<h2>
|
||||
<a NAME="2.1"></a><font color="#330000">2.1. FTP and WWW sites that carry
|
||||
nano.</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">The nano distribution can be downloaded
|
||||
at the following fine web and ftp sites:</font>
|
||||
<ul>
|
||||
<li>
|
||||
<font color="#330000"><a href="http://www.nano-editor.org/dist">http://www.nano-editor.org/dist</a></font></li>
|
||||
|
||||
<li>
|
||||
<font color="#330000"><a href="http://www.ewtoo.org/~astyanax/nano/dist">http://www.ewtoo.org/~astyanax/nano/dist</a></font></li>
|
||||
<li>
|
||||
<font color="#330000"><a href="ftp://ftp.gnu.org/pub/gnu/nano">ftp://ftp.gnu.org/pub/gnu/nano</a></font></li>
|
||||
|
||||
</ul>
|
||||
</blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="2.2"></a><font color="#330000">2.2. Redhat and derivatives (.rpm)
|
||||
packages.</font></h2>
|
||||
|
||||
<blockquote>
|
||||
<ul>
|
||||
<li>
|
||||
<font color="#330000"><a href="http://www.nano-editor.org/dist/RPMS">http://www.nano-editor.org/dist/RPMS</a></font></li>
|
||||
|
||||
<li>
|
||||
<font color="#330000"><a href="http://www.ewtoo.org/~astyanax/nano/dist/RPMS">http://www.ewtoo.org/~astyanax/nano/dist/RPMS</a></font></li>
|
||||
|
||||
</ul>
|
||||
<font color="#330000">Additionally, check out the Redhat contribs section
|
||||
at:</font>
|
||||
<ul>
|
||||
<li>
|
||||
<font color="#330000"><a href="http://distro.ibiblio.org/pub/Linux/distributions/redhat/contrib/libc6/i386">http://metalab.unc.edu/pub/Linux/distributions/redhat/contrib/libc6/i386</a></font></li>
|
||||
|
||||
<li>
|
||||
<font color="#330000"><a href="ftp://distro.ibiblio.org/pub/Linux/distributions/redhat/contrib/libc6/i386">ftp://metalab.unc.edu/pub/Linux/distributions/redhat/contrib/libc6/i386</a></font></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="2.3"></a><font color="#330000">2.3. Debian (.deb) packages.</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">For Debian users, you can check out the
|
||||
current nano packages for:</font>
|
||||
<ul>
|
||||
<li>
|
||||
<font color="#330000"><a href="http://www.debian.org/Packages/stable/editors/nano.html">stable</a></font></li>
|
||||
|
||||
<li>
|
||||
<font color="#330000"><a href="http://www.debian.org/Packages/testing/editors/nano.html">testing</a></font></li>
|
||||
|
||||
<li>
|
||||
<font color="#330000"><a href="http://www.debian.org/Packages/unstable/editors/nano.html">unstable</a></font></li>
|
||||
</ul>
|
||||
<p><font color="#330000">You can also have a look at the</font>
|
||||
<font color="#330000"><a href="ftp://ftp.debian.org/debian/pool/main/n/nano/">Package Pool</a> to see all the available binary and source packages.</font></p>
|
||||
|
||||
<font color="#330000">Note that versions < 0.9.10 are probably not for
|
||||
those wanting to get serious work done, so if you are using Debian 2.2, check
|
||||
that you have updated to 2.2r3, which comes with nano 0.9.23. If you're
|
||||
tracking unstable, you probably have the newest version already.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="2.4"></a><font color="#330000">2.4. By CVS (for the brave).</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">For the 'bleeding edge' current version
|
||||
of nano, you can use CVS to download the current source code. <b>Note:</b>
|
||||
believe it or not, by downloading code that has not yet stabilized into
|
||||
an official release, there could quite possibly be bugs, in fact the code
|
||||
may not even compile! Anyway, see <a href="https://sourceforge.net/cvs/?group_id=1304">the
|
||||
nano CVS page</a> for info on anonymous CVS access to the nano source.</font></blockquote>
|
||||
|
||||
<hr WIDTH="100%">
|
||||
<h1>
|
||||
<a NAME="3"></a><font color="#330000">3. Installation and Configuration</font></h1>
|
||||
|
||||
<h2>
|
||||
<a NAME="3.1"></a><font color="#330000">3.1. How do install the RPM or
|
||||
DEB package?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">It's simple really! As root, type
|
||||
<b>rpm
|
||||
-Uvh nano-x.y.z-1.i386.rpm</b> if you have a Redhat-ish system or
|
||||
<b>dpkg
|
||||
-i nano_x.y.z-1.deb</b> if you have a Debian-ish system, where
|
||||
<b>x.y.z</b>
|
||||
is the release of nano. There are other programs to install packages,
|
||||
and if you wish to use those, knock yourself out.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="3.2"></a><font color="#330000">3.2. Compiling from source: WHAT
|
||||
THE HECK DO I DO NOW?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Okay, take a deep breath, this really
|
||||
isn't hard. Unpack the nano source with a command like:</font>
|
||||
<p><b><font color="#330000">tar -zxvf nano-x.y.z.tar.gz</font></b>
|
||||
<p><font color="#330000">If you get error messages about the -z option,
|
||||
try this:</font>
|
||||
<p><b><font color="#330000">gzip -dc nano-x.y.z.tar.gz | tar xvf -</font></b>
|
||||
<p><font color="#330000">(again, where x.y.z is the version number in question).
|
||||
Then you need to run configure with any options you might want (if any).</font>
|
||||
<p><font color="#330000">The average case is this:</font>
|
||||
<p><b><font color="#330000">cd nano-x.y.z/</font></b>
|
||||
<br><b><font color="#330000">./configure</font></b>
|
||||
<br><b><font color="#330000">make</font></b>
|
||||
<br><font color="#330000"><b>make install </b>(as root, of course)</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="3.3"></a><font color="#330000">3.3. Why does everything go into
|
||||
/usr/local?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Well, that's what the <b>configure</b>
|
||||
script defaults to. If you wish to change this, simply do this:</font>
|
||||
<p><b><font color="#330000">./configure --prefix=/usr</font></b>
|
||||
<p><font color="#330000">to put nano into /usr/bin when you run <b>make
|
||||
install</b>.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="3.4"></a><font color="#330000">3.4. I get errors about 'bindtextdomain',
|
||||
'gettext' and/or 'gettextdomain'. What can I do about it?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Try doing a <b>./configure --with-included-gettext</b>
|
||||
and see if that solves your problem. You make need to do a <b>make
|
||||
clean ; make</b> to get it to work fully.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="3.5"></a><font color="#330000">3.5. Nano should automatically
|
||||
run strip on the binary when installing it!</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Actually, it does, but you have to use
|
||||
<b>make install-strip</b>. The default make install does not, and will
|
||||
not, run strip automatically.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="3.6"></a><font color="#330000">
|
||||
3.6. How can I make the executable smaller? This is too
|
||||
bloated!</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Actually, there are several parts of the
|
||||
editor that can be disabled. You can pass arguments to the
|
||||
<b>configure</b> script that disable certain features. Here's a brief
|
||||
list:
|
||||
<pre>
|
||||
<b>--disable-tabcomp</b> Disables tab completion code for a smaller binary
|
||||
<b>--disable-justify</b> Disable justify/unjustify function
|
||||
<b>--disable-speller</b> Disables spell checker function
|
||||
<b>--disable-help</b> Disables help function (^G)
|
||||
<b>--disable-browser</b> Disables mini file browser
|
||||
<b>--disable-wrapping</b> Disables all wrapping of text (and -w flag)
|
||||
<b>--disable-mouse</b> Disables mouse support (and -m flag)
|
||||
<b>--disable-operatingdir</b> Disable setting of operating directory
|
||||
</pre><br>
|
||||
There's also the <b>--enable-tiny</b> option which disables everything
|
||||
above, as well as some larger chunks of the program (like the marker code
|
||||
that you use Control-^ to select with). Also, if you know you aren't
|
||||
going to be using other languages you can use <b>--disable-nls</b> to
|
||||
disable internationalization and save a few K to a few dozen K depending
|
||||
on if you have locale support on your system. And finally there's always
|
||||
good old <b>strip</b> to strip all debugging code and code that exists in
|
||||
libraries on your system.
|
||||
<p>If, in the other hand, you can't live without bells and whistles, you could
|
||||
try:
|
||||
<pre>
|
||||
<b>--enable-extra</b> Enable extra functions, including easter eggs
|
||||
<b>--enable-nanorc</b> Enable use of .nanorc file
|
||||
<b>--enable-color</b> Enables color and syntax highlighting
|
||||
<b>--enable-multibuffer</b> Enables having multiple file buffers open
|
||||
</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="3.7"></a><font color="#330000">
|
||||
3.7. Tell me more about this multibuffer stuff!</font></h2>
|
||||
|
||||
<blockquote><font color="#330000"> To use multiple file buffers, you must
|
||||
be using nano 1.1.5 or newer, and you must have configured nano with
|
||||
<b>--enable-multibuffer</b> or <b>--enable-extra</b> (use nano -V to check).
|
||||
Then when you want to enable inserting a file into its own buffer instead of
|
||||
into the current file, just hit <b>Meta-F</b>, then insert the file as normal
|
||||
with <b>^R</b>. If you always want files to be loaded into their own buffers,
|
||||
use the <b>--multibuffer</b> or <b>-F</b> flag when you invoke nano. <P>
|
||||
|
||||
You can move between the buffers you have open with the <b>Meta-<</b> and
|
||||
<b>Meta-></b> keys, or more easily with <b>Meta-,</b> and <b>Meta-.</b>
|
||||
(clear as mud, right? =-). When you have more than one file buffer open,
|
||||
the ^X shortcut will say "Close", instead of the normal "Exit" when only one
|
||||
buffer is open.
|
||||
</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="3.8"></a><font color="#330000">
|
||||
3.8. How do I make a .nanorc file that nano will read when I start it?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000"> It's not hard at all! But, your version
|
||||
of nano must have beem compiled with <b>--enable-nanorc</b>, and again must
|
||||
be version 1.1.5 or newer (use nano -V to check your version and compiled
|
||||
features). Then simply copy the <b>nanorc.sample</b>
|
||||
that came with the nano source or your nano package (most likely in
|
||||
/usr/doc/nano) to .nanorc in your home directory. If you didn't get one,
|
||||
the syntax is simple. Flags are turned on and off by using the word
|
||||
<b>set</b> and the getopt_long flag for the feature, for example "set
|
||||
pico" or "set nowrap". </font></blockquote> <hr WIDTH="100%">
|
||||
|
||||
<h1><a NAME="4"></a><font color="#330000">4. Running</font></h1>
|
||||
|
||||
<h2>
|
||||
<a NAME="4.1"></a><font color="#330000">4.1. Ack! My backspace/delete/enter/double
|
||||
bucky/meta key doesn't seem to work! What can I do?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Try setting your $TERM variable to 'vt100'.
|
||||
Nano doesn't yet support every term entry under the sun.</font>
|
||||
<p><font color="#330000">Bourne shell users (like bash): <b>export TERM=vt100</b></font>
|
||||
<br><font color="#330000">C Shell users (tcsh and csh): <b>setenv TERM
|
||||
vt100</b></font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="4.2"></a><font color="#330000">4.2. Nano crashes when I type <insert
|
||||
keystroke here>!</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">If you aren't trying some bizarre keystroke
|
||||
combination with some bizarre $TERM entry, chances are you have found a
|
||||
bug. You are welcome to submit it to the
|
||||
<a href="mailto:nano-devel@lists.sourceforge.net">nano-devel</a> list or
|
||||
to <a href="mailto:nano@nano-editor.org">nano@nano-editor.org</a>.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="4.3"></a><font color="#330000">4.3. Nano crashes when I resize
|
||||
my window. How can I fix that?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Older versions of nano had this problem,
|
||||
please upgrade to a newer version (at least 0.9.9 would be great, 0.9.12
|
||||
is recommended).</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="4.4"></a><font color="#330000">4.4. Why does nano show ^\ in the
|
||||
shortcut list instead of ^J?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">The help (^G) and justify (^J) function
|
||||
were among the last to be written. To show the improvements that
|
||||
nano had over Pico (goto line # and replace), ^_ and ^\ were put on the
|
||||
shortcut list. Later, ^G came back in place of ^_ as it proved
|
||||
to be very valuable for new UNIX users. If you use the <b>-p</b> option to
|
||||
nano (or hit Meta-P) you will get the same shortcuts at the bottom as
|
||||
Pico.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a name="4.5"><font color="#330000">4.5. When I type in a search
|
||||
string, the string I last searched for is already in front of my
|
||||
cursor! What happened?!</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">In nano version 0.9.20, the default is
|
||||
to have a completely consistent user interface across all user input
|
||||
functions. This means that regardless of whether you're being asked for
|
||||
a filename to insert or write, or a string to search for, the
|
||||
previous value is already inserted before the cursor. If you prefer the
|
||||
old behavior, use the pico emulation mode (-p or --pico) or just hit
|
||||
Meta-P while in nano (see the ^G help text for more
|
||||
details).</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="4.6"></a>I get the message "NumLock glitch detected. Keypad
|
||||
will malfunction with NumLock off." What gives?</h2>
|
||||
|
||||
<blockquote>
|
||||
Nano (actually almost all console editors do) has issues when cycling
|
||||
the NumLock key in certain X terminals (rxvt, aterm, wterm, etc...). When
|
||||
you switch NumLock on to off, you put the terminal into an "application
|
||||
mode" that changes what sequences are sent by the keypad. These sequences
|
||||
vary sufficiently from terminal to terminal that it is nearly impossible
|
||||
to work around them from within nano.
|
||||
<br><br>
|
||||
In a nutshell, if you want to be able to use the keypad with the arrow and
|
||||
page up/down functionality, you have to exit nano and reset your terminal
|
||||
(presumably with "reset" or "stty sane" or similar) and then run nano
|
||||
again with NumLock off. If you know an easier way to restore "normal
|
||||
mode", please mail <A href="mailto:nano@nano-editor.org">nano@nano-editor.org</A>.
|
||||
<br> </blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="4.7"></a>4.7. How do I make nano my default editor (in Pine,
|
||||
mutt, etc)?</h2>
|
||||
|
||||
<blockquote>You need to make nano your $EDITOR. If you want this
|
||||
to be saved, you should put a line like this in your <b>.bashrc</b> if
|
||||
you use bash (or <b>.zshrc</b> if you believe in zsh):
|
||||
<p><b>export EDITOR=/usr/local/bin/nano</b>
|
||||
<p>or if you use tcsh put this in your <b>.cshrc</b> file:
|
||||
<p><b>setenv EDITOR /usr/local/bin/nano</b>
|
||||
<p>Change /usr/local/bin/nano to wherever nano is installed in your system.
|
||||
Type which nano to find out. This will not take effect until the next time
|
||||
you login. So log out and back in again.
|
||||
<p>Then on top that if you use Pine you must go into setup (type <b>S</b>
|
||||
at the main menu), then configure (type <b>C</b>). Hit enter on the
|
||||
lines that say:
|
||||
<p><b>[ ] enable-alternate-editor-cmd</b>
|
||||
<br><b>[ ] enable-alternate-editor-implicitly</b>
|
||||
<p>Then exit (<b>E</b>) and select Yes (<b>Y</b>).
|
||||
<p>Mutt users should see an effect immediately the next time you log in,
|
||||
no further configuration is needed. However, if you want to let people
|
||||
know you use nano to compose your email messages, you can put a line like
|
||||
this in your <b>.muttrc</b>:
|
||||
<p><b>my_hdr X-Composer: nano x.y.z</b>
|
||||
<p>Again, replace x.y.z with the version of nano you use.
|
||||
<br> </blockquote>
|
||||
|
||||
<hr WIDTH="100%">
|
||||
<h1>
|
||||
<a NAME="5"></a><font color="#330000">5. Internationalization</font></h1>
|
||||
|
||||
<h2>
|
||||
<a NAME="5.1"></a><font color="#330000">5.1. There's no translation for
|
||||
my language!</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">On June of 2001, GNU nano entered the
|
||||
<a href="www.iro.umontreal.ca/contrib/po/HTML">Free Translation Project</a>
|
||||
and since then, translations should be managed from there.
|
||||
<p>If there isn't a translation for your language, you could ask
|
||||
<a href="http://www.iro.umontreal.ca/contrib/po/HTML/teams.html">your language
|
||||
team</a> to tranlate nano, or better still, join your team and do it yourself.
|
||||
Joining a team is easy. You just need to ask the
|
||||
<a href="mailto:translation@iro.umontreal.ca">TP coordinator</a> to add you
|
||||
to your team, and send a <a href="http://www.iro.umontreal.ca/contrib/po/HTML/disclaim.html">translation disclaimer to the FSF</a> (this is necessary as
|
||||
nano is an official GNU package, but it does <strong>not</strong> mean that
|
||||
you transfer the rights of your work to the FSF, it's just so the FSF can
|
||||
legaly manage them).</p>
|
||||
<p>In any case, translating nano is very easy. Just grab the
|
||||
<b>nano.pot</b> file from the latest and greatest nano distribution
|
||||
(it's in the <b>po/</b> directory) and translate each line into your native
|
||||
language on the <b>msgstr</b> line. When you're done, you should
|
||||
send it to the TP's central po repository.
|
||||
|
||||
<h2>
|
||||
<a NAME="5.2"></a><font color="#330000">5.2. I don't like the translation
|
||||
for <x> in my language. How can I fix it?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">The best way would probably be to e-mail
|
||||
the person listed in the <code>Last-Translator:</code> field in
|
||||
<b><your_language>.po</b> file with your suggested corrections and
|
||||
they can make the changes reach the nano devel list.</font></blockquote>
|
||||
|
||||
<hr WIDTH="100%">
|
||||
<h1>
|
||||
<a NAME="6"></a><font color="#330000">6. Advocacy and Licensing</font></h1>
|
||||
|
||||
<h2>
|
||||
<a NAME="6.1"></a><font color="#330000">6.1. Why should I use nano instead
|
||||
of Pico?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">There are many reasons to use nano instead
|
||||
of Pico, a more complete list can be found at the <a href="http://www.nano-editor.org">nano
|
||||
homepage</a>.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="6.2"></a><font color="#330000">6.2. Why should I use Pico instead
|
||||
of nano?</font></h2>
|
||||
|
||||
<blockquote>Again, check out the <a href="http://www.nano-editor.org">nano
|
||||
homepage</a> for a good summary of reasons. It really is a matter
|
||||
of personal preference as to which editor you should use. If you're
|
||||
the type of person who likes using the original version of a program, then
|
||||
Pico is the editor for you. If you're looking for a few more
|
||||
features and a 'better' license as far as adding your own changes (sacrificing
|
||||
mailer integration with Pine), nano is the way to go.
|
||||
</blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="6.3"></a><font color="#330000">6.3. What is so bad about the Pine
|
||||
license?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">The U of W license for Pine and
|
||||
Pico is not considered truly Free Software according to both the Free
|
||||
Software Foundation and the the <a
|
||||
href="http://www.debian.org/social_contract#guidelines">Debian
|
||||
Free Software Guidelines</a>. The main problem regards the
|
||||
limitations on distributing derived works: according to UW, you can
|
||||
distribute their software, and you can modfify it, but you can not do
|
||||
both, i.e. distribute modified binaries.</blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="6.4"></a><font color="#330000">6.4. Okay, well what mail program
|
||||
should I use then?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000"> If you are looking to use a Free
|
||||
Software program similar to Pine and emacs is not your thing, you should
|
||||
definitely take a look at <a href="http://www.mutt.org">mutt</a>. It
|
||||
is a full-screen, console based mail program that actually has a lot more
|
||||
flexibility than Pine, but has a keymap included in the distribution that
|
||||
allows you to use the same keystrokes as Pine would to send and receive
|
||||
mail. It's also licensed under the GPL.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="6.5"></a><font color="#330000">6.5. Why doesn't UW simply change
|
||||
their license?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">You're really not asking the right person
|
||||
here. I (Chris) waited a long time to see if UW would change their
|
||||
license because of the amount of high quality software being released and
|
||||
developed under the GPL without being taken advantage of by malicious corporate
|
||||
entities or other baddies, but no such luck so far.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="6.6"></a><font color="#330000">6.6. What if tomorrow UW changes
|
||||
the license to be truly Free Software?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Honestly nothing would make me happier
|
||||
than to see that happen. Nano would continue to be developed independently
|
||||
until such time as Pico had all the features nano did or the projects merged.
|
||||
That just does not seem very likely given that there has been no sign of
|
||||
any changes in the past few years in a positive direction.</font></blockquote>
|
||||
|
||||
<hr WIDTH="100%">
|
||||
<h1>
|
||||
<a NAME="7"></a><font color="#330000">7. Miscellaneous</font></h1>
|
||||
|
||||
<h2>
|
||||
<a NAME="7.1"></a><font color="#330000">7.1. Nano related mailing lists.</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">There are two mailing lists for nano
|
||||
hosted at <a href="http://www.sourceforge.net">SourceForge</a>, nano-announce
|
||||
and nano-devel. Nano-announce is a very low traffic list where new
|
||||
versions of nano are announced (surprise!) Nano-devel is a normally
|
||||
low, sometimes high traffic list for discussing the present and future
|
||||
development of nano. Here are links to where you can sign up for
|
||||
a given list:</font><font color="#330000"></font>
|
||||
<p><font color="#330000">nano-announce - <a href="http://lists.sourceforge.net/mailman/listinfo/nano-announce">http://lists.sourceforge.net/mailman/listinfo/nano-announce</a></font>
|
||||
<br><font color="#330000">nano-devel - <a href="http://lists.sourceforge.net/mailman/listinfo/nano-devel">http://lists.sourceforge.net/mailman/listinfo/nano-devel</a></font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="7.2"></a><font color="#330000">7.2. I want to send the development
|
||||
team a big load of cash (or just a thank you).</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">That's fine. Send it <a href="mailto:nano-devel@lists.sourceforge.net">our
|
||||
way</a>! Better yet, fix a <a href="http://www.nano-editor.org/dist/BUGS">bug</a>
|
||||
in the program or implement a <a href="http://www.nano-editor.org/dist/TODO">cool
|
||||
feature</a> and send us that instead (though cash is fine too).</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="7.3"></a><font color="#330000">7.3. How do I submit a patch?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">See Section <a href="#7.2">7.2</a>.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="7.4"></a><font color="#330000">7.4. How do I join the development
|
||||
team?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">The easiest way is to consistently send
|
||||
in good patches that add some needed functionality, fix a bug or two and/or
|
||||
make the program more optimized/efficient. Then ask nicely and you
|
||||
will probably be added to the SourceForge development list and be given
|
||||
CVS write after awhile. There is a lot of responsibility that goes
|
||||
along with being a team member, so don't think it's just something to add
|
||||
to your resume.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="7.5"></a><font color="#330000">7.5. Can I have CVS write access?</font></h2>
|
||||
|
||||
<blockquote><font color="#330000">Re-read Section </font><a href="#7.4">7.4</a><font color="#330000">
|
||||
and you should know the answer.</font></blockquote>
|
||||
|
||||
<h2>
|
||||
<a NAME="8"></a><font color="#330000">8. ChangeLog</font>
|
||||
</h2>
|
||||
|
||||
<blockquote>2001/12/26 - Misc. fixes (Aaron S. Hawley, DLR).</blockquote>
|
||||
<blockquote>2001/10/02 - Update for Free Translation Project.</blockquote>
|
||||
<blockquote>2001/10/02 - Assorted fixes, Debian additions.</blockquote>
|
||||
<blockquote>2001/06/30 - Silly typo fix.</blockquote>
|
||||
<blockquote>2001/05/05 - Spelling fixes by David Lawrence Ramsey.</blockquote>
|
||||
<blockquote>2001/05/02 - Misc fixes.</blockquote>
|
||||
<blockquote>2001/03/26 - Typo fix in an URL.</blockquote>
|
||||
<blockquote>2001/02/17 - Advocacy updates.</blockquote>
|
||||
<blockquote>2001/02/15 - Added GNU notes for 0.9.99pre3.</blockquote>
|
||||
<blockquote>2001/02/06 - Typo fixes.</blockquote>
|
||||
<blockquote>2001/01/14 - Added note about numlock glitch.</blockquote>
|
||||
<blockquote>2001/01/10 - Linux --> GNU/Linux.</blockquote>
|
||||
<blockquote>2001/01/09 - Added "making exe smaller section.</blockquote>
|
||||
<blockquote>2000/12/19 - Typo and assorted error fixes.</blockquote>
|
||||
<blockquote>2000/11/28 - Added blurb about make install-strip.</blockquote>
|
||||
<blockquote>2000/11/19 - Changed Debian frozen to stable.</blockquote>
|
||||
<blockquote>2000/11/18 - Previous string display (4.5).</blockquote>
|
||||
<blockquote>2000/09/27 - Moved addresses to nano-editor.org.</blockquote>
|
||||
<blockquote>2000/06/31 - Initial framework.</blockquote>
|
||||
<P>
|
||||
$Id$
|
||||
</body>
|
||||
</html>
|
||||
439
global.c
439
global.c
@@ -1,10 +1,11 @@
|
||||
/* $Id$ */
|
||||
/**************************************************************************
|
||||
* global.c *
|
||||
* *
|
||||
* Copyright (C) 1999 Chris Allegretta *
|
||||
* Copyright (C) 1999-2002 Chris Allegretta *
|
||||
* This program 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 1, or (at your option) *
|
||||
* the Free Software Foundation; either version 2, or (at your option) *
|
||||
* any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
@@ -18,8 +19,9 @@
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include "config.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include "nano.h"
|
||||
#include "proto.h"
|
||||
|
||||
@@ -33,12 +35,11 @@
|
||||
/*
|
||||
* Global variables
|
||||
*/
|
||||
int flags = 0; /* Our new flag containig many options */
|
||||
int center_x = 0, center_y = 0; /* Center of screen */
|
||||
int flags = 0; /* Our new flag containing many options */
|
||||
WINDOW *edit; /* The file portion of the editor */
|
||||
WINDOW *topwin; /* Top line of screen */
|
||||
WINDOW *bottomwin; /* Bottom buffer */
|
||||
char *filename; /* Name of the file */
|
||||
char *filename = NULL; /* Name of the file */
|
||||
int editwinrows = 0; /* How many rows long is the edit
|
||||
window? */
|
||||
filestruct *current; /* Current buffer pointer */
|
||||
@@ -53,13 +54,19 @@ filestruct *editbot = NULL; /* Same for the bottom */
|
||||
filestruct *filebot = NULL; /* Last node in the file struct */
|
||||
filestruct *cutbuffer = NULL; /* A place to store cut text */
|
||||
|
||||
char *answer; /* Answer str to many questions */
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
filestruct *open_files = NULL; /* The list of open files */
|
||||
#endif
|
||||
|
||||
char *answer = NULL; /* Answer str to many questions */
|
||||
int totlines = 0; /* Total number of lines in the file */
|
||||
int totsize = 0; /* Total number of bytes in the file */
|
||||
int placewewant = 0; /* The collum we'd like the cursor
|
||||
long totsize = 0; /* Total number of bytes in the file */
|
||||
int placewewant = 0; /* The column we'd like the cursor
|
||||
to jump to when we go to the
|
||||
next or previous line */
|
||||
|
||||
int tabsize = 8; /* Our internal tabsize variable */
|
||||
|
||||
char *hblank; /* A horizontal blank line */
|
||||
char *help_text; /* The text in the help window */
|
||||
|
||||
@@ -68,19 +75,50 @@ char *help_text; /* The text in the help window */
|
||||
filestruct *mark_beginbuf; /* the begin marker buffer */
|
||||
int mark_beginx; /* X value in the string to start */
|
||||
|
||||
#ifndef DISABLE_OPERATINGDIR
|
||||
char *operating_dir = NULL; /* Operating directory, which we can't go
|
||||
higher than */
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_SPELLER
|
||||
char *alt_speller; /* Alternative spell command */
|
||||
#endif
|
||||
|
||||
shortcut main_list[MAIN_LIST_LEN];
|
||||
shortcut whereis_list[WHEREIS_LIST_LEN];
|
||||
shortcut replace_list[REPLACE_LIST_LEN];
|
||||
shortcut replace_list_2[REPLACE_LIST_LEN]; /* 2nd half of replace dialog */
|
||||
shortcut goto_list[GOTO_LIST_LEN];
|
||||
shortcut gotodir_list[GOTODIR_LIST_LEN];
|
||||
shortcut writefile_list[WRITEFILE_LIST_LEN];
|
||||
shortcut insertfile_list[INSERTFILE_LIST_LEN];
|
||||
shortcut help_list[HELP_LIST_LEN];
|
||||
shortcut spell_list[SPELL_LIST_LEN];
|
||||
#ifndef DISABLE_BROWSER
|
||||
shortcut browser_list[BROWSER_LIST_LEN];
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
colorstruct colors[NUM_NCOLORS];
|
||||
colortype *colorstrings = NULL;
|
||||
#endif
|
||||
|
||||
#if !defined(DISABLE_BROWSER) || !defined(DISABLE_MOUSE) || !defined (DISABLE_HELP)
|
||||
shortcut *currshortcut = main_list; /* Current shortcut list we're using */
|
||||
int currslen = MAIN_VISIBLE; /* Length of current shortcut list */
|
||||
#endif
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
toggle toggles[TOGGLE_LEN];
|
||||
#endif
|
||||
|
||||
/* Regular expressions */
|
||||
|
||||
regex_t search_regexp; /* Global to store compiled search regexp */
|
||||
regmatch_t regmatches[10]; /* Match positions for parenthetical
|
||||
subexpressions, max of 10 */
|
||||
#ifdef HAVE_REGEX_H
|
||||
regex_t search_regexp; /* Global to store compiled search regexp */
|
||||
regmatch_t regmatches[10]; /* Match positions for parenthetical
|
||||
subexpressions, max of 10 */
|
||||
#endif
|
||||
|
||||
/* Initialize a struct *without* our lovely braces =( */
|
||||
void sc_init_one(shortcut * s, int key, char *desc, char *help, int alt,
|
||||
@@ -96,7 +134,104 @@ void sc_init_one(shortcut * s, int key, char *desc, char *help, int alt,
|
||||
s->func = func;
|
||||
}
|
||||
|
||||
void shortcut_init(void)
|
||||
#ifndef NANO_SMALL
|
||||
/* Initialize the toggles in the same manner */
|
||||
void toggle_init_one(toggle * t, int val, char *desc, int flag,
|
||||
char override_ch)
|
||||
{
|
||||
t->val = val;
|
||||
t->desc = desc;
|
||||
t->flag = flag;
|
||||
t->override_ch = override_ch;
|
||||
}
|
||||
#endif
|
||||
|
||||
void toggle_init(void)
|
||||
{
|
||||
#ifndef NANO_SMALL
|
||||
char *toggle_const_msg, *toggle_autoindent_msg, *toggle_suspend_msg,
|
||||
*toggle_nohelp_msg, *toggle_picomode_msg, *toggle_mouse_msg,
|
||||
*toggle_cuttoend_msg, *toggle_wrap_msg, *toggle_case_msg,
|
||||
*toggle_backwards_msg, *toggle_dos_msg, *toggle_mac_msg,
|
||||
*toggle_smooth_msg;
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
char *toggle_load_msg, *nano_openprev_msg, *nano_opennext_msg;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_REGEX_H
|
||||
char *toggle_regexp_msg;
|
||||
#endif
|
||||
|
||||
|
||||
toggle_const_msg = _("Constant cursor position");
|
||||
toggle_autoindent_msg = _("Auto indent");
|
||||
toggle_suspend_msg = _("Suspend");
|
||||
toggle_nohelp_msg = _("Help mode");
|
||||
toggle_picomode_msg = _("Pico mode");
|
||||
toggle_mouse_msg = _("Mouse support");
|
||||
toggle_cuttoend_msg = _("Cut to end");
|
||||
toggle_backwards_msg = _("Backwards search");
|
||||
toggle_case_msg = _("Case sensitive search");
|
||||
toggle_dos_msg = _("Writing file in DOS format");
|
||||
toggle_mac_msg = _("Writing file in Mac format");
|
||||
toggle_smooth_msg = _("Smooth scrolling");
|
||||
|
||||
#ifdef HAVE_REGEX_H
|
||||
toggle_regexp_msg = _("Regular expressions");
|
||||
#endif
|
||||
toggle_wrap_msg = _("Auto wrap");
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
toggle_load_msg = _("Multiple file buffers");
|
||||
nano_openprev_msg = _("Open previously loaded file");
|
||||
nano_opennext_msg = _("Open next loaded file");
|
||||
#endif
|
||||
|
||||
toggle_init_one(&toggles[0], TOGGLE_CONST_KEY, toggle_const_msg,
|
||||
CONSTUPDATE, 0);
|
||||
toggle_init_one(&toggles[1], TOGGLE_AUTOINDENT_KEY,
|
||||
toggle_autoindent_msg, AUTOINDENT, 0);
|
||||
toggle_init_one(&toggles[2], TOGGLE_SUSPEND_KEY, toggle_suspend_msg,
|
||||
SUSPEND, 0);
|
||||
toggle_init_one(&toggles[3], TOGGLE_NOHELP_KEY, toggle_nohelp_msg,
|
||||
NO_HELP, 0);
|
||||
toggle_init_one(&toggles[4], TOGGLE_PICOMODE_KEY, toggle_picomode_msg,
|
||||
PICO_MODE, 0);
|
||||
toggle_init_one(&toggles[5], TOGGLE_WRAP_KEY, toggle_wrap_msg,
|
||||
NO_WRAP, 0);
|
||||
toggle_init_one(&toggles[6], TOGGLE_MOUSE_KEY, toggle_mouse_msg,
|
||||
USE_MOUSE, 0);
|
||||
toggle_init_one(&toggles[7], TOGGLE_CUTTOEND_KEY, toggle_cuttoend_msg,
|
||||
CUT_TO_END, 0);
|
||||
toggle_init_one(&toggles[8], TOGGLE_BACKWARDS_KEY, toggle_backwards_msg,
|
||||
REVERSE_SEARCH, 0);
|
||||
toggle_init_one(&toggles[9], TOGGLE_CASE_KEY, toggle_case_msg,
|
||||
CASE_SENSITIVE, 0);
|
||||
toggle_init_one(&toggles[10], TOGGLE_DOS_KEY, toggle_dos_msg,
|
||||
DOS_FILE, 0);
|
||||
toggle_init_one(&toggles[11], TOGGLE_MAC_KEY, toggle_mac_msg,
|
||||
MAC_FILE, 0);
|
||||
toggle_init_one(&toggles[12], TOGGLE_SMOOTH_KEY, toggle_smooth_msg,
|
||||
SMOOTHSCROLL, 0);
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
toggle_init_one(&toggles[13], TOGGLE_LOAD_KEY, toggle_load_msg,
|
||||
MULTIBUFFER, 0);
|
||||
toggle_init_one(&toggles[14], NANO_OPENPREV_KEY, nano_openprev_msg,
|
||||
0, '<');
|
||||
toggle_init_one(&toggles[15], NANO_OPENNEXT_KEY, nano_opennext_msg,
|
||||
0, '>');
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_REGEX_H
|
||||
toggle_init_one(&toggles[TOGGLE_LEN - 1], TOGGLE_REGEXP_KEY,
|
||||
toggle_regexp_msg, USE_REGEXP, 0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void shortcut_init(int unjustify)
|
||||
{
|
||||
char *nano_help_msg = "", *nano_writeout_msg = "", *nano_exit_msg = "",
|
||||
*nano_goto_msg = "", *nano_justify_msg = "", *nano_replace_msg =
|
||||
@@ -109,15 +244,28 @@ void shortcut_init(void)
|
||||
"", *nano_lastline_msg = "", *nano_refresh_msg =
|
||||
"", *nano_mark_msg = "", *nano_delete_msg =
|
||||
"", *nano_backspace_msg = "", *nano_tab_msg =
|
||||
"", *nano_enter_msg = "", *nano_case_msg =
|
||||
"", *nano_cancel_msg = "";
|
||||
"", *nano_enter_msg = "", *nano_cancel_msg =
|
||||
"", *nano_unjustify_msg = "", *nano_append_msg = "";
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
char *nano_tofiles_msg = "", *nano_gotodir_msg = "", *nano_case_msg =
|
||||
"", *nano_reverse_msg = "";
|
||||
#ifdef HAVE_REGEX_H
|
||||
char *nano_regexp_msg = "", *nano_bracket_msg = "";
|
||||
#endif
|
||||
|
||||
nano_help_msg = _("Invoke the help menu");
|
||||
nano_writeout_msg = _("Write the current file to disk");
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
nano_exit_msg = _("Close currently loaded file/Exit from nano");
|
||||
#else
|
||||
nano_exit_msg = _("Exit from nano");
|
||||
#endif
|
||||
|
||||
nano_goto_msg = _("Goto a specific line number");
|
||||
nano_justify_msg = _("Justify the current paragraph");
|
||||
nano_unjustify_msg = _("Unjustify after a justify");
|
||||
nano_replace_msg = _("Replace text within the editor");
|
||||
nano_insert_msg = _("Insert another file into the current one");
|
||||
nano_whereis_msg = _("Search for text within the editor");
|
||||
@@ -125,7 +273,7 @@ void shortcut_init(void)
|
||||
nano_nextpage_msg = _("Move to the next screen");
|
||||
nano_cut_msg = _("Cut the current line and store it in the cutbuffer");
|
||||
nano_uncut_msg = _("Uncut from the cutbuffer into the current line");
|
||||
nano_cursorpos_msg = _("Show the posititon of the cursor");
|
||||
nano_cursorpos_msg = _("Show the position of the cursor");
|
||||
nano_spell_msg = _("Invoke the spell checker (if available)");
|
||||
nano_up_msg = _("Move up one line");
|
||||
nano_down_msg = _("Move down one line");
|
||||
@@ -144,64 +292,94 @@ void shortcut_init(void)
|
||||
nano_enter_msg = _("Insert a carriage return at the cursor position");
|
||||
nano_case_msg =
|
||||
_("Make the current search or replace case (in)sensitive");
|
||||
nano_tofiles_msg = _("Go to file browser");
|
||||
nano_gotodir_msg = _("Goto Directory");
|
||||
nano_cancel_msg = _("Cancel the current function");
|
||||
nano_append_msg = _("Append to the current file");
|
||||
nano_reverse_msg = _("Search backwards");
|
||||
#ifdef HAVE_REGEX_H
|
||||
nano_regexp_msg = _("Use Regular expressions");
|
||||
nano_bracket_msg = _("Find other bracket");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
if (ISSET(PICO_MSGS))
|
||||
sc_init_one(&main_list[0], NANO_HELP_KEY, _("Get Help"),
|
||||
nano_help_msg, 0, 0, 0, VIEW, do_help);
|
||||
else
|
||||
sc_init_one(&main_list[0], NANO_WRITEOUT_KEY, _("WriteOut"),
|
||||
nano_writeout_msg,
|
||||
0, NANO_WRITEOUT_FKEY, 0, NOVIEW, do_writeout_void);
|
||||
nano_help_msg, 0, NANO_HELP_FKEY, 0, VIEW, do_help);
|
||||
|
||||
sc_init_one(&main_list[1], NANO_EXIT_KEY, _("Exit"),
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
if (open_files != NULL && (open_files->prev || open_files->next))
|
||||
sc_init_one(&main_list[1], NANO_EXIT_KEY, _("Close"),
|
||||
nano_exit_msg, 0, NANO_EXIT_FKEY, 0, VIEW, do_exit);
|
||||
else
|
||||
#endif
|
||||
sc_init_one(&main_list[1], NANO_EXIT_KEY, _("Exit"),
|
||||
nano_exit_msg, 0, NANO_EXIT_FKEY, 0, VIEW, do_exit);
|
||||
|
||||
if (ISSET(PICO_MSGS))
|
||||
sc_init_one(&main_list[2], NANO_WRITEOUT_KEY, _("WriteOut"),
|
||||
sc_init_one(&main_list[2], NANO_WRITEOUT_KEY, _("WriteOut"),
|
||||
nano_writeout_msg,
|
||||
0, NANO_WRITEOUT_FKEY, 0, NOVIEW, do_writeout_void);
|
||||
else
|
||||
sc_init_one(&main_list[2], NANO_GOTO_KEY, _("Goto Line"),
|
||||
nano_goto_msg,
|
||||
NANO_ALT_G, NANO_GOTO_FKEY, 0, VIEW, do_gotoline_void);
|
||||
|
||||
if (ISSET(PICO_MSGS))
|
||||
if (ISSET(PICO_MODE))
|
||||
sc_init_one(&main_list[3], NANO_JUSTIFY_KEY, _("Justify"),
|
||||
nano_justify_msg, 0, 0, 0, NOVIEW, do_justify);
|
||||
nano_justify_msg, 0, NANO_JUSTIFY_FKEY, 0,
|
||||
NOVIEW, do_justify);
|
||||
else
|
||||
sc_init_one(&main_list[3], NANO_REPLACE_KEY, _("Replace"),
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
/* this is so we can view multiple files */
|
||||
sc_init_one(&main_list[3], NANO_INSERTFILE_KEY, _("Read File"),
|
||||
nano_insert_msg,
|
||||
0, NANO_INSERTFILE_FKEY, 0, VIEW, do_insertfile_void);
|
||||
#else
|
||||
sc_init_one(&main_list[3], NANO_INSERTFILE_KEY, _("Read File"),
|
||||
nano_insert_msg,
|
||||
0, NANO_INSERTFILE_FKEY, 0, NOVIEW, do_insertfile_void);
|
||||
#endif
|
||||
|
||||
if (ISSET(PICO_MODE))
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
/* this is so we can view multiple files */
|
||||
sc_init_one(&main_list[4], NANO_INSERTFILE_KEY, _("Read File"),
|
||||
nano_insert_msg,
|
||||
0, NANO_INSERTFILE_FKEY, 0, VIEW, do_insertfile_void);
|
||||
#else
|
||||
sc_init_one(&main_list[4], NANO_INSERTFILE_KEY, _("Read File"),
|
||||
nano_insert_msg,
|
||||
0, NANO_INSERTFILE_FKEY, 0, NOVIEW, do_insertfile_void);
|
||||
#endif
|
||||
|
||||
else
|
||||
sc_init_one(&main_list[4], NANO_REPLACE_KEY, _("Replace"),
|
||||
nano_replace_msg,
|
||||
NANO_ALT_R, NANO_REPLACE_FKEY, 0, NOVIEW, do_replace);
|
||||
|
||||
sc_init_one(&main_list[4], NANO_INSERTFILE_KEY, _("Read File"),
|
||||
nano_insert_msg,
|
||||
0, NANO_INSERTFILE_FKEY, 0, NOVIEW, do_insertfile);
|
||||
|
||||
sc_init_one(&main_list[5], NANO_WHEREIS_KEY, _("Where Is"),
|
||||
nano_whereis_msg,
|
||||
0, NANO_WHEREIS_FKEY, 0, VIEW, do_search);
|
||||
|
||||
sc_init_one(&main_list[6], NANO_PREVPAGE_KEY, _("Prev Page"),
|
||||
nano_prevpage_msg,
|
||||
0, NANO_PREVPAGE_FKEY, KEY_PPAGE, VIEW, page_up);
|
||||
0, NANO_PREVPAGE_FKEY, KEY_PPAGE, VIEW, do_page_up);
|
||||
|
||||
sc_init_one(&main_list[7], NANO_NEXTPAGE_KEY, _("Next Page"),
|
||||
nano_nextpage_msg,
|
||||
0, NANO_NEXTPAGE_FKEY, KEY_NPAGE, VIEW, page_down);
|
||||
0, NANO_NEXTPAGE_FKEY, KEY_NPAGE, VIEW, do_page_down);
|
||||
|
||||
sc_init_one(&main_list[8], NANO_CUT_KEY, _("Cut Text"),
|
||||
nano_cut_msg, 0, NANO_CUT_FKEY, 0, NOVIEW, do_cut_text);
|
||||
|
||||
sc_init_one(&main_list[9], NANO_UNCUT_KEY, _("UnCut Txt"),
|
||||
if (unjustify)
|
||||
sc_init_one(&main_list[9], NANO_UNJUSTIFY_KEY, _("UnJustify"),
|
||||
nano_unjustify_msg, 0, 0, 0, NOVIEW, do_uncut_text);
|
||||
else
|
||||
sc_init_one(&main_list[9], NANO_UNCUT_KEY, _("UnCut Txt"),
|
||||
nano_uncut_msg,
|
||||
0, NANO_UNCUT_FKEY, 0, NOVIEW, do_uncut_text);
|
||||
|
||||
sc_init_one(&main_list[10], NANO_CURSORPOS_KEY, _("Cur Pos"),
|
||||
nano_cursorpos_msg,
|
||||
0, NANO_CURSORPOS_FKEY, 0, VIEW, do_cursorpos);
|
||||
0, NANO_CURSORPOS_FKEY, 0, VIEW, do_cursorpos_void);
|
||||
|
||||
sc_init_one(&main_list[11], NANO_SPELL_KEY, _("To Spell"),
|
||||
nano_spell_msg, 0, NANO_SPELL_FKEY, 0, NOVIEW, do_spell);
|
||||
@@ -242,99 +420,192 @@ void shortcut_init(void)
|
||||
sc_init_one(&main_list[22], NANO_TAB_KEY, _("Tab"),
|
||||
nano_tab_msg, 0, 0, 0, NOVIEW, do_tab);
|
||||
|
||||
if (ISSET(PICO_MSGS))
|
||||
if (ISSET(PICO_MODE))
|
||||
sc_init_one(&main_list[23], NANO_REPLACE_KEY, _("Replace"),
|
||||
nano_replace_msg,
|
||||
NANO_ALT_R, NANO_REPLACE_FKEY, 0, NOVIEW, do_replace);
|
||||
else
|
||||
sc_init_one(&main_list[23], NANO_JUSTIFY_KEY, _("Justify"),
|
||||
nano_justify_msg, 0, 0, 0, NOVIEW, do_justify);
|
||||
nano_justify_msg, 0, NANO_JUSTIFY_FKEY, 0,
|
||||
NOVIEW, do_justify);
|
||||
|
||||
sc_init_one(&main_list[24], NANO_ENTER_KEY, _("Enter"),
|
||||
nano_enter_msg,
|
||||
0, KEY_ENTER, NANO_CONTROL_M, NOVIEW, do_enter_void);
|
||||
|
||||
if (ISSET(PICO_MSGS))
|
||||
sc_init_one(&main_list[25], NANO_GOTO_KEY, _("Goto Line"),
|
||||
sc_init_one(&main_list[25], NANO_GOTO_KEY, _("Goto Line"),
|
||||
nano_goto_msg,
|
||||
NANO_ALT_G, NANO_GOTO_FKEY, 0, VIEW, do_gotoline_void);
|
||||
else
|
||||
sc_init_one(&main_list[25], NANO_HELP_KEY, _("Get Help"),
|
||||
nano_help_msg, 0, 0, 0, VIEW, do_help);
|
||||
|
||||
#if (!defined NANO_SMALL) && (defined HAVE_REGEX_H)
|
||||
sc_init_one(&main_list[26], -9, _("Find Other Bracket"),
|
||||
nano_bracket_msg,
|
||||
NANO_BRACKET_KEY, 0, 0, VIEW, do_find_bracket);
|
||||
#endif
|
||||
|
||||
|
||||
sc_init_one(&whereis_list[0], NANO_FIRSTLINE_KEY, _("First Line"),
|
||||
sc_init_one(&whereis_list[0], NANO_HELP_KEY,
|
||||
_("Get Help"), nano_help_msg, 0, 0, 0, VIEW, do_help);
|
||||
|
||||
sc_init_one(&whereis_list[1], NANO_CANCEL_KEY,
|
||||
_("Cancel"), nano_cancel_msg, 0, 0, 0, VIEW, 0);
|
||||
|
||||
sc_init_one(&whereis_list[2], NANO_FIRSTLINE_KEY, _("First Line"),
|
||||
nano_firstline_msg, 0, 0, 0, VIEW, do_first_line);
|
||||
|
||||
sc_init_one(&whereis_list[1], NANO_LASTLINE_KEY, _("Last Line"),
|
||||
sc_init_one(&whereis_list[3], NANO_LASTLINE_KEY, _("Last Line"),
|
||||
nano_lastline_msg, 0, 0, 0, VIEW, do_last_line);
|
||||
|
||||
sc_init_one(&whereis_list[2], NANO_CASE_KEY, _("Case Sens"),
|
||||
nano_case_msg, 0, 0, 0, VIEW, 0);
|
||||
|
||||
|
||||
sc_init_one(&whereis_list[3], NANO_OTHERSEARCH_KEY, _("Replace"),
|
||||
sc_init_one(&whereis_list[4], NANO_OTHERSEARCH_KEY, _("Replace"),
|
||||
nano_replace_msg, 0, 0, 0, VIEW, do_replace);
|
||||
|
||||
sc_init_one(&whereis_list[4], NANO_FROMSEARCHTOGOTO_KEY, _("Goto Line"),
|
||||
nano_goto_msg, 0, 0, 0, VIEW, do_gotoline_void);
|
||||
sc_init_one(&whereis_list[5], NANO_FROMSEARCHTOGOTO_KEY,
|
||||
_("Goto Line"), nano_goto_msg, 0, 0, 0, VIEW,
|
||||
do_gotoline_void);
|
||||
|
||||
sc_init_one(&whereis_list[5], NANO_CANCEL_KEY, _("Cancel"),
|
||||
nano_cancel_msg, 0, 0, 0, VIEW, 0);
|
||||
|
||||
|
||||
sc_init_one(&replace_list[0], NANO_FIRSTLINE_KEY, _("First Line"),
|
||||
nano_firstline_msg, 0, 0, 0, VIEW, do_first_line);
|
||||
|
||||
sc_init_one(&replace_list[1], NANO_LASTLINE_KEY, _("Last Line"),
|
||||
nano_lastline_msg, 0, 0, 0, VIEW, do_last_line);
|
||||
|
||||
sc_init_one(&replace_list[2], NANO_CASE_KEY, _("Case Sens"),
|
||||
#ifndef NANO_SMALL
|
||||
sc_init_one(&whereis_list[6], TOGGLE_CASE_KEY, _("Case Sens"),
|
||||
nano_case_msg, 0, 0, 0, VIEW, 0);
|
||||
|
||||
sc_init_one(&replace_list[3], NANO_OTHERSEARCH_KEY, _("No Replace"),
|
||||
sc_init_one(&whereis_list[7], TOGGLE_BACKWARDS_KEY, _("Direction"),
|
||||
nano_reverse_msg, 0, 0, 0, VIEW, 0);
|
||||
|
||||
#ifdef HAVE_REGEX_H
|
||||
sc_init_one(&whereis_list[REPLACE_LIST_LEN - 1], TOGGLE_REGEXP_KEY,
|
||||
_("Regexp"), nano_regexp_msg, 0, 0, 0, VIEW, 0);
|
||||
#endif
|
||||
#endif /* NANO_SMALL */
|
||||
|
||||
|
||||
sc_init_one(&replace_list[0], NANO_HELP_KEY,
|
||||
_("Get Help"), nano_help_msg, 0, 0, 0, VIEW, do_help);
|
||||
|
||||
sc_init_one(&replace_list[1], NANO_CANCEL_KEY,
|
||||
_("Cancel"), nano_cancel_msg, 0, 0, 0, VIEW, 0);
|
||||
|
||||
sc_init_one(&replace_list[2], NANO_FIRSTLINE_KEY, _("First Line"),
|
||||
nano_firstline_msg, 0, 0, 0, VIEW, do_first_line);
|
||||
|
||||
sc_init_one(&replace_list[3], NANO_LASTLINE_KEY, _("Last Line"),
|
||||
nano_lastline_msg, 0, 0, 0, VIEW, do_last_line);
|
||||
|
||||
sc_init_one(&replace_list[4], NANO_OTHERSEARCH_KEY, _("No Replace"),
|
||||
nano_whereis_msg, 0, 0, 0, VIEW, do_search);
|
||||
|
||||
sc_init_one(&replace_list[4], NANO_FROMSEARCHTOGOTO_KEY, _("Goto Line"),
|
||||
nano_goto_msg, 0, 0, 0, VIEW, do_gotoline_void);
|
||||
sc_init_one(&replace_list[5], NANO_FROMSEARCHTOGOTO_KEY,
|
||||
_("Goto Line"), nano_goto_msg, 0, 0, 0, VIEW,
|
||||
do_gotoline_void);
|
||||
|
||||
sc_init_one(&replace_list[5], NANO_CANCEL_KEY, _("Cancel"),
|
||||
#ifndef NANO_SMALL
|
||||
sc_init_one(&replace_list[6], TOGGLE_CASE_KEY, _("Case Sens"),
|
||||
nano_case_msg, 0, 0, 0, VIEW, 0);
|
||||
|
||||
sc_init_one(&replace_list[7], TOGGLE_BACKWARDS_KEY, _("Direction"),
|
||||
nano_reverse_msg, 0, 0, 0, VIEW, 0);
|
||||
|
||||
#ifdef HAVE_REGEX_H
|
||||
sc_init_one(&replace_list[REPLACE_LIST_LEN - 1], TOGGLE_REGEXP_KEY,
|
||||
_("Regexp"), nano_regexp_msg, 0, 0, 0, VIEW, 0);
|
||||
#endif
|
||||
#endif /* NANO_SMALL */
|
||||
|
||||
|
||||
sc_init_one(&replace_list_2[0], NANO_HELP_KEY,
|
||||
_("Get Help"), nano_help_msg, 0, 0, 0, VIEW, do_help);
|
||||
|
||||
sc_init_one(&replace_list_2[1], NANO_CANCEL_KEY,
|
||||
_("Cancel"), nano_cancel_msg, 0, 0, 0, VIEW, 0);
|
||||
|
||||
sc_init_one(&replace_list_2[2], NANO_FIRSTLINE_KEY, _("First Line"),
|
||||
nano_firstline_msg, 0, 0, 0, VIEW, do_first_line);
|
||||
|
||||
sc_init_one(&replace_list_2[3], NANO_LASTLINE_KEY, _("Last Line"),
|
||||
nano_lastline_msg, 0, 0, 0, VIEW, do_last_line);
|
||||
|
||||
|
||||
sc_init_one(&goto_list[0], NANO_HELP_KEY,
|
||||
_("Get Help"), nano_help_msg, 0, 0, 0, VIEW, do_help);
|
||||
|
||||
sc_init_one(&goto_list[1], NANO_CANCEL_KEY, _("Cancel"),
|
||||
nano_cancel_msg, 0, 0, 0, VIEW, 0);
|
||||
|
||||
|
||||
sc_init_one(&goto_list[0], NANO_FIRSTLINE_KEY, _("First Line"),
|
||||
sc_init_one(&goto_list[2], NANO_FIRSTLINE_KEY, _("First Line"),
|
||||
nano_firstline_msg, 0, 0, 0, VIEW, &do_first_line);
|
||||
|
||||
sc_init_one(&goto_list[1], NANO_LASTLINE_KEY, _("Last Line"),
|
||||
sc_init_one(&goto_list[3], NANO_LASTLINE_KEY, _("Last Line"),
|
||||
nano_lastline_msg, 0, 0, 0, VIEW, &do_last_line);
|
||||
|
||||
sc_init_one(&goto_list[2], NANO_CANCEL_KEY, _("Cancel"),
|
||||
nano_cancel_msg, 0, 0, 0, VIEW, 0);
|
||||
|
||||
|
||||
sc_init_one(&help_list[0], NANO_PREVPAGE_KEY, _("Prev Page"),
|
||||
nano_prevpage_msg,
|
||||
0, NANO_PREVPAGE_FKEY, KEY_PPAGE, VIEW, page_up);
|
||||
0, NANO_PREVPAGE_FKEY, KEY_PPAGE, VIEW, do_page_up);
|
||||
|
||||
sc_init_one(&help_list[1], NANO_NEXTPAGE_KEY, _("Next Page"),
|
||||
nano_nextpage_msg,
|
||||
0, NANO_NEXTPAGE_FKEY, KEY_NPAGE, VIEW, page_down);
|
||||
0, NANO_NEXTPAGE_FKEY, KEY_NPAGE, VIEW, do_page_down);
|
||||
|
||||
sc_init_one(&help_list[2], NANO_EXIT_KEY, _("Exit"),
|
||||
nano_exit_msg, 0, NANO_EXIT_FKEY, 0, VIEW, do_exit);
|
||||
|
||||
|
||||
sc_init_one(&writefile_list[0], NANO_CANCEL_KEY, _("Cancel"),
|
||||
sc_init_one(&writefile_list[0], NANO_HELP_KEY,
|
||||
_("Get Help"), nano_help_msg, 0, 0, 0, VIEW, do_help);
|
||||
|
||||
sc_init_one(&writefile_list[1], NANO_CANCEL_KEY, _("Cancel"),
|
||||
nano_cancel_msg, 0, 0, 0, VIEW, 0);
|
||||
|
||||
#ifndef DISABLE_BROWSER
|
||||
sc_init_one(&writefile_list[2], NANO_TOFILES_KEY, _("To Files"),
|
||||
nano_tofiles_msg, 0, 0, 0, NOVIEW, 0);
|
||||
#endif
|
||||
|
||||
sc_init_one(&writefile_list[0], NANO_CANCEL_KEY, _("Cancel"),
|
||||
sc_init_one(&writefile_list[WRITEFILE_LIST_LEN - 1], NANO_APPEND_KEY, _("Append"),
|
||||
nano_append_msg, 0, 0, 0, NOVIEW, 0);
|
||||
|
||||
sc_init_one(&insertfile_list[0], NANO_HELP_KEY,
|
||||
_("Get Help"), nano_help_msg, 0, 0, 0, VIEW, do_help);
|
||||
|
||||
sc_init_one(&insertfile_list[1], NANO_CANCEL_KEY, _("Cancel"),
|
||||
nano_cancel_msg, 0, 0, 0, VIEW, 0);
|
||||
|
||||
sc_init_one(&spell_list[0], NANO_HELP_KEY, _("Get Help"),
|
||||
nano_help_msg, 0, 0, 0, VIEW, do_help);
|
||||
#ifndef DISABLE_BROWSER
|
||||
sc_init_one(&insertfile_list[2], NANO_TOFILES_KEY, _("To Files"),
|
||||
nano_tofiles_msg, 0, 0, 0, NOVIEW, 0);
|
||||
#endif
|
||||
|
||||
sc_init_one(&spell_list[0], NANO_HELP_KEY,
|
||||
_("Get Help"), nano_help_msg, 0, 0, 0, VIEW, do_help);
|
||||
|
||||
sc_init_one(&spell_list[1], NANO_CANCEL_KEY, _("Cancel"),
|
||||
nano_cancel_msg, 0, 0, 0, VIEW, 0);
|
||||
|
||||
|
||||
#ifndef DISABLE_BROWSER
|
||||
sc_init_one(&browser_list[0], NANO_HELP_KEY,
|
||||
_("Get Help"), nano_help_msg, 0, 0, 0, VIEW, do_help);
|
||||
|
||||
sc_init_one(&browser_list[1], NANO_EXIT_KEY, _("Exit"),
|
||||
nano_exit_msg, 0, NANO_EXIT_FKEY, 0, VIEW, 0);
|
||||
|
||||
sc_init_one(&browser_list[2], NANO_PREVPAGE_KEY, _("Prev Page"),
|
||||
nano_prevpage_msg,
|
||||
0, NANO_PREVPAGE_FKEY, KEY_PPAGE, VIEW, 0);
|
||||
|
||||
sc_init_one(&browser_list[3], NANO_NEXTPAGE_KEY, _("Next Page"),
|
||||
nano_nextpage_msg,
|
||||
0, NANO_NEXTPAGE_FKEY, KEY_NPAGE, VIEW, 0);
|
||||
|
||||
sc_init_one(&browser_list[4], NANO_GOTO_KEY, _("Goto"),
|
||||
nano_gotodir_msg, 0, NANO_GOTO_FKEY, 0, VIEW, 0);
|
||||
|
||||
sc_init_one(&gotodir_list[0], NANO_HELP_KEY,
|
||||
_("Get Help"), nano_help_msg, 0, 0, 0, VIEW, do_help);
|
||||
|
||||
sc_init_one(&gotodir_list[1], NANO_CANCEL_KEY, _("Cancel"),
|
||||
nano_cancel_msg, 0, 0, 0, VIEW, 0);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
toggle_init();
|
||||
}
|
||||
|
||||
3
intl/.cvsignore
Normal file
3
intl/.cvsignore
Normal file
@@ -0,0 +1,3 @@
|
||||
Makefile
|
||||
libintl.h
|
||||
po2tbl.sed
|
||||
@@ -171,7 +171,7 @@ mostlyclean:
|
||||
clean: mostlyclean
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile ID TAGS po2msg.sed po2tbl.sed
|
||||
rm -f Makefile ID TAGS po2msg.sed po2tbl.sed libintl.h
|
||||
|
||||
maintainer-clean: distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
|
||||
329
m4/gettext.m4
Normal file
329
m4/gettext.m4
Normal file
@@ -0,0 +1,329 @@
|
||||
# Macro to add for using GNU gettext.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
#
|
||||
# This file can 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.
|
||||
|
||||
# serial 108
|
||||
|
||||
AC_PREREQ(2.13) dnl Minimum Autoconf version required.
|
||||
|
||||
AC_DEFUN(NANO_AM_WITH_NLS,
|
||||
[AC_MSG_CHECKING([whether NLS is requested])
|
||||
dnl Default is enabled NLS
|
||||
AC_ARG_ENABLE(nls,
|
||||
[ --disable-nls do not use Native Language Support],
|
||||
USE_NLS=$enableval, USE_NLS=yes)
|
||||
AC_MSG_RESULT($USE_NLS)
|
||||
AC_SUBST(USE_NLS)
|
||||
|
||||
USE_INCLUDED_LIBINTL=no
|
||||
|
||||
AC_ARG_WITH(locale-dir,
|
||||
[ --with-locale-dir=DIR specify locale directory],
|
||||
LOCALE_DIR=$withval)
|
||||
test -z "$LOCALE_DIR" && LOCALE_DIR='$(datadir)/locale'
|
||||
AC_SUBST(LOCALE_DIR)
|
||||
|
||||
AC_ARG_WITH(gnu-locale-dir,
|
||||
[ --with-gnu-locale-dir=DIR specify GNU locale directory],
|
||||
GNU_LOCALE_DIR=$withval)
|
||||
test -z "$GNU_LOCALE_DIR" && GNU_LOCALE_DIR='$(prefix)/share/locale'
|
||||
AC_SUBST(GNU_LOCALE_DIR)
|
||||
|
||||
dnl If we use NLS figure out what method
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested.])
|
||||
AC_MSG_CHECKING([whether included gettext is requested])
|
||||
AC_ARG_WITH(included-gettext,
|
||||
[ --with-included-gettext use the GNU gettext library included here],
|
||||
nls_cv_force_use_gnu_gettext=$withval,
|
||||
nls_cv_force_use_gnu_gettext=no)
|
||||
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
|
||||
|
||||
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
||||
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
||||
dnl User does not insist on using GNU NLS library. Figure out what
|
||||
dnl to use. If gettext or catgets are available (in this order) we
|
||||
dnl use this. Else we have to fall back to GNU NLS library.
|
||||
dnl catgets is only used if permitted by option --with-catgets.
|
||||
nls_cv_header_intl=
|
||||
nls_cv_header_libgt=
|
||||
CATOBJEXT=NONE
|
||||
|
||||
AC_CHECK_HEADER(libintl.h,
|
||||
[AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
|
||||
[AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
|
||||
gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
|
||||
|
||||
if test "$gt_cv_func_gettext_libc" != "yes"; then
|
||||
AC_CHECK_LIB(intl, bindtextdomain,
|
||||
[AC_CHECK_LIB(intl, gettext)])
|
||||
fi
|
||||
|
||||
if test "$gt_cv_func_gettext_libc" = "yes" \
|
||||
|| test "$ac_cv_lib_intl_gettext" = "yes"; then
|
||||
AC_DEFINE(HAVE_GETTEXT, 1,
|
||||
[Define to 1 if you have gettext and don't want to use GNU gettext.])
|
||||
NANO_AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
|
||||
if test "$MSGFMT" != "no"; then
|
||||
AC_CHECK_FUNCS(dcgettext)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
NANO_AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
|
||||
return _nl_msg_cat_cntr],
|
||||
[CATOBJEXT=.gmo
|
||||
DATADIRNAME=share],
|
||||
[CATOBJEXT=.mo
|
||||
DATADIRNAME=lib])
|
||||
INSTOBJEXT=.mo
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
if test "$CATOBJEXT" = "NONE"; then
|
||||
AC_MSG_CHECKING([whether catgets can be used])
|
||||
AC_ARG_WITH(catgets,
|
||||
[ --with-catgets use catgets functions if available],
|
||||
nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
|
||||
AC_MSG_RESULT($nls_cv_use_catgets)
|
||||
|
||||
if test "$nls_cv_use_catgets" = "yes"; then
|
||||
dnl No gettext in C library. Try catgets next.
|
||||
AC_CHECK_LIB(i, main)
|
||||
AC_CHECK_FUNC(catgets,
|
||||
[AC_DEFINE(HAVE_CATGETS, 1,
|
||||
[Define as 1 if you have catgets and don't want to use GNU gettext.])
|
||||
INTLOBJS="\$(CATOBJS)"
|
||||
AC_PATH_PROG(GENCAT, gencat, no)dnl
|
||||
if test "$GENCAT" != "no"; then
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
|
||||
if test "$GMSGFMT" = "no"; then
|
||||
NANO_AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
|
||||
fi
|
||||
NANO_AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
USE_INCLUDED_LIBINTL=yes
|
||||
CATOBJEXT=.cat
|
||||
INSTOBJEXT=.cat
|
||||
DATADIRNAME=lib
|
||||
INTLDEPS='$(top_builddir)/intl/libintl.a'
|
||||
INTLLIBS=$INTLDEPS
|
||||
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||
nls_cv_header_intl=intl/libintl.h
|
||||
nls_cv_header_libgt=intl/libgettext.h
|
||||
fi])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$CATOBJEXT" = "NONE"; then
|
||||
dnl Neither gettext nor catgets in included in the C library.
|
||||
dnl Fall back on GNU gettext library.
|
||||
nls_cv_use_gnu_gettext=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
dnl Mark actions used to generate GNU NLS library.
|
||||
INTLOBJS="\$(GETTOBJS)"
|
||||
NANO_AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
NANO_AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
AC_SUBST(MSGFMT)
|
||||
USE_INCLUDED_LIBINTL=yes
|
||||
CATOBJEXT=.gmo
|
||||
INSTOBJEXT=.mo
|
||||
DATADIRNAME=share
|
||||
INTLDEPS='$(top_builddir)/intl/libintl.a'
|
||||
INTLLIBS=$INTLDEPS
|
||||
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||
nls_cv_header_intl=intl/libintl.h
|
||||
nls_cv_header_libgt=intl/libgettext.h
|
||||
fi
|
||||
|
||||
dnl Test whether we really found GNU xgettext.
|
||||
if test "$XGETTEXT" != ":"; then
|
||||
dnl If it is no GNU xgettext we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
|
||||
: ;
|
||||
else
|
||||
AC_MSG_RESULT(
|
||||
[found xgettext program is not GNU xgettext; ignore it])
|
||||
XGETTEXT=":"
|
||||
fi
|
||||
fi
|
||||
|
||||
# We need to process the po/ directory.
|
||||
POSUB=po
|
||||
else
|
||||
DATADIRNAME=share
|
||||
nls_cv_header_intl=intl/libintl.h
|
||||
nls_cv_header_libgt=intl/libgettext.h
|
||||
fi
|
||||
if test -z "$nls_cv_header_intl"; then
|
||||
# Clean out junk possibly left behind by a previous configuration.
|
||||
rm -f intl/libintl.h
|
||||
fi
|
||||
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
|
||||
AC_OUTPUT_COMMANDS(
|
||||
[case "$CONFIG_FILES" in *po/Makefile.in*)
|
||||
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
|
||||
esac])
|
||||
|
||||
|
||||
# If this is used in GNU gettext we have to set USE_NLS to `yes'
|
||||
# because some of the sources are only built for this goal.
|
||||
if test "$PACKAGE" = gettext; then
|
||||
USE_NLS=yes
|
||||
USE_INCLUDED_LIBINTL=yes
|
||||
fi
|
||||
|
||||
dnl These rules are solely for the distribution goal. While doing this
|
||||
dnl we only have to keep exactly one list of the available catalogs
|
||||
dnl in configure.in.
|
||||
for lang in $ALL_LINGUAS; do
|
||||
GMOFILES="$GMOFILES $lang.gmo"
|
||||
POFILES="$POFILES $lang.po"
|
||||
done
|
||||
|
||||
dnl Make all variables we use known to autoconf.
|
||||
AC_SUBST(USE_INCLUDED_LIBINTL)
|
||||
AC_SUBST(CATALOGS)
|
||||
AC_SUBST(CATOBJEXT)
|
||||
AC_SUBST(DATADIRNAME)
|
||||
AC_SUBST(GMOFILES)
|
||||
AC_SUBST(INSTOBJEXT)
|
||||
AC_SUBST(INTLDEPS)
|
||||
AC_SUBST(INTLLIBS)
|
||||
AC_SUBST(INTLOBJS)
|
||||
AC_SUBST(POFILES)
|
||||
AC_SUBST(POSUB)
|
||||
])
|
||||
|
||||
AC_DEFUN(NANO_AM_GNU_GETTEXT,
|
||||
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_ISC_POSIX])dnl
|
||||
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||
AC_REQUIRE([AC_C_CONST])dnl
|
||||
AC_REQUIRE([AC_C_INLINE])dnl
|
||||
AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
||||
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
||||
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
||||
|
||||
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
|
||||
unistd.h sys/param.h])
|
||||
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
|
||||
strdup __argz_count __argz_stringify __argz_next])
|
||||
|
||||
if test "${ac_cv_func_stpcpy+set}" != "set"; then
|
||||
AC_CHECK_FUNCS(stpcpy)
|
||||
fi
|
||||
if test "${ac_cv_func_stpcpy}" = "yes"; then
|
||||
AC_DEFINE(HAVE_STPCPY, 1, [Define to 1 if you have the stpcpy function.])
|
||||
fi
|
||||
|
||||
NANO_AM_LC_MESSAGES
|
||||
NANO_AM_WITH_NLS
|
||||
|
||||
if test "x$CATOBJEXT" != "x"; then
|
||||
if test "x$ALL_LINGUAS" = "x"; then
|
||||
LINGUAS=
|
||||
else
|
||||
AC_MSG_CHECKING(for catalogs to be installed)
|
||||
NEW_LINGUAS=
|
||||
for lang in ${LINGUAS=$ALL_LINGUAS}; do
|
||||
case "$ALL_LINGUAS" in
|
||||
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
|
||||
esac
|
||||
done
|
||||
LINGUAS=$NEW_LINGUAS
|
||||
AC_MSG_RESULT($LINGUAS)
|
||||
fi
|
||||
|
||||
dnl Construct list of names of catalog files to be constructed.
|
||||
if test -n "$LINGUAS"; then
|
||||
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl The reference to <locale.h> in the installed <libintl.h> file
|
||||
dnl must be resolved because we cannot expect the users of this
|
||||
dnl to define HAVE_LOCALE_H.
|
||||
if test $ac_cv_header_locale_h = yes; then
|
||||
INCLUDE_LOCALE_H="#include <locale.h>"
|
||||
else
|
||||
INCLUDE_LOCALE_H="\
|
||||
/* The system does not provide the header <locale.h>. Take care yourself. */"
|
||||
fi
|
||||
AC_SUBST(INCLUDE_LOCALE_H)
|
||||
|
||||
dnl Determine which catalog format we have (if any is needed)
|
||||
dnl For now we know about two different formats:
|
||||
dnl Linux libc-5 and the normal X/Open format
|
||||
test -d intl || mkdir intl
|
||||
if test "$CATOBJEXT" = ".cat"; then
|
||||
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
|
||||
|
||||
dnl Transform the SED scripts while copying because some dumb SEDs
|
||||
dnl cannot handle comments.
|
||||
sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
|
||||
fi
|
||||
dnl po2tbl.sed is always needed.
|
||||
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
|
||||
$srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
|
||||
|
||||
dnl In the intl/Makefile.in we have a special dependency which makes
|
||||
dnl only sense for gettext. We comment this out for non-gettext
|
||||
dnl packages.
|
||||
if test "$PACKAGE" = "gettext"; then
|
||||
GT_NO="#NO#"
|
||||
GT_YES=
|
||||
else
|
||||
GT_NO=
|
||||
GT_YES="#YES#"
|
||||
fi
|
||||
AC_SUBST(GT_NO)
|
||||
AC_SUBST(GT_YES)
|
||||
|
||||
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
|
||||
dnl Try to locate is.
|
||||
MKINSTALLDIRS=
|
||||
if test -n "$ac_aux_dir"; then
|
||||
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
||||
fi
|
||||
if test -z "$MKINSTALLDIRS"; then
|
||||
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
||||
fi
|
||||
AC_SUBST(MKINSTALLDIRS)
|
||||
|
||||
dnl *** For now the libtool support in intl/Makefile is not for real.
|
||||
l=
|
||||
AC_SUBST(l)
|
||||
|
||||
dnl Generate list of files to be processed by xgettext which will
|
||||
dnl be included in po/Makefile.
|
||||
test -d po || mkdir po
|
||||
case "$srcdir" in
|
||||
.)
|
||||
posrcprefix="../" ;;
|
||||
/* | [[A-Za-z]]:*)
|
||||
posrcprefix="$srcdir/" ;;
|
||||
*)
|
||||
posrcprefix="../$srcdir/" ;;
|
||||
esac
|
||||
rm -f po/POTFILES
|
||||
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
|
||||
< $srcdir/po/POTFILES.in > po/POTFILES
|
||||
])
|
||||
92
m4/largefile.m4
Normal file
92
m4/largefile.m4
Normal file
@@ -0,0 +1,92 @@
|
||||
#serial 19
|
||||
|
||||
dnl By default, many hosts won't let programs access large files;
|
||||
dnl one must use special compiler options to get large-file access to work.
|
||||
dnl For more details about this brain damage please see:
|
||||
dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
|
||||
|
||||
dnl Written by Paul Eggert <eggert@twinsun.com>.
|
||||
|
||||
dnl Internal subroutine of AC_SYS_LARGEFILE.
|
||||
dnl AC_SYS_LARGEFILE_TEST_INCLUDES
|
||||
AC_DEFUN(AC_SYS_LARGEFILE_TEST_INCLUDES,
|
||||
[[#include <sys/types.h>
|
||||
/* Check that off_t can represent 2**63 - 1 correctly.
|
||||
We can't simply "#define LARGE_OFF_T 9223372036854775807",
|
||||
since some C++ compilers masquerading as C compilers
|
||||
incorrectly reject 9223372036854775807. */
|
||||
# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
]])
|
||||
|
||||
dnl Internal subroutine of AC_SYS_LARGEFILE.
|
||||
dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, CACHE-VAR, COMMENT, INCLUDES, FUNCTION-BODY)
|
||||
AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE,
|
||||
[AC_CACHE_CHECK([for $1 value needed for large files], $3,
|
||||
[$3=no
|
||||
AC_TRY_COMPILE([$5],
|
||||
[$6],
|
||||
,
|
||||
[AC_TRY_COMPILE([#define $1 $2]
|
||||
[$5]
|
||||
,
|
||||
[$6],
|
||||
[$3=$2])])])
|
||||
if test "[$]$3" != no; then
|
||||
AC_DEFINE_UNQUOTED([$1], [$]$3, [$4])
|
||||
fi])
|
||||
|
||||
AC_DEFUN(NANO_AC_SYS_LARGEFILE,
|
||||
[AC_REQUIRE([AC_PROG_CC])
|
||||
AC_ARG_ENABLE(largefile,
|
||||
[ --disable-largefile omit support for large files])
|
||||
if test "$enable_largefile" != no; then
|
||||
|
||||
AC_CACHE_CHECK([for special C compiler options needed for large files],
|
||||
ac_cv_sys_largefile_CC,
|
||||
[ac_cv_sys_largefile_CC=no
|
||||
if test "$GCC" != yes; then
|
||||
# IRIX 6.2 and later do not support large files by default,
|
||||
# so use the C compiler's -n32 option if that helps.
|
||||
AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, , ,
|
||||
[ac_save_CC="$CC"
|
||||
CC="$CC -n32"
|
||||
AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, ,
|
||||
ac_cv_sys_largefile_CC=' -n32')
|
||||
CC="$ac_save_CC"])
|
||||
fi])
|
||||
if test "$ac_cv_sys_largefile_CC" != no; then
|
||||
CC="$CC$ac_cv_sys_largefile_CC"
|
||||
fi
|
||||
|
||||
AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64,
|
||||
ac_cv_sys_file_offset_bits,
|
||||
[Number of bits in a file offset, on hosts where this is settable.],
|
||||
AC_SYS_LARGEFILE_TEST_INCLUDES)
|
||||
AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1,
|
||||
ac_cv_sys_large_files,
|
||||
[Define for large files, on AIX-style hosts.],
|
||||
AC_SYS_LARGEFILE_TEST_INCLUDES)
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_FUNC_FSEEKO,
|
||||
[AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1,
|
||||
ac_cv_sys_largefile_source,
|
||||
[Define to make fseeko visible on some hosts (e.g. glibc 2.2).],
|
||||
[#include <stdio.h>], [return !fseeko;])
|
||||
# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
|
||||
# in glibc 2.1.3, but that breaks too many other things.
|
||||
# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
|
||||
|
||||
AC_CACHE_CHECK([for fseeko], ac_cv_func_fseeko,
|
||||
[ac_cv_func_fseeko=no
|
||||
AC_TRY_LINK([#include <stdio.h>],
|
||||
[return fseeko && fseeko (stdin, 0, 0);],
|
||||
[ac_cv_func_fseeko=yes])])
|
||||
if test $ac_cv_func_fseeko != no; then
|
||||
AC_DEFINE(HAVE_FSEEKO, 1,
|
||||
[Define if fseeko (and presumably ftello) exists and is declared.])
|
||||
fi])
|
||||
22
m4/lcmessage.m4
Normal file
22
m4/lcmessage.m4
Normal file
@@ -0,0 +1,22 @@
|
||||
# Check whether LC_MESSAGES is available in <locale.h>.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
#
|
||||
# This file can 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.
|
||||
|
||||
# serial 2
|
||||
|
||||
AC_PREREQ(2.13) dnl Minimum Autoconf version required.
|
||||
|
||||
AC_DEFUN(NANO_AM_LC_MESSAGES,
|
||||
[if test $ac_cv_header_locale_h = yes; then
|
||||
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
||||
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
||||
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
|
||||
if test $am_cv_val_LC_MESSAGES = yes; then
|
||||
AC_DEFINE(HAVE_LC_MESSAGES, 1,
|
||||
[Define if your locale.h file contains LC_MESSAGES.])
|
||||
fi
|
||||
fi])
|
||||
47
m4/progtest.m4
Normal file
47
m4/progtest.m4
Normal file
@@ -0,0 +1,47 @@
|
||||
# Search path for a program which passes the given test.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
#
|
||||
# This file can 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.
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
||||
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
||||
AC_DEFUN(NANO_AM_PATH_PROG_WITH_TEST,
|
||||
[# Extract the first word of "$2", so it can be a program name with args.
|
||||
set dummy $2; ac_word=[$]2
|
||||
AC_MSG_CHECKING([for $ac_word])
|
||||
AC_CACHE_VAL(ac_cv_path_$1,
|
||||
[case "[$]$1" in
|
||||
/*)
|
||||
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in ifelse([$5], , $PATH, [$5]); do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
if [$3]; then
|
||||
ac_cv_path_$1="$ac_dir/$ac_word"
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
dnl If no 4th arg is given, leave the cache variable unset,
|
||||
dnl so AC_PATH_PROGS will keep looking.
|
||||
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
|
||||
])dnl
|
||||
;;
|
||||
esac])dnl
|
||||
$1="$ac_cv_path_$1"
|
||||
if test -n "[$]$1"; then
|
||||
AC_MSG_RESULT([$]$1)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AC_SUBST($1)dnl
|
||||
])
|
||||
82
move.c
82
move.c
@@ -1,10 +1,11 @@
|
||||
/* $Id$ */
|
||||
/**************************************************************************
|
||||
* move.c *
|
||||
* *
|
||||
* Copyright (C) 1999 Chris Allegretta *
|
||||
* Copyright (C) 1999-2002 Chris Allegretta *
|
||||
* This program 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 1, or (at your option) *
|
||||
* the Free Software Foundation; either version 2, or (at your option) *
|
||||
* any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
@@ -18,10 +19,11 @@
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "config.h"
|
||||
#include "proto.h"
|
||||
#include "nano.h"
|
||||
|
||||
@@ -32,20 +34,24 @@
|
||||
#define _(string) (string)
|
||||
#endif
|
||||
|
||||
void page_down_center(void)
|
||||
void page_down(void)
|
||||
{
|
||||
if (editbot != filebot) {
|
||||
edit_update(editbot->next);
|
||||
center_cursor();
|
||||
if (!ISSET(SMOOTHSCROLL)) {
|
||||
if (editbot != filebot) {
|
||||
edit_update(editbot->next, CENTER);
|
||||
center_cursor();
|
||||
} else {
|
||||
while (current != filebot)
|
||||
current = current->next;
|
||||
edit_update(current, CENTER);
|
||||
}
|
||||
} else {
|
||||
while (current != filebot)
|
||||
current = current->next;
|
||||
edit_update(current);
|
||||
edit_update(editbot, NONE);
|
||||
}
|
||||
update_cursor();
|
||||
}
|
||||
|
||||
int page_down(void)
|
||||
int do_page_down(void)
|
||||
{
|
||||
wrap_reset();
|
||||
current_x = 0;
|
||||
@@ -54,15 +60,27 @@ int page_down(void)
|
||||
if (current == filebot)
|
||||
return 0;
|
||||
|
||||
if (editbot != filebot) {
|
||||
/* AHEM, if we only have a screen or less of text, DON'T do an
|
||||
edit_update, just move the cursor to editbot! */
|
||||
if (edittop == fileage && editbot == filebot && totlines < editwinrows) {
|
||||
current = editbot;
|
||||
reset_cursor();
|
||||
} else if (editbot != filebot || edittop == fileage) {
|
||||
current_y = 0;
|
||||
current = editbot;
|
||||
edit_update_top(current);
|
||||
} else
|
||||
|
||||
if (current->prev != NULL)
|
||||
current = current->prev;
|
||||
if (current->prev != NULL)
|
||||
current = current->prev;
|
||||
edit_update(current, TOP);
|
||||
} else {
|
||||
while (current != filebot) {
|
||||
current = current->next;
|
||||
current_y++;
|
||||
}
|
||||
edit_update(edittop, TOP);
|
||||
}
|
||||
|
||||
update_cursor();
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
@@ -72,6 +90,7 @@ int page_down(void)
|
||||
|
||||
int do_home(void)
|
||||
{
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
current_x = 0;
|
||||
placewewant = 0;
|
||||
update_line(current, current_x);
|
||||
@@ -80,6 +99,7 @@ int do_home(void)
|
||||
|
||||
int do_end(void)
|
||||
{
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
current_x = strlen(current->data);
|
||||
placewewant = xplustabs();
|
||||
update_line(current, current_x);
|
||||
@@ -108,7 +128,7 @@ int do_down(void)
|
||||
if (current_y < editwinrows - 1 && current != editbot)
|
||||
current_y++;
|
||||
else
|
||||
page_down_center();
|
||||
page_down();
|
||||
|
||||
update_cursor();
|
||||
update_line(current->prev, 0);
|
||||
@@ -118,11 +138,23 @@ int do_down(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
void page_up_center(void)
|
||||
void page_up(void)
|
||||
{
|
||||
if (edittop != fileage) {
|
||||
edit_update(edittop);
|
||||
center_cursor();
|
||||
if (!ISSET(SMOOTHSCROLL)) {
|
||||
edit_update(edittop, CENTER);
|
||||
/* Now that we've updated the edit window, edittop might be
|
||||
at the top of the file; if so, just move the cursor up one
|
||||
line and don't center it. */
|
||||
if (edittop != fileage)
|
||||
center_cursor();
|
||||
else {
|
||||
current = current->prev;
|
||||
reset_cursor();
|
||||
}
|
||||
} else {
|
||||
edit_update(edittop->prev, NONE);
|
||||
}
|
||||
} else
|
||||
current_y = 0;
|
||||
|
||||
@@ -130,8 +162,10 @@ void page_up_center(void)
|
||||
|
||||
}
|
||||
|
||||
int page_up(void)
|
||||
int do_page_up(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
wrap_reset();
|
||||
current_x = 0;
|
||||
placewewant = 0;
|
||||
@@ -140,7 +174,11 @@ int page_up(void)
|
||||
return 0;
|
||||
|
||||
current_y = 0;
|
||||
edit_update_bot(edittop);
|
||||
current = edittop;
|
||||
for (i = 0; i <= editwinrows - 3 && current->prev != NULL; i++)
|
||||
current = current->prev;
|
||||
|
||||
edit_update(current, TOP);
|
||||
update_cursor();
|
||||
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
@@ -153,8 +191,6 @@ int do_up(void)
|
||||
{
|
||||
wrap_reset();
|
||||
if (current->prev != NULL) {
|
||||
update_line(current, 0);
|
||||
|
||||
if (placewewant > 0)
|
||||
current_x = actual_x(current->prev, placewewant);
|
||||
|
||||
@@ -164,7 +200,7 @@ int do_up(void)
|
||||
if (current_y > 0)
|
||||
current_y--;
|
||||
else
|
||||
page_up_center();
|
||||
page_up();
|
||||
|
||||
update_cursor();
|
||||
update_line(current->next, 0);
|
||||
|
||||
116
nano.1
116
nano.1
@@ -1,20 +1,14 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" First parameter, NAME, should be all caps
|
||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||
.\" other parameters are allowed: see man(7), man(1)
|
||||
.TH NANO 1 "January 4, 2000"
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" nano.1 is copyright 1999-2002 by
|
||||
.\" Chris Allegretta <chrisa@asty.org>
|
||||
.\"
|
||||
.\" This is free documentation, see the latest version of the GNU General
|
||||
.\" Public License for copying conditions. There is NO warranty.
|
||||
.\"
|
||||
.\" $Id$
|
||||
.TH NANO 1 "January 3, 2002"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
.\" .nh disable hyphenation
|
||||
.\" .hy enable hyphenation
|
||||
.\" .ad l left justify
|
||||
.\" .ad b justify to both left and right margins
|
||||
.\" .nf disable filling
|
||||
.\" .fi enable filling
|
||||
.\" .br insert line break
|
||||
.\" .sp <n> insert n+1 empty lines
|
||||
.\" for manpage-specific macros, see man(7)
|
||||
.SH NAME
|
||||
nano \- Nano's ANOther editor, an enhanced free Pico Clone
|
||||
.SH SYNOPSIS
|
||||
@@ -27,53 +21,83 @@ This manual page documents briefly the
|
||||
command.
|
||||
.PP
|
||||
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
|
||||
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
|
||||
.\" \fI<whatever>\fP escape sequences to invoke bold face and italics,
|
||||
.\" respectively.
|
||||
\fBnano\fP was originally known as TIP (TIP Isn't Pico). It is a small,
|
||||
free and friendly editor which aims to replace Pico, the default editor
|
||||
included in the non-free Pine package. Rather than just copying Pico's
|
||||
look and feel,
|
||||
\fBnano\fP is a small, free and friendly editor which aims to replace
|
||||
Pico, the default editor included in the non-free Pine package. Rather
|
||||
than just copying Pico's look and feel,
|
||||
.B nano
|
||||
also implements some missing (or disabled by
|
||||
default) features in Pico, such as "search and replace" and "goto line
|
||||
number".
|
||||
also implements some missing (or disabled by default) features in Pico,
|
||||
such as "search and replace" and "goto line number".
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-T (\-\-tabsize)
|
||||
Set the size (width) of a tab, if supported by your curses library.
|
||||
.B \-D (\-\-dos)
|
||||
Write file in DOS format.
|
||||
.TP
|
||||
.B \-F (\-\-multibuffer)
|
||||
Enable multiple file buffers (if available).
|
||||
.TP
|
||||
.B \-K (\-\-keypad)
|
||||
Do not use the ncurses keypad() call unless necessary. Try this flag if
|
||||
you find that the arrow keys on the numeric keypad do not work for you
|
||||
under nano.
|
||||
.TP
|
||||
.B \-M (\-\-mac)
|
||||
Write file in Mac format.
|
||||
.TP
|
||||
.B \-R (\-\-regexp)
|
||||
Enable regular expression matching for search strings, as well as
|
||||
\\n subexpression replacement for replace strings, if available.
|
||||
.TP
|
||||
.B \-S (\-\-smooth)
|
||||
Enable smooth scrolling. Text will scroll line-by-line, instead of the
|
||||
usual chunk-by-chunk behaviour.
|
||||
.TP
|
||||
.B \-T [num] (\-\-tabsize=[num])
|
||||
Set the size (width) of a tab.
|
||||
.TP
|
||||
.B \-V (\-\-version)
|
||||
Show the current version number and author.
|
||||
.TP
|
||||
.B \-h (\-\-help)
|
||||
Display a summary of commandline options.
|
||||
.TP
|
||||
.B \-c (\-\-const)
|
||||
Constantly show the cursor position.
|
||||
.TP
|
||||
.B \-h (\-\-help)
|
||||
Display a summary of command line options.
|
||||
.TP
|
||||
.B \-i (\-\-autoindent)
|
||||
Indent new lines to the previous line's indentation. Useful when editing
|
||||
source code.
|
||||
.TP
|
||||
.B \-k (\-\-cut)
|
||||
Enable cut from cursor to end of line with ^K.
|
||||
.TP
|
||||
.B \-l (\-\-nofollow)
|
||||
If the file being edited is a symbolic link, replace the link with a
|
||||
a new file, do not follow it. Good for editing files in /tmp perhaps?
|
||||
a new file, do not follow it. Good for editing files in /tmp, perhaps?
|
||||
.TP
|
||||
.B \-m (\-\-mouse)
|
||||
Enable mouse support (if available for your system).
|
||||
.TP
|
||||
.B \-p (\-\-pico)
|
||||
Display the same shortcut lists as Pico does.
|
||||
.B \-o [dir] (\-\-operatingdir=[dir])
|
||||
Set operating directory. Makes nano set up something similar to a chroot.
|
||||
.TP
|
||||
.B \-s (\-\-speller)
|
||||
.B \-p (\-\-pico)
|
||||
Emulate Pico as closely as possible. This affects both the "shortcut list"
|
||||
at the bottom of the screen, as well as the display and entry of previous
|
||||
search and replace strings.
|
||||
.TP
|
||||
.B \-r [#cols] (\-\-fill=[#cols])
|
||||
Wrap lines at column #cols. By default, this is the width of the screen,
|
||||
less eight. If this value is negative, wrapping will occur at #cols from
|
||||
the right of the screen, allowing it to vary along with the screen width
|
||||
if the screen is resized.
|
||||
.TP
|
||||
.B \-s [prog] (\-\-speller=[prog])
|
||||
Enable alternative spell checker command.
|
||||
.TP
|
||||
.B \-t (\-\-tempfile)
|
||||
Always save changed buffer without prompting. Same as Pico -t option.
|
||||
Always save changed buffer without prompting. Same as Pico -t option.
|
||||
.TP
|
||||
.B \-v (\-\-view)
|
||||
View file (read only) mode.
|
||||
@@ -87,18 +111,34 @@ Disable help screen at bottom of editor.
|
||||
.B \-z (\-\-suspend)
|
||||
Enable suspend ability.
|
||||
.TP
|
||||
.B \-a, \-b, \-e, \-f, \-g, \-j
|
||||
Ignored, for compatibility with Pico.
|
||||
.TP
|
||||
.B \+LINE
|
||||
Places cursor at LINE on startup.
|
||||
.SH NOTES
|
||||
Nano will try to dump the buffer into an emergency file in some cases.
|
||||
Mainly, this will happen if Nano receives a SIGHUP or runs out of
|
||||
memory, when it will write the buffer into a file named "nano.save" if the
|
||||
buffer didn't have a name already, or will add a ".save" suffix to the
|
||||
current filename. In multibuffer mode, nano will write all the open buffers to
|
||||
the respective emergency files. Nano will \fBnot\fP write this file if a
|
||||
previous one exists in the current directory.
|
||||
.SH BUGS
|
||||
Please send any comments or bug reports to
|
||||
.B nano@asty.org.
|
||||
.br
|
||||
.B nano@nano-editor.org.
|
||||
.br
|
||||
The nano mailing list is available from
|
||||
.br
|
||||
.B nano-devel@lists.sourceforge.net.
|
||||
To subscribe, email to nano-devel-request@lists.sourceforge.net with a
|
||||
subject of "subscribe".
|
||||
.SH HOMEPAGE
|
||||
http://www.asty.org/nano
|
||||
http://www.nano-editor.org
|
||||
.SH AUTHOR
|
||||
Chris Allegretta <chrisa@asty.org>, et al. This manual page was
|
||||
originally written by Jordi Mallach <jordi@sindominio.net>, for the Debian
|
||||
GNU/Linux system (but may be used by others).
|
||||
Chris Allegretta <chrisa@asty.org>, et al (see AUTHORS and THANKS for
|
||||
details).
|
||||
This manual page was originally written by Jordi Mallach
|
||||
<jordi@sindominio.net>, for the Debian GNU/Linux system (but may be
|
||||
used by others).
|
||||
|
||||
129
nano.1.html
129
nano.1.html
@@ -3,21 +3,11 @@ Content-type: text/html
|
||||
<HTML><HEAD><TITLE>Manpage of NANO</TITLE>
|
||||
</HEAD><BODY>
|
||||
<H1>NANO</H1>
|
||||
Section: User Commands (1)<BR>Updated: January 4, 2000<BR><A HREF="#index">Index</A>
|
||||
Section: User Commands (1)<BR>Updated: January 3, 2002<BR><A HREF="#index">Index</A>
|
||||
<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<A NAME="lbAB"> </A>
|
||||
<H2>NAME</H2>
|
||||
|
||||
@@ -43,66 +33,104 @@ command.
|
||||
|
||||
|
||||
|
||||
<B>nano</B> was originally known as TIP (TIP Isn't Pico). It is a small,
|
||||
free and friendly editor which aims to replace Pico, the default editor
|
||||
included in the non-free Pine package. Rather than just copying Pico's
|
||||
look and feel,
|
||||
<B>nano</B> is a small, free and friendly editor which aims to replace
|
||||
Pico, the default editor included in the non-free Pine package. Rather
|
||||
than just copying Pico's look and feel,
|
||||
<B>nano</B>
|
||||
|
||||
also implements some missing (or disabled by
|
||||
default) features in Pico, such as "search and replace" and "goto line
|
||||
number".
|
||||
also implements some missing (or disabled by default) features in Pico,
|
||||
such as "search and replace" and "goto line number".
|
||||
<A NAME="lbAE"> </A>
|
||||
<H2>OPTIONS</H2>
|
||||
|
||||
<DL COMPACT>
|
||||
<DT><B>-T (--tabsize)</B>
|
||||
<DT><B>-D (--dos)</B>
|
||||
|
||||
<DD>
|
||||
Set the size (width) of a tab, if supported by your curses library.
|
||||
Write file in DOS format.
|
||||
<DT><B>-F (--multibuffer)</B>
|
||||
|
||||
<DD>
|
||||
Enable multiple file buffers (if available).
|
||||
<DT><B>-K (--keypad)</B>
|
||||
|
||||
<DD>
|
||||
Do not use the ncurses keypad() call unless necessary. Try this flag if
|
||||
you find that the arrow keys on the numeric keypad do not work for you
|
||||
under nano.
|
||||
<DT><B>-M (--mac)</B>
|
||||
|
||||
<DD>
|
||||
Write file in Mac format.
|
||||
<DT><B>-R (--regexp)</B>
|
||||
|
||||
<DD>
|
||||
Enable regular expression matching for search strings, as well as
|
||||
\n subexpression replacement for replace strings, if available.
|
||||
<DT><B>-S (--smooth)</B>
|
||||
|
||||
<DD>
|
||||
Enable smooth scrolling. Text will scroll line-by-line, instead of the
|
||||
usual chunk-by-chunk behaviour.
|
||||
<DT><B>-T [num] (--tabsize=[num])</B>
|
||||
|
||||
<DD>
|
||||
Set the size (width) of a tab.
|
||||
<DT><B>-V (--version)</B>
|
||||
|
||||
<DD>
|
||||
Show the current version number and author.
|
||||
<DT><B>-h (--help)</B>
|
||||
|
||||
<DD>
|
||||
Display a summary of commandline options.
|
||||
<DT><B>-c (--const)</B>
|
||||
|
||||
<DD>
|
||||
Constantly show the cursor position.
|
||||
<DT><B>-h (--help)</B>
|
||||
|
||||
<DD>
|
||||
Display a summary of command line options.
|
||||
<DT><B>-i (--autoindent)</B>
|
||||
|
||||
<DD>
|
||||
Indent new lines to the previous line's indentation. Useful when editing
|
||||
source code.
|
||||
<DT><B>-k (--cut)</B>
|
||||
|
||||
<DD>
|
||||
Enable cut from cursor to end of line with ^K.
|
||||
<DT><B>-l (--nofollow)</B>
|
||||
|
||||
<DD>
|
||||
If the file being edited is a symbolic link, replace the link with a
|
||||
a new file, do not follow it. Good for editing files in /tmp perhaps?
|
||||
a new file, do not follow it. Good for editing files in /tmp, perhaps?
|
||||
<DT><B>-m (--mouse)</B>
|
||||
|
||||
<DD>
|
||||
Enable mouse support (if available for your system).
|
||||
<DT><B>-o [dir] (--operatingdir=[dir])</B>
|
||||
|
||||
<DD>
|
||||
Set operating directory. Makes nano set up something similar to a chroot.
|
||||
<DT><B>-p (--pico)</B>
|
||||
|
||||
<DD>
|
||||
Display the same shortcut lists as Pico does.
|
||||
<DT><B>-s (--speller)</B>
|
||||
Emulate Pico as closely as possible. This affects both the "shortcut list"
|
||||
at the bottom of the screen, as well as the display and entry of previous
|
||||
search and replace strings.
|
||||
<DT><B>-r [#cols] (--fill=[#cols])</B>
|
||||
|
||||
<DD>
|
||||
Wrap lines at column #cols. By default, this is the width of the screen,
|
||||
less eight. If this value is negative, wrapping will occur at #cols from
|
||||
the right of the screen, allowing it to vary along with the screen width
|
||||
if the screen is resized.
|
||||
<DT><B>-s [prog] (--speller=[prog])</B>
|
||||
|
||||
<DD>
|
||||
Enable alternative spell checker command.
|
||||
<DT><B>-t (--tempfile)</B>
|
||||
|
||||
<DD>
|
||||
Always save changed buffer without prompting. Same as Pico -t option.
|
||||
Always save changed buffer without prompting. Same as Pico -t option.
|
||||
<DT><B>-v (--view)</B>
|
||||
|
||||
<DD>
|
||||
@@ -119,32 +147,54 @@ Disable help screen at bottom of editor.
|
||||
|
||||
<DD>
|
||||
Enable suspend ability.
|
||||
<DT><B>-a, -b, -e, -f, -g, -j</B>
|
||||
|
||||
<DD>
|
||||
Ignored, for compatibility with Pico.
|
||||
<DT><B>+LINE</B>
|
||||
|
||||
<DD>
|
||||
Places cursor at LINE on startup.
|
||||
</DL>
|
||||
<A NAME="lbAF"> </A>
|
||||
<H2>NOTES</H2>
|
||||
|
||||
Nano will try to dump the buffer into an emergency file in some cases.
|
||||
Mainly, this will happen if Nano receives a SIGHUP or runs out of
|
||||
memory, when it will write the buffer into a file named "nano.save" if the
|
||||
buffer didn't have a name already, or will add a ".save" suffix to the
|
||||
current filename. In multibuffer mode, nano will write all the open buffers to
|
||||
the respective emergency files. Nano will <B>not</B> write this file if a
|
||||
previous one exists in the current directory.
|
||||
<A NAME="lbAG"> </A>
|
||||
<H2>BUGS</H2>
|
||||
|
||||
Please send any comments or bug reports to
|
||||
<B><A HREF="mailto:nano@asty.org">nano@asty.org</A>.</B>
|
||||
<BR>
|
||||
|
||||
<B><A HREF="mailto:nano@nano-editor.org">nano@nano-editor.org</A>.</B>
|
||||
|
||||
<BR>
|
||||
|
||||
The nano mailing list is available from
|
||||
<BR>
|
||||
|
||||
<B><A HREF="mailto:nano-devel@lists.sourceforge.net">nano-devel@lists.sourceforge.net</A>.</B>
|
||||
|
||||
To subscribe, email to <A HREF="mailto:nano-devel-request@lists.sourceforge.net">nano-devel-request@lists.sourceforge.net</A> with a
|
||||
subject of "subscribe".
|
||||
<A NAME="lbAG"> </A>
|
||||
<A NAME="lbAH"> </A>
|
||||
<H2>HOMEPAGE</H2>
|
||||
|
||||
<A HREF="http://www.asty.org/nano">http://www.asty.org/nano</A>
|
||||
<A NAME="lbAH"> </A>
|
||||
<A HREF="http://www.nano-editor.org">http://www.nano-editor.org</A>
|
||||
<A NAME="lbAI"> </A>
|
||||
<H2>AUTHOR</H2>
|
||||
|
||||
Chris Allegretta <<A HREF="mailto:chrisa@asty.org">chrisa@asty.org</A>>, et al. This manual page was
|
||||
originally written by Jordi Mallach <<A HREF="mailto:jordi@sindominio.net">jordi@sindominio.net</A>>, for the Debian
|
||||
GNU/Linux system (but may be used by others).
|
||||
Chris Allegretta <<A HREF="mailto:chrisa@asty.org">chrisa@asty.org</A>>, et al (see AUTHORS and THANKS for
|
||||
details).
|
||||
This manual page was originally written by Jordi Mallach
|
||||
<<A HREF="mailto:jordi@sindominio.net">jordi@sindominio.net</A>>, for the Debian GNU/Linux system (but may be
|
||||
used by others).
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
@@ -154,14 +204,15 @@ GNU/Linux system (but may be used by others).
|
||||
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
|
||||
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
|
||||
<DT><A HREF="#lbAE">OPTIONS</A><DD>
|
||||
<DT><A HREF="#lbAF">BUGS</A><DD>
|
||||
<DT><A HREF="#lbAG">HOMEPAGE</A><DD>
|
||||
<DT><A HREF="#lbAH">AUTHOR</A><DD>
|
||||
<DT><A HREF="#lbAF">NOTES</A><DD>
|
||||
<DT><A HREF="#lbAG">BUGS</A><DD>
|
||||
<DT><A HREF="#lbAH">HOMEPAGE</A><DD>
|
||||
<DT><A HREF="#lbAI">AUTHOR</A><DD>
|
||||
</DL>
|
||||
<HR>
|
||||
This document was created by
|
||||
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
|
||||
using the manual pages.<BR>
|
||||
Time: 04:20:00 GMT, July 07, 2000
|
||||
Time: 04:02:51 GMT, January 05, 2002
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
207
nano.h
207
nano.h
@@ -1,10 +1,11 @@
|
||||
/* $Id$ */
|
||||
/**************************************************************************
|
||||
* nano.h *
|
||||
* *
|
||||
* Copyright (C) 1999 Chris Allegretta *
|
||||
* Copyright (C) 1999-2002 Chris Allegretta *
|
||||
* This program 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 1, or (at your option) *
|
||||
* the Free Software Foundation; either version 2, or (at your option) *
|
||||
* any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
@@ -33,6 +34,7 @@
|
||||
#define SET(bit) flags |= bit
|
||||
#define UNSET(bit) flags &= ~bit
|
||||
#define ISSET(bit) (flags & bit)
|
||||
#define TOGGLE(bit) flags ^= bit
|
||||
|
||||
|
||||
#ifdef USE_SLANG /* Slang support enabled */
|
||||
@@ -44,11 +46,6 @@
|
||||
#include <curses.h>
|
||||
#endif /* CURSES_H */
|
||||
|
||||
#ifndef HAVE_TABSIZE
|
||||
static int TABSIZE = 8;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_LIBINTL_H
|
||||
#include <libintl.h>
|
||||
#endif
|
||||
@@ -65,14 +62,30 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define VERMSG "nano " VERSION
|
||||
#define VERMSG "GNU nano " VERSION
|
||||
|
||||
#if defined(DISABLE_WRAPPING) && defined(DISABLE_JUSTIFY)
|
||||
#define DISABLE_WRAPJUSTIFY 1
|
||||
#endif
|
||||
|
||||
/* Structure types */
|
||||
typedef struct filestruct {
|
||||
char *data;
|
||||
struct filestruct *next; /* Next node */
|
||||
struct filestruct *prev; /* Previous node */
|
||||
long lineno; /* The line number */
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
struct filestruct *file; /* Current file */
|
||||
int file_current_x; /* Current file's x-coordinate position */
|
||||
int file_current_y; /* Current file's y-coordinate position */
|
||||
int file_modified; /* Current file's modification status */
|
||||
char *file_path; /* Current file's full path location */
|
||||
int file_placewewant; /* Current file's place we want */
|
||||
int file_totlines; /* Current file's total number of lines */
|
||||
long file_totsize; /* Current file's total size */
|
||||
#endif
|
||||
|
||||
int lineno; /* The line number */
|
||||
} filestruct;
|
||||
|
||||
typedef struct shortcut {
|
||||
@@ -86,6 +99,45 @@ typedef struct shortcut {
|
||||
char *help; /* Help file entry text */
|
||||
} shortcut;
|
||||
|
||||
typedef struct toggle {
|
||||
int val; /* Sequence to toggle the key. Should only need 1 */
|
||||
char *desc; /* Description for when toggle is, uh, toggled,
|
||||
e.g. "Pico Messages"; we'll append Enabled or
|
||||
Disabled */
|
||||
int flag; /* What flag actually gets toggled */
|
||||
char override_ch; /* The character to display on the help screen,
|
||||
if it isn't NULL */
|
||||
} toggle;
|
||||
|
||||
#ifdef ENABLE_NANORC
|
||||
typedef struct rcoption {
|
||||
char *name;
|
||||
int flag;
|
||||
} rcoption;
|
||||
|
||||
#endif /* ENABLE_NANORC */
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
|
||||
#define COLORSTRNUM 16
|
||||
|
||||
typedef struct colorstr {
|
||||
char *val;
|
||||
struct colorstr *next;
|
||||
} colorstr;
|
||||
|
||||
typedef struct colortype {
|
||||
int fg;
|
||||
int bg;
|
||||
int bright;
|
||||
int pairnum;
|
||||
colorstr *str;
|
||||
struct colortype *next;
|
||||
} colortype;
|
||||
|
||||
#endif /* ENABLE_COLOR */
|
||||
|
||||
|
||||
/* Bitwise flags so we can save space (or more correctly, not waste it) */
|
||||
|
||||
#define MODIFIED (1<<0)
|
||||
@@ -94,7 +146,7 @@ typedef struct shortcut {
|
||||
#define MARK_ISSET (1<<3)
|
||||
#define CONSTUPDATE (1<<4)
|
||||
#define NO_HELP (1<<5)
|
||||
#define PICO_MSGS (1<<6)
|
||||
#define PICO_MODE (1<<6)
|
||||
#define FOLLOW_SYMLINKS (1<<7)
|
||||
#define SUSPEND (1<<8)
|
||||
#define NO_WRAP (1<<9)
|
||||
@@ -104,8 +156,18 @@ typedef struct shortcut {
|
||||
#define USE_MOUSE (1<<13)
|
||||
#define USE_REGEXP (1<<14)
|
||||
#define REGEXP_COMPILED (1<<15)
|
||||
#define TEMP_OPT (1<<16)
|
||||
#define CUT_TO_END (1<<17)
|
||||
#define REVERSE_SEARCH (1<<18)
|
||||
#define MULTIBUFFER (1<<19)
|
||||
#define CLEAR_BACKUPSTRING (1<<20)
|
||||
#define DOS_FILE (1<<21)
|
||||
#define MAC_FILE (1<<22)
|
||||
#define SMOOTHSCROLL (1<<23)
|
||||
#define DISABLE_CURPOS (1<<24) /* Damn, we still need it */
|
||||
#define ALT_KEYPAD (1<<25) /* Damn, we still need it */
|
||||
|
||||
/* Control key sequences, chaning these would be very very bad */
|
||||
/* Control key sequences, changing these would be very very bad */
|
||||
|
||||
#define NANO_CONTROL_A 1
|
||||
#define NANO_CONTROL_B 2
|
||||
@@ -165,8 +227,13 @@ typedef struct shortcut {
|
||||
#define NANO_ALT_X 'x'
|
||||
#define NANO_ALT_Y 'y'
|
||||
#define NANO_ALT_Z 'z'
|
||||
#define NANO_ALT_PERIOD ','
|
||||
#define NANO_ALT_COMMA '.'
|
||||
#define NANO_ALT_LCARAT '<'
|
||||
#define NANO_ALT_RCARAT '>'
|
||||
#define NANO_ALT_BRACKET ']'
|
||||
|
||||
/* Some semi-changeable keybindings, dont play with unless you're sure you
|
||||
/* Some semi-changeable keybindings; don't play with unless you're sure you
|
||||
know what you're doing */
|
||||
|
||||
#define NANO_INSERTFILE_KEY NANO_CONTROL_R
|
||||
@@ -201,10 +268,10 @@ know what you're doing */
|
||||
#define NANO_FIRSTLINE_KEY NANO_PREVPAGE_KEY
|
||||
#define NANO_LASTLINE_KEY NANO_NEXTPAGE_KEY
|
||||
#define NANO_CANCEL_KEY NANO_CONTROL_C
|
||||
#define NANO_CASE_KEY NANO_CONTROL_A
|
||||
#define NANO_REFRESH_KEY NANO_CONTROL_L
|
||||
#define NANO_JUSTIFY_KEY NANO_CONTROL_J
|
||||
#define NANO_JUSTIFY_FKEY KEY_F(4)
|
||||
#define NANO_UNJUSTIFY_KEY NANO_CONTROL_U
|
||||
#define NANO_UP_KEY NANO_CONTROL_P
|
||||
#define NANO_DOWN_KEY NANO_CONTROL_N
|
||||
#define NANO_FORWARD_KEY NANO_CONTROL_F
|
||||
@@ -218,17 +285,117 @@ know what you're doing */
|
||||
#define NANO_SUSPEND_KEY NANO_CONTROL_Z
|
||||
#define NANO_ENTER_KEY NANO_CONTROL_M
|
||||
#define NANO_FROMSEARCHTOGOTO_KEY NANO_CONTROL_T
|
||||
#define NANO_TOFILES_KEY NANO_CONTROL_T
|
||||
#define NANO_APPEND_KEY NANO_ALT_A
|
||||
#define NANO_OPENPREV_KEY NANO_ALT_LCARAT
|
||||
#define NANO_OPENNEXT_KEY NANO_ALT_RCARAT
|
||||
#define NANO_OPENPREV_ALTKEY NANO_ALT_COMMA
|
||||
#define NANO_OPENNEXT_ALTKEY NANO_ALT_PERIOD
|
||||
#define NANO_BRACKET_KEY NANO_ALT_BRACKET
|
||||
|
||||
#define MAIN_LIST_LEN 26
|
||||
#define TOGGLE_CONST_KEY NANO_ALT_C
|
||||
#define TOGGLE_AUTOINDENT_KEY NANO_ALT_I
|
||||
#define TOGGLE_SUSPEND_KEY NANO_ALT_Z
|
||||
#define TOGGLE_NOHELP_KEY NANO_ALT_X
|
||||
#define TOGGLE_PICOMODE_KEY NANO_ALT_P
|
||||
#define TOGGLE_MOUSE_KEY NANO_ALT_M
|
||||
#define TOGGLE_CUTTOEND_KEY NANO_ALT_K
|
||||
#define TOGGLE_REGEXP_KEY NANO_ALT_E
|
||||
#define TOGGLE_WRAP_KEY NANO_ALT_W
|
||||
#define TOGGLE_BACKWARDS_KEY NANO_ALT_B
|
||||
#define TOGGLE_CASE_KEY NANO_ALT_A
|
||||
#define TOGGLE_LOAD_KEY NANO_ALT_F
|
||||
#define TOGGLE_DOS_KEY NANO_ALT_D
|
||||
#define TOGGLE_MAC_KEY NANO_ALT_O
|
||||
#define TOGGLE_SMOOTH_KEY NANO_ALT_S
|
||||
|
||||
/* Toggle stuff, these static lengths need to go away RSN */
|
||||
|
||||
#ifndef HAVE_REGEX_H
|
||||
#define NO_REGEX 1
|
||||
#define SMALL_TOO 0
|
||||
#else
|
||||
#define NO_REGEX 0
|
||||
#ifdef NANO_SMALL
|
||||
#define SMALL_TOO 1
|
||||
#else
|
||||
#define SMALL_TOO 0
|
||||
#endif /* NANO_SMALL */
|
||||
#endif /* HAVE_REGEX_H */
|
||||
|
||||
#ifdef DISABLE_BROWSER
|
||||
#define NO_BROWSER 1
|
||||
#else
|
||||
#define NO_BROWSER 0
|
||||
#endif
|
||||
|
||||
#ifdef NANO_SMALL
|
||||
#ifdef HAVE_REGEX_H
|
||||
#define NO_TOGGLES 3
|
||||
#else
|
||||
#define NO_TOGGLES 2
|
||||
#endif /* HAVE_REGEX_H */
|
||||
#else
|
||||
#define NO_TOGGLES 0
|
||||
#endif /* NANO_SMALL */
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
#define MULTI_TOGGLES 3
|
||||
#else
|
||||
#define MULTI_TOGGLES 0
|
||||
#endif
|
||||
|
||||
#define WHEREIS_LIST_LEN (9 - NO_REGEX - NO_TOGGLES)
|
||||
#define REPLACE_LIST_LEN (9 - NO_REGEX - NO_TOGGLES)
|
||||
#define TOGGLE_LEN (14 - NO_REGEX + MULTI_TOGGLES)
|
||||
#define WRITEFILE_LIST_LEN (4 - NO_BROWSER)
|
||||
#define INSERTFILE_LIST_LEN (3 - NO_BROWSER)
|
||||
#define BROWSER_LIST_LEN 5
|
||||
#define MAIN_LIST_LEN (27 - NO_REGEX - SMALL_TOO)
|
||||
#define MAIN_VISIBLE 12
|
||||
#define WHEREIS_LIST_LEN 6
|
||||
#define REPLACE_LIST_LEN 6
|
||||
#define GOTO_LIST_LEN 3
|
||||
#define WRITEFILE_LIST_LEN 1
|
||||
#define REPLACE_LIST_2_LEN 4
|
||||
#define GOTO_LIST_LEN 4
|
||||
#define GOTODIR_LIST_LEN 2
|
||||
#define HELP_LIST_LEN 3
|
||||
#define SPELL_LIST_LEN 3
|
||||
#define SPELL_LIST_LEN 2
|
||||
|
||||
|
||||
#define VIEW 1
|
||||
#define NOVIEW 0
|
||||
|
||||
#endif
|
||||
#define NONE 3
|
||||
#define TOP 2
|
||||
#define CENTER 1
|
||||
#define BOTTOM 0
|
||||
|
||||
/* Minimum editor window rows required for Nano to work correctly */
|
||||
#define MIN_EDITOR_ROWS 3
|
||||
|
||||
/* Default number of characters from end-of-line where text wrapping occurs */
|
||||
#define CHARS_FROM_EOL 8
|
||||
|
||||
/* Minimum fill length (space available for text before wrapping occurs) */
|
||||
#define MIN_FILL_LENGTH 10
|
||||
|
||||
/* Color specific defines */
|
||||
#ifdef ENABLE_COLOR
|
||||
typedef struct colorstruct {
|
||||
int fg;
|
||||
int bg;
|
||||
int bold;
|
||||
int set;
|
||||
} colorstruct;
|
||||
|
||||
#define FIRST_COLORNUM 16
|
||||
|
||||
#define COLOR_TITLEBAR 16
|
||||
#define COLOR_BOTTOMBARS 17
|
||||
#define COLOR_STATUSBAR 18
|
||||
#define COLOR_TEXT 19
|
||||
#define COLOR_MARKER 20
|
||||
|
||||
#define NUM_NCOLORS 5
|
||||
|
||||
#endif /* ENABLE_COLOR */
|
||||
|
||||
#endif /* ifndef NANO_H */
|
||||
|
||||
483
nano.texi
Normal file
483
nano.texi
Normal file
@@ -0,0 +1,483 @@
|
||||
\input texinfo @c -*-texinfo-*-
|
||||
@c %**start of header
|
||||
@setfilename nano.info
|
||||
@settitle nano Command Manual
|
||||
@c %**end of header
|
||||
|
||||
@c This file has the new style title page commands.
|
||||
@c Run `makeinfo' rather than `texinfo-format-buffer'.
|
||||
@smallbook
|
||||
@set EDITION 0.1
|
||||
@set VERSION 1.1.5
|
||||
@set UPDATED 4 Jan 2002
|
||||
|
||||
@dircategory Editors
|
||||
@direntry
|
||||
* Nano: (nano). Small and friendly text editor.
|
||||
@end direntry
|
||||
|
||||
@c tex
|
||||
@c \overfullrule=0pt
|
||||
@c end tex
|
||||
|
||||
@titlepage
|
||||
@title GNU @code{nano}
|
||||
@subtitle a small and friendly text editor.
|
||||
@subtitle version 1.1.5
|
||||
|
||||
@author Chris Allegretta
|
||||
@page
|
||||
|
||||
This manual documents GNU @code{nano}, a small and friendly text
|
||||
editor.
|
||||
|
||||
This manual is part of the GNU @code{nano} distribution.@*
|
||||
@sp4
|
||||
Copyright (C) 1999, 2000, 2001, 2002 Chris Allegretta.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of
|
||||
this manual provided the copyright notice and this permission notice
|
||||
are preserved on all copies.
|
||||
|
||||
@iftex
|
||||
Permission is granted to process this file through TeX and print the
|
||||
results, provided the printed document carries copying permission
|
||||
notice identical to this one except for the removal of this paragraph
|
||||
(this paragraph not being relevant to the printed manual).
|
||||
@end iftex
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the entire
|
||||
resulting derived work is distributed under the terms of a permission
|
||||
notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation approved
|
||||
by the Foundation.
|
||||
|
||||
You may contact the author by:
|
||||
e-mail: @email{chrisa@@asty.org}@*
|
||||
@end titlepage
|
||||
|
||||
@node Top, Introduction, (dir), (dir)
|
||||
|
||||
This manual documents GNU nano, a small and friendly text editor.
|
||||
|
||||
@menu
|
||||
* Introduction::
|
||||
* Editor Basics::
|
||||
* Online Help::
|
||||
* Feature Toggles::
|
||||
* The File Browser::
|
||||
* Pico Compatibility::
|
||||
* Building and Configure Options::
|
||||
@end menu
|
||||
|
||||
@node Introduction, Editor Basics, Top, Top
|
||||
@chapter Introduction
|
||||
|
||||
GNU @code{nano} is a small and friendly text editor. Besides basic
|
||||
text editing, @code{nano} offers many extra features like an
|
||||
interactive search and replace, goto line number, auto-indentation,
|
||||
feature toggles, internationalization support, and filename tab
|
||||
completion.
|
||||
|
||||
@menu
|
||||
* Overview::
|
||||
* Command Line Options::
|
||||
@end menu
|
||||
|
||||
@node Overview, Command Line Options, Introduction, Introduction
|
||||
@section Overview
|
||||
|
||||
@code{nano} [GNU long option] [option] +LINE [ @var{ file ...} ]
|
||||
|
||||
The original goal for @code{nano} was a complete bug-for-bug compatible
|
||||
emulation of Pico, but consistency is now a slightly higher priority.
|
||||
There is a flag to implement (nearly) complete Pico emulation, (option -p
|
||||
or GNU long option --pico). This can also be toggled from within
|
||||
@code{nano} by typing Meta-P. @xref{Pico Compatibility}, for more
|
||||
info.
|
||||
|
||||
Email bug reports to @email{nano@@nano-editor.org}.
|
||||
|
||||
@node Command Line Options, , Overview, Introduction
|
||||
@section Command Line Options
|
||||
|
||||
@code{nano} takes the following options from the command line:
|
||||
@table @code
|
||||
|
||||
@item -D, --dos
|
||||
Write file in DOS format.
|
||||
|
||||
@item -F, --multibuffer
|
||||
Enable multiple file buffers.
|
||||
|
||||
@item -K, --keypad
|
||||
Do not use the ncurses keypad() call unless necessary. Try this flag if
|
||||
you find that the arrow keys on the numeric keypad do not work for you
|
||||
under nano.
|
||||
|
||||
@item -M, --mac
|
||||
Write file in Mac format.
|
||||
|
||||
@item -R, --regexp
|
||||
Turns on regular expression search and search/replace.
|
||||
|
||||
@item -S, --smooth
|
||||
Enables smooth scrolling.
|
||||
|
||||
@item -T [num], --tabsize=[num]
|
||||
Set the displayed tab length to [num] columns.
|
||||
|
||||
@item -V, --version
|
||||
Print the version number and copyright and quit.
|
||||
|
||||
@item -c, --const
|
||||
Constantly display the cursor position and line number on the statusbar.
|
||||
|
||||
@item -h, --help
|
||||
Print the usage and exit.
|
||||
|
||||
@item -i, --autoindent
|
||||
Automatically indent new lines to the same number of spaces and tabs as
|
||||
the previous line.
|
||||
|
||||
@item -k, --cut
|
||||
Makes ^K cut from the current cursor position to the end of the current
|
||||
line.
|
||||
|
||||
@item -l, --nofollow
|
||||
When writing files, if the given file is a symbolic link it is removed
|
||||
and a new file is created.
|
||||
|
||||
@item -m, --mouse
|
||||
Enables the use of the mouse to select text (currently only useful for
|
||||
running under the X window system).
|
||||
|
||||
@item -o [dir], --operatingdir=[dir]
|
||||
Set operating directory. Makes nano set up something similar to a chroot.
|
||||
|
||||
@item -p, --pico
|
||||
Emulate Pico as closely as possible, sacrificing consistency for correct
|
||||
emulation. @xref{Pico Compatibility}, for more info.
|
||||
|
||||
@item -r [#cols], --fill=[#cols].
|
||||
Wrap lines at column #cols. By default this is the width of the screen,
|
||||
less eight. If this value is negative, wrapping will occur at #cols from
|
||||
the right of the screen, allowing it to vary along with the screen width
|
||||
if the screen is resized.
|
||||
|
||||
@item -s [prog], --speller=[prog]
|
||||
Invoke [prog] as the spell checker. By default, @code{nano} uses its
|
||||
own interactive spell checker that requires the @code{spell} program be
|
||||
installed on your system.
|
||||
|
||||
@item -t, --tempfile
|
||||
Do not ask whether or not to save the current contents of the file when
|
||||
exiting, assume yes. This is most useful when using @code{nano} as the
|
||||
composer of a mailer program.
|
||||
|
||||
@anchor{Expert Mode}
|
||||
@item -x, --nohelp
|
||||
In Expert Mode, the Shortcut Lists will not appear at the bottom of the
|
||||
screen. This affects the location of the statusbar as well, as in Expert
|
||||
Mode it is located at the very bottom of the editor.
|
||||
|
||||
Note: When accessing the help system, Expert Mode is temporarily disabled
|
||||
to display the help system navigation keys.
|
||||
|
||||
@item -v, --view
|
||||
Do not allow the contents of the file to be altered. Note that this
|
||||
flag should NOT be used in place of correct file permissions to implement
|
||||
a read-only file.
|
||||
|
||||
@item -w, --nowrap
|
||||
Do not wrap long lines at any length. This option overrides any value for
|
||||
-r.
|
||||
|
||||
@item -z, --suspend
|
||||
Enable suspend ability of @code{nano} using the system's suspend
|
||||
keystroke (usually ^Z).
|
||||
|
||||
@item -a, -b, -e, -f, -g, -j
|
||||
Ignored, for compatibility with Pico.
|
||||
|
||||
@item +LINE
|
||||
Start at line number LINE instead of the default of line 1.
|
||||
@end table
|
||||
|
||||
@node Editor Basics, Online Help, Introduction, Top
|
||||
@chapter Editor Basics
|
||||
@menu
|
||||
* Entering Text::
|
||||
* Special Functions::
|
||||
* The Titlebar::
|
||||
* The Statusbar::
|
||||
* Shortcut Lists::
|
||||
@end menu
|
||||
|
||||
@node Entering Text, Special Functions, Editor Basics, Editor Basics
|
||||
@section Entering Text
|
||||
|
||||
All key sequences in @code{nano} are entered using the keyboard.
|
||||
@code{nano} is a "modeless" editor, all keys with the exception of
|
||||
Control and Meta key sequences will enter text into the file being
|
||||
edited.
|
||||
|
||||
@node Special Functions, The Titlebar, Entering Text, Editor Basics
|
||||
@section Special Functions
|
||||
|
||||
Special functions use the Control key (displayed in the help and
|
||||
shortcut lists as ^) or the Meta key (displayed as M).
|
||||
|
||||
@itemize @bullet
|
||||
|
||||
@item
|
||||
Control key sequences are entered by holding down the Control key and
|
||||
pressing the desired letter.
|
||||
@item
|
||||
Meta key sequences can be entered in a number of
|
||||
possible ways: Pressing the Escape key, then releasing it and pressing
|
||||
the desired key, or holding down the Alt key while pressing the desired
|
||||
key. This varies from keyboard to keyboard, and certain commercial
|
||||
operating systems "swallow" the Alt key so that it never reaches the
|
||||
application. If your operating system does this, you should use the
|
||||
Escape key to generate Meta key sequences.
|
||||
@end itemize
|
||||
|
||||
@node The Titlebar, The Statusbar, Special Functions, Editor Basics
|
||||
@section The Titlebar
|
||||
|
||||
The titlebar is the line displayed at the top of the editor. There are
|
||||
three sections: left, center and right. The section on the left displays
|
||||
the version of @code{nano} being used. The center section displays the
|
||||
current file name, or "New Buffer" if the file has not yet been named.
|
||||
The section on the right will display "Modified" if the file has been
|
||||
modified since it was last saved or opened.
|
||||
|
||||
Special modes: When nano is in "File browser" mode, the center section
|
||||
will display the current directory instead of the filename.
|
||||
@xref{The File Browser}.
|
||||
|
||||
@node The Statusbar, Shortcut Lists, The Titlebar, Editor Basics
|
||||
@section The Statusbar
|
||||
|
||||
The statusbar is located three lines from the bottom of the screen (or the
|
||||
bottom line in Expert Mode. @xref{Expert Mode}, for more info.
|
||||
|
||||
The Statusbar shows important and informational messages. Any error
|
||||
messages that occur from using the editor will appear on the statusbar.
|
||||
Any questions that are asked of the user will be asked on the statusbar,
|
||||
and any user input (search strings, file names, etc) will be input on the
|
||||
statusbar.
|
||||
|
||||
@node Shortcut Lists, , The Statusbar, Editor Basics
|
||||
@section Shortcut Lists
|
||||
|
||||
The Shortcut Lists are the two lines at the bottom of the screen which show
|
||||
some of the more commonly used functions in the editor. The exact
|
||||
functions which are displayed depend on whether Pico Compatibility Mode mode
|
||||
is enabled. @xref{Pico Compatibility}, for more info.
|
||||
|
||||
@node Online Help, Feature Toggles, Editor Basics, Top
|
||||
@chapter Online Help
|
||||
|
||||
The online help system in @code{nano} is available by pressing ^G.
|
||||
It is fairly self explanatory, documenting the various parts of the
|
||||
editor and available keystrokes. Navigation is via the ^Y (Page Up)
|
||||
and ^V (Page Down) keys. ^X exits the help system.
|
||||
|
||||
|
||||
@node Feature Toggles, The File Browser, Online Help, Top
|
||||
@chapter Feature Toggles
|
||||
|
||||
Toggles allow you to change certain aspects of the editor that
|
||||
would normally be done via command line flags. They are invoked via
|
||||
certain Meta key sequenced. @xref{Special Functions}, for more info.
|
||||
The following toggles are available:
|
||||
|
||||
@table @code
|
||||
|
||||
@item Case Sensitive Search Toggle (Meta-A)
|
||||
toggles case sensistive searching functionality on/off.
|
||||
|
||||
@item Backwards Search Toggle (Meta-B)
|
||||
toggles backwards searching fuctionality on/off.
|
||||
|
||||
@item Constant Update Toggle (Meta-C)
|
||||
toggles the -c (--const) command line flag.
|
||||
|
||||
@item DOS Format Toggle (Meta-D)
|
||||
toggles the -D (--dos) command line flag.
|
||||
|
||||
@item Regular Expressions Toggle (Meta-E)
|
||||
toggles the -R (--regexp) command line flag.
|
||||
|
||||
@item Multiple Files Toggle (Meta-F)
|
||||
toggles the -F (--multibuffer) command line flag.
|
||||
|
||||
@item AutoIndent Toggle (Meta-I)
|
||||
toggles the -i (--autoindent) command line flag.
|
||||
|
||||
@item Cut To End Toggle (Meta-K)
|
||||
toggles the -k (--cut) command line flag.
|
||||
|
||||
@item Mouse Toggle (Meta-M)
|
||||
toggles the -m (--mouse) command line flag.
|
||||
|
||||
@item Mac Format Toggle (Meta-O)
|
||||
toggles the -M (--mac) command line flag.
|
||||
|
||||
@item Pico Mode Toggle (Meta-P)
|
||||
toggles the -p (--pico) command line flag.
|
||||
@xref{Pico Compatibility}, for more info.
|
||||
|
||||
@item Smooth Scrolling Toggle (Meta-S)
|
||||
toggles the -s (--smooth) command line flag.
|
||||
|
||||
@item AutoWrap Toggle (Meta-W)
|
||||
toggles the -w (--nowrap) command line flag.
|
||||
|
||||
@item Expert/Nohelp Toggle (Meta-X)
|
||||
toggles the -x (--nohelp) command line flag.
|
||||
|
||||
@item Suspend Toggle (Meta-Z)
|
||||
toggles the -z (--suspend) command line flag.
|
||||
|
||||
@item Open Previous File Toggle (Meta-<)
|
||||
changes buffer to previously loaded file.
|
||||
|
||||
@item Open Next File Toggle (Meta->)
|
||||
changes buffer to next loaded file.
|
||||
|
||||
|
||||
@end table
|
||||
|
||||
@node The File Browser, Pico Compatibility, Feature Toggles, Top
|
||||
@chapter The File Browser
|
||||
|
||||
When reading or writing files, pressing ^T will invoke the file browser.
|
||||
Here, one can navigate directories in a graphical manner in order to find
|
||||
the desired file.
|
||||
|
||||
Basic movement in the file browser is accomplished with he arrow keys
|
||||
and page up/down. The behavior of the enter (or 's') key varies by what
|
||||
is currently selected. If the currently selected object is a directory,
|
||||
the file browser will enter and display the contents of the directory. If
|
||||
the object is a file, this filename and path are copied to the statusbar
|
||||
and the file browser is exited.
|
||||
|
||||
@node Pico Compatibility, Building and Configure Options, The File Browser, Top
|
||||
@chapter Pico Compatibility
|
||||
|
||||
Nano does not completely emulate Pico by default. The following differences
|
||||
apply to the default mode and Pico Compatibility mode:
|
||||
|
||||
@table @code
|
||||
@item Displayed Shortcuts
|
||||
By default, the following shortcuts are displayed in the Shortcut Lists:
|
||||
|
||||
^G ^O ^\ ^Y ^K ^C@*
|
||||
^X ^R ^W ^V ^U ^T
|
||||
|
||||
Related functions are listed above or below each other by default. The
|
||||
Justify function is not listed, instead the "Replace" function is
|
||||
displayed. Also, he "Read File" and "WriteOut" functions are aligned for
|
||||
consistency.
|
||||
|
||||
In Pico Compatibility mode, the default Pico shortcuts are displayed:
|
||||
|
||||
^G ^O ^R ^Y ^K ^C@*
|
||||
^X ^J ^W ^V ^U ^T
|
||||
|
||||
@item Previous String Text
|
||||
By default, previously entered string for a function (search string,
|
||||
file name) will be placed on the statusbar, and is editable. This is
|
||||
done so there is consistency across all functions. For example: even if
|
||||
there is a previous replace string, it can always be deleted if one
|
||||
wishes to perform an empty string replace.
|
||||
|
||||
In Pico Compatibility Mode, the previously entered text in a search or
|
||||
replace will appear in brackets, and is not editable. It is not a
|
||||
simple matter to do an empty string replace when a previous replace
|
||||
string exists, for example. When writing a file, the previous filename
|
||||
will be displayed in the editable text portion of the editor.
|
||||
|
||||
@item Interactive Replace and Spell Checker
|
||||
It is worth noting that the @code{nano} replace function is interactive,
|
||||
i.e. it does not stop after one search string is found and automatically
|
||||
replace it. The @code{nano} implementation will stop at each search
|
||||
string found and query whether to replace this instance or not. The
|
||||
internal spell checker operates similarly. Note that these is no way
|
||||
to force these functions to behave in the Pico fashion.
|
||||
@end table
|
||||
|
||||
@node Building and Configure Options, , Pico Compatibility, Top
|
||||
@chapter Building and Configure Options
|
||||
|
||||
Building nano from source is fairly straightforward if you are familiar
|
||||
with compiling programs with autoconf support:
|
||||
|
||||
tar xvfz nano-x.y.z.tar.gz (where x.y.z is the version of nano)
|
||||
cd nano-x.y.z/
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
if you are looking to optimize nano for size, you may want to consider
|
||||
the following command line options:
|
||||
|
||||
|
||||
@table @code
|
||||
|
||||
@item --disable-tabcomp
|
||||
Disable the tab completion code when reading or writing files.
|
||||
|
||||
@item --disable-justify
|
||||
Disable the justify (^J)/unjustify (^U) functions in the editor.
|
||||
|
||||
@item --disable-speller
|
||||
Disables spell checker ability.
|
||||
|
||||
@item --disable-help
|
||||
Disables the help function (^G). Disabling this option makes the
|
||||
binary much smaller, but makes it difficult for new users
|
||||
to learn more than very basic things about using the editor.
|
||||
|
||||
@item --disable-browser
|
||||
Disables the mini file browser (^O) when reading or writing files.
|
||||
|
||||
@item --enable-tiny
|
||||
This options disables all the above. It also disables some of
|
||||
the larger internals of the editor, like the marker code (^^) and
|
||||
the cut to line (-k) option which it depends on to work properly.
|
||||
It also disables the function toggles and mouse support.
|
||||
|
||||
@item --disable-wrapping
|
||||
Disables all word wrapping in the editor. This also eliminates the
|
||||
-w command line flag, as nonwrapping is then the default behavior.
|
||||
|
||||
@item --disable-mouse
|
||||
Disables all mouse functionality. This also disables the -m commands line
|
||||
flag which enables the mouse functions.
|
||||
|
||||
@item --disable-operatingdir
|
||||
Disables setting of operating directory. This also disables the -o command
|
||||
line flag.
|
||||
|
||||
@item --disable-nls
|
||||
Disables Native Language support. This will make the available GNU nano
|
||||
translations unusable.
|
||||
|
||||
@item --with-slang
|
||||
Compiling GNU nano with Slang is supported, and will make the binary notably
|
||||
smaller than if compiled with ncurses or other curses libraries.
|
||||
|
||||
@end table
|
||||
|
||||
@contents
|
||||
@bye
|
||||
|
||||
|
||||
80
nanorc.sample
Normal file
80
nanorc.sample
Normal file
@@ -0,0 +1,80 @@
|
||||
# Sample initialization file for GNU nano
|
||||
# Please note that you must have configured nano with
|
||||
# --enable-nanorc for this file to be read!
|
||||
|
||||
# Use regular expressions by default
|
||||
# set regexp
|
||||
|
||||
# Constantly update the cursor position
|
||||
# set const
|
||||
|
||||
# Use cut to end of line with ^K by default
|
||||
# set cut
|
||||
|
||||
# Use Auto-indentation
|
||||
# set autoindent
|
||||
|
||||
# Don't follow symlinks when writing files
|
||||
# set nofollow
|
||||
|
||||
# Set operating directory (chroot of sorts)
|
||||
# set operatingdir "~"
|
||||
|
||||
# Use Pico Compatibility mode for the shortcut lists and search text
|
||||
# set pico
|
||||
|
||||
# Use this value instead of the default
|
||||
# set fill -8
|
||||
|
||||
# Use this tab size instead of the default
|
||||
# set tabsize 8
|
||||
|
||||
# Use this spelling checker instead of the default one
|
||||
# set speller aspell
|
||||
|
||||
# Save automatically on exit, don't prompt
|
||||
# set tempfile
|
||||
|
||||
# Disallow file modification, why would you want this in an rc file? ;)
|
||||
# set view
|
||||
|
||||
# Don't wrap text at all
|
||||
# set nowrap
|
||||
|
||||
# Don't display the help lists at the bottom of the screen
|
||||
# set nohelp
|
||||
|
||||
# Allow nano to be suspended with ^Z
|
||||
# set suspend
|
||||
|
||||
# Use smooth scrolling as the default
|
||||
# set smooth
|
||||
|
||||
# Allow multiple file buffers (using ^R inserts into separate buffer)
|
||||
# You must have configured with --enable-multibuffer or --enable-extra for
|
||||
# this to work
|
||||
#
|
||||
# set multibuffer
|
||||
|
||||
#
|
||||
# Color setup
|
||||
# Format: color foreground,background regex [regex...]
|
||||
#
|
||||
# Legal colors are: white, black, red, blue, green, yellow, purple, cyan
|
||||
# You may use the prefix "bright" to mean a stronger color highlight
|
||||
#
|
||||
# If your system supports transparency, not specifying a background
|
||||
# color will use a transparent color. If you don't want this, be sure
|
||||
# to set the background color to black or white.
|
||||
#
|
||||
#color brightred float\ char\ int\ void\ NULL [A-Z_]\{2,\} static
|
||||
#color brightred [\ ]struct ^struct if\ while[\ \n\(] do[\ \n\(] else[\ \n] case\ switch\ break;
|
||||
#color brightcyan #define #include #ifn*def #endif #elif #else
|
||||
|
||||
# You will in general want your comments and strings to come last, because
|
||||
# syntax highlighting rules will be applied in the order they are read in
|
||||
|
||||
#color brightyellow <.*> ".*"
|
||||
#color brightblue /\*.**/
|
||||
# multi-line comment hack
|
||||
#color brightblue /\*.* [^\/][^\*]*\*\/ ^.*\*+*\**$ ^\ *\*\{1,\}\/$ \/\/.*
|
||||
8
po/.cvsignore
Normal file
8
po/.cvsignore
Normal file
@@ -0,0 +1,8 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
POTFILES
|
||||
*.gmo
|
||||
*.pot
|
||||
cat-id*
|
||||
messages
|
||||
stamp-cat*
|
||||
@@ -0,0 +1 @@
|
||||
$Id$
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
# Makefile for program source directory in GNU NLS utilities package.
|
||||
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
||||
# Copyright (C) 1995-1997, 2000, 2001 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
|
||||
# be used in projects which are not available under the GNU General 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 = @PACKAGE@
|
||||
VERSION = @VERSION@
|
||||
|
||||
# These two variables depend on the location of this directory.
|
||||
subdir = po
|
||||
top_builddir = ..
|
||||
|
||||
SHELL = /bin/sh
|
||||
@SET_MAKE@
|
||||
|
||||
@@ -18,22 +22,20 @@ VPATH = @srcdir@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
datadir = $(prefix)/@DATADIRNAME@
|
||||
datadir = @datadir@
|
||||
localedir = $(datadir)/locale
|
||||
gnulocaledir = $(prefix)/share/locale
|
||||
gettextsrcdir = $(prefix)/share/gettext/po
|
||||
subdir = po
|
||||
gettextsrcdir = $(datadir)/gettext/po
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
|
||||
|
||||
CC = @CC@
|
||||
GENCAT = @GENCAT@
|
||||
GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
MSGFMT = @MSGFMT@
|
||||
XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
|
||||
MSGMERGE = PATH=../src:$$PATH msgmerge
|
||||
XGETTEXT = @XGETTEXT@
|
||||
MSGMERGE = msgmerge
|
||||
|
||||
DEFS = @DEFS@
|
||||
CFLAGS = @CFLAGS@
|
||||
@@ -43,20 +45,17 @@ 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)
|
||||
$(POFILES) $(GMOFILES)
|
||||
|
||||
POTFILES = \
|
||||
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
|
||||
.SUFFIXES: .c .o .po .pox .gmo .mo
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) $<
|
||||
@@ -70,19 +69,19 @@ INSTOBJEXT = @INSTOBJEXT@
|
||||
|
||||
.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
|
||||
&& rm -f $$file && $(GMSGFMT) --statistics -o $$file $<
|
||||
|
||||
|
||||
all: all-@USE_NLS@
|
||||
|
||||
all-yes: cat-id-tbl.c $(CATALOGS)
|
||||
all-yes: $(CATALOGS)
|
||||
all-no:
|
||||
|
||||
$(srcdir)/$(PACKAGE).pot: $(POTFILES)
|
||||
# Note: Target 'all' must not depend on target '$(srcdir)/$(PACKAGE).pot',
|
||||
# otherwise packages like GCC can not be built if only parts of the source
|
||||
# have been downloaded.
|
||||
|
||||
$(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in
|
||||
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
|
||||
--add-comments --keyword=_ --keyword=N_ \
|
||||
--files-from=$(srcdir)/POTFILES.in \
|
||||
@@ -90,78 +89,35 @@ $(srcdir)/$(PACKAGE).pot: $(POTFILES)
|
||||
|| ( 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; \
|
||||
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
||||
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
|
||||
$(gettextsrcdir)/Makefile.in.in; \
|
||||
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
install-data-no: all
|
||||
install-data-yes: all
|
||||
$(mkinstalldirs) $(DESTDIR)$(datadir)
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
|
||||
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
||||
$(mkinstalldirs) $(DESTDIR)$$dir; \
|
||||
if test -r $$cat; then \
|
||||
$(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
|
||||
echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE).mo"; \
|
||||
else \
|
||||
$(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
|
||||
echo "installing $(srcdir)/$$cat as" \
|
||||
"$(DESTDIR)$$dir/$(PACKAGE).mo"; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# Define this as empty until I found a useful application.
|
||||
installcheck:
|
||||
@@ -170,76 +126,68 @@ 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; \
|
||||
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
|
||||
done
|
||||
rm -f $(gettextsrcdir)/po-Makefile.in.in
|
||||
if test "$(PACKAGE)" = "gettext"; then \
|
||||
rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
|
||||
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 -f core core.* *.pox $(PACKAGE).po *.new.po
|
||||
rm -fr *.o
|
||||
|
||||
clean: mostlyclean
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
|
||||
rm -f Makefile Makefile.in POTFILES *.mo
|
||||
|
||||
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)
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
dist distdir:
|
||||
$(MAKE) update-po
|
||||
@$(MAKE) dist2
|
||||
# This is a separate target because 'update-po' must be executed before.
|
||||
dist2: $(DISTFILES)
|
||||
dists="$(DISTFILES)"; \
|
||||
for file in $$dists; do \
|
||||
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|
||||
|| cp -p $(srcdir)/$$file $(distdir); \
|
||||
if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
|
||||
cp -p $$dir/$$file $(distdir); \
|
||||
done
|
||||
|
||||
update-po: Makefile
|
||||
$(MAKE) $(PACKAGE).pot
|
||||
PATH=`pwd`/../src:$$PATH; \
|
||||
if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
|
||||
cd $(srcdir); \
|
||||
catalogs='$(CATALOGS)'; \
|
||||
catalogs='$(GMOFILES)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
mv $$lang.po $$lang.old.po; \
|
||||
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
|
||||
echo "$$lang:"; \
|
||||
if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
|
||||
rm -f $$lang.old.po; \
|
||||
if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$lang.new.po; then \
|
||||
mv -f $$lang.new.po $$lang.po; \
|
||||
else \
|
||||
echo "msgmerge for $$cat failed!"; \
|
||||
rm -f $$lang.po; \
|
||||
mv $$lang.old.po $$lang.po; \
|
||||
rm -f $$lang.new.po; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) update-gmo
|
||||
|
||||
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 $@ )
|
||||
update-gmo: Makefile $(GMOFILES)
|
||||
@:
|
||||
|
||||
Makefile: Makefile.in.in ../config.status POTFILES
|
||||
cd .. \
|
||||
Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
|
||||
$(SHELL) ./config.status
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# $Id$
|
||||
# List of source files containing translatable strings.
|
||||
|
||||
# Package source files
|
||||
@@ -6,7 +7,9 @@ files.c
|
||||
global.c
|
||||
move.c
|
||||
nano.c
|
||||
rcfile.c
|
||||
search.c
|
||||
utils.c
|
||||
winio.c
|
||||
|
||||
# Package header files
|
||||
|
||||
215
po/cat-id-tbl.c
215
po/cat-id-tbl.c
@@ -1,215 +0,0 @@
|
||||
/* Automatically generated by po2tbl.sed from nano.pot. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "libgettext.h"
|
||||
|
||||
const struct _msg_ent _msg_tbl[] = {
|
||||
{"", 1},
|
||||
{"add_to_cutbuffer called with inptr->data = %s\n", 2},
|
||||
{"Blew away cutbuffer =)\n", 3},
|
||||
{"read_line: not on first line and prev is NULL", 4},
|
||||
{"Read %d lines", 5},
|
||||
{"\"%s\" not found", 6},
|
||||
{"New File", 7},
|
||||
{"File \"%s\" is a directory", 8},
|
||||
{"Reading File", 9},
|
||||
{"File to insert [from ./] ", 10},
|
||||
{"Cancelled", 11},
|
||||
{"Could not open file for writing: %s", 12},
|
||||
{"Could not open file: Path length exceeded.", 13},
|
||||
{"Wrote >%s\n", 14},
|
||||
{"Could not close %s: %s", 15},
|
||||
{"Could not open %s for writing: %s", 16},
|
||||
{"Could not set permissions %o on %s: %s", 17},
|
||||
{"Wrote %d lines", 18},
|
||||
{"File Name to write", 19},
|
||||
{"filename is %s", 20},
|
||||
{"File exists, OVERWRITE ?", 21},
|
||||
{"Invoke the help menu", 22},
|
||||
{"Write the current file to disk", 23},
|
||||
{"Exit from nano", 24},
|
||||
{"Goto a specific line number", 25},
|
||||
{"Justify the current paragraph", 26},
|
||||
{"Replace text within the editor", 27},
|
||||
{"Insert another file into the current one", 28},
|
||||
{"Search for text within the editor", 29},
|
||||
{"Move to the previous screen", 30},
|
||||
{"Move to the next screen", 31},
|
||||
{"Cut the current line and store it in the cutbuffer", 32},
|
||||
{"Uncut from the cutbuffer into the current line", 33},
|
||||
{"Show the posititon of the cursor", 34},
|
||||
{"Invoke the spell checker (if available)", 35},
|
||||
{"Move up one line", 36},
|
||||
{"Move down one line", 37},
|
||||
{"Move forward one character", 38},
|
||||
{"Move back one character", 39},
|
||||
{"Move to the beginning of the current line", 40},
|
||||
{"Move to the end of the current line", 41},
|
||||
{"Go to the first line of the file", 42},
|
||||
{"Go to the last line of the file", 43},
|
||||
{"Refresh (redraw) the current screen", 44},
|
||||
{"Mark text at the current cursor location", 45},
|
||||
{"Delete the character under the cursor", 46},
|
||||
{"Delete the character to the left of the cursor", 47},
|
||||
{"Insert a tab character", 48},
|
||||
{"Insert a carriage return at the cursor position", 49},
|
||||
{"Make the current search or replace case (in)sensitive", 50},
|
||||
{"Cancel the current function", 51},
|
||||
{"Get Help", 52},
|
||||
{"WriteOut", 53},
|
||||
{"Exit", 54},
|
||||
{"Goto Line", 55},
|
||||
{"Justify", 56},
|
||||
{"Replace", 57},
|
||||
{"Read File", 58},
|
||||
{"Where Is", 59},
|
||||
{"Prev Page", 60},
|
||||
{"Next Page", 61},
|
||||
{"Cut Text", 62},
|
||||
{"UnCut Txt", 63},
|
||||
{"Cur Pos", 64},
|
||||
{"To Spell", 65},
|
||||
{"Up", 66},
|
||||
{"Down", 67},
|
||||
{"Forward", 68},
|
||||
{"Back", 69},
|
||||
{"Home", 70},
|
||||
{"End", 71},
|
||||
{"Refresh", 72},
|
||||
{"Mark Text", 73},
|
||||
{"Delete", 74},
|
||||
{"Backspace", 75},
|
||||
{"Tab", 76},
|
||||
{"Enter", 77},
|
||||
{"First Line", 78},
|
||||
{"Last Line", 79},
|
||||
{"Case Sens", 80},
|
||||
{"Cancel", 81},
|
||||
{"No Replace", 82},
|
||||
{"\
|
||||
\n\
|
||||
Buffer written to 'nano.save'\n", 83},
|
||||
{"Key illegal in VIEW mode", 84},
|
||||
{"\
|
||||
nano help text\n\
|
||||
\n\
|
||||
The nano editor is designed to emulate the functionality and ease-of-use of \
|
||||
the UW Pico text editor. There are four main sections of the editor: The \
|
||||
top line shows the program version, the current filename being edited, and \
|
||||
whether or not the file has been modified. Next is the main editor window \
|
||||
showing the file being edited. The status line is the third line from the \
|
||||
bottom and shows important messages. The bottom two lines show the most \
|
||||
commonly used shortcuts in the editor.\n\
|
||||
\n\
|
||||
The notation for shortcuts is as follows: Control-key sequences are notated \
|
||||
with a caret (^) symbol. Alt-key sequences are notated with an at (@) \
|
||||
symbol. The following keystrokes are available in the main editor window. \
|
||||
Optional keys are shown in parentheses:\n\
|
||||
\n", 85},
|
||||
{"free_node(): free'd a node, YAY!\n", 86},
|
||||
{"free_node(): free'd last node.\n", 87},
|
||||
{"\
|
||||
Usage: nano [GNU long option] [option] +LINE <file>\n\
|
||||
\n", 88},
|
||||
{"Option\t\tLong option\t\tMeaning\n", 89},
|
||||
{" -T \t\t--tabsize=[num]\t\tSet width of a tab to num\n", 90},
|
||||
{" -R\t\t--regexp\t\tUse regular expressions for search\n", 91},
|
||||
{" -V \t\t--version\t\tPrint version information and exit\n", 92},
|
||||
{" -c \t\t--const\t\t\tConstantly show cursor position\n", 93},
|
||||
{" -h \t\t--help\t\t\tShow this message\n", 94},
|
||||
{" -i \t\t--autoindent\t\tAutomatically indent new lines\n", 95},
|
||||
{" -l \t\t--nofollow\t\tDon't follow symbolic links, overwrite.\n", 96},
|
||||
{" -m \t\t--mouse\t\t\tEnable mouse\n", 97},
|
||||
{"\
|
||||
-r [#cols] \t--fill=[#cols]\t\tSet fill cols to (wrap lines at) #cols\n", 98},
|
||||
{" -p\t \t--pico\t\t\tMake bottom 2 lines more Pico-like\n", 99},
|
||||
{" -s [prog] \t--speller=[prog]\tEnable alternate speller\n", 100},
|
||||
{" -t \t\t--tempfile\t\tAuto save on exit, don't prompt\n", 101},
|
||||
{" -v \t\t--view\t\t\tView (read only) mode\n", 102},
|
||||
{" -w \t\t--nowrap\t\tDon't wrap long lines\n", 103},
|
||||
{" -x \t\t--nohelp\t\tDon't show help window\n", 104},
|
||||
{" -z \t\t--suspend\t\tEnable suspend\n", 105},
|
||||
{" +LINE\t\t\t\t\tStart at line number LINE\n", 106},
|
||||
{"\
|
||||
Usage: nano [option] +LINE <file>\n\
|
||||
\n", 107},
|
||||
{"Option\t\tMeaning\n", 108},
|
||||
{" -T [num]\tSet width of a tab to num\n", 109},
|
||||
{" -R\t\tUse regular expressions for search\n", 110},
|
||||
{" -V \t\tPrint version information and exit\n", 111},
|
||||
{" -c \t\tConstantly show cursor position\n", 112},
|
||||
{" -h \t\tShow this message\n", 113},
|
||||
{" -i \t\tAutomatically indent new lines\n", 114},
|
||||
{" -l \t\tDon't follow symbolic links, overwrite.\n", 115},
|
||||
{" -m \t\tEnable mouse\n", 116},
|
||||
{" -r [#cols] \tSet fill cols to (wrap lines at) #cols\n", 117},
|
||||
{" -s [prog] \tEnable alternate speller\n", 118},
|
||||
{" -p \t\tMake bottom 2 lines more Pico-like\n", 119},
|
||||
{" -t \t\tAuto save on exit, don't prompt\n", 120},
|
||||
{" -v \t\tView (read only) mode\n", 121},
|
||||
{" -w \t\tDon't wrap long lines\n", 122},
|
||||
{" -x \t\tDon't show help window\n", 123},
|
||||
{" -z \t\tEnable suspend\n", 124},
|
||||
{" +LINE\t\tStart at line number LINE\n", 125},
|
||||
{" nano version %s by Chris Allegretta (compiled %s, %s)\n", 126},
|
||||
{" Email: nano@asty.org\tWeb: http://www.asty.org/nano\n", 127},
|
||||
{"Mark Set", 128},
|
||||
{"Mark UNset", 129},
|
||||
{"check_wrap called with inptr->data=\"%s\"\n", 130},
|
||||
{"current->data now = \"%s\"\n", 131},
|
||||
{"After, data = \"%s\"\n", 132},
|
||||
{"Error deleting tempfile, ack!", 133},
|
||||
{"Could not create a temporary filename: %s", 134},
|
||||
{"Could not invoke spell program \"%s\"", 135},
|
||||
{"Could not invoke \"ispell\"", 136},
|
||||
{"Finished checking spelling", 137},
|
||||
{"Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? ", 138},
|
||||
{"Cannot resize top win", 139},
|
||||
{"Cannot move top win", 140},
|
||||
{"Cannot resize edit win", 141},
|
||||
{"Cannot move edit win", 142},
|
||||
{"Cannot resize bottom win", 143},
|
||||
{"Cannot move bottom win", 144},
|
||||
{"Main: set up windows\n", 145},
|
||||
{"Main: bottom win\n", 146},
|
||||
{"Main: open file\n", 147},
|
||||
{"I got Alt-[-%c! (%d)\n", 148},
|
||||
{"I got Alt-%c! (%d)\n", 149},
|
||||
{"Case Sensitive Regexp Search%s", 150},
|
||||
{"Regexp Search%s", 151},
|
||||
{"Case Sensitive Search%s", 152},
|
||||
{"Search%s", 153},
|
||||
{"Search Cancelled", 154},
|
||||
{"Search Wrapped", 155},
|
||||
{"Replaced %d occurences", 156},
|
||||
{"Replaced 1 occurence", 157},
|
||||
{"Replace Cancelled", 158},
|
||||
{"Replace with [%s]", 159},
|
||||
{"Replace with", 160},
|
||||
{"Replace this instance?", 161},
|
||||
{"Enter line number", 162},
|
||||
{"Aborted", 163},
|
||||
{"Come on, be reasonable", 164},
|
||||
{"Only %d lines available, skipping to last line", 165},
|
||||
{"actual_x_from_start for xplus=%d returned %d\n", 166},
|
||||
{"input '%c' (%d)\n", 167},
|
||||
{"New Buffer", 168},
|
||||
{" File: ...", 169},
|
||||
{"Modified", 170},
|
||||
{"Moved to (%d, %d) in edit buffer\n", 171},
|
||||
{"current->data = \"%s\"\n", 172},
|
||||
{"I got \"%s\"\n", 173},
|
||||
{"Yes", 174},
|
||||
{"All", 175},
|
||||
{"No", 176},
|
||||
{"do_cursorpos: linepct = %f, bytepct = %f\n", 177},
|
||||
{"line %d of %d (%.0f%%), character %d of %d (%.0f%%)", 178},
|
||||
{"Dumping file buffer to stderr...\n", 179},
|
||||
{"Dumping cutbuffer to stderr...\n", 180},
|
||||
{"Dumping a buffer to stderr...\n", 181},
|
||||
};
|
||||
|
||||
int _msg_tbl_length = 181;
|
||||
709
po/nano.pot
709
po/nano.pot
File diff suppressed because it is too large
Load Diff
@@ -1 +0,0 @@
|
||||
timestamp
|
||||
367
po/update.pl
Executable file
367
po/update.pl
Executable file
@@ -0,0 +1,367 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
#
|
||||
# GNOME PO Update Utility
|
||||
#
|
||||
# Copyright (C) 2000 Free Software Foundation.
|
||||
#
|
||||
# This script 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.
|
||||
#
|
||||
# This script 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 this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# Authors: Kenneth Christiansen <kenneth@gnu.org>
|
||||
#
|
||||
|
||||
# NOTICE: Please remember to change the variable $PACKAGE to reflect
|
||||
# the package this script is used within.
|
||||
|
||||
$PACKAGE="nano";
|
||||
|
||||
use File::Basename;
|
||||
|
||||
# Declare global variables
|
||||
#-------------------------
|
||||
my $VERSION = "1.5beta5";
|
||||
my $LANG = $ARGV[0];
|
||||
|
||||
# Always print as the first thing
|
||||
#--------------------------------
|
||||
$| = 1;
|
||||
|
||||
# Figure out what package that is in use
|
||||
#---------------------------------------
|
||||
#open FILE, "../configure.in";
|
||||
# while (<FILE>) {
|
||||
# next if /^dnl/; #ignore comments
|
||||
# if ($_=~/AM_INIT_AUTOMAKE\((.*),(.*)\)/o){
|
||||
# $PACKAGE=$1;
|
||||
# last; #stop when found
|
||||
# }
|
||||
# if ($_=~/PACKAGE\((.*)\)/o){
|
||||
# $PACKAGE=$1;
|
||||
# last; #stop when found
|
||||
# }
|
||||
# }
|
||||
#close FILE;
|
||||
|
||||
|
||||
# Give error if script is run without an argument
|
||||
#------------------------------------------------
|
||||
if (! $LANG){
|
||||
print "update.pl: missing file arguments\n";
|
||||
print "Try `update.pl --help' for more information.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
# Use the supplied arguments
|
||||
#---------------------------
|
||||
if ($LANG=~/^-(.)*/){
|
||||
|
||||
if ("$LANG" eq "--version" || "$LANG" eq "-V"){
|
||||
&Version;
|
||||
}
|
||||
elsif ($LANG eq "--help" || "$LANG" eq "-H"){
|
||||
&Help;
|
||||
}
|
||||
elsif ($LANG eq "--dist" || "$LANG" eq "-D"){
|
||||
&Merging;
|
||||
}
|
||||
elsif ($LANG eq "--pot" || "$LANG" eq "-P"){
|
||||
|
||||
# Check for .headerlock file, so the Makefile
|
||||
# will not generate the header files twise
|
||||
#--------------------------------------------
|
||||
if (-e ".headerlock"){
|
||||
&GeneratePot;
|
||||
}else{
|
||||
&GenHeaders;
|
||||
&GeneratePot;}
|
||||
exit;
|
||||
}
|
||||
elsif ($LANG eq "--headers" || "$LANG" eq "-S"){
|
||||
&GenHeaders;
|
||||
exit;
|
||||
}
|
||||
elsif ($LANG eq "--maintain" || "$LANG" eq "-M"){
|
||||
&Maintain;
|
||||
}
|
||||
else {
|
||||
&InvalidOption;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
# Run standard procedure
|
||||
#-----------------------
|
||||
if(-s "$LANG.po"){
|
||||
&GenHeaders;
|
||||
&GeneratePot;
|
||||
&Merging;
|
||||
&Status;
|
||||
}
|
||||
|
||||
# Report error if the language file supplied
|
||||
# to the command line is non-existent
|
||||
#-------------------------------------------
|
||||
else {
|
||||
&NotExisting;
|
||||
}
|
||||
}
|
||||
|
||||
sub Version{
|
||||
|
||||
# Print version information
|
||||
#--------------------------
|
||||
print "GNOME PO Updater $VERSION\n";
|
||||
print "Written by Kenneth Christiansen <kenneth\@gnome.org>, 2000.\n\n";
|
||||
print "Copyright (C) 2000 Free Software Foundation, Inc.\n";
|
||||
print "This is free software; see the source for copying conditions. There is NO\n";
|
||||
print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
sub Help{
|
||||
|
||||
# Print usage information
|
||||
#------------------------
|
||||
print "Usage: ./update.pl [OPTIONS] ...LANGCODE\n";
|
||||
print "Updates pot files and merge them with the translations.\n\n";
|
||||
print " -H, --help shows this help page\n";
|
||||
print " -P, --pot generate the pot file only\n";
|
||||
print " -S, --headers generate the XML headerfiles in POTFILES.in\n";
|
||||
print " -M, --maintain search for missing files in POTFILES.in\n";
|
||||
print " -V, --version shows the version\n";
|
||||
print "\nExamples of use:\n";
|
||||
print "update.sh --pot just creates a new pot file from the source\n";
|
||||
print "update.sh da created new pot file and updated the da.po file\n\n";
|
||||
print "Report bugs to <kenneth\@gnome.org>.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
sub Maintain{
|
||||
|
||||
# Search and fine, all translatable files
|
||||
# ---------------------------------------
|
||||
$i18nfiles="find ../ -print | egrep '.*\\.(c|y|cc|c++|h|gob)' ";
|
||||
|
||||
open(BUF2, "POTFILES.in") || die "update.pl: there's no POTFILES.in!!!\n";
|
||||
|
||||
print "Searching for missing _(\" \") entries...\n";
|
||||
|
||||
open(BUF1, "$i18nfiles|");
|
||||
|
||||
@buf1_1 = <BUF1>;
|
||||
@buf1_2 = <BUF2>;
|
||||
|
||||
# Check if we should ignore some found files, when
|
||||
# comparing with POTFILES.in
|
||||
#-------------------------------------------------
|
||||
if (-s ".potignore"){
|
||||
open FILE, ".potignore";
|
||||
while (<FILE>) {
|
||||
if ($_=~/^[^#]/o){
|
||||
push @bup, $_;
|
||||
}
|
||||
}
|
||||
print "Found .potignore: Ignoring files...\n";
|
||||
@buf1_2 = (@bup, @buf1_2);
|
||||
}
|
||||
|
||||
foreach my $file (@buf1_1){
|
||||
open FILE, "<$file";
|
||||
while (<FILE>) {
|
||||
if ($_=~/_\(\"/o){
|
||||
$file = unpack("x3 A*",$file) . "\n";
|
||||
push @buf2_1, $file;
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@buf3_1 = sort (@buf2_1);
|
||||
@buf3_2 = sort (@buf1_2);
|
||||
|
||||
my %in2;
|
||||
foreach (@buf3_2) {
|
||||
$in2{$_} = 1;
|
||||
}
|
||||
|
||||
foreach (@buf3_1){
|
||||
if (!exists($in2{$_})){
|
||||
push @result, $_
|
||||
}
|
||||
}
|
||||
|
||||
# Save file with information about the files missing
|
||||
# if any, and give information about this proceedier
|
||||
#---------------------------------------------------
|
||||
if(@result){
|
||||
open OUT, ">missing";
|
||||
print OUT @result;
|
||||
print "\nHere is the result:\n\n", @result, "\n";
|
||||
print "The file \"missing\" has been placed in the current directory.\n";
|
||||
print "Files supposed to be ignored should be placed in \".potignore\"\n";
|
||||
}
|
||||
|
||||
# If there is nothing to complain about, notice the user
|
||||
#-------------------------------------------------------
|
||||
else{
|
||||
print "\nWell, it's all perfect! Congratulation!\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub InvalidOption{
|
||||
|
||||
# Handle invalid arguments
|
||||
#-------------------------
|
||||
print "update.pl: invalid option -- $LANG\n";
|
||||
print "Try `update.pl --help' for more information.\n";
|
||||
}
|
||||
|
||||
sub GenHeaders{
|
||||
|
||||
# Generate the .h header files, so we can allow glade and
|
||||
# xml translation support
|
||||
#--------------------------------------------------------
|
||||
if(-s "ui-extract.pl"){
|
||||
|
||||
print "Found ui-extract.pl script\nRunning ui-extract...\n";
|
||||
|
||||
open FILE, "<POTFILES.in";
|
||||
while (<FILE>) {
|
||||
|
||||
# Find .xml files in POTFILES.in and generate the
|
||||
# files with help from the ui-extract.pl script
|
||||
#--------------------------------------------------
|
||||
if ($_=~ /(.*)(\.xml)/o){
|
||||
$filename = "../$1.xml";
|
||||
$xmlfiles="perl \.\/ui-extract.pl --local $filename";
|
||||
system($xmlfiles);
|
||||
}
|
||||
|
||||
# Find .glade files in POTFILES.in and generate
|
||||
# the files with help from the ui-extract.pl script
|
||||
#--------------------------------------------------
|
||||
elsif ($_=~ /(.*)(\.glade)/o){
|
||||
$filename = "../$1.glade";
|
||||
$xmlfiles="perl \.\/ui-extract.pl --local $filename";
|
||||
system($xmlfiles);
|
||||
}
|
||||
}
|
||||
close FILE;
|
||||
|
||||
# Create .headerlock file, so the script will know
|
||||
# that we already passed this section. This is required
|
||||
# since the individual sections can be reaced at different
|
||||
# times by the Makefile
|
||||
#---------------------------------------------------------
|
||||
system("touch .headerlock");
|
||||
}
|
||||
}
|
||||
|
||||
sub GeneratePot{
|
||||
|
||||
# Generate the potfiles from the POTFILES.in file
|
||||
#------------------------------------------------
|
||||
|
||||
print "Building the $PACKAGE.pot...\n";
|
||||
|
||||
system ("mv POTFILES.in POTFILES.in.old");
|
||||
|
||||
open INFILE, "<POTFILES.in.old";
|
||||
open OUTFILE, ">POTFILES.in";
|
||||
while (<INFILE>) {
|
||||
if ($_ =~ /\.(glade|xml)$/) {
|
||||
s/\.glade$/\.glade\.h/;
|
||||
s/\.xml$/\.xml\.h/;
|
||||
$_ = basename($_);
|
||||
$_ = "po/tmp/$_\n";
|
||||
}
|
||||
print OUTFILE $_;
|
||||
}
|
||||
close OUTFILE;
|
||||
close INFILE;
|
||||
|
||||
$GETTEXT ="xgettext --default-domain\=$PACKAGE --directory\=\.\."
|
||||
." --add-comments --keyword\=\_ --keyword\=N\_"
|
||||
." --files-from\=\.\/POTFILES\.in ";
|
||||
$GTEST ="test \! -f $PACKAGE\.po \|\| \( rm -f \.\/$PACKAGE\.pot "
|
||||
."&& mv $PACKAGE\.po \.\/$PACKAGE\.pot \)";
|
||||
|
||||
system($GETTEXT);
|
||||
system($GTEST);
|
||||
print "Wrote $PACKAGE.pot\n";
|
||||
system("mv POTFILES.in.old POTFILES.in");
|
||||
|
||||
# If .headerlock file is found, it means that the potfiles
|
||||
# already has been generated. If so delete the generated
|
||||
# .h header files. The reason for this approach with a
|
||||
# file as a marker is due to that the Makefile runs the
|
||||
# scripts in turns
|
||||
#---------------------------------------------------------
|
||||
|
||||
if(-e ".headerlock"){
|
||||
unlink(".headerlock");
|
||||
|
||||
print "Removing generated header (.h) files...";
|
||||
system("rm ./tmp/ -rf");
|
||||
}
|
||||
print "done\n";
|
||||
}
|
||||
|
||||
sub Merging{
|
||||
|
||||
if ($ARGV[1]){
|
||||
$LANG = $ARGV[1];
|
||||
} else {
|
||||
$LANG = $ARGV[0];
|
||||
}
|
||||
|
||||
if ($ARGV[0] ne "--dist" && $ARGV[0] ne "-D") {
|
||||
print "Merging $LANG.po with $PACKAGE.pot...";
|
||||
}
|
||||
|
||||
$MERGE="cp $LANG.po $LANG.po.old && msgmerge $LANG.po.old $PACKAGE.pot -o $LANG.po";
|
||||
|
||||
system($MERGE);
|
||||
|
||||
if ($ARGV[0] ne "--dist" && $ARGV[0] ne "-D") {
|
||||
print "\n\n";
|
||||
}
|
||||
|
||||
# Remove the "messages" trash file generated
|
||||
# by gettext, aswell as the backup file
|
||||
#-------------------------------------------
|
||||
unlink "messages";
|
||||
unlink "$LANG.po.old";
|
||||
}
|
||||
|
||||
sub NotExisting{
|
||||
|
||||
# Report error if supplied language
|
||||
# file is non-existant
|
||||
#----------------------------------
|
||||
print "update.pl: sorry, $LANG.po does not exist!\n";
|
||||
print "Try `update.pl --help' for more information.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
sub Status{
|
||||
|
||||
# Print status information about the po file
|
||||
#-------------------------------------------
|
||||
$STATUS="msgfmt --statistics $LANG.po";
|
||||
|
||||
system($STATUS);
|
||||
print "\n";
|
||||
}
|
||||
174
proto.h
174
proto.h
@@ -1,10 +1,11 @@
|
||||
/* $Id$ */
|
||||
/**************************************************************************
|
||||
* proto.h *
|
||||
* *
|
||||
* Copyright (C) 1999 Chris Allegretta *
|
||||
* Copyright (C) 1999-2002 Chris Allegretta *
|
||||
* This program 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 1, or (at your option) *
|
||||
* the Free Software Foundation; either version 2, or (at your option) *
|
||||
* any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
@@ -21,35 +22,72 @@
|
||||
/* Externs */
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef HAVE_REGEX_H
|
||||
#include <regex.h>
|
||||
#endif
|
||||
|
||||
#include "nano.h"
|
||||
|
||||
extern int center_x, center_y, editwinrows;
|
||||
extern int editwinrows;
|
||||
extern int current_x, current_y, posible_max, totlines;
|
||||
extern int placewewant;
|
||||
extern int mark_beginx, samelinewrap;
|
||||
extern int totsize, temp_opt;
|
||||
extern int fill, flags;
|
||||
extern long totsize;
|
||||
extern int temp_opt;
|
||||
extern int fill, wrap_at, flags,tabsize;
|
||||
extern int search_last_line;
|
||||
extern int currslen;
|
||||
|
||||
extern WINDOW *edit, *topwin, *bottomwin;
|
||||
extern char *filename, *answer, *last_search, *last_replace;
|
||||
extern char *filename;
|
||||
extern char *answer;
|
||||
extern char *hblank, *help_text;
|
||||
extern char *last_search;
|
||||
extern char *last_replace;
|
||||
#ifndef DISABLE_OPERATINGDIR
|
||||
extern char *operating_dir;
|
||||
#endif
|
||||
#ifndef DISABLE_SPELLER
|
||||
extern char *alt_speller;
|
||||
#endif
|
||||
extern struct stat fileinfo;
|
||||
extern filestruct *current, *fileage, *edittop, *editbot, *filebot;
|
||||
extern filestruct *cutbuffer, *mark_beginbuf;
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
extern filestruct *open_files;
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
colortype *colorstrings;
|
||||
#endif
|
||||
|
||||
extern shortcut *shortcut_list;
|
||||
extern shortcut main_list[MAIN_LIST_LEN], whereis_list[WHEREIS_LIST_LEN];
|
||||
extern shortcut replace_list[REPLACE_LIST_LEN], goto_list[GOTO_LIST_LEN];
|
||||
extern shortcut writefile_list[WRITEFILE_LIST_LEN], help_list[HELP_LIST_LEN];
|
||||
extern shortcut spell_list[SPELL_LIST_LEN];
|
||||
extern shortcut writefile_list[WRITEFILE_LIST_LEN], insertfile_list[INSERTFILE_LIST_LEN];
|
||||
extern shortcut spell_list[SPELL_LIST_LEN], replace_list_2[REPLACE_LIST_LEN];
|
||||
extern shortcut help_list[HELP_LIST_LEN];
|
||||
#ifndef DISABLE_BROWSER
|
||||
extern shortcut browser_list[BROWSER_LIST_LEN], gotodir_list[GOTODIR_LIST_LEN];
|
||||
#endif
|
||||
extern shortcut *currshortcut;
|
||||
|
||||
#ifdef HAVE_REGEX_H
|
||||
extern int use_regexp, regexp_compiled;
|
||||
extern regex_t search_regexp;
|
||||
extern regmatch_t regmatches[10];
|
||||
#endif
|
||||
|
||||
extern toggle toggles[TOGGLE_LEN];
|
||||
|
||||
/* Programs we want available */
|
||||
|
||||
char *revstrstr(char *haystack, char *needle, char *rev_start);
|
||||
char *strcasestr(char *haystack, char *needle);
|
||||
char *strstrwrapper(char *haystack, char *needle);
|
||||
char *revstrcasestr(char *haystack, char *needle, char *rev_start);
|
||||
char *strstrwrapper(char *haystack, char *needle, char *rev_start);
|
||||
int search_init(int replacing);
|
||||
int renumber(filestruct * fileptr);
|
||||
int free_filestruct(filestruct * src);
|
||||
@@ -57,32 +95,52 @@ int xplustabs(void);
|
||||
int do_yesno(int all, int leavecursor, char *msg, ...);
|
||||
int actual_x(filestruct * fileptr, int xplus);
|
||||
int strlenpt(char *buf);
|
||||
int statusq(shortcut s[], int slen, char *def, char *msg, ...);
|
||||
int write_file(char *name, int tmpfile);
|
||||
int statusq(int allowtabs, shortcut s[], int slen, char *def, char *msg, ...);
|
||||
int write_file(char *name, int tmpfile, int append, int nonamechange);
|
||||
int do_cut_text(void);
|
||||
int do_uncut_text(void);
|
||||
int no_help(void);
|
||||
int renumber_all(void);
|
||||
int open_file(char *filename, int insert, int quiet);
|
||||
int do_writeout(int exiting);
|
||||
int do_gotoline(long defline);
|
||||
int do_insertfile(int loading_file);
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
int add_open_file(int update, int dup_fix);
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_OPERATINGDIR
|
||||
int check_operating_dir(char *currpath, int allow_tabcomp);
|
||||
#endif
|
||||
|
||||
int do_writeout(char *path, int exiting, int append);
|
||||
int do_gotoline(int line, int save_pos);
|
||||
int do_replace_loop(char *prevanswer, filestruct *begin, int *beginx,
|
||||
int wholewords, int *i);
|
||||
int do_find_bracket(void);
|
||||
|
||||
#if defined (ENABLE_MULTIBUFFER) || !defined (DISABLE_SPELLER)
|
||||
void do_gotopos(int line, int pos_x, int pos_y, int pos_placewewant);
|
||||
#endif
|
||||
|
||||
/* Now in move.c */
|
||||
int do_up(void);
|
||||
int do_down(void);
|
||||
int do_left(void);
|
||||
int do_right(void);
|
||||
int check_wildcard_match(const char *text, const char *pattern);
|
||||
|
||||
char *input_tab(char *buf, int place, int *lastWasTab, int *newplace, int *list);
|
||||
char *real_dir_from_tilde(char *buf);
|
||||
|
||||
void shortcut_init(void);
|
||||
void shortcut_init(int unjustify);
|
||||
void signal_init(void);
|
||||
void lowercase(char *src);
|
||||
void blank_bottombars(void);
|
||||
void check_wrap(filestruct * inptr, char ch);
|
||||
void dump_buffer(filestruct * inptr);
|
||||
void align(char **strp);
|
||||
void edit_refresh(void);
|
||||
void edit_update(filestruct * fileptr);
|
||||
void edit_update_top(filestruct * fileptr);
|
||||
void edit_update_bot(filestruct * fileptr);
|
||||
void edit_refresh(void), edit_refresh_clearok(void);
|
||||
void edit_update(filestruct * fileptr, int topmidbotnone);
|
||||
void update_cursor(void);
|
||||
void delete_node(filestruct * fileptr);
|
||||
void set_modified(void);
|
||||
@@ -92,31 +150,105 @@ void check_statblank(void);
|
||||
void update_line(filestruct * fileptr, int index);
|
||||
void fix_editbot(void);
|
||||
void statusbar(char *msg, ...);
|
||||
void titlebar(void);
|
||||
void blank_statusbar(void);
|
||||
void titlebar(char *path);
|
||||
void previous_line(void);
|
||||
void center_cursor(void);
|
||||
void bottombars(shortcut s[], int slen);
|
||||
void blank_statusbar_refresh(void);
|
||||
void *nmalloc (size_t howmuch);
|
||||
void *mallocstrcpy(char *dest, char *src);
|
||||
void wrap_reset(void);
|
||||
void display_main_list(void);
|
||||
void nano_small_msg(void);
|
||||
void nano_disable_msg(void);
|
||||
void do_early_abort(void);
|
||||
void *nmalloc(size_t howmuch);
|
||||
void *nrealloc(void *ptr, size_t howmuch);
|
||||
void die(char *msg, ...);
|
||||
void die_save_file(char *die_filename);
|
||||
void new_file(void);
|
||||
void new_magicline(void);
|
||||
void splice_node(filestruct *begin, filestruct *newnode, filestruct *end);
|
||||
void null_at(char **data, int index);
|
||||
void page_up(void);
|
||||
void blank_edit(void);
|
||||
void search_init_globals(void);
|
||||
void replace_abort(void);
|
||||
void add_to_cutbuffer(filestruct * inptr);
|
||||
void do_replace_highlight(int highlight_flag, char *word);
|
||||
void nano_disabled_msg(void);
|
||||
void window_init(void);
|
||||
void do_mouse(void);
|
||||
void print_view_warning(void);
|
||||
void unlink_node(filestruct * fileptr);
|
||||
void cut_marked_segment(filestruct * top, int top_x, filestruct * bot,
|
||||
int bot_x, int destructive);
|
||||
|
||||
#ifdef ENABLE_NANORC
|
||||
void do_rcfile(void);
|
||||
#endif
|
||||
|
||||
#ifdef NANO_EXTRA
|
||||
void do_credits(void);
|
||||
#endif
|
||||
|
||||
|
||||
int do_writeout_void(void), do_exit(void), do_gotoline_void(void);
|
||||
int do_insertfile(void), do_search(void), page_up(void), page_down(void);
|
||||
int do_cursorpos(void), do_spell(void);
|
||||
int do_insertfile_void(void), do_search(void);
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
int load_open_file(void), close_open_file(void);
|
||||
#endif
|
||||
|
||||
int do_page_up(void), do_page_down(void);
|
||||
int do_cursorpos(int constant), do_cursorpos_void(void), do_spell(void);
|
||||
int do_up(void), do_down (void), do_right(void), do_left (void);
|
||||
int do_home(void), do_end(void), total_refresh(void), do_mark(void);
|
||||
int do_delete(void), do_backspace(void), do_tab(void), do_justify(void);
|
||||
int do_first_line(void), do_last_line(void);
|
||||
int do_replace(void), do_help(void), do_enter_void(void);
|
||||
int keypad_on(WINDOW * win, int newval);
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
int open_file_dup_fix(int update);
|
||||
int open_prevfile(int closing_file), open_nextfile(int closing_file);
|
||||
#endif
|
||||
|
||||
char *charalloc (size_t howmuch);
|
||||
|
||||
#if defined (ENABLE_MULTIBUFFER) || !defined (ENABLE_OPERATINGDIR)
|
||||
char *get_full_path(char *origpath);
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_BROWSER
|
||||
char *do_browser(char *path);
|
||||
struct stat filestat(const char *path);
|
||||
char *do_browse_from(char *inpath);
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
int do_colorinit(void);
|
||||
void color_on(WINDOW *win, int whatever);
|
||||
void color_off(WINDOW *win, int whatever);
|
||||
|
||||
extern colorstruct colors[NUM_NCOLORS];
|
||||
#endif /* ENABLE_COLOR */
|
||||
|
||||
RETSIGTYPE main_loop (int junk);
|
||||
|
||||
filestruct *copy_node(filestruct * src);
|
||||
filestruct *copy_filestruct(filestruct * src);
|
||||
filestruct *make_new_node(filestruct * prevnode);
|
||||
filestruct *findnextstr(int quiet, int bracket_mode, filestruct * begin,
|
||||
int beginx, char *needle);
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
filestruct *open_file_dup_search(int update);
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_HELP
|
||||
void help_init(void);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
423
rcfile.c
Normal file
423
rcfile.c
Normal file
@@ -0,0 +1,423 @@
|
||||
/* $Id$ */
|
||||
/**************************************************************************
|
||||
* rcfile.c *
|
||||
* *
|
||||
* Copyright (C) 1999-2002 Chris Allegretta *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2, or (at your option) *
|
||||
* any later version. *
|
||||
* *
|
||||
* This program 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 this program; if not, write to the Free Software *
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include "config.h"
|
||||
#include "proto.h"
|
||||
#include "nano.h"
|
||||
|
||||
#ifdef ENABLE_NANORC
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
#include <libintl.h>
|
||||
#define _(string) gettext(string)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_WRAPJUSTIFY
|
||||
#define NUM_RCOPTS 19
|
||||
#else
|
||||
#define NUM_RCOPTS 18
|
||||
#endif
|
||||
|
||||
/* Static stuff for the nanorc file */
|
||||
rcoption rcopts[NUM_RCOPTS] =
|
||||
{
|
||||
{"regexp", USE_REGEXP},
|
||||
{"const", CONSTUPDATE},
|
||||
{"autoindent", AUTOINDENT},
|
||||
{"cut", CUT_TO_END},
|
||||
{"nofollow", FOLLOW_SYMLINKS},
|
||||
{"mouse", USE_MOUSE},
|
||||
{"operatingdir", 0},
|
||||
{"pico", PICO_MODE},
|
||||
{"tabsize", 0},
|
||||
|
||||
#ifndef DISABLE_WRAPJUSTIFY
|
||||
{"fill", 0},
|
||||
#endif
|
||||
|
||||
{"speller", 0},
|
||||
{"tempfile", TEMP_OPT},
|
||||
{"view", VIEW_MODE},
|
||||
{"nowrap", NO_WRAP},
|
||||
{"nohelp", NO_HELP},
|
||||
{"suspend", SUSPEND},
|
||||
{"multibuffer", MULTIBUFFER},
|
||||
{"smooth", SMOOTHSCROLL},
|
||||
{"keypad", ALT_KEYPAD}};
|
||||
|
||||
/* We have an error in some part of the rcfile; put it on stderr and
|
||||
make the user hit return to continue starting up nano */
|
||||
void rcfile_error(char *msg, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
fprintf(stderr, "\n");
|
||||
va_start(ap, msg);
|
||||
vfprintf(stderr, msg, ap);
|
||||
va_end(ap);
|
||||
fprintf(stderr, _("\nPress return to continue starting nano\n"));
|
||||
|
||||
while (getchar() != '\n')
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
/* Just print the error (one of many, perhaps) but don't abort, yet */
|
||||
void rcfile_msg(int *errors, char *msg, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
if (!*errors) {
|
||||
*errors = 1;
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
va_start(ap, msg);
|
||||
vfprintf(stderr, msg, ap);
|
||||
va_end(ap);
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
}
|
||||
|
||||
/* Parse the next word from the string. Returns NULL if we hit EOL */
|
||||
char *parse_next_word(char *ptr)
|
||||
{
|
||||
while (*ptr != ' ' && *ptr != '\t' && *ptr != '\n' && *ptr != '\0')
|
||||
ptr++;
|
||||
|
||||
if (*ptr == '\0')
|
||||
return NULL;
|
||||
|
||||
/* Null terminate and advance ptr */
|
||||
*ptr++ = 0;
|
||||
|
||||
while ((*ptr == ' ' || *ptr == '\t') && *ptr != '\0')
|
||||
ptr++;
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
int colortoint(char *colorname, int *bright, char *filename, int *lineno)
|
||||
{
|
||||
int mcolor = 0;
|
||||
|
||||
if (colorname == NULL)
|
||||
return -1;
|
||||
|
||||
if (strcasestr(colorname, "bright")) {
|
||||
*bright = 1;
|
||||
colorname += 6;
|
||||
}
|
||||
|
||||
if (!strcasecmp(colorname, "green"))
|
||||
mcolor += COLOR_GREEN;
|
||||
else if (!strcasecmp(colorname, "red"))
|
||||
mcolor += COLOR_RED;
|
||||
else if (!strcasecmp(colorname, "blue"))
|
||||
mcolor += COLOR_BLUE;
|
||||
else if (!strcasecmp(colorname, "white"))
|
||||
mcolor += COLOR_WHITE;
|
||||
else if (!strcasecmp(colorname, "yellow"))
|
||||
mcolor += COLOR_YELLOW;
|
||||
else if (!strcasecmp(colorname, "cyan"))
|
||||
mcolor += COLOR_CYAN;
|
||||
else if (!strcasecmp(colorname, "magenta"))
|
||||
mcolor += COLOR_MAGENTA;
|
||||
else if (!strcasecmp(colorname, "black"))
|
||||
mcolor += COLOR_BLACK;
|
||||
else {
|
||||
printf("Error in %s on line %d: color %s not understood.\n",
|
||||
filename, *lineno, colorname);
|
||||
printf("Valid colors are \"green\", \"red\", \"blue\", "
|
||||
"\"white\", \"yellow\", \"cyan\", \"magenta\" and "
|
||||
"\"black\", with the optional prefix \"bright\".\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return mcolor;
|
||||
}
|
||||
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
/* Parse the color stuff into the colorstrings array */
|
||||
void parse_colors(FILE *rcstream, char *filename, int *lineno, char *buf, char *ptr)
|
||||
{
|
||||
int i = 0, fg, bg, bright = 0;
|
||||
char prev = '\\';
|
||||
char *tmp = NULL, *beginning, *fgstr, *bgstr;
|
||||
colortype *tmpcolor = NULL;
|
||||
|
||||
fgstr = ptr;
|
||||
ptr = parse_next_word(ptr);
|
||||
|
||||
if (ptr == NULL) {
|
||||
printf("Error in %s on line %d: Missing color name.\n",
|
||||
filename, *lineno);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (strstr(fgstr, ",")) {
|
||||
strtok(fgstr, ",");
|
||||
bgstr = strtok(NULL, ",");
|
||||
} else
|
||||
bgstr = NULL;
|
||||
|
||||
fg = colortoint(fgstr, &bright, filename, lineno);
|
||||
bg = colortoint(bgstr, &bright, filename, lineno);
|
||||
|
||||
/* Now the fun part, start adding regexps to individual strings
|
||||
in the colorstrings array, woo! */
|
||||
|
||||
i = 0;
|
||||
beginning = ptr;
|
||||
while (*ptr != '\0') {
|
||||
switch (*ptr) {
|
||||
case '\n':
|
||||
*ptr = ' ';
|
||||
/* i++; */
|
||||
case ' ':
|
||||
if (prev != '\\') {
|
||||
/* This is the end of the regex, uh I guess.
|
||||
Add it to the colorstrings array for this color */
|
||||
|
||||
tmp = NULL;
|
||||
tmp = charalloc(i + 1);
|
||||
strncpy(tmp, beginning, i);
|
||||
tmp[i] = '\0';
|
||||
|
||||
ptr = parse_next_word(ptr);
|
||||
if (ptr == NULL)
|
||||
return;
|
||||
|
||||
if (colorstrings == NULL) {
|
||||
colorstrings = nmalloc(sizeof(colortype));
|
||||
colorstrings->fg = fg;
|
||||
colorstrings->bg = bg;
|
||||
colorstrings->bright = bright;
|
||||
colorstrings->str = NULL;
|
||||
colorstrings->str = nmalloc(sizeof(colorstr));
|
||||
colorstrings->str->val = tmp;
|
||||
colorstrings->str->next = NULL;
|
||||
colorstrings->next = NULL;
|
||||
} else {
|
||||
for (tmpcolor = colorstrings; tmpcolor->next != NULL;
|
||||
tmpcolor = tmpcolor->next)
|
||||
;
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "Adding new entry for fg %d bg %d\n", fg, bg);
|
||||
#endif
|
||||
|
||||
tmpcolor->next = nmalloc(sizeof(colortype));
|
||||
tmpcolor->next->fg = fg;
|
||||
tmpcolor->next->bg = bg;
|
||||
tmpcolor->next->bright = bright;
|
||||
tmpcolor->next->str = nmalloc(sizeof(colorstr));
|
||||
tmpcolor->next->str->val = tmp;
|
||||
tmpcolor->next->str->next = NULL;
|
||||
tmpcolor->next->next = NULL;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
beginning = ptr;
|
||||
break;
|
||||
}
|
||||
/* Else drop through to the default case */
|
||||
default:
|
||||
i++;
|
||||
prev = *ptr;
|
||||
ptr++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endif /* ENABLE_COLOR */
|
||||
|
||||
/* Parse the RC file, once it has been opened successfully */
|
||||
void parse_rcfile(FILE *rcstream, char *filename)
|
||||
{
|
||||
char *buf, *ptr, *keyword, *option;
|
||||
int set = 0, lineno = 0, i;
|
||||
int errors = 0;
|
||||
|
||||
buf = charalloc(1024);
|
||||
while (fgets(buf, 1023, rcstream) > 0) {
|
||||
lineno++;
|
||||
ptr = buf;
|
||||
while ((*ptr == ' ' || *ptr == '\t') &&
|
||||
(*ptr != '\n' && *ptr != '\0'))
|
||||
ptr++;
|
||||
|
||||
if (*ptr == '\n' || *ptr == '\0')
|
||||
continue;
|
||||
|
||||
if (*ptr == '#') {
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, _("parse_rcfile: Read a comment\n"));
|
||||
#endif
|
||||
continue; /* Skip past commented lines */
|
||||
}
|
||||
|
||||
/* Else skip to the next space */
|
||||
keyword = ptr;
|
||||
ptr = parse_next_word(ptr);
|
||||
if (!ptr)
|
||||
continue;
|
||||
|
||||
/* Else try to parse the keyword */
|
||||
if (!strcasecmp(keyword, "set"))
|
||||
set = 1;
|
||||
else if (!strcasecmp(keyword, "unset"))
|
||||
set = -1;
|
||||
#ifdef ENABLE_COLOR
|
||||
else if (!strcasecmp(keyword, "color"))
|
||||
parse_colors(rcstream, filename, &lineno, buf, ptr);
|
||||
#endif /* ENABLE_COLOR */
|
||||
else {
|
||||
rcfile_msg(&errors, _("Error in %s on line %d: command %s not understood"),
|
||||
filename, lineno, keyword);
|
||||
continue;
|
||||
}
|
||||
|
||||
option = ptr;
|
||||
ptr = parse_next_word(ptr);
|
||||
/* We don't care if ptr == NULL, as it should if using proper syntax */
|
||||
|
||||
if (set != 0) {
|
||||
for (i = 0; i <= NUM_RCOPTS - 1; i++) {
|
||||
if (!strcasecmp(option, rcopts[i].name)) {
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, _("parse_rcfile: Parsing option %s\n"),
|
||||
rcopts[i].name);
|
||||
#endif
|
||||
if (set == 1 || rcopts[i].flag == FOLLOW_SYMLINKS) {
|
||||
if (
|
||||
!strcasecmp(rcopts[i].name, "operatingdir") ||
|
||||
!strcasecmp(rcopts[i].name, "tabsize") ||
|
||||
#ifndef DISABLE_WRAPJUSTIFY
|
||||
!strcasecmp(rcopts[i].name, "fill") ||
|
||||
#endif
|
||||
#ifndef DISABLE_SPELLER
|
||||
!strcasecmp(rcopts[i].name, "speller")
|
||||
#else
|
||||
0
|
||||
#endif
|
||||
) {
|
||||
|
||||
if (*ptr == '\n' || *ptr == '\0') {
|
||||
rcfile_msg(&errors, _("Error in %s on line %d: option %s requires an argument"),
|
||||
filename, lineno, rcopts[i].name);
|
||||
continue;
|
||||
}
|
||||
option = ptr;
|
||||
ptr = parse_next_word(ptr);
|
||||
if (!strcasecmp(rcopts[i].name, "fill")) {
|
||||
#ifndef DISABLE_WRAPJUSTIFY
|
||||
|
||||
if ((i = atoi(option)) < MIN_FILL_LENGTH) {
|
||||
rcfile_msg(&errors,
|
||||
_("Error in %s on line %d: requested fill size %d too small"),
|
||||
filename, lineno, i);
|
||||
}
|
||||
else
|
||||
fill = i;
|
||||
#endif
|
||||
} else if (!strcasecmp(rcopts[i].name, "tabsize")) {
|
||||
if ((i = atoi(option)) <= 0) {
|
||||
rcfile_msg(&errors,
|
||||
_("Error in %s on line %d: requested tab size %d too small"),
|
||||
filename, lineno, i);
|
||||
} else {
|
||||
tabsize = i;
|
||||
}
|
||||
} else {
|
||||
#ifndef DISABLE_SPELLER
|
||||
alt_speller = charalloc(strlen(option) + 1);
|
||||
strcpy(alt_speller, option);
|
||||
#endif
|
||||
}
|
||||
} else
|
||||
SET(rcopts[i].flag);
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, _("set flag %d!\n"), rcopts[i].flag);
|
||||
#endif
|
||||
} else {
|
||||
UNSET(rcopts[i].flag);
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, _("unset flag %d!\n"), rcopts[i].flag);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (errors)
|
||||
rcfile_error(_("Errors found in .nanorc file"));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* The main rc file function, tries to open the rc file */
|
||||
void do_rcfile(void)
|
||||
{
|
||||
char *nanorc;
|
||||
char *unable = _("Unable to open ~/.nanorc file, %s");
|
||||
struct stat fileinfo;
|
||||
FILE *rcstream;
|
||||
|
||||
|
||||
if (getenv("HOME") == NULL)
|
||||
return;
|
||||
|
||||
nanorc = charalloc(strlen(getenv("HOME")) + 10);
|
||||
sprintf(nanorc, "%s/.nanorc", getenv("HOME"));
|
||||
|
||||
if (stat(nanorc, &fileinfo) == -1) {
|
||||
|
||||
/* Abort if the file doesn't exist and there's some other kind
|
||||
of error stat()ing it */
|
||||
if (errno != ENOENT)
|
||||
rcfile_error(unable, errno);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((rcstream = fopen(nanorc, "r")) == NULL) {
|
||||
rcfile_error(unable, strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
parse_rcfile(rcstream, nanorc);
|
||||
fclose(rcstream);
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif /* ENABLE_NANORC */
|
||||
|
||||
5992
texinfo.tex
Normal file
5992
texinfo.tex
Normal file
File diff suppressed because it is too large
Load Diff
289
utils.c
289
utils.c
@@ -1,10 +1,11 @@
|
||||
/* $Id$ */
|
||||
/**************************************************************************
|
||||
* utils.c *
|
||||
* *
|
||||
* Copyright (C) 1999 Chris Allegretta *
|
||||
* Copyright (C) 1999-2002 Chris Allegretta *
|
||||
* This program 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 1, or (at your option) *
|
||||
* the Free Software Foundation; either version 2, or (at your option) *
|
||||
* any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
@@ -18,12 +19,13 @@
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "nano.h"
|
||||
#include "proto.h"
|
||||
|
||||
@@ -45,54 +47,105 @@ void lowercase(char *src)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* I can't believe I have to write this function */
|
||||
char *strcasestr(char *haystack, char *needle)
|
||||
/* None of this is needed if we're using NANO_SMALL! */
|
||||
#ifndef NANO_SMALL
|
||||
char *revstrstr(char *haystack, char *needle, char *rev_start)
|
||||
{
|
||||
char *localneedle, *localhaystack, *found, *tmp, *tmp2;
|
||||
char *p, *q, *r;
|
||||
|
||||
/* Make a copy of the search string and searcgh space */
|
||||
localneedle = nmalloc(strlen(needle) + 2);
|
||||
localhaystack = nmalloc(strlen(haystack) + 2);
|
||||
|
||||
strcpy(localneedle, needle);
|
||||
strcpy(localhaystack, haystack);
|
||||
|
||||
/* Make them lowercase */
|
||||
lowercase(localneedle);
|
||||
lowercase(localhaystack);
|
||||
|
||||
/* Look for the lowercased substring in the lowercased search space -
|
||||
return NULL if we didn't find anything */
|
||||
if ((found = strstr(localhaystack, localneedle)) == NULL) {
|
||||
free(localneedle);
|
||||
free(localhaystack);
|
||||
return NULL;
|
||||
for(p = rev_start ; p >= haystack ; --p) {
|
||||
for (r = p, q = needle ; (*q == *r) && (*q != '\0') ; r++, q++)
|
||||
;
|
||||
if (*q == '\0')
|
||||
return p;
|
||||
}
|
||||
/* Else return the pointer to the same place in the real search space */
|
||||
tmp2 = haystack;
|
||||
for (tmp = localhaystack; tmp != found; tmp++)
|
||||
tmp2++;
|
||||
|
||||
free(localneedle);
|
||||
free(localhaystack);
|
||||
return tmp2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *strstrwrapper(char *haystack, char *needle)
|
||||
char *revstrcasestr(char *haystack, char *needle, char *rev_start)
|
||||
{
|
||||
#ifdef _POSIX_VERSION
|
||||
char *p, *q, *r;
|
||||
|
||||
for(p = rev_start ; p >= haystack ; --p) {
|
||||
for (r = p, q = needle ; (tolower(*q) == tolower(*r)) && (*q != '\0') ; r++, q++)
|
||||
;
|
||||
if (*q == '\0')
|
||||
return p;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This is now mutt's version (called mutt_stristr) because it doesn't
|
||||
use memory allocation to do a simple search (yuck). */
|
||||
char *strcasestr(char *haystack, char *needle)
|
||||
{
|
||||
const char *p, *q;
|
||||
|
||||
if (!haystack)
|
||||
return NULL;
|
||||
if (!needle)
|
||||
return (haystack);
|
||||
|
||||
while (*(p = haystack)) {
|
||||
for (q = needle; *p && *q && tolower (*p) == tolower (*q); p++, q++)
|
||||
;
|
||||
if (!*q)
|
||||
return (haystack);
|
||||
haystack++;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
#endif /* NANO_SMALL */
|
||||
|
||||
char *strstrwrapper(char *haystack, char *needle, char *rev_start)
|
||||
{
|
||||
|
||||
#ifdef HAVE_REGEX_H
|
||||
|
||||
int result;
|
||||
char *i, *j;
|
||||
|
||||
if (ISSET(USE_REGEXP)) {
|
||||
int result=regexec(&search_regexp, haystack, 10, regmatches, 0);
|
||||
if (!result)
|
||||
return haystack+regmatches[0].rm_so;
|
||||
return 0;
|
||||
}
|
||||
#ifndef NANO_SMALL
|
||||
if (!ISSET(REVERSE_SEARCH)) {
|
||||
result = regexec(&search_regexp, haystack, 10, regmatches, 0);
|
||||
if (!result)
|
||||
return haystack + regmatches[0].rm_so;
|
||||
} else {
|
||||
#endif
|
||||
/* do quick check first */
|
||||
if (!(regexec(&search_regexp, haystack, 10, regmatches, 0))) {
|
||||
/* there is a match */
|
||||
for(i = rev_start ; i >= haystack ; --i)
|
||||
if (!(result = regexec(&search_regexp, i, 10, regmatches, 0))) {
|
||||
j = i + regmatches[0].rm_so;
|
||||
if (j <= rev_start)
|
||||
return j;
|
||||
}
|
||||
|
||||
}
|
||||
#ifndef NANO_SMALL
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifndef NANO_SMALL
|
||||
if (ISSET(CASE_SENSITIVE)) {
|
||||
if (ISSET(REVERSE_SEARCH))
|
||||
return revstrstr(haystack, needle, rev_start);
|
||||
else
|
||||
return strstr(haystack,needle);
|
||||
|
||||
} else {
|
||||
if (ISSET(REVERSE_SEARCH))
|
||||
return revstrcasestr(haystack, needle, rev_start);
|
||||
else
|
||||
#endif
|
||||
return strcasestr(haystack, needle);
|
||||
#ifndef NANO_SMALL
|
||||
}
|
||||
#endif
|
||||
if (ISSET(CASE_SENSITIVE))
|
||||
return strstr(haystack, needle);
|
||||
else
|
||||
return strcasestr(haystack, needle);
|
||||
}
|
||||
|
||||
/* Thanks BG, many ppl have been asking for this... */
|
||||
@@ -108,24 +161,168 @@ void *nmalloc(size_t howmuch)
|
||||
return r;
|
||||
}
|
||||
|
||||
/* We're going to need this too - Hopefully this will minimize
|
||||
the transition cost of moving to the apropriate function. */
|
||||
char *charalloc(size_t howmuch)
|
||||
{
|
||||
void *r;
|
||||
|
||||
/* Panic save? */
|
||||
|
||||
if (!(r = calloc(howmuch, sizeof (char))))
|
||||
die(_("nano: calloc: out of memory!"));
|
||||
|
||||
return (char *) r;
|
||||
}
|
||||
|
||||
void *nrealloc(void *ptr, size_t howmuch)
|
||||
{
|
||||
void *r;
|
||||
|
||||
if (!(r = realloc(ptr, howmuch)))
|
||||
die("nano: realloc: out of memory!");
|
||||
die(_("nano: realloc: out of memory!"));
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
/* Copy one malloc()ed string to another pointer.
|
||||
|
||||
Should be used as dest = mallocstrcpy(dest, src);
|
||||
*/
|
||||
void *mallocstrcpy(char *dest, char *src)
|
||||
{
|
||||
|
||||
|
||||
if (src == dest)
|
||||
return src;
|
||||
|
||||
if (dest != NULL)
|
||||
free(dest);
|
||||
|
||||
if (src == NULL) {
|
||||
dest = NULL;
|
||||
return(dest);
|
||||
}
|
||||
|
||||
dest = charalloc(strlen(src) + 1);
|
||||
strcpy(dest, src);
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
||||
|
||||
/* Append a new magic-line to filebot */
|
||||
void new_magicline(void) {
|
||||
void new_magicline(void)
|
||||
{
|
||||
filebot->next = nmalloc(sizeof(filestruct));
|
||||
filebot->next->data = nmalloc(1);
|
||||
filebot->next->data = charalloc(1);
|
||||
filebot->next->data[0] = '\0';
|
||||
filebot->next->prev = filebot;
|
||||
filebot->next->next = NULL;
|
||||
filebot->next->lineno = filebot->lineno + 1;
|
||||
filebot = filebot->next;
|
||||
totlines++;
|
||||
totsize++;
|
||||
}
|
||||
|
||||
#ifndef DISABLE_TABCOMP
|
||||
/*
|
||||
* Routine to see if a text string is matched by a wildcard pattern.
|
||||
* Returns TRUE if the text is matched, or FALSE if it is not matched
|
||||
* or if the pattern is invalid.
|
||||
* * matches zero or more characters
|
||||
* ? matches a single character
|
||||
* [abc] matches 'a', 'b' or 'c'
|
||||
* \c quotes character c
|
||||
* Adapted from code written by Ingo Wilken, and
|
||||
* then taken from sash, Copyright (c) 1999 by David I. Bell
|
||||
* Permission is granted to use, distribute, or modify this source,
|
||||
* provided that this copyright notice remains intact.
|
||||
* Permission to distribute this code under the GPL has been granted.
|
||||
*/
|
||||
int check_wildcard_match(const char *text, const char *pattern)
|
||||
{
|
||||
const char *retryPat;
|
||||
const char *retryText;
|
||||
int ch;
|
||||
int found;
|
||||
int len;
|
||||
|
||||
retryPat = NULL;
|
||||
retryText = NULL;
|
||||
|
||||
while (*text || *pattern) {
|
||||
ch = *pattern++;
|
||||
|
||||
switch (ch) {
|
||||
case '*':
|
||||
retryPat = pattern;
|
||||
retryText = text;
|
||||
break;
|
||||
|
||||
case '[':
|
||||
found = FALSE;
|
||||
|
||||
while ((ch = *pattern++) != ']') {
|
||||
if (ch == '\\')
|
||||
ch = *pattern++;
|
||||
|
||||
if (ch == '\0')
|
||||
return FALSE;
|
||||
|
||||
if (*text == ch)
|
||||
found = TRUE;
|
||||
}
|
||||
len = strlen(text);
|
||||
if (found == FALSE && len != 0) {
|
||||
return FALSE;
|
||||
}
|
||||
if (found == TRUE) {
|
||||
if (strlen(pattern) == 0 && len == 1) {
|
||||
return TRUE;
|
||||
}
|
||||
if (len != 0) {
|
||||
text++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/* fall into next case */
|
||||
|
||||
case '?':
|
||||
if (*text++ == '\0')
|
||||
return FALSE;
|
||||
|
||||
break;
|
||||
|
||||
case '\\':
|
||||
ch = *pattern++;
|
||||
|
||||
if (ch == '\0')
|
||||
return FALSE;
|
||||
|
||||
/* fall into next case */
|
||||
|
||||
default:
|
||||
if (*text == ch) {
|
||||
if (*text)
|
||||
text++;
|
||||
break;
|
||||
}
|
||||
|
||||
if (*text) {
|
||||
pattern = retryPat;
|
||||
text = ++retryText;
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (pattern == NULL)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user