Compare commits
1077 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
665b1fbac6 | ||
|
|
5cbe08fc03 | ||
|
|
73bf89fa56 | ||
|
|
a73025d731 | ||
|
|
7bde05399f | ||
|
|
6168cb7391 | ||
|
|
44e0c03fff | ||
|
|
1aee5cc599 | ||
|
|
85c0b3c37e | ||
|
|
69163af499 | ||
|
|
f816119b36 | ||
|
|
5beae58597 | ||
|
|
4e05b755ed | ||
|
|
a96c819b50 | ||
|
|
5593e20964 | ||
|
|
651853aa21 | ||
|
|
9e21c62c68 | ||
|
|
43d3e9324b | ||
|
|
b2072b0999 | ||
|
|
9905b6ae74 | ||
|
|
3b2fdb00e4 | ||
|
|
2cf6d717f1 | ||
|
|
6ad6b85862 | ||
|
|
18d6a7ae1a | ||
|
|
5423680d67 | ||
|
|
7f7c66c237 | ||
|
|
b8351c1c8b | ||
|
|
27ae93d26b | ||
|
|
95a2db7a4a | ||
|
|
23555f29ba | ||
|
|
a899ab185f | ||
|
|
c5632a7e40 | ||
|
|
9c351e8831 | ||
|
|
23d3b7457b | ||
|
|
85f6a2daab | ||
|
|
6ea410e14e | ||
|
|
d4471ebe0e | ||
|
|
7f77e1dcdd | ||
|
|
a8824a197e | ||
|
|
059ba19ff7 | ||
|
|
bec2606ce2 | ||
|
|
9d658cec7a | ||
|
|
fe7d53e51e | ||
|
|
5e50e2f51e | ||
|
|
b2ca88cc74 | ||
|
|
7a3f49c019 | ||
|
|
bebfc6da0f | ||
|
|
0517c482e4 | ||
|
|
16799baccd | ||
|
|
d4ea5b69c5 | ||
|
|
8d5beb560c | ||
|
|
ba61cc382f | ||
|
|
3f301dd437 | ||
|
|
c3e52f16ba | ||
|
|
b725353ab7 | ||
|
|
99466bfa71 | ||
|
|
261da14301 | ||
|
|
6dd67790df | ||
|
|
01e13ea1c1 | ||
|
|
68c10963c4 | ||
|
|
d0c4d378b4 | ||
|
|
6c25819c34 | ||
|
|
bd11c0171b | ||
|
|
739fc8ac3d | ||
|
|
8d0fb01ff2 | ||
|
|
d7cf373358 | ||
|
|
e0a0d23f78 | ||
|
|
da419bcbe4 | ||
|
|
b2bff724da | ||
|
|
a62e8e3de9 | ||
|
|
483f3ac1b5 | ||
|
|
90d505cc4a | ||
|
|
9c6d78669e | ||
|
|
5290e1bc84 | ||
|
|
b5aaf72b6a | ||
|
|
1ea53709d8 | ||
|
|
0227ccca7c | ||
|
|
25799f6862 | ||
|
|
c54c4d1eea | ||
|
|
7431fe5e93 | ||
|
|
166da9c893 | ||
|
|
cd0210ff3e | ||
|
|
7098ec233c | ||
|
|
62898233ac | ||
|
|
26e637bf12 | ||
|
|
d873447f5f | ||
|
|
84635cd8e8 | ||
|
|
03987abebd | ||
|
|
c661853315 | ||
|
|
4f673d802c | ||
|
|
bf51aa4c0a | ||
|
|
954aba7430 | ||
|
|
3435a0ff64 | ||
|
|
66357b5462 | ||
|
|
e29111f7ec | ||
|
|
6399000a48 | ||
|
|
ea01474c4b | ||
|
|
077d0647c9 | ||
|
|
9b494fa90c | ||
|
|
18a89a6cef | ||
|
|
c4ca596a90 | ||
|
|
5c8197d78f | ||
|
|
62e117421f | ||
|
|
f3ecffd24d | ||
|
|
f774017801 | ||
|
|
d1cc007136 | ||
|
|
25fb1025e9 | ||
|
|
a9a3f4f599 | ||
|
|
e6a55fa1e5 | ||
|
|
95f7a7431e | ||
|
|
fa6c29cc2e | ||
|
|
b2b6976bd9 | ||
|
|
7a4aaa53a1 | ||
|
|
77d0feae05 | ||
|
|
c1b960947e | ||
|
|
4846ce7a6a | ||
|
|
34c75746c2 | ||
|
|
3129c2928b | ||
|
|
21374584e2 | ||
|
|
a2ea733e3b | ||
|
|
40ad177210 | ||
|
|
6f143c8124 | ||
|
|
072f86c5f9 | ||
|
|
f271f9c962 | ||
|
|
5a6caf0ca8 | ||
|
|
da72453859 | ||
|
|
203026c632 | ||
|
|
ed7ad33802 | ||
|
|
ff6c1997b9 | ||
|
|
a01690c410 | ||
|
|
ff1a0ea32b | ||
|
|
42e271d2d3 | ||
|
|
9c06f34ef9 | ||
|
|
ab41ab9246 | ||
|
|
2515ccc0a0 | ||
|
|
d1323e4e35 | ||
|
|
7ae1a79641 | ||
|
|
e221311f2e | ||
|
|
d26f1ebdf1 | ||
|
|
1e64db6629 | ||
|
|
ce9d299c47 | ||
|
|
bdfa927d62 | ||
|
|
789867b6a0 | ||
|
|
3a4eb48d5c | ||
|
|
bfc183ba10 | ||
|
|
6209e0eb15 | ||
|
|
e534aae701 | ||
|
|
d5d4dde1eb | ||
|
|
42af2216fe | ||
|
|
356d2482c5 | ||
|
|
399fe939f9 | ||
|
|
40c3cd1aa9 | ||
|
|
b300af3f63 | ||
|
|
30d0a81656 | ||
|
|
6a0d5b8fec | ||
|
|
7b601fdbe1 | ||
|
|
8b698f4a29 | ||
|
|
9880afc47a | ||
|
|
5ed8819f35 | ||
|
|
7291daabe3 | ||
|
|
d2edb8a538 | ||
|
|
33d07ef055 | ||
|
|
f26d386191 | ||
|
|
67287088dc | ||
|
|
d16d0bfb9a | ||
|
|
5b9f52265a | ||
|
|
a049c8364f | ||
|
|
1a76845aa5 | ||
|
|
e90f0b8a33 | ||
|
|
d232fa2fc3 | ||
|
|
e010edd1f8 | ||
|
|
19462616d4 | ||
|
|
d8640480c3 | ||
|
|
6315e2ff39 | ||
|
|
068edf44fc | ||
|
|
aeeb96e628 | ||
|
|
3db0dc3d8d | ||
|
|
c00f658026 | ||
|
|
8767da4e63 | ||
|
|
d0d5b8fc0e | ||
|
|
44491acfef | ||
|
|
8bcac8ad26 | ||
|
|
53aca71420 | ||
|
|
a9d45bba01 | ||
|
|
a644af58a3 | ||
|
|
7c78b45e76 | ||
|
|
746214d5aa | ||
|
|
0df61f1aac | ||
|
|
4428975e95 | ||
|
|
c7935e20b7 | ||
|
|
01458cd380 | ||
|
|
7bf86e1707 | ||
|
|
23d3cf4515 | ||
|
|
9af6a203fb | ||
|
|
092af14a82 | ||
|
|
3da5580c9c | ||
|
|
3925bdafda | ||
|
|
f47f150c82 | ||
|
|
457847f0fe | ||
|
|
7e62d109ba | ||
|
|
193b0e56f3 | ||
|
|
9b108c2110 | ||
|
|
da33153379 | ||
|
|
f4595bb5ae | ||
|
|
c4dbdd55f5 | ||
|
|
d29b9d5bd6 | ||
|
|
810d02c6a4 | ||
|
|
f99acbf29a | ||
|
|
6fdc81ae04 | ||
|
|
81dabf2be7 | ||
|
|
3db02389f4 | ||
|
|
cc81436f81 | ||
|
|
6529ab434a | ||
|
|
160c5fec87 | ||
|
|
81e49a0d4a | ||
|
|
c10d8ffe9f | ||
|
|
8fda94246b | ||
|
|
1addd601bc | ||
|
|
8e15674c70 | ||
|
|
5854a87070 | ||
|
|
47ae0d764e | ||
|
|
73857558ec | ||
|
|
854b71d775 | ||
|
|
cef24f2254 | ||
|
|
8d07efac66 | ||
|
|
d922f199a7 | ||
|
|
34bdc35d94 | ||
|
|
1726050ef9 | ||
|
|
8234f672d4 | ||
|
|
95778fda70 | ||
|
|
dac3bca274 | ||
|
|
e0b55138b9 | ||
|
|
5e068c6031 | ||
|
|
bec2f20da0 | ||
|
|
d20c0c34f5 | ||
|
|
0998a64fb9 | ||
|
|
527f1743f6 | ||
|
|
54b74cee91 | ||
|
|
b9b572236a | ||
|
|
df2a82509b | ||
|
|
1a1ea3d42f | ||
|
|
15aaa2c31a | ||
|
|
10796ac2fc | ||
|
|
aff5a1c6b1 | ||
|
|
217f241be5 | ||
|
|
11846fa576 | ||
|
|
32fe95d35e | ||
|
|
920e350d85 | ||
|
|
e5b23bd2ff | ||
|
|
7de678798a | ||
|
|
638cbe5407 | ||
|
|
0e0fef03c5 | ||
|
|
f1d3d9581a | ||
|
|
40e4acf55e | ||
|
|
5d8d0b19be | ||
|
|
86d8fc37d7 | ||
|
|
e8bb90bd2b | ||
|
|
e2ce2792a3 | ||
|
|
045d130cfa | ||
|
|
31b159c1b3 | ||
|
|
e4acb69611 | ||
|
|
e3970f503c | ||
|
|
16f88134f7 | ||
|
|
8b3266e83c | ||
|
|
0a8ec176e4 | ||
|
|
86a9452702 | ||
|
|
c5e9a434b1 | ||
|
|
67e3b93861 | ||
|
|
e5bc1c45ce | ||
|
|
2fba43c842 | ||
|
|
934f9687bb | ||
|
|
7ae4cc6964 | ||
|
|
0f476b99b7 | ||
|
|
30f164a015 | ||
|
|
86ce3903f9 | ||
|
|
6f25a67833 | ||
|
|
5754201944 | ||
|
|
172767187e | ||
|
|
d3d37433ae | ||
|
|
f83e5e2b13 | ||
|
|
650b39c43d | ||
|
|
9245f97960 | ||
|
|
60a9bddcf6 | ||
|
|
e1ce92c90f | ||
|
|
c5659d320e | ||
|
|
2f0cd35322 | ||
|
|
b68c01b753 | ||
|
|
50995bd024 | ||
|
|
9c8baed321 | ||
|
|
775eeba38a | ||
|
|
6e925cf330 | ||
|
|
066713e87e | ||
|
|
546f5b3d8a | ||
|
|
e781ddf3b1 | ||
|
|
6d39f4ba66 | ||
|
|
5ebd73f9a5 | ||
|
|
02173c05dc | ||
|
|
7f4dd35406 | ||
|
|
8f5e50991b | ||
|
|
340e5ca881 | ||
|
|
75f4b7cb84 | ||
|
|
5e73eec3cc | ||
|
|
0f83c89b09 | ||
|
|
6bc26a9a8b | ||
|
|
198bd592ff | ||
|
|
fcdfb7f75f | ||
|
|
e41e8dbead | ||
|
|
10f880c62f | ||
|
|
5e360dc065 | ||
|
|
6595b715d0 | ||
|
|
56c1e34e5a | ||
|
|
e4cb3158fd | ||
|
|
6439330d59 | ||
|
|
0bfec6e58d | ||
|
|
29be8031df | ||
|
|
c5fe41cec8 | ||
|
|
72bff8eee4 | ||
|
|
d4a1c0ad29 | ||
|
|
1ccada16ae | ||
|
|
5b2f17e591 | ||
|
|
3705924fc8 | ||
|
|
c596c0c4da | ||
|
|
9cf1df1f06 | ||
|
|
56074a1da6 | ||
|
|
f79a3fa51a | ||
|
|
b9180f4a82 | ||
|
|
ad11460eb7 | ||
|
|
04652518fd | ||
|
|
22425a204d | ||
|
|
e527e458f4 | ||
|
|
ac71fdde97 | ||
|
|
ffda704ef6 | ||
|
|
6a244b689f | ||
|
|
c2b07472e2 | ||
|
|
f1aed80922 | ||
|
|
95660ee4d9 | ||
|
|
ddedf2dbd4 | ||
|
|
c32a5e7b4e | ||
|
|
a3e5fad059 | ||
|
|
7accda6dd7 | ||
|
|
b9f28013a7 | ||
|
|
c504dffa39 | ||
|
|
fc0ebe982d | ||
|
|
dcb4e3a66d | ||
|
|
00762ffaeb | ||
|
|
4857728f6e | ||
|
|
c0718343f5 | ||
|
|
d9a4dedd35 | ||
|
|
de85d63520 | ||
|
|
53d7bce68a | ||
|
|
a716bf42bc | ||
|
|
403e0feced | ||
|
|
e61e2c6f49 | ||
|
|
d4a071e492 | ||
|
|
894d80fc5d | ||
|
|
612caef65f | ||
|
|
88ad64d597 | ||
|
|
aa683853d4 | ||
|
|
050469c595 | ||
|
|
4811b81456 | ||
|
|
050b13ae5d | ||
|
|
6a84684571 | ||
|
|
caac92012d | ||
|
|
32a285c1eb | ||
|
|
b80d49f071 | ||
|
|
fe605247cb | ||
|
|
78d05481db | ||
|
|
b56ca1b7bb | ||
|
|
d37f6a3f5c | ||
|
|
5f3695bdb5 | ||
|
|
d8367986ce | ||
|
|
6e0ed3c1c6 | ||
|
|
c15583da31 | ||
|
|
8ac9087d75 | ||
|
|
c8857a2c26 | ||
|
|
297851a647 | ||
|
|
cb4f14b8ce | ||
|
|
263b447323 | ||
|
|
bc6a36e40d | ||
|
|
eb5092226d | ||
|
|
cf4db89d56 | ||
|
|
4e0b1ae332 | ||
|
|
c4daf5d49e | ||
|
|
b41df4a140 | ||
|
|
a853e2d650 | ||
|
|
6b94e95ec9 | ||
|
|
aad85151ae | ||
|
|
7ec8d7c6a3 | ||
|
|
39e8ce6f8e | ||
|
|
afbcf68c1a | ||
|
|
b9dec213be | ||
|
|
928babf8a1 | ||
|
|
2d825bae79 | ||
|
|
3dfc879f63 | ||
|
|
bec01bd97d | ||
|
|
3dd744f392 | ||
|
|
adc30a839b | ||
|
|
8974efa27b | ||
|
|
d96ee5260a | ||
|
|
ba1ab86db5 | ||
|
|
1fc55a268f | ||
|
|
543ecf65a6 | ||
|
|
735b30c13f | ||
|
|
40e211bcec | ||
|
|
9bd56204ee | ||
|
|
d456bfa10d | ||
|
|
22a3564a2e | ||
|
|
d44a005e3d | ||
|
|
df21a2cbdf | ||
|
|
b349c80f0d | ||
|
|
85616c499b | ||
|
|
b9ddb80123 | ||
|
|
27f2b258d3 | ||
|
|
102d01da6c | ||
|
|
fd81a7189b | ||
|
|
efec641a82 | ||
|
|
77abec7ecf | ||
|
|
ba5b12c1fa | ||
|
|
40ea2a2ea0 | ||
|
|
496488c5d2 | ||
|
|
a17a130d6c | ||
|
|
2161fa6254 | ||
|
|
bb0060eb96 | ||
|
|
631242dd96 | ||
|
|
4dc5838ccc | ||
|
|
0099a8f45c | ||
|
|
38156d4491 | ||
|
|
666644efbc | ||
|
|
15540051ac | ||
|
|
7b918c76ee | ||
|
|
7d7e7d58ad | ||
|
|
f0195a8839 | ||
|
|
08c70ae1e9 | ||
|
|
9389ca29cf | ||
|
|
af40eeaa06 | ||
|
|
b159605a5b | ||
|
|
801a8b51d1 | ||
|
|
ff4a487efa | ||
|
|
9ec5db8b42 | ||
|
|
8d0d3abb72 | ||
|
|
7f9ed903ec | ||
|
|
96b21be5cf | ||
|
|
7253929a55 | ||
|
|
e9ac1d7930 | ||
|
|
59fe758a10 | ||
|
|
cefd29e9fe | ||
|
|
bca59d6ac0 | ||
|
|
800dd18fa4 | ||
|
|
b1d9b418b8 | ||
|
|
e0fb4d5641 | ||
|
|
55dfc3d3e9 | ||
|
|
6e60db6989 | ||
|
|
202d3c2f97 | ||
|
|
40f11ae622 | ||
|
|
3cf525d46f | ||
|
|
23f7e1b138 | ||
|
|
256a8908aa | ||
|
|
b199caef7d | ||
|
|
c275dc575a | ||
|
|
9d69169072 | ||
|
|
09b1c02c62 | ||
|
|
5f9acfeee5 | ||
|
|
9adace8c76 | ||
|
|
bd2eb289fb | ||
|
|
e6bbee8fe4 | ||
|
|
7e110bd28f | ||
|
|
eb4d81f3c1 | ||
|
|
aed09427f8 | ||
|
|
5d2ab88f0e | ||
|
|
65ef166a40 | ||
|
|
b6e79fddaf | ||
|
|
0c23aed600 | ||
|
|
ad96aff50d | ||
|
|
60e329e3b2 | ||
|
|
32f56814c7 | ||
|
|
45edf361a8 | ||
|
|
4c75faa211 | ||
|
|
7d367710ae | ||
|
|
b680326c37 | ||
|
|
e1c16b3744 | ||
|
|
bc14941e34 | ||
|
|
1b9d3f9898 | ||
|
|
2724c88717 | ||
|
|
54dca7b7b3 | ||
|
|
0df875a45d | ||
|
|
d7ca85c86c | ||
|
|
d9661dc301 | ||
|
|
0b80f936bf | ||
|
|
65e6ecb1d4 | ||
|
|
daa533a767 | ||
|
|
3eeb823f92 | ||
|
|
2921be2f38 | ||
|
|
d15de73bf3 | ||
|
|
798e67e0a1 | ||
|
|
96de1b0650 | ||
|
|
23c44504ad | ||
|
|
7c60eab744 | ||
|
|
3f9c63589e | ||
|
|
14ace1711d | ||
|
|
3e93c63e60 | ||
|
|
83ba47a964 | ||
|
|
345260c624 | ||
|
|
3ee4cf3027 | ||
|
|
17b8a36d17 | ||
|
|
42abfe057e | ||
|
|
159bdfdc60 | ||
|
|
122ae849b8 | ||
|
|
5040666fbb | ||
|
|
b80077dae3 | ||
|
|
314be2cfa9 | ||
|
|
21954765ca | ||
|
|
2bd22761ac | ||
|
|
d23277fbc9 | ||
|
|
4ce3b49597 | ||
|
|
5cc14f2f9a | ||
|
|
637b8bb36c | ||
|
|
65658ef574 | ||
|
|
18d616f253 | ||
|
|
c5e21dafb7 | ||
|
|
3a1fc8f0ab | ||
|
|
721fe6704a | ||
|
|
63d8f2b42f | ||
|
|
776cf3771d | ||
|
|
ce0451348c | ||
|
|
31055b3ba8 | ||
|
|
7801d7bed9 | ||
|
|
d24fbb760d | ||
|
|
1fe2eebf74 | ||
|
|
52e5f23184 | ||
|
|
b3aeb13682 | ||
|
|
c4c45aa532 | ||
|
|
e3013e3ed0 | ||
|
|
f6e4d33afc | ||
|
|
1bdccc5281 | ||
|
|
9b95ca8c29 | ||
|
|
8eb9c029be | ||
|
|
8f2906ba61 | ||
|
|
5508cc5b0a | ||
|
|
49ff08b251 | ||
|
|
116c828c50 | ||
|
|
78dadd4550 | ||
|
|
ea9370f231 | ||
|
|
610929c6ed | ||
|
|
c1e3d941a5 | ||
|
|
487d08cad0 | ||
|
|
0c9df578ea | ||
|
|
8a31afdc55 | ||
|
|
4c6956b433 | ||
|
|
b54155c4a4 | ||
|
|
775d46daf9 | ||
|
|
cac0293bce | ||
|
|
577298a3f9 | ||
|
|
f4a799aaec | ||
|
|
35e9713543 | ||
|
|
d96851f534 | ||
|
|
12054fe11b | ||
|
|
1307aae01a | ||
|
|
6d594a9cbb | ||
|
|
9ac20c85b0 | ||
|
|
0251bdb0a5 | ||
|
|
8ec1e2d903 | ||
|
|
851bea2ccd | ||
|
|
bbd63e136d | ||
|
|
28e19f8bbc | ||
|
|
9dffac90e7 | ||
|
|
930b1d7809 | ||
|
|
913db834d2 | ||
|
|
b6fbdd00cf | ||
|
|
d90d64f718 | ||
|
|
179f0ea742 | ||
|
|
22e5eff432 | ||
|
|
4d709f351c | ||
|
|
68e3016557 | ||
|
|
2524a70a49 | ||
|
|
f647c48035 | ||
|
|
f0a53f02a1 | ||
|
|
423326fc71 | ||
|
|
956da0d0e1 | ||
|
|
6e1cd06b96 | ||
|
|
1b1e8b632f | ||
|
|
d9ad76ba3c | ||
|
|
11c83d3ed3 | ||
|
|
b8a2a6d7e5 | ||
|
|
08cd7ef274 | ||
|
|
4840cb557f | ||
|
|
295d172f2d | ||
|
|
c13b7f0699 | ||
|
|
3e81914b82 | ||
|
|
0d847aadd9 | ||
|
|
f282428a42 | ||
|
|
4d97a588e6 | ||
|
|
c8ade44741 | ||
|
|
a9b9913c6b | ||
|
|
c195820456 | ||
|
|
6a643cd596 | ||
|
|
a35bdd1f03 | ||
|
|
4fd76bab73 | ||
|
|
fe3627ddfd | ||
|
|
61a71403f4 | ||
|
|
7ddca3a9a6 | ||
|
|
1903ace275 | ||
|
|
93c4a5656b | ||
|
|
9ec76e5573 | ||
|
|
fc693210d5 | ||
|
|
c0b9d19ed7 | ||
|
|
415b5d91cf | ||
|
|
3ba9c3512c | ||
|
|
f3bea022d6 | ||
|
|
6a2f068c7f | ||
|
|
e750fe68cf | ||
|
|
4564170c61 | ||
|
|
6eea1473b4 | ||
|
|
fbba5bf249 | ||
|
|
6a2f58e2ef | ||
|
|
78ea5e4a8a | ||
|
|
164bf36ea8 | ||
|
|
c2ac02ff46 | ||
|
|
abc9423709 | ||
|
|
60448895f6 | ||
|
|
263240c7c7 | ||
|
|
32085a88e8 | ||
|
|
eae97caa83 | ||
|
|
43953bba6f | ||
|
|
91851f3e60 | ||
|
|
bed32a370b | ||
|
|
f812e4f7d9 | ||
|
|
10820de467 | ||
|
|
98b61e3702 | ||
|
|
95a0224820 | ||
|
|
eb711b034b | ||
|
|
bfcba16761 | ||
|
|
2c70a4e608 | ||
|
|
bce3aad885 | ||
|
|
f326ed7910 | ||
|
|
846658eb6b | ||
|
|
c41285fb0b | ||
|
|
9c3edc026b | ||
|
|
7483571f7f | ||
|
|
68ebb61fb1 | ||
|
|
fc54d6e431 | ||
|
|
c0e42bd3c5 | ||
|
|
3ece0b9aeb | ||
|
|
1483ee3db1 | ||
|
|
63e73cbd14 | ||
|
|
53d3db4ba6 | ||
|
|
832db768a4 | ||
|
|
6ecbdd30b1 | ||
|
|
40a6c8cb64 | ||
|
|
800ee0d3f9 | ||
|
|
7a6fb48cf5 | ||
|
|
62a217d35d | ||
|
|
c109549a7e | ||
|
|
15dbc6ef07 | ||
|
|
c82997d460 | ||
|
|
08eab72517 | ||
|
|
e08765dca5 | ||
|
|
ca018c3e23 | ||
|
|
2dbcc801bf | ||
|
|
698263ca5c | ||
|
|
12642edfc9 | ||
|
|
5b3dd0f423 | ||
|
|
329d6a3259 | ||
|
|
8a2c0ba4b6 | ||
|
|
eeec999548 | ||
|
|
cc89513f14 | ||
|
|
6e738ac712 | ||
|
|
d994ad5284 | ||
|
|
304129315c | ||
|
|
4d6ec37676 | ||
|
|
bc3b92605e | ||
|
|
93c8405bfa | ||
|
|
b5a7a5a2d6 | ||
|
|
962202e4fa | ||
|
|
2c86dc6dc9 | ||
|
|
3de81bc33d | ||
|
|
3f35864b10 | ||
|
|
74d87073f0 | ||
|
|
e56d936bd4 | ||
|
|
831c640e62 | ||
|
|
b908a36d60 | ||
|
|
b75763e07e | ||
|
|
188f169e1d | ||
|
|
c0d3b20bdc | ||
|
|
42ca620e11 | ||
|
|
69a90c6b3b | ||
|
|
d7b632560c | ||
|
|
55381aa614 | ||
|
|
f6159047bc | ||
|
|
4db3d0adf7 | ||
|
|
6b769e5f5b | ||
|
|
0317c86a8a | ||
|
|
a98fd75b32 | ||
|
|
8091d334a3 | ||
|
|
9df069cc5f | ||
|
|
97b9046239 | ||
|
|
036a3d4646 | ||
|
|
4a3879f1ed | ||
|
|
56cf034a12 | ||
|
|
649b431171 | ||
|
|
bfb98f8bd4 | ||
|
|
8001e27e67 | ||
|
|
907725fde8 | ||
|
|
8781fc62cb | ||
|
|
1f1ebb85b7 | ||
|
|
e3016d90aa | ||
|
|
6299b0d752 | ||
|
|
2c31540fa9 | ||
|
|
fd9da07e6c | ||
|
|
fdd3becc1e | ||
|
|
c136f75f62 | ||
|
|
a084ad94f7 | ||
|
|
c15802f8c3 | ||
|
|
7105cf4f8e | ||
|
|
02085d7b92 | ||
|
|
50af6ea21e | ||
|
|
8ae06a86b8 | ||
|
|
29f446ec40 | ||
|
|
eb5d8383c8 | ||
|
|
00cca05ebb | ||
|
|
8c16bacbbf | ||
|
|
bde3e0e294 | ||
|
|
cb09337993 | ||
|
|
46c604a14e | ||
|
|
90e59c1a18 | ||
|
|
93eb293fbb | ||
|
|
d5402232ac | ||
|
|
0432e70850 | ||
|
|
78d644a635 | ||
|
|
1c293d2e28 | ||
|
|
31f99361b6 | ||
|
|
3d67c11473 | ||
|
|
b73c0c0b09 | ||
|
|
1539837fe0 | ||
|
|
dcc201b5b2 | ||
|
|
f643fc2149 | ||
|
|
f978f040bd | ||
|
|
8cbd4cb67f | ||
|
|
07e2589f80 | ||
|
|
be246c008b | ||
|
|
3e0c8a614d | ||
|
|
84d0d59cbb | ||
|
|
164c79883b | ||
|
|
e1ee22fba2 | ||
|
|
40bdb686aa | ||
|
|
29f03dcff9 | ||
|
|
182b2c936f | ||
|
|
6d9aa085d1 | ||
|
|
99869f54b5 | ||
|
|
4a1fc558cf | ||
|
|
1e1f572c51 | ||
|
|
4b4b608806 | ||
|
|
8381fdd83a | ||
|
|
d402e71a2f | ||
|
|
2e83a50e95 | ||
|
|
3d002ed602 | ||
|
|
add65085d6 | ||
|
|
e5e88fd9f2 | ||
|
|
85f8f46c40 | ||
|
|
687776b1a8 | ||
|
|
7a97e18667 | ||
|
|
59f5e04fa8 | ||
|
|
ace1037faf | ||
|
|
77b284af68 | ||
|
|
233f336112 | ||
|
|
d4ca9f2acb | ||
|
|
9bf486fe5d | ||
|
|
410efe9a47 | ||
|
|
1758640682 | ||
|
|
0ff01a92bc | ||
|
|
cc823ab6d6 | ||
|
|
cfa4a9c4fe | ||
|
|
e93e03e1dc | ||
|
|
c151b475e7 | ||
|
|
da952f8ded | ||
|
|
2690bafa15 | ||
|
|
e7c4168ee1 | ||
|
|
9abd1d18e4 | ||
|
|
7975408f66 | ||
|
|
c59979f067 | ||
|
|
bf1346f342 | ||
|
|
6a715b69a7 | ||
|
|
ca92becf9d | ||
|
|
2c4e34cfce | ||
|
|
d9fb3e6bde | ||
|
|
1601c28976 | ||
|
|
fe65657f6f | ||
|
|
484352241e | ||
|
|
2eb745939e | ||
|
|
3288925efb | ||
|
|
9819ed031b | ||
|
|
27fbc69ec4 | ||
|
|
53752e8f9a | ||
|
|
b802e70208 | ||
|
|
db85ac7564 | ||
|
|
cbc13a2a62 | ||
|
|
c6899cb734 | ||
|
|
2cc2a57dea | ||
|
|
381d483986 | ||
|
|
6be5339265 | ||
|
|
439fbe3e93 | ||
|
|
9cf7b28248 | ||
|
|
4b7e3c3efa | ||
|
|
fc965a4869 | ||
|
|
1f204c0204 | ||
|
|
4e8e495301 | ||
|
|
a870ca2d72 | ||
|
|
5780b24759 | ||
|
|
e53181d423 | ||
|
|
646bf9111c | ||
|
|
49d5c1bf1c | ||
|
|
731e7f28e7 | ||
|
|
1929982ec3 | ||
|
|
b6377c9d14 | ||
|
|
b112fe627d | ||
|
|
d93ee682c0 | ||
|
|
3497666a21 | ||
|
|
491cad3e5d | ||
|
|
f3b10e8e05 | ||
|
|
6b1c2adc86 | ||
|
|
7cfea8bb8c | ||
|
|
28caf14863 | ||
|
|
211dc82738 | ||
|
|
b6d97c15ac | ||
|
|
487149e713 | ||
|
|
045883aa34 | ||
|
|
056c5ef4a6 | ||
|
|
b49daec3f2 | ||
|
|
4dd723a095 | ||
|
|
d532f197b0 | ||
|
|
e663dcd6aa | ||
|
|
4c9e8f4211 | ||
|
|
77e02a3e74 | ||
|
|
951d7148d1 | ||
|
|
f1c395da79 | ||
|
|
3e189a8b9c | ||
|
|
7c1f17ab6d | ||
|
|
360191c434 | ||
|
|
ca744153fd | ||
|
|
be908f6992 | ||
|
|
e5d8f32834 | ||
|
|
47e82b1752 | ||
|
|
04a8d1c040 | ||
|
|
03225330dc | ||
|
|
25884f3bdb | ||
|
|
9bab9ff5b4 | ||
|
|
670a56c241 | ||
|
|
9b6e476a46 | ||
|
|
1e7297116b | ||
|
|
b77ec62cde | ||
|
|
45f971d69b | ||
|
|
eb16f43cf9 | ||
|
|
72d8e54f6e | ||
|
|
09b34ed34e | ||
|
|
f3ca80e11d | ||
|
|
013344c4c5 | ||
|
|
d08348b99c | ||
|
|
e6ef8b9bb9 | ||
|
|
807657b0fe | ||
|
|
f887298c6e | ||
|
|
db6015c7d7 | ||
|
|
fd73c462f4 | ||
|
|
12d5b2f6bd | ||
|
|
c7ca28a6ba | ||
|
|
6ccf0e2386 | ||
|
|
1a5c4c691c | ||
|
|
02517e0a0f | ||
|
|
8bf08097ee | ||
|
|
1fabded68f | ||
|
|
30d82b787d | ||
|
|
cc79a9ae96 | ||
|
|
66e19ba5f3 | ||
|
|
2a60ea8fe3 | ||
|
|
4aece064db | ||
|
|
6da969e44b | ||
|
|
146bb6026a | ||
|
|
c510042bcd | ||
|
|
50c7f2de2f | ||
|
|
0c4c58e457 | ||
|
|
20b83508f4 | ||
|
|
d1322107a5 | ||
|
|
fe0d366ce2 | ||
|
|
a16b27f102 | ||
|
|
dfca1c4ea6 | ||
|
|
a0b5ba2f7f | ||
|
|
19420aac9d | ||
|
|
013e8d1eb1 | ||
|
|
c6718cf209 | ||
|
|
a88347069c | ||
|
|
35fb55aba2 | ||
|
|
c08368bd19 | ||
|
|
b4041d6821 | ||
|
|
95f3812db1 | ||
|
|
a27bd65057 | ||
|
|
bb50b305d5 | ||
|
|
7e8dd19a72 | ||
|
|
df13e3beef | ||
|
|
7dfec43f42 | ||
|
|
69a28122c1 | ||
|
|
76356bd05b | ||
|
|
82dc1c17f2 | ||
|
|
95e39e5f46 | ||
|
|
1e7f1ea1e8 | ||
|
|
6420d445c2 | ||
|
|
049e4a5db3 | ||
|
|
6b24856c2f | ||
|
|
c7b6ac5afe | ||
|
|
00d7798756 | ||
|
|
ce62e82a93 | ||
|
|
73cd1a5ded | ||
|
|
76f63ff58d | ||
|
|
22fac783f5 | ||
|
|
c53ab2a854 | ||
|
|
4d44d2de0e | ||
|
|
8bf9ba0c16 | ||
|
|
76fb3eccda | ||
|
|
b8c479a9e9 | ||
|
|
a6d26d04fd | ||
|
|
906257932f | ||
|
|
9ef3adbc1d | ||
|
|
819c7f0327 | ||
|
|
f56cc9e0e9 | ||
|
|
360093a652 | ||
|
|
86e851b4e7 | ||
|
|
2d140c2980 | ||
|
|
7d3817fb3e | ||
|
|
331e659e98 | ||
|
|
8aaf03000b | ||
|
|
ad1fd0d968 | ||
|
|
1536f8613d | ||
|
|
c41d428b41 | ||
|
|
8037fe076b | ||
|
|
94b975ce7c | ||
|
|
04419b9702 | ||
|
|
36dd87b1fb | ||
|
|
24f10c30c3 | ||
|
|
fd3039a8e7 | ||
|
|
fb8bf40efb | ||
|
|
aea4dabf59 | ||
|
|
300b87fda6 | ||
|
|
49c3f2406d | ||
|
|
576bf331ef | ||
|
|
d717d4bac6 | ||
|
|
0273829353 | ||
|
|
f708037715 | ||
|
|
a5dda84a07 | ||
|
|
0af8604ec9 | ||
|
|
ec721c8e80 | ||
|
|
2ad320926f | ||
|
|
962cc74620 | ||
|
|
25529074d3 | ||
|
|
f7b5d930a9 | ||
|
|
309fbcbddf | ||
|
|
4693864a78 | ||
|
|
01a6bf4f9a | ||
|
|
c8c69d5449 | ||
|
|
edab0cc0a5 | ||
|
|
72e51ab037 | ||
|
|
74912c6090 | ||
|
|
ebd0d7c859 | ||
|
|
0fb841a78a | ||
|
|
cff5558394 | ||
|
|
db357a1ece | ||
|
|
a539fce4ad | ||
|
|
d36715e8ac | ||
|
|
e1151561ad | ||
|
|
dbde9d7577 | ||
|
|
524534405b | ||
|
|
21ad762998 | ||
|
|
d350727726 | ||
|
|
91bc83a97a | ||
|
|
537a880856 | ||
|
|
85529b37c6 | ||
|
|
973a96be62 | ||
|
|
4e1a98c9c3 | ||
|
|
45eda52d7e | ||
|
|
74af3a7419 | ||
|
|
3b0729cf5d | ||
|
|
2b6c3018b0 | ||
|
|
452513750b | ||
|
|
a9a6ce09d6 | ||
|
|
7ea39efdbd | ||
|
|
d8974451f0 | ||
|
|
e65e639465 | ||
|
|
16eb518dcd | ||
|
|
498e13df30 | ||
|
|
ae064bf255 | ||
|
|
e7638ea75f | ||
|
|
ce1d7652f3 | ||
|
|
0675c2f355 | ||
|
|
18b583d55b | ||
|
|
9a527f5a17 | ||
|
|
684b19380e | ||
|
|
4a80fcff4e | ||
|
|
f521b60f52 | ||
|
|
28260475bb | ||
|
|
c21790d6d9 | ||
|
|
be26561620 | ||
|
|
b6a4b10daf | ||
|
|
8d911991a3 | ||
|
|
89bb93733a | ||
|
|
2c62b07d2b | ||
|
|
483ea32c75 | ||
|
|
c833d9e80f | ||
|
|
12e066f9d4 | ||
|
|
9d325a03d9 | ||
|
|
32e3b88e09 | ||
|
|
dd7cc7230e | ||
|
|
3aedb36e68 | ||
|
|
570ea8969b | ||
|
|
2ed225f78d | ||
|
|
48ae986730 | ||
|
|
d12fd4b1fb | ||
|
|
0aa2264687 | ||
|
|
2f0d03b4a2 | ||
|
|
228148b87a | ||
|
|
c372488179 | ||
|
|
8328fc2439 | ||
|
|
da141063e3 | ||
|
|
0d29555a13 | ||
|
|
c279a63100 | ||
|
|
5a8995a097 | ||
|
|
32613fa3f6 | ||
|
|
2e3aeae5bc | ||
|
|
32d19ce47c | ||
|
|
a9fcaa589a | ||
|
|
1b525e9ad6 | ||
|
|
4be15f0158 | ||
|
|
4178db0328 | ||
|
|
1dcf36a370 | ||
|
|
fa394047ba | ||
|
|
bcebe325f0 | ||
|
|
14bf80399f | ||
|
|
c7acf69cb2 | ||
|
|
684e7ebd37 | ||
|
|
8e4adcdac3 | ||
|
|
e608f94a6f | ||
|
|
fd462b164e | ||
|
|
837a02b256 | ||
|
|
d7fd200a6a | ||
|
|
36e363f525 | ||
|
|
1cadddd111 | ||
|
|
7097d7b6d2 | ||
|
|
1d43db879e | ||
|
|
97133f5963 | ||
|
|
fda18c3935 | ||
|
|
d4693cb0be | ||
|
|
021960dfb7 | ||
|
|
68a44a4905 | ||
|
|
f613ca78c6 | ||
|
|
94e7094cee | ||
|
|
1122c85e34 | ||
|
|
8d3e7f3217 | ||
|
|
9830d7500f | ||
|
|
71d0a1fab3 | ||
|
|
2c4c788477 | ||
|
|
5aa39834aa | ||
|
|
a849ab12ea | ||
|
|
0381c2199d | ||
|
|
4b741b9c7b | ||
|
|
d893fa946d | ||
|
|
e5b2f83031 | ||
|
|
d62b63492a | ||
|
|
b88234049d | ||
|
|
dc35cb8e16 | ||
|
|
0a25808f34 | ||
|
|
805547fed0 | ||
|
|
45108343c8 | ||
|
|
f38230ae6d | ||
|
|
9be546b2f3 | ||
|
|
604caf3d6c | ||
|
|
07d3febe1b | ||
|
|
e1e7cb250e | ||
|
|
edc1ea4c16 | ||
|
|
d7db0a6dbf | ||
|
|
5520e85ee4 | ||
|
|
a3370c4232 | ||
|
|
befb25a4e6 |
@@ -11,6 +11,7 @@ config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.status
|
||||
config.rpath
|
||||
configure
|
||||
config.guess
|
||||
config.sub
|
||||
|
||||
21
AUTHORS
21
AUTHORS
@@ -1,16 +1,16 @@
|
||||
$Id$
|
||||
This file lists people who have made significant contribution to the nano
|
||||
editor. Please see the ChangeLog for specific changes by author.
|
||||
This file lists people who have made significant contribution to the
|
||||
nano editor. Please see the ChangeLog for specific changes by author.
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Chris Allegretta <chrisa@asty.org>
|
||||
* Original program author, stable series maintainer.
|
||||
|
||||
David Lawrence Ramsey <pooka_regent@sluggy.net>
|
||||
* Development series maintainer. Multiple buffer support,
|
||||
operating dir (-o) option, bug fixes for display routines,
|
||||
wrapping code, spelling fixes, const mode and various other
|
||||
fixes.
|
||||
* Development series maintainer. Multiple buffer support,
|
||||
operating dir (-o) option, bug fixes for display routines,
|
||||
wrapping code, spelling fixes, const mode, parts of the UTF-8
|
||||
support, and various other fixes.
|
||||
|
||||
Jordi Mallach <jordi@sindominio.net>
|
||||
* Debian package maintainer, fellow bug squasher.
|
||||
@@ -27,10 +27,11 @@ Robert Siemborski <rjs3@andrew.cmu.edu>
|
||||
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.
|
||||
* Internal spelling code, many optimizations and bug fixes for
|
||||
findnextstr() and search-related functions, various display
|
||||
and file handling fixes.
|
||||
|
||||
David Benbennick <dbenbenn@math.cornell.edu>
|
||||
* Wrap and justify bugfixes/enhancements, new color syntax
|
||||
code, memleak fixes and other miscellaneous fixes.
|
||||
code, memleak fixes, parts of the UTF-8 support, and other
|
||||
miscellaneous fixes.
|
||||
|
||||
@@ -3,9 +3,8 @@ AUTOMAKE_OPTIONS = gnu no-dependencies
|
||||
|
||||
SUBDIRS = doc m4 po src
|
||||
|
||||
|
||||
EXTRA_DIST = ABOUT-NLS AUTHORS BUGS COPYING ChangeLog INSTALL NEWS \
|
||||
README THANKS TODO UPGRADE config.rpath install-sh missing \
|
||||
mkinstalldirs nano.spec
|
||||
EXTRA_DIST = ABOUT-NLS AUTHORS BUGS COPYING ChangeLog INSTALL NEWS \
|
||||
README THANKS TODO UPGRADE config.rpath install-sh \
|
||||
missing mkinstalldirs nano.spec
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
115
NEWS
115
NEWS
@@ -1,3 +1,118 @@
|
||||
2005.06.30 - GNU nano 1.3.8 floats at its own level. This release
|
||||
contains several new features. Among other things, you
|
||||
can now move to a specified column number as well as
|
||||
line number within a file, file backups saved in a
|
||||
backup directory will have unique names, the search and
|
||||
replace history routines should work more consistently,
|
||||
you can get a word count by pressing Meta-D at the edit
|
||||
window, and there's a new -E/--tabstospaces option to
|
||||
convert all typed tabs to spaces (--backupdir's short
|
||||
option has been changed to -C). In terms of bugfixes,
|
||||
this release contains fixes for minor problems with
|
||||
screen updates, UTF-8 display, and flow control; a fix
|
||||
for a segfault when displaying some lines ending with
|
||||
tabs; better handling of constant cursor position
|
||||
display; improved color parsing in the rcfile; and
|
||||
support for the "Regexp" toggle in tiny mode
|
||||
(-R/--regexp is gone, and --restricted's short option
|
||||
has been changed to -R), among other things. Enjoy.
|
||||
|
||||
2005.04.10 - GNU nano 1.3.7 claws its way to the top. This release
|
||||
mostly contains bugfixes for the massive amount of new
|
||||
code in 1.3.6. Among other things, nano builds with
|
||||
debug support again; going into the help browser at the
|
||||
"Read File" prompt no longer kicks you out of the prompt
|
||||
after you exit the help browser; paragraph searching no
|
||||
longer skips over certain cases of single-line
|
||||
paragraphs; the titlebar no longer cuts off some UTF-8
|
||||
strings prematurely; and the text displayed in the help
|
||||
browser is now wrapped as it was in nano 1.2.x, taking
|
||||
UTF-8 support into account. New features include an
|
||||
--enable/disable-utf8 configure option to explicitly
|
||||
turn detection of UTF-8 support on or off, and sample
|
||||
regexes for C++ as well as C. Have fun.
|
||||
|
||||
2005.03.20 - GNU nano 1.3.6 "shout it from the rooftops" is released.
|
||||
This release finally includes the long-awaited support
|
||||
for UTF-8. Other new features include the ability to
|
||||
insert UTF-8 characters using verbatim input; the
|
||||
ability to delete all text from the cursor position to
|
||||
the end of the file via ^W^X as (patched) Pico does;
|
||||
improvements to input and output so that pasted text
|
||||
displays faster, improvements to the statusbar prompt so
|
||||
that more edit window shortcuts, including verbatim
|
||||
input and previous/next word search, work in it; a new
|
||||
option to allow using the formerly always-blank second
|
||||
line of the screen as part of the edit window; and the
|
||||
ability to refresh the help browser and file browser
|
||||
windows via Ctrl-L. Notable bug fixes include a fix for
|
||||
a segfault when using full justify, and a fix for the
|
||||
long-standing bug where nano would keep running if the
|
||||
terminal it was in died unexpectedly. Enjoy.
|
||||
|
||||
2004.11.22 - GNU nano 1.3.5 hurls itself forward. New features in this
|
||||
release include the ability to replace only marked text
|
||||
when the mark is on, improvements to smooth scrolling so
|
||||
that it applies everywhere instead of just affecting the
|
||||
movement keys, improvements to how files are opened so
|
||||
that they are no longer displayed unnecessarily, support
|
||||
for multiple +LINE arguments in addition to multiple
|
||||
filenames on the command line, autodetection of the
|
||||
format to save a file in based on the format it was in
|
||||
when it was opened, the ability to toggle both ways
|
||||
between the "Read File" and "Execute Command" prompts
|
||||
and the "Search" and "Go to Line" prompts, and support
|
||||
for cross-compiling nano. As for bug fixes, the
|
||||
"tabsize" nanorc option works again, mouse clicks on the
|
||||
shortcut list trigger the right shortcuts again,
|
||||
tab-completing a filename with %'s in it no longer
|
||||
causes a segfault, the internal spell checker no longer
|
||||
skips words after the cursor position when the cursor is
|
||||
in the middle of the file, and spell checking of only
|
||||
marked text now works properly. Have fun with it.
|
||||
|
||||
2004.08.17 - GNU nano 1.3.4 marches forth after a false start. This
|
||||
release mainly features fixes for the bugs that crept
|
||||
into the last release. Among other things, nano now
|
||||
compiles again with certain options, quoted justify now
|
||||
works properly on systems without regex.h, full justify
|
||||
no longer segfaults when used on a file with no
|
||||
paragraphs, previous paragraph searching works properly
|
||||
again, tab completion is properly disabled when needed
|
||||
in restricted mode, Ctrl-C is no longer disabled after
|
||||
using the alternate spell checker, the permissions of a
|
||||
newly created file now match those of nano 1.2.x again,
|
||||
and replacing all text in a file now properly updates
|
||||
the screen in all cases. New features include sample
|
||||
regexes for patch files, improvements to the sample
|
||||
regexes for C files, and support for strings
|
||||
greater than 1023 characters and/or containing nulls in
|
||||
.nano_history. Additionally, the full justify keystroke
|
||||
has been changed to match current Pico, and whitespace
|
||||
display mode is now turned off by default. Enjoy.
|
||||
|
||||
2004.06.28 - GNU nano 1.3.3 marches forth. There are several new
|
||||
features in this release, including a restricted mode
|
||||
that provides better security than just setting an
|
||||
operating directory, the ability to justify the entire
|
||||
file at once, support for a "smart" home key that can
|
||||
leap from the beginning of text on a line to the true
|
||||
beginning of the line (or the reverse) in one stroke,
|
||||
support for specifying an alternative spell checker in
|
||||
$SPELL, the ability to specify the characters used to
|
||||
display spaces and tabs so that they can easily be told
|
||||
apart, and the ability to specify the characters marking
|
||||
the ends of sentences as used in justification. There
|
||||
are also several bug fixes; among other things,
|
||||
justification now keeps spaces at the ends of all but
|
||||
the last line of a paragraph as Pico does, saving a
|
||||
marked selection no longer changes the current filename
|
||||
to the filename the selection was saved under, resizing
|
||||
now works better and no longer corrupts the screen under
|
||||
slang, and the movement functions now avoid doing
|
||||
unnecessary redraws and hence work faster. In short,
|
||||
there are a lot of new things to play with. Enjoy.
|
||||
|
||||
2004.03.31 - GNU nano 1.3.2 is prepared for the void. New features in
|
||||
this release include the ability to spell-check only
|
||||
marked text and the ability to save all backup files in
|
||||
|
||||
9
README
9
README
@@ -35,7 +35,7 @@ How to compile and install nano
|
||||
|
||||
Web Page
|
||||
|
||||
http://www.nano-editor.org
|
||||
http://www.nano-editor.org/
|
||||
|
||||
Mailing List and Bug Reports
|
||||
|
||||
@@ -60,10 +60,9 @@ Mailing List and Bug Reports
|
||||
|
||||
Current Status
|
||||
|
||||
GNU nano has reached its second major milestone, 1.2.x.
|
||||
Development of new features will continue in the 1.3.x branch,
|
||||
while 1.2.x versions will be dedicated to bugfixing and
|
||||
polishing.
|
||||
GNU nano has reached its second stable milestone, 1.2.x.
|
||||
Development of new features continues in the 1.3.x branch, while
|
||||
1.2.x versions are dedicated to bug-fixing and polishing.
|
||||
|
||||
Chris Allegretta (chrisa@asty.org)
|
||||
|
||||
|
||||
48
README.CVS
48
README.CVS
@@ -1,38 +1,46 @@
|
||||
INSTRUCTIONS TO COMPILE AND INSTALL NANO CVS VERSIONS
|
||||
-----------------------------------------------------
|
||||
|
||||
GNU nano is available from CVS, but building this needs a bit
|
||||
more care than the official stable and unstable tarballs.
|
||||
GNU nano is available from CVS, but building this needs a bit more care
|
||||
than the official stable and unstable tarballs.
|
||||
|
||||
To successfully compile GNU nano from CVS, you'll need the
|
||||
following packages:
|
||||
To successfully compile GNU nano from CVS, you'll need the following
|
||||
packages:
|
||||
|
||||
- autoconf (version >= 2.52)
|
||||
- automake (version >= 1.6, 1.7.x recommended)
|
||||
- autoconf (version >= 2.54)
|
||||
- automake (version >= 1.7)
|
||||
- gettext (version >= 0.11.5)
|
||||
- groff
|
||||
- texinfo
|
||||
- cvs
|
||||
- glib (if your system doesn't have snprintf() and/or vsnprintf())
|
||||
- make, gcc and the normal development libraries (ncurses, etc)
|
||||
These should be available on your GNU mirror.
|
||||
- ssh (with support for the SSH version 2 protocol)
|
||||
- glib 2.x (if your system doesn't have snprintf() and/or vsnprintf())
|
||||
- make, gcc and the normal development libraries (curses or slang, etc.)
|
||||
|
||||
These should be available on your GNU mirror. Note that you'll need a
|
||||
version of curses or slang with wide character support if you want nano
|
||||
to use UTF-8.
|
||||
|
||||
To download the CVS tree, execute the following command:
|
||||
$ cvs -z3 -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/nano login
|
||||
and press enter at the password prompt.
|
||||
Then, do
|
||||
$ cvs -z3 -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/nano checkout nano
|
||||
and the nano tree will download.
|
||||
If you want to checkout the stable CVS branch, append -r nano_1_0_branch:
|
||||
$ cvs -z3 -d:pserver:anonymous@subversions.gnu.org:/cvsroot/nano checkout -r nano_1_0_branch nano
|
||||
First, you need to set up cvs to download the CVS tree using ssh. If
|
||||
you're using a Bourne shell (e.g. bash or sh), do
|
||||
$ export CVS_RSH=ssh
|
||||
If you're using a C shell (e.g. tcsh or csh), do
|
||||
$ setenv CVS_RSH ssh
|
||||
|
||||
After it's set up, use the following command to download the CVS tree:
|
||||
$ cvs -z3 -d:ext:anoncvs@savannah.gnu.org:/cvsroot/nano checkout nano
|
||||
|
||||
If you want to download the stable CVS branch, add "-r nano_1_2_branch":
|
||||
$ cvs -z3 -d:ext:anoncvs@savannah.gnu.org:/cvsroot/nano checkout -r nano_1_2_branch nano
|
||||
|
||||
Once you have the sources in the "nano" directory, cd into it, and
|
||||
execute the "autogen.sh" script in the top dir. This will setup a
|
||||
configure script and Makefile.in, and you will be ready to compile with
|
||||
execute the "autogen.sh" script in the top directory. This will set up
|
||||
a configure script and Makefile.in, and you will be ready to compile
|
||||
with
|
||||
$ ./configure [--add-options-here] && make
|
||||
|
||||
Once it's done compiling,
|
||||
$ make install
|
||||
(as root) should put the required files in their respective directories.
|
||||
|
||||
|
||||
Please submit any bugs in the CVS branch to nano-devel@gnu.org.
|
||||
|
||||
3
THANKS
3
THANKS
@@ -4,6 +4,7 @@ If we missed you here, let us know!
|
||||
Sharuzzaman Ahmat Raslan <sharuzzaman@excite.com>
|
||||
Malay translator
|
||||
Laurentiu Buzdugan <buzdugan@voyager.net> Romanian translator
|
||||
CHAO Wei-Lun <chaoweilun@pcmail.com.tw> Traditional Chinese translator
|
||||
Ricardo Cárdenes Medina <ricardo@conisys.com> Spanish translator
|
||||
Marco Colombo <magicdice@inwind.it> Italian translator
|
||||
Karl Eichwalder <keichwa@gmx.net> German translator
|
||||
@@ -36,6 +37,7 @@ Pierre Tane <tanep@bigfoot.com> French translator
|
||||
Jacobo Tarrío <jtarrio@trasno.net> Galician translator
|
||||
Kjetil Torgrim Homme <kjetilho@linpro.no> Norwegian nynorsk translator
|
||||
Miquel Vidal <miquel@sindominio.net> Catalan translator
|
||||
Phan Vinh Thinh <teppi82@gmail.com> Vietnamese translator
|
||||
Pauli Virtanen <pauli.virtanen@saunalahti.fi> Finnish translator
|
||||
Peio Ziarsolo <peio@sindominio.net> Basque translator
|
||||
|
||||
@@ -52,5 +54,4 @@ Jeremy Robichaud <robicj@yahoo.com> Beta tester
|
||||
Bill Soudan <wes0472@rit.edu> Regex code, etc
|
||||
Ken Tyler <kent@werple.net.au> Search fixes and more
|
||||
|
||||
|
||||
$Id$
|
||||
|
||||
16
TODO
16
TODO
@@ -2,19 +2,19 @@ TODO file (? means the feature may be implemented, but not definitely)
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
For version 1.4:
|
||||
- UTF-8 support.
|
||||
- UTF-8 support. [DONE]
|
||||
- Support for paragraph searches. [DONE]
|
||||
- Support for justifying the entire file at once. [DONE]
|
||||
- Support for filename searches in the file browser.
|
||||
- Undo/Redo key?
|
||||
- Undo/Redo keys?
|
||||
- Rebindable keys?
|
||||
- Keystroke to implement "Add next sequence as raw" like vi's ^V.
|
||||
[DONE for edit window, needs to be done for statusbar prompt]
|
||||
- Keystroke to implement "Add next sequence as raw" like vi's ^V. [DONE]
|
||||
- Spell check selected text only. [DONE]
|
||||
- Make "To line" (^W^T) and "Read from Command" (^R^X) re-enter their
|
||||
- Make "To Line" (^W^T) and "Read from Command" (^R^X) reenter their
|
||||
parent menu when their keystroke is entered a second time (^W^T^T and
|
||||
(^R^X^X)(requires figuring out when to keep cursor pos and when not
|
||||
to).
|
||||
- Fix resetstatuspos global which we shouldn't have.
|
||||
(^R^X^X) (requires figuring out when to keep cursor position and when
|
||||
not to). [DONE]
|
||||
- Fix resetstatuspos global which we shouldn't have. [DONE]
|
||||
- Rewrite the nano FAQ in SGML.
|
||||
|
||||
Old requests:
|
||||
|
||||
513
config.rpath
513
config.rpath
@@ -1,513 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Output a system dependent set of variables, describing how to set the
|
||||
# run time search path of shared libraries in an executable.
|
||||
#
|
||||
# Copyright 1996-2002 Free Software Foundation, Inc.
|
||||
# Taken from GNU libtool, 2001
|
||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
#
|
||||
# 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 of the License, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
#
|
||||
# The first argument passed to this file is the canonical host specification,
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
# or
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
|
||||
# should be set by the caller.
|
||||
#
|
||||
# The set of defined variables is at the end of this script.
|
||||
|
||||
# All known linkers require a `.a' archive for static linking (except M$VC,
|
||||
# which needs '.lib').
|
||||
libext=a
|
||||
shlibext=
|
||||
|
||||
host="$1"
|
||||
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
|
||||
wl=
|
||||
if test "$GCC" = yes; then
|
||||
wl='-Wl,'
|
||||
else
|
||||
case "$host_os" in
|
||||
aix3* | aix4* | aix5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
linux*)
|
||||
echo '__INTEL_COMPILER' > conftest.$ac_ext
|
||||
if $CC -E conftest.$ac_ext >/dev/null | grep __INTEL_COMPILER >/dev/null
|
||||
then
|
||||
:
|
||||
else
|
||||
# Intel icc
|
||||
wl='-Qoption,ld,'
|
||||
fi
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
solaris*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sunos4*)
|
||||
wl='-Qoption ld '
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
if test "x$host_vendor" = xsni; then
|
||||
wl='-LD'
|
||||
else
|
||||
wl='-Wl,'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_libdir_separator=
|
||||
hardcode_direct=no
|
||||
hardcode_minus_L=no
|
||||
|
||||
case "$host_os" in
|
||||
cygwin* | mingw* | pw32*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
if test "$GCC" != yes; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
openbsd*)
|
||||
with_gnu_ld=no
|
||||
;;
|
||||
esac
|
||||
|
||||
ld_shlibs=yes
|
||||
if test "$with_gnu_ld" = yes; then
|
||||
case "$host_os" in
|
||||
aix3* | aix4* | aix5*)
|
||||
# On AIX, the GNU linker is very broken
|
||||
ld_shlibs=no
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
|
||||
# that the semantics of dynamic libraries on AmigaOS, at least up
|
||||
# to version 4, is to share data among multiple programs linked
|
||||
# with the same dynamic library. Since this doesn't match the
|
||||
# behavior of shared libraries on other platforms, we can use
|
||||
# them.
|
||||
ld_shlibs=no
|
||||
;;
|
||||
beos*)
|
||||
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
solaris* | sysv5*)
|
||||
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
|
||||
ld_shlibs=no
|
||||
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
*)
|
||||
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "$ld_shlibs" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
fi
|
||||
else
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
# Note: this linker hardcodes the directories in LIBPATH if there
|
||||
# are no directories specified by -L.
|
||||
hardcode_minus_L=yes
|
||||
if test "$GCC" = yes; then
|
||||
# Neither direct hardcoding nor static linking is supported with a
|
||||
# broken collect2.
|
||||
hardcode_direct=unsupported
|
||||
fi
|
||||
;;
|
||||
aix4* | aix5*)
|
||||
if test "$host_cpu" = ia64; then
|
||||
# On IA64, the linker does run time linking by default, so we don't
|
||||
# have to do anything special.
|
||||
aix_use_runtimelinking=no
|
||||
else
|
||||
aix_use_runtimelinking=no
|
||||
# Test if we are trying to use run time linking or normal
|
||||
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
|
||||
# need to do runtime linking.
|
||||
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
|
||||
for ld_flag in $LDFLAGS; do
|
||||
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
|
||||
aix_use_runtimelinking=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
esac
|
||||
fi
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_separator=':'
|
||||
if test "$GCC" = yes; then
|
||||
case $host_os in aix4.[012]|aix4.[012].*)
|
||||
collect2name=`${CC} -print-prog-name=collect2`
|
||||
if test -f "$collect2name" && \
|
||||
strings "$collect2name" | grep resolve_lib_name >/dev/null
|
||||
then
|
||||
# We have reworked collect2
|
||||
hardcode_direct=yes
|
||||
else
|
||||
# We have old collect2
|
||||
hardcode_direct=unsupported
|
||||
hardcode_minus_L=yes
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_libdir_separator=
|
||||
fi
|
||||
esac
|
||||
fi
|
||||
if test "$aix_use_runtimelinking" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
|
||||
else
|
||||
if test "$host_cpu" = ia64; then
|
||||
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
|
||||
else
|
||||
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# see comment about different semantics on the GNU ld section
|
||||
ld_shlibs=no
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec=' '
|
||||
libext=lib
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
freebsd1*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
freebsd2.2*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
freebsd2*)
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
freebsd*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes # Not in the search PATH, but as the default
|
||||
# location of the library.
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
netbsd*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
newsos6)
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
openbsd*)
|
||||
hardcode_direct=yes
|
||||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
else
|
||||
case "$host_os" in
|
||||
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
os2*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
osf3*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
osf4* | osf5*)
|
||||
if test "$GCC" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
else
|
||||
# Both cc and cxx compiler support -rpath directly
|
||||
hardcode_libdir_flag_spec='-rpath $libdir'
|
||||
fi
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
sco3.2v5*)
|
||||
;;
|
||||
solaris*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
sysv4)
|
||||
if test "x$host_vendor" = xsno; then
|
||||
hardcode_direct=yes # is this really true???
|
||||
else
|
||||
hardcode_direct=no # Motorola manual says yes, but my tests say they lie
|
||||
fi
|
||||
;;
|
||||
sysv4.3*)
|
||||
;;
|
||||
sysv5*)
|
||||
hardcode_libdir_flag_spec=
|
||||
;;
|
||||
uts4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
dgux*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
ld_shlibs=yes
|
||||
fi
|
||||
;;
|
||||
sysv4.2uw2*)
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=no
|
||||
;;
|
||||
sysv5uw7* | unixware7*)
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Check dynamic linker characteristics
|
||||
libname_spec='lib$name'
|
||||
sys_lib_dlsearch_path_spec="/lib /usr/lib"
|
||||
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
shlibext=so
|
||||
;;
|
||||
aix4* | aix5*)
|
||||
shlibext=so
|
||||
;;
|
||||
amigaos*)
|
||||
shlibext=ixlibrary
|
||||
;;
|
||||
beos*)
|
||||
shlibext=so
|
||||
;;
|
||||
bsdi4*)
|
||||
shlibext=so
|
||||
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
|
||||
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
case $GCC,$host_os in
|
||||
yes,cygwin*)
|
||||
shlibext=dll.a
|
||||
;;
|
||||
yes,mingw*)
|
||||
shlibext=dll
|
||||
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
|
||||
;;
|
||||
yes,pw32*)
|
||||
shlibext=dll
|
||||
;;
|
||||
*)
|
||||
shlibext=dll
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
shlibext=dylib
|
||||
;;
|
||||
freebsd1*)
|
||||
;;
|
||||
freebsd*)
|
||||
shlibext=so
|
||||
;;
|
||||
gnu*)
|
||||
shlibext=so
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
shlibext=sl
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
shlibext=so
|
||||
case "$host_os" in
|
||||
irix5*)
|
||||
libsuff= shlibsuff=
|
||||
;;
|
||||
*)
|
||||
case $LD in
|
||||
*-32|*"-32 ") libsuff= shlibsuff= ;;
|
||||
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 ;;
|
||||
*-64|*"-64 ") libsuff=64 shlibsuff=64 ;;
|
||||
*) libsuff= shlibsuff= ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
|
||||
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
|
||||
;;
|
||||
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
|
||||
;;
|
||||
linux-gnu*)
|
||||
shlibext=so
|
||||
;;
|
||||
netbsd*)
|
||||
shlibext=so
|
||||
;;
|
||||
newsos6)
|
||||
shlibext=so
|
||||
;;
|
||||
openbsd*)
|
||||
shlibext=so
|
||||
;;
|
||||
os2*)
|
||||
libname_spec='$name'
|
||||
shlibext=dll
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
shlibext=so
|
||||
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
|
||||
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
|
||||
;;
|
||||
sco3.2v5*)
|
||||
shlibext=so
|
||||
;;
|
||||
solaris*)
|
||||
shlibext=so
|
||||
;;
|
||||
sunos4*)
|
||||
shlibext=so
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
shlibext=so
|
||||
case "$host_vendor" in
|
||||
motorola)
|
||||
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
uts4*)
|
||||
shlibext=so
|
||||
;;
|
||||
dgux*)
|
||||
shlibext=so
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
shlibext=so
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
|
||||
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_sys_lib_search_path_spec=`echo "X$sys_lib_search_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_sys_lib_dlsearch_path_spec=`echo "X$sys_lib_dlsearch_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
|
||||
sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
||||
|
||||
# How to pass a linker flag through the compiler.
|
||||
wl="$escaped_wl"
|
||||
|
||||
# Static library suffix (normally "a").
|
||||
libext="$libext"
|
||||
|
||||
# Shared library suffix (normally "so").
|
||||
shlibext="$shlibext"
|
||||
|
||||
# Flag to hardcode \$libdir into a binary during linking.
|
||||
# This must work even if \$libdir does not exist.
|
||||
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
|
||||
|
||||
# Whether we need a single -rpath flag with a separated argument.
|
||||
hardcode_libdir_separator="$hardcode_libdir_separator"
|
||||
|
||||
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_direct="$hardcode_direct"
|
||||
|
||||
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_minus_L="$hardcode_minus_L"
|
||||
|
||||
# Compile-time system search path for libraries
|
||||
sys_lib_search_path_spec="$escaped_sys_lib_search_path_spec"
|
||||
|
||||
# Run-time system search path for libraries
|
||||
sys_lib_dlsearch_path_spec="$escaped_sys_lib_dlsearch_path_spec"
|
||||
|
||||
EOF
|
||||
449
configure.ac
449
configure.ac
@@ -2,138 +2,153 @@
|
||||
#
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
#
|
||||
# GNU nano 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.
|
||||
# GNU nano 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.
|
||||
#
|
||||
# GNU nano 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.
|
||||
# GNU nano 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 GNU nano; if not, write to the Free Software
|
||||
# Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
|
||||
# USA.
|
||||
#
|
||||
# $Id$
|
||||
|
||||
AC_INIT([GNU nano], [1.3.2], [nano-devel@gnu.org], [nano])
|
||||
AC_INIT([GNU nano], [1.3.8], [nano-devel@gnu.org], [nano])
|
||||
AC_CONFIG_SRCDIR([src/nano.c])
|
||||
AC_CANONICAL_TARGET([])
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_CONFIG_HEADER([config.h:config.h.in])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
AC_PREREQ(2.52)
|
||||
AC_PREREQ(2.54)
|
||||
|
||||
dnl Checks for programs.
|
||||
|
||||
AC_GNU_SOURCE
|
||||
AC_PROG_CC
|
||||
AC_PROG_LN_S
|
||||
AC_ISC_POSIX
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
dnl Internationalization macros.
|
||||
|
||||
AM_GNU_GETTEXT_VERSION(0.11.5)
|
||||
AM_GNU_GETTEXT([external], [need-ngettext])
|
||||
|
||||
dnl Checks for header files.
|
||||
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(fcntl.h getopt.h libintl.h limits.h regex.h termio.h termios.h unistd.h)
|
||||
AC_CHECK_HEADERS(fcntl.h getopt.h libintl.h limits.h regex.h termios.h wchar.h wctype.h)
|
||||
AC_CHECK_HEADER(regex.h,
|
||||
AC_MSG_CHECKING([for broken regexec])
|
||||
AC_MSG_CHECKING([for broken regexec from glibc 2.2.3])
|
||||
AC_TRY_RUN([
|
||||
#include <sys/types.h>
|
||||
#include <regex.h>
|
||||
int main(void) { regex_t reg; size_t n = 1; regmatch_t r; regcomp(®, "\\<", 0); regexec(®, "", n, &r, 0); regfree(®); return 0; }],
|
||||
int main(void)
|
||||
{
|
||||
regex_t reg;
|
||||
size_t n = 1;
|
||||
regmatch_t r;
|
||||
regcomp(®, "\\<", 0);
|
||||
regexec(®, "", n, &r, 0);
|
||||
regfree(®);
|
||||
return 0;
|
||||
}],
|
||||
AC_MSG_RESULT(no),
|
||||
AC_MSG_RESULT(yes); AC_DEFINE(BROKEN_REGEXEC, 1, [Define this if your regexec() function segfaults when passed an empty string under certain conditions.])
|
||||
)
|
||||
)
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(BROKEN_REGEXEC, 1, [Define this if your regexec() function segfaults when passed an empty string under certain conditions, as the one from glibc 2.2.3 does.]),
|
||||
AC_MSG_RESULT([cross-compiling; assuming no])))
|
||||
|
||||
dnl Checks for options.
|
||||
|
||||
dnl options
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug Enable debugging (disabled by default)],
|
||||
[if test x$enableval = xyes; then
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(DEBUG, 1, [Define this to enable nano debug messages and assert warnings.])
|
||||
debug_support=yes
|
||||
fi])
|
||||
fi])
|
||||
|
||||
if test "$debug_support" != "yes"; then
|
||||
if test x$debug_support != xyes; then
|
||||
AC_DEFINE(NDEBUG, 1, [Shut up the assert warnings :-)])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(extra,
|
||||
[ --enable-extra Enable extra (optional) functions, including easter eggs],
|
||||
[ --enable-extra Enable extra features, currently only easter eggs],
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(NANO_EXTRA, 1, [Define this to enable the extra stuff.]) extra_support=yes
|
||||
AC_DEFINE(ENABLE_MULTIBUFFER, 1, [Define this to enable multiple file buffers.]) multibuffer_support=yes
|
||||
fi])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(tiny,
|
||||
[ --enable-tiny Disable features for the sake of size],
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(NANO_SMALL, 1, [Define this to make the nano executable as small as possible.]) tiny_support=yes
|
||||
AC_DEFINE(DISABLE_BROWSER, 1, [Define this to disable the built-in (crappy) file browser.])
|
||||
AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the ^G help menu.])
|
||||
AC_DEFINE(DISABLE_BROWSER, 1, [Define this to disable the built-in file browser.])
|
||||
AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the help menu.])
|
||||
AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routine.])
|
||||
AC_DEFINE(DISABLE_MOUSE, 1, [Define this to disable the mouse functions.])
|
||||
AC_DEFINE(DISABLE_OPERATINGDIR, 1, [Define this to disable setting of the operating directory (chroot of sorts).])
|
||||
AC_DEFINE(DISABLE_SPELLER, 1, [Define this to disable the use(full|less) spelling functions.])
|
||||
AC_DEFINE(DISABLE_TABCOMP, 1, [Define to disable the tab completion code Chris worked so hard on!])
|
||||
fi])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(browser,
|
||||
[ --disable-browser Disable mini file browser],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_BROWSER, 1, [Define this to disable the built-in (crappy) file browser.])
|
||||
fi])
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_BROWSER, 1, [Define this to disable the built-in file browser.])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(help,
|
||||
[ --disable-help Disable help function (^G)],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the ^G help menu.])
|
||||
fi])
|
||||
[ --disable-help Disable help function],
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the help menu.])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(justify,
|
||||
[ --disable-justify Disable justify/unjustify function],
|
||||
[if test x$enableval != xyes; then
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routine.])
|
||||
fi])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(mouse,
|
||||
[ --disable-mouse Disable mouse support (and -m flag)],
|
||||
[if test x$enableval != xyes; then
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_MOUSE, 1, [Define this to disable the mouse functions.])
|
||||
fi])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(operatingdir,
|
||||
[ --disable-operatingdir Disable setting of operating directory (chroot of sorts)],
|
||||
[if test x$enableval != xyes; then
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_OPERATINGDIR, 1, [Define this to disable setting of the operating directory (chroot of sorts).])
|
||||
fi])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(speller,
|
||||
[ --disable-speller Disable spell checker function],
|
||||
[if test x$enableval != xyes; then
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_SPELLER, 1, [Define this to disable the use(full|less) spelling functions.])
|
||||
fi])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(tabcomp,
|
||||
[ --disable-tabcomp Disable tab completion code for a smaller binary],
|
||||
[if test x$enableval != xyes; then
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_TABCOMP, 1, [Define to disable the tab completion code Chris worked so hard on!])
|
||||
fi])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(wrapping,
|
||||
[ --disable-wrapping Disable all wrapping of text (and -w flag)],
|
||||
[if test x$enableval != xyes; then
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_WRAPPING, 1, [Define this to disable any and all text wrapping.])
|
||||
fi])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(wrapping-as-root,
|
||||
[ --disable-wrapping-as-root Disable wrapping of text as root by default],
|
||||
[if test x$enableval != xyes; then
|
||||
[if test x$enableval != xyes; then
|
||||
AC_DEFINE(DISABLE_ROOTWRAP, 1, [Define this to disable wrapping as root by default.])
|
||||
fi])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(color,
|
||||
[ --enable-color Enable color and syntax highlighting],
|
||||
@@ -141,7 +156,6 @@ AC_ARG_ENABLE(color,
|
||||
AC_DEFINE(ENABLE_NANORC, 1, [Define this to use the .nanorc file.]) nanorc_support=yes
|
||||
AC_DEFINE(ENABLE_COLOR, 1, [Define this to have syntax highlighting, requires ENABLE_NANORC too!]) color_support=yes
|
||||
AC_MSG_WARN([
|
||||
|
||||
***********************************************************************
|
||||
*** WARNING: Color support is far from perfect, but functional. ***
|
||||
*** Be careful with syntax in your .nanorc or nano may malfunction. ***
|
||||
@@ -153,13 +167,13 @@ AC_ARG_ENABLE(multibuffer,
|
||||
[ --enable-multibuffer Enable multiple file buffers],
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(ENABLE_MULTIBUFFER, 1, [Define this to enable multiple file buffers.]) multibuffer_support=yes
|
||||
fi])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(nanorc,
|
||||
[ --enable-nanorc Enable use of .nanorc file],
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(ENABLE_NANORC, 1, [Define this to use the .nanorc file.]) nanorc_support=yes
|
||||
fi])
|
||||
fi])
|
||||
|
||||
AC_ARG_ENABLE(all,
|
||||
[ --enable-all Enable ALL extra nano functionality (kitchen sink option)],
|
||||
@@ -169,14 +183,24 @@ AC_ARG_ENABLE(all,
|
||||
AC_DEFINE(ENABLE_MULTIBUFFER, 1, [Define this to enable multiple file buffers.]) multibuffer_support=yes
|
||||
AC_DEFINE(NANO_EXTRA, 1, [Define this to enable the extra stuff.]) extra_support=yes
|
||||
AC_MSG_WARN([
|
||||
|
||||
***********************************************************************
|
||||
*** WARNING: Color support is far from perfect, but functional. ***
|
||||
*** Be careful with syntax in your .nanorc or nano may malfunction. ***
|
||||
***********************************************************************
|
||||
])
|
||||
])
|
||||
fi])
|
||||
|
||||
AC_MSG_CHECKING([whether to enable UTF-8 support])
|
||||
AC_ARG_ENABLE(utf8,
|
||||
[ --enable-utf8 Enable UTF-8 support],
|
||||
[if test x$enableval = xyes; then
|
||||
enable_utf8=yes
|
||||
else
|
||||
enable_utf8=no
|
||||
fi],
|
||||
[enable_utf8=auto])
|
||||
AC_MSG_RESULT($enable_utf8)
|
||||
|
||||
AC_MSG_CHECKING([whether to use slang])
|
||||
CURSES_LIB_NAME=""
|
||||
AC_ARG_WITH(slang,
|
||||
@@ -188,98 +212,205 @@ AC_ARG_WITH(slang,
|
||||
*)
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
if test "$with_slang" != "yes"; then
|
||||
if test x$with_slang != xyes; then
|
||||
# Add additional search path
|
||||
LDFLAGS="-L$with_slang/lib $LDFLAGS"
|
||||
CPPFLAGS="-I$with_slang/include $CPPFLAGS"
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(slcurses.h,
|
||||
AC_MSG_CHECKING([for SLtt_initialize in -lslang])
|
||||
_libs=$LIBS
|
||||
LIBS="$LIBS -lslang"
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <slcurses.h>
|
||||
int main(void) { SLtt_initialize(NULL); return 0; }],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
|
||||
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"
|
||||
if test x$enable_utf8 != xno; then
|
||||
AC_CHECK_HEADER(slcurses.h,
|
||||
AC_MSG_CHECKING([for SLutf8_enable in -lslang])
|
||||
_libs=$LIBS
|
||||
LIBS="$LIBS -lslang"
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <slcurses.h>
|
||||
int main(void) { SLtt_initialize(NULL); return 0; }],
|
||||
int main(void)
|
||||
{
|
||||
SLutf8_enable(TRUE);
|
||||
return 0;
|
||||
}],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
|
||||
slang_support=yes
|
||||
if test "$with_slang" != "yes"; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang $tcap"
|
||||
CURSES_LIB_WIDE=yes
|
||||
if test x$with_slang != xyes; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang"
|
||||
else
|
||||
CURSES_LIB="-lslang $tcap"
|
||||
CURSES_LIB="-lslang"
|
||||
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"
|
||||
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 SLutf8_enable in -lslang $tcap])
|
||||
LIBS="$LIBS $tcap"
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <slcurses.h>
|
||||
int main(void) { SLtt_initialize(NULL); return 0; }],
|
||||
int main(void)
|
||||
{
|
||||
SLutf8_enable(TRUE);
|
||||
return 0;
|
||||
}],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
|
||||
slang_support=yes
|
||||
if test "$with_slang" != "yes"; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang $tcap -lm"
|
||||
CURSES_LIB_WIDE=yes
|
||||
if test x$with_slang != xyes; then
|
||||
CURSES_LIB="-L${with_slang}/lib -lslang $tcap"
|
||||
else
|
||||
CURSES_LIB="-lslang $tcap -lm"
|
||||
CURSES_LIB="-lslang $tcap"
|
||||
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_RESULT(no)
|
||||
|
||||
# We might need the math library
|
||||
AC_MSG_CHECKING([for SLutf8_enable in -lslang $tcap -lm])
|
||||
LIBS="$LIBS -lm"
|
||||
AC_TRY_RUN([
|
||||
#include <slcurses.h>
|
||||
int main(void)
|
||||
{
|
||||
SLutf8_enable(TRUE);
|
||||
return 0;
|
||||
}],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
|
||||
slang_support=yes
|
||||
CURSES_LIB_WIDE=yes
|
||||
if test x$with_slang != xyes; 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
|
||||
*** install a version of slang that includes the slcurses.h file or
|
||||
*** do not call the configure script with --with-slang
|
||||
]))
|
||||
]))
|
||||
fi
|
||||
|
||||
test "${_libs+set}" = "set" && LIBS=$_libs
|
||||
if eval "test x$CURSES_LIB_NAME = x"; then
|
||||
# Reset libs if the above slang tests failed
|
||||
if test x$enable_utf8 != xno; then
|
||||
LIBS=$_libs
|
||||
fi
|
||||
|
||||
if test "$with_slang" != "yes"; then
|
||||
AC_CHECK_HEADER(slcurses.h,
|
||||
AC_MSG_CHECKING([for SLtt_initialize in -lslang])
|
||||
_libs=$LIBS
|
||||
LIBS="$LIBS -lslang"
|
||||
AC_TRY_RUN([
|
||||
#include <slcurses.h>
|
||||
int main(void)
|
||||
{
|
||||
SLtt_initialize(NULL);
|
||||
return 0;
|
||||
}],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
|
||||
slang_support=yes
|
||||
if test x$with_slang != xyes; 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 <slcurses.h>
|
||||
int main(void)
|
||||
{
|
||||
SLtt_initialize(NULL);
|
||||
return 0;
|
||||
}],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
|
||||
slang_support=yes
|
||||
if test x$with_slang != xyes; 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 <slcurses.h>
|
||||
int main(void)
|
||||
{
|
||||
SLtt_initialize(NULL);
|
||||
return 0;
|
||||
}],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
|
||||
slang_support=yes
|
||||
if test x$with_slang != xyes; 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
|
||||
*** install a version of slang that includes the slcurses.h file or
|
||||
*** do not call the configure script with --with-slang
|
||||
]))
|
||||
fi
|
||||
|
||||
if test "${_libs+set}" = "set"; then
|
||||
LIBS=$_libs
|
||||
fi
|
||||
|
||||
if test x$with_slang != xyes; then
|
||||
LDFLAGS=${_ldflags}
|
||||
fi
|
||||
;;
|
||||
esac], [AC_MSG_RESULT(no)])
|
||||
|
||||
dnl Checks for functions
|
||||
AC_CHECK_FUNCS(snprintf vsnprintf strcasecmp strncasecmp)
|
||||
if test "x$ac_cv_func_snprintf" = "xno" -o "xac_cv_func_vsnprintf" = "xno"
|
||||
then
|
||||
AM_PATH_GLIB_2_0(2.0.0,,
|
||||
[AM_PATH_GLIB(1.2.4,,
|
||||
[AC_MSG_ERROR([
|
||||
*** snprintf() and/or vsnprintf() not found. GLIB not found either.
|
||||
dnl Checks for functions.
|
||||
|
||||
AC_CHECK_FUNCS(getdelim getline isblank snprintf strcasecmp strcasestr strncasecmp strnlen vsnprintf)
|
||||
|
||||
if test x$enable_utf8 != xno; then
|
||||
AC_CHECK_FUNCS(iswalnum iswblank iswpunct iswspace mblen mbstowcs mbtowc wctomb wcwidth)
|
||||
fi
|
||||
|
||||
if test x$ac_cv_func_snprintf = xno || test x$ac_cv_func_vsnprintf = xno; then
|
||||
AM_PATH_GLIB_2_0(2.0.0,,
|
||||
AC_MSG_ERROR([
|
||||
*** snprintf() and/or vsnprintf() not found. GLIB 2.x 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/.])],
|
||||
glib)])
|
||||
*** install the GLIB library which can be found at ftp://ftp.gtk.org/.]),
|
||||
glib)
|
||||
fi
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
@@ -291,59 +422,81 @@ AC_CHECK_FUNCS(getopt_long)
|
||||
|
||||
dnl Checks for libraries.
|
||||
|
||||
if eval "test x$CURSES_LIB_NAME = x"; then
|
||||
AC_CHECK_HEADERS(ncurses.h)
|
||||
|
||||
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])
|
||||
if test x$enable_utf8 != xno; then
|
||||
AC_CHECK_LIB(ncursesw, get_wch, [CURSES_LIB="-lncursesw" CURSES_LIB_NAME=ncursesw CURSES_LIB_WIDE=yes])
|
||||
fi
|
||||
|
||||
if eval "test x$CURSES_LIB_NAME = x"; then
|
||||
AC_CHECK_LIB(ncurses, initscr, [CURSES_LIB="-lncurses" CURSES_LIB_NAME=ncurses])
|
||||
fi
|
||||
fi
|
||||
|
||||
if eval "test x$CURSES_LIB_NAME = x"
|
||||
then
|
||||
AC_CHECK_LIB(curses, tgetent, [CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses])
|
||||
if eval "test x$CURSES_LIB_NAME = x"; then
|
||||
AC_CHECK_HEADERS(curses.h)
|
||||
|
||||
if test x$enable_utf8 != xno; then
|
||||
AC_CHECK_LIB(curses, get_wch, [CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses CURSES_LIB_WIDE=yes])
|
||||
fi
|
||||
|
||||
if eval "test x$CURSES_LIB_NAME = x"; then
|
||||
AC_CHECK_LIB(curses, initscr, [CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses])
|
||||
fi
|
||||
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])
|
||||
fi
|
||||
|
||||
if eval "test x$CURSES_LIB_NAME = x"
|
||||
then
|
||||
if eval "test x$CURSES_LIB_NAME = x"; then
|
||||
AC_MSG_WARN([
|
||||
*** No termcap lib available, consider getting the official ncurses
|
||||
*** No curses lib available. Consider getting the official ncurses
|
||||
*** 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 curses library])
|
||||
fi
|
||||
|
||||
|
||||
AC_CHECK_LIB([$CURSES_LIB_NAME], use_default_colors, AC_DEFINE(HAVE_USE_DEFAULT_COLORS, 1, [Define this if your curses library has the use_default_colors command.]))
|
||||
if test x$slang_support != xyes; then
|
||||
AC_CHECK_LIB([$CURSES_LIB_NAME], wresize, AC_DEFINE(HAVE_WRESIZE, 1, [Define this if you have the wresize function in your ncurses-type library.]))
|
||||
AC_CHECK_LIB([$CURSES_LIB_NAME], resizeterm, AC_DEFINE(HAVE_RESIZETERM, 1, [Define this if you have the resizeterm function in your ncurses-type library.]))
|
||||
fi
|
||||
|
||||
dnl Parse any configure options
|
||||
dnl Parse any configure options.
|
||||
|
||||
LIBS="$LIBS $CURSES_LIB"
|
||||
|
||||
AC_SUBST(CURSES_LIB)
|
||||
|
||||
if test "x$GLIB_CFLAGS" != "x"
|
||||
then
|
||||
CFLAGS="$CFLAGS $GLIB_CFLAGS"
|
||||
if test "x$GLIB_CFLAGS" != "x"; then
|
||||
CFLAGS="$CFLAGS $GLIB_CFLAGS"
|
||||
fi
|
||||
if test "x$GLIB_LIBS" != "x"
|
||||
then
|
||||
LDFLAGS="$LDFLAGS $GLIB_LIBS"
|
||||
if test "x$GLIB_LIBS" != "x"; then
|
||||
LDFLAGS="$LDFLAGS $GLIB_LIBS"
|
||||
fi
|
||||
|
||||
if test x$enable_utf8 != xno && \
|
||||
test x$CURSES_LIB_WIDE = xyes && \
|
||||
test x$ac_cv_func_iswalnum = xyes && \
|
||||
test x$ac_cv_func_iswpunct = xyes && \
|
||||
(test x$ac_cv_func_iswblank = xyes || test x$ac_cv_func_iswspace = xyes) && \
|
||||
test x$ac_cv_func_mblen = xyes && \
|
||||
test x$ac_cv_func_mbstowcs = xyes && \
|
||||
test x$ac_cv_func_mbtowc = xyes && \
|
||||
test x$ac_cv_func_wctomb = xyes && \
|
||||
test x$ac_cv_func_wcwidth = xyes; then
|
||||
AC_DEFINE(NANO_WIDE, 1, [Define this if your system has sufficient wide character support (a wide curses library, iswalnum(), iswpunct(), iswblank() or iswspace(), mblen(), mbstowcs(), mbtowc(), wctomb(), and wcwidth()).])
|
||||
else
|
||||
if test x$enable_utf8 = xyes; then
|
||||
AC_MSG_ERROR([
|
||||
*** UTF-8 support was requested, but insufficient UTF-8 support was
|
||||
*** detected in your curses and/or C libraries. Please verify that your
|
||||
*** slang was built with UTF-8 support or your curses was built with
|
||||
*** wide character support, and that your C library was built with wide
|
||||
*** character support.])
|
||||
elif test x$enable_utf8 != xno; then
|
||||
AC_MSG_WARN([
|
||||
*** Insufficient UTF-8 support was detected in your curses and/or C
|
||||
*** libraries. If you want UTF-8 support, please verify that your slang
|
||||
*** was built with UTF-8 support or your curses was built with wide
|
||||
*** character support, and that your C library was built with wide
|
||||
*** character support.])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
|
||||
109
doc/faq.html
109
doc/faq.html
@@ -3,10 +3,9 @@
|
||||
<head>
|
||||
<title>The GNU nano editor FAQ</title>
|
||||
<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="#330000" bgcolor="#ffffff" link="#0000ef" vlink="#51188e" alink="#ff0000">
|
||||
<h1>The nano FAQ</h1>
|
||||
<h1>The GNU nano editor FAQ</h1>
|
||||
<h2>Table of Contents</h2>
|
||||
<h2><a href="#1">1. General</a></h2>
|
||||
<blockquote><p><a href="#1.1">1.1 About this FAQ</a><br>
|
||||
@@ -25,22 +24,24 @@
|
||||
<blockquote><p><a href="#3.1">3.1. How do I install the RPM or DEB package?</a><br>
|
||||
<a href="#3.2">3.2. Compiling from source: WHAT THE HECK DO I DO NOW?</a><br>
|
||||
<a href="#3.3">3.3. Why does everything go into /usr/local?</a><br>
|
||||
<a href="#3.4">3.4. I get errors about 'bindtextdomain','gettext' and/or 'gettextdomain'. What can I do about it?</a><br>
|
||||
<a href="#3.4">3.4. I get errors about 'bindtextdomain','gettext', and/or 'gettextdomain'. What can I do about it?</a><br>
|
||||
<a href="#3.5">3.5. Nano should automatically run strip on the binary when installing it!</a><br>
|
||||
<a href="#3.6">3.6. How can I make the executable smaller? This is too bloated!</a><br>
|
||||
<a href="#3.7">3.7. Tell me more about this multibuffer stuff!</a><br>
|
||||
<a href="#3.8">3.8. Tell me more about this verbatim input stuff!</a><br>
|
||||
<a href="#3.9">3.9. How do I make a .nanorc file that nano will read when I start it?</a></p></blockquote>
|
||||
<h2><a href="#4">4. Running</a></h2>
|
||||
<blockquote><p><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><br>
|
||||
<a href="#4.2">4.2. Nano crashes when I type <insert keystroke here>!</a><br>
|
||||
<a href="#4.3">4.3. Nano crashes when I resize my window. How can I fix that?</a><br>
|
||||
<a href="#4.4">4.4. [version 1.1.12 and earlier] Why does nano show ^\ in the shortcut list instead of ^J?</a><br>
|
||||
<a href="#4.5a">4.5a. [version 1.1.12 and earlier] When I type in a search string, the string I last searched for is already in front of my cursor! What happened?!</a><br>
|
||||
<a href="#4.5b">4.5b. [version 1.2.2 and later] Hey, the search string behavior has reverted, it's now like Pico, what happened to the consistency?</a><br>
|
||||
<a href="#4.6">4.6. I get the message "NumLock glitch detected. Keypad will malfunction with NumLock off." What gives?</a><br>
|
||||
<a href="#4.7">4.7. How do I make nano my default editor (in Pine, mutt, etc.)?</a><br>
|
||||
<a href="#4.8">4.8. I've compiled nano with color support, but I don't see any color when I run it!</a></p></blockquote>
|
||||
<blockquote><p><a href="#4.1">4.1. How do I open a file with a name beginning with '+' from the command line?</a><br>
|
||||
<a href="#4.2">4.2. Ack! My backspace/delete/enter/double bucky/meta key doesn't seem to work! What can I do?</a><br>
|
||||
<a href="#4.3">4.3. How do I type the F13-F16 keys shown in the help browser? My keyboard only has F1-F12!</a><br>
|
||||
<a href="#4.4">4.4. Nano crashes when I type <insert keystroke here>!</a><br>
|
||||
<a href="#4.5">4.5. Nano crashes when I resize my window. How can I fix that?</a><br>
|
||||
<a href="#4.6">4.6. [version 1.1.12 and earlier] Why does nano show ^\ in the shortcut list instead of ^J?</a><br>
|
||||
<a href="#4.7a">4.7a. [version 1.1.12 and earlier] When I type in a search string, the string I last searched for is already in front of my cursor! What happened?!</a><br>
|
||||
<a href="#4.7b">4.7b. [version 1.1.99pre1 and later] Hey, the search string behavior has reverted, it's now like Pico, what happened to the consistency?</a><br>
|
||||
<a href="#4.8">4.8. How do I make nano my default editor (in Pine, mutt, etc.)?</a><br>
|
||||
<a href="#4.9">4.9. I've compiled nano with color support, but I don't see any color when I run it!</a><br>
|
||||
<a href="#4.10">4.10. How do I select text for the clipboard in an X terminal when I'm running nano in one and nano's mouse support is turned on?</a></p></blockquote>
|
||||
<h2><a href="#5">5. Internationalization</a></h2>
|
||||
<blockquote><p><a href="#5.1">5.1. There's no translation for my language!</a><br>
|
||||
<a href="#5.2">5.2. I don't like the translation for <x> in my language. How can I fix it?</a></p></blockquote>
|
||||
@@ -52,7 +53,7 @@
|
||||
<a href="#6.5">6.5. Why doesn't UW simply change their license?</a><br>
|
||||
<a href="#6.6">6.6. What if tomorrow UW changes the license to be truly Free Software?</a></p></blockquote>
|
||||
<h2><a href="#7">7. Miscellaneous</a></h2>
|
||||
<blockquote><p><a href="#7.1">7.1. Nano related mailing lists.</a><br>
|
||||
<blockquote><p><a href="#7.1">7.1. Nano-related mailing lists.</a><br>
|
||||
<a href="#7.2">7.2. I want to send the development team a big load of cash (or just a thank you).</a><br>
|
||||
<a href="#7.3">7.3. How do I submit a patch?</a><br>
|
||||
<a href="#7.4">7.4. How do I join the development team?</a><br>
|
||||
@@ -61,7 +62,7 @@
|
||||
<hr width="100%">
|
||||
<h1><a name="1"></a>1. General</h1>
|
||||
<h2><a name="1.1"></a>1.1 About this FAQ</h2>
|
||||
<blockquote><p>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...</p></blockquote>
|
||||
<blockquote><p>This FAQ was originally written and maintained by Chris Allegretta <<a href="mailto:chrisa@asty.org">chrisa@asty.org</a>>, who also happens to be the creator of nano. It is currently maintained by David Lawrence Ramsey <<a href="mailto:pooka_regent@sluggy.net">pooka_regent@sluggy.net</a>>. Maybe someone else will volunteer to maintain this FAQ someday, who knows...</p></blockquote>
|
||||
<h2><a name="1.2"></a>1.2. How do I contribute to it?</h2>
|
||||
<blockquote><p>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.</p></blockquote>
|
||||
<h2><a name="1.3"></a>1.3. What is GNU nano?</h2>
|
||||
@@ -79,9 +80,9 @@
|
||||
<h2><a name="1.5"></a>1.5. Why the name change from TIP?</h2>
|
||||
<blockquote><p>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).</p></blockquote>
|
||||
<h2><a name="1.6"></a>1.6. What is the current version of nano?</h2>
|
||||
<blockquote><p>The current version of nano *should* be 1.3.2. Of course you should always check the nano homepage to see what the latest and greatest version is.</p></blockquote>
|
||||
<blockquote><p>The current version of nano *should* be 1.3.8. Of course you should always check the nano homepage to see what the latest and greatest version is.</p></blockquote>
|
||||
<h2><a name="1.7"></a>1.7. I want to read the man page without having to download the program!</h2>
|
||||
<blockquote><p>Jeez, demanding, aren't we? Okay, look <a href="http://www.nano-editor.org/dist/v1.2/nano.1.html">here</a>.</p></blockquote>
|
||||
<blockquote><p>Jeez, demanding, aren't we? Okay, look <a href="http://www.nano-editor.org/dist/v1.3/nano.1.html">here</a>.</p></blockquote>
|
||||
<hr width="100%">
|
||||
<h1><a name="2"></a>2. Where to get GNU nano.</h1>
|
||||
<h2><a name="2.1"></a>2.1. FTP and WWW sites that carry nano.</h2>
|
||||
@@ -134,59 +135,65 @@
|
||||
<blockquote><p>Well, that's what the <b>configure</b> script defaults to. If you wish to change this, simply do this:</p>
|
||||
<p><b>./configure --prefix=/usr</b></p>
|
||||
<p>to put nano into /usr/bin when you run <b>make install</b>.</p></blockquote>
|
||||
<h2><a name="3.4"></a>3.4. I get errors about 'bindtextdomain', 'gettext' and/or 'gettextdomain'. What can I do about it?</h2>
|
||||
<h2><a name="3.4"></a>3.4. I get errors about 'bindtextdomain', 'gettext', and/or 'gettextdomain'. What can I do about it?</h2>
|
||||
<blockquote><p>Try doing a <b>./configure --with-included-gettext</b> and see if that solves your problem. You may need to do a <b>make clean; make</b> to get it to work fully.</p></blockquote>
|
||||
<h2><a name="3.5"></a>3.5. Nano should automatically run strip on the binary when installing it!</h2>
|
||||
<blockquote><p>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.</p></blockquote>
|
||||
<h2><a name="3.6"></a>3.6. How can I make the executable smaller? This is too bloated!</h2>
|
||||
<blockquote><p>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:</p>
|
||||
<pre>
|
||||
<b>--disable-tabcomp</b> Disables tab completion code for a smaller binary
|
||||
<b>--disable-tabcomp</b> Disable 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-speller</b> Disable spell checker function
|
||||
<b>--disable-help</b> Disable help function
|
||||
<b>--disable-browser</b> Disable mini file browser
|
||||
<b>--disable-wrapping</b> Disable all wrapping of text (and -w flag)
|
||||
<b>--disable-mouse</b> Disable mouse support (and -m flag)
|
||||
<b>--disable-operatingdir</b> Disable setting of operating directory</pre>
|
||||
<p>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>
|
||||
<p>If, on the other hand, you can't live without bells and whistles, you could try:</p>
|
||||
<pre>
|
||||
<b>--enable-extra</b> Enable extra functions, including easter eggs
|
||||
<b>--enable-extra</b> Enable extra features, currently only 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
|
||||
<b>--enable-all</b> Enables all of the above features</pre></blockquote>
|
||||
<b>--enable-color</b> Enable color and syntax highlighting
|
||||
<b>--enable-multibuffer</b> Enable having multiple file buffers open
|
||||
<b>--enable-all</b> Enable all of the above features
|
||||
<b>--disable-wrapping-as-root</b>
|
||||
Turn off wrapping of text by default when the
|
||||
user is root</pre></blockquote>
|
||||
<h2><a name="3.7"></a>3.7. Tell me more about this multibuffer stuff!</h2>
|
||||
<blockquote><p>To use multiple file buffers, you must be using nano 1.1.0 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>
|
||||
<blockquote><p>To use multiple file buffers, you must be using nano 1.1.0 or newer, and you must have configured nano with <b>--enable-multibuffer</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>
|
||||
<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.</p></blockquote>
|
||||
<h2><a name="3.8"></a>3.8. Tell me more about this verbatim input stuff!</h2>
|
||||
<blockquote><p>To use verbatim input, you must be using nano 1.3.1 or newer. When you want to insert a literal character into the file you're editing, such as a control character that nano usually treats as a command, first press <b>Meta-V</b>. (If you're not at a prompt, you'll get the message "Verbatim input".) Then press the key(s) that generate the character you want.</p>
|
||||
<p>Alternatively, you can press <b>Meta-V</b> and then type a three-digit ASCII code from 000 to 255, and the character with that ASCII code will be inserted instead.</p>
|
||||
<p><b>NOTE:</b> Verbatim input doesn't work at prompts right now. This will be fixed soon.</p></blockquote>
|
||||
<blockquote><p>To use verbatim input, you must be using nano 1.3.1 or newer. When you want to insert a literal character into the file you're editing, such as a control character that nano usually treats as a command, first press <b>Meta-V</b>. (If you're not at a prompt, you'll get the message "Verbatim Input".) Then press the key(s) that generate the character you want.</p>
|
||||
<p>Alternatively, you can press <b>Meta-V</b> and then type a four-digit hexadecimal code from 0000 to ffff (case-insensitive), and the character with the corresponding value will be inserted instead.</p></blockquote>
|
||||
<h2><a name="3.9"></a>3.9. How do I make a .nanorc file that nano will read when I start it?</h2>
|
||||
<blockquote><p>It's not hard at all! But, your version of nano must have been compiled with <b>--enable-nanorc</b>, and again must be version 1.1.12 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 nowrap" or "set suspend".</p></blockquote>
|
||||
<hr width="100%">
|
||||
<h1><a name="4"></a>4. Running</h1>
|
||||
<h2><a name="4.1"></a>4.1. Ack! My backspace/delete/enter/double bucky/meta key doesn't seem to work! What can I do?</h2>
|
||||
<h2><a name="4.1"></a>4.1. How do I open a file with a name beginning with '+' from the command line?</h2>
|
||||
<blockquote><p>If a command line option that begins with '+' is followed by another option, the former is always treated as a starting line number and the latter is always treated as a filename. If a command line option that begins with '+' isn't followed by another option, it's always treated as a filename. Examples:</p>
|
||||
<p>To open '+filename.txt' starting on line 1: <b>nano +filename.txt</b><br>
|
||||
To open '+filename.txt' starting on line 10: <b>nano +10 +filename.txt</b><br>
|
||||
To open '+filename.txt' starting on line 1 and 'filename.txt' starting on line 10 (if nano has been compiled with multibuffer support): <b>nano +1 +filename.txt +20 filename.txt</b></p></blockquote>
|
||||
<h2><a name="4.2"></a>4.2. Ack! My backspace/delete/enter/double bucky/meta key doesn't seem to work! What can I do?</h2>
|
||||
<blockquote><p>Try setting your $TERM variable to 'vt100'. Nano doesn't yet support every term entry under the sun.</p>
|
||||
<p>Bourne shell users (like bash): <b>export TERM=vt100</b><br>
|
||||
<p>Bourne shell users (bash and sh): <b>export TERM=vt100</b><br>
|
||||
C Shell users (tcsh and csh): <b>setenv TERM vt100</b></p></blockquote>
|
||||
<h2><a name="4.2"></a>4.2. Nano crashes when I type <insert keystroke here>!</h2>
|
||||
<h2><a name="4.3"></a>4.3. How do I type the F13-F16 keys shown in the help browser? My keyboard only has F1-F12!</h2>
|
||||
<blockquote><p>It depends on the terminal type you're using. On some terminals, such as the FreeBSD console, xterm, konsole, and gnome-terminal, Shift-F1 to Shift-F4 will generate F13 to F16. On other terminals, such as the Linux console, rxvt, or Eterm, Shift-F3 to Shift-F6 will generate F13 to F16.</p></blockquote>
|
||||
<h2><a name="4.4"></a>4.4. Nano crashes when I type <insert keystroke here>!</h2>
|
||||
<blockquote><p>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@gnu.org">nano-devel</a> list or to <a href="mailto:nano@nano-editor.org">nano@nano-editor.org</a>.</p></blockquote>
|
||||
<h2><a name="4.3"></a>4.3. Nano crashes when I resize my window. How can I fix that?</h2>
|
||||
<h2><a name="4.5"></a>4.5. Nano crashes when I resize my window. How can I fix that?</h2>
|
||||
<blockquote><p>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).</p></blockquote>
|
||||
<h2><a name="4.4"></a>4.4. [version 1.1.12 and earlier] Why does nano show ^\ in the shortcut list instead of ^J?</h2>
|
||||
<h2><a name="4.6"></a>4.6. [version 1.1.12 and earlier] Why does nano show ^\ in the shortcut list instead of ^J?</h2>
|
||||
<blockquote><p>The help (^G) and justify (^J) function were among the last to be written. To show the improvements that nano had over Pico (go to 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.</p></blockquote>
|
||||
<a name="4.5"></a>
|
||||
<h2><a name="4.5a"></a>4.5a. [version 1.1.12 and earlier] When I type in a search string, the string I last searched for is already in front of my cursor! What happened?!</h2>
|
||||
<h2><a name="4.7a"></a>4.7a. [version 1.1.12 and earlier] When I type in a search string, the string I last searched for is already in front of my cursor! What happened?!</h2>
|
||||
<blockquote><p>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).</p></blockquote>
|
||||
<h2><a name="4.5b"></a>4.5b. [version 1.2.2 and later] Hey, the search string behavior has reverted, it's now like Pico, what happened to the consistency?</h2>
|
||||
<h2><a name="4.7b"></a>4.7b. [version 1.1.99pre1 and later] Hey, the search string behavior has reverted, it's now like Pico, what happened to the consistency?</h2>
|
||||
<blockquote><p>It was decided that consistency was nice, but people are used to Pico's inconsistent behavior. Also, in version 1.1.99pre1, search and replace history was introduced. If you wish to edit your previous search/replace entry (or any previous entry), you can do so by hitting the up arrow to cycle through your history. This method allows the best of both worlds: You don't need to erase the previous string if you want to enter a new one, but you can with one keystroke recall previous entries for editing. Therefore there is now no "Pico mode", nano is and has always been a Pico <b>clone</b>, and clones by default should be compatible.</p></blockquote>
|
||||
<h2><a name="4.6"></a>4.6. I get the message "NumLock glitch detected. Keypad will malfunction with NumLock off." What gives?</h2>
|
||||
<blockquote><p>Nano (and actually almost all console editors) has issues when cycling the NumLock key in certain X terminals (rxvt, aterm, wterm, etc...). When you switch NumLock from 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.</p>
|
||||
<p>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>.</p></blockquote>
|
||||
<h2><a name="4.7"></a>4.7. How do I make nano my default editor (in Pine, mutt, etc.)?</h2>
|
||||
<h2><a name="4.8"></a>4.8. How do I make nano my default editor (in Pine, mutt, etc.)?</h2>
|
||||
<blockquote><p>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>
|
||||
<p><b>export EDITOR=/usr/local/bin/nano</b></p>
|
||||
<p>or if you use tcsh put this in your <b>.cshrc</b> file:</p>
|
||||
@@ -199,8 +206,10 @@
|
||||
<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>
|
||||
<p><b>my_hdr X-Composer: nano x.y.z</b></p>
|
||||
<p>Again, replace x.y.z with the version of nano you use.</p></blockquote>
|
||||
<h2><a name="4.8"></a>4.8. I've compiled nano with color support, but I don't see any color when I run it!</h2>
|
||||
<h2><a name="4.9"></a>4.9. I've compiled nano with color support, but I don't see any color when I run it!</h2>
|
||||
<blockquote><p>If you want nano to actually use color, you have to specify the color configurations you want it to use in your .nanorc. Some example configurations are in the <b>nanorc.sample</b> that comes with the nano source or your nano package. See Section <a href="#3.9">3.9</a>.</p></blockquote>
|
||||
<h2><a name="4.10"></a>4.10. How do I select text for the clipboard in an X terminal when I'm running nano in one and nano's mouse support is turned on?</h2>
|
||||
<blockquote><p>Try holding down the Shift key and selecting the text as you normally would.</p></blockquote>
|
||||
<hr width="100%">
|
||||
<h1><a name="5"></a>5. Internationalization</h1>
|
||||
<h2><a name="5.1"></a>5.1. There's no translation for my language!</h2>
|
||||
@@ -225,13 +234,13 @@
|
||||
<blockquote><p>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.</p></blockquote>
|
||||
<hr width="100%">
|
||||
<h1><a name="7"></a>7. Miscellaneous</h1>
|
||||
<h2><a name="7.1"></a>7.1. Nano related mailing lists.</h2>
|
||||
<h2><a name="7.1"></a>7.1. Nano-related mailing lists.</h2>
|
||||
<blockquote><p>There are three mailing lists for nano hosted at <a href="http://savannah.gnu.org/">Savannah</a>, info-nano, help-nano and nano-devel. Info-nano is a very low traffic list where new versions of nano are announced (surprise!) Help-nano is for getting help with the editor without needing to hear all of the development issues surrounding it. 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:</p>
|
||||
<p>info-nano - <a href="http://mail.gnu.org/mailman/listinfo/info-nano/">http://mail.gnu.org/mailman/listinfo/info-nano/</a><br>
|
||||
help-nano - <a href="http://mail.gnu.org/mailman/listinfo/help-nano/">http://mail.gnu.org/mailman/listinfo/help-nano/</a><br>
|
||||
nano-devel - <a href="http://mail.gnu.org/mailman/listinfo/nano-devel/">http://mail.gnu.org/mailman/listinfo/nano-devel/</a></p></blockquote>
|
||||
<h2><a name="7.2"></a>7.2. I want to send the development team a big load of cash (or just a thank you).</h2>
|
||||
<blockquote><p>That's fine. Send it <a href="mailto:nano-devel@gnu.org">our way</a>! Better yet, fix a <a href="http://www.nano-editor.org/dist/v1.2/BUGS">bug</a> in the program or implement a <a href="http://www.nano-editor.org/dist/v1.2/TODO">cool feature</a> and send us that instead (though cash is fine too).</p></blockquote>
|
||||
<blockquote><p>That's fine. Send it <a href="mailto:nano-devel@gnu.org">our way</a>! Better yet, fix a <a href="http://www.nano-editor.org/dist/v1.3/BUGS">bug</a> in the program or implement a <a href="http://www.nano-editor.org/dist/v1.3/TODO">cool feature</a> and send us that instead (though cash is fine too).</p></blockquote>
|
||||
<h2><a name="7.3"></a>7.3. How do I submit a patch?</h2>
|
||||
<blockquote><p>See Section <a href="#7.2">7.2</a>.</p></blockquote>
|
||||
<h2><a name="7.4"></a>7.4. How do I join the development team?</h2>
|
||||
@@ -241,6 +250,14 @@
|
||||
<h2><a name="8"></a>8. ChangeLog</h2>
|
||||
<blockquote>
|
||||
<p>
|
||||
2005/06/15 - Update description of --enable-extra, and add missing line breaks. (DLR)<br>
|
||||
2005/06/13 - Minor capitalization and wording fixes. (DLR)<br>
|
||||
2005/06/08 - Updated section 1.1 to mention the current maintainer. (DLR)<br>
|
||||
2005/03/09 - Added question about opening files with names beginning with '+'s, and added a few more miscellaneous cosmetic fixes. (DLR)<br>
|
||||
2005/01/03 - Removed now-inaccurate note about verbatim input's not working at prompts, and update its description to mention that it handles hexadecimal values now. (DLR)<br>
|
||||
2004/11/21 - Listed sh as an example of a Bourne shell. (DLR)<br>
|
||||
2004/11/05 - Fixed inaccuracy: Pico compatibility mode was made the default in nano 1.1.99pre1, not 1.2.2. Also added question about how to type F13-F16 on terminals lacking keys past F12 (suggested by Chris), question about how to select text for the clipboard in X terminals with nano's mouse support turned on (answer found by Joseph Birthisel), and misc. fixes and link updates. (DLR)<br>
|
||||
2004/04/07 - Removed NumLock glitch question, as it's no longer needed. (DLR)<br>
|
||||
2004/01/30 - Fixed inaccuracy: multibuffer mode was first in nano 1.1.0, not 1.1.12. (DLR)<br>
|
||||
2003/12/31 - Added question about the new verbatim input function, and a few minor fixes. Removed reference to "set pico" (DLR).<br>
|
||||
2003/07/02 - Added question about nano's not showing color when it's compiled with color support (DLR; suggested by Jordi).<br>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
man_MANS = nano.1 nanorc.5
|
||||
|
||||
mandir = @mandir@/fr
|
||||
|
||||
BUILT_SOURCES = nano.1.html nanorc.5.html
|
||||
|
||||
nano.1.html: nano.1
|
||||
|
||||
@@ -2,19 +2,22 @@
|
||||
.\" nano.1 is copyright (C) 1999, 2000, 2001, 2002, 2003 by
|
||||
.\" Chris Allegretta <chrisa@asty.org>
|
||||
.\"
|
||||
.\" (c) 2003 Jean-Philippe Guérard <jean-philippe.guerard@corbeaunoir.org>
|
||||
.\" (c) 2003-2004 Jean-Philippe Guérard <jean-philippe.guerard@corbeaunoir.org>
|
||||
.\" pour l'adaptation française
|
||||
.\"
|
||||
.\" This is free documentation, see the latest version of the GNU General
|
||||
.\" Public License for copying conditions. There is NO warranty.
|
||||
.\" Public License for copying conditions. There is NO warranty.
|
||||
.\"
|
||||
.\" Ce document est libre. Reportez-vous à la dernière version de la
|
||||
.\" licence publique générale GNU (GNU GPL) pour connaître ses
|
||||
.\" licence publique générale GNU (GNU GPL) pour connaître ses
|
||||
.\" conditions d'utilisation. AUCUNE garantie n'est offerte.
|
||||
.\"
|
||||
.TH NANO 1 "19 juin 2003 (v.f. du 25 août 2003)"
|
||||
.\" $Id$
|
||||
.TH NANO 1 "version 1.3.4" "17 août 2004"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\" Merci de modifier ces dates à chaque mise à jour de cette page.
|
||||
.\"
|
||||
|
||||
|
||||
.SH NOM
|
||||
nano \- NAno un NOuvel éditeur, un clone libre et amélioré de Pico
|
||||
@@ -25,23 +28,31 @@ nano \- NAno un NOuvel
|
||||
.br
|
||||
|
||||
.SH DESCRIPTION
|
||||
Cette page de manuel décrit brièvement la commande \fBnano\fP.
|
||||
Cette page de manuel décrit brièvement la commande \fBnano\fR.
|
||||
.PP
|
||||
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
|
||||
.\" \fI<whatever>\fP escape sequences to invoke bold face and italics,
|
||||
.\" \fI<whatever>\fP escape sequences to invoke bold face and italics,
|
||||
.\" respectively.
|
||||
\fBnano\fP est un petit éditeur sympathique et libre, qui vise à remplacer
|
||||
Pico, l'éditeur par défaut du paquet non-libre Pine. \fBnano\fP ne se
|
||||
contentant pas de copier l'interface et l'ergonomie de Pico, il offre
|
||||
également certaines fonctionnalités manquantes (ou désactivées par
|
||||
défaut) de Pico. Ces fonctionnalités sont, par exemple, les fonctions de
|
||||
recherche et de remplacement, et la possibilité de sauter directement à
|
||||
un numéro de ligne.
|
||||
\fBnano\fR est un éditeur petit, sympathique et libre, qui vise à remplacer
|
||||
Pico, l'éditeur par défaut du paquet non libre Pine. \fBnano\fR ne se
|
||||
contentant pas de copier l'interface et l'ergonomie de Pico, il offre
|
||||
également certaines fonctions manquantes (ou désactivées par défaut)
|
||||
dans Pico. Ces fonctionnalités sont, par exemple, les fonctions de
|
||||
recherche et de remplacement, et la possibilité de sauter directement à un
|
||||
numéro de ligne.
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \+\fILIGNE\fP
|
||||
Démarre avec le curseur positionné à la ligne numéro \fILIGNE\fP.
|
||||
.B \+\fILIGNE\fR
|
||||
Démarre avec le curseur positionné à la ligne numéro \fILIGNE\fR.
|
||||
.TP
|
||||
.B \-A (\-\-smarthome)
|
||||
Active le fonctionnement évolué de la touche «\ Début\ ». Lorsque cette
|
||||
touche est pressée à n'importe quel endroit excepté au tout début du
|
||||
texte d'une ligne (i.\ e. au premier caractère non blanc), le curseur se
|
||||
positionnera à ce début de ligne (qu'il soit en avant ou en arrière). Si
|
||||
le curseur est déjà au tout début de la ligne, il se placera au vrai
|
||||
début de la ligne.
|
||||
.TP
|
||||
.B \-B (\-\-backup)
|
||||
Lors de l'écriture d'un fichier, crée une copie de sécurité de la
|
||||
@@ -50,55 +61,46 @@ version pr
|
||||
.B \-D (\-\-dos)
|
||||
Écrit le fichier au format DOS.
|
||||
.TP
|
||||
.B \-E \fIrépertoire\fP (\-\-backupdir=\fIrépertoire\fP)
|
||||
Définit le répertoire utilisé par \fBnano\fP pour enregistrer les copies
|
||||
de sécurité si celles-ci sont activées.
|
||||
.TP
|
||||
.B \-F (\-\-multibuffer)
|
||||
Active le mode multifichiers, autorisant l'édition simultanée de
|
||||
plusieurs fichiers, si ce mode est disponible.
|
||||
Active le mode multifichier, autorisant l'édition simultanée de plusieurs
|
||||
fichiers, si ce mode est disponible.
|
||||
.TP
|
||||
.B \-H (\-\-historylog)
|
||||
Enregistre les chaînes ayant fait l'objet d'une recherche ou d'un
|
||||
remplacement dans le fichier
|
||||
.I ~/.nano_history
|
||||
afin de permettre leur réutilisation. Ceci n'est possible que si
|
||||
.B nano
|
||||
est capable d'utiliser les fichiers
|
||||
nanorc.
|
||||
remplacement dans le fichier \fI~/.nano_history\fR afin de permettre leur
|
||||
réutilisation. Ceci n'est possible que si \fBnano\fR est configuré pour
|
||||
utiliser les fichiers nanorc.
|
||||
.TP
|
||||
.B \-I (\-\-ignorercfiles)
|
||||
N'utilise pas les fichiers
|
||||
.I $SYSCONFDIR/nanorc
|
||||
et
|
||||
.IR ~/.nanorc ,
|
||||
même si
|
||||
.B nano
|
||||
est capable de les utiliser.
|
||||
.TP
|
||||
.B \-K (\-\-keypad)
|
||||
Essaie au maximum de ne pas utiliser les appels keypad() de ncurses.
|
||||
Utilisez ce paramètre si vous vous apercevez que les flèches du pavé
|
||||
numérique ne fonctionnent pas sous nano.
|
||||
N'utilise pas les fichiers \fISYSCONFDIR/nanorc\fR et \fI~/.nanorc\fR, même si
|
||||
\fBnano\fR est capable de les utiliser.
|
||||
.TP
|
||||
.B \-M (\-\-mac)
|
||||
Écrit le fichier au format Mac.
|
||||
.TP
|
||||
.B \-N (\-\-noconvert)
|
||||
Désactive la conversion automatique des fichiers depuis les
|
||||
formats Mac et DOS.
|
||||
Désactive la conversion automatique des fichiers depuis les formats Mac et
|
||||
DOS.
|
||||
.TP
|
||||
.B \-Q \fIchaîne\fP (\-\-quotestr=\fIchaîne\fP)
|
||||
Définit le préfixe par défaut des citations. Nano utilise ce préfixe
|
||||
pour réaliser une justification correcte des citations.
|
||||
Si nano est capable d'utiliser des expressions rationnelles, le préfixe
|
||||
par défaut sera "^([\ \\t]*[|>:}#])+", sinon, ce sera ">\ ".
|
||||
Définit le préfixe par défaut des citations. Nano utilise ce préfixe
|
||||
pour réaliser une justification correcte des citations. Si nano est
|
||||
capable d'utiliser des expressions rationnelles, le préfixe par défaut
|
||||
sera "^([\ \\t]*[|>:}#])+", sinon, ce sera ">\ ".
|
||||
.TP
|
||||
.B \-R (\-\-regexp)
|
||||
Active l'utilisation d'expressions rationnelles lors des recherches,
|
||||
ainsi que la possibilité d'utiliser \\\fIn\fP dans les chaînes de
|
||||
remplacement pour faire référence à la \fIn\fP-ième sous-expression du
|
||||
motif de recherche, si cette fonction est disponible.
|
||||
Active l'utilisation d'expressions rationnelles lors des recherches, ainsi
|
||||
que la possibilité d'utiliser \\n dans les chaînes de remplacement pour
|
||||
faire référence à la n-ième sous-expression du motif de recherche, si
|
||||
cette fonction est disponible.
|
||||
.TP
|
||||
.B \-S (\-\-smooth)
|
||||
Active le défilement progressif. Le texte défilera ligne-par-ligne au
|
||||
lieu de défiler morceau-par-morceau.
|
||||
Active le défilement progressif. Le texte défilera ligne-par-ligne au lieu
|
||||
de défiler morceau-par-morceau.
|
||||
.TP
|
||||
.B \-T \fInombre\fP (\-\-tabsize=\fInombre\fP)
|
||||
Définit la taille (largeur) des tabulations.
|
||||
@@ -108,55 +110,68 @@ Affiche le num
|
||||
.TP
|
||||
.B \-Y \fIchaîne\fP (\-\-syntax=\fIchaîne\fP)
|
||||
Indique quel mode de colorisation syntaxique adopter, parmi les modes
|
||||
définis dans le fichier
|
||||
.IR .nanorc ,
|
||||
si cette fonctionnalité est disponible.
|
||||
définis dans le fichier \fI.nanorc\fR, si cette fonctionnalité est
|
||||
disponible.
|
||||
.TP
|
||||
.B \-Z (\-\-restricted)
|
||||
Mode restreint\ : aucune lecture ou écriture de fichiers non indiqués
|
||||
sur la ligne de commande, pas de lecture des fichiers nanorc,
|
||||
interdiction de suspendre et interdiction de sauvegarder (ou d'ajouter
|
||||
en tête ou en fin) un fichier ayant déjà un nom sous un nom différent.
|
||||
Cette option peut aussi être activée en appelant \fBnano\fP sous un nom
|
||||
commençant par «\ r\ » (par exemple «\ rnano\ »).
|
||||
.TP
|
||||
.B \-c (\-\-const)
|
||||
Affiche en permanence la position du curseur.
|
||||
.TP
|
||||
.B \-d (\-\-rebinddelete)
|
||||
Interprète différemment la touche «\ Supprimer\ », afin que les touches
|
||||
«\ Effacement arrière\ » et «\ Supprimer\ » fonctionnent correctement.
|
||||
Vous devriez n'avoir besoin de cette option que si la touche
|
||||
«\ Effacement arrière\ » produit l'effet de la touche «\ Supprimer\ »
|
||||
sur votre système.
|
||||
.TP
|
||||
.B \-h (\-\-help)
|
||||
Affiche de la liste des options disponibles en ligne de commande.
|
||||
Affiche un résumé des options disponibles en ligne de commande.
|
||||
.TP
|
||||
.B \-i (\-\-autoindent)
|
||||
Indentation automatique. Commence chaque nouvelle ligne au même niveau
|
||||
que la ligne précédente. Utile pour l'édition de code source.
|
||||
Indentation automatique. Commence chaque nouvelle ligne au même niveau que
|
||||
la ligne précédente. Utile pour l'édition de code source.
|
||||
.TP
|
||||
.B \-k (\-\-cut)
|
||||
^K coupe le texte du curseur à la fin de la ligne, au lieu de couper la
|
||||
^K coupe le texte du curseur à la fin de la ligne, au lieu de couper la
|
||||
ligne entière.
|
||||
.TP
|
||||
.B \-l (\-\-nofollow)
|
||||
Si le fichier édité est un lien symbolique, remplace le lien par le
|
||||
nouveau fichier, sans le suivre. Ce mode ne serait-il pas utile pour
|
||||
éditer les fichiers de
|
||||
.IR /tmp \ ?
|
||||
Si le fichier édité est un lien symbolique, remplace le lien par le
|
||||
nouveau fichier, sans le suivre. Ce mode ne serait-il pas utile pour éditer
|
||||
les fichiers de \fI/tmp\fR ?
|
||||
.TP
|
||||
.B \-m (\-\-mouse)
|
||||
Active l'utilisation de la souris (si elle est disponible sur votre
|
||||
Active l'utilisation de la souris (si elle est disponible sur votre
|
||||
système).
|
||||
.TP
|
||||
.B \-o \fIrépertoire\fP (\-\-operatingdir=\fIrépertoire\fP)
|
||||
Définit le répertoire de travail. Demande à nano de mettre en place
|
||||
quelque-chose de similaire à une cage chroot.
|
||||
Définit le répertoire de travail. Demande à nano de mettre en place
|
||||
quelque chose de similaire à un environnement d'exécution restreint
|
||||
(\fIchroot\fR).
|
||||
.TP
|
||||
.B \-p (\-\-preserve)
|
||||
Préserve les séquences XON et XOFF (^Q et ^S), afin qu'elle soient
|
||||
reçues par le terminal.
|
||||
Préserve les séquences XON et XOFF (^Q et ^S), afin qu'elle soient reçues
|
||||
par le terminal.
|
||||
.TP
|
||||
.B \-r \fIcolonne\fP (\-\-fill=\fIcolonne\fP)
|
||||
Passe automatiquement à la ligne à la colonne \fIcolonne\fP. Par défaut,
|
||||
le passage à la ligne se fait à la taille de l'écran moins huit. Si la
|
||||
valeur indiquée est négative, le point de passage à la ligne sera
|
||||
calculé relativement au bord droit de l'écran. Cela permet de faire
|
||||
varier le point de passage à la ligne lorsque l'on change la taille de
|
||||
l'écran.
|
||||
Passe automatiquement à la ligne à la colonne \fIcolonne\fR. Par défaut, le
|
||||
passage à la ligne se fait à la taille de l'écran moins huit. Si la
|
||||
valeur indiquée est négative, le point de passage à la ligne sera
|
||||
calculé relativement au bord droit de l'écran. Cela permet de faire varier
|
||||
le point de passage à la ligne lorsque l'on change la taille de l'écran.
|
||||
.TP
|
||||
.B \-s \fIprogramme\fP (\-\-speller=\fIprogramme\fP)
|
||||
Choix d'un correcteur orthographique de remplacement.
|
||||
.TP
|
||||
.B \-t (\-\-tempfile)
|
||||
S'il a été modifié, le fichier sera sauvegardé automatiquement sans
|
||||
S'il a été modifié, le fichier sera sauvegardé automatiquement sans
|
||||
demande de confirmation. Identique à l'option -t de Pico.
|
||||
.TP
|
||||
.B \-v (\-\-view)
|
||||
@@ -174,56 +189,58 @@ Autorise
|
||||
.B \-a, \-b, \-e, \-f, \-g, \-j
|
||||
Ignoré, pour être compatible avec Pico.
|
||||
|
||||
.SH FICHIERS D'INITIALISATION
|
||||
\fBnano\fP lit les fichiers d'initialisation dans l'ordre suivant\ :
|
||||
\fI$SYSCONFDIR/nanorc\fP, puis \fI~/.nanorc\fP. Reportez-vous à la page
|
||||
de manuel de \fBnanorc\fP(5) et au fichier-exemple \fInanorc.sample\fP
|
||||
qui devrait être livré avec \fBnano\fP.
|
||||
.SH "FICHIERS D'INITIALISATION"
|
||||
\fBnano\fR lit les fichiers d'initialisation dans l'ordre suivant\ :
|
||||
\fISYSCONFDIR/nanorc\fR, puis \fI~/.nanorc\fR. Référez-vous à la page de manuel
|
||||
de \fBnanorc\fR(5) et au fichier-exemple \fInanorc.sample\fR qui devrait être
|
||||
livré avec \fBnano\fR.
|
||||
|
||||
.SH NOTES
|
||||
Dans certains cas, \fBnano\fP essaiera de sauvegarder le fichier en
|
||||
cours d'édition dans un fichier de secours. Cela arrivera
|
||||
principalement si \fBnano\fP reçoit un signal SIGHUP ou SIGTERM, ou
|
||||
bien se trouve à court de mémoire. Le nom de ce fichier de secours sera
|
||||
\fInano.save\fP si le fichier en cours n'avait pas encore de nom, ou
|
||||
sera composé du nom du fichier en cours suivi du suffixe «\ .save\ ». Si
|
||||
un fichier de ce nom existe déjà dans le répertoire, un «\ .save\ » et
|
||||
un nombre seront ajoutée à la fin du nom du fichier en cours afin de le
|
||||
rendre unique (par exemple, «\ .save.1\ »). En mode multifichiers,
|
||||
\fBnano\fP réalisera une sauvegarde de tous les fichiers en cours dans
|
||||
leurs fichiers de secours respectifs.
|
||||
Si aucun correcteur orthographique de remplacement n'est indiqué dans la
|
||||
ligne de commande ou dans le fichier nanorc, \fBnano\fR prendra
|
||||
la commande indiquée par la variable d'environnement \fBSPELL\fR si
|
||||
elle est définie.
|
||||
|
||||
Dans certains cas, \fBnano\fR essaiera de sauvegarder le fichier en cours
|
||||
d'édition dans un fichier de secours. Cela arrivera principalement si
|
||||
\fBnano\fR reçoit un signal SIGHUP ou SIGTERM, ou bien se trouve à court de
|
||||
mémoire. Le nom de ce fichier de secours sera \fInano.save\fR si le fichier en
|
||||
cours n'avait pas encore de nom, ou sera composé du nom du fichier en cours
|
||||
suivi du suffixe «\ .save\ ». Si un fichier de ce nom existe déjà dans
|
||||
le répertoire, un «\ .save\ » et un nombre seront ajoutés à la fin du
|
||||
nom du fichier en cours afin de le rendre unique (par exemple,
|
||||
«\ .save.1\ »). En mode multifichier, \fBnano\fR réalisera une
|
||||
sauvegarde de tous les fichiers en cours dans leurs fichiers de secours
|
||||
respectifs.
|
||||
|
||||
.SH BOGUES
|
||||
Merci de nous faire parvenir vos commentaires et de nous signaler les
|
||||
bogues, en écrivant, en anglais, à
|
||||
.BR nano@nano-editor.org .
|
||||
Merci de nous faire parvenir vos commentaires et de nous signaler les
|
||||
bogues, en écrivant, en anglais, à \fBnano@nano-editor.org\fR.
|
||||
|
||||
N'hésitez pas à faire parvenir vos suggestions et commentaires relatifs
|
||||
à la version française de \fBnano\fP à
|
||||
.BR jean-philippe.guerard@corbeaunoir.org .
|
||||
La liste de discussion anglophone \fBnano\fR est disponible via
|
||||
\fBnano-devel@gnu.org\fR.
|
||||
|
||||
La liste de discussion anglophone \fBnano\fP est disponible via
|
||||
.BR nano-devel@gnu.org .
|
||||
Pour vous abonner, envoyez un courrier électronique à
|
||||
.BR nano-devel-request@gnu.org ,
|
||||
ayant pour objet «\ subscribe\ ».
|
||||
\fBnano-devel-request@gnu.org\fR, ayant pour objet «\ subscribe\ ».
|
||||
|
||||
.SH SITE INTERNET
|
||||
.SH "SITE INTERNET"
|
||||
http://www.nano-editor.org/
|
||||
|
||||
.SH VOIR AUSSI
|
||||
.SH "VOIR AUSSI"
|
||||
.PD 0
|
||||
.TP
|
||||
\fBnanorc\fP(5)
|
||||
\fBnanorc\fR(5)
|
||||
.PP
|
||||
\fI/usr/share/doc/nano/\fP (ou son équivalent sur votre système)
|
||||
\fI/usr/share/doc/nano/\fR (ou son équivalent sur votre système)
|
||||
|
||||
.SH AUTEUR
|
||||
Chris Allegretta <chrisa@asty.org> et d'autres (voir les fichiers
|
||||
\fIAUTHORS\fP et \fITHANKS\fP pour plus d'information). Cette page de
|
||||
manuel a été initialement rédigée par Jordi Mallach
|
||||
<jordi@sindominio.net> pour le système GNU Debian (mais elle peut être
|
||||
utilisée par d'autres).
|
||||
Chris Allegretta <chrisa@asty.org> et d'autres (voir les fichiers
|
||||
\fIAUTHORS\fR et \fITHANKS\fR pour plus d'information). Cette page de manuel a
|
||||
été initialement rédigée par Jordi Mallach
|
||||
<jordi@sindominio.net> pour le système GNU Debian (mais elle peut
|
||||
être utilisée par d'autres).
|
||||
|
||||
.SH TRADUCTION
|
||||
Jean-Philippe Guérard <jean-philippe.guerard@corbeaunoir.org>, 2003.
|
||||
|
||||
Adaptation française du 4\ septembre\ 2004 par
|
||||
Jean-Philippe\ Guérard\ <jean-philippe.guerard@corbeaunoir.org>.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" nanorc.5 is Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
.\"
|
||||
.\" (c) 2003 Jean-Philippe Guérard <jean-philippe.guerard@corbeaunoir.org>
|
||||
.\" (c) 2003-2004 Jean-Philippe Guérard <jean-philippe.guerard@corbeaunoir.org>
|
||||
.\" pour l'adaptation française
|
||||
.\"
|
||||
.\" This is free documentation, see the latest version of the GNU General
|
||||
@@ -11,11 +11,12 @@
|
||||
.\" licence publique générale GNU (GNU GPL) pour connaître ses
|
||||
.\" conditions d'utilisation. AUCUNE garantie n'est offerte.
|
||||
.\"
|
||||
.TH NANORC 5 "19 juin 2003 (v.f. du 25 août 2003)"
|
||||
.\" $Id$
|
||||
.TH NANORC 5 "version 1.3.4" "17 août 2004"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\" Merci de modifier ces dates à chaque mise à jour de cette page.
|
||||
|
||||
.SH NAME
|
||||
.SH NOM
|
||||
nanorc \- fichier de configuration de l'éditeur nano du projet GNU
|
||||
|
||||
.SH DESCRIPTION
|
||||
@@ -32,7 +33,7 @@ sauter directement
|
||||
.PP
|
||||
Le fichier \fInanorc\fP contient les paramètres par défaut de
|
||||
\fBnano\fP. Lors de son démarrage, nano commence par lire le fichier de
|
||||
configuration général \fI$SYSCONFDIR/nanorc\fP, puis lit le fichier de
|
||||
configuration général \fISYSCONFDIR/nanorc\fP, puis lit le fichier de
|
||||
configuration personnel de l'utilisateur \fI~/.nanorc\fP.
|
||||
|
||||
.SH OPTIONS
|
||||
@@ -44,9 +45,9 @@ De plus, les mots clefs
|
||||
sont utilisés pour définir les règles de colorisation pour différents
|
||||
motifs de texte. Nano lira une commande par ligne.
|
||||
|
||||
Les options du fichier de configuration ont priorité sur les valeurs par
|
||||
défaut utilisées par nano. Les options données sur la ligne de commande
|
||||
permettent d'outrepasser les options du fichier de configuration.
|
||||
Les options du fichier de configuration ont priorité sur les valeurs par
|
||||
défaut utilisées par nano. Les options de la ligne de commande sont
|
||||
prioritaires par rapport aux options du fichier de configuration.
|
||||
|
||||
Les options sont désactivées (unset) par défaut, sauf les options
|
||||
prenant un argument.
|
||||
@@ -58,16 +59,15 @@ Les commandes et arguments reconnus sont\ :
|
||||
Active l'indentation automatique.
|
||||
.TP
|
||||
\fBset/unset backup\fP
|
||||
Crée des copie de sécurité appelées
|
||||
Crée des copie de sécurité nommées
|
||||
.IR nom_du_fichier~ .
|
||||
.TP
|
||||
\fBset/unset const\fP
|
||||
Affiche en permanence la position du curseur dans la barre
|
||||
d'information.
|
||||
Affiche en permanence la position du curseur dans la ligne d'état.
|
||||
.TP
|
||||
\fBset/unset cut\fP
|
||||
Par défaut, utilise ^K pour couper le texte du curseur à la fin de la
|
||||
ligne, au lieu de couper la ligne entière.
|
||||
Par défaut, ^K coupe le texte du curseur jusqu'à la fin de la ligne, au
|
||||
lieu de couper la ligne entière.
|
||||
.TP
|
||||
\fBset fill \fIn\fP\fP
|
||||
Passe automatiquement à la ligne à la colonne \fIn\fP. Si la valeur
|
||||
@@ -80,11 +80,9 @@ Active l'utilisation de
|
||||
pour enregistrer et relire les chaînes ayant fait l'objet d'une
|
||||
recherche ou d'un remplacement.
|
||||
.TP
|
||||
\fBset/unset keypad\fP
|
||||
Utilise l'autre gestion du pavé numérique.
|
||||
.TP
|
||||
\fBset/unset multibuffer\fP
|
||||
Permet de charger simultanément plusieurs fichiers.
|
||||
Mode multifichier\ : permet de charger les fichiers dans leur propre
|
||||
espace.
|
||||
.TP
|
||||
\fBset/unset noconvert\fP
|
||||
Pas de conversion depuis les formats DOS et Mac.
|
||||
@@ -93,7 +91,7 @@ Pas de conversion depuis les formats DOS et Mac.
|
||||
Ne suit pas les liens symboliques lors de l'écriture des fichiers.
|
||||
.TP
|
||||
\fBset/unset nohelp\fP
|
||||
Désactive la barre d'aide affichée en bas de l'écran.
|
||||
Désactive les lignes d'aide affichée en bas de l'écran.
|
||||
.TP
|
||||
\fBset/unset nowrap\fP
|
||||
Désactive le passage automatique à la ligne.
|
||||
@@ -101,12 +99,24 @@ D
|
||||
\fBset operatingdir "\fIrépertoire\fP"\fP
|
||||
\fBnano\fP ne lira et n'écrira des fichiers qu'à l'intérieur du
|
||||
\fIrépertoire\fP et de ses sous-répertoires. De plus, celui-ci devient
|
||||
le répertoire courant, afin que les fichiers soient écrits dans ce
|
||||
dossier. Par défaut, cette fonction est désactivée.
|
||||
le répertoire courant, afin que les fichiers soient lus depuis ce
|
||||
répertoire. Par défaut, cette fonction est désactivée.
|
||||
.TP
|
||||
\fBset/unset preserve\fP
|
||||
Préserve les séquences XON et XOFF (^Q et ^S).
|
||||
.TP
|
||||
\fBset punct "\fIchaîne\fP"\fP
|
||||
Définit les caractères interprétés comme des ponctuations terminales.
|
||||
Ces caractères ne peuvent inclure d'espaces ou de tabulations. Seules les
|
||||
ponctuations terminales, éventuellement suivies de crochets fermants,
|
||||
peuvent terminer une phrase.
|
||||
|
||||
(N.D.T.\ : ce réglage permet de conserver 2\ espaces au lieu d'une
|
||||
derrière les ponctuations terminales lors de la justification, ce qui
|
||||
correspond aux normes typographiques anglo-saxonnes, mais n'a pas lieu
|
||||
d'être en français. Pour le français, le plus simple est d'indiquer dans
|
||||
le fichier nanorc une chaîne vide pour ce paramètre.)
|
||||
.TP
|
||||
\fBset quotestr "\fIchaîne\fP"\fP
|
||||
Définit le préfixe par défaut utilisé pour les citations dans les
|
||||
courriers électroniques. Ce préfixe est utilisé pour réaliser une
|
||||
@@ -120,9 +130,24 @@ expressions rationnelles, la valeur par d
|
||||
Sinon, ce sera ">\ ". Notez que le «\ \\t\ » ci-dessus correspond à un
|
||||
caractère de tabulation.
|
||||
.TP
|
||||
\fBset/unset rebinddelete\fP
|
||||
Interprète différemment la touche «\ Supprimer\ », afin que les touches
|
||||
«\ Effacement arrière\ » et «\ Supprimer\ » fonctionnent correctement.
|
||||
Vous devriez uniquement avoir besoin de cette option si la touche
|
||||
«\ Effacement arrière\ » produit l'effet de la touche «\ Supprimer\ »
|
||||
sur votre système.
|
||||
.TP
|
||||
\fBset/unset regexp\fP
|
||||
Utilise par défaut des expressions rationnelles pour les recherches.
|
||||
.TP
|
||||
\fBset/unset smarthome\fP
|
||||
Active le fonctionnement évolué de la touche «\ Début\ ». Lorsque cette
|
||||
touche est pressée à n'importe quel endroit excepté au tout début du
|
||||
texte d'une ligne (i.\ e. au premier caractère non-blanc), le curseur se
|
||||
positionnera à ce début de ligne (qu'il soit en avant ou en arrière). Si
|
||||
le curseur est déjà au tout début de la ligne, il se placera au vrai
|
||||
début de la ligne.
|
||||
.TP
|
||||
\fBset/unset smooth\fP
|
||||
Active le défilement ligne-par-ligne du texte.
|
||||
.TP
|
||||
@@ -138,18 +163,23 @@ Utilise une largeur de tabulation de \fIn\fP au lieu de la valeur par
|
||||
défaut (8). Cette valeur doit être supérieur à 0.
|
||||
.TP
|
||||
\fBset/unset tempfile\fP
|
||||
S'il a été modifié, le fichier sera sauvegardé automatiquement
|
||||
sans demande de confirmation.
|
||||
S'il a été modifié, le fichier sera sauvegardé automatiquement en
|
||||
quittant, sans demande de confirmation.
|
||||
.TP
|
||||
\fBset/unset view\fP
|
||||
Interdit la modification du fichier.
|
||||
.TP
|
||||
\fBset whitespace "\fIchaîne\fP"\fP
|
||||
Définit les deux caractères utilisés pour afficher les premiers
|
||||
caractères de tabulations et d'espaces. Cela ne doit pas être
|
||||
des caractère de contrôle.
|
||||
.TP
|
||||
.B syntax "\fIchaîne\fP" ["\fImotif_de_fichier\fP" ... ]
|
||||
Définit une syntaxe nommée \fIchaîne\fP qui pourra être activé via
|
||||
l'option \fB-Y\fP, ou qui sera automatiquement activé si le nom du
|
||||
fichier en cours correspond au \fImotif_de_fichier\fP. Toutes les
|
||||
instructions de colorisation \fBcolor\fP suivantes s'appliqueront à cette
|
||||
syntaxe, jusqu'à la définition d'une nouvelle syntaxe.
|
||||
instructions suivantes de colorisation \fBcolor\fP s'appliqueront à
|
||||
cette syntaxe, jusqu'à la définition d'une nouvelle syntaxe.
|
||||
.TP
|
||||
.B color \fIcouleur_texte\fP[,\fIcouleur_fond\fP] "\fImotif\fP" ...
|
||||
Pour la syntaxe en cours, affiche toutes les expressions correspondant à
|
||||
@@ -170,7 +200,7 @@ par \fImotif_fin\fP en utilisant la couleur de texte \fIcouleur_texte\fP
|
||||
et éventuellement la couleur de fond \fIcouleur_fond\fP. Cela permet à
|
||||
la colorisation syntaxique de s'étendre sur plusieurs lignes. Notez que
|
||||
toutes les occurrences successives de \fImotif_début\fP après le
|
||||
\fImotif_début\fP initial seront colorées jusqu'à la prochaine instance
|
||||
\fImotif_début\fP initial seront surlignées jusqu'à la prochaine instance
|
||||
de \fImotif_fin\fP.
|
||||
|
||||
.SH FICHIERS
|
||||
@@ -195,4 +225,6 @@ Chris Allegretta <chrisa@asty.org> et d'autres (voir les fichiers
|
||||
manuel a été rédigée par Jordi Mallach <jordi@gnu.org>.
|
||||
|
||||
.SH TRADUCTION
|
||||
Jean-Philippe Guérard <jean-philippe.guerard@corbeaunoir.org>, 2003.
|
||||
|
||||
Adaptation française du 4\ septembre\ 2004 par
|
||||
Jean-Philippe\ Guérard\ <jean-philippe.guerard@corbeaunoir.org>.
|
||||
|
||||
142
doc/man/nano.1
142
doc/man/nano.1
@@ -1,12 +1,12 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" nano.1 is copyright (C) 1999, 2000, 2001, 2002, 2003 by
|
||||
.\" nano.1 is copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 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 "version 1.3.2" "March 31, 2004"
|
||||
.TH NANO 1 "version 1.3.8" "June 27, 2005"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
|
||||
@@ -15,7 +15,7 @@ nano \- Nano's ANOther editor, an enhanced free Pico clone
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B nano
|
||||
.I [\+LINE]\ [options]\ [file]
|
||||
.I [\+LINE,COLUMN]\ [options]\ [file]
|
||||
.br
|
||||
|
||||
.SH DESCRIPTION
|
||||
@@ -32,68 +32,82 @@ replace" and "go to line number".
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \+\fILINE\fP
|
||||
Places cursor at \fILINE\fP on startup.
|
||||
.B \+\fILINE\fP,\fICOLUMN\fP
|
||||
Places cursor at line number \fILINE\fP and column number \fICOLUMN\fP
|
||||
on startup, instead of the default of line 1, column 1.
|
||||
.TP
|
||||
.B \-?
|
||||
Same as \fB-h (\-\-help)\fP.
|
||||
.TP
|
||||
.B \-A (\-\-smarthome)
|
||||
Make the Home key smarter. When Home is pressed anywhere but at the
|
||||
very beginning of non-whitespace characters on a line, the cursor will
|
||||
jump to that beginning (either forwards or backwards). If the cursor is
|
||||
already at that position, it will jump to the true beginning of the
|
||||
line.
|
||||
.TP
|
||||
.B \-B (\-\-backup)
|
||||
When saving a file, back up the previous version of it to the current
|
||||
filename suffixed with a ~.
|
||||
.TP
|
||||
.B \-D (\-\-dos)
|
||||
Write file in DOS format.
|
||||
.B \-C \fIdir\fP (\-\-backupdir=\fIdir\fP)
|
||||
Set the directory where \fBnano\fP puts unique backup files if file
|
||||
backups are enabled.
|
||||
.TP
|
||||
.B \-E \fIdir\fP (\-\-backupdir=\fIdir\fP)
|
||||
Set the directory where \fBnano\fP puts the backup files if file backups
|
||||
are enabled.
|
||||
.B \-E (\-\-tabstospaces)
|
||||
Convert typed tabs to spaces.
|
||||
.TP
|
||||
.B \-F (\-\-multibuffer)
|
||||
Enable multiple file buffers, if available.
|
||||
.TP
|
||||
.B \-H (\-\-historylog)
|
||||
Log search and replace strings to
|
||||
.I ~/.nano_history
|
||||
so they may be stored for later editing, if nanorc support is
|
||||
configured.
|
||||
Log search and replace strings to \fI~/.nano_history\fP so they can be
|
||||
stored for later editing, if nanorc support is configured.
|
||||
.TP
|
||||
.B \-I (\-\-ignorercfiles)
|
||||
Don't look at
|
||||
.I SYSCONFDIR/nanorc
|
||||
or
|
||||
.IR ~/.nanorc ,
|
||||
if nanorc support is available.
|
||||
.TP
|
||||
.B \-M (\-\-mac)
|
||||
Write file in Mac format.
|
||||
Don't look at \fISYSCONFDIR/nanorc\fP or \fI~/.nanorc\fP, if nanorc
|
||||
support is available.
|
||||
.TP
|
||||
.B \-N (\-\-noconvert)
|
||||
Disable automatic conversion of files from DOS/Mac format.
|
||||
.TP
|
||||
.B \-O (\-\-morespace)
|
||||
Use the blank line below the titlebar as extra editing space.
|
||||
.TP
|
||||
.B \-Q \fIstr\fP (\-\-quotestr=\fIstr\fP)
|
||||
Set the quoting string for justifying. The default is
|
||||
"^([\ \\t]*[|>:}#])+" if regular expression support is available, or
|
||||
">\ " otherwise.
|
||||
.TP
|
||||
.B \-R (\-\-regexp)
|
||||
Enable regular expression matching for search strings, as well as
|
||||
\\n subexpression replacement for replace strings, if available.
|
||||
.B \-R (\-\-restricted)
|
||||
Restricted mode: Don't read or write to any file not specified on the
|
||||
command line, read any nanorc files, allow suspending, or allow a file
|
||||
to be appended to, prepended to, or saved under a different name if it
|
||||
already has one. Also accessible by invoking \fBnano\fP with any name
|
||||
beginning with 'r' (e.g. "rnano").
|
||||
.TP
|
||||
.B \-S (\-\-smooth)
|
||||
Enable smooth scrolling. Text will scroll line-by-line, instead of the
|
||||
usual chunk-by-chunk behavior.
|
||||
.TP
|
||||
.B \-T \fIcols\fP (\-\-tabsize=\fIcols\fP)
|
||||
Set the size (width) of a tab to \fIcols\fP columns.
|
||||
Set the size (width) of a tab to \fIcols\fP columns. The value of
|
||||
\fIcols\fP must be greater than 0. The default value is 8.
|
||||
.TP
|
||||
.B \-U (\-\-quickblank)
|
||||
Do quick statusbar blanking. Statusbar messages will disappear after 1
|
||||
keystroke instead of 25. Note that \fB-c\fP cancels this out.
|
||||
.TP
|
||||
.B \-V (\-\-version)
|
||||
Show the current version number and author.
|
||||
.TP
|
||||
.B \-Y \fIstr\fP (\-\-syntax=\fIstr\fP)
|
||||
Specify a specific syntax highlighting from the
|
||||
.I .nanorc
|
||||
to use, if available.
|
||||
Specify a specific syntax highlighting from the \fInanorc\fP to use, if
|
||||
available.
|
||||
.TP
|
||||
.B \-c (\-\-const)
|
||||
Constantly show the cursor position.
|
||||
Constantly show the cursor position. Note that this cancels out
|
||||
\fB-U\fP.
|
||||
.TP
|
||||
.B \-d (\-\-rebinddelete)
|
||||
Interpret the Delete key differently so that both Backspace and Delete
|
||||
@@ -108,13 +122,12 @@ 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.
|
||||
Enable cut from cursor to end of line.
|
||||
.TP
|
||||
.B \-l (\-\-nofollow)
|
||||
If the file being edited is a symbolic link, replace the link with
|
||||
a new file, do not follow it. Good for editing files in
|
||||
.IR /tmp ,
|
||||
perhaps?
|
||||
a new file instead of following it. Good for editing files in
|
||||
\fI/tmp\fP, perhaps?
|
||||
.TP
|
||||
.B \-m (\-\-mouse)
|
||||
Enable mouse support (if available for your system).
|
||||
@@ -128,16 +141,17 @@ Preserve the XON and XOFF sequences (^Q and ^S) so they will be caught
|
||||
by the terminal.
|
||||
.TP
|
||||
.B \-r \fIcols\fP (\-\-fill=\fIcols\fP)
|
||||
Wrap lines at column \fIcols\fP. By default, this is the width of the
|
||||
screen, less eight. If this value is negative, wrapping will occur at
|
||||
\fIcols\fP columns from the right of the screen, allowing the wrap point
|
||||
to vary along with the screen width if resized.
|
||||
Wrap lines at column \fIcols\fP. If this value is 0 or less, wrapping
|
||||
will occur at the width of the screen less \fIcols\fP columns, allowing
|
||||
the wrap point to vary along with the width of the screen if the screen
|
||||
is resized. The default value is -8.
|
||||
.TP
|
||||
.B \-s \fIprog\fP (\-\-speller=\fIprog\fP)
|
||||
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's \fB-t\fP
|
||||
option.
|
||||
.TP
|
||||
.B \-v (\-\-view)
|
||||
View file (read only) mode.
|
||||
@@ -156,37 +170,32 @@ Ignored, for compatibility with Pico.
|
||||
|
||||
.SH INITIALIZATION FILE
|
||||
\fBnano\fP will read initialization files in the following order:
|
||||
.IR SYSCONFDIR/nanorc ,
|
||||
then
|
||||
.IR ~/.nanorc .
|
||||
Please see
|
||||
.BR nanorc (5)
|
||||
and the example file \fBnanorc.sample\fP which should be provided with
|
||||
\fBnano\fP.
|
||||
\fISYSCONFDIR/nanorc\fP, then \fI~/.nanorc\fP. Please see
|
||||
\fBnanorc(5)\fP and the example file \fBnanorc.sample\fP, both of which
|
||||
should be provided with \fBnano\fP.
|
||||
|
||||
.SH NOTES
|
||||
If no alternative spell checker command is specified on the command
|
||||
line or in one of the nanorc files, \fBnano\fP will check the
|
||||
\fBSPELL\fP environment variable for one.
|
||||
|
||||
\fBnano\fP will try to dump the buffer into an emergency file in some
|
||||
cases. Mainly, this will happen if \fBnano\fP receives a SIGHUP or
|
||||
SIGTERM or runs out of memory, when it will write the buffer into a file
|
||||
named
|
||||
.I nano.save
|
||||
if the buffer didn't have a name already, or will add a ".save" suffix
|
||||
to the current filename. If an emergency file with that name already
|
||||
exists in the current directory, ".save" and a number (e.g. ".save.1")
|
||||
will be suffixed to the current filename in order to make it unique. In
|
||||
multibuffer mode, \fBnano\fP will write all the open buffers to the
|
||||
respective emergency files.
|
||||
named \fInano.save\fP if the buffer didn't have a name already, or will
|
||||
add a ".save" suffix to the current filename. If an emergency file with
|
||||
that name already exists in the current directory, ".save" and a number
|
||||
(e.g. ".save.1") will be suffixed to the current filename in order to
|
||||
make it unique. In multibuffer mode, \fBnano\fP will write all the open
|
||||
buffers to their respective emergency files.
|
||||
|
||||
.SH BUGS
|
||||
Please send any comments or bug reports to
|
||||
.BR nano@nano-editor.org .
|
||||
Please send any comments or bug reports to \fBnano@nano-editor.org\fP.
|
||||
|
||||
The \fBnano\fP mailing list is available from
|
||||
.BR nano-devel@gnu.org .
|
||||
The \fBnano\fP mailing list is available from \fBnano-devel@gnu.org\fP.
|
||||
|
||||
To subscribe, email to
|
||||
.B nano-devel-request@gnu.org
|
||||
with a subject of "subscribe".
|
||||
To subscribe, email to \fBnano-devel-request@gnu.org\fP with a subject
|
||||
of "subscribe".
|
||||
|
||||
.SH HOMEPAGE
|
||||
http://www.nano-editor.org/
|
||||
@@ -199,10 +208,7 @@ http://www.nano-editor.org/
|
||||
\fI/usr/share/doc/nano/\fP (or equivalent on your system)
|
||||
|
||||
.SH AUTHOR
|
||||
Chris Allegretta <chrisa@asty.org>, et al (see
|
||||
.I AUTHORS
|
||||
and
|
||||
.I THANKS
|
||||
for details). This manual page was originally written by Jordi Mallach
|
||||
<jordi@sindominio.net>, for the Debian GNU system (but may be used by
|
||||
others).
|
||||
Chris Allegretta <chrisa@asty.org>, et al (see \fIAUTHORS\fP and
|
||||
\fITHANKS\fP for details). This manual page was originally written by
|
||||
Jordi Mallach <jordi@sindominio.net>, for the Debian GNU system (but may
|
||||
be used by others).
|
||||
|
||||
172
doc/man/nanorc.5
172
doc/man/nanorc.5
@@ -1,11 +1,12 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" nanorc.5 is Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
.\" nanorc.5 is Copyright (C) 2003, 2004, 2005 Free Software
|
||||
.\" Foundation, Inc.
|
||||
.\"
|
||||
.\" This is free documentation, see the latest version of the GNU General
|
||||
.\" Public License for copying conditions. There is NO warranty.
|
||||
.\"
|
||||
.\" $Id$
|
||||
.TH NANORC 5 "version 1.3.2" "March 31, 2004"
|
||||
.TH NANORC 5 "version 1.3.8" "June 27, 2005"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.SH NAME
|
||||
@@ -21,15 +22,14 @@ replace" and "go to line number".
|
||||
.PP
|
||||
The \fInanorc\fP file contains the default settings for \fBnano\fP.
|
||||
During startup, \fBnano\fP will first read its system-wide settings from
|
||||
.IR SYSCONFDIR/nanorc ,
|
||||
and then user-specific settings from
|
||||
.IR ~/.nanorc .
|
||||
\fISYSCONFDIR/nanorc\fP, and then user-specific settings from
|
||||
\fI~/.nanorc\fP.
|
||||
|
||||
.SH OPTIONS
|
||||
The configuration file accepts a series of "set" and "unset" commands,
|
||||
which can be used to configure nano on startup without using the
|
||||
command-line options. Additionally, the "syntax" and "color" keywords
|
||||
are used to define syntax highlighting rules for different text
|
||||
command-line options. Additionally, the "syntax", "color", and "icolor"
|
||||
keywords are used to define syntax highlighting rules for different text
|
||||
patterns. GNU nano will read one command per line.
|
||||
|
||||
Options in rcfiles take precedence over nano's defaults, and command
|
||||
@@ -40,57 +40,83 @@ Options are unset by default, except for options that take an argument.
|
||||
The supported commands and arguments are:
|
||||
|
||||
.TP 3
|
||||
\fBset/unset autoindent\fP
|
||||
.B set/unset autoindent
|
||||
Use auto-indentation.
|
||||
.TP
|
||||
\fBset/unset backup\fP
|
||||
Create backup files in
|
||||
.IR filename~ .
|
||||
.B set/unset backup
|
||||
Create backup files in \fIfilename~\fP.
|
||||
.TP
|
||||
\fBset backupdir "\fIdirectory\fP"\fP
|
||||
Set the directory where \fBnano\fP puts the backup files if file backups
|
||||
are enabled.
|
||||
.B set backupdir "\fIdirectory\fP"
|
||||
Set the directory where \fBnano\fP puts unique backup files if file
|
||||
backups are enabled.
|
||||
.TP
|
||||
\fBset/unset const\fP
|
||||
.B set/unset backwards
|
||||
Do backwards searches by default.
|
||||
.TP
|
||||
.B set brackets "\fIstring\fP"
|
||||
Set the characters treated as closing brackets. They cannot contain
|
||||
blank characters. Only closing punctuation, optionally followed by
|
||||
closing brackets, can end sentences.
|
||||
.TP
|
||||
.B set/unset casesensitive
|
||||
Do case sensitive searches by default.
|
||||
.TP
|
||||
.B set/unset const
|
||||
Constantly display the cursor position in the status bar.
|
||||
.TP
|
||||
\fBset/unset cut\fP
|
||||
Use cut to end of line with ^K by default.
|
||||
.B set/unset cut
|
||||
Use cut to end of line by default.
|
||||
.TP
|
||||
\fBset fill \fIn\fP\fP
|
||||
Wrap lines at column number \fIn\fP. If \fIn\fP is 0 or less, the line
|
||||
length will be the screen width less \fIn\fP. The default value is -8.
|
||||
.B set fill \fIn\fP
|
||||
Wrap lines at column number \fIn\fP. If \fIn\fP is 0 or less, the
|
||||
maximum line length will be the screen width less \fIn\fP columns. The
|
||||
default value is -8.
|
||||
.TP
|
||||
\fBset/unset historylog\fP
|
||||
Enable
|
||||
.I ~/.nano_history
|
||||
for saving and reading search/replace strings.
|
||||
.B set/unset historylog
|
||||
Enable \fI~/.nano_history\fP for saving and reading search/replace
|
||||
strings.
|
||||
.TP
|
||||
\fBset/unset multibuffer\fP
|
||||
.B set/unset morespace
|
||||
Allow use of the blank line below the titlebar as extra editing space.
|
||||
.TP
|
||||
.B set/unset mouse
|
||||
Enable mouse support, so that mouse clicks can be used to set the mark
|
||||
and run shortcuts.
|
||||
.TP
|
||||
.B set/unset multibuffer
|
||||
Allow inserting files into their own buffers.
|
||||
.TP
|
||||
\fBset/unset noconvert\fP
|
||||
.B set/unset noconvert
|
||||
Don't convert files from DOS/Mac format.
|
||||
.TP
|
||||
\fBset/unset nofollow\fP
|
||||
.B set/unset nofollow
|
||||
Don't follow symlinks when writing files.
|
||||
.TP
|
||||
\fBset/unset nohelp\fP
|
||||
.B set/unset nohelp
|
||||
Don't display the help lists at the bottom of the screen.
|
||||
.TP
|
||||
\fBset/unset nowrap\fP
|
||||
.B set/unset nowrap
|
||||
Don't wrap text at all.
|
||||
.TP
|
||||
\fBset operatingdir "\fIdirectory\fP"\fP
|
||||
.B set operatingdir "\fIdirectory\fP"
|
||||
\fBnano\fP will only read and write files inside \fIdirectory\fP and its
|
||||
subdirectories. Also, the current directory is changed to here, so
|
||||
files are inserted from this dir. By default the operating directory
|
||||
feature is turned off.
|
||||
.TP
|
||||
\fBset/unset preserve\fP
|
||||
.B set/unset preserve
|
||||
Preserve the XON and XOFF keys (^Q and ^S).
|
||||
.TP
|
||||
\fBset quotestr "\fIstring\fP"\fP
|
||||
.B set punct "\fIstring\fP"
|
||||
Set the characters treated as closing punctuation. They cannot contain
|
||||
blank characters. Only closing punctuation, optionally followed by
|
||||
closing brackets, can end sentences.
|
||||
.TP
|
||||
.B set quickblank
|
||||
Do quick statusbar blanking. Statusbar messages will disappear after 1
|
||||
keystroke instead of 25.
|
||||
.TP
|
||||
.B set quotestr "\fIstring\fP"
|
||||
The email-quote string, used to justify email-quoted paragraphs. This
|
||||
is an "extended regular expression" if your system supports them,
|
||||
otherwise a literal string. The default value is
|
||||
@@ -100,56 +126,77 @@ otherwise a literal string. The default value is
|
||||
if you have regexps, otherwise set quotestr ">\ ". Note that '\\t'
|
||||
above stands for a literal Tab character.
|
||||
.TP
|
||||
\fBset/unset rebinddelete\fP
|
||||
.B set/unset rebinddelete
|
||||
Interpret the Delete key differently so that both Backspace and Delete
|
||||
work properly. You should only need to use this option if Backspace
|
||||
acts like Delete on your system.
|
||||
.TP
|
||||
\fBset/unset regexp\fP
|
||||
.B set/unset regexp
|
||||
Do regular expression searches by default.
|
||||
.TP
|
||||
\fBset/unset smooth\fP
|
||||
.B set/unset smarthome
|
||||
Make the Home key smarter. When Home is pressed anywhere but at the
|
||||
very beginning of non-whitespace characters on a line, the cursor will
|
||||
jump to that beginning (either forwards or backwards). If the cursor is
|
||||
already at that position, it will jump to the true beginning of the
|
||||
line.
|
||||
.TP
|
||||
.B set/unset smooth
|
||||
Use smooth scrolling by default.
|
||||
.TP
|
||||
\fBset speller \fIspellprog\fP\fP
|
||||
.B set speller \fIspellprog\fP
|
||||
Use spelling checker \fIspellprog\fP instead of the built-in one, which
|
||||
calls \fIspell\fP.
|
||||
.TP
|
||||
\fBset/unset suspend\fP
|
||||
Allow nano to be suspended with ^Z.
|
||||
.B set/unset suspend
|
||||
Allow nano to be suspended.
|
||||
.TP
|
||||
\fBset tabsize \fIn\fP\fP
|
||||
Use a tab size of \fIn\fP columns instead of the default (8); must be
|
||||
greater than 0.
|
||||
.B set tabsize \fIn\fP
|
||||
Use a tab size of \fIn\fP columns. The value of \fIn\fP must be greater
|
||||
than 0. The default value is 8.
|
||||
.TP
|
||||
\fBset/unset tempfile\fP
|
||||
.B set/unset tabstospaces
|
||||
Convert typed tabs to spaces.
|
||||
.TP
|
||||
.B set/unset tempfile
|
||||
Save automatically on exit, don't prompt.
|
||||
.TP
|
||||
\fBset/unset view\fP
|
||||
.B set/unset view
|
||||
Disallow file modification.
|
||||
.TP
|
||||
.B set whitespace "\fIstring\fP"
|
||||
Set the two characters used to display the first characters of tabs and
|
||||
spaces. They must be single-column characters.
|
||||
.TP
|
||||
.B syntax "\fIstr\fP" ["\fIfileregex\fP" ... ]
|
||||
Defines a syntax named \fIstr\fP which can be activated via the \fB-Y\fP
|
||||
flag, or will be automatically activated if the current filename matches
|
||||
\fIfileregex\fP. All following \fBcolor\fP statements will apply to
|
||||
\fIsyntax\fP until a new syntax is defined.
|
||||
\fIfileregex\fP. All following \fBcolor\fP and \fBicolor\fP statements
|
||||
will apply to \fIsyntax\fP until a new syntax is defined.
|
||||
.TP
|
||||
.B color \fIfgcolor\fP[,\fIbgcolor\fP] "\fIregex\fP" ...
|
||||
.B color \fIfgcolor\fP,\fIbgcolor\fP "\fIregex\fP" ...
|
||||
For the currently defined syntax, display all expressions matching
|
||||
\fIregex\fP with foreground color \fIfgcolor\fP and optional background
|
||||
color \fIbgcolor\fP. Legal colors for foreground and background color
|
||||
are: white, black, red, blue, green, yellow, magenta, and cyan. You may
|
||||
use the prefix "bright" to force a stronger color highlight. If your
|
||||
terminal supports transparency, not specifying a \fIbgcolor\fP tells
|
||||
\fBnano\fP to attempt to use a transparent background.
|
||||
\fIregex\fP with foreground color \fIfgcolor\fP and background color
|
||||
\fIbgcolor\fP, at least one of which must be specified. Legal colors
|
||||
for foreground and background color are: white, black, red, blue, green,
|
||||
yellow, magenta, and cyan. You may use the prefix "bright" to force a
|
||||
stronger color highlight for the foreground. If your terminal supports
|
||||
transparency, not specifying a \fIbgcolor\fP tells \fBnano\fP to attempt
|
||||
to use a transparent background.
|
||||
.TP
|
||||
.B color \fIfgcolor\fP[,\fIbgcolor\fP] start="\fIsr\fP" end="\fIer\fP"
|
||||
.B icolor \fIfgcolor\fP,\fIbgcolor\fP "\fIregex\fP" ...
|
||||
Same as above, except that the expression matching is case insensitive.
|
||||
.TP
|
||||
.B color \fIfgcolor\fP,\fIbgcolor\fP start="\fIsr\fP" end="\fIer\fP"
|
||||
Display expressions which start with \fIsr\fP and end with \fIer\fP
|
||||
with foreground color \fIfgcolor\fP and optional background color
|
||||
\fIbgcolor\fP. This allows syntax highlighting to span multiple lines.
|
||||
Note that all subsequent instances of \fIsr\fP after an initial \fIsr\fP
|
||||
is found will be highlighted until the first instance of \fIer\fP.
|
||||
\fI
|
||||
with foreground color \fIfgcolor\fP and background color \fIbgcolor\fP,
|
||||
at least one of which must be specified. This allows syntax
|
||||
highlighting to span multiple lines. Note that all subsequent instances
|
||||
of \fIsr\fP after an initial \fIsr\fP is found will be highlighted until
|
||||
the first instance of \fIer\fP.
|
||||
.TP
|
||||
.B icolor \fIfgcolor\fP,\fIbgcolor\fP start="\fIsr\fP" end="\fIer\fP"
|
||||
Same as above, except that the expression matching is case insensitive.
|
||||
|
||||
.SH FILES
|
||||
.TP
|
||||
@@ -166,9 +213,6 @@ Per-user configuration file
|
||||
\fI/usr/share/doc/nano/examples/nanorc.sample\fP (or equivalent on your
|
||||
system)
|
||||
.SH AUTHOR
|
||||
Chris Allegretta <chrisa@asty.org>, et al (see
|
||||
.I AUTHORS
|
||||
and
|
||||
.I THANKS
|
||||
for details).
|
||||
This manual page was written by Jordi Mallach <jordi@gnu.org>.
|
||||
Chris Allegretta <chrisa@asty.org>, et al (see \fIAUTHORS\fP and
|
||||
\fITHANKS\fP for details). This manual page was written by Jordi
|
||||
Mallach <jordi@gnu.org>.
|
||||
|
||||
@@ -8,23 +8,36 @@
|
||||
## For the options that take parameters, the default value is given.
|
||||
## Other options are unset by default.
|
||||
|
||||
## Use auto-indentation
|
||||
## Use auto-indentation.
|
||||
# set autoindent
|
||||
|
||||
## Backup files to filename~
|
||||
## Backup files to filename~.
|
||||
# set backup
|
||||
|
||||
## The directory to put the backup files in.
|
||||
## The directory to put unique backup files in.
|
||||
# set backupdir ""
|
||||
|
||||
## Constantly display the cursor position in the status bar.
|
||||
## Do backwards searches by default.
|
||||
# set backwards
|
||||
|
||||
## The characters treated as closing brackets. They cannot contain
|
||||
## blank characters. Only closing punctuation, optionally followed by
|
||||
## closing brackets, can end sentences.
|
||||
##
|
||||
# set brackets "'")}]>"
|
||||
|
||||
## Do case sensitive searches by default.
|
||||
# set casesensitive
|
||||
|
||||
## Constantly display the cursor position in the statusbar. Note that
|
||||
## this cancels out "quickblank".
|
||||
# set const
|
||||
|
||||
## Use cut to end of line with ^K by default
|
||||
## Use cut to end of line by default.
|
||||
# set cut
|
||||
|
||||
## Set the line length for wrapping text and justifying paragraphs.
|
||||
## If fill is negative, the line length will be the screen width less
|
||||
## If fill is 0 or less, the line length will be the screen width less
|
||||
## this number.
|
||||
##
|
||||
# set fill -8
|
||||
@@ -32,22 +45,29 @@
|
||||
## Enable ~/.nano_history for saving and reading search/replace strings.
|
||||
# set historylog
|
||||
|
||||
## Allow multiple file buffers (using ^R inserts into separate buffer).
|
||||
## You must have configured with --enable-multibuffer or --enable-extra
|
||||
## Use the blank line below the titlebar as extra editing space.
|
||||
# set morespace
|
||||
|
||||
## Enable mouse support, so that mouse clicks can be used to set the
|
||||
## mark and run shortcuts.
|
||||
# set mouse
|
||||
|
||||
## Allow multiple file buffers (inserting a file will put it into a
|
||||
## separate buffer). You must have configured with --enable-multibuffer
|
||||
## for this to work.
|
||||
##
|
||||
## set multibuffer
|
||||
# set multibuffer
|
||||
|
||||
## Don't convert files from DOS/Mac format
|
||||
## Don't convert files from DOS/Mac format.
|
||||
# set noconvert
|
||||
|
||||
## Don't follow symlinks when writing files
|
||||
## Don't follow symlinks when writing files.
|
||||
# set nofollow
|
||||
|
||||
## Don't display the help lists at the bottom of the screen
|
||||
## Don't display the helpful shortcut lists at the bottom of the screen.
|
||||
# set nohelp
|
||||
|
||||
## Don't wrap text at all
|
||||
## Don't wrap text at all.
|
||||
# set nowrap
|
||||
|
||||
## Set operating directory. nano will not read or write files outside
|
||||
@@ -57,9 +77,20 @@
|
||||
##
|
||||
# set operatingdir ""
|
||||
|
||||
## Preserve the XON and XOFF keys (^Q and ^S)
|
||||
## Preserve the XON and XOFF keys (^Q and ^S).
|
||||
# set preserve
|
||||
|
||||
## The characters treated as closing punctuation. They cannot contain
|
||||
## blank characters. Only closing punctuation, optionally followed by
|
||||
## closing brackets, can end sentences.
|
||||
##
|
||||
# set punct ".?!"
|
||||
|
||||
## Do quick statusbar blanking. Statusbar messages will disappear after
|
||||
## 1 keystroke instead of 25. Note that "const" cancels this out.
|
||||
##
|
||||
# set quickblank
|
||||
|
||||
## The email-quote string, used to justify email-quoted paragraphs.
|
||||
## This is an extended regular expression if your system supports them,
|
||||
## otherwise a literal string. Default:
|
||||
@@ -69,60 +100,91 @@
|
||||
## You can get old nano quoted-justify behavior via:
|
||||
# set quotestr "(> )+"
|
||||
|
||||
## Fix Backspace/Delete confusion problem
|
||||
## Fix Backspace/Delete confusion problem.
|
||||
# set rebinddelete
|
||||
|
||||
## Do extended regular expression searches by default
|
||||
## Do extended regular expression searches by default.
|
||||
# set regexp
|
||||
|
||||
## Use smooth scrolling as the default
|
||||
## Make the Home key smarter. When Home is pressed anywhere but at the
|
||||
## very beginning of non-whitespace characters on a line, the cursor
|
||||
## will jump to that beginning (either forwards or backwards). If the
|
||||
## cursor is already at that position, it will jump to the true
|
||||
## beginning of the line.
|
||||
# set smarthome
|
||||
|
||||
## Use smooth scrolling as the default.
|
||||
# set smooth
|
||||
|
||||
## Use this spelling checker instead of the internal one. This option
|
||||
## does not properly have a default value.
|
||||
##
|
||||
# set speller "aspell -c"
|
||||
# set speller "aspell -x -c"
|
||||
|
||||
## Allow nano to be suspended with ^Z
|
||||
## Allow nano to be suspended.
|
||||
# set suspend
|
||||
|
||||
## Use this tab size instead of the default; it must be greater than 0
|
||||
## Use this tab size instead of the default; it must be greater than 0.
|
||||
# set tabsize 8
|
||||
|
||||
## Save automatically on exit, don't prompt
|
||||
## Convert typed tabs to spaces.
|
||||
# set tabstospaces
|
||||
|
||||
## Save automatically on exit, don't prompt.
|
||||
# set tempfile
|
||||
|
||||
## Disallow file modification, why would you want this in an rc file? ;)
|
||||
## Disallow file modification; why would you want this in an rcfile? ;)
|
||||
# set view
|
||||
|
||||
## The two single-column characters used to display the first characters
|
||||
## of tabs and spaces. 187 decimal (00BB hexadecimal) and 183 decimal
|
||||
## (00B7 hexadecimal) seem to be good values for these.
|
||||
# set whitespace " "
|
||||
|
||||
## Color setup
|
||||
##
|
||||
## Format:
|
||||
##
|
||||
## syntax "short description" ["filename regex" ...]
|
||||
##
|
||||
## color foreground,background "regex" ["regex"...]
|
||||
## or
|
||||
## icolor foreground,background "regex" ["regex"...]
|
||||
##
|
||||
## "color" will do case sensitive matches, while "icolor" will do case
|
||||
## insensitive matches.
|
||||
##
|
||||
## Legal colors: white, black, red, blue, green, yellow, magenta, cyan.
|
||||
## You may use the prefix "bright" to mean a stronger color highlight.
|
||||
## You may use the prefix "bright" to mean a stronger color highlight
|
||||
## for the foreground.
|
||||
##
|
||||
## To use multi-line regexes use the start="regex" end="regex" format.
|
||||
## To use multi-line regexes, use the start="regex" end="regex" format.
|
||||
##
|
||||
## 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.
|
||||
##
|
||||
# syntax "c-file" "\.(c|h)$"
|
||||
# syntax "c-file" "\.(c|C|cc|cpp|cxx|h|H|hh|hpp|hxx)$"
|
||||
# color red "\<[A-Z_]{2,}\>"
|
||||
# color green "\<(float|char|int|void|static|const|struct)\>"
|
||||
# color brightyellow "\<(if|while|do|else|case|switch)\>"
|
||||
# color brightcyan "^ *# *(define|include|ifn?def|endif|elif|else|if)"
|
||||
# color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|signed|unsigned|inline)\>"
|
||||
# color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
|
||||
# color brightyellow "\<(for|if|while|do|else|case|default|switch|goto|continue|break|return)\>"
|
||||
# color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
|
||||
# color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)"
|
||||
# color brightmagenta "'([^\]|(\\['abfnrtv\\]))'" "'\\(([0-7][0-7]?)|([0-3][0-7][0-7]))'" "'\\x[0-9A-Fa-f][0-9A-Fa-f]?'"
|
||||
##
|
||||
## GCC builtins
|
||||
##
|
||||
# color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(asm|builtin|inline|restrict|typeof)__"
|
||||
##
|
||||
## 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 brightyellow "<[^= ]*>" ""(\\.|[^\"])*""
|
||||
##
|
||||
## This string is VERY resource intensive!!!
|
||||
# color brightyellow start=""(\\.|[^\"])*\\ *$" end="^(\\.|[^\"])*""
|
||||
# color brightyellow start=""(\\.|[^\"])*\\[[:space:]]*$" end="^(\\.|[^\"])*""
|
||||
##
|
||||
## And we want to have some nice comment highlighting too
|
||||
# color brightblue "//.*"
|
||||
@@ -131,7 +193,7 @@
|
||||
## Here is a short example for HTML
|
||||
# syntax "HTML" "\.html$"
|
||||
# color blue start="<" end=">"
|
||||
# color red "&[^; ]*;"
|
||||
# color red "&[^;[[:space:]]]*;"
|
||||
|
||||
## Here is a short example for TeX files
|
||||
# syntax "TeX" "\.tex$"
|
||||
@@ -145,10 +207,10 @@
|
||||
|
||||
## Here is an example for groff
|
||||
##
|
||||
# syntax "groff" "\.ms$" "\.mm$" "\.me$" "\.tmac$" "^tmac." ".rof"
|
||||
# syntax "groff" "\.m[ems]$" "\.tmac$" "^tmac." ".rof"
|
||||
## The argument of .nr or .ds
|
||||
# color cyan "^\.ds [^ ]*"
|
||||
# color cyan "^\.nr [^ ]*"
|
||||
# color cyan "^\.ds [^[[:space:]]]*"
|
||||
# color cyan "^\.nr [^[[:space:]]]*"
|
||||
## Single character escapes
|
||||
# color brightmagenta "\\."
|
||||
## Highlight the argument of \f or \s in the same color
|
||||
@@ -160,7 +222,7 @@
|
||||
# color cyan "(\\|\\\\)n\(.."
|
||||
# color cyan start="(\\|\\\\)n\[" end="]"
|
||||
## Requests
|
||||
# color brightgreen "^\. *[^ ]*"
|
||||
# color brightgreen "^\.[[:space:]]*[^[[:space:]]]*"
|
||||
## Comments
|
||||
# color yellow "^\.\\\".*$"
|
||||
## Strings
|
||||
@@ -176,7 +238,7 @@
|
||||
## Here is an example for perl
|
||||
##
|
||||
# syntax "perl" "\.p[lm]$"
|
||||
# color red "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork)|get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join|keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek|seekdir|se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr|y|truncate|umask|un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>"
|
||||
# color red "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\>" "\<(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\>" "\<(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\>" "\<(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\>" "\<(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>"
|
||||
# color magenta "\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\>"
|
||||
# color cyan start="[$@%]" end="( |\\W|-)"
|
||||
# color yellow "".*"|qq\|.*\|"
|
||||
@@ -196,20 +258,57 @@
|
||||
# color blue "//.*"
|
||||
# color blue start="/\*" end="\*/"
|
||||
# color brightblue start="/\*\*" end="\*/"
|
||||
# color brightgreen,green " +$"
|
||||
# color brightgreen,green "[[:space:]]+$"
|
||||
|
||||
## Here is an example for patch files
|
||||
##
|
||||
# syntax "patch" "\.(patch|diff)$"
|
||||
# color brightgreen "^\+.*"
|
||||
# color green "^\+\+\+.*"
|
||||
# color brightblue "^ .*"
|
||||
# color brightred "^-.*"
|
||||
# color red "^---.*"
|
||||
# color brightyellow "^@@.*"
|
||||
# color magenta "^diff.*"
|
||||
|
||||
## Here is an example for manpages
|
||||
##
|
||||
# syntax "manpage" "\.[1-9]x?$"
|
||||
# color green "\.(S|T)H.*$"
|
||||
# color brightgreen "\.(S|T)H" "\.TP"
|
||||
# color brightred "\.(BR?|I[PR]?).*$"
|
||||
# color brightblue "\.(BR?|I[PR]?|PP)"
|
||||
# color brightwhite "\\f[BIPR]"
|
||||
# color yellow "\.(br|DS|RS|RE|PD)"
|
||||
|
||||
## Here is an example for assembler
|
||||
##
|
||||
# syntax "asm-file" "\.(S|s|asm)$"
|
||||
# color red "\<[A-Z_]{2,}\>"
|
||||
# color brightgreen "\.(data|subsection|text)"
|
||||
# color green "\.(align|file|globl|global|hidden|section|size|type|weak)"
|
||||
# color brightyellow "\.(ascii|asciz|byte|double|float|hword|int|long|short|single|struct|word)"
|
||||
# icolor brightred "^[[:space:]]*[._A-Z0-9]*:"
|
||||
# color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)"
|
||||
## Highlight strings (note: VERY resource intensive)
|
||||
# color brightyellow "<[^= ]*>" ""(\\.|[^\"])*""
|
||||
# color brightyellow start=""(\\.|[^\"])*\\[[:space:]]*$" end="^(\\.|[^\"])*""
|
||||
## Highlight comments
|
||||
# color brightblue "//.*"
|
||||
# color brightblue start="/\*" end="\*/"
|
||||
|
||||
## Here is an example for your .nanorc
|
||||
##
|
||||
#syntax "nanorc" "(\.|/|)nanorc$"
|
||||
# syntax "nanorc" "(\.|/|)nanorc$"
|
||||
## highlight possible errors and parameters
|
||||
#color brightwhite "^ *(set|unset|syntax|color).*$"
|
||||
# icolor brightwhite "^[[:space:]]*(set|unset|syntax|i?color).*$"
|
||||
## set, unset and syntax
|
||||
#color cyan "^ *(set|unset) +(autoindent|backup|const|cut|fill|historylog|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|quotestr|rebinddelete|regexp|smooth|speller|suspend|tabsize|tempfile|view)"
|
||||
#color green "^ *(set|unset|syntax)\>"
|
||||
# icolor cyan "^[[:space:]]*(set|unset)[[:space:]]+(autoindent|backup|backupdir|backwards|brackets|casesensitive|const|cut|fill|historylog|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|punct|quickblank|quotestr|rebinddelete)\>" "^[[:space:]]*(set|unset)[[:space:]]+(regexp|smarthome|smooth|speller|suspend|tabsize|tabstospaces|tempfile|view|whitespace)\>"
|
||||
# icolor green "^[[:space:]]*(set|unset|syntax)\>"
|
||||
## colors
|
||||
#color yellow "^ *color +(bright)?(white|black|red|blue|green|yellow|magenta|cyan)(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
|
||||
#color magenta "^ *color\>" "\<(start|end)="
|
||||
# icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
|
||||
# icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)="
|
||||
## strings
|
||||
#color white "\"(\\.|[^\"])*\""
|
||||
# icolor white "\"(\\.|[^\"])*\""
|
||||
## comments
|
||||
#color blue "^ *#.*$"
|
||||
# icolor blue "^[[:space:]]*#.*$"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
info_TEXINFOS = nano.texi
|
||||
|
||||
MAKEINFO = makeinfo --no-split
|
||||
|
||||
EXTRA_DIST = nano.info
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
@c Run `makeinfo' rather than `texinfo-format-buffer'.
|
||||
@smallbook
|
||||
@set EDITION 0.1
|
||||
@set VERSION 1.3.2
|
||||
@set UPDATED 31 Mar 2004
|
||||
@set VERSION 1.3.8
|
||||
@set UPDATED 27 Jun 2005
|
||||
|
||||
@dircategory Editors
|
||||
@direntry
|
||||
@@ -23,7 +23,7 @@
|
||||
@titlepage
|
||||
@title GNU @code{nano}
|
||||
@subtitle a small and friendly text editor.
|
||||
@subtitle version 1.3.2
|
||||
@subtitle version 1.3.8
|
||||
|
||||
@author Chris Allegretta
|
||||
@page
|
||||
@@ -33,7 +33,7 @@ editor.
|
||||
|
||||
This manual is part of the GNU @code{nano} distribution.@*
|
||||
@sp4
|
||||
Copyright (C) 1999, 2000, 2001, 2002 Chris Allegretta.
|
||||
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 Chris Allegretta.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
@@ -91,10 +91,10 @@ internationalization support, and filename tab completion.
|
||||
@node Overview, Command Line Options, Introduction, Introduction
|
||||
@section Overview
|
||||
|
||||
@code{nano} +LINE [GNU long option] [option] [ @var{file ...} ]
|
||||
@code{nano} +LINE,COLUMN [GNU long option] [option] [ @var{file ...} ]
|
||||
|
||||
The original goal for @code{nano} was a complete bug-for-bug compatible
|
||||
emulation of Pico, but nano's main goal is to be as compatible as
|
||||
emulation of Pico, but @code{nano}'s main goal is to be as compatible as
|
||||
possible while offering a superset of Pico's functionality. Also see
|
||||
@xref{Pico Compatibility}, for other differences.
|
||||
|
||||
@@ -106,18 +106,31 @@ Email bug reports to @email{nano@@nano-editor.org}.
|
||||
@code{nano} takes the following options from the command line:
|
||||
|
||||
@table @code
|
||||
@item +LINE,COLUMN
|
||||
Start at line number LINE and column number COLUMN instead of the
|
||||
default of line 1, column 1.
|
||||
|
||||
@item -?
|
||||
Same as @code{-h, --help}.
|
||||
|
||||
@item -A, --smarthome
|
||||
Make the Home key smarter. When Home is pressed anywhere but at the
|
||||
very beginning of non-whitespace characters on a line, the cursor will
|
||||
jump to that beginning (either forwards or backwards). If the cursor is
|
||||
already at that position, it will jump to the true beginning of the
|
||||
line.
|
||||
|
||||
@item -B, --backup
|
||||
When saving a file, back up the previous version of it to the current
|
||||
filename suffixed with a ~.
|
||||
|
||||
@item -D, --dos
|
||||
Write file in DOS format.
|
||||
|
||||
@item -E, --backupdir=[dir]
|
||||
Set the directory where @code{nano} puts the backup files if file
|
||||
@item -C, --backupdir=[dir]
|
||||
Set the directory where @code{nano} puts unique backup files if file
|
||||
backups are enabled.
|
||||
|
||||
@item -E, --tabstospaces
|
||||
Convert typed tabs to spaces.
|
||||
|
||||
@item -F, --multibuffer
|
||||
Enable multiple file buffers, if available.
|
||||
|
||||
@@ -125,9 +138,6 @@ Enable multiple file buffers, if available.
|
||||
Don't look at SYSCONFDIR/nanorc or ~/.nanorc, if nanorc support is
|
||||
available.
|
||||
|
||||
@item -M, --mac
|
||||
Write file in Mac format.
|
||||
|
||||
@item -N, --noconvert
|
||||
Do not convert files from DOS/Mac format.
|
||||
|
||||
@@ -141,14 +151,23 @@ Set the quoting string for justifying. The default is
|
||||
if regular expression support is available, or ``> '' otherwise. Note
|
||||
that @code{\t} above stands for a literal Tab character.
|
||||
|
||||
@item -R, --regexp
|
||||
Turn on regular expression search and search/replace.
|
||||
@item -R, --restricted
|
||||
Restricted mode: Don't read or write to any file not specified on the
|
||||
command line, read any nanorc files, allow suspending, or allow a file
|
||||
to be appended to, prepended to, or saved under a different name if it
|
||||
already has one. Also accessible by invoking @code{nano} with any name
|
||||
beginning with 'r' (e.g. "rnano").
|
||||
|
||||
@item -S, --smooth
|
||||
Enable smooth scrolling.
|
||||
|
||||
@item -T [num], --tabsize=[#cols]
|
||||
Set the displayed tab length to [#cols] columns.
|
||||
Set the displayed tab length to #cols columns. The value of #cols must
|
||||
be greater than 0. The default value is 8.
|
||||
|
||||
@item -U, --quickblank
|
||||
Do quick statusbar blanking. Statusbar messages will disappear after 1
|
||||
keystroke instead of 25. Note that -c cancels this out.
|
||||
|
||||
@item -V, --version
|
||||
Print the version number and copyright and quit.
|
||||
@@ -159,6 +178,7 @@ available.
|
||||
|
||||
@item -c, --const
|
||||
Constantly display the cursor position and line number on the statusbar.
|
||||
Note that this cancels out -U.
|
||||
|
||||
@item -d, --rebinddelete
|
||||
Interpret the Delete key differently so that both Backspace and Delete
|
||||
@@ -173,16 +193,15 @@ 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.
|
||||
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
|
||||
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).
|
||||
running under the X Window System).
|
||||
|
||||
@item -o [dir], --operatingdir=[dir]
|
||||
Set operating directory. Makes @code{nano} set up something similar to
|
||||
@@ -193,15 +212,16 @@ Preserve the ^Q (XON) and ^S (XOFF) sequences so data being sent to the
|
||||
editor can be can be stopped and started.
|
||||
|
||||
@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.
|
||||
Wrap lines at column #cols. If this value is 0 or less, wrapping will
|
||||
occur at #cols less the width of the screen, allowing it to vary along
|
||||
with the width of the screen if the screen is resized. The default
|
||||
value is -8.
|
||||
|
||||
@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.
|
||||
Invoke [prog] as the spell checker. By default, @code{nano} uses the
|
||||
command specified in the SPELL environment variable, or, if SPELL is not
|
||||
set, its own interactive spell checker that requires the @code{spell}
|
||||
program to be installed on your system.
|
||||
|
||||
@item -t, --tempfile
|
||||
Do not ask whether or not to save the current contents of the file when
|
||||
@@ -232,9 +252,6 @@ 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
|
||||
@@ -330,45 +347,56 @@ The following global toggles are available:
|
||||
|
||||
@table @code
|
||||
|
||||
@item Backup File Toggle (Meta-B)
|
||||
@item Backup Files Toggle (Meta-B)
|
||||
toggles the -B (@code{--backup}) command line flag.
|
||||
|
||||
@item DOS Format Toggle (Meta-D)
|
||||
toggles the -D (@code{--dos}) command line flag.
|
||||
@item Constant Cursor Position Display Toggle (Meta-C)
|
||||
toggles the -c (@code{--const}) command line flag.
|
||||
|
||||
@item Multiple Files Toggle (Meta-F)
|
||||
@item Multiple File Buffers Toggle (Meta-F)
|
||||
toggles the -F (@code{--multibuffer}) command line flag.
|
||||
|
||||
@item AutoIndent Toggle (Meta-I)
|
||||
@item Smart Home Key Toggle (Meta-H)
|
||||
toggles the -A (@code{--smarthome}) command line flag.
|
||||
|
||||
@item Auto Indent Toggle (Meta-I)
|
||||
toggles the -i (@code{--autoindent}) command line flag.
|
||||
|
||||
@item Cut To End Toggle (Meta-K)
|
||||
toggles the -k (@code{--cut}) command line flag.
|
||||
|
||||
@item Mouse Toggle (Meta-M)
|
||||
@item Long Line Wrapping Toggle (Meta-L)
|
||||
toggles the -w (@code{--nowrap}) command line flag.
|
||||
|
||||
@item Mouse Support Toggle (Meta-M)
|
||||
toggles the -m (@code{--mouse}) command line flag.
|
||||
|
||||
@item Mac Format Toggle (Meta-O)
|
||||
toggles the -M (@code{--mac}) command line flag.
|
||||
@item No Conversion From DOS/Mac Format Toggle (Meta-N)
|
||||
toggles the -N (@code{--noconvert}) command line flag.
|
||||
|
||||
@item More Space For Editing Toggle (Meta-O)
|
||||
toggles the -O (@code{--morespace}) command line flag.
|
||||
|
||||
@item Whitespace Display Toggle (Meta-P)
|
||||
toggles whitespace display mode if you have a "whitespace" option in
|
||||
your .nanorc.
|
||||
|
||||
@item Tabs to Spaces Toggle (Meta-Q)
|
||||
toggles the -E (@code{--tabstospaces}) command line flag.
|
||||
|
||||
@item Smooth Scrolling Toggle (Meta-S)
|
||||
toggles the -S (@code{--smooth}) command line flag.
|
||||
|
||||
@item AutoWrap Toggle (Meta-W)
|
||||
toggles the -w (@code{--nowrap}) command line flag.
|
||||
|
||||
@item Expert/Nohelp Toggle (Meta-X)
|
||||
@item Expert/No Help Toggle (Meta-X)
|
||||
toggles the -x (@code{--nohelp}) command line flag.
|
||||
|
||||
@item Color Syntax Highlighting Toggle (Meta-Y)
|
||||
toggles color syntax highlighting if you have color syntaxes in your
|
||||
.nanorc.
|
||||
|
||||
@item Suspend Toggle (Meta-Z)
|
||||
toggles the -z (@code{--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
|
||||
|
||||
|
||||
@@ -394,17 +422,18 @@ are certain differences between the editors:
|
||||
|
||||
@table @code
|
||||
@item Search and Replace History
|
||||
As of version 1.2.2 of @code{nano}, text entered as search or replace
|
||||
strings will be stored and can be accessed with the up/down arrow keys.
|
||||
Previously, @code{nano} offered a more consistent, but incompatible with
|
||||
Pico, method for entering search and replace strings. In the old
|
||||
method, previous entries would be displayed by default as editable text
|
||||
in front of the cursor, as opposed to being bracketed and uneditable as
|
||||
it is in Pico. The old behavior could be made compatible with Pico via
|
||||
the @code{-p} flag, but recent versions of Pico use the @code{-p} flag
|
||||
to preserve the XON and XOFF sequences within the editor. Since with
|
||||
the new method search and replace strings can still be edited by simply
|
||||
hitting the up arrow key once, the old method was removed completely.
|
||||
As of version 1.1.99pre1 of @code{nano}, text entered as search or
|
||||
replace strings will be stored and can be accessed with the up/down
|
||||
arrow keys. Previously, @code{nano} offered a more consistent, but
|
||||
incompatible with Pico, method for entering search and replace strings.
|
||||
In the old method, previous entries would be displayed by default as
|
||||
editable text in front of the cursor, as opposed to being bracketed and
|
||||
uneditable as it is in Pico. The old behavior could be made compatible
|
||||
with Pico via the @code{-p} flag, but recent versions of Pico use the
|
||||
@code{-p} flag to preserve the XON and XOFF sequences within the editor.
|
||||
Since with the new method search and replace strings can still be edited
|
||||
by simply hitting the up arrow key once, the old method was removed
|
||||
completely.
|
||||
|
||||
|
||||
@item Writing or Appending Selected Text to Files
|
||||
@@ -431,9 +460,9 @@ 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. As of version
|
||||
1.2.2, misspelled words are sorted and trimmed for uniqueness in the
|
||||
internal spell checker such that the words 'apple' and 'Apple' will be
|
||||
prompted for correction separately.
|
||||
1.1.99pre1, misspelled words are sorted and trimmed for uniqueness in
|
||||
the internal spell checker such that the words 'apple' and 'Apple' will
|
||||
be prompted for correction separately.
|
||||
@end table
|
||||
|
||||
@node Building and Configure Options, , Pico Compatibility, Top
|
||||
@@ -443,7 +472,8 @@ Building @code{nano} from source is fairly straightforward if you are
|
||||
familiar with compiling programs with autoconf support:
|
||||
|
||||
@itemize @bullet
|
||||
@item tar xvfz nano-x.y.z.tar.gz (where x.y.z is the version of nano)
|
||||
@item tar xvfz nano-x.y.z.tar.gz (where x.y.z is the version of
|
||||
@code{nano})
|
||||
@item cd nano-x.y.z/
|
||||
@item ./configure
|
||||
@item make
|
||||
@@ -496,9 +526,8 @@ Disables Native Language support. This will make the available GNU
|
||||
@code{nano} translations unusable.
|
||||
|
||||
@item --with-slang
|
||||
Compiling GNU @code{nano} with Slang is supported, and will make the
|
||||
binary notably smaller than if compiled with ncurses or other curses
|
||||
libraries.
|
||||
Compiling @code{nano} with Slang is supported, and will make the binary
|
||||
notably smaller than if compiled with ncurses or other curses libraries.
|
||||
|
||||
@end table
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
EXTRA_DIST = ulonglong.m4 intdiv0.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 \
|
||||
stdint_h.m4 uintmax_t.m4 isc-posix.m4 lib-ld.m4 lib-link.m4 \
|
||||
lib-prefix.m4 codeset.m4 glibc21.m4 progtest.m4 gettext.m4 \
|
||||
iconv.m4 lcmessage.m4
|
||||
EXTRA_DIST = codeset.m4 gettext.m4 glib-2.0.m4 glibc21.m4 iconv.m4 \
|
||||
intdiv0.m4 inttypes_h.m4 inttypes.m4 inttypes-pri.m4 \
|
||||
isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 \
|
||||
lib-prefix.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 \
|
||||
ulonglong.m4
|
||||
|
||||
212
m4/glib-2.0.m4
Normal file
212
m4/glib-2.0.m4
Normal file
@@ -0,0 +1,212 @@
|
||||
# Configure paths for GLIB
|
||||
# Owen Taylor 1997-2001
|
||||
|
||||
dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
||||
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or
|
||||
dnl gthread is specified in MODULES, pass to pkg-config
|
||||
dnl
|
||||
AC_DEFUN([AM_PATH_GLIB_2_0],
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from pkg-config
|
||||
dnl
|
||||
AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
|
||||
, enable_glibtest=yes)
|
||||
|
||||
pkg_config_args=glib-2.0
|
||||
for module in . $4
|
||||
do
|
||||
case "$module" in
|
||||
gmodule)
|
||||
pkg_config_args="$pkg_config_args gmodule-2.0"
|
||||
;;
|
||||
gobject)
|
||||
pkg_config_args="$pkg_config_args gobject-2.0"
|
||||
;;
|
||||
gthread)
|
||||
pkg_config_args="$pkg_config_args gthread-2.0"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
|
||||
no_glib=""
|
||||
|
||||
if test x$PKG_CONFIG != xno ; then
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
|
||||
:
|
||||
else
|
||||
echo *** pkg-config too old; version 0.7 or better required.
|
||||
no_glib=yes
|
||||
PKG_CONFIG=no
|
||||
fi
|
||||
else
|
||||
no_glib=yes
|
||||
fi
|
||||
|
||||
min_glib_version=ifelse([$1], ,2.0.0,$1)
|
||||
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
|
||||
|
||||
if test x$PKG_CONFIG != xno ; then
|
||||
## don't try to run the test against uninstalled libtool libs
|
||||
if $PKG_CONFIG --uninstalled $pkg_config_args; then
|
||||
echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
|
||||
enable_glibtest=no
|
||||
fi
|
||||
|
||||
if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
|
||||
:
|
||||
else
|
||||
no_glib=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x"$no_glib" = x ; then
|
||||
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
|
||||
GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
|
||||
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
|
||||
|
||||
GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
|
||||
GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
|
||||
glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
|
||||
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 pkg-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*** 'pkg-config --modversion glib-2.0' 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 pkg-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 pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
|
||||
printf("*** to point to the correct configuration files\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 pkg-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 PKG_CONFIG environment to point to the\n");
|
||||
printf("*** correct copy of pkg-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 (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test "$PKG_CONFIG" = "no" ; then
|
||||
echo "*** A new enough version of pkg-config was not found."
|
||||
echo "*** See http://www.freedesktop.org/software/pkgconfig/"
|
||||
else
|
||||
if test -f conf.glibtest ; then
|
||||
:
|
||||
else
|
||||
echo "*** Could not run GLIB test program, checking why..."
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
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 "*** The test program failed to compile or link. See the file config.log for the"
|
||||
echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
GLIB_CFLAGS=""
|
||||
GLIB_LIBS=""
|
||||
GLIB_GENMARSHAL=""
|
||||
GOBJECT_QUERY=""
|
||||
GLIB_MKENUMS=""
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
AC_SUBST(GLIB_LIBS)
|
||||
AC_SUBST(GLIB_GENMARSHAL)
|
||||
AC_SUBST(GOBJECT_QUERY)
|
||||
AC_SUBST(GLIB_MKENUMS)
|
||||
rm -f conf.glibtest
|
||||
])
|
||||
@@ -31,7 +31,7 @@ make DESTDIR="$RPM_BUILD_ROOT" install
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README THANKS TODO doc/faq.html doc/nanorc.sample
|
||||
%{_bindir}/nano
|
||||
%{_bindir}/*
|
||||
%{_mandir}/*/*
|
||||
%{_datadir}/locale/*/LC_MESSAGES/nano.mo
|
||||
%{_infodir}/nano.info*
|
||||
|
||||
153
po/ChangeLog
153
po/ChangeLog
@@ -1,3 +1,156 @@
|
||||
2005-06-28 David Lawrence Ramsey <pooka_regent@sluggy.net>
|
||||
|
||||
* POTFILES.in: Remove source files that contain no translatable
|
||||
strings.
|
||||
|
||||
2005-06-19 David Lawrence Ramsey <pooka_regent@sluggy.net>
|
||||
|
||||
* pt_BR.po: Typo fix.
|
||||
|
||||
2005-06-15 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* de.po: Typo fix by Jens Seidel.
|
||||
|
||||
2005-05-23 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by
|
||||
Jean-Philippe Guérard.
|
||||
|
||||
2005-04-27 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ms.po: Updated Malay translation by
|
||||
Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2005-04-22 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Norwegian bokmål translation by
|
||||
Geir Helland.
|
||||
|
||||
2005-04-20 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ms.po: Updated Malay translation by
|
||||
Sharuzzaman Ahmat Raslan.
|
||||
* ro.po: Updated Romanian translation by Laurentiu Buzdugan.
|
||||
* zh_TW.po: Updated Traditional Chinese translation by
|
||||
CHAO Wei-Lun.
|
||||
|
||||
2005-04-18 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* vi.po: Updated Vietnamese translation by Phan Vinh Thinh.
|
||||
|
||||
2005-04-18 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
* it.po: Updated Italian translation by Marco Colombo.
|
||||
* ro.po: Updated Romanian translation by Laurentiu Buzdugan.
|
||||
|
||||
2005-04-14 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* es.po: Updated Spanish translation by
|
||||
Ricardo Javier Cárdenes Medina.
|
||||
|
||||
2005-04-13 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* vi.po: New Vietnamese translation by Phan Vinh Thinh.
|
||||
* LINGUAS: Added "vi".
|
||||
|
||||
2005-04-09 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* zh_TW.po: Added Plural-Forms header and fix format specification
|
||||
typos.
|
||||
|
||||
2005-04-08 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
* it.po: Updated Italian translation by Marco Colombo.
|
||||
* zh_TW.po: Updated Traditional Chinese translation by
|
||||
CHAO Wei-Lun.
|
||||
|
||||
2005-04-06 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* rw.po: New Kinyarwanda translation by Steve Murphy.
|
||||
* LINGUAS: Added "rw".
|
||||
|
||||
2005-04-05 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by
|
||||
Jean-Philippe Guérard.
|
||||
* ro.po: Updated Romanian translation by
|
||||
Laurentiu Buzdugan.
|
||||
|
||||
2005-03-11 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ms.po: Updated Malay translation by
|
||||
Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2005-01-17 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* pt_BR.po: Updated Brazilian Portuguese translation by
|
||||
Joao Victor Duarte Martins.
|
||||
|
||||
2004-12-15 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* it.po: Updated Italian translation by Marco Colombo.
|
||||
|
||||
2004-12-15 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* sv.po: Updated Swedish translation by Christian Rose.
|
||||
|
||||
2004-12-13 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* sv.po: Updated Swedish translation by Christian Rose.
|
||||
|
||||
2004-12-07 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* it.po: Updated Italian translation by
|
||||
Marco Colombo.
|
||||
* ro.po: Updated Romanian translation by
|
||||
Laurentiu Buzdugan.
|
||||
|
||||
2004-12-01 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
* nb: Updated Norwegian bokmål translation by
|
||||
Geir Helland.
|
||||
* fr.po: Updated French translation by
|
||||
Jean-Philippe Guérard.
|
||||
|
||||
2004-11-18 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by
|
||||
Jean-Philippe Guérard.
|
||||
|
||||
2004-11-18 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ms.po: Updated Malay translation by
|
||||
Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2004-10-07 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* eu.po: Updated Basque translation by
|
||||
Mikel Olasagasti.
|
||||
|
||||
2004-08-31 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* es.po: Updated Spanish translation by
|
||||
Ricardo Javier Cárdenes Medina.
|
||||
|
||||
2004-08-31 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated Catalan translation by
|
||||
Jean-Philippe Guérard.
|
||||
|
||||
2004-08-27 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
* de.po: Updated German translation by Michael Piefel.
|
||||
|
||||
2004-06-01 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* zh_TW.po: Added Traditional Chinese translation by
|
||||
CHAO Wei-Lun <chaoweilun@pcmail.com.tw>.
|
||||
* LINGUAS: Added "zh_TW".
|
||||
|
||||
2004-02-24 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ms.po: Updated Malay translation by Sharuzzaman Ahmat Raslan.
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# List of available languages.
|
||||
ca cs da de es eu fi fr gl hu id it ms nb nl nn pl pt_BR ro ru sr sv tr uk
|
||||
ca cs da de es eu fi fr gl hu id it ms nb nl nn pl pt_BR ro ru rw sr sv tr uk vi zh_TW
|
||||
|
||||
@@ -1,17 +1,10 @@
|
||||
# $Id$
|
||||
# List of source files containing translatable strings.
|
||||
|
||||
# Package source files
|
||||
src/cut.c
|
||||
src/files.c
|
||||
src/global.c
|
||||
src/move.c
|
||||
src/nano.c
|
||||
src/rcfile.c
|
||||
src/search.c
|
||||
src/utils.c
|
||||
src/winio.c
|
||||
|
||||
# Package header files
|
||||
src/nano.h
|
||||
src/proto.h
|
||||
|
||||
2463
po/pt_BR.po
2463
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
15
po/update.pl
15
po/update.pl
@@ -5,19 +5,20 @@
|
||||
#
|
||||
# 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 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
|
||||
# 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.
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
|
||||
# USA.
|
||||
#
|
||||
# Authors: Kenneth Christiansen <kenneth@gnu.org>
|
||||
#
|
||||
|
||||
1548
po/zh_TW.po
Normal file
1548
po/zh_TW.po
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,11 @@
|
||||
|
||||
DEFS= -DSYSCONFDIR=\"$(sysconfdir)\"
|
||||
localedir = $(datadir)/locale
|
||||
INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\" -I@includedir@
|
||||
INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\" -DSYSCONFDIR=\"$(sysconfdir)\"
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
bin_PROGRAMS = nano
|
||||
nano_SOURCES = color.c \
|
||||
nano_SOURCES = chars.c \
|
||||
color.c \
|
||||
cut.c \
|
||||
files.c \
|
||||
global.c \
|
||||
@@ -20,3 +19,6 @@ nano_SOURCES = color.c \
|
||||
winio.c
|
||||
|
||||
nano_LDADD = @GLIB_LIBS@ @LIBINTL@
|
||||
|
||||
install-exec-hook:
|
||||
cd $(DESTDIR)$(bindir) && rm -f rnano && $(LN_S) nano rnano
|
||||
|
||||
863
src/chars.c
Normal file
863
src/chars.c
Normal file
@@ -0,0 +1,863 @@
|
||||
/* $Id$ */
|
||||
/**************************************************************************
|
||||
* chars.c *
|
||||
* *
|
||||
* Copyright (C) 2005 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., 51 Franklin St, Fifth Floor, Boston, MA *
|
||||
* 02110-1301, USA. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <assert.h>
|
||||
#include "proto.h"
|
||||
|
||||
#ifdef NANO_WIDE
|
||||
#ifdef HAVE_WCHAR_H
|
||||
#include <wchar.h>
|
||||
#endif
|
||||
#ifdef HAVE_WCTYPE_H
|
||||
#include <wctype.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_ISBLANK
|
||||
/* This function is equivalent to isblank(). */
|
||||
bool nisblank(int c)
|
||||
{
|
||||
return isspace(c) && (c == '\t' || !is_cntrl_char(c));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_ISWBLANK) && defined(NANO_WIDE)
|
||||
/* This function is equivalent to iswblank(). */
|
||||
bool niswblank(wchar_t wc)
|
||||
{
|
||||
return iswspace(wc) && (wc == '\t' || !is_cntrl_wchar(wc));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Return TRUE if the value of c is in byte range, and FALSE
|
||||
* otherwise. */
|
||||
bool is_byte(int c)
|
||||
{
|
||||
return ((unsigned int)c == (unsigned char)c);
|
||||
}
|
||||
|
||||
/* This function is equivalent to isalnum() for multibyte characters. */
|
||||
bool is_alnum_mbchar(const char *c)
|
||||
{
|
||||
assert(c != NULL);
|
||||
|
||||
#ifdef NANO_WIDE
|
||||
if (ISSET(USE_UTF8)) {
|
||||
wchar_t wc;
|
||||
int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX);
|
||||
|
||||
if (c_mb_len <= 0) {
|
||||
mbtowc(NULL, NULL, 0);
|
||||
wc = (unsigned char)*c;
|
||||
}
|
||||
|
||||
return iswalnum(wc);
|
||||
} else
|
||||
#endif
|
||||
return isalnum((unsigned char)*c);
|
||||
}
|
||||
|
||||
/* This function is equivalent to isblank() for multibyte characters. */
|
||||
bool is_blank_mbchar(const char *c)
|
||||
{
|
||||
assert(c != NULL);
|
||||
|
||||
#ifdef NANO_WIDE
|
||||
if (ISSET(USE_UTF8)) {
|
||||
wchar_t wc;
|
||||
int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX);
|
||||
|
||||
if (c_mb_len <= 0) {
|
||||
mbtowc(NULL, NULL, 0);
|
||||
wc = (unsigned char)*c;
|
||||
}
|
||||
|
||||
return iswblank(wc);
|
||||
} else
|
||||
#endif
|
||||
return isblank((unsigned char)*c);
|
||||
}
|
||||
|
||||
/* This function is equivalent to iscntrl(), except in that it also
|
||||
* handles control characters with their high bits set. */
|
||||
bool is_cntrl_char(int c)
|
||||
{
|
||||
return (-128 <= c && c < -96) || (0 <= c && c < 32) ||
|
||||
(127 <= c && c < 160);
|
||||
}
|
||||
|
||||
#ifdef NANO_WIDE
|
||||
/* This function is equivalent to iscntrl() for wide characters, except
|
||||
* in that it also handles wide control characters with their high bits
|
||||
* set. */
|
||||
bool is_cntrl_wchar(wchar_t wc)
|
||||
{
|
||||
return (0 <= wc && wc < 32) || (127 <= wc && wc < 160);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* This function is equivalent to iscntrl() for multibyte characters,
|
||||
* except in that it also handles multibyte control characters with
|
||||
* their high bits set. */
|
||||
bool is_cntrl_mbchar(const char *c)
|
||||
{
|
||||
assert(c != NULL);
|
||||
|
||||
#ifdef NANO_WIDE
|
||||
if (ISSET(USE_UTF8)) {
|
||||
wchar_t wc;
|
||||
int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX);
|
||||
|
||||
if (c_mb_len <= 0) {
|
||||
mbtowc(NULL, NULL, 0);
|
||||
wc = (unsigned char)*c;
|
||||
}
|
||||
|
||||
return is_cntrl_wchar(wc);
|
||||
} else
|
||||
#endif
|
||||
return is_cntrl_char((unsigned char)*c);
|
||||
}
|
||||
|
||||
/* This function is equivalent to ispunct() for multibyte characters. */
|
||||
bool is_punct_mbchar(const char *c)
|
||||
{
|
||||
assert(c != NULL);
|
||||
|
||||
#ifdef NANO_WIDE
|
||||
if (ISSET(USE_UTF8)) {
|
||||
wchar_t wc;
|
||||
int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX);
|
||||
|
||||
if (c_mb_len <= 0) {
|
||||
mbtowc(NULL, NULL, 0);
|
||||
wc = (unsigned char)*c;
|
||||
}
|
||||
|
||||
return iswpunct(wc);
|
||||
} else
|
||||
#endif
|
||||
return ispunct((unsigned char)*c);
|
||||
}
|
||||
|
||||
/* Return TRUE for a multibyte character found in a word (currently only
|
||||
* an alphanumeric or punctuation character, and only the latter if
|
||||
* allow_punct is TRUE) and FALSE otherwise. */
|
||||
bool is_word_mbchar(const char *c, bool allow_punct)
|
||||
{
|
||||
assert(c != NULL);
|
||||
|
||||
return is_alnum_mbchar(c) || (allow_punct ? is_punct_mbchar(c) :
|
||||
FALSE);
|
||||
}
|
||||
|
||||
/* c is a control character. It displays as ^@, ^?, or ^[ch], where ch
|
||||
* is c + 64. We return that character. */
|
||||
char control_rep(char c)
|
||||
{
|
||||
/* Treat newlines embedded in a line as encoded nulls. */
|
||||
if (c == '\n')
|
||||
return '@';
|
||||
else if (c == NANO_CONTROL_8)
|
||||
return '?';
|
||||
else
|
||||
return c + 64;
|
||||
}
|
||||
|
||||
#ifdef NANO_WIDE
|
||||
/* c is a wide control character. It displays as ^@, ^?, or ^[ch],
|
||||
* where ch is c + 64. We return that wide character. */
|
||||
wchar_t control_wrep(wchar_t wc)
|
||||
{
|
||||
/* Treat newlines embedded in a line as encoded nulls. */
|
||||
if (wc == '\n')
|
||||
return '@';
|
||||
else if (wc == NANO_CONTROL_8)
|
||||
return '?';
|
||||
else
|
||||
return wc + 64;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* c is a multibyte control character. It displays as ^@, ^?, or ^[ch],
|
||||
* where ch is c + 64. We return that multibyte character. */
|
||||
char *control_mbrep(const char *c, char *crep, int *crep_len)
|
||||
{
|
||||
assert(c != NULL && crep != NULL && crep_len != NULL);
|
||||
|
||||
#ifdef NANO_WIDE
|
||||
if (ISSET(USE_UTF8)) {
|
||||
wchar_t wc;
|
||||
|
||||
if (mbtowc(&wc, c, MB_CUR_MAX) <= 0) {
|
||||
mbtowc(NULL, NULL, 0);
|
||||
wc = (unsigned char)*c;
|
||||
}
|
||||
|
||||
*crep_len = wctomb(crep, control_wrep(wc));
|
||||
|
||||
if (*crep_len <= 0) {
|
||||
wctomb(NULL, 0);
|
||||
*crep_len = 0;
|
||||
}
|
||||
} else {
|
||||
#endif
|
||||
*crep_len = 1;
|
||||
*crep = control_rep(*c);
|
||||
#ifdef NANO_WIDE
|
||||
}
|
||||
#endif
|
||||
|
||||
return crep;
|
||||
}
|
||||
|
||||
/* This function is equivalent to wcwidth() for multibyte characters. */
|
||||
int mbwidth(const char *c)
|
||||
{
|
||||
assert(c != NULL);
|
||||
|
||||
#ifdef NANO_WIDE
|
||||
if (ISSET(USE_UTF8)) {
|
||||
wchar_t wc;
|
||||
int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX), width;
|
||||
|
||||
if (c_mb_len <= 0) {
|
||||
mbtowc(NULL, NULL, 0);
|
||||
wc = (unsigned char)*c;
|
||||
}
|
||||
|
||||
width = wcwidth(wc);
|
||||
|
||||
if (width == -1)
|
||||
width++;
|
||||
|
||||
return width;
|
||||
} else
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Return the maximum width in bytes of a multibyte character. */
|
||||
int mb_cur_max(void)
|
||||
{
|
||||
return
|
||||
#ifdef NANO_WIDE
|
||||
ISSET(USE_UTF8) ? MB_CUR_MAX :
|
||||
#endif
|
||||
1;
|
||||
}
|
||||
|
||||
/* Convert the value in chr to a multibyte character with the same
|
||||
* wide character value as chr, if possible. If the conversion
|
||||
* succeeds, return the (dynamically allocated) multibyte character and
|
||||
* its length. Otherwise, return an undefined (dynamically allocated)
|
||||
* multibyte character and a length of zero. */
|
||||
char *make_mbchar(int chr, int *chr_mb_len)
|
||||
{
|
||||
char *chr_mb;
|
||||
|
||||
assert(chr_mb_len != NULL);
|
||||
|
||||
#ifdef NANO_WIDE
|
||||
if (ISSET(USE_UTF8)) {
|
||||
chr_mb = charalloc(MB_CUR_MAX);
|
||||
*chr_mb_len = wctomb(chr_mb, chr);
|
||||
|
||||
if (*chr_mb_len <= 0) {
|
||||
wctomb(NULL, 0);
|
||||
*chr_mb_len = 0;
|
||||
}
|
||||
} else {
|
||||
#endif
|
||||
*chr_mb_len = 1;
|
||||
chr_mb = mallocstrncpy(NULL, (char *)&chr, 1);
|
||||
#ifdef NANO_WIDE
|
||||
}
|
||||
#endif
|
||||
|
||||
return chr_mb;
|
||||
}
|
||||
|
||||
/* Parse a multibyte character from buf. Return the number of bytes
|
||||
* used. If chr isn't NULL, store the multibyte character in it. If
|
||||
* bad_chr isn't NULL, set it to TRUE if we have a bad multibyte
|
||||
* character. If col isn't NULL, store the new display width in it. If
|
||||
* *str is '\t', we expect col to have the current display width. */
|
||||
int parse_mbchar(const char *buf, char *chr, bool *bad_chr, size_t
|
||||
*col)
|
||||
{
|
||||
int buf_mb_len;
|
||||
|
||||
assert(buf != NULL);
|
||||
|
||||
if (bad_chr != NULL)
|
||||
*bad_chr = FALSE;
|
||||
|
||||
#ifdef NANO_WIDE
|
||||
if (ISSET(USE_UTF8)) {
|
||||
/* Get the number of bytes in the multibyte character. */
|
||||
buf_mb_len = mblen(buf, MB_CUR_MAX);
|
||||
|
||||
/* If buf contains a null byte or an invalid multibyte
|
||||
* character, set bad_chr to TRUE (if it contains the latter)
|
||||
* and interpret buf's first byte. */
|
||||
if (buf_mb_len <= 0) {
|
||||
mblen(NULL, 0);
|
||||
if (buf_mb_len < 0 && bad_chr != NULL)
|
||||
*bad_chr = TRUE;
|
||||
buf_mb_len = 1;
|
||||
}
|
||||
|
||||
/* Save the multibyte character in chr. */
|
||||
if (chr != NULL) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < buf_mb_len; i++)
|
||||
chr[i] = buf[i];
|
||||
}
|
||||
|
||||
/* Save the column width of the wide character in col. */
|
||||
if (col != NULL) {
|
||||
/* If we have a tab, get its width in columns using the
|
||||
* current value of col. */
|
||||
if (*buf == '\t')
|
||||
*col += tabsize - *col % tabsize;
|
||||
/* If we have a control character, get its width using one
|
||||
* column for the "^" that will be displayed in front of it,
|
||||
* and the width in columns of its visible equivalent as
|
||||
* returned by control_mbrep(). */
|
||||
else if (is_cntrl_mbchar(buf)) {
|
||||
char *ctrl_buf_mb = charalloc(MB_CUR_MAX);
|
||||
int ctrl_buf_mb_len;
|
||||
|
||||
(*col)++;
|
||||
|
||||
ctrl_buf_mb = control_mbrep(buf, ctrl_buf_mb,
|
||||
&ctrl_buf_mb_len);
|
||||
|
||||
*col += mbwidth(ctrl_buf_mb);
|
||||
|
||||
free(ctrl_buf_mb);
|
||||
/* If we have a normal character, get its width in columns
|
||||
* normally. */
|
||||
} else
|
||||
*col += mbwidth(buf);
|
||||
}
|
||||
} else {
|
||||
#endif
|
||||
/* Get the number of bytes in the byte character. */
|
||||
buf_mb_len = 1;
|
||||
|
||||
/* Save the byte character in chr. */
|
||||
if (chr != NULL)
|
||||
*chr = *buf;
|
||||
|
||||
if (col != NULL) {
|
||||
/* If we have a tab, get its width in columns using the
|
||||
* current value of col. */
|
||||
if (*buf == '\t')
|
||||
*col += tabsize - *col % tabsize;
|
||||
/* If we have a control character, it's two columns wide:
|
||||
* one column for the "^" that will be displayed in front of
|
||||
* it, and one column for its visible equivalent as returned
|
||||
* by control_mbrep(). */
|
||||
else if (is_cntrl_char((unsigned char)*buf))
|
||||
*col += 2;
|
||||
/* If we have a normal character, it's one column wide. */
|
||||
else
|
||||
(*col)++;
|
||||
}
|
||||
#ifdef NANO_WIDE
|
||||
}
|
||||
#endif
|
||||
|
||||
return buf_mb_len;
|
||||
}
|
||||
|
||||
/* Return the index in buf of the beginning of the multibyte character
|
||||
* before the one at pos. */
|
||||
size_t move_mbleft(const char *buf, size_t pos)
|
||||
{
|
||||
size_t pos_prev = pos;
|
||||
|
||||
assert(buf != NULL && pos <= strlen(buf));
|
||||
|
||||
/* There is no library function to move backward one multibyte
|
||||
* character. Here is the naive, O(pos) way to do it. */
|
||||
while (TRUE) {
|
||||
int buf_mb_len = parse_mbchar(buf + pos - pos_prev, NULL, NULL,
|
||||
NULL);
|
||||
|
||||
if (pos_prev <= (size_t)buf_mb_len)
|
||||
break;
|
||||
|
||||
pos_prev -= buf_mb_len;
|
||||
}
|
||||
|
||||
return pos - pos_prev;
|
||||
}
|
||||
|
||||
/* Return the index in buf of the beginning of the multibyte character
|
||||
* after the one at pos. */
|
||||
size_t move_mbright(const char *buf, size_t pos)
|
||||
{
|
||||
return pos + parse_mbchar(buf + pos, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
#ifndef HAVE_STRCASECMP
|
||||
/* This function is equivalent to strcasecmp(). */
|
||||
int nstrcasecmp(const char *s1, const char *s2)
|
||||
{
|
||||
return strncasecmp(s1, s2, (size_t)-1);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* This function is equivalent to strcasecmp() for multibyte strings. */
|
||||
int mbstrcasecmp(const char *s1, const char *s2)
|
||||
{
|
||||
return mbstrncasecmp(s1, s2, (size_t)-1);
|
||||
}
|
||||
|
||||
#ifndef HAVE_STRNCASECMP
|
||||
/* This function is equivalent to strncasecmp(). */
|
||||
int nstrncasecmp(const char *s1, const char *s2, size_t n)
|
||||
{
|
||||
assert(s1 != NULL && s2 != NULL);
|
||||
|
||||
for (; n > 0 && *s1 != '\0' && *s2 != '\0'; n--, s1++, s2++) {
|
||||
if (tolower(*s1) != tolower(*s2))
|
||||
break;
|
||||
}
|
||||
|
||||
if (n > 0)
|
||||
return tolower(*s1) - tolower(*s2);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* This function is equivalent to strncasecmp() for multibyte
|
||||
* strings. */
|
||||
int mbstrncasecmp(const char *s1, const char *s2, size_t n)
|
||||
{
|
||||
#ifdef NANO_WIDE
|
||||
if (ISSET(USE_UTF8)) {
|
||||
char *s1_mb = charalloc(MB_CUR_MAX);
|
||||
char *s2_mb = charalloc(MB_CUR_MAX);
|
||||
wchar_t ws1, ws2;
|
||||
|
||||
assert(s1 != NULL && s2 != NULL);
|
||||
|
||||
while (n > 0 && *s1 != '\0' && *s2 != '\0') {
|
||||
bool bad_s1_mb = FALSE, bad_s2_mb = FALSE;
|
||||
int s1_mb_len, s2_mb_len;
|
||||
|
||||
s1_mb_len = parse_mbchar(s1, s1_mb, NULL, NULL);
|
||||
|
||||
if (mbtowc(&ws1, s1_mb, s1_mb_len) <= 0) {
|
||||
mbtowc(NULL, NULL, 0);
|
||||
ws1 = (unsigned char)*s1_mb;
|
||||
bad_s1_mb = TRUE;
|
||||
}
|
||||
|
||||
s2_mb_len = parse_mbchar(s2, s2_mb, NULL, NULL);
|
||||
|
||||
if (mbtowc(&ws2, s2_mb, s2_mb_len) <= 0) {
|
||||
mbtowc(NULL, NULL, 0);
|
||||
ws2 = (unsigned char)*s2_mb;
|
||||
bad_s2_mb = TRUE;
|
||||
}
|
||||
|
||||
if (n == 0 || bad_s1_mb != bad_s2_mb ||
|
||||
towlower(ws1) != towlower(ws2))
|
||||
break;
|
||||
|
||||
s1 += s1_mb_len;
|
||||
s2 += s2_mb_len;
|
||||
n--;
|
||||
}
|
||||
|
||||
free(s1_mb);
|
||||
free(s2_mb);
|
||||
|
||||
return towlower(ws1) - towlower(ws2);
|
||||
} else
|
||||
#endif
|
||||
return strncasecmp(s1, s2, n);
|
||||
}
|
||||
|
||||
#ifndef HAVE_STRCASESTR
|
||||
/* This function is equivalent to strcasestr(). It was adapted from
|
||||
* mutt's mutt_stristr() function. */
|
||||
const char *nstrcasestr(const char *haystack, const char *needle)
|
||||
{
|
||||
assert(haystack != NULL && needle != NULL);
|
||||
|
||||
for (; *haystack != '\0'; haystack++) {
|
||||
const char *r = haystack, *q = needle;
|
||||
|
||||
for (; tolower(*r) == tolower(*q) && *q != '\0'; r++, q++)
|
||||
;
|
||||
|
||||
if (*q == '\0')
|
||||
return haystack;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* This function is equivalent to strcasestr() for multibyte strings. */
|
||||
const char *mbstrcasestr(const char *haystack, const char *needle)
|
||||
{
|
||||
#ifdef NANO_WIDE
|
||||
if (ISSET(USE_UTF8)) {
|
||||
char *r_mb = charalloc(MB_CUR_MAX);
|
||||
char *q_mb = charalloc(MB_CUR_MAX);
|
||||
wchar_t wr, wq;
|
||||
bool found_needle = FALSE;
|
||||
|
||||
assert(haystack != NULL && needle != NULL);
|
||||
|
||||
while (*haystack != '\0') {
|
||||
const char *r = haystack, *q = needle;
|
||||
int r_mb_len, q_mb_len;
|
||||
|
||||
while (*q != '\0') {
|
||||
bool bad_r_mb = FALSE, bad_q_mb = FALSE;
|
||||
|
||||
r_mb_len = parse_mbchar(r, r_mb, NULL, NULL);
|
||||
|
||||
if (mbtowc(&wr, r_mb, r_mb_len) <= 0) {
|
||||
mbtowc(NULL, NULL, 0);
|
||||
wr = (unsigned char)*r;
|
||||
bad_r_mb = TRUE;
|
||||
}
|
||||
|
||||
q_mb_len = parse_mbchar(q, q_mb, NULL, NULL);
|
||||
|
||||
if (mbtowc(&wq, q_mb, q_mb_len) <= 0) {
|
||||
mbtowc(NULL, NULL, 0);
|
||||
wq = (unsigned char)*q;
|
||||
bad_q_mb = TRUE;
|
||||
}
|
||||
|
||||
if (bad_r_mb != bad_q_mb ||
|
||||
towlower(wr) != towlower(wq))
|
||||
break;
|
||||
|
||||
r += r_mb_len;
|
||||
q += q_mb_len;
|
||||
}
|
||||
|
||||
if (*q == '\0') {
|
||||
found_needle = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
haystack += move_mbright(haystack, 0);
|
||||
}
|
||||
|
||||
free(r_mb);
|
||||
free(q_mb);
|
||||
|
||||
return found_needle ? haystack : NULL;
|
||||
} else
|
||||
#endif
|
||||
return strcasestr(haystack, needle);
|
||||
}
|
||||
|
||||
#if !defined(NANO_SMALL) || !defined(DISABLE_TABCOMP)
|
||||
/* This function is equivalent to strstr(), except in that it scans the
|
||||
* string in reverse, starting at rev_start. */
|
||||
const char *revstrstr(const char *haystack, const char *needle, const
|
||||
char *rev_start)
|
||||
{
|
||||
assert(haystack != NULL && needle != NULL && rev_start != NULL);
|
||||
|
||||
for (; rev_start >= haystack; rev_start--) {
|
||||
const char *r, *q;
|
||||
|
||||
for (r = rev_start, q = needle; *r == *q && *q != '\0'; r++, q++)
|
||||
;
|
||||
|
||||
if (*q == '\0')
|
||||
return rev_start;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif /* !NANO_SMALL || !DISABLE_TABCOMP */
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
/* This function is equivalent to strcasestr(), except in that it scans
|
||||
* the string in reverse, starting at rev_start. */
|
||||
const char *revstrcasestr(const char *haystack, const char *needle,
|
||||
const char *rev_start)
|
||||
{
|
||||
assert(haystack != NULL && needle != NULL && rev_start != NULL);
|
||||
|
||||
for (; rev_start >= haystack; rev_start--) {
|
||||
const char *r = rev_start, *q = needle;
|
||||
|
||||
for (; tolower(*r) == tolower(*q) && *q != '\0'; r++, q++)
|
||||
;
|
||||
|
||||
if (*q == '\0')
|
||||
return rev_start;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* This function is equivalent to strcasestr() for multibyte strings,
|
||||
* except in that it scans the string in reverse, starting at
|
||||
* rev_start. */
|
||||
const char *mbrevstrcasestr(const char *haystack, const char *needle,
|
||||
const char *rev_start)
|
||||
{
|
||||
#ifdef NANO_WIDE
|
||||
if (ISSET(USE_UTF8)) {
|
||||
char *r_mb = charalloc(MB_CUR_MAX);
|
||||
char *q_mb = charalloc(MB_CUR_MAX);
|
||||
wchar_t wr, wq;
|
||||
bool begin_line = FALSE, found_needle = FALSE;
|
||||
|
||||
assert(haystack != NULL && needle != NULL && rev_start != NULL);
|
||||
|
||||
while (!begin_line) {
|
||||
const char *r = rev_start, *q = needle;
|
||||
int r_mb_len, q_mb_len;
|
||||
|
||||
while (*q != '\0') {
|
||||
bool bad_r_mb = FALSE, bad_q_mb = FALSE;
|
||||
|
||||
r_mb_len = parse_mbchar(r, r_mb, NULL, NULL);
|
||||
|
||||
if (mbtowc(&wr, r_mb, r_mb_len) <= 0) {
|
||||
mbtowc(NULL, NULL, 0);
|
||||
wr = (unsigned char)*r;
|
||||
bad_r_mb = TRUE;
|
||||
}
|
||||
|
||||
q_mb_len = parse_mbchar(q, q_mb, NULL, NULL);
|
||||
|
||||
if (mbtowc(&wq, q_mb, q_mb_len) <= 0) {
|
||||
mbtowc(NULL, NULL, 0);
|
||||
wq = (unsigned char)*q;
|
||||
bad_q_mb = TRUE;
|
||||
}
|
||||
|
||||
if (bad_r_mb != bad_q_mb ||
|
||||
towlower(wr) != towlower(wq))
|
||||
break;
|
||||
|
||||
r += r_mb_len;
|
||||
q += q_mb_len;
|
||||
}
|
||||
|
||||
if (*q == '\0') {
|
||||
found_needle = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
if (rev_start == haystack)
|
||||
begin_line = TRUE;
|
||||
else
|
||||
rev_start = haystack + move_mbleft(haystack, rev_start -
|
||||
haystack);
|
||||
}
|
||||
|
||||
free(r_mb);
|
||||
free(q_mb);
|
||||
|
||||
return found_needle ? rev_start : NULL;
|
||||
} else
|
||||
#endif
|
||||
return revstrcasestr(haystack, needle, rev_start);
|
||||
}
|
||||
#endif /* !NANO_SMALL */
|
||||
|
||||
/* This function is equivalent to strlen() for multibyte strings. */
|
||||
size_t mbstrlen(const char *s)
|
||||
{
|
||||
return mbstrnlen(s, (size_t)-1);
|
||||
}
|
||||
|
||||
#ifndef HAVE_STRNLEN
|
||||
/* This function is equivalent to strnlen(). */
|
||||
size_t nstrnlen(const char *s, size_t maxlen)
|
||||
{
|
||||
size_t n = 0;
|
||||
|
||||
assert(s != NULL);
|
||||
|
||||
for (; maxlen > 0 && *s != '\0'; maxlen--, n++, s++)
|
||||
;
|
||||
|
||||
return n;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* This function is equivalent to strnlen() for multibyte strings. */
|
||||
size_t mbstrnlen(const char *s, size_t maxlen)
|
||||
{
|
||||
assert(s != NULL);
|
||||
|
||||
#ifdef NANO_WIDE
|
||||
if (ISSET(USE_UTF8)) {
|
||||
size_t n = 0;
|
||||
int s_mb_len;
|
||||
|
||||
while (*s != '\0') {
|
||||
s_mb_len = parse_mbchar(s, NULL, NULL, NULL);
|
||||
|
||||
if (maxlen == 0)
|
||||
break;
|
||||
|
||||
maxlen--;
|
||||
s += s_mb_len;
|
||||
n++;
|
||||
}
|
||||
|
||||
return n;
|
||||
} else
|
||||
#endif
|
||||
return strnlen(s, maxlen);
|
||||
}
|
||||
|
||||
#ifndef DISABLE_JUSTIFY
|
||||
#ifdef ENABLE_NANORC
|
||||
/* Return TRUE if the string s contains one or more blank characters,
|
||||
* and FALSE otherwise. */
|
||||
bool has_blank_chars(const char *s)
|
||||
{
|
||||
assert(s != NULL);
|
||||
|
||||
for (; *s != '\0'; s++) {
|
||||
if (isblank(*s))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Return TRUE if the multibyte string s contains one or more blank
|
||||
* multibyte characters, and FALSE otherwise. */
|
||||
bool has_blank_mbchars(const char *s)
|
||||
{
|
||||
assert(s != NULL);
|
||||
|
||||
#ifdef NANO_WIDE
|
||||
if (ISSET(USE_UTF8)) {
|
||||
char *chr_mb = charalloc(MB_CUR_MAX);
|
||||
bool retval = FALSE;
|
||||
|
||||
while (*s != '\0') {
|
||||
int chr_mb_len;
|
||||
|
||||
chr_mb_len = parse_mbchar(s, chr_mb, NULL, NULL);
|
||||
|
||||
if (is_blank_mbchar(chr_mb)) {
|
||||
retval = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
s += chr_mb_len;
|
||||
}
|
||||
|
||||
free(chr_mb);
|
||||
|
||||
return retval;
|
||||
} else
|
||||
#endif
|
||||
return has_blank_chars(s);
|
||||
}
|
||||
#endif /* ENABLE_NANORC */
|
||||
|
||||
/* This function is equivalent to strchr() for multibyte strings. */
|
||||
char *mbstrchr(const char *s, char *c)
|
||||
{
|
||||
assert(s != NULL && c != NULL);
|
||||
|
||||
#ifdef NANO_WIDE
|
||||
if (ISSET(USE_UTF8)) {
|
||||
char *s_mb = charalloc(MB_CUR_MAX);
|
||||
const char *q = s;
|
||||
wchar_t ws, wc;
|
||||
int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX);
|
||||
|
||||
if (c_mb_len <= 0) {
|
||||
mbtowc(NULL, NULL, 0);
|
||||
wc = (unsigned char)*c;
|
||||
}
|
||||
|
||||
while (*s != '\0') {
|
||||
int s_mb_len = parse_mbchar(s, s_mb, NULL, NULL);
|
||||
|
||||
if (mbtowc(&ws, s_mb, s_mb_len) <= 0) {
|
||||
mbtowc(NULL, NULL, 0);
|
||||
ws = (unsigned char)*s;
|
||||
}
|
||||
|
||||
if (ws == wc)
|
||||
break;
|
||||
|
||||
s += s_mb_len;
|
||||
q += s_mb_len;
|
||||
}
|
||||
|
||||
free(s_mb);
|
||||
|
||||
if (ws != wc)
|
||||
q = NULL;
|
||||
|
||||
return (char *)q;
|
||||
} else
|
||||
#endif
|
||||
return strchr(s, *c);
|
||||
}
|
||||
#endif /* !DISABLE_JUSTIFY */
|
||||
|
||||
#ifdef ENABLE_NANORC
|
||||
/* Check if the string s is a valid multibyte string. Return TRUE if it
|
||||
* is, and FALSE otherwise. */
|
||||
bool is_valid_mbstring(const char *s)
|
||||
{
|
||||
assert(s != NULL);
|
||||
|
||||
return
|
||||
#ifdef NANO_WIDE
|
||||
ISSET(USE_UTF8) ?
|
||||
(mbstowcs(NULL, s, 0) != (size_t)-1) :
|
||||
#endif
|
||||
|
||||
TRUE;
|
||||
}
|
||||
#endif /* ENABLE_NANORC */
|
||||
55
src/color.c
55
src/color.c
@@ -2,34 +2,34 @@
|
||||
/**************************************************************************
|
||||
* color.c *
|
||||
* *
|
||||
* Copyright (C) 1999-2004 Chris Allegretta *
|
||||
* Copyright (C) 1999-2005 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. *
|
||||
* 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. *
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
|
||||
* 02110-1301, USA. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#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"
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
|
||||
@@ -46,14 +46,14 @@ void set_colorpairs(void)
|
||||
for (; this_color != NULL; this_color = this_color->next) {
|
||||
const colortype *beforenow = this_syntax->color;
|
||||
|
||||
for (; beforenow != NULL && beforenow != this_color &&
|
||||
(beforenow->fg != this_color->fg ||
|
||||
beforenow->bg != this_color->bg ||
|
||||
beforenow->bright != this_color->bright);
|
||||
beforenow = beforenow->next)
|
||||
for (; beforenow != this_color &&
|
||||
(beforenow->fg != this_color->fg ||
|
||||
beforenow->bg != this_color->bg ||
|
||||
beforenow->bright != this_color->bright);
|
||||
beforenow = beforenow->next)
|
||||
;
|
||||
|
||||
if (beforenow != NULL && beforenow != this_color)
|
||||
if (beforenow != this_color)
|
||||
this_color->pairnum = beforenow->pairnum;
|
||||
else {
|
||||
this_color->pairnum = color_pair;
|
||||
@@ -68,14 +68,14 @@ void do_colorinit(void)
|
||||
if (has_colors()) {
|
||||
const colortype *tmpcolor = NULL;
|
||||
#ifdef HAVE_USE_DEFAULT_COLORS
|
||||
int defok;
|
||||
bool defok;
|
||||
#endif
|
||||
|
||||
start_color();
|
||||
/* Add in colors, if available */
|
||||
|
||||
/* Add in colors, if available. */
|
||||
#ifdef HAVE_USE_DEFAULT_COLORS
|
||||
defok = use_default_colors() != ERR;
|
||||
defok = (use_default_colors() != ERR);
|
||||
#endif
|
||||
|
||||
for (tmpcolor = colorstrings; tmpcolor != NULL;
|
||||
@@ -91,8 +91,8 @@ void do_colorinit(void)
|
||||
init_pair(tmpcolor->pairnum, tmpcolor->fg, background);
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "Running %s with fg = %d and bg = %d\n",
|
||||
"init_pair()", tmpcolor->fg, tmpcolor->bg);
|
||||
fprintf(stderr, "init_pair(): fg = %d, bg = %d\n",
|
||||
tmpcolor->fg, tmpcolor->bg);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -104,11 +104,12 @@ void update_color(void)
|
||||
const syntaxtype *tmpsyntax;
|
||||
|
||||
colorstrings = NULL;
|
||||
for (tmpsyntax = syntaxes; tmpsyntax != NULL; tmpsyntax = tmpsyntax->next) {
|
||||
for (tmpsyntax = syntaxes; tmpsyntax != NULL;
|
||||
tmpsyntax = tmpsyntax->next) {
|
||||
const exttype *e;
|
||||
|
||||
for (e = tmpsyntax->extensions; e != NULL; e = e->next) {
|
||||
/* Set colorstrings if we matched the extension regex */
|
||||
/* Set colorstrings if we matched the extension regex. */
|
||||
if (regexec(&e->val, filename, 0, NULL, 0) == 0)
|
||||
colorstrings = tmpsyntax->color;
|
||||
|
||||
@@ -117,11 +118,11 @@ void update_color(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* if we haven't found a match, use the override string */
|
||||
/* If we haven't found a match, use the override string. */
|
||||
if (colorstrings == NULL && syntaxstr != NULL) {
|
||||
for (tmpsyntax = syntaxes; tmpsyntax != NULL;
|
||||
tmpsyntax = tmpsyntax->next) {
|
||||
if (!strcasecmp(tmpsyntax->desc, syntaxstr))
|
||||
for (tmpsyntax = syntaxes; tmpsyntax != NULL;
|
||||
tmpsyntax = tmpsyntax->next) {
|
||||
if (mbstrcasecmp(tmpsyntax->desc, syntaxstr) == 0)
|
||||
colorstrings = tmpsyntax->color;
|
||||
}
|
||||
}
|
||||
|
||||
507
src/cut.c
507
src/cut.c
@@ -2,466 +2,193 @@
|
||||
/**************************************************************************
|
||||
* cut.c *
|
||||
* *
|
||||
* Copyright (C) 1999-2004 Chris Allegretta *
|
||||
* Copyright (C) 1999-2005 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. *
|
||||
* 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. *
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
|
||||
* 02110-1301, USA. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include "proto.h"
|
||||
#include "nano.h"
|
||||
|
||||
static int marked_cut; /* Is the cutbuffer from a mark?
|
||||
* 0 means whole-line cut, 1 means mark,
|
||||
* 2 means cut-from-cursor. */
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
static int concatenate_cut; /* Should we add this cut string to the
|
||||
* end of the last one? */
|
||||
#endif
|
||||
|
||||
static bool keep_cutbuffer = FALSE;
|
||||
/* Should we keep the contents of the cutbuffer? */
|
||||
static filestruct *cutbottom = NULL;
|
||||
/* Pointer to end of cutbuffer. */
|
||||
/* Pointer to end of cutbuffer. */
|
||||
|
||||
filestruct *get_cutbottom(void)
|
||||
void cutbuffer_reset(void)
|
||||
{
|
||||
return cutbottom;
|
||||
keep_cutbuffer = FALSE;
|
||||
}
|
||||
|
||||
void add_to_cutbuffer(filestruct *inptr, int allow_concat)
|
||||
/* If we're not on the magicline, move all the text of the current line,
|
||||
* plus the newline at the end, to the cutbuffer, and set the current
|
||||
* place we want to where the line used to start. */
|
||||
void cut_line(void)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "add_to_cutbuffer(): inptr->data = %s\n", inptr->data);
|
||||
#endif
|
||||
|
||||
if (cutbuffer == NULL)
|
||||
cutbuffer = inptr;
|
||||
#ifndef NANO_SMALL
|
||||
else if (allow_concat && concatenate_cut) {
|
||||
/* Just tack the text in inptr onto the text in cutbottom,
|
||||
* unless allow_concat is false. */
|
||||
cutbottom->data = charealloc(cutbottom->data,
|
||||
strlen(cutbottom->data) + strlen(inptr->data) + 1);
|
||||
strcat(cutbottom->data, inptr->data);
|
||||
return;
|
||||
if (current->next != NULL) {
|
||||
move_to_filestruct(&cutbuffer, &cutbottom, current, 0,
|
||||
current->next, 0);
|
||||
placewewant = xplustabs();
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
cutbottom->next = inptr;
|
||||
inptr->prev = cutbottom;
|
||||
}
|
||||
cutbottom = inptr;
|
||||
cutbottom->next = NULL;
|
||||
}
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
/* Cut a marked segment instead of a whole line.
|
||||
*
|
||||
* The first cut character is top->data[top_x]. Unless top == bot, the
|
||||
* last cut line has length bot_x. That is, if bot_x > 0 then we cut to
|
||||
* bot->data[bot_x - 1].
|
||||
*
|
||||
* We maintain totsize, totlines, filebot, the magicline, and line
|
||||
* numbers. Also, we set current and current_x so the cursor will be on
|
||||
* the first character after what was cut. We do not do any screen
|
||||
* updates.
|
||||
*
|
||||
* Note cutbuffer might not be NULL if cut to end is used. */
|
||||
void cut_marked_segment(void)
|
||||
/* Move all currently marked text to the cutbuffer, and set the current
|
||||
* place we want to where the text used to start. */
|
||||
void cut_marked(void)
|
||||
{
|
||||
filestruct *top;
|
||||
filestruct *bot;
|
||||
filestruct *tmp;
|
||||
size_t top_x;
|
||||
size_t bot_x;
|
||||
size_t newsize;
|
||||
filestruct *top, *bot;
|
||||
size_t top_x, bot_x;
|
||||
|
||||
/* If the mark doesn't cover any text, get out. */
|
||||
if (current == mark_beginbuf && current_x == mark_beginx)
|
||||
return;
|
||||
assert(current != NULL && mark_beginbuf != NULL);
|
||||
|
||||
/* Set up the top and bottom lines and coordinates of the marked
|
||||
* text. */
|
||||
mark_order((const filestruct **)&top, &top_x,
|
||||
(const filestruct **)&bot, &bot_x);
|
||||
(const filestruct **)&bot, &bot_x, NULL);
|
||||
|
||||
/* Make the first cut line manually. Move the cut part of the top
|
||||
* line into tmp, and set newsize to that partial line's length. */
|
||||
tmp = copy_node(top);
|
||||
newsize = (top == bot ? bot_x - top_x : strlen(top->data + top_x));
|
||||
charmove(tmp->data, tmp->data + top_x, newsize);
|
||||
null_at(&tmp->data, newsize);
|
||||
|
||||
/* Add the contents of tmp to the cutbuffer. Note that cutbuffer
|
||||
* might be non-NULL if we have cut to end enabled. */
|
||||
if (cutbuffer == NULL) {
|
||||
cutbuffer = tmp;
|
||||
cutbottom = tmp;
|
||||
} else {
|
||||
cutbottom->next = tmp;
|
||||
tmp->prev = cutbottom;
|
||||
cutbottom = tmp;
|
||||
}
|
||||
|
||||
/* And make the top remainder line manually too. Update current_x
|
||||
* and totlines to account for all the cut text, and update totsize
|
||||
* to account for the length of the cut part of the first line. */
|
||||
current_x = top_x;
|
||||
totsize -= newsize;
|
||||
totlines -= bot->lineno - top->lineno;
|
||||
|
||||
/* Now set newsize to be the length of the top remainder line plus
|
||||
* the bottom remainder line, plus one for the null terminator. */
|
||||
newsize = top_x + strlen(bot->data + bot_x) + 1;
|
||||
|
||||
if (top == bot) {
|
||||
/* In this case, we're only cutting one line or part of one
|
||||
* line, so the remainder line is shorter. This means that we
|
||||
* must move text from the end forward first. */
|
||||
charmove(top->data + top_x, bot->data + bot_x, newsize - top_x);
|
||||
top->data = charealloc(top->data, newsize);
|
||||
|
||||
cutbottom->next = NULL;
|
||||
#ifdef DEBUG
|
||||
dump_buffer(cutbuffer);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
/* Update totsize to account for the cut part of the last line. */
|
||||
totsize -= bot_x + 1;
|
||||
|
||||
/* Here, the top remainder line might get longer (if the bottom
|
||||
* remainder line is added to the end of it), so we realloc() it
|
||||
* first. */
|
||||
top->data = charealloc(top->data, newsize);
|
||||
charmove(top->data + top_x, bot->data + bot_x, newsize - top_x);
|
||||
|
||||
assert(cutbottom != NULL && cutbottom->next != NULL);
|
||||
/* We're cutting multiple lines, so in particular the next line is
|
||||
* cut too. */
|
||||
cutbottom->next->prev = cutbottom;
|
||||
|
||||
/* Update totsize to account for all the complete lines that have
|
||||
* been cut. After this, totsize is fully up to date. */
|
||||
for (tmp = top->next; tmp != bot; tmp = tmp->next)
|
||||
totsize -= strlen(tmp->data) + 1;
|
||||
|
||||
/* Make the last cut line manually. */
|
||||
null_at(&bot->data, bot_x);
|
||||
|
||||
/* Move the rest of the cut text (other than the cut part of the top
|
||||
* line) from the buffer to the end of the cutbuffer, and fix the
|
||||
* edit buffer to account for the cut text. */
|
||||
top->next = bot->next;
|
||||
cutbottom = bot;
|
||||
cutbottom->next = NULL;
|
||||
if (top->next != NULL)
|
||||
top->next->prev = top;
|
||||
renumber(top);
|
||||
current = top;
|
||||
|
||||
/* If the bottom line of the cut was the magicline, set filebot
|
||||
* properly, and add a new magicline if the top remainder line
|
||||
* (which is now the new bottom line) is non-blank. */
|
||||
if (bot == filebot) {
|
||||
filebot = top;
|
||||
assert(bot_x == 0);
|
||||
if (top_x > 0)
|
||||
new_magicline();
|
||||
}
|
||||
#ifdef DEBUG
|
||||
dump_buffer(cutbuffer);
|
||||
#endif
|
||||
move_to_filestruct(&cutbuffer, &cutbottom, top, top_x, bot, bot_x);
|
||||
placewewant = xplustabs();
|
||||
}
|
||||
#endif
|
||||
|
||||
int do_cut_text(void)
|
||||
/* If we're not at the end of the current line, move all the text from
|
||||
* the current cursor position to the end of the current line,
|
||||
* not counting the newline at the end, to the cutbuffer. If we are,
|
||||
* and we're not on the magicline, move the newline at the end to the
|
||||
* cutbuffer, and set the current place we want to where the newline
|
||||
* used to be. */
|
||||
void cut_to_eol(void)
|
||||
{
|
||||
filestruct *fileptr;
|
||||
size_t data_len = strlen(current->data);
|
||||
|
||||
assert(current_x <= data_len);
|
||||
|
||||
if (current_x < data_len)
|
||||
/* If we're not at the end of the line, move all the text from
|
||||
* the current position up to it, not counting the newline at
|
||||
* the end, to the cutbuffer. */
|
||||
move_to_filestruct(&cutbuffer, &cutbottom, current, current_x,
|
||||
current, data_len);
|
||||
else if (current->next != NULL) {
|
||||
/* If we're at the end of the line, and it isn't the magicline,
|
||||
* move all the text from the current position up to the
|
||||
* beginning of the next line, i.e, the newline at the end, to
|
||||
* the cutbuffer. */
|
||||
move_to_filestruct(&cutbuffer, &cutbottom, current, current_x,
|
||||
current->next, 0);
|
||||
placewewant = xplustabs();
|
||||
}
|
||||
}
|
||||
#endif /* !NANO_SMALL */
|
||||
|
||||
/* Move text from the current filestruct into the cutbuffer. */
|
||||
void do_cut_text(void)
|
||||
{
|
||||
assert(current != NULL && current->data != NULL);
|
||||
|
||||
check_statblank();
|
||||
check_statusblank();
|
||||
|
||||
if (!ISSET(KEEP_CUTBUFFER)) {
|
||||
/* If keep_cutbuffer is FALSE and the cutbuffer isn't empty, blow
|
||||
* away the text in the cutbuffer. */
|
||||
if (!keep_cutbuffer && cutbuffer != NULL) {
|
||||
free_filestruct(cutbuffer);
|
||||
cutbuffer = NULL;
|
||||
marked_cut = 0;
|
||||
#ifndef NANO_SMALL
|
||||
concatenate_cut = FALSE;
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "Blew away cutbuffer =)\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
/* You can't cut the magicline except with the mark. But trying
|
||||
* does clear the cutbuffer if KEEP_CUTBUFFER is not set. */
|
||||
if (current == filebot
|
||||
#ifndef NANO_SMALL
|
||||
&& !ISSET(MARK_ISSET)
|
||||
#endif
|
||||
)
|
||||
return 0;
|
||||
|
||||
SET(KEEP_CUTBUFFER);
|
||||
/* Set keep_cutbuffer to TRUE, so that the text we're going to move
|
||||
* into the cutbuffer will be added to the text already in the
|
||||
* cutbuffer instead of replacing it. */
|
||||
keep_cutbuffer = TRUE;
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
if (ISSET(CUT_TO_END) && !ISSET(MARK_ISSET)) {
|
||||
assert(current_x >= 0 && current_x <= strlen(current->data));
|
||||
|
||||
if (current->data[current_x] == '\0') {
|
||||
/* If the line is empty and we didn't just cut a non-blank
|
||||
* line, create a dummy blank line and add it to the
|
||||
* cutbuffer. */
|
||||
if (marked_cut != 1 && current->next != filebot) {
|
||||
filestruct *junk = make_new_node(current);
|
||||
|
||||
junk->data = charalloc(1);
|
||||
junk->data[0] = '\0';
|
||||
add_to_cutbuffer(junk, TRUE);
|
||||
#ifdef DEBUG
|
||||
dump_buffer(cutbuffer);
|
||||
#endif
|
||||
}
|
||||
|
||||
do_delete();
|
||||
marked_cut = 2;
|
||||
return 1;
|
||||
} else {
|
||||
SET(MARK_ISSET);
|
||||
|
||||
mark_beginx = strlen(current->data);
|
||||
mark_beginbuf = current;
|
||||
}
|
||||
}
|
||||
|
||||
if (ISSET(MARK_ISSET)) {
|
||||
cut_marked_segment();
|
||||
|
||||
placewewant = xplustabs();
|
||||
/* If the mark is on, move the marked text to the cutbuffer and
|
||||
* turn the mark off. */
|
||||
cut_marked();
|
||||
UNSET(MARK_ISSET);
|
||||
} else if (ISSET(CUT_TO_END))
|
||||
/* Otherwise, if the CUT_TO_END flag is set, move all text up to
|
||||
* the end of the line into the cutbuffer. */
|
||||
cut_to_eol();
|
||||
else
|
||||
#endif
|
||||
/* Otherwise, move the entire line into the cutbuffer. */
|
||||
cut_line();
|
||||
|
||||
/* If we just did a marked cut of part of a line, we should add
|
||||
* the first line of any cut done immediately afterward to the
|
||||
* end of this cut, as Pico does. */
|
||||
if (current == mark_beginbuf && current_x < strlen(current->data))
|
||||
concatenate_cut = TRUE;
|
||||
marked_cut = 1;
|
||||
edit_refresh();
|
||||
set_modified();
|
||||
edit_refresh();
|
||||
set_modified();
|
||||
|
||||
return 1;
|
||||
}
|
||||
#endif /* !NANO_SMALL */
|
||||
|
||||
totlines--;
|
||||
totsize -= strlen(current->data) + 1;
|
||||
fileptr = current;
|
||||
current = current->next;
|
||||
current->prev = fileptr->prev;
|
||||
add_to_cutbuffer(fileptr, TRUE);
|
||||
#ifdef DEBUG
|
||||
dump_buffer(cutbuffer);
|
||||
#endif
|
||||
|
||||
if (fileptr == fileage)
|
||||
fileage = current;
|
||||
else
|
||||
current->prev->next = current;
|
||||
|
||||
if (fileptr == edittop)
|
||||
edittop = current;
|
||||
|
||||
renumber(current);
|
||||
current_x = 0;
|
||||
edit_refresh();
|
||||
set_modified();
|
||||
marked_cut = 0;
|
||||
#ifndef NANO_SMALL
|
||||
concatenate_cut = FALSE;
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
int do_uncut_text(void)
|
||||
#ifndef NANO_SMALL
|
||||
/* Cut from the current cursor position to the end of the file. */
|
||||
void do_cut_till_end(void)
|
||||
{
|
||||
filestruct *tmp = current;
|
||||
filestruct *newbuf = NULL;
|
||||
filestruct *newend = NULL;
|
||||
assert(current != NULL && current->data != NULL);
|
||||
|
||||
check_statusblank();
|
||||
|
||||
move_to_filestruct(&cutbuffer, &cutbottom, current, current_x,
|
||||
filebot, 0);
|
||||
|
||||
edit_refresh();
|
||||
set_modified();
|
||||
|
||||
#ifdef DEBUG
|
||||
dump_buffer(cutbuffer);
|
||||
#endif
|
||||
}
|
||||
#endif /* !NANO_SMALL */
|
||||
|
||||
/* Copy text from the cutbuffer into the current filestruct. */
|
||||
void do_uncut_text(void)
|
||||
{
|
||||
assert(current != NULL && current->data != NULL);
|
||||
|
||||
#ifndef DISABLE_WRAPPING
|
||||
wrap_reset();
|
||||
#endif
|
||||
check_statblank();
|
||||
if (cutbuffer == NULL || current == NULL)
|
||||
return 0; /* AIEEEEEEEEEEEE */
|
||||
|
||||
/* If we're uncutting a previously non-marked block, uncut to end if
|
||||
* we're not at the beginning of the line. If we are at the
|
||||
* beginning of the line, set placewewant to 0. Pico does both of
|
||||
* these. */
|
||||
if (marked_cut == 0) {
|
||||
if (current_x != 0)
|
||||
marked_cut = 2;
|
||||
else
|
||||
placewewant = 0;
|
||||
}
|
||||
check_statusblank();
|
||||
|
||||
/* If we're going to uncut on the magicline, always make a new
|
||||
* magicline in advance, as Pico does. */
|
||||
if (current->next == NULL)
|
||||
new_magicline();
|
||||
/* If the cutbuffer is empty, get out. */
|
||||
if (cutbuffer == NULL)
|
||||
return;
|
||||
|
||||
if (marked_cut == 0 || cutbuffer->next != NULL) {
|
||||
newbuf = copy_filestruct(cutbuffer);
|
||||
for (newend = newbuf; newend->next != NULL && newend != NULL;
|
||||
newend = newend->next)
|
||||
totlines++;
|
||||
}
|
||||
/* Add a copy of the text in the cutbuffer to the current filestruct
|
||||
* at the current cursor position. */
|
||||
copy_from_filestruct(cutbuffer, cutbottom);
|
||||
|
||||
/* Hook newbuf in at current. */
|
||||
if (marked_cut != 0) {
|
||||
filestruct *hold = current;
|
||||
/* Set the current place we want to where the text from the
|
||||
* cutbuffer ends. */
|
||||
placewewant = xplustabs();
|
||||
|
||||
/* If there's only one line in the cutbuffer... */
|
||||
if (cutbuffer->next == NULL) {
|
||||
size_t buf_len = strlen(cutbuffer->data);
|
||||
size_t cur_len = strlen(current->data);
|
||||
|
||||
current->data = charealloc(current->data, cur_len + buf_len + 1);
|
||||
charmove(current->data + current_x + buf_len,
|
||||
current->data + current_x, cur_len - current_x + 1);
|
||||
strncpy(current->data + current_x, cutbuffer->data, buf_len);
|
||||
/* Use strncpy() to not copy the null terminator. */
|
||||
|
||||
current_x += buf_len;
|
||||
totsize += buf_len;
|
||||
|
||||
placewewant = xplustabs();
|
||||
} else { /* Yuck -- no kidding! */
|
||||
char *tmpstr, *tmpstr2;
|
||||
|
||||
tmp = current->next;
|
||||
|
||||
/* New beginning. */
|
||||
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 = charalloc(strlen(newend->data) +
|
||||
strlen(¤t->data[current_x]) + 1);
|
||||
strcpy(tmpstr2, newend->data);
|
||||
strcat(tmpstr2, ¤t->data[current_x]);
|
||||
|
||||
free(current->data);
|
||||
current->data = tmpstr;
|
||||
current->next = newbuf->next;
|
||||
newbuf->next->prev = current;
|
||||
delete_node(newbuf);
|
||||
|
||||
current_x = strlen(newend->data);
|
||||
placewewant = xplustabs();
|
||||
free(newend->data);
|
||||
newend->data = tmpstr2;
|
||||
|
||||
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
|
||||
* the filebot pointer. */
|
||||
if (tmp != NULL)
|
||||
tmp->prev = newend;
|
||||
else {
|
||||
filebot = newend;
|
||||
new_magicline();
|
||||
}
|
||||
|
||||
/* Now why don't we update the totsize also? */
|
||||
for (tmp = current->next; tmp != newend; tmp = tmp->next)
|
||||
totsize += strlen(tmp->data) + 1;
|
||||
|
||||
current = newend;
|
||||
}
|
||||
|
||||
/* 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 1 AM on a
|
||||
* work night. */
|
||||
if (marked_cut == 2) {
|
||||
tmp = make_new_node(current);
|
||||
tmp->data = mallocstrcpy(NULL, current->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);
|
||||
|
||||
#ifdef DEBUG
|
||||
dump_buffer(fileage);
|
||||
dump_buffer(cutbuffer);
|
||||
#endif
|
||||
set_modified();
|
||||
edit_refresh();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (current != fileage) {
|
||||
tmp = current->prev;
|
||||
tmp->next = newbuf;
|
||||
newbuf->prev = tmp;
|
||||
} else
|
||||
fileage = newbuf;
|
||||
totlines++; /* Unmarked uncuts don't split lines. */
|
||||
|
||||
/* This is so uncutting at the top of the buffer will work => */
|
||||
if (current_y == 0)
|
||||
edittop = newbuf;
|
||||
|
||||
/* Connect the end of the buffer to the filestruct. */
|
||||
newend->next = current;
|
||||
current->prev = newend;
|
||||
|
||||
/* Recalculate size *sigh* */
|
||||
for (tmp = newbuf; tmp != current; tmp = tmp->next)
|
||||
totsize += strlen(tmp->data) + 1;
|
||||
|
||||
renumber(newbuf);
|
||||
edit_refresh();
|
||||
set_modified();
|
||||
|
||||
#ifdef DEBUG
|
||||
dump_buffer_reverse();
|
||||
#endif
|
||||
|
||||
set_modified();
|
||||
return 1;
|
||||
}
|
||||
|
||||
3826
src/files.c
3826
src/files.c
File diff suppressed because it is too large
Load Diff
1737
src/global.c
1737
src/global.c
File diff suppressed because it is too large
Load Diff
234
src/move.c
234
src/move.c
@@ -2,74 +2,117 @@
|
||||
/**************************************************************************
|
||||
* move.c *
|
||||
* *
|
||||
* Copyright (C) 1999-2004 Chris Allegretta *
|
||||
* Copyright (C) 1999-2005 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. *
|
||||
* 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. *
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
|
||||
* 02110-1301, USA. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <assert.h>
|
||||
#include "proto.h"
|
||||
#include "nano.h"
|
||||
|
||||
int do_home(void)
|
||||
void do_first_line(void)
|
||||
{
|
||||
current_x = 0;
|
||||
size_t pww_save = placewewant;
|
||||
current = fileage;
|
||||
placewewant = 0;
|
||||
check_statblank();
|
||||
update_line(current, current_x);
|
||||
return 1;
|
||||
current_x = 0;
|
||||
if (edittop != fileage || need_vertical_update(pww_save))
|
||||
edit_update(TOP);
|
||||
}
|
||||
|
||||
int do_end(void)
|
||||
void do_last_line(void)
|
||||
{
|
||||
size_t pww_save = placewewant;
|
||||
current = filebot;
|
||||
placewewant = 0;
|
||||
current_x = 0;
|
||||
if (edittop->lineno + (editwinrows / 2) != filebot->lineno ||
|
||||
need_vertical_update(pww_save))
|
||||
edit_update(CENTER);
|
||||
}
|
||||
|
||||
void do_home(void)
|
||||
{
|
||||
size_t pww_save = placewewant;
|
||||
#ifndef NANO_SMALL
|
||||
if (ISSET(SMART_HOME)) {
|
||||
size_t current_x_save = current_x;
|
||||
|
||||
current_x = indent_length(current->data);
|
||||
|
||||
if (current_x == current_x_save ||
|
||||
current->data[current_x] == '\0')
|
||||
current_x = 0;
|
||||
|
||||
placewewant = xplustabs();
|
||||
} else {
|
||||
#endif
|
||||
current_x = 0;
|
||||
placewewant = 0;
|
||||
#ifndef NANO_SMALL
|
||||
}
|
||||
#endif
|
||||
check_statusblank();
|
||||
if (need_horizontal_update(pww_save))
|
||||
update_line(current, current_x);
|
||||
}
|
||||
|
||||
void do_end(void)
|
||||
{
|
||||
size_t pww_save = placewewant;
|
||||
current_x = strlen(current->data);
|
||||
placewewant = xplustabs();
|
||||
check_statblank();
|
||||
update_line(current, current_x);
|
||||
return 1;
|
||||
check_statusblank();
|
||||
if (need_horizontal_update(pww_save))
|
||||
update_line(current, current_x);
|
||||
}
|
||||
|
||||
int do_page_up(void)
|
||||
void do_page_up(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
size_t pww_save = placewewant;
|
||||
const filestruct *current_save = current;
|
||||
#ifndef DISABLE_WRAPPING
|
||||
wrap_reset();
|
||||
#endif
|
||||
|
||||
/* If edittop is the first line of the file, move current up there
|
||||
/* If the first line of the file is onscreen, move current up there
|
||||
* and put the cursor at the beginning of the line. */
|
||||
if (edittop == fileage) {
|
||||
current = fileage;
|
||||
placewewant = 0;
|
||||
} else {
|
||||
/* Move the top line of the edit window up a page. */
|
||||
for (i = 0; i < editwinrows - 2 && edittop->prev != NULL; i++)
|
||||
edittop = edittop->prev;
|
||||
edit_scroll(UP, editwinrows - 2);
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
/* If we're in smooth scrolling mode and there was at least one
|
||||
/* If we're in smooth scrolling mode and there's at least one
|
||||
* page of text left, move the current line of the edit window
|
||||
* up a page. */
|
||||
if (ISSET(SMOOTHSCROLL) && current->lineno > editwinrows - 2)
|
||||
if (ISSET(SMOOTH_SCROLL) && current->lineno > editwinrows - 2) {
|
||||
int i;
|
||||
for (i = 0; i < editwinrows - 2; i++)
|
||||
current = current->prev;
|
||||
/* If we're not in smooth scrolling mode and there was at least
|
||||
}
|
||||
/* If we're not in smooth scrolling mode or there isn't at least
|
||||
* one page of text left, put the cursor at the beginning of the
|
||||
* top line of the edit window, as Pico does. */
|
||||
else {
|
||||
@@ -80,19 +123,20 @@ int do_page_up(void)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Get the equivalent x-coordinate of the new line. */
|
||||
current_x = actual_x(current->data, placewewant);
|
||||
|
||||
edit_refresh();
|
||||
/* Update all the lines that need to be updated. */
|
||||
edit_redraw(current_save, pww_save);
|
||||
|
||||
check_statblank();
|
||||
return 1;
|
||||
check_statusblank();
|
||||
}
|
||||
|
||||
int do_page_down(void)
|
||||
void do_page_down(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
size_t pww_save = placewewant;
|
||||
const filestruct *current_save = current;
|
||||
#ifndef DISABLE_WRAPPING
|
||||
wrap_reset();
|
||||
#endif
|
||||
@@ -103,17 +147,19 @@ int do_page_down(void)
|
||||
current = filebot;
|
||||
placewewant = 0;
|
||||
} else {
|
||||
/* Move the top line of the edit window down a page. */
|
||||
for (i = 0; i < editwinrows - 2; i++)
|
||||
edittop = edittop->next;
|
||||
edit_scroll(DOWN, editwinrows - 2);
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
/* If we're in smooth scrolling mode and there was at least one
|
||||
/* If we're in smooth scrolling mode and there's at least one
|
||||
* page of text left, move the current line of the edit window
|
||||
* down a page. */
|
||||
if (ISSET(SMOOTHSCROLL) && current->lineno + editwinrows - 2 <= filebot->lineno)
|
||||
if (ISSET(SMOOTH_SCROLL) && current->lineno + editwinrows - 2 <=
|
||||
filebot->lineno) {
|
||||
int i;
|
||||
for (i = 0; i < editwinrows - 2; i++)
|
||||
current = current->next;
|
||||
/* If we're not in smooth scrolling mode and there was at least
|
||||
}
|
||||
/* If we're not in smooth scrolling mode or there isn't at least
|
||||
* one page of text left, put the cursor at the beginning of the
|
||||
* top line of the edit window, as Pico does. */
|
||||
else {
|
||||
@@ -124,102 +170,122 @@ int do_page_down(void)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Get the equivalent x-coordinate of the new line. */
|
||||
current_x = actual_x(current->data, placewewant);
|
||||
|
||||
edit_refresh();
|
||||
/* Update all the lines that need to be updated. */
|
||||
edit_redraw(current_save, pww_save);
|
||||
|
||||
check_statblank();
|
||||
return 1;
|
||||
check_statusblank();
|
||||
}
|
||||
|
||||
int do_up(void)
|
||||
void do_up(void)
|
||||
{
|
||||
#ifndef DISABLE_WRAPPING
|
||||
wrap_reset();
|
||||
#endif
|
||||
check_statblank();
|
||||
check_statusblank();
|
||||
|
||||
if (current->prev == NULL)
|
||||
return 0;
|
||||
return;
|
||||
|
||||
assert(current_y == current->lineno - edittop->lineno);
|
||||
|
||||
current = current->prev;
|
||||
current_x = actual_x(current->data, placewewant);
|
||||
if (current_y > 0) {
|
||||
update_line(current->next, 0);
|
||||
/* It was necessary to change current first, so that the
|
||||
* mark display will change! */
|
||||
update_line(current, current_x);
|
||||
} else
|
||||
|
||||
/* If we're on the first row of the edit window, scroll up one line
|
||||
* if we're in smooth scrolling mode, or up half a page if we're
|
||||
* not. */
|
||||
if (current_y == 0)
|
||||
edit_scroll(UP,
|
||||
#ifndef NANO_SMALL
|
||||
if (ISSET(SMOOTHSCROLL))
|
||||
edit_update(current, TOP);
|
||||
else
|
||||
ISSET(SMOOTH_SCROLL) ? 1 :
|
||||
#endif
|
||||
edit_update(current, CENTER);
|
||||
return 1;
|
||||
editwinrows / 2);
|
||||
|
||||
/* Update the lines left alone by edit_scroll(): the line we were on
|
||||
* before and the line we're on now. The former needs to be redrawn
|
||||
* if we're not on the first page, and the latter needs to be
|
||||
* drawn. */
|
||||
if (need_vertical_update(0))
|
||||
update_line(current->next, 0);
|
||||
update_line(current, current_x);
|
||||
}
|
||||
|
||||
/* Return value 1 means we moved down, 0 means we were already at the
|
||||
* bottom. */
|
||||
int do_down(void)
|
||||
void do_down(void)
|
||||
{
|
||||
#ifndef DISABLE_WRAPPING
|
||||
wrap_reset();
|
||||
#endif
|
||||
check_statblank();
|
||||
check_statusblank();
|
||||
|
||||
if (current->next == NULL)
|
||||
return 0;
|
||||
return;
|
||||
|
||||
assert(current_y == current->lineno - edittop->lineno);
|
||||
|
||||
current = current->next;
|
||||
current_x = actual_x(current->data, placewewant);
|
||||
|
||||
/* Note that current_y is zero-based. This test checks for the
|
||||
* cursor's being not on the last row of the edit window. */
|
||||
if (current_y != editwinrows - 1) {
|
||||
update_line(current->prev, 0);
|
||||
update_line(current, current_x);
|
||||
} else
|
||||
/* If we're on the last row of the edit window, scroll down one line
|
||||
* if we're in smooth scrolling mode, or down half a page if we're
|
||||
* not. */
|
||||
if (current_y == editwinrows - 1)
|
||||
edit_scroll(DOWN,
|
||||
#ifndef NANO_SMALL
|
||||
if (ISSET(SMOOTHSCROLL))
|
||||
/* In this case current_y does not change. The cursor remains
|
||||
* at the bottom of the edit window. */
|
||||
edit_update(edittop->next, TOP);
|
||||
else
|
||||
ISSET(SMOOTH_SCROLL) ? 1 :
|
||||
#endif
|
||||
edit_update(current, CENTER);
|
||||
return 1;
|
||||
editwinrows / 2);
|
||||
|
||||
/* Update the lines left alone by edit_scroll(): the line we were on
|
||||
* before and the line we're on now. The former needs to be redrawn
|
||||
* if we're not on the first page, and the latter needs to be
|
||||
* drawn. */
|
||||
if (need_vertical_update(0))
|
||||
update_line(current->prev, 0);
|
||||
update_line(current, current_x);
|
||||
}
|
||||
|
||||
int do_left(void)
|
||||
void do_left(bool allow_update)
|
||||
{
|
||||
size_t pww_save = placewewant;
|
||||
if (current_x > 0)
|
||||
current_x--;
|
||||
current_x = move_mbleft(current->data, current_x);
|
||||
else if (current != fileage) {
|
||||
do_up();
|
||||
current_x = strlen(current->data);
|
||||
}
|
||||
placewewant = xplustabs();
|
||||
check_statblank();
|
||||
update_line(current, current_x);
|
||||
return 1;
|
||||
check_statusblank();
|
||||
if (allow_update && need_horizontal_update(pww_save))
|
||||
update_line(current, current_x);
|
||||
}
|
||||
|
||||
int do_right(void)
|
||||
void do_left_void(void)
|
||||
{
|
||||
do_left(TRUE);
|
||||
}
|
||||
|
||||
void do_right(bool allow_update)
|
||||
{
|
||||
size_t pww_save = placewewant;
|
||||
assert(current_x <= strlen(current->data));
|
||||
|
||||
if (current->data[current_x] != '\0')
|
||||
current_x++;
|
||||
current_x = move_mbright(current->data, current_x);
|
||||
else if (current->next != NULL) {
|
||||
do_down();
|
||||
current_x = 0;
|
||||
}
|
||||
placewewant = xplustabs();
|
||||
check_statblank();
|
||||
update_line(current, current_x);
|
||||
return 1;
|
||||
check_statusblank();
|
||||
if (allow_update && need_horizontal_update(pww_save))
|
||||
update_line(current, current_x);
|
||||
}
|
||||
|
||||
void do_right_void(void)
|
||||
{
|
||||
do_right(TRUE);
|
||||
}
|
||||
|
||||
5411
src/nano.c
5411
src/nano.c
File diff suppressed because it is too large
Load Diff
382
src/nano.h
382
src/nano.h
@@ -2,28 +2,33 @@
|
||||
/**************************************************************************
|
||||
* nano.h *
|
||||
* *
|
||||
* Copyright (C) 1999-2004 Chris Allegretta *
|
||||
* Copyright (C) 1999-2005 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. *
|
||||
* 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. *
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
|
||||
* 02110-1301, USA. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef NANO_H
|
||||
#define NANO_H 1
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef __TANDEM
|
||||
/* Tandem NonStop Kernel */
|
||||
/* Tandem NonStop Kernel. */
|
||||
#include <floss.h>
|
||||
#define NANO_ROOT_UID 65535
|
||||
#else
|
||||
@@ -34,29 +39,34 @@
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
/* Macros for the flags int... */
|
||||
/* Macros for flags. */
|
||||
#define SET(bit) flags |= bit
|
||||
#define UNSET(bit) flags &= ~bit
|
||||
#define ISSET(bit) ((flags & bit) != 0)
|
||||
#define TOGGLE(bit) flags ^= bit
|
||||
|
||||
/* Define charalloc as a macro rather than duplicating code */
|
||||
/* Macros for character allocation, etc. */
|
||||
#define charalloc(howmuch) (char *)nmalloc((howmuch) * sizeof(char))
|
||||
#define charealloc(ptr, howmuch) (char *)nrealloc(ptr, (howmuch) * sizeof(char))
|
||||
#define charmove(dest, src, n) memmove(dest, src, (n) * sizeof(char))
|
||||
#define charset(dest, src, n) memset(dest, src, (n) * sizeof(char))
|
||||
|
||||
/* Other macros. */
|
||||
#ifdef BROKEN_REGEXEC
|
||||
#define regexec(preg, string, nmatch, pmatch, eflags) regexec_safe(preg, string, nmatch, pmatch, eflags)
|
||||
#undef regexec
|
||||
#define regexec(preg, string, nmatch, pmatch, eflags) safe_regexec(preg, string, nmatch, pmatch, eflags)
|
||||
#endif
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
/* For the backup file copy ... */
|
||||
#define COPYFILEBLOCKSIZE 1024
|
||||
/* Set a default value for PATH_MAX if there isn't one. */
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX 4096
|
||||
#endif
|
||||
|
||||
#ifdef USE_SLANG
|
||||
/* Slang support enabled. Work around Slang's not defining KEY_DC or
|
||||
* KEY_IC. */
|
||||
/* Slang support enabled. */
|
||||
#include <slcurses.h>
|
||||
/* Slang curses emulation brain damage, part 2: Slang doesn't define the
|
||||
* curses equivalents of the Insert or Delete keys. */
|
||||
#define KEY_DC SL_KEY_DELETE
|
||||
#define KEY_IC SL_KEY_IC
|
||||
#elif defined(HAVE_NCURSES_H)
|
||||
@@ -66,71 +76,60 @@
|
||||
#endif /* CURSES_H */
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
# ifdef HAVE_LIBINTL_H
|
||||
# include <libintl.h>
|
||||
# endif
|
||||
# define _(string) gettext(string)
|
||||
# define P_(singular, plural, number) ngettext(singular, plural, number)
|
||||
#else
|
||||
# define _(string) (string)
|
||||
# define P_(singular, plural, number) (number == 1 ? singular : plural)
|
||||
#ifdef HAVE_LIBINTL_H
|
||||
#include <libintl.h>
|
||||
#endif
|
||||
#define _(string) gettext(string)
|
||||
#define P_(singular, plural, number) ngettext(singular, plural, number)
|
||||
#else
|
||||
#define _(string) (string)
|
||||
#define P_(singular, plural, number) (number == 1 ? singular : plural)
|
||||
#endif
|
||||
#define gettext_noop(string) (string)
|
||||
#define N_(string) gettext_noop(string)
|
||||
/* Mark a string that will be sent to gettext() later. */
|
||||
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include "config.h"
|
||||
|
||||
/* If no snprintf()/vsnprintf(), use the versions from glib. */
|
||||
/* If no snprintf() or vsnprintf(), use the versions from glib 2.x. */
|
||||
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
|
||||
#include <glib.h>
|
||||
# ifndef HAVE_SNPRINTF
|
||||
# define snprintf g_snprintf
|
||||
# endif
|
||||
# ifndef HAVE_VSNPRINTF
|
||||
# define vsnprintf g_vsnprintf
|
||||
# endif
|
||||
#ifndef HAVE_SNPRINTF
|
||||
#define snprintf g_snprintf
|
||||
#endif
|
||||
#ifndef HAVE_VSNPRINTF
|
||||
#define vsnprintf g_vsnprintf
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* If no strcasecmp()/strncasecmp(), use the versions we have. */
|
||||
/* If no isblank(), iswblank(), strcasecmp(), strncasecmp(),
|
||||
* strcasestr(), strnlen(), getdelim(), or getline(), use the versions
|
||||
* we have. */
|
||||
#ifndef HAVE_ISBLANK
|
||||
#define isblank nisblank
|
||||
#endif
|
||||
#ifndef HAVE_ISWBLANK
|
||||
#define iswblank niswblank
|
||||
#endif
|
||||
#ifndef HAVE_STRCASECMP
|
||||
#define strcasecmp nstricmp
|
||||
#define strcasecmp nstrcasecmp
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNCASECMP
|
||||
#define strncasecmp nstrnicmp
|
||||
#define strncasecmp nstrncasecmp
|
||||
#endif
|
||||
|
||||
/* Assume ERR is defined as -1. To avoid duplicate case values when
|
||||
* some key definitions are missing, we have to set all of these, and
|
||||
* all of the special sentinel values below, to different negative
|
||||
* values other than -1. */
|
||||
|
||||
/* HP-UX 10 & 11 do not seem to support KEY_HOME and KEY_END. */
|
||||
#ifndef KEY_HOME
|
||||
#define KEY_HOME -2
|
||||
#ifndef HAVE_STRCASESTR
|
||||
#define strcasestr nstrcasestr
|
||||
#endif
|
||||
|
||||
#ifndef KEY_END
|
||||
#define KEY_END -3
|
||||
#ifndef HAVE_STRNLEN
|
||||
#define strnlen nstrnlen
|
||||
#endif
|
||||
|
||||
/* Slang and SunOS 5.7-5.9 do not seem to support KEY_RESIZE. */
|
||||
#ifndef KEY_RESIZE
|
||||
#define KEY_RESIZE -4
|
||||
#ifndef HAVE_GETDELIM
|
||||
#define getdelim ngetdelim
|
||||
#endif
|
||||
|
||||
/* Slang does not seem to support KEY_SUSPEND, KEY_SLEFT, or
|
||||
* KEY_SRIGHT. */
|
||||
#ifndef KEY_SUSPEND
|
||||
#define KEY_SUSPEND -5
|
||||
#endif
|
||||
|
||||
#ifndef KEY_SLEFT
|
||||
#define KEY_SLEFT -6
|
||||
#endif
|
||||
|
||||
#ifndef KEY_SRIGHT
|
||||
#define KEY_SRIGHT -7
|
||||
#ifndef HAVE_GETLINE
|
||||
#define getline ngetline
|
||||
#endif
|
||||
|
||||
#define VERMSG "GNU nano " VERSION
|
||||
@@ -145,12 +144,25 @@
|
||||
#define DISABLE_WRAPJUSTIFY 1
|
||||
#endif
|
||||
|
||||
/* Enumeration types. */
|
||||
typedef enum {
|
||||
NIX_FILE, DOS_FILE, MAC_FILE
|
||||
} file_format;
|
||||
|
||||
typedef enum {
|
||||
UP, DOWN
|
||||
} updown;
|
||||
|
||||
typedef enum {
|
||||
TOP, CENTER, NONE
|
||||
} topmidnone;
|
||||
|
||||
/* Structure types. */
|
||||
typedef struct filestruct {
|
||||
char *data;
|
||||
struct filestruct *next; /* Next node. */
|
||||
struct filestruct *prev; /* Previous node. */
|
||||
int lineno; /* The line number. */
|
||||
ssize_t lineno; /* The line number. */
|
||||
} filestruct;
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
@@ -159,32 +171,43 @@ typedef struct openfilestruct {
|
||||
#ifndef NANO_SMALL
|
||||
struct stat originalfilestat;
|
||||
#endif
|
||||
struct openfilestruct *next; /* Next node. */
|
||||
struct openfilestruct *prev; /* Previous node. */
|
||||
struct filestruct *fileage; /* Current file. */
|
||||
struct filestruct *filebot; /* Current file's last line. */
|
||||
struct openfilestruct *next;
|
||||
/* Next node. */
|
||||
struct openfilestruct *prev;
|
||||
/* Previous node. */
|
||||
filestruct *fileage; /* Current file. */
|
||||
filestruct *filebot; /* Current file's last line. */
|
||||
filestruct *edittop; /* Current top of edit window. */
|
||||
filestruct *current; /* Current file's line. */
|
||||
#ifndef NANO_SMALL
|
||||
struct filestruct *file_mark_beginbuf;
|
||||
filestruct *mark_beginbuf;
|
||||
/* Current file's beginning marked
|
||||
* line. */
|
||||
int file_mark_beginx; /* Current file's beginning marked
|
||||
size_t mark_beginx; /* Current file's beginning marked
|
||||
* line's x-coordinate position. */
|
||||
#endif
|
||||
int file_current_x; /* Current file's x-coordinate
|
||||
size_t current_x; /* Current file's x-coordinate
|
||||
* position. */
|
||||
int file_current_y; /* Current file's y-coordinate
|
||||
* position. */
|
||||
int file_flags; /* Current file's flags: modification
|
||||
size_t placewewant; /* Current file's place we want. */
|
||||
size_t totlines; /* Current file's total number of
|
||||
* lines. */
|
||||
size_t totsize; /* Current file's total size. */
|
||||
unsigned long flags; /* Current file's flags: modification
|
||||
* status (and marking status, if
|
||||
* available). */
|
||||
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. */
|
||||
int file_lineno; /* Current file's line number. */
|
||||
file_format fmt; /* Current file's format. */
|
||||
} openfilestruct;
|
||||
#endif
|
||||
|
||||
typedef struct partition {
|
||||
filestruct *fileage;
|
||||
filestruct *top_prev;
|
||||
char *top_data;
|
||||
filestruct *filebot;
|
||||
filestruct *bot_next;
|
||||
char *bot_data;
|
||||
} partition;
|
||||
|
||||
typedef struct shortcut {
|
||||
/* Key values that aren't used should be set to NANO_NO_KEY. */
|
||||
int ctrlval; /* Special sentinel key or control key we want
|
||||
@@ -192,8 +215,8 @@ typedef struct shortcut {
|
||||
int metaval; /* Meta key we want bound. */
|
||||
int funcval; /* Function key we want bound. */
|
||||
int miscval; /* Other Meta key we want bound. */
|
||||
int viewok; /* Is this function legal in view mode? */
|
||||
int (*func) (void); /* Function to call when we catch this key. */
|
||||
bool viewok; /* Is this function legal in view mode? */
|
||||
void (*func)(void); /* Function to call when we catch this key. */
|
||||
const char *desc; /* Description, e.g. "Page Up". */
|
||||
#ifndef DISABLE_HELP
|
||||
const char *help; /* Help file entry text. */
|
||||
@@ -208,96 +231,81 @@ typedef struct toggle {
|
||||
const char *desc; /* Description for when toggle is, uh, toggled,
|
||||
* e.g. "Cut to end"; we'll append Enabled or
|
||||
* Disabled. */
|
||||
int flag; /* What flag actually gets toggled. */
|
||||
long flag; /* What flag actually gets toggled. */
|
||||
struct toggle *next;
|
||||
} toggle;
|
||||
#endif /* !NANO_SMALL */
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NANORC
|
||||
typedef struct rcoption {
|
||||
const char *name;
|
||||
int flag;
|
||||
long flag;
|
||||
} rcoption;
|
||||
#endif /* ENABLE_NANORC */
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
|
||||
typedef struct colortype {
|
||||
int fg; /* fg color */
|
||||
int bg; /* bg color */
|
||||
int bright; /* Is this color A_BOLD? */
|
||||
int pairnum; /* Color pair number used for this fg/bg */
|
||||
regex_t start; /* Start (or all) of the regex string */
|
||||
regex_t *end; /* End of the regex string */
|
||||
int fg; /* Foreground color. */
|
||||
int bg; /* Background color. */
|
||||
bool bright; /* Is this color A_BOLD? */
|
||||
int pairnum; /* Color pair number used for this
|
||||
* foreground/background. */
|
||||
regex_t start; /* Start (or all) of the regex
|
||||
* string. */
|
||||
regex_t *end; /* End (if any) of the regex string. */
|
||||
struct colortype *next;
|
||||
} colortype;
|
||||
|
||||
typedef struct exttype {
|
||||
regex_t val; /* The extensions that match this syntax. */
|
||||
regex_t val; /* The extensions that match this
|
||||
* syntax. */
|
||||
struct exttype *next;
|
||||
} exttype;
|
||||
|
||||
typedef struct syntaxtype {
|
||||
char *desc; /* Name of this syntax type */
|
||||
exttype *extensions; /* List of extensions that this applies to */
|
||||
colortype *color; /* color struct for this syntax */
|
||||
char *desc; /* Name of this syntax type. */
|
||||
exttype *extensions; /* List of extensions that this syntax
|
||||
* applies to. */
|
||||
colortype *color; /* Color struct for this syntax. */
|
||||
struct syntaxtype *next;
|
||||
} syntaxtype;
|
||||
#endif
|
||||
|
||||
#endif /* ENABLE_COLOR */
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
typedef struct historytype {
|
||||
struct historytype *next;
|
||||
struct historytype *prev;
|
||||
char *data;
|
||||
} historytype;
|
||||
typedef struct historyheadtype {
|
||||
struct historytype *next; /* Keep *next and *prev members
|
||||
* together. */
|
||||
struct historytype *prev; /* And in same order as in
|
||||
* historytype. */
|
||||
struct historytype *tail;
|
||||
struct historytype *current;
|
||||
int count;
|
||||
int len;
|
||||
} historyheadtype;
|
||||
#endif /* !NANO_SMALL */
|
||||
|
||||
/* Bitwise flags so we can save space (or more correctly, not waste
|
||||
* it). */
|
||||
/* Bitwise flags so that we can save space (or, more correctly, not
|
||||
* waste it). */
|
||||
#define MODIFIED (1<<0)
|
||||
#define KEEP_CUTBUFFER (1<<1)
|
||||
#define CASE_SENSITIVE (1<<2)
|
||||
#define MARK_ISSET (1<<3)
|
||||
#define CONSTUPDATE (1<<4)
|
||||
#define NO_HELP (1<<5)
|
||||
#define NOFOLLOW_SYMLINKS (1<<6)
|
||||
#define SUSPEND (1<<7)
|
||||
#define NO_WRAP (1<<8)
|
||||
#define AUTOINDENT (1<<9)
|
||||
#define VIEW_MODE (1<<10)
|
||||
#define USE_MOUSE (1<<11)
|
||||
#define USE_REGEXP (1<<12)
|
||||
#define REGEXP_COMPILED (1<<13)
|
||||
#define TEMP_OPT (1<<14)
|
||||
#define CUT_TO_END (1<<15)
|
||||
#define REVERSE_SEARCH (1<<16)
|
||||
#define MULTIBUFFER (1<<17)
|
||||
#define DOS_FILE (1<<18)
|
||||
#define MAC_FILE (1<<19)
|
||||
#define SMOOTHSCROLL (1<<20)
|
||||
#define DISABLE_CURPOS (1<<21) /* Damn, we still need it. */
|
||||
#define REBIND_DELETE (1<<22)
|
||||
#define NO_CONVERT (1<<23)
|
||||
#define BACKUP_FILE (1<<24)
|
||||
#define NO_RCFILE (1<<25)
|
||||
#define COLOR_SYNTAX (1<<26)
|
||||
#define PRESERVE (1<<27)
|
||||
#define HISTORY_CHANGED (1<<28)
|
||||
#define HISTORYLOG (1<<29)
|
||||
#define CASE_SENSITIVE (1<<1)
|
||||
#define MARK_ISSET (1<<2)
|
||||
#define CONST_UPDATE (1<<3)
|
||||
#define NO_HELP (1<<4)
|
||||
#define NOFOLLOW_SYMLINKS (1<<5)
|
||||
#define SUSPEND (1<<6)
|
||||
#define NO_WRAP (1<<7)
|
||||
#define AUTOINDENT (1<<8)
|
||||
#define VIEW_MODE (1<<9)
|
||||
#define USE_MOUSE (1<<10)
|
||||
#define USE_REGEXP (1<<11)
|
||||
#define TEMP_FILE (1<<12)
|
||||
#define CUT_TO_END (1<<13)
|
||||
#define BACKWARDS_SEARCH (1<<14)
|
||||
#define MULTIBUFFER (1<<15)
|
||||
#define SMOOTH_SCROLL (1<<16)
|
||||
#define REBIND_DELETE (1<<17)
|
||||
#define NO_CONVERT (1<<18)
|
||||
#define BACKUP_FILE (1<<19)
|
||||
#define NO_RCFILE (1<<20)
|
||||
#define NO_COLOR_SYNTAX (1<<21)
|
||||
#define PRESERVE (1<<22)
|
||||
#define HISTORYLOG (1<<23)
|
||||
#define RESTRICTED (1<<24)
|
||||
#define SMART_HOME (1<<25)
|
||||
#define WHITESPACE_DISPLAY (1<<26)
|
||||
#define MORE_SPACE (1<<27)
|
||||
#define TABS_TO_SPACES (1<<28)
|
||||
#define QUICK_BLANK (1<<29)
|
||||
#define USE_UTF8 (1<<30)
|
||||
|
||||
/* Control key sequences, changing these would be very very bad. */
|
||||
/* Control key sequences. Changing these would be very, very bad. */
|
||||
#define NANO_CONTROL_SPACE 0
|
||||
#define NANO_CONTROL_A 1
|
||||
#define NANO_CONTROL_B 2
|
||||
@@ -332,6 +340,8 @@ typedef struct historyheadtype {
|
||||
#define NANO_CONTROL_7 31
|
||||
#define NANO_CONTROL_8 127
|
||||
|
||||
#define NANO_ALT_9 '9'
|
||||
#define NANO_ALT_0 '0'
|
||||
#define NANO_ALT_A 'a'
|
||||
#define NANO_ALT_B 'b'
|
||||
#define NANO_ALT_C 'c'
|
||||
@@ -360,39 +370,46 @@ typedef struct historyheadtype {
|
||||
#define NANO_ALT_Z 'z'
|
||||
#define NANO_ALT_PERIOD '.'
|
||||
#define NANO_ALT_COMMA ','
|
||||
#define NANO_ALT_LPAREN '('
|
||||
#define NANO_ALT_RPAREN ')'
|
||||
#define NANO_ALT_LCARAT '<'
|
||||
#define NANO_ALT_RCARAT '>'
|
||||
#define NANO_ALT_RBRACKET ']'
|
||||
#define NANO_ALT_SPACE ' '
|
||||
|
||||
/* Some semi-changeable keybindings; don't play with these unless you're
|
||||
* sure you know what you're doing. */
|
||||
* sure you know what you're doing. Assume ERR is defined as -1. */
|
||||
|
||||
/* No key at all. */
|
||||
#define NANO_NO_KEY -8
|
||||
|
||||
/* Special sentinel key used for search string history. */
|
||||
#define NANO_HISTORY_KEY -9
|
||||
#define NANO_NO_KEY -2
|
||||
|
||||
/* Normal keys. */
|
||||
#define NANO_INSERTFILE_KEY NANO_CONTROL_R
|
||||
#define NANO_INSERTFILE_FKEY KEY_F(5)
|
||||
#define NANO_XON_KEY NANO_CONTROL_Q
|
||||
#define NANO_XOFF_KEY NANO_CONTROL_S
|
||||
#define NANO_CANCEL_KEY NANO_CONTROL_C
|
||||
#define NANO_EXIT_KEY NANO_CONTROL_X
|
||||
#define NANO_EXIT_FKEY KEY_F(2)
|
||||
#define NANO_INSERTFILE_KEY NANO_CONTROL_R
|
||||
#define NANO_INSERTFILE_FKEY KEY_F(5)
|
||||
#define NANO_TOOTHERINSERT_KEY NANO_CONTROL_X
|
||||
#define NANO_WRITEOUT_KEY NANO_CONTROL_O
|
||||
#define NANO_WRITEOUT_FKEY KEY_F(3)
|
||||
#define NANO_GOTO_KEY NANO_CONTROL_7
|
||||
#define NANO_GOTO_FKEY KEY_F(13)
|
||||
#define NANO_ALT_GOTO_KEY NANO_ALT_G
|
||||
#define NANO_GOTOLINE_KEY NANO_CONTROL_7
|
||||
#define NANO_GOTOLINE_FKEY KEY_F(13)
|
||||
#define NANO_GOTOLINE_ALTKEY NANO_ALT_G
|
||||
#define NANO_TOGOTOLINE_KEY NANO_CONTROL_T
|
||||
#define NANO_HELP_KEY NANO_CONTROL_G
|
||||
#define NANO_HELP_FKEY KEY_F(1)
|
||||
#define NANO_WHEREIS_KEY NANO_CONTROL_W
|
||||
#define NANO_WHEREIS_FKEY KEY_F(6)
|
||||
#define NANO_WHEREIS_NEXT_KEY NANO_ALT_W
|
||||
#define NANO_WHEREIS_NEXT_FKEY KEY_F(16)
|
||||
#define NANO_TOOTHERWHEREIS_KEY NANO_CONTROL_T
|
||||
#define NANO_REGEXP_KEY NANO_ALT_R
|
||||
#define NANO_REPLACE_KEY NANO_CONTROL_4
|
||||
#define NANO_REPLACE_FKEY KEY_F(14)
|
||||
#define NANO_ALT_REPLACE_KEY NANO_ALT_R
|
||||
#define NANO_OTHERSEARCH_KEY NANO_CONTROL_R
|
||||
#define NANO_TOOTHERSEARCH_KEY NANO_CONTROL_R
|
||||
#define NANO_PREVPAGE_KEY NANO_CONTROL_Y
|
||||
#define NANO_PREVPAGE_FKEY KEY_F(7)
|
||||
#define NANO_NEXTPAGE_KEY NANO_CONTROL_V
|
||||
@@ -409,7 +426,6 @@ typedef struct historyheadtype {
|
||||
#define NANO_FIRSTLINE_FKEY NANO_PREVPAGE_FKEY
|
||||
#define NANO_LASTLINE_KEY NANO_NEXTPAGE_KEY
|
||||
#define NANO_LASTLINE_FKEY NANO_NEXTPAGE_FKEY
|
||||
#define NANO_CANCEL_KEY NANO_CONTROL_C
|
||||
#define NANO_REFRESH_KEY NANO_CONTROL_L
|
||||
#define NANO_JUSTIFY_KEY NANO_CONTROL_J
|
||||
#define NANO_JUSTIFY_FKEY KEY_F(4)
|
||||
@@ -420,7 +436,8 @@ typedef struct historyheadtype {
|
||||
#define NANO_FORWARD_KEY NANO_CONTROL_F
|
||||
#define NANO_BACK_KEY NANO_CONTROL_B
|
||||
#define NANO_MARK_KEY NANO_CONTROL_6
|
||||
#define NANO_ALT_MARK_KEY NANO_ALT_A
|
||||
#define NANO_MARK_ALTKEY NANO_ALT_A
|
||||
#define NANO_MARK_FKEY KEY_F(15)
|
||||
#define NANO_HOME_KEY NANO_CONTROL_A
|
||||
#define NANO_END_KEY NANO_CONTROL_E
|
||||
#define NANO_DELETE_KEY NANO_CONTROL_D
|
||||
@@ -428,7 +445,6 @@ typedef struct historyheadtype {
|
||||
#define NANO_TAB_KEY NANO_CONTROL_I
|
||||
#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_PREPEND_KEY NANO_ALT_P
|
||||
@@ -437,11 +453,19 @@ typedef struct historyheadtype {
|
||||
#define NANO_OPENPREV_ALTKEY NANO_ALT_COMMA
|
||||
#define NANO_OPENNEXT_ALTKEY NANO_ALT_PERIOD
|
||||
#define NANO_BRACKET_KEY NANO_ALT_RBRACKET
|
||||
#define NANO_EXTCMD_KEY NANO_CONTROL_X
|
||||
#define NANO_NEXTWORD_KEY NANO_CONTROL_SPACE
|
||||
#define NANO_PREVWORD_KEY NANO_ALT_SPACE
|
||||
#define NANO_WORDCOUNT_KEY NANO_ALT_D
|
||||
#define NANO_CUTTILLEND_KEY NANO_CONTROL_X
|
||||
#define NANO_CUTTILLEND_ALTKEY NANO_ALT_T
|
||||
#define NANO_PARABEGIN_KEY NANO_CONTROL_W
|
||||
#define NANO_PARABEGIN_ALTKEY1 NANO_ALT_LPAREN
|
||||
#define NANO_PARABEGIN_ALTKEY2 NANO_ALT_9
|
||||
#define NANO_PARAEND_KEY NANO_CONTROL_O
|
||||
#define NANO_PARAEND_ALTKEY1 NANO_ALT_RPAREN
|
||||
#define NANO_PARAEND_ALTKEY2 NANO_ALT_0
|
||||
#define NANO_FULLJUSTIFY_KEY NANO_CONTROL_U
|
||||
#define NANO_FULLJUSTIFY_ALTKEY NANO_ALT_J
|
||||
#define NANO_VERBATIM_KEY NANO_ALT_V
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
@@ -452,40 +476,42 @@ typedef struct historyheadtype {
|
||||
#define TOGGLE_NOHELP_KEY NANO_ALT_X
|
||||
#define TOGGLE_MOUSE_KEY NANO_ALT_M
|
||||
#define TOGGLE_CUTTOEND_KEY NANO_ALT_K
|
||||
#define TOGGLE_REGEXP_KEY NANO_ALT_R
|
||||
#define TOGGLE_WRAP_KEY NANO_ALT_L
|
||||
#define TOGGLE_BACKWARDS_KEY NANO_ALT_B
|
||||
#define TOGGLE_CASE_KEY NANO_ALT_C
|
||||
#define TOGGLE_MULTIBUFFER_KEY NANO_ALT_F
|
||||
#define TOGGLE_DOS_KEY NANO_ALT_D
|
||||
#define TOGGLE_MAC_KEY NANO_ALT_O
|
||||
#define TOGGLE_MAC_KEY NANO_ALT_M
|
||||
#define TOGGLE_SMOOTH_KEY NANO_ALT_S
|
||||
#define TOGGLE_NOCONVERT_KEY NANO_ALT_N
|
||||
#define TOGGLE_BACKUP_KEY NANO_ALT_B
|
||||
#define TOGGLE_SYNTAX_KEY NANO_ALT_Y
|
||||
#define TOGGLE_SMARTHOME_KEY NANO_ALT_H
|
||||
#define TOGGLE_WHITESPACE_KEY NANO_ALT_P
|
||||
#define TOGGLE_MORESPACE_KEY NANO_ALT_O
|
||||
#define TOGGLE_TABSTOSPACES_KEY NANO_ALT_Q
|
||||
#endif /* !NANO_SMALL */
|
||||
|
||||
#define MAIN_VISIBLE 12
|
||||
|
||||
#define VIEW 1
|
||||
#define NOVIEW 0
|
||||
|
||||
typedef enum {
|
||||
TOP, CENTER, NONE
|
||||
} topmidnone;
|
||||
#define VIEW TRUE
|
||||
#define NOVIEW FALSE
|
||||
|
||||
/* Minimum editor window rows required for nano to work correctly. */
|
||||
#define MIN_EDITOR_ROWS 3
|
||||
|
||||
/* Minimum editor window cols required for nano to work correctly. */
|
||||
#define MIN_EDITOR_COLS 10
|
||||
#define MIN_EDITOR_ROWS 1
|
||||
|
||||
/* Default number of characters from end-of-line where text wrapping
|
||||
* occurs. */
|
||||
#define CHARS_FROM_EOL 8
|
||||
|
||||
/* Maximum number of search history strings saved, same value used for
|
||||
* replace history. */
|
||||
/* Default width of a tab. */
|
||||
#define WIDTH_OF_TAB 8
|
||||
|
||||
/* Maximum number of search/replace history strings saved, not counting
|
||||
* the blank lines at their ends. */
|
||||
#define MAX_SEARCH_HISTORY 100
|
||||
|
||||
/* Maximum number of bytes we read from a file at one time. */
|
||||
#define MAX_BUF_SIZE 128
|
||||
|
||||
#endif /* !NANO_H */
|
||||
|
||||
719
src/proto.h
719
src/proto.h
@@ -2,59 +2,76 @@
|
||||
/**************************************************************************
|
||||
* proto.h *
|
||||
* *
|
||||
* Copyright (C) 1999-2004 Chris Allegretta *
|
||||
* Copyright (C) 1999-2005 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. *
|
||||
* 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. *
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
|
||||
* 02110-1301, USA. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef PROTO_H
|
||||
#define PROTO_H 1
|
||||
|
||||
/* Externs. */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <dirent.h>
|
||||
#ifdef HAVE_REGEX_H
|
||||
#include <regex.h>
|
||||
#endif
|
||||
|
||||
#include "nano.h"
|
||||
|
||||
#ifndef DISABLE_WRAPJUSTIFY
|
||||
extern int wrap_at;
|
||||
extern ssize_t wrap_at;
|
||||
#endif
|
||||
extern int editwinrows;
|
||||
extern int current_x, current_y, totlines;
|
||||
extern int placewewant;
|
||||
extern size_t current_x;
|
||||
extern ssize_t current_y;
|
||||
extern size_t totlines;
|
||||
extern size_t placewewant;
|
||||
#ifndef NANO_SMALL
|
||||
extern int mark_beginx;
|
||||
extern size_t mark_beginx;
|
||||
#endif
|
||||
extern long totsize;
|
||||
extern int temp_opt;
|
||||
extern int flags;
|
||||
extern int tabsize;
|
||||
extern int search_last_line;
|
||||
extern int search_offscreen;
|
||||
extern size_t totsize;
|
||||
extern unsigned long flags;
|
||||
extern ssize_t tabsize;
|
||||
extern int currslen;
|
||||
|
||||
#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
|
||||
extern char *whitespace;
|
||||
extern int whitespace_len[2];
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_JUSTIFY
|
||||
extern char *punct;
|
||||
extern char *brackets;
|
||||
extern char *quotestr;
|
||||
#ifdef HAVE_REGEX_H
|
||||
extern regex_t quotereg;
|
||||
extern int quoterc;
|
||||
extern char *quoteerr;
|
||||
#else
|
||||
extern size_t quotelen;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
extern char *backup_dir;
|
||||
#endif
|
||||
|
||||
extern WINDOW *edit, *topwin, *bottomwin;
|
||||
extern WINDOW *topwin, *edit, *bottomwin;
|
||||
extern char *filename;
|
||||
extern struct stat originalfilestat;
|
||||
extern char *answer;
|
||||
@@ -72,10 +89,13 @@ extern char *full_operating_dir;
|
||||
extern char *alt_speller;
|
||||
#endif
|
||||
|
||||
extern int resetstatuspos;
|
||||
extern struct stat fileinfo;
|
||||
extern filestruct *current, *fileage, *edittop, *filebot;
|
||||
extern filestruct *cutbuffer;
|
||||
#ifndef DISABLE_JUSTIFY
|
||||
extern filestruct *jusbuffer;
|
||||
#endif
|
||||
extern partition *filepart;
|
||||
#ifndef NANO_SMALL
|
||||
extern filestruct *mark_beginbuf;
|
||||
#endif
|
||||
@@ -92,7 +112,7 @@ extern char *syntaxstr;
|
||||
|
||||
extern shortcut *shortcut_list;
|
||||
extern shortcut *main_list, *whereis_list;
|
||||
extern shortcut *replace_list, *goto_list;
|
||||
extern shortcut *replace_list, *gotoline_list;
|
||||
extern shortcut *writefile_list, *insertfile_list;
|
||||
extern shortcut *replace_list_2;
|
||||
#ifndef NANO_SMALL
|
||||
@@ -108,16 +128,14 @@ extern shortcut *spell_list;
|
||||
extern shortcut *browser_list, *gotodir_list;
|
||||
#endif
|
||||
|
||||
#if !defined(DISABLE_BROWSER) || !defined(DISABLE_HELP) || !defined(DISABLE_MOUSE)
|
||||
extern const shortcut *currshortcut;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_REGEX_H
|
||||
extern regex_t search_regexp;
|
||||
extern regmatch_t regmatches[10];
|
||||
extern regmatch_t regmatches[10];
|
||||
#ifdef ENABLE_COLOR
|
||||
extern regex_t syntaxfile_regexp;
|
||||
extern regmatch_t synfilematches[1];
|
||||
extern regmatch_t synfilematches[1];
|
||||
#endif /* ENABLE_COLOR */
|
||||
#endif /* HAVE_REGEX_H */
|
||||
|
||||
@@ -126,130 +144,228 @@ extern toggle *toggles;
|
||||
#endif
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
extern historyheadtype search_history;
|
||||
extern historyheadtype replace_history;
|
||||
extern filestruct *search_history;
|
||||
extern filestruct *searchage;
|
||||
extern filestruct *searchbot;
|
||||
extern filestruct *replace_history;
|
||||
extern filestruct *replaceage;
|
||||
extern filestruct *replacebot;
|
||||
#endif
|
||||
|
||||
extern int curses_ended;
|
||||
extern bool curses_ended;
|
||||
|
||||
/* Functions we want available. */
|
||||
extern char *homedir;
|
||||
|
||||
/* Public functions in color.c */
|
||||
/* The functions we want available. */
|
||||
|
||||
/* Public functions in chars.c. */
|
||||
#ifndef HAVE_ISBLANK
|
||||
bool nisblank(int c);
|
||||
#endif
|
||||
#if !defined(HAVE_ISWBLANK) && defined(NANO_WIDE)
|
||||
bool niswblank(wchar_t wc);
|
||||
#endif
|
||||
bool is_byte(int c);
|
||||
bool is_alnum_mbchar(const char *c);
|
||||
bool is_blank_mbchar(const char *c);
|
||||
bool is_cntrl_char(int c);
|
||||
#ifdef NANO_WIDE
|
||||
bool is_cntrl_wchar(wchar_t wc);
|
||||
#endif
|
||||
bool is_cntrl_mbchar(const char *c);
|
||||
bool is_punct_mbchar(const char *c);
|
||||
bool is_word_mbchar(const char *c, bool allow_punct);
|
||||
char control_rep(char c);
|
||||
#ifdef NANO_WIDE
|
||||
wchar_t control_wrep(wchar_t c);
|
||||
#endif
|
||||
char *control_mbrep(const char *c, char *crep, int *crep_len);
|
||||
int mbwidth(const char *c);
|
||||
int mb_cur_max(void);
|
||||
char *make_mbchar(int chr, int *chr_mb_len);
|
||||
int parse_mbchar(const char *buf, char *chr, bool *bad_chr, size_t
|
||||
*col);
|
||||
size_t move_mbleft(const char *buf, size_t pos);
|
||||
size_t move_mbright(const char *buf, size_t pos);
|
||||
#ifndef HAVE_STRCASECMP
|
||||
int nstrcasecmp(const char *s1, const char *s2);
|
||||
#endif
|
||||
int mbstrcasecmp(const char *s1, const char *s2);
|
||||
#ifndef HAVE_STRNCASECMP
|
||||
int nstrncasecmp(const char *s1, const char *s2, size_t n);
|
||||
#endif
|
||||
int mbstrncasecmp(const char *s1, const char *s2, size_t n);
|
||||
#ifndef HAVE_STRCASESTR
|
||||
const char *nstrcasestr(const char *haystack, const char *needle);
|
||||
#endif
|
||||
const char *mbstrcasestr(const char *haystack, const char *needle);
|
||||
#if !defined(NANO_SMALL) || !defined(DISABLE_TABCOMP)
|
||||
const char *revstrstr(const char *haystack, const char *needle, const
|
||||
char *rev_start);
|
||||
#endif
|
||||
#ifndef NANO_SMALL
|
||||
const char *revstrcasestr(const char *haystack, const char *needle,
|
||||
const char *rev_start);
|
||||
const char *mbrevstrcasestr(const char *haystack, const char *needle,
|
||||
const char *rev_start);
|
||||
#endif
|
||||
size_t mbstrlen(const char *s);
|
||||
#ifndef HAVE_STRNLEN
|
||||
size_t nstrnlen(const char *s, size_t maxlen);
|
||||
#endif
|
||||
size_t mbstrnlen(const char *s, size_t maxlen);
|
||||
#ifndef DISABLE_JUSTIFY
|
||||
#ifdef ENABLE_NANORC
|
||||
bool has_blank_chars(const char *s);
|
||||
bool has_blank_mbchars(const char *s);
|
||||
#endif
|
||||
char *mbstrchr(const char *s, char *c);
|
||||
#endif
|
||||
#ifdef ENABLE_NANORC
|
||||
bool is_valid_mbstring(const char *s);
|
||||
#endif
|
||||
|
||||
/* Public functions in color.c. */
|
||||
#ifdef ENABLE_COLOR
|
||||
void set_colorpairs(void);
|
||||
void do_colorinit(void);
|
||||
void update_color(void);
|
||||
#endif /* ENABLE_COLOR */
|
||||
|
||||
/* Public functions in cut.c */
|
||||
filestruct *get_cutbottom(void);
|
||||
void add_to_cutbuffer(filestruct *inptr, int allow_concat);
|
||||
void cut_marked_segment(void);
|
||||
int do_cut_text(void);
|
||||
int do_uncut_text(void);
|
||||
/* Public functions in cut.c. */
|
||||
void cutbuffer_reset(void);
|
||||
void cut_line(void);
|
||||
#ifndef NANO_SMALL
|
||||
void cut_marked(void);
|
||||
void cut_to_eol(void);
|
||||
#endif
|
||||
void do_cut_text(void);
|
||||
#ifndef NANO_SMALL
|
||||
void do_cut_till_end(void);
|
||||
#endif
|
||||
void do_uncut_text(void);
|
||||
|
||||
/* Public functions in files.c */
|
||||
void load_file(int update);
|
||||
/* Public functions in files.c. */
|
||||
void new_file(void);
|
||||
filestruct *read_line(char *buf, filestruct *prev, int *line1ins, int len);
|
||||
int read_file(FILE *f, const char *filename, int quiet);
|
||||
int open_file(const char *filename, int insert, int quiet);
|
||||
char *get_next_filename(const char *name);
|
||||
int do_insertfile(int loading_file);
|
||||
int do_insertfile_void(void);
|
||||
filestruct *read_line(char *buf, filestruct *prevnode, bool
|
||||
*first_line_ins, size_t buf_len);
|
||||
void load_file(void);
|
||||
void read_file(FILE *f, const char *filename);
|
||||
int open_file(const char *filename, bool newfie, FILE **f);
|
||||
char *get_next_filename(const char *name, const char *suffix);
|
||||
#ifndef NANO_SMALL
|
||||
void execute_command(const char *command);
|
||||
#endif
|
||||
void load_buffer(const char *name);
|
||||
void do_insertfile(
|
||||
#ifndef NANO_SMALL
|
||||
bool execute
|
||||
#else
|
||||
void
|
||||
#endif
|
||||
);
|
||||
void do_insertfile_void(void);
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
openfilestruct *make_new_opennode(openfilestruct *prevnode);
|
||||
void splice_opennode(openfilestruct *begin, openfilestruct *newnode, openfilestruct *end);
|
||||
void unlink_opennode(const openfilestruct *fileptr);
|
||||
openfilestruct *make_new_opennode(void);
|
||||
void splice_opennode(openfilestruct *begin, openfilestruct *newnode,
|
||||
openfilestruct *end);
|
||||
void unlink_opennode(openfilestruct *fileptr);
|
||||
void delete_opennode(openfilestruct *fileptr);
|
||||
#ifdef DEBUG
|
||||
void free_openfilestruct(openfilestruct *src);
|
||||
int add_open_file(int update);
|
||||
int load_open_file(void);
|
||||
int open_prevfile(int closing_file);
|
||||
int open_prevfile_void(void);
|
||||
int open_nextfile(int closing_file);
|
||||
int open_nextfile_void(void);
|
||||
int close_open_file(void);
|
||||
#endif
|
||||
#if !defined(DISABLE_SPELLER) || !defined(DISABLE_OPERATINGDIR)
|
||||
void add_open_file(bool update);
|
||||
void load_open_file(void);
|
||||
void open_prevnext_file(bool next_file);
|
||||
void open_prevfile_void(void);
|
||||
void open_nextfile_void(void);
|
||||
bool close_open_file(void);
|
||||
#endif
|
||||
char *get_full_path(const char *origpath);
|
||||
#endif
|
||||
#ifndef DISABLE_SPELLER
|
||||
char *check_writable_directory(const char *path);
|
||||
char *safe_tempnam(const char *dirname, const char *filename_prefix);
|
||||
#endif
|
||||
char *safe_tempfile(FILE **f);
|
||||
#ifndef DISABLE_OPERATINGDIR
|
||||
void init_operating_dir(void);
|
||||
int check_operating_dir(const char *currpath, int allow_tabcomp);
|
||||
bool check_operating_dir(const char *currpath, bool allow_tabcomp);
|
||||
#endif
|
||||
#ifndef NANO_SMALL
|
||||
void init_backup_dir(void);
|
||||
#endif
|
||||
int write_file(const char *name, int tmp, int append, int nonamechange);
|
||||
int copy_file(FILE *inn, FILE *out);
|
||||
int write_file(const char *name, FILE *f_open, bool tmp, int append,
|
||||
bool nonamechange);
|
||||
#ifndef NANO_SMALL
|
||||
int write_marked(const char *name, int tmp, int append, int
|
||||
nonamechange);
|
||||
int write_marked(const char *name, FILE *f_open, bool tmp, int append);
|
||||
#endif
|
||||
int do_writeout(int exiting);
|
||||
int do_writeout_void(void);
|
||||
int do_writeout(bool exiting);
|
||||
void do_writeout_void(void);
|
||||
char *real_dir_from_tilde(const char *buf);
|
||||
#ifndef DISABLE_TABCOMP
|
||||
int append_slash_if_dir(char *buf, int *lastwastab, int *place);
|
||||
char **username_tab_completion(char *buf, int *num_matches);
|
||||
char **cwd_tab_completion(char *buf, int *num_matches);
|
||||
char *input_tab(char *buf, int place, int *lastwastab, int *newplace, int *list);
|
||||
#endif
|
||||
#if !defined(DISABLE_BROWSER) || !defined(NANO_SMALL)
|
||||
const char *tail(const char *foo);
|
||||
#endif
|
||||
#ifndef DISABLE_BROWSER
|
||||
#if !defined(DISABLE_TABCOMP) || !defined(DISABLE_BROWSER)
|
||||
int diralphasort(const void *va, const void *vb);
|
||||
void free_charptrarray(char **array, int len);
|
||||
void striponedir(char *foo);
|
||||
int readable_dir(const char *path);
|
||||
char **browser_init(const char *path, int *longest, int *numents);
|
||||
char *do_browser(const char *inpath);
|
||||
void free_chararray(char **array, size_t len);
|
||||
#endif
|
||||
#ifndef DISABLE_TABCOMP
|
||||
char **username_tab_completion(const char *buf, size_t *num_matches,
|
||||
size_t buflen);
|
||||
char **cwd_tab_completion(const char *buf, size_t *num_matches, size_t
|
||||
buflen);
|
||||
char *input_tab(char *buf, size_t *place, bool *lastwastab, bool *list);
|
||||
#endif
|
||||
const char *tail(const char *foo);
|
||||
#ifndef DISABLE_BROWSER
|
||||
void striponedir(char *path);
|
||||
char **browser_init(const char *path, int *longest, size_t *numents, DIR
|
||||
*dir);
|
||||
char *do_browser(char *path, DIR *dir);
|
||||
char *do_browse_from(const char *inpath);
|
||||
#endif
|
||||
#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
|
||||
char *histfilename(void);
|
||||
void load_history(void);
|
||||
bool writehist(FILE *hist, filestruct *histhead);
|
||||
void save_history(void);
|
||||
#endif
|
||||
|
||||
/* Public functions in global.c */
|
||||
int length_of_list(const shortcut *s);
|
||||
/* Public functions in global.c. */
|
||||
size_t length_of_list(const shortcut *s);
|
||||
#ifndef NANO_SMALL
|
||||
void toggle_init_one(int val, const char *desc, long flag);
|
||||
void toggle_init(void);
|
||||
#endif
|
||||
void sc_init_one(shortcut **shortcutage, int key, const char *desc,
|
||||
#ifndef DISABLE_HELP
|
||||
const char *help,
|
||||
#endif
|
||||
int metaval, int funcval, int miscval, int view, int
|
||||
int metaval, int funcval, int miscval, bool view, void
|
||||
(*func)(void));
|
||||
#ifndef NANO_SMALL
|
||||
void toggle_init_one(int val, const char *desc, int flag);
|
||||
void toggle_init(void);
|
||||
#ifdef DEBUG
|
||||
void free_toggles(void);
|
||||
#endif
|
||||
#endif
|
||||
void shortcut_init(bool unjustify);
|
||||
void free_shortcutage(shortcut **shortcutage);
|
||||
void shortcut_init(int unjustify);
|
||||
#ifdef DEBUG
|
||||
void thanks_for_all_the_fish(void);
|
||||
#endif
|
||||
|
||||
/* Public functions in move.c */
|
||||
int do_home(void);
|
||||
int do_end(void);
|
||||
int do_page_up(void);
|
||||
int do_page_down(void);
|
||||
int do_up(void);
|
||||
int do_down(void);
|
||||
int do_left(void);
|
||||
int do_right(void);
|
||||
/* Public functions in move.c. */
|
||||
void do_first_line(void);
|
||||
void do_last_line(void);
|
||||
void do_home(void);
|
||||
void do_end(void);
|
||||
void do_page_up(void);
|
||||
void do_page_down(void);
|
||||
void do_up(void);
|
||||
void do_down(void);
|
||||
void do_left(bool allow_update);
|
||||
void do_left_void(void);
|
||||
void do_right(bool allow_update);
|
||||
void do_right_void(void);
|
||||
|
||||
/* Public functions in nano.c */
|
||||
RETSIGTYPE finish(int sigage);
|
||||
/* Public functions in nano.c. */
|
||||
void print_view_warning(void);
|
||||
void finish(void);
|
||||
void die(const char *msg, ...);
|
||||
void die_save_file(const char *die_filename);
|
||||
void die_too_small(void);
|
||||
void print_view_warning(void);
|
||||
void global_init(int save_cutbuffer);
|
||||
void check_die_too_small(void);
|
||||
void resize_variables(void);
|
||||
void global_init(bool save_cutbuffer);
|
||||
void window_init(void);
|
||||
#ifndef DISABLE_MOUSE
|
||||
void mouse_init(void);
|
||||
@@ -259,111 +375,127 @@ void help_init(void);
|
||||
#endif
|
||||
filestruct *make_new_node(filestruct *prevnode);
|
||||
filestruct *copy_node(const filestruct *src);
|
||||
void splice_node(filestruct *begin, filestruct *newnode, filestruct *end);
|
||||
void splice_node(filestruct *begin, filestruct *newnode, filestruct
|
||||
*end);
|
||||
void unlink_node(const filestruct *fileptr);
|
||||
void delete_node(filestruct *fileptr);
|
||||
filestruct *copy_filestruct(const filestruct *src);
|
||||
void free_filestruct(filestruct *src);
|
||||
partition *partition_filestruct(filestruct *top, size_t top_x,
|
||||
filestruct *bot, size_t bot_x);
|
||||
void unpartition_filestruct(partition **p);
|
||||
void move_to_filestruct(filestruct **file_top, filestruct **file_bot,
|
||||
filestruct *top, size_t top_x, filestruct *bot, size_t bot_x);
|
||||
void copy_from_filestruct(filestruct *file_top, filestruct *file_bot);
|
||||
void renumber_all(void);
|
||||
void renumber(filestruct *fileptr);
|
||||
void print1opt(const char *shortflag, const char *longflag,
|
||||
const char *desc);
|
||||
void print1opt_full(const char *shortflag
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
, const char *longflag
|
||||
#endif
|
||||
, const char *desc);
|
||||
void usage(void);
|
||||
void version(void);
|
||||
void do_early_abort(void);
|
||||
int no_more_space(void);
|
||||
int no_help(void);
|
||||
#if defined(DISABLE_JUSTIFY) || defined(DISABLE_SPELLER) || defined(DISABLE_HELP) || defined(NANO_SMALL)
|
||||
void nano_disabled_msg(void);
|
||||
#endif
|
||||
#ifndef NANO_SMALL
|
||||
RETSIGTYPE cancel_fork(int signal);
|
||||
int open_pipe(const char *command);
|
||||
void cancel_fork(int signal);
|
||||
bool open_pipe(const char *command);
|
||||
#endif
|
||||
#ifndef DISABLE_MOUSE
|
||||
void do_mouse(void);
|
||||
#endif
|
||||
void do_char(char ch);
|
||||
int do_verbatim_input(void);
|
||||
int do_backspace(void);
|
||||
int do_delete(void);
|
||||
int do_tab(void);
|
||||
int do_enter(void);
|
||||
void do_verbatim_input(void);
|
||||
void do_backspace(void);
|
||||
void do_delete(void);
|
||||
void do_tab(void);
|
||||
void do_enter(void);
|
||||
#ifndef NANO_SMALL
|
||||
int do_next_word(void);
|
||||
int do_prev_word(void);
|
||||
bool do_next_word(bool allow_punct, bool allow_update);
|
||||
void do_next_word_void(void);
|
||||
bool do_prev_word(bool allow_punct, bool allow_update);
|
||||
void do_prev_word_void(void);
|
||||
void do_word_count(void);
|
||||
void do_mark(void);
|
||||
#endif
|
||||
int do_mark(void);
|
||||
#ifndef DISABLE_WRAPPING
|
||||
void wrap_reset(void);
|
||||
int do_wrap(filestruct *inptr);
|
||||
bool do_wrap(filestruct *line);
|
||||
#endif
|
||||
#ifndef DISABLE_SPELLER
|
||||
int do_int_spell_fix(const char *word);
|
||||
char *do_int_speller(char *tempfile_name);
|
||||
char *do_alt_speller(char *tempfile_name);
|
||||
bool do_int_spell_fix(const char *word);
|
||||
const char *do_int_speller(const char *tempfile_name);
|
||||
const char *do_alt_speller(char *tempfile_name);
|
||||
void do_spell(void);
|
||||
#endif
|
||||
int do_spell(void);
|
||||
#if !defined(DISABLE_WRAPPING) && !defined(NANO_SMALL) || !defined(DISABLE_JUSTIFY)
|
||||
#if !defined(DISABLE_HELP) || !defined(DISABLE_JUSTIFY) || !defined(DISABLE_WRAPPING)
|
||||
ssize_t break_line(const char *line, ssize_t goal, bool newline);
|
||||
#endif
|
||||
#if !defined(NANO_SMALL) || !defined(DISABLE_JUSTIFY)
|
||||
size_t indent_length(const char *line);
|
||||
#endif
|
||||
#ifndef DISABLE_JUSTIFY
|
||||
int justify_format(int changes_allowed, filestruct *line, size_t skip);
|
||||
#ifdef HAVE_REGEX_H
|
||||
size_t quote_length(const char *line, const regex_t *qreg);
|
||||
#else
|
||||
void justify_format(filestruct *paragraph, size_t skip);
|
||||
size_t quote_length(const char *line);
|
||||
#endif
|
||||
#ifdef HAVE_REGEX_H
|
||||
# define IFREG(a, b) a, b
|
||||
#else
|
||||
# define IFREG(a, b) a
|
||||
#endif
|
||||
int quotes_match(const char *a_line, size_t a_quote,
|
||||
IFREG(const char *b_line, const regex_t *qreg));
|
||||
size_t indents_match(const char *a_line, size_t a_indent,
|
||||
const char *b_line, size_t b_indent);
|
||||
filestruct *backup_lines(filestruct *first_line, size_t par_len,
|
||||
size_t quote_len);
|
||||
int breakable(const char *line, int goal);
|
||||
int break_line(const char *line, int goal, int force);
|
||||
int do_para_search(int search_type, size_t *quote, size_t *par, size_t
|
||||
*indent, int do_refresh);
|
||||
int do_para_begin(void);
|
||||
int do_para_end(void);
|
||||
bool quotes_match(const char *a_line, size_t a_quote, const char
|
||||
*b_line);
|
||||
bool indents_match(const char *a_line, size_t a_indent, const char
|
||||
*b_line, size_t b_indent);
|
||||
bool begpar(const filestruct *const foo);
|
||||
void do_para_begin(bool allow_update);
|
||||
void do_para_begin_void(void);
|
||||
bool inpar(const filestruct *const foo);
|
||||
void do_para_end(bool allow_update);
|
||||
void do_para_end_void(void);
|
||||
filestruct *backup_lines(filestruct *first_line, size_t par_len, size_t
|
||||
quote_len);
|
||||
bool find_paragraph(size_t *const quote, size_t *const par);
|
||||
void do_justify(bool full_justify);
|
||||
void do_justify_void(void);
|
||||
void do_full_justify(void);
|
||||
#endif /* !DISABLE_JUSTIFY */
|
||||
int do_justify(void);
|
||||
int do_exit(void);
|
||||
void do_exit(void);
|
||||
void signal_init(void);
|
||||
RETSIGTYPE handle_hupterm(int signal);
|
||||
RETSIGTYPE do_suspend(int signal);
|
||||
RETSIGTYPE do_cont(int signal);
|
||||
void handle_hupterm(int signal);
|
||||
void do_suspend(int signal);
|
||||
void do_cont(int signal);
|
||||
#ifndef NANO_SMALL
|
||||
void handle_sigwinch(int s);
|
||||
void allow_pending_sigwinch(int allow);
|
||||
void allow_pending_sigwinch(bool allow);
|
||||
#endif
|
||||
void print_numlock_warning(void);
|
||||
#ifndef NANO_SMALL
|
||||
void do_toggle(const toggle *which);
|
||||
#endif
|
||||
void disable_extended_io(void);
|
||||
void disable_signals(void);
|
||||
#ifndef NANO_SMALL
|
||||
void enable_signals(void);
|
||||
#endif
|
||||
void disable_flow_control(void);
|
||||
void enable_flow_control(void);
|
||||
void terminal_init(void);
|
||||
int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool
|
||||
*ran_func, bool *finished, bool allow_funcs);
|
||||
#ifndef DISABLE_MOUSE
|
||||
bool do_mouse(void);
|
||||
#endif
|
||||
void do_output(char *output, size_t output_len, bool allow_cntrls);
|
||||
|
||||
/* Public functions in rcfile.c */
|
||||
/* Public functions in rcfile.c. */
|
||||
#ifdef ENABLE_NANORC
|
||||
void rcfile_error(const char *msg, ...);
|
||||
void rcfile_msg(const char *msg, ...);
|
||||
char *parse_next_word(char *ptr);
|
||||
char *parse_argument(char *ptr);
|
||||
#ifdef ENABLE_COLOR
|
||||
int colortoint(const char *colorname, int *bright);
|
||||
int color_to_int(const char *colorname, bool *bright);
|
||||
char *parse_next_regex(char *ptr);
|
||||
int nregcomp(regex_t *preg, const char *regex, int flags);
|
||||
bool nregcomp(regex_t *preg, const char *regex, int eflags);
|
||||
void parse_syntax(char *ptr);
|
||||
void parse_colors(char *ptr);
|
||||
void parse_colors(char *ptr, bool icase);
|
||||
#endif /* ENABLE_COLOR */
|
||||
void parse_rcfile(FILE *rcstream);
|
||||
void do_rcfile(void);
|
||||
#endif /* ENABLE_NANORC */
|
||||
|
||||
/* Public functions in search.c */
|
||||
/* Public functions in search.c. */
|
||||
#ifdef HAVE_REGEX_H
|
||||
int regexp_init(const char *regexp);
|
||||
void regexp_cleanup(void);
|
||||
@@ -371,153 +503,208 @@ void regexp_cleanup(void);
|
||||
void not_found_msg(const char *str);
|
||||
void search_abort(void);
|
||||
void search_init_globals(void);
|
||||
int search_init(int replacing);
|
||||
int is_whole_word(int curr_pos, const char *datastr, const char
|
||||
*searchword);
|
||||
int findnextstr(int can_display_wrap, int wholeword, const filestruct
|
||||
*begin, size_t beginx, const char *needle, int no_sameline);
|
||||
int do_search(void);
|
||||
int do_research(void);
|
||||
int search_init(bool replacing, bool use_answer);
|
||||
bool is_whole_word(size_t pos, const char *buf, const char *word);
|
||||
bool findnextstr(bool can_display_wrap, bool wholeword, bool
|
||||
no_sameline, const filestruct *begin, size_t beginx, const char
|
||||
*needle, size_t *needle_len);
|
||||
void findnextstr_wrap_reset(void);
|
||||
void do_search(void);
|
||||
#ifndef NANO_SMALL
|
||||
void do_research(void);
|
||||
#endif
|
||||
void replace_abort(void);
|
||||
#ifdef HAVE_REGEX_H
|
||||
int replace_regexp(char *string, int create_flag);
|
||||
int replace_regexp(char *string, bool create);
|
||||
#endif
|
||||
char *replace_line(const char *needle);
|
||||
int do_replace_loop(const char *needle, const filestruct *real_current,
|
||||
size_t *real_current_x, int wholewords);
|
||||
int do_replace(void);
|
||||
int do_gotoline(int line, int save_pos);
|
||||
int do_gotoline_void(void);
|
||||
#if defined (ENABLE_MULTIBUFFER) || !defined (DISABLE_SPELLER)
|
||||
void do_gotopos(int line, int pos_x, int pos_y, int pos_placewewant);
|
||||
ssize_t do_replace_loop(const char *needle, const filestruct
|
||||
*real_current, size_t *real_current_x, bool wholewords, bool
|
||||
*canceled);
|
||||
void do_replace(void);
|
||||
void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer,
|
||||
bool interactive, bool save_pos);
|
||||
void do_gotolinecolumn_void(void);
|
||||
#if defined(ENABLE_MULTIBUFFER) || !defined(DISABLE_SPELLER)
|
||||
void do_gotopos(ssize_t line, size_t pos_x, ssize_t pos_y, size_t
|
||||
pos_pww);
|
||||
#endif
|
||||
int do_find_bracket(void);
|
||||
#ifndef NANO_SMALL
|
||||
void history_init(void);
|
||||
historytype *find_node(historytype *h, char *s);
|
||||
void remove_node(historytype *r);
|
||||
void insert_node(historytype *h, const char *s);
|
||||
void update_history(historyheadtype *h, char *s);
|
||||
char *get_history_older(historyheadtype *h);
|
||||
char *get_history_newer(historyheadtype *h);
|
||||
char *get_history_completion(historyheadtype *h, char *s);
|
||||
void free_history(historyheadtype *h);
|
||||
#ifdef HAVE_REGEX_H
|
||||
void do_find_bracket(void);
|
||||
#endif
|
||||
#ifdef ENABLE_NANORC
|
||||
void load_history(void);
|
||||
void save_history(void);
|
||||
bool history_has_changed(void);
|
||||
#endif
|
||||
void history_init(void);
|
||||
filestruct *find_history(filestruct *h_start, filestruct *h_end, const
|
||||
char *s, size_t len);
|
||||
void update_history(filestruct **h, const char *s);
|
||||
char *get_history_older(filestruct **h);
|
||||
char *get_history_newer(filestruct **h);
|
||||
#ifndef DISABLE_TABCOMP
|
||||
char *get_history_completion(filestruct **h, char *s, size_t len);
|
||||
#endif
|
||||
#endif /* !NANO_SMALL */
|
||||
|
||||
/* Public functions in utils.c */
|
||||
/* Public functions in utils.c. */
|
||||
#ifdef HAVE_REGEX_H
|
||||
#ifdef BROKEN_REGEXEC
|
||||
int regexec_safe(const regex_t *preg, const char *string, size_t nmatch,
|
||||
int safe_regexec(const regex_t *preg, const char *string, size_t nmatch,
|
||||
regmatch_t pmatch[], int eflags);
|
||||
#endif
|
||||
int regexp_bol_or_eol(const regex_t *preg, const char *string);
|
||||
#endif
|
||||
int is_cntrl_char(int c);
|
||||
int num_of_digits(int n);
|
||||
void align(char **strp);
|
||||
int digits(size_t n);
|
||||
void get_homedir(void);
|
||||
bool parse_num(const char *str, ssize_t *val);
|
||||
bool parse_line_column(const char *str, ssize_t *line, ssize_t *column);
|
||||
void align(char **str);
|
||||
void null_at(char **data, size_t index);
|
||||
void unsunder(char *str, size_t true_len);
|
||||
void sunder(char *str);
|
||||
#ifndef HAVE_STRCASECMP
|
||||
int nstricmp(const char *s1, const char *s2);
|
||||
#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
|
||||
#ifndef HAVE_GETLINE
|
||||
ssize_t ngetline(char **lineptr, size_t *n, FILE *stream);
|
||||
#endif
|
||||
#ifndef HAVE_STRNCASECMP
|
||||
int nstrnicmp(const char *s1, const char *s2, size_t n);
|
||||
#ifndef HAVE_GETDELIM
|
||||
ssize_t ngetdelim(char **lineptr, size_t *n, int delim, FILE *stream);
|
||||
#endif
|
||||
#ifndef NANO_SMALL
|
||||
const char *revstrstr(const char *haystack, const char *needle,
|
||||
const char *rev_start);
|
||||
const char *revstristr(const char *haystack, const char *needle,
|
||||
const char *rev_start);
|
||||
#endif
|
||||
const char *stristr(const char *haystack, const char *needle);
|
||||
#endif /* !NANO_SMALL && ENABLE_NANORC */
|
||||
const char *strstrwrapper(const char *haystack, const char *needle,
|
||||
const char *start);
|
||||
void nperror(const char *s);
|
||||
void *nmalloc(size_t howmuch);
|
||||
void *nrealloc(void *ptr, size_t howmuch);
|
||||
char *mallocstrncpy(char *dest, const char *src, size_t n);
|
||||
char *mallocstrcpy(char *dest, const char *src);
|
||||
char *mallocstrassn(char *dest, char *src);
|
||||
void new_magicline(void);
|
||||
#ifndef NANO_SMALL
|
||||
void mark_order(const filestruct **top, size_t *top_x,
|
||||
const filestruct **bot, size_t *bot_x);
|
||||
#endif
|
||||
#ifndef DISABLE_TABCOMP
|
||||
int check_wildcard_match(const char *text, const char *pattern);
|
||||
void remove_magicline(void);
|
||||
void mark_order(const filestruct **top, size_t *top_x, const filestruct
|
||||
**bot, size_t *bot_x, bool *right_side_up);
|
||||
#endif
|
||||
void get_totals(const filestruct *begin, const filestruct *end, size_t
|
||||
*lines, size_t *size);
|
||||
|
||||
/* Public functions in winio.c */
|
||||
int get_kbinput(WINDOW *win, int *meta_key);
|
||||
int *get_verbatim_kbinput(WINDOW *win, int *kbinput_len, int
|
||||
allow_ascii);
|
||||
int get_ignored_kbinput(WINDOW *win);
|
||||
int get_accepted_kbinput(WINDOW *win, int kbinput, int *meta_key);
|
||||
int get_ascii_kbinput(WINDOW *win, int kbinput);
|
||||
int get_escape_seq_kbinput(WINDOW *win, int *escape_seq, int
|
||||
escape_seq_len);
|
||||
/* Public functions in winio.c. */
|
||||
#ifndef NANO_SMALL
|
||||
void reset_kbinput(void);
|
||||
#endif
|
||||
void get_buffer(WINDOW *win);
|
||||
size_t get_buffer_len(void);
|
||||
void unget_input(int *input, size_t input_len);
|
||||
void unget_kbinput(int kbinput, bool meta_key, bool func_key);
|
||||
int *get_input(WINDOW *win, size_t input_len);
|
||||
int get_kbinput(WINDOW *win, bool *meta_key, bool *func_key);
|
||||
int parse_kbinput(WINDOW *win, bool *meta_key, bool *func_key
|
||||
#ifndef NANO_SMALL
|
||||
, bool reset
|
||||
#endif
|
||||
);
|
||||
int get_escape_seq_kbinput(const int *seq, size_t seq_len, bool
|
||||
*ignore_seq);
|
||||
int get_escape_seq_abcd(int kbinput);
|
||||
int get_mouseinput(int *mouse_x, int *mouse_y, int shortcut);
|
||||
int do_first_line(void);
|
||||
int do_last_line(void);
|
||||
int xpt(const filestruct *fileptr, int index);
|
||||
int get_byte_kbinput(int kbinput
|
||||
#ifndef NANO_SMALL
|
||||
, bool reset
|
||||
#endif
|
||||
);
|
||||
int get_word_kbinput(int kbinput
|
||||
#ifndef NANO_SMALL
|
||||
, bool reset
|
||||
#endif
|
||||
);
|
||||
int get_control_kbinput(int kbinput);
|
||||
void unparse_kbinput(char *output, size_t output_len);
|
||||
int *get_verbatim_kbinput(WINDOW *win, size_t *kbinput_len);
|
||||
int *parse_verbatim_kbinput(WINDOW *win, size_t *kbinput_len);
|
||||
#ifndef DISABLE_MOUSE
|
||||
bool get_mouseinput(int *mouse_x, int *mouse_y, bool allow_shortcuts);
|
||||
#endif
|
||||
const shortcut *get_shortcut(const shortcut *s_list, int *kbinput, bool
|
||||
*meta_key, bool *func_key);
|
||||
#ifndef NANO_SMALL
|
||||
const toggle *get_toggle(int kbinput, bool meta_key);
|
||||
#endif
|
||||
int do_statusbar_input(bool *meta_key, bool *func_key, bool *s_or_t,
|
||||
bool *ran_func, bool *finished, bool allow_funcs);
|
||||
#ifndef DISABLE_MOUSE
|
||||
bool do_statusbar_mouse(void);
|
||||
#endif
|
||||
void do_statusbar_home(void);
|
||||
void do_statusbar_end(void);
|
||||
void do_statusbar_right(void);
|
||||
void do_statusbar_left(void);
|
||||
void do_statusbar_backspace(void);
|
||||
void do_statusbar_delete(void);
|
||||
void do_statusbar_cut_text(void);
|
||||
#ifndef NANO_SMALL
|
||||
bool do_statusbar_next_word(bool allow_punct);
|
||||
bool do_statusbar_prev_word(bool allow_punct);
|
||||
#endif
|
||||
void do_statusbar_verbatim_input(bool *got_enter);
|
||||
void do_statusbar_output(char *output, size_t output_len, bool
|
||||
*got_enter, bool allow_cntrls);
|
||||
size_t xplustabs(void);
|
||||
size_t actual_x(const char *str, size_t xplus);
|
||||
size_t strnlenpt(const char *buf, size_t size);
|
||||
size_t strlenpt(const char *buf);
|
||||
void blank_bottombars(void);
|
||||
void blank_bottomwin(void);
|
||||
void blank_titlebar(void);
|
||||
void blank_topbar(void);
|
||||
void blank_edit(void);
|
||||
void blank_statusbar(void);
|
||||
void blank_statusbar_refresh(void);
|
||||
void check_statblank(void);
|
||||
char *display_string(const char *buf, size_t start_col, int len);
|
||||
void blank_bottombars(void);
|
||||
void check_statusblank(void);
|
||||
char *display_string(const char *buf, size_t start_col, size_t len, bool
|
||||
dollars);
|
||||
void nanoget_repaint(const char *buf, const char *inputbuf, size_t x);
|
||||
int nanogetstr(int allowtabs, const char *buf, const char *def,
|
||||
int nanogetstr(bool allow_tabs, const char *buf, const char *curranswer,
|
||||
#ifndef NANO_SMALL
|
||||
historyheadtype *history_list,
|
||||
filestruct **history_list,
|
||||
#endif
|
||||
const shortcut *s
|
||||
const shortcut *s
|
||||
#ifndef DISABLE_TABCOMP
|
||||
, int *list
|
||||
, bool *list
|
||||
#endif
|
||||
);
|
||||
void set_modified(void);
|
||||
);
|
||||
int statusq(bool allow_tabs, const shortcut *s, const char *curranswer,
|
||||
#ifndef NANO_SMALL
|
||||
filestruct **history_list,
|
||||
#endif
|
||||
const char *msg, ...);
|
||||
void statusq_abort(void);
|
||||
void titlebar(const char *path);
|
||||
void set_modified(void);
|
||||
void statusbar(const char *msg, ...);
|
||||
void bottombars(const shortcut *s);
|
||||
void onekey(const char *keystroke, const char *desc, int len);
|
||||
void onekey(const char *keystroke, const char *desc, size_t len);
|
||||
size_t get_page_start(size_t column);
|
||||
void reset_cursor(void);
|
||||
void edit_add(const filestruct *fileptr, const char *converted, int
|
||||
yval, size_t start);
|
||||
void update_line(const filestruct *fileptr, size_t index);
|
||||
int need_horizontal_update(size_t old_pww);
|
||||
int need_vertical_update(size_t old_pww);
|
||||
void edit_scroll(updown direction, int nlines);
|
||||
void edit_redraw(const filestruct *old_current, size_t old_pww);
|
||||
void edit_refresh(void);
|
||||
void edit_update(topmidnone location);
|
||||
int do_yesno(bool all, const char *msg);
|
||||
void total_redraw(void);
|
||||
void total_refresh(void);
|
||||
void display_main_list(void);
|
||||
void do_cursorpos(bool constant);
|
||||
void do_cursorpos_void(void);
|
||||
#ifndef DISABLE_HELP
|
||||
size_t help_line_len(const char *ptr);
|
||||
void do_help(void);
|
||||
#endif
|
||||
void do_replace_highlight(bool highlight, const char *word);
|
||||
#ifndef NDEBUG
|
||||
int check_linenumbers(const filestruct *fileptr);
|
||||
#endif
|
||||
size_t get_page_start(size_t column);
|
||||
void reset_cursor(void);
|
||||
void add_marked_sameline(int begin, int end, filestruct *fileptr, int y,
|
||||
int virt_cur_x, int this_page);
|
||||
void edit_add(const filestruct *fileptr, const char *converted,
|
||||
int yval, size_t start);
|
||||
void update_line(const filestruct *fileptr, size_t index);
|
||||
void update_cursor(void);
|
||||
void center_cursor(void);
|
||||
void edit_refresh(void);
|
||||
void edit_refresh_clearok(void);
|
||||
void edit_update(filestruct *fileptr, topmidnone location);
|
||||
int statusq(int allowtabs, const shortcut *s, const char *def,
|
||||
#ifndef NANO_SMALL
|
||||
historyheadtype *history_list,
|
||||
#endif
|
||||
const char *msg, ...);
|
||||
int do_yesno(int all, const char *msg);
|
||||
int total_refresh(void);
|
||||
void display_main_list(void);
|
||||
void statusbar(const char *msg, ...);
|
||||
int do_cursorpos(int constant);
|
||||
int do_cursorpos_void(void);
|
||||
int line_len(const char *ptr);
|
||||
int do_help(void);
|
||||
void do_replace_highlight(int highlight_flag, const char *word);
|
||||
#ifdef DEBUG
|
||||
void dump_buffer(const filestruct *inptr);
|
||||
void dump_buffer_reverse(void);
|
||||
@@ -525,3 +712,5 @@ void dump_buffer_reverse(void);
|
||||
#ifdef NANO_EXTRA
|
||||
void do_credits(void);
|
||||
#endif
|
||||
|
||||
#endif /* !PROTO_H */
|
||||
|
||||
749
src/rcfile.c
749
src/rcfile.c
File diff suppressed because it is too large
Load Diff
1108
src/search.c
1108
src/search.c
File diff suppressed because it is too large
Load Diff
494
src/utils.c
494
src/utils.c
@@ -2,69 +2,63 @@
|
||||
/**************************************************************************
|
||||
* utils.c *
|
||||
* *
|
||||
* Copyright (C) 1999-2004 Chris Allegretta *
|
||||
* Copyright (C) 1999-2005 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. *
|
||||
* 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. *
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
|
||||
* 02110-1301, USA. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <pwd.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include "proto.h"
|
||||
#include "nano.h"
|
||||
|
||||
#ifdef HAVE_REGEX_H
|
||||
#ifdef BROKEN_REGEXEC
|
||||
#undef regexec
|
||||
int regexec_safe(const regex_t *preg, const char *string, size_t nmatch,
|
||||
/* Work around a potential segfault in glibc 2.2.3's regexec(). */
|
||||
int safe_regexec(const regex_t *preg, const char *string, size_t nmatch,
|
||||
regmatch_t pmatch[], int eflags)
|
||||
{
|
||||
if (string != NULL && *string != '\0')
|
||||
return regexec(preg, string, nmatch, pmatch, eflags);
|
||||
|
||||
return REG_NOMATCH;
|
||||
}
|
||||
#define regexec(preg, string, nmatch, pmatch, eflags) regexec_safe(preg, string, nmatch, pmatch, eflags)
|
||||
#endif /* BROKEN_REGEXEC */
|
||||
#endif
|
||||
|
||||
/* Assume that string will be found by regexec() if the REG_NOTBOL and
|
||||
* REG_NOTEOL glags are not set. */
|
||||
int regexp_bol_or_eol(const regex_t *preg, const char *string)
|
||||
{
|
||||
return (regexec(preg, string, 0, NULL, REG_NOTBOL | REG_NOTEOL) ==
|
||||
return (regexec(preg, string, 0, NULL, 0) == 0 &&
|
||||
regexec(preg, string, 0, NULL, REG_NOTBOL | REG_NOTEOL) ==
|
||||
REG_NOMATCH);
|
||||
}
|
||||
#endif /* HAVE_REGEX_H */
|
||||
|
||||
int is_cntrl_char(int c)
|
||||
{
|
||||
return (-128 <= c && c < -96) || (0 <= c && c < 32) ||
|
||||
(127 <= c && c < 160);
|
||||
}
|
||||
|
||||
int num_of_digits(int n)
|
||||
int digits(size_t n)
|
||||
{
|
||||
int i = 1;
|
||||
|
||||
if (n < 0)
|
||||
n = -n;
|
||||
|
||||
while (n > 10) {
|
||||
n /= 10;
|
||||
i++;
|
||||
@@ -73,18 +67,91 @@ int num_of_digits(int n)
|
||||
return i;
|
||||
}
|
||||
|
||||
/* Fix the memory allocation for a string. */
|
||||
void align(char **strp)
|
||||
/* Return the user's home directory. We use $HOME, and if that fails,
|
||||
* we fall back on getpwuid(). */
|
||||
void get_homedir(void)
|
||||
{
|
||||
assert(strp != NULL);
|
||||
if (*strp != NULL)
|
||||
*strp = charealloc(*strp, strlen(*strp) + 1);
|
||||
if (homedir == NULL) {
|
||||
const char *homenv = getenv("HOME");
|
||||
|
||||
if (homenv == NULL) {
|
||||
const struct passwd *userage = getpwuid(geteuid());
|
||||
|
||||
if (userage != NULL)
|
||||
homenv = userage->pw_dir;
|
||||
}
|
||||
homedir = mallocstrcpy(NULL, homenv);
|
||||
}
|
||||
}
|
||||
|
||||
/* Read a ssize_t from str, and store it in *val (if val is not NULL).
|
||||
* On error, we return FALSE and don't change *val. Otherwise, we
|
||||
* return TRUE. */
|
||||
bool parse_num(const char *str, ssize_t *val)
|
||||
{
|
||||
char *first_error;
|
||||
ssize_t j;
|
||||
|
||||
assert(str != NULL);
|
||||
|
||||
j = (ssize_t)strtol(str, &first_error, 10);
|
||||
|
||||
if (errno == ERANGE || *str == '\0' || *first_error != '\0')
|
||||
return FALSE;
|
||||
|
||||
if (val != NULL)
|
||||
*val = j;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Read an int and a ssize_t, separated by a comma, from str, and store
|
||||
* them in *line and *column (if they're not both NULL). On error, we
|
||||
* return FALSE. Otherwise, we return TRUE. */
|
||||
bool parse_line_column(const char *str, ssize_t *line, ssize_t *column)
|
||||
{
|
||||
bool retval = TRUE;
|
||||
const char *comma;
|
||||
|
||||
assert(str != NULL);
|
||||
|
||||
comma = strchr(str, ',');
|
||||
|
||||
if (comma != NULL && column != NULL) {
|
||||
if (!parse_num(str + (comma - str + 1), column))
|
||||
retval = FALSE;
|
||||
}
|
||||
|
||||
if (line != NULL) {
|
||||
if (comma != NULL) {
|
||||
char *str_line = mallocstrncpy(NULL, str, comma - str + 1);
|
||||
str_line[comma - str] = '\0';
|
||||
|
||||
if (str_line[0] != '\0' && !parse_num(str_line, line))
|
||||
retval = FALSE;
|
||||
|
||||
free(str_line);
|
||||
} else if (!parse_num(str, line))
|
||||
retval = FALSE;
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* Fix the memory allocation for a string. */
|
||||
void align(char **str)
|
||||
{
|
||||
assert(str != NULL);
|
||||
|
||||
if (*str != NULL)
|
||||
*str = charealloc(*str, strlen(*str) + 1);
|
||||
}
|
||||
|
||||
/* Null a string at a certain index and align it. */
|
||||
void null_at(char **data, size_t index)
|
||||
{
|
||||
assert(data != NULL);
|
||||
|
||||
*data = charealloc(*data, index + 1);
|
||||
(*data)[index] = '\0';
|
||||
}
|
||||
@@ -94,6 +161,7 @@ void null_at(char **data, size_t index)
|
||||
void unsunder(char *str, size_t true_len)
|
||||
{
|
||||
assert(str != NULL);
|
||||
|
||||
for (; true_len > 0; true_len--, str++) {
|
||||
if (*str == '\0')
|
||||
*str = '\n';
|
||||
@@ -105,94 +173,72 @@ void unsunder(char *str, size_t true_len)
|
||||
void sunder(char *str)
|
||||
{
|
||||
assert(str != NULL);
|
||||
|
||||
for (; *str != '\0'; str++) {
|
||||
if (*str == '\n')
|
||||
*str = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef HAVE_STRCASECMP
|
||||
/* This function is equivalent to strcasecmp(). */
|
||||
int nstricmp(const char *s1, const char *s2)
|
||||
#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
|
||||
#ifndef HAVE_GETLINE
|
||||
/* This function is equivalent to getline(). It was adapted from
|
||||
* GNU mailutils' getline() function. */
|
||||
ssize_t ngetline(char **lineptr, size_t *n, FILE *stream)
|
||||
{
|
||||
assert(s1 != NULL && s2 != NULL);
|
||||
for (; *s1 != '\0' && *s2 != '\0'; s1++, s2++) {
|
||||
if (tolower(*s1) != tolower(*s2))
|
||||
break;
|
||||
}
|
||||
return (tolower(*s1) - tolower(*s2));
|
||||
return getdelim(lineptr, n, '\n', stream);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNCASECMP
|
||||
/* This function is equivalent to strncasecmp(). */
|
||||
int nstrnicmp(const char *s1, const char *s2, size_t n)
|
||||
#ifndef HAVE_GETDELIM
|
||||
/* This function is equivalent to getdelim(). It was adapted from
|
||||
* GNU mailutils' getdelim() function. */
|
||||
ssize_t ngetdelim(char **lineptr, size_t *n, int delim, FILE *stream)
|
||||
{
|
||||
assert(s1 != NULL && s2 != NULL);
|
||||
for (; n > 0 && *s1 != '\0' && *s2 != '\0'; n--, s1++, s2++) {
|
||||
if (tolower(*s1) != tolower(*s2))
|
||||
break;
|
||||
}
|
||||
if (n > 0)
|
||||
return (tolower(*s1) - tolower(*s2));
|
||||
else if (n == 0)
|
||||
return 0;
|
||||
else if (n < 0)
|
||||
size_t indx = 0;
|
||||
int c;
|
||||
|
||||
/* Sanity checks. */
|
||||
if (lineptr == NULL || n == NULL || stream == NULL)
|
||||
return -1;
|
||||
|
||||
/* Allocate the line the first time. */
|
||||
if (*lineptr == NULL) {
|
||||
*lineptr = charalloc(MAX_BUF_SIZE);
|
||||
*n = MAX_BUF_SIZE;
|
||||
}
|
||||
|
||||
while ((c = getc(stream)) != EOF) {
|
||||
/* Check if more memory is needed. */
|
||||
if (indx >= *n) {
|
||||
*lineptr = charealloc(*lineptr, *n + MAX_BUF_SIZE);
|
||||
*n += MAX_BUF_SIZE;
|
||||
}
|
||||
|
||||
/* Push the result in the line. */
|
||||
(*lineptr)[indx++] = (char)c;
|
||||
|
||||
/* Bail out. */
|
||||
if (c == delim)
|
||||
break;
|
||||
}
|
||||
|
||||
/* Make room for the null character. */
|
||||
if (indx >= *n) {
|
||||
*lineptr = charealloc(*lineptr, *n + MAX_BUF_SIZE);
|
||||
*n += MAX_BUF_SIZE;
|
||||
}
|
||||
|
||||
/* Null terminate the buffer. */
|
||||
null_at(lineptr, indx++);
|
||||
*n = indx;
|
||||
|
||||
/* The last line may not have the delimiter, we have to return what
|
||||
* we got and the error will be seen on the next iteration. */
|
||||
return (c == EOF && (indx - 1) == 0) ? -1 : indx - 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* None of this is needed if we're using NANO_SMALL! */
|
||||
#ifndef NANO_SMALL
|
||||
const char *revstrstr(const char *haystack, const char *needle,
|
||||
const char *rev_start)
|
||||
{
|
||||
for (; rev_start >= haystack; rev_start--) {
|
||||
const char *r, *q;
|
||||
|
||||
for (r = rev_start, q = needle ; *q == *r && *q != '\0'; r++, q++)
|
||||
;
|
||||
if (*q == '\0')
|
||||
return rev_start;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char *revstristr(const char *haystack, const char *needle,
|
||||
const char *rev_start)
|
||||
{
|
||||
for (; rev_start >= haystack; rev_start--) {
|
||||
const char *r = rev_start, *q = needle;
|
||||
|
||||
for (; (tolower(*q) == tolower(*r)) && (*q != '\0') ; r++, q++)
|
||||
;
|
||||
if (*q == '\0')
|
||||
return rev_start;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
#endif /* !NANO_SMALL */
|
||||
|
||||
/* This is now mutt's version (called mutt_stristr) because it doesn't
|
||||
* use memory allocation to do a simple search (yuck). */
|
||||
const char *stristr(const char *haystack, const char *needle)
|
||||
{
|
||||
const char *p, *q;
|
||||
|
||||
if (haystack == NULL)
|
||||
return NULL;
|
||||
if (needle == NULL)
|
||||
return haystack;
|
||||
|
||||
while (*(p = haystack) != '\0') {
|
||||
for (q = needle; *p != 0 && *q != 0 && tolower(*p) == tolower(*q); p++, q++)
|
||||
;
|
||||
if (*q == 0)
|
||||
return haystack;
|
||||
haystack++;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
#endif /* !NANO_SMALL && ENABLE_NANORC */
|
||||
|
||||
/* If we are searching backwards, we will find the last match that
|
||||
* starts no later than start. Otherwise we find the first match
|
||||
@@ -204,23 +250,25 @@ const char *strstrwrapper(const char *haystack, const char *needle,
|
||||
const char *start)
|
||||
{
|
||||
/* start can be 1 character before the start or after the end of the
|
||||
* line. In either case, we just say there is no match found. */
|
||||
* line. In either case, we just say no match was found. */
|
||||
if ((start > haystack && *(start - 1) == '\0') || start < haystack)
|
||||
return NULL;
|
||||
|
||||
assert(haystack != NULL && needle != NULL && start != NULL);
|
||||
|
||||
#ifdef HAVE_REGEX_H
|
||||
if (ISSET(USE_REGEXP)) {
|
||||
#ifndef NANO_SMALL
|
||||
if (ISSET(REVERSE_SEARCH)) {
|
||||
if (regexec(&search_regexp, haystack, 1, regmatches, 0) == 0
|
||||
&& haystack + regmatches[0].rm_so <= start) {
|
||||
if (ISSET(BACKWARDS_SEARCH)) {
|
||||
if (regexec(&search_regexp, haystack, 1, regmatches,
|
||||
0) == 0 && haystack + regmatches[0].rm_so <= start) {
|
||||
const char *retval = haystack + regmatches[0].rm_so;
|
||||
|
||||
/* Search forward until there is no more match. */
|
||||
while (regexec(&search_regexp, retval + 1, 1, regmatches,
|
||||
REG_NOTBOL) == 0 && retval + 1 +
|
||||
regmatches[0].rm_so <= start)
|
||||
retval += 1 + regmatches[0].rm_so;
|
||||
/* Search forward until there are no more matches. */
|
||||
while (regexec(&search_regexp, retval + 1, 1,
|
||||
regmatches, REG_NOTBOL) == 0 &&
|
||||
retval + regmatches[0].rm_so + 1 <= start)
|
||||
retval += regmatches[0].rm_so + 1;
|
||||
/* Finally, put the subexpression matches in global
|
||||
* variable regmatches. The REG_NOTBOL flag doesn't
|
||||
* matter now. */
|
||||
@@ -230,7 +278,7 @@ const char *strstrwrapper(const char *haystack, const char *needle,
|
||||
} else
|
||||
#endif /* !NANO_SMALL */
|
||||
if (regexec(&search_regexp, start, 10, regmatches,
|
||||
start > haystack ? REG_NOTBOL : 0) == 0) {
|
||||
(start > haystack) ? REG_NOTBOL : 0) == 0) {
|
||||
const char *retval = start + regmatches[0].rm_so;
|
||||
|
||||
regexec(&search_regexp, retval, 10, regmatches, 0);
|
||||
@@ -239,10 +287,10 @@ const char *strstrwrapper(const char *haystack, const char *needle,
|
||||
return NULL;
|
||||
}
|
||||
#endif /* HAVE_REGEX_H */
|
||||
#if !defined(DISABLE_SPELLER) || !defined(NANO_SMALL)
|
||||
#if !defined(NANO_SMALL) || !defined(DISABLE_SPELLER)
|
||||
if (ISSET(CASE_SENSITIVE)) {
|
||||
#ifndef NANO_SMALL
|
||||
if (ISSET(REVERSE_SEARCH))
|
||||
if (ISSET(BACKWARDS_SEARCH))
|
||||
return revstrstr(haystack, needle, start);
|
||||
else
|
||||
#endif
|
||||
@@ -250,25 +298,26 @@ const char *strstrwrapper(const char *haystack, const char *needle,
|
||||
}
|
||||
#endif /* !DISABLE_SPELLER || !NANO_SMALL */
|
||||
#ifndef NANO_SMALL
|
||||
else if (ISSET(REVERSE_SEARCH))
|
||||
return revstristr(haystack, needle, start);
|
||||
else if (ISSET(BACKWARDS_SEARCH))
|
||||
return mbrevstrcasestr(haystack, needle, start);
|
||||
#endif
|
||||
return stristr(start, needle);
|
||||
return mbstrcasestr(start, needle);
|
||||
}
|
||||
|
||||
/* This is a wrapper for the perror() function. The wrapper takes care
|
||||
* of ncurses, calls perror (which writes to stderr), then refreshes the
|
||||
* screen. Note that nperror() causes the window to flicker once. */
|
||||
* of curses, calls perror() (which writes to stderr), and then
|
||||
* refreshes the screen. Note that nperror() causes the window to
|
||||
* flicker once. */
|
||||
void nperror(const char *s)
|
||||
{
|
||||
/* leave ncurses mode, go to the terminal */
|
||||
/* Leave curses mode and go to the terminal. */
|
||||
if (endwin() != ERR) {
|
||||
perror(s); /* print the error */
|
||||
total_refresh(); /* return to ncurses and repaint */
|
||||
perror(s); /* Print the error. */
|
||||
total_refresh(); /* Return to curses and refresh. */
|
||||
}
|
||||
}
|
||||
|
||||
/* Thanks BG, many ppl have been asking for this... */
|
||||
/* Thanks, BG, many people have been asking for this... */
|
||||
void *nmalloc(size_t howmuch)
|
||||
{
|
||||
void *r = malloc(howmuch);
|
||||
@@ -289,9 +338,10 @@ void *nrealloc(void *ptr, size_t howmuch)
|
||||
return r;
|
||||
}
|
||||
|
||||
/* Copy one malloc()ed string to another pointer. Should be used as:
|
||||
* dest = mallocstrcpy(dest, src); */
|
||||
char *mallocstrcpy(char *dest, const char *src)
|
||||
/* Copy the first n characters of one malloc()ed string to another
|
||||
* pointer. Should be used as: "dest = mallocstrncpy(dest, src,
|
||||
* n);". */
|
||||
char *mallocstrncpy(char *dest, const char *src, size_t n)
|
||||
{
|
||||
if (src == NULL)
|
||||
src = "";
|
||||
@@ -299,18 +349,34 @@ char *mallocstrcpy(char *dest, const char *src)
|
||||
if (src != dest)
|
||||
free(dest);
|
||||
|
||||
dest = charalloc(strlen(src) + 1);
|
||||
strcpy(dest, src);
|
||||
dest = charalloc(n);
|
||||
strncpy(dest, src, n);
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
||||
/* Append a new magic-line to filebot. */
|
||||
/* Copy one malloc()ed string to another pointer. Should be used as:
|
||||
* "dest = mallocstrcpy(dest, src);". */
|
||||
char *mallocstrcpy(char *dest, const char *src)
|
||||
{
|
||||
return mallocstrncpy(dest, src, (src == NULL) ? 1 :
|
||||
strlen(src) + 1);
|
||||
}
|
||||
|
||||
/* Free the malloc()ed string at dest and return the malloc()ed string
|
||||
* at src. Should be used as: "answer = mallocstrassn(answer,
|
||||
* real_dir_from_tilde(answer));". */
|
||||
char *mallocstrassn(char *dest, char *src)
|
||||
{
|
||||
free(dest);
|
||||
return src;
|
||||
}
|
||||
|
||||
/* Append a new magicline to filebot. */
|
||||
void new_magicline(void)
|
||||
{
|
||||
filebot->next = (filestruct *)nmalloc(sizeof(filestruct));
|
||||
filebot->next->data = charalloc(1);
|
||||
filebot->next->data[0] = '\0';
|
||||
filebot->next->data = mallocstrcpy(NULL, "");
|
||||
filebot->next->prev = filebot;
|
||||
filebot->next->next = NULL;
|
||||
filebot->next->lineno = filebot->lineno + 1;
|
||||
@@ -320,125 +386,89 @@ void new_magicline(void)
|
||||
}
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
/* Remove the magicline from filebot, if there is one and it isn't the
|
||||
* only line in the file. */
|
||||
void remove_magicline(void)
|
||||
{
|
||||
if (filebot->data[0] == '\0' && filebot->prev != NULL) {
|
||||
filebot = filebot->prev;
|
||||
free_filestruct(filebot->next);
|
||||
filebot->next = NULL;
|
||||
totlines--;
|
||||
totsize--;
|
||||
}
|
||||
}
|
||||
|
||||
/* Set top_x and bot_x to the top and bottom x-coordinates of the mark,
|
||||
* respectively, based on the locations of top and bot. */
|
||||
void mark_order(const filestruct **top, size_t *top_x,
|
||||
const filestruct **bot, size_t *bot_x)
|
||||
* respectively, based on the locations of top and bot. If
|
||||
* right_side_up isn't NULL, set it to TRUE If the mark begins with
|
||||
* (mark_beginbuf, mark_beginx) and ends with (current, current_x), or
|
||||
* FALSE otherwise. */
|
||||
void mark_order(const filestruct **top, size_t *top_x, const filestruct
|
||||
**bot, size_t *bot_x, bool *right_side_up)
|
||||
{
|
||||
assert(top != NULL && top_x != NULL && bot != NULL && bot_x != NULL);
|
||||
if ((current->lineno == mark_beginbuf->lineno && current_x > mark_beginx)
|
||||
|| current->lineno > mark_beginbuf->lineno) {
|
||||
|
||||
if ((current->lineno == mark_beginbuf->lineno && current_x >
|
||||
mark_beginx) || current->lineno > mark_beginbuf->lineno) {
|
||||
*top = mark_beginbuf;
|
||||
*top_x = mark_beginx;
|
||||
*bot = current;
|
||||
*bot_x = current_x;
|
||||
if (right_side_up != NULL)
|
||||
*right_side_up = TRUE;
|
||||
} else {
|
||||
*bot = mark_beginbuf;
|
||||
*bot_x = mark_beginx;
|
||||
*top = current;
|
||||
*top_x = current_x;
|
||||
if (right_side_up != NULL)
|
||||
*right_side_up = FALSE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#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)
|
||||
/* Calculate the number of lines and the number of characters between
|
||||
* begin and end, and return them in lines and size, respectively. */
|
||||
void get_totals(const filestruct *begin, const filestruct *end, size_t
|
||||
*lines, size_t *size)
|
||||
{
|
||||
const char *retrypat;
|
||||
const char *retrytext;
|
||||
int ch;
|
||||
int found;
|
||||
int len;
|
||||
const filestruct *f;
|
||||
|
||||
retrypat = NULL;
|
||||
retrytext = NULL;
|
||||
if (lines != NULL)
|
||||
*lines = 0;
|
||||
if (size != NULL)
|
||||
*size = 0;
|
||||
|
||||
while (*text != '\0' || *pattern != '\0') {
|
||||
ch = *pattern++;
|
||||
/* Go through the lines from begin to end->prev, if we can. */
|
||||
for (f = begin; f != NULL && f != end; f = f->next) {
|
||||
/* Count this line. */
|
||||
if (lines != NULL)
|
||||
(*lines)++;
|
||||
|
||||
switch (ch) {
|
||||
case '*':
|
||||
retrypat = pattern;
|
||||
retrytext = text;
|
||||
break;
|
||||
/* Count the number of characters on this line. */
|
||||
if (size != NULL) {
|
||||
*size += mbstrlen(f->data);
|
||||
|
||||
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 != '\0')
|
||||
text++;
|
||||
break;
|
||||
}
|
||||
|
||||
if (*text != '\0') {
|
||||
pattern = retrypat;
|
||||
text = ++retrytext;
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
/* Count the newline if we have one. */
|
||||
if (f->next != NULL)
|
||||
(*size)++;
|
||||
}
|
||||
|
||||
if (pattern == NULL)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
/* Go through the line at end, if we can. */
|
||||
if (f != NULL) {
|
||||
/* Count this line. */
|
||||
if (lines != NULL)
|
||||
(*lines)++;
|
||||
|
||||
/* Count the number of characters on this line. */
|
||||
if (size != NULL) {
|
||||
*size += mbstrlen(f->data);
|
||||
|
||||
/* Count the newline if we have one. */
|
||||
if (f->next != NULL)
|
||||
(*size)++;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
4583
src/winio.c
4583
src/winio.c
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user