mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 14:28:40 +02:00
Compare commits
1797 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51dfd707a2 | ||
|
|
7c3bf8601b | ||
|
|
714195efe5 | ||
|
|
eaeca2d09b | ||
|
|
ffa3b13437 | ||
|
|
2551e98d11 | ||
|
|
1bfd7761bc | ||
|
|
de9cb1d0a3 | ||
|
|
b2d32b514a | ||
|
|
6e53fd6924 | ||
|
|
8296d2b962 | ||
|
|
d6e66ee1e6 | ||
|
|
a49532b9c5 | ||
|
|
57d87f4caf | ||
|
|
ec9b30c616 | ||
|
|
27d8a62ab6 | ||
|
|
5077814c4a | ||
|
|
ca795a352a | ||
|
|
e59fc36458 | ||
|
|
39e3657539 | ||
|
|
6031f70701 | ||
|
|
3567c9e55f | ||
|
|
26de4e3fd3 | ||
|
|
cd65c6144d | ||
|
|
d32edbbb1f | ||
|
|
eae48a5538 | ||
|
|
63eba104d9 | ||
|
|
ae64961735 | ||
|
|
f7bb91320c | ||
|
|
c11071a859 | ||
|
|
53cbcc22db | ||
|
|
af9dcec3e9 | ||
|
|
d5a4b0d235 | ||
|
|
3b870403d9 | ||
|
|
284d822884 | ||
|
|
d881a26ad0 | ||
|
|
8519edde29 | ||
|
|
a30c467c48 | ||
|
|
887cd83ebe | ||
|
|
242d787ca2 | ||
|
|
5dd2cf7356 | ||
|
|
5efb70909d | ||
|
|
a60d466774 | ||
|
|
1c01f36271 | ||
|
|
3718632551 | ||
|
|
e8f3d5ff9f | ||
|
|
d77e27942d | ||
|
|
734cc61489 | ||
|
|
44d489d3d2 | ||
|
|
3e36ffa9ff | ||
|
|
12104a96b1 | ||
|
|
8ab8d65a15 | ||
|
|
f7a8122cef | ||
|
|
77d9bbb7d6 | ||
|
|
623def52fd | ||
|
|
d088e35142 | ||
|
|
5821e55eb8 | ||
|
|
1ee989c65d | ||
|
|
62388fb21f | ||
|
|
13571f84af | ||
|
|
03fdc06b65 | ||
|
|
4bce675ae6 | ||
|
|
7b64623115 | ||
|
|
e268bbf31d | ||
|
|
5863404de6 | ||
|
|
2de5996f4e | ||
|
|
695e79602a | ||
|
|
cf0d958da5 | ||
|
|
85b0348fa7 | ||
|
|
15a5d9a876 | ||
|
|
1baa6dab0c | ||
|
|
34bb250ba3 | ||
|
|
598b1b7464 | ||
|
|
e63d4be4e8 | ||
|
|
65561e7f34 | ||
|
|
da31dadb71 | ||
|
|
705adbb82a | ||
|
|
269f9788b6 | ||
|
|
5e1c5ae384 | ||
|
|
562eb83bde | ||
|
|
a53db00243 | ||
|
|
11375729db | ||
|
|
9fee354e6c | ||
|
|
ec76554d41 | ||
|
|
ddb0817c99 | ||
|
|
3d6ecd1f72 | ||
|
|
e3ec6565e9 | ||
|
|
8ed49ead7f | ||
|
|
49fbca416f | ||
|
|
82cd438fff | ||
|
|
946e1bca38 | ||
|
|
e40c81b5bf | ||
|
|
f23418480d | ||
|
|
bb4df39c50 | ||
|
|
5fec775863 | ||
|
|
a85980fec2 | ||
|
|
f3ea2962e6 | ||
|
|
3a5af23ab6 | ||
|
|
f9656edc51 | ||
|
|
5134b47d47 | ||
|
|
d4a183f3bf | ||
|
|
87e392de6c | ||
|
|
afc1667e64 | ||
|
|
8d25270c43 | ||
|
|
929866a770 | ||
|
|
395bad96a7 | ||
|
|
cd7be006c9 | ||
|
|
f658ba7ee7 | ||
|
|
7416f4c035 | ||
|
|
2860159ff7 | ||
|
|
64fa71ab09 | ||
|
|
ffbba7d4d1 | ||
|
|
fdcc2d8acf | ||
|
|
f1aa4d16af | ||
|
|
a55c5580f3 | ||
|
|
569e315306 | ||
|
|
acd641845d | ||
|
|
6b7e6f6788 | ||
|
|
4248b9c624 | ||
|
|
6de98d1357 | ||
|
|
18f21693af | ||
|
|
6fa500a860 | ||
|
|
941c02582e | ||
|
|
e56e3924d9 | ||
|
|
d1384a8f69 | ||
|
|
0488d689aa | ||
|
|
988a94e669 | ||
|
|
ac7e93ac1c | ||
|
|
bb7e9ee676 | ||
|
|
ac949ce7bd | ||
|
|
0fa8eed11f | ||
|
|
df8694a128 | ||
|
|
13df3d96e5 | ||
|
|
e345eb15f2 | ||
|
|
e8b2872a87 | ||
|
|
2f196e3c9f | ||
|
|
839b844a10 | ||
|
|
0cea410529 | ||
|
|
90397ece64 | ||
|
|
0b95fc290c | ||
|
|
9a4e8b6070 | ||
|
|
924fd16ade | ||
|
|
0815fe19cc | ||
|
|
7f445e1b66 | ||
|
|
31afc60af4 | ||
|
|
9d34a8aa42 | ||
|
|
91325ff489 | ||
|
|
1f99d6df59 | ||
|
|
8a608a06b8 | ||
|
|
bb34474e59 | ||
|
|
029c054489 | ||
|
|
01400d0672 | ||
|
|
a1eafb2c89 | ||
|
|
af88e393f9 | ||
|
|
3a250ce765 | ||
|
|
d651ac40a8 | ||
|
|
653324e220 | ||
|
|
e5c6703eaa | ||
|
|
1596d9c76a | ||
|
|
4aacf74e25 | ||
|
|
ae58bc7c11 | ||
|
|
387125d983 | ||
|
|
aa5f9297b2 | ||
|
|
8c4a7e766f | ||
|
|
d7f32d3901 | ||
|
|
d4f09e2a31 | ||
|
|
8b5fe4f2a0 | ||
|
|
98fc4a917f | ||
|
|
e633530a36 | ||
|
|
bfea9915b9 | ||
|
|
d68ed6e75d | ||
|
|
a22631d768 | ||
|
|
552bf84e33 | ||
|
|
28d0251093 | ||
|
|
f3d969f658 | ||
|
|
2afe95d090 | ||
|
|
3692a6b265 | ||
|
|
8fc19358bb | ||
|
|
c8f9773d83 | ||
|
|
e1091db82f | ||
|
|
9f8ed13434 | ||
|
|
914f03d5eb | ||
|
|
a801f6d4ce | ||
|
|
fde5a7b4ca | ||
|
|
0e1fff6339 | ||
|
|
60fdeac2e9 | ||
|
|
3b3f10d448 | ||
|
|
48a4314dd2 | ||
|
|
9beff3a24a | ||
|
|
1ef90c7a61 | ||
|
|
5c886d181e | ||
|
|
da4d830163 | ||
|
|
c7abb7986c | ||
|
|
5a3b3d8a06 | ||
|
|
127cee03df | ||
|
|
7455748d54 | ||
|
|
e278d0e768 | ||
|
|
a5acc12239 | ||
|
|
a25afb9771 | ||
|
|
6252a472b5 | ||
|
|
dbe4c662c1 | ||
|
|
b77a261c87 | ||
|
|
351c54cc50 | ||
|
|
72d0b13ad5 | ||
|
|
bea2a6541c | ||
|
|
5258e98f54 | ||
|
|
af9d42721c | ||
|
|
8ed43f5c3e | ||
|
|
ec02a87c2b | ||
|
|
6c2ec04d40 | ||
|
|
9f91cdf0b9 | ||
|
|
8ada68ce54 | ||
|
|
d7975634af | ||
|
|
87be68fecf | ||
|
|
b42d5fd412 | ||
|
|
603228b944 | ||
|
|
c62f676813 | ||
|
|
c7654c27a6 | ||
|
|
b00bf05fea | ||
|
|
29bd07d4ef | ||
|
|
b7047da89e | ||
|
|
f26334e25f | ||
|
|
b80bc5f788 | ||
|
|
91549e18ce | ||
|
|
07fd975935 | ||
|
|
f9d968cf68 | ||
|
|
6a7e696a60 | ||
|
|
6734fae1db | ||
|
|
481fbc20a1 | ||
|
|
3c120bf561 | ||
|
|
ee65e04974 | ||
|
|
4ee6bb0eca | ||
|
|
b9839421f2 | ||
|
|
67601507fa | ||
|
|
c2e5534462 | ||
|
|
f4ea3af6fc | ||
|
|
e0998a3991 | ||
|
|
d67e580d0a | ||
|
|
d6ce54eea4 | ||
|
|
8b9ec43029 | ||
|
|
9d68134f0f | ||
|
|
3d91371870 | ||
|
|
d1c0ef63b0 | ||
|
|
2a59da61e1 | ||
|
|
2bc5e21627 | ||
|
|
7d77bfd12a | ||
|
|
0ff589c288 | ||
|
|
f3cca092be | ||
|
|
7218d55f08 | ||
|
|
ec72c74016 | ||
|
|
c946f08235 | ||
|
|
a8543ac349 | ||
|
|
dd3c0e14ed | ||
|
|
a2bc0acd3c | ||
|
|
a34266741a | ||
|
|
dedb9766c9 | ||
|
|
aedd759f50 | ||
|
|
a24c2f6905 | ||
|
|
fac31a10b8 | ||
|
|
fba9f139ed | ||
|
|
588d9debe8 | ||
|
|
805c2e0c69 | ||
|
|
2c2b1440b3 | ||
|
|
6973f62d74 | ||
|
|
f547c1e714 | ||
|
|
f8ea124b1f | ||
|
|
820e2aec4d | ||
|
|
01ce6b2d8f | ||
|
|
b39e0eab7e | ||
|
|
d6fc451d74 | ||
|
|
ac91556fc2 | ||
|
|
ccf639efe6 | ||
|
|
a8aa3b328b | ||
|
|
74a3b3e73d | ||
|
|
c0e68b57ea | ||
|
|
0ad4ea26eb | ||
|
|
ea7aafaf5e | ||
|
|
18043080ba | ||
|
|
7cd8cf3a77 | ||
|
|
21da52ec36 | ||
|
|
7a0c164843 | ||
|
|
5cf4961f19 | ||
|
|
68926d145b | ||
|
|
fdc3e4d23d | ||
|
|
f179c837e1 | ||
|
|
740bb44956 | ||
|
|
5b953769fe | ||
|
|
1ae00ce778 | ||
|
|
a01e05c1db | ||
|
|
63fb3e99f3 | ||
|
|
6cf7f5d2d8 | ||
|
|
316eb43303 | ||
|
|
576112a39a | ||
|
|
6607223abb | ||
|
|
9e85b1932d | ||
|
|
4ba7f5b1f2 | ||
|
|
fc93ae890a | ||
|
|
8051d01945 | ||
|
|
63430c59f7 | ||
|
|
c646bfc63f | ||
|
|
58dea8f69b | ||
|
|
f1c82dcb37 | ||
|
|
b984b66819 | ||
|
|
44bdae302b | ||
|
|
8eb6b250fb | ||
|
|
d838c41bf2 | ||
|
|
f9dbf36496 | ||
|
|
fe1427db28 | ||
|
|
2621ad5604 | ||
|
|
efecf2e1ea | ||
|
|
8666e6357e | ||
|
|
ae7069c9cb | ||
|
|
0c6ab3e607 | ||
|
|
17d6a60c0a | ||
|
|
e3e0a541dc | ||
|
|
712aa08fbc | ||
|
|
98c5bf511e | ||
|
|
1f9281628f | ||
|
|
8fb15aed17 | ||
|
|
a24c3a8542 | ||
|
|
8f8059e3f3 | ||
|
|
24bb462199 | ||
|
|
38e914f171 | ||
|
|
4a02c54e8d | ||
|
|
5fe169438a | ||
|
|
a7ef6e851a | ||
|
|
4d57b9d0aa | ||
|
|
5a7452d9f6 | ||
|
|
3916887aff | ||
|
|
f84f59fa91 | ||
|
|
1032f8908e | ||
|
|
6c2e8fc608 | ||
|
|
012e527fb5 | ||
|
|
62198c9807 | ||
|
|
de95224d62 | ||
|
|
be374a0464 | ||
|
|
fe9b3186d7 | ||
|
|
8405ea6c53 | ||
|
|
4274d05e10 | ||
|
|
4e80ce1159 | ||
|
|
52f473f2af | ||
|
|
1d6ca51bf9 | ||
|
|
e662d0b3dd | ||
|
|
b910d557d1 | ||
|
|
a4ad0a9e97 | ||
|
|
07f67e7dd7 | ||
|
|
d6575773fb | ||
|
|
ac1303886e | ||
|
|
1569992184 | ||
|
|
55a1f1d746 | ||
|
|
ef7742a3cc | ||
|
|
ef48c2020b | ||
|
|
6dcb25073b | ||
|
|
4824b07ec8 | ||
|
|
a8f1228fb7 | ||
|
|
80e51d1d0f | ||
|
|
80e30638a5 | ||
|
|
dd2fc30364 | ||
|
|
a5865fb5fe | ||
|
|
aca2f28341 | ||
|
|
7a3f5f7ac9 | ||
|
|
1731710ef2 | ||
|
|
dc2a8f48bf | ||
|
|
5e16179bfa | ||
|
|
a7c1bc81b2 | ||
|
|
5f5ec8ef19 | ||
|
|
712ff56792 | ||
|
|
99af1f964c | ||
|
|
de5d1347e5 | ||
|
|
5e07fbde6d | ||
|
|
c523c7f3b3 | ||
|
|
6b3c6b0ec7 | ||
|
|
62b94ab065 | ||
|
|
49c7399599 | ||
|
|
5fa9297aba | ||
|
|
4ada31798b | ||
|
|
e78f953e90 | ||
|
|
af7a9ad8b5 | ||
|
|
35eae045a6 | ||
|
|
98a20ae058 | ||
|
|
df9ef6e13a | ||
|
|
10f5802069 | ||
|
|
780044219f | ||
|
|
d015c061e7 | ||
|
|
6f6326d433 | ||
|
|
9488e7ca13 | ||
|
|
71c11672c2 | ||
|
|
0acefa800e | ||
|
|
d45cee4712 | ||
|
|
c026aa05e2 | ||
|
|
50076c74fa | ||
|
|
1563d77c06 | ||
|
|
ed72ef8629 | ||
|
|
06c5996086 | ||
|
|
570ca857a0 | ||
|
|
f8f20b7afc | ||
|
|
f55ef7ff20 | ||
|
|
79220a74cf | ||
|
|
77111ef628 | ||
|
|
bf96063311 | ||
|
|
58a201fceb | ||
|
|
47cecb210b | ||
|
|
bfbf744b0a | ||
|
|
0cf56ac1de | ||
|
|
2880a718f4 | ||
|
|
da0dd0f7c6 | ||
|
|
c456d3e0ff | ||
|
|
59059736e6 | ||
|
|
f5cf2ab832 | ||
|
|
cc4ff2582d | ||
|
|
90f5fde3bb | ||
|
|
9fbe9f5132 | ||
|
|
f05661fa6c | ||
|
|
d6882c3378 | ||
|
|
e32cab937e | ||
|
|
14bb939977 | ||
|
|
13e830782d | ||
|
|
f39bb5e2d9 | ||
|
|
8b795e81b7 | ||
|
|
aef7eeda5a | ||
|
|
0641a6f8f1 | ||
|
|
4fdf7b706b | ||
|
|
0653b9420a | ||
|
|
27ede1ce37 | ||
|
|
a303fb9cba | ||
|
|
92af4e9c3e | ||
|
|
abc4f45fed | ||
|
|
e651f92bd9 | ||
|
|
b2d3d98d72 | ||
|
|
cb8b7f85af | ||
|
|
d30f347a0b | ||
|
|
5e9b1e7464 | ||
|
|
58085470c5 | ||
|
|
8f0de805d5 | ||
|
|
3f879a1b97 | ||
|
|
94270c3d98 | ||
|
|
bb8a689186 | ||
|
|
a7e73cdac8 | ||
|
|
d38c324340 | ||
|
|
fade38d522 | ||
|
|
858a7601aa | ||
|
|
37e3d3d1d1 | ||
|
|
ff67ab3c86 | ||
|
|
ad7faa8ad9 | ||
|
|
c927166a8a | ||
|
|
9d22fba842 | ||
|
|
3d5adf6c42 | ||
|
|
5ba862cbd7 | ||
|
|
6f20e056c9 | ||
|
|
878ab1a8bc | ||
|
|
4d17494371 | ||
|
|
65763b9522 | ||
|
|
52840d40de | ||
|
|
6892e7a805 | ||
|
|
24d0264f92 | ||
|
|
56c37e4e05 | ||
|
|
86c99102b5 | ||
|
|
de4a23ee1e | ||
|
|
6a9f7c186a | ||
|
|
eaed22a42b | ||
|
|
f47cf2320e | ||
|
|
eb100e57e2 | ||
|
|
948548c73f | ||
|
|
7495ae1e05 | ||
|
|
51ae17bd0a | ||
|
|
61d665ef7d | ||
|
|
5aaf19ffdb | ||
|
|
2eb672e380 | ||
|
|
4a59bf686b | ||
|
|
f98ab6f686 | ||
|
|
3600cd95cd | ||
|
|
f8bd79fbb2 | ||
|
|
4c403047eb | ||
|
|
25009de417 | ||
|
|
c4588654ec | ||
|
|
c1e5279272 | ||
|
|
cda8396690 | ||
|
|
c0f79d1e69 | ||
|
|
375a0fb7a2 | ||
|
|
2069114ef1 | ||
|
|
f6d9e8724d | ||
|
|
8e55438200 | ||
|
|
1ca6feb112 | ||
|
|
732ce8283f | ||
|
|
122bd3e07e | ||
|
|
0ac5cbb837 | ||
|
|
7f3d4812a8 | ||
|
|
e1fa11c94c | ||
|
|
c06c65acf1 | ||
|
|
a84fa0bc8f | ||
|
|
054648e02b | ||
|
|
9548041334 | ||
|
|
da306f2900 | ||
|
|
26587aea02 | ||
|
|
adc86e0f00 | ||
|
|
a9ed5f075e | ||
|
|
21e30c980e | ||
|
|
a657b2e55a | ||
|
|
ff8c55b8b6 | ||
|
|
eb36c5bca0 | ||
|
|
89173ce1ee | ||
|
|
5d115ba3e3 | ||
|
|
7e3adeb9c9 | ||
|
|
080cda86fa | ||
|
|
6274cbad52 | ||
|
|
85c4ad821d | ||
|
|
b758a2fea8 | ||
|
|
6619cc7ca4 | ||
|
|
961f7a8a62 | ||
|
|
905287901f | ||
|
|
669be7bf57 | ||
|
|
9b8eb2dc4c | ||
|
|
00ab7b196d | ||
|
|
f616be4bdd | ||
|
|
8ae9ce8523 | ||
|
|
6d2bbbd7e2 | ||
|
|
1453be83b2 | ||
|
|
8659131be2 | ||
|
|
0276ce322d | ||
|
|
b36c99a34b | ||
|
|
ad575f1485 | ||
|
|
a9162f1472 | ||
|
|
221e2554a9 | ||
|
|
04ec6c3695 | ||
|
|
b1594980fc | ||
|
|
024a8ef38d | ||
|
|
b281051421 | ||
|
|
aa1b275b51 | ||
|
|
c22ca68857 | ||
|
|
3804ce3fe3 | ||
|
|
0977f1db04 | ||
|
|
83c97934c9 | ||
|
|
44c9d74caa | ||
|
|
172f56754a | ||
|
|
dc184cc713 | ||
|
|
2c30088553 | ||
|
|
6f0c189afb | ||
|
|
0e2996c3e1 | ||
|
|
ce8040dd1f | ||
|
|
a8fd2d463d | ||
|
|
237813127c | ||
|
|
3e6259532f | ||
|
|
c015441130 | ||
|
|
9661455fee | ||
|
|
df983b4123 | ||
|
|
068d5429eb | ||
|
|
6c593fe849 | ||
|
|
6a7bdb2ec7 | ||
|
|
a4aead18dd | ||
|
|
d277154d9f | ||
|
|
d2662fb026 | ||
|
|
2f522ea705 | ||
|
|
cd68041312 | ||
|
|
9c2556f16d | ||
|
|
b80b938d3d | ||
|
|
0bd6278050 | ||
|
|
b2746f28db | ||
|
|
cfd3698b53 | ||
|
|
6b5150d30e | ||
|
|
b011adf94e | ||
|
|
d09b725710 | ||
|
|
2f1e3524df | ||
|
|
2de47cfa51 | ||
|
|
15a778075d | ||
|
|
2502191982 | ||
|
|
47af91d136 | ||
|
|
e249fe3a17 | ||
|
|
72838a07f3 | ||
|
|
c098acc659 | ||
|
|
15ee32b5bd | ||
|
|
5a059d9b09 | ||
|
|
77516dbdff | ||
|
|
835af9ad6a | ||
|
|
4c30db06c0 | ||
|
|
3aee12073e | ||
|
|
654fd78ee7 | ||
|
|
b8126d3a85 | ||
|
|
3054091688 | ||
|
|
6e0fd7ea5f | ||
|
|
bbb82029d2 | ||
|
|
716d7bcc92 | ||
|
|
e7a6bf0e19 | ||
|
|
27c17252e7 | ||
|
|
940254bec6 | ||
|
|
79952d52f1 | ||
|
|
e58545d3f6 | ||
|
|
b7c9643a05 | ||
|
|
c2be6c348a | ||
|
|
0161f81389 | ||
|
|
2a2df322dc | ||
|
|
b276b5fdce | ||
|
|
b5f7dabf10 | ||
|
|
307f8a07e0 | ||
|
|
3fe5e2becd | ||
|
|
e8a4acf517 | ||
|
|
9ba28c01e7 | ||
|
|
ff3b04f46d | ||
|
|
9f6f452b18 | ||
|
|
9b4e35841e | ||
|
|
927e260f5b | ||
|
|
949156f77c | ||
|
|
cc59fcac58 | ||
|
|
db624d8a8a | ||
|
|
ae90243352 | ||
|
|
ff58c7f699 | ||
|
|
bd9738f6f4 | ||
|
|
47e5c63290 | ||
|
|
2abdcac15c | ||
|
|
f0f12e4099 | ||
|
|
b1720317a4 | ||
|
|
d90f466b53 | ||
|
|
fec84a5efc | ||
|
|
1f3f869983 | ||
|
|
a6bd6f44bf | ||
|
|
78aac61fe1 | ||
|
|
8d735f0410 | ||
|
|
de014732c6 | ||
|
|
aae6511394 | ||
|
|
d973439b4f | ||
|
|
32adce2de8 | ||
|
|
2ac6378fea | ||
|
|
153b7df5fc | ||
|
|
9d9bdabf79 | ||
|
|
2f8eaeacf0 | ||
|
|
dc07a3cf32 | ||
|
|
b775e60d1b | ||
|
|
7290bccfd7 | ||
|
|
a1d884ec3f | ||
|
|
cc05d88618 | ||
|
|
2675fa53df | ||
|
|
59ee9198e2 | ||
|
|
5235936e7b | ||
|
|
03ab44ea10 | ||
|
|
b8c2d2b39b | ||
|
|
6ae7e71fbf | ||
|
|
c49740ed81 | ||
|
|
16c0a819a9 | ||
|
|
4a61fe73de | ||
|
|
a76feebe45 | ||
|
|
3a52eadeb1 | ||
|
|
dd56b7c385 | ||
|
|
f6f201085c | ||
|
|
daf09d9d4e | ||
|
|
511cdb2784 | ||
|
|
a567a9b777 | ||
|
|
05bc3af03d | ||
|
|
7a048d1702 | ||
|
|
8d7f9bcb8b | ||
|
|
9fd8b0f890 | ||
|
|
86873d0725 | ||
|
|
b22438b489 | ||
|
|
683b38a7ab | ||
|
|
d6b4fdd6d3 | ||
|
|
c996649954 | ||
|
|
d59ad77893 | ||
|
|
e637c20dee | ||
|
|
19dc588319 | ||
|
|
dc53ef2e71 | ||
|
|
e51d7f3c6d | ||
|
|
5a7e86e443 | ||
|
|
7f4edae006 | ||
|
|
2f4e1462e3 | ||
|
|
54f5d81a8c | ||
|
|
d33c27289a | ||
|
|
1675fdb499 | ||
|
|
9321109691 | ||
|
|
e6a4f939a3 | ||
|
|
c7ae214853 | ||
|
|
68a9cc047e | ||
|
|
1f2b25f852 | ||
|
|
20040c8857 | ||
|
|
ac64b0c11f | ||
|
|
ba47ce7ca8 | ||
|
|
be1ab4ea36 | ||
|
|
13cd9f3d04 | ||
|
|
8e1f82de5f | ||
|
|
8631ad3122 | ||
|
|
90e6aef9d7 | ||
|
|
698190fb72 | ||
|
|
27cfaa9404 | ||
|
|
9f296fe76d | ||
|
|
d0112adb08 | ||
|
|
75f4fe3595 | ||
|
|
211bfbc1e2 | ||
|
|
afaa1841fc | ||
|
|
027662c9c3 | ||
|
|
43e652321b | ||
|
|
83a2216d19 | ||
|
|
82ae568add | ||
|
|
2573003034 | ||
|
|
c33e873577 | ||
|
|
a1d03b8159 | ||
|
|
762530f6ab | ||
|
|
f53a3ecc69 | ||
|
|
1ed60fecee | ||
|
|
c1a12ea4e9 | ||
|
|
0efd235e36 | ||
|
|
c7be8c59f3 | ||
|
|
20bb3eb674 | ||
|
|
cde0e5883e | ||
|
|
0b43099621 | ||
|
|
386f36c3ae | ||
|
|
b391b2129e | ||
|
|
5478673bda | ||
|
|
6295048b3e | ||
|
|
4fa956aa27 | ||
|
|
21cce0e104 | ||
|
|
b14e72ddf7 | ||
|
|
7a34b6e18d | ||
|
|
ddc0e8eb45 | ||
|
|
7648ee6e54 | ||
|
|
2b86c912e3 | ||
|
|
342acedbec | ||
|
|
a83bf495b1 | ||
|
|
899829f1ac | ||
|
|
408a62115e | ||
|
|
430d0990aa | ||
|
|
47d33e7aaf | ||
|
|
12f40cba6d | ||
|
|
ecc0e9609a | ||
|
|
eb35a843c1 | ||
|
|
79289fe6c4 | ||
|
|
cb841adf86 | ||
|
|
724d82e6d2 | ||
|
|
0532910604 | ||
|
|
f4f5552975 | ||
|
|
3e2794548b | ||
|
|
f7b8ee168f | ||
|
|
e3297fe751 | ||
|
|
58ca741a1c | ||
|
|
14dbbc7bb4 | ||
|
|
df55c4032b | ||
|
|
3768155a20 | ||
|
|
2f3b9cadf4 | ||
|
|
2c79a6531a | ||
|
|
be5c856f4b | ||
|
|
712a333f08 | ||
|
|
b753e84c8c | ||
|
|
4b4acaadbb | ||
|
|
8a52f9b67d | ||
|
|
e372606281 | ||
|
|
c443d0a9da | ||
|
|
42c9ae9ea8 | ||
|
|
dac9bb4187 | ||
|
|
812d926f66 | ||
|
|
45831ea69f | ||
|
|
354e1d236b | ||
|
|
ac478039cf | ||
|
|
96f5799e6f | ||
|
|
e21479f696 | ||
|
|
25dc883e15 | ||
|
|
bfb1374ee3 | ||
|
|
cacd8f9792 | ||
|
|
3e9053a3c6 | ||
|
|
5fa357fec2 | ||
|
|
f109c3d696 | ||
|
|
b097ce7279 | ||
|
|
1297854935 | ||
|
|
0a1d0011f6 | ||
|
|
20db1be0a0 | ||
|
|
143f1d6144 | ||
|
|
358f6c9497 | ||
|
|
ca26544be8 | ||
|
|
5ceffddd5b | ||
|
|
8e3ddb96b3 | ||
|
|
377de36b35 | ||
|
|
4395e2f7ed | ||
|
|
1d0cc31b10 | ||
|
|
4b4b2ddcd4 | ||
|
|
3c9b5b786e | ||
|
|
08f1bea6ce | ||
|
|
a2cc5943e0 | ||
|
|
895ac6f0f7 | ||
|
|
759ca0253e | ||
|
|
0ca368c8d9 | ||
|
|
a467cc1b84 | ||
|
|
c65fd826a5 | ||
|
|
bd6f4e1b43 | ||
|
|
169520914f | ||
|
|
a163a0c446 | ||
|
|
295aeb0ed8 | ||
|
|
9b2fdad56c | ||
|
|
7a1184d3c5 | ||
|
|
b036244316 | ||
|
|
5ad5366e8a | ||
|
|
244677e524 | ||
|
|
f5a094a973 | ||
|
|
5681ebdb12 | ||
|
|
664fa5f08f | ||
|
|
14edec5eae | ||
|
|
6adfd2e739 | ||
|
|
34409f7a7d | ||
|
|
7e13d1052c | ||
|
|
eb1998c888 | ||
|
|
543252cbaf | ||
|
|
6df7c59876 | ||
|
|
f780e0afc3 | ||
|
|
310e8d3287 | ||
|
|
ba51bdf258 | ||
|
|
ef88b844fb | ||
|
|
67b96b0a26 | ||
|
|
562da30fb5 | ||
|
|
21175e8cf6 | ||
|
|
80d01f7158 | ||
|
|
90cac447e4 | ||
|
|
04bf5b0a8b | ||
|
|
d667c15b25 | ||
|
|
2123bf4b18 | ||
|
|
429a64f29e | ||
|
|
f39381dd6c | ||
|
|
0a9eb07f6f | ||
|
|
9c287e3fd7 | ||
|
|
cce4b2cb14 | ||
|
|
e49d9f8ab6 | ||
|
|
48cbeb28f4 | ||
|
|
57d5c54559 | ||
|
|
3b2260f67e | ||
|
|
d423a62327 | ||
|
|
ac8da00030 | ||
|
|
77eb7fb99d | ||
|
|
a751149dd3 | ||
|
|
69d45618c6 | ||
|
|
22fa1a28e5 | ||
|
|
f4cc233009 | ||
|
|
1d6e4edd0f | ||
|
|
daffa8cba0 | ||
|
|
2e161a1bc1 | ||
|
|
204bb00060 | ||
|
|
d6029a54aa | ||
|
|
f99b5c5a66 | ||
|
|
2df4119c1a | ||
|
|
d06b4e5dcd | ||
|
|
bf8a25137d | ||
|
|
0f302ad0fc | ||
|
|
e3d6b283c5 | ||
|
|
2e3ed09039 | ||
|
|
37971a3f07 | ||
|
|
2a1960f257 | ||
|
|
350564c304 | ||
|
|
9e2a9fea37 | ||
|
|
3592b43629 | ||
|
|
becf1fc459 | ||
|
|
2bccd058ed | ||
|
|
12c6621051 | ||
|
|
504bc6a875 | ||
|
|
9cfdd0b53f | ||
|
|
d59024f399 | ||
|
|
24e0178d1a | ||
|
|
1ede5775f2 | ||
|
|
a5c9b07052 | ||
|
|
22353d4833 | ||
|
|
7499ada891 | ||
|
|
3f0a4e5c39 | ||
|
|
b8d6472974 | ||
|
|
6358297724 | ||
|
|
4f6dcde980 | ||
|
|
8a7985c48e | ||
|
|
4ddbe54e55 | ||
|
|
ef0bf73a29 | ||
|
|
beda9014d8 | ||
|
|
498a429b2c | ||
|
|
6aa2aa0fb3 | ||
|
|
1bef88fccd | ||
|
|
8308068067 | ||
|
|
8385c7f1b0 | ||
|
|
0537d02fef | ||
|
|
c33a1a3b0b | ||
|
|
fd39999128 | ||
|
|
0aa40094fa | ||
|
|
e3bbbe07be | ||
|
|
5633798d33 | ||
|
|
0e7e1b1b75 | ||
|
|
4d3790bc1a | ||
|
|
2002c7f1f8 | ||
|
|
1be14e99a2 | ||
|
|
78efdaf85f | ||
|
|
0e98a1c656 | ||
|
|
7aa483e201 | ||
|
|
a6dbf05af4 | ||
|
|
8ab78fd8be | ||
|
|
4f119031a4 | ||
|
|
19bdd6c2db | ||
|
|
f1557b8243 | ||
|
|
85f96e2e01 | ||
|
|
47331cd919 | ||
|
|
d9f18ed6a7 | ||
|
|
efa4816371 | ||
|
|
2dc8c63adb | ||
|
|
c3c1781021 | ||
|
|
cd39480a98 | ||
|
|
281a1a206e | ||
|
|
cbff2a7bf2 | ||
|
|
2a08be8fd0 | ||
|
|
0826678209 | ||
|
|
f2e421bfa5 | ||
|
|
ce53a9b91a | ||
|
|
b166b1cf82 | ||
|
|
d09fbb03b2 | ||
|
|
7a835f3b10 | ||
|
|
6b991cdf9c | ||
|
|
018e9d0323 | ||
|
|
f499ae096f | ||
|
|
725e046a15 | ||
|
|
275b1f62b6 | ||
|
|
6e58dea198 | ||
|
|
ad4e62c8c3 | ||
|
|
a5768d55d8 | ||
|
|
7db49971c8 | ||
|
|
45ca6631ac | ||
|
|
d51944f36c | ||
|
|
037c79fb0f | ||
|
|
993373414f | ||
|
|
38a0a9992a | ||
|
|
a82bbe3776 | ||
|
|
a32ba217ba | ||
|
|
d322cf54ac | ||
|
|
b1d07a231d | ||
|
|
97851a08e6 | ||
|
|
8547b30a8f | ||
|
|
405c7d9ed0 | ||
|
|
ac5b641d93 | ||
|
|
06a79989c0 | ||
|
|
671db64436 | ||
|
|
33344cefe6 | ||
|
|
5ef0341537 | ||
|
|
6abca08189 | ||
|
|
35670ce651 | ||
|
|
e230d53d84 | ||
|
|
88537a3471 | ||
|
|
7c9d74da73 | ||
|
|
3b582935ee | ||
|
|
508fafb875 | ||
|
|
6f718f0fe5 | ||
|
|
53acbf2052 | ||
|
|
1606dbbe77 | ||
|
|
adced3ac6c | ||
|
|
14f207140a | ||
|
|
d2da32de6c | ||
|
|
e5d6a36f05 | ||
|
|
68ecfcf876 | ||
|
|
fcb14b9dfe | ||
|
|
6a4b4257a6 | ||
|
|
385b57e269 | ||
|
|
a8e81e3984 | ||
|
|
46c5f0e752 | ||
|
|
454d859fdd | ||
|
|
57134a182c | ||
|
|
5801e143ea | ||
|
|
4e0d0ff98b | ||
|
|
d4ac1849ae | ||
|
|
c16ac1bd8c | ||
|
|
16222ac3bc | ||
|
|
8d88931fb1 | ||
|
|
63f0356e70 | ||
|
|
786b0dee6f | ||
|
|
e7ef9dc295 | ||
|
|
f59461b95d | ||
|
|
566a86b9fd | ||
|
|
8589a3730d | ||
|
|
c05fd366df | ||
|
|
fc9fd1e53c | ||
|
|
a5e6eb9f7c | ||
|
|
a9430fea5f | ||
|
|
828a0d6589 | ||
|
|
32601da748 | ||
|
|
ac50f119cf | ||
|
|
7622ebaa0a | ||
|
|
a586d5cd37 | ||
|
|
edbc88bd19 | ||
|
|
94f99f3414 | ||
|
|
fd4f84349e | ||
|
|
f86350b2ff | ||
|
|
564b72066a | ||
|
|
2890c52090 | ||
|
|
c1d45485c1 | ||
|
|
8b2a69cf8d | ||
|
|
034c1341b3 | ||
|
|
29bbf1a030 | ||
|
|
be6661d6be | ||
|
|
3f876e792c | ||
|
|
f2457b90ff | ||
|
|
e999e9009b | ||
|
|
46326c001b | ||
|
|
b84c2c403c | ||
|
|
861ad72187 | ||
|
|
7dbbc34ccc | ||
|
|
4ea45d1d14 | ||
|
|
c1b9243e2f | ||
|
|
a41c40c7a4 | ||
|
|
318d4547ef | ||
|
|
6f98b60a6a | ||
|
|
baa8f7f3c4 | ||
|
|
6297622072 | ||
|
|
9f3ba0bf2b | ||
|
|
9591dec708 | ||
|
|
ee2d0b7518 | ||
|
|
2d46749c58 | ||
|
|
494664d1b6 | ||
|
|
49686210ae | ||
|
|
ddfa44188b | ||
|
|
73cf93d27b | ||
|
|
60d1a34bf0 | ||
|
|
6f80986801 | ||
|
|
2078f087b2 | ||
|
|
68d110826e | ||
|
|
9fb04c54ae | ||
|
|
d82314594b | ||
|
|
ad169a5248 | ||
|
|
a9bab81226 | ||
|
|
fa63a9ba51 | ||
|
|
1e7a630737 | ||
|
|
de1afce8da | ||
|
|
ac3cb19c26 | ||
|
|
af0479d11d | ||
|
|
0d9c04707f | ||
|
|
c2218f133b | ||
|
|
1ad0645fab | ||
|
|
3c16f6839a | ||
|
|
e8bac1e469 | ||
|
|
b3b69596f4 | ||
|
|
6a7bcb0956 | ||
|
|
f18a0704c1 | ||
|
|
d6f24b7c1e | ||
|
|
e2c9bbf94c | ||
|
|
f53aa4f656 | ||
|
|
a7ab9b8bf8 | ||
|
|
4448271166 | ||
|
|
4861b535a2 | ||
|
|
167f0100c7 | ||
|
|
b0367c7a5c | ||
|
|
4ae8ad52f5 | ||
|
|
dbd64828ab | ||
|
|
158ca882ba | ||
|
|
623ed44608 | ||
|
|
f13b867626 | ||
|
|
ff85325886 | ||
|
|
aa830116ea | ||
|
|
1a4504ba28 | ||
|
|
20365c4627 | ||
|
|
fae8f89ed6 | ||
|
|
a0689999fe | ||
|
|
a42a0ab032 | ||
|
|
b66eb5d3ec | ||
|
|
8b4bc0f56e | ||
|
|
c9d984983f | ||
|
|
47125b051a | ||
|
|
e5e6ff6031 | ||
|
|
9f0aedb608 | ||
|
|
08af33ece5 | ||
|
|
9b421d0b94 | ||
|
|
7bd8d2dd25 | ||
|
|
a7c4879a0a | ||
|
|
8b3585a6b8 | ||
|
|
a223149aee | ||
|
|
9185341b0c | ||
|
|
bf2d707e13 | ||
|
|
f081e5c54d | ||
|
|
18a3db0f31 | ||
|
|
d2c115127d | ||
|
|
c12e7e1b8f | ||
|
|
d3495ab3aa | ||
|
|
b93a7a6195 | ||
|
|
e5519a8498 | ||
|
|
eb2256f873 | ||
|
|
637b137b1c | ||
|
|
e2d14e73bf | ||
|
|
fbbffb4672 | ||
|
|
422e098727 | ||
|
|
87347e30b2 | ||
|
|
3314ce9823 | ||
|
|
402c1fe614 | ||
|
|
1d57856aa8 | ||
|
|
c027c215d6 | ||
|
|
fa0428b9fe | ||
|
|
b01c499ce5 | ||
|
|
4e5033dd24 | ||
|
|
00863f3830 | ||
|
|
2d4b35e8b9 | ||
|
|
6e4f2b9466 | ||
|
|
9a6fc0253b | ||
|
|
3180c781ed | ||
|
|
632152e8b6 | ||
|
|
1048f7e98d | ||
|
|
3de265216e | ||
|
|
2bdcadc7ab | ||
|
|
421ddfc68e | ||
|
|
41594bc1ac | ||
|
|
e85199d464 | ||
|
|
a6ee3bc704 | ||
|
|
2909106f30 | ||
|
|
05b97aabb2 | ||
|
|
84af60d817 | ||
|
|
72403a2512 | ||
|
|
4ec619d646 | ||
|
|
6178a627a0 | ||
|
|
3095fd7e4a | ||
|
|
74a6041760 | ||
|
|
96127e37ff | ||
|
|
df5484ea35 | ||
|
|
0ae3dae030 | ||
|
|
e5979139ac | ||
|
|
f81f6deb20 | ||
|
|
f9951909d8 | ||
|
|
bbda972b05 | ||
|
|
4445e9c434 | ||
|
|
709adacac2 | ||
|
|
9841cdd355 | ||
|
|
4cabe5fd71 | ||
|
|
0db239f8a0 | ||
|
|
32fb1706c8 | ||
|
|
c9e6cd9796 | ||
|
|
81677528a5 | ||
|
|
7761baba10 | ||
|
|
52d252723f | ||
|
|
d476709b59 | ||
|
|
0910e3da74 | ||
|
|
2cc7b7c817 | ||
|
|
011a95ebbd | ||
|
|
bbdc086a1f | ||
|
|
7d6617d21e | ||
|
|
f684baeeb9 | ||
|
|
308104853b | ||
|
|
6953bcac35 | ||
|
|
69e9fa4721 | ||
|
|
72d154c5e0 | ||
|
|
84b0a96170 | ||
|
|
6d3b8f7a09 | ||
|
|
81749ac1c9 | ||
|
|
65989c29b7 | ||
|
|
ec4e58f25c | ||
|
|
0c699c2a19 | ||
|
|
739a938d32 | ||
|
|
61ad405b4a | ||
|
|
700e649e76 | ||
|
|
7bfdb1f0eb | ||
|
|
0c0280b2a9 | ||
|
|
57a1871077 | ||
|
|
ee972ad29f | ||
|
|
29c8475ea9 | ||
|
|
6dd0f6ed63 | ||
|
|
fc2d7ae446 | ||
|
|
d232ac0334 | ||
|
|
6e8dd68c8a | ||
|
|
495cc1b38d | ||
|
|
d90e74b1a3 | ||
|
|
bbd8a4b729 | ||
|
|
cae3e18717 | ||
|
|
0e989a7422 | ||
|
|
7b7ce5bb57 | ||
|
|
df95cdaad0 | ||
|
|
3026b6e5c2 | ||
|
|
b3306c5572 | ||
|
|
9ef3be33e5 | ||
|
|
292262c128 | ||
|
|
e54bfe9197 | ||
|
|
c56cfe9e1d | ||
|
|
f6b6a3285c | ||
|
|
6b031b0fdf | ||
|
|
2dab7025ba | ||
|
|
7403114897 | ||
|
|
82cbeec560 | ||
|
|
df6b4ac566 | ||
|
|
4ba21ab526 | ||
|
|
acac7a7b31 | ||
|
|
2290fd09f5 | ||
|
|
f02b6a1773 | ||
|
|
efffe05d42 | ||
|
|
950d67c522 | ||
|
|
a1aa61f54e | ||
|
|
3c2bd66460 | ||
|
|
245cebee56 | ||
|
|
c45364fdb3 | ||
|
|
e380308604 | ||
|
|
bd019524dd | ||
|
|
895536d7d3 | ||
|
|
3a0e41afd1 | ||
|
|
23dd28471e | ||
|
|
761217d403 | ||
|
|
77ed694111 | ||
|
|
61bcce3104 | ||
|
|
bf41b12ccd | ||
|
|
5eabd7d8d8 | ||
|
|
0c66f5f3af | ||
|
|
3190f784d9 | ||
|
|
394ff55879 | ||
|
|
9b846835bc | ||
|
|
01776af167 | ||
|
|
0db10424ad | ||
|
|
bafd7ea073 | ||
|
|
0ab27fcb4b | ||
|
|
95d016712e | ||
|
|
fcb55001bb | ||
|
|
7bc6961101 | ||
|
|
450e88fad8 | ||
|
|
3222b4c311 | ||
|
|
1e0cc3605d | ||
|
|
129b7bfeb7 | ||
|
|
388811b684 | ||
|
|
f83257407b | ||
|
|
e4ced77340 | ||
|
|
92e0bc316a | ||
|
|
a4a55f35b2 | ||
|
|
ed1150c189 | ||
|
|
08080f4e86 | ||
|
|
de4ebb8be6 | ||
|
|
11e2ce5093 | ||
|
|
2c560e6f2b | ||
|
|
643f394e6a | ||
|
|
6d047c2856 | ||
|
|
be86746685 | ||
|
|
da429b9629 | ||
|
|
b21a206c26 | ||
|
|
85bde8ba3a | ||
|
|
f84e658e6b | ||
|
|
8f0eba8bcd | ||
|
|
2faaaf78a8 | ||
|
|
7f659dace2 | ||
|
|
54cdd566c7 | ||
|
|
e212df87f9 | ||
|
|
4fb4db15e8 | ||
|
|
9a15a25a7b | ||
|
|
c02cfb9b17 | ||
|
|
3e726f21f7 | ||
|
|
21d4faa26f | ||
|
|
1d13d0ee07 | ||
|
|
329d13e480 | ||
|
|
2161c09b1d | ||
|
|
3f2e396c3c | ||
|
|
412e242109 | ||
|
|
e827516b72 | ||
|
|
7f953e98d7 | ||
|
|
821d3fe783 | ||
|
|
fdb4b302ac | ||
|
|
760d5d4a09 | ||
|
|
d561f98c42 | ||
|
|
ea74f276dc | ||
|
|
42cf82a5d5 | ||
|
|
825a6700da | ||
|
|
2f27645dac | ||
|
|
1e5b44d063 | ||
|
|
099ad9945d | ||
|
|
540ce3d946 | ||
|
|
ac2efcc993 | ||
|
|
b4bb1d9e37 | ||
|
|
9ec8b30934 | ||
|
|
fb38e5b35b | ||
|
|
5fa10e9d84 | ||
|
|
3bc1b5bd46 | ||
|
|
b266b399ba | ||
|
|
0e827a457d | ||
|
|
d05d85b243 | ||
|
|
a1faa8d804 | ||
|
|
70adbf90c2 | ||
|
|
501c04f4b6 | ||
|
|
d294e62be1 | ||
|
|
31f90b6c53 | ||
|
|
184d29c592 | ||
|
|
2d798bc4ec | ||
|
|
bd9a3761a6 | ||
|
|
b1063b0a9e | ||
|
|
cb2fffab92 | ||
|
|
55cca49428 | ||
|
|
5a0ab9ed8a | ||
|
|
1f2cfdfd84 | ||
|
|
dfd688caa6 | ||
|
|
830e3e339c | ||
|
|
bc9f560950 | ||
|
|
f91b748f50 | ||
|
|
3adbd7468c | ||
|
|
b66039ee24 | ||
|
|
27371f6475 | ||
|
|
19e7c34b47 | ||
|
|
3375aff3a7 | ||
|
|
41e9cb5ca3 | ||
|
|
6348860adf | ||
|
|
4e9d401002 | ||
|
|
3db2fc7d0f | ||
|
|
0101d76113 | ||
|
|
6fabab6d4b | ||
|
|
905f1b0aaf | ||
|
|
6a5ab8e70c | ||
|
|
943b037589 | ||
|
|
5624cd44de | ||
|
|
8529f8b843 | ||
|
|
08be7c43cf | ||
|
|
aae76207ec | ||
|
|
5434f8330e | ||
|
|
e18b4ed119 | ||
|
|
51f6ffc093 | ||
|
|
72de7c6b14 | ||
|
|
bd4785d631 | ||
|
|
cb08f12470 | ||
|
|
04146db69b | ||
|
|
d3fe045a39 | ||
|
|
2be1e16087 | ||
|
|
051e44ae3e | ||
|
|
6d5ae7a258 | ||
|
|
2e69e140eb | ||
|
|
516c4e2c39 | ||
|
|
b58ed62000 | ||
|
|
c685818783 | ||
|
|
3e20ce56c9 | ||
|
|
dd8d67f659 | ||
|
|
5ef4061819 | ||
|
|
a146a0c819 | ||
|
|
0f5a93cdf1 | ||
|
|
7db51e913e | ||
|
|
93ac1aebf7 | ||
|
|
56ebedb9de | ||
|
|
e87d33de50 | ||
|
|
a5774fd793 | ||
|
|
adb60f3400 | ||
|
|
47a0f63caa | ||
|
|
30a385a7bb | ||
|
|
9f2ae1773c | ||
|
|
f470297958 | ||
|
|
93dfc7995c | ||
|
|
c96869817f | ||
|
|
1bffa0e00b | ||
|
|
36035dda01 | ||
|
|
50a15cf089 | ||
|
|
b59d4ed4a4 | ||
|
|
4c53710279 | ||
|
|
2274e88485 | ||
|
|
984a4677f2 | ||
|
|
5e3dc54725 | ||
|
|
53a7bf9773 | ||
|
|
1dcc3897d6 | ||
|
|
fbc0375739 | ||
|
|
4a74c03fa4 | ||
|
|
d8833e6ce2 | ||
|
|
2b8b9a56aa | ||
|
|
85a8ebb357 | ||
|
|
a67d9e2524 | ||
|
|
6845e72fd5 | ||
|
|
0ab977fa05 | ||
|
|
ad64a12b2a | ||
|
|
cfde4b50bb | ||
|
|
f302c8eb95 | ||
|
|
7ecc355358 | ||
|
|
a52216d7e7 | ||
|
|
8d8d4b667d | ||
|
|
670369121e | ||
|
|
4365e580ee | ||
|
|
a8a09a905e | ||
|
|
dbb7381eb1 | ||
|
|
aa3531a6bf | ||
|
|
2848203d75 | ||
|
|
f0aef0703c | ||
|
|
7356a511e0 | ||
|
|
5be26a3cff | ||
|
|
36a80acb0c | ||
|
|
37ab03b49d | ||
|
|
75209cb40e | ||
|
|
4b2d274748 | ||
|
|
1423495b88 | ||
|
|
42e4ec8890 | ||
|
|
58fbd51ef4 | ||
|
|
7552dbb812 | ||
|
|
31e0ecb71d | ||
|
|
f6743a4f87 | ||
|
|
5f574949e6 | ||
|
|
724bce4fb9 | ||
|
|
8d59f025af | ||
|
|
aad44f4716 | ||
|
|
0a38d7d213 | ||
|
|
4fcd60fd95 | ||
|
|
38beeb8cb0 | ||
|
|
26f0acab35 | ||
|
|
3897973bc1 | ||
|
|
7b3da27461 | ||
|
|
a85ee5f31c | ||
|
|
b272863aa0 | ||
|
|
8249964380 | ||
|
|
af81bbb299 | ||
|
|
d818dd9c80 | ||
|
|
fe8e34dece | ||
|
|
ba928989f7 | ||
|
|
742f973028 | ||
|
|
043932fcbe | ||
|
|
ad5e096caa | ||
|
|
06c8fc8f78 | ||
|
|
487338d10c | ||
|
|
3d1c0e5667 | ||
|
|
ce3bb191c4 | ||
|
|
03e9dbf364 | ||
|
|
518aab3d02 | ||
|
|
f055664f77 | ||
|
|
ba3e01f2ce | ||
|
|
b6883c8a45 | ||
|
|
9e49ee3acb | ||
|
|
7481f68bb2 | ||
|
|
99792eec03 | ||
|
|
91458c7845 | ||
|
|
cad5849dc0 | ||
|
|
a38e120e99 | ||
|
|
0b31a78cf2 | ||
|
|
861858c1a6 | ||
|
|
d43a2277da | ||
|
|
f678dc96b8 | ||
|
|
c2e371904e | ||
|
|
2a1cbff22e | ||
|
|
a2d9f277c4 | ||
|
|
d939059417 | ||
|
|
740cd4cfed | ||
|
|
91a5306a67 | ||
|
|
b78ffcbffd | ||
|
|
4f72f557b7 | ||
|
|
e3b21d6d0d | ||
|
|
af28c49d8d | ||
|
|
67f4635573 | ||
|
|
5f8d10908d | ||
|
|
7307421812 | ||
|
|
5cd3b628c5 | ||
|
|
29e483ab64 | ||
|
|
66ddba45af | ||
|
|
9325b3f035 | ||
|
|
522c4c94e1 | ||
|
|
730505cff3 | ||
|
|
019783e1fa | ||
|
|
8612bb6480 | ||
|
|
7f1e6d21d9 | ||
|
|
e6c0371be1 | ||
|
|
58feaa7e0c | ||
|
|
a828378466 | ||
|
|
53316e8b06 | ||
|
|
6127e390a1 | ||
|
|
4caa77f6b1 | ||
|
|
70419e8757 | ||
|
|
21d8bd1406 | ||
|
|
25abee3259 | ||
|
|
2d490c2b7a | ||
|
|
902b7895b7 | ||
|
|
1c80bb649f | ||
|
|
4508215617 | ||
|
|
739b68347a | ||
|
|
d834760cda | ||
|
|
1bc78650bf | ||
|
|
ec4e203099 | ||
|
|
d23528da82 | ||
|
|
7401a0ba23 | ||
|
|
b14b4f08b1 | ||
|
|
70ece81340 | ||
|
|
19ac350527 | ||
|
|
a9b08d7db8 | ||
|
|
df8fa05632 | ||
|
|
6556137aad | ||
|
|
aa1ab2bbb4 | ||
|
|
be38d86521 | ||
|
|
3931afb6b1 | ||
|
|
7d2df86b75 | ||
|
|
5a3bd5839b | ||
|
|
b91ce9a3f7 | ||
|
|
ac889dd329 | ||
|
|
420df9b6ed | ||
|
|
f862b6811d | ||
|
|
c072698927 | ||
|
|
d22895831b | ||
|
|
3c41f4ade4 | ||
|
|
335d5fb984 | ||
|
|
66bd2b8fac | ||
|
|
fed3cad3b8 | ||
|
|
b20578f24f | ||
|
|
7a86e7f777 | ||
|
|
16c93fcad6 | ||
|
|
edd66d8d89 | ||
|
|
3ba39b6efe | ||
|
|
c656a1a169 | ||
|
|
19f03e419a | ||
|
|
5a281d5999 | ||
|
|
d80d14f585 | ||
|
|
520b8511bd | ||
|
|
91627d4f22 | ||
|
|
a21147c7a5 | ||
|
|
d22c1dee49 | ||
|
|
95b0fc7480 | ||
|
|
b40d5d7984 | ||
|
|
2df93c9df3 | ||
|
|
51cdea4b17 | ||
|
|
f229e64744 | ||
|
|
0f15955a41 | ||
|
|
390e6c2eed | ||
|
|
877eaccd6d | ||
|
|
6424e655a1 | ||
|
|
176037082b | ||
|
|
a361c7e426 | ||
|
|
caba0c1695 | ||
|
|
71b3f9fefc | ||
|
|
91f8507e51 | ||
|
|
b68e81a126 | ||
|
|
72658025f1 | ||
|
|
93aea240d6 | ||
|
|
7717b37c36 | ||
|
|
e1b2990fb0 | ||
|
|
e49194c6ee | ||
|
|
79ab150546 | ||
|
|
fc658d15d4 | ||
|
|
76d130ef82 | ||
|
|
3e9a55fbdb | ||
|
|
b071397d46 | ||
|
|
df0dd55635 | ||
|
|
960d08fd24 | ||
|
|
38603916a2 | ||
|
|
0ed1bb4017 | ||
|
|
b4ac0c9f6c | ||
|
|
b136af88ad | ||
|
|
508b5f9aae | ||
|
|
43dff67a60 | ||
|
|
41b850321f | ||
|
|
523237007b | ||
|
|
a3f6c5fd9c | ||
|
|
785cdc8726 | ||
|
|
cbf12b5601 | ||
|
|
1a6d59d9c0 | ||
|
|
23ae054abb | ||
|
|
b57852d3d8 | ||
|
|
c0e1be2f3a | ||
|
|
a442a15a8d | ||
|
|
f91bf634ad | ||
|
|
ce4311c3df | ||
|
|
08e69cb541 | ||
|
|
f8e2eaed73 | ||
|
|
e68a16e73d | ||
|
|
ca191fbd92 | ||
|
|
10276826c0 | ||
|
|
02c9129903 | ||
|
|
04e4c902bd | ||
|
|
0663ae77de | ||
|
|
0c0f5ea093 | ||
|
|
f450fd633e | ||
|
|
59cdd35f61 | ||
|
|
eab67cbda4 | ||
|
|
b3c4a48641 | ||
|
|
07ac8ed341 | ||
|
|
e32aa218fc | ||
|
|
09d11d36c3 | ||
|
|
629e287526 | ||
|
|
e2cd29c824 | ||
|
|
69e597dbe7 | ||
|
|
152e7ebac9 | ||
|
|
8d4451ed85 | ||
|
|
5b8836d4b8 | ||
|
|
be7086579e | ||
|
|
ab16c8f1fe | ||
|
|
6bb71ee5e3 | ||
|
|
ebb4ebea97 | ||
|
|
bf97e62d56 | ||
|
|
47645cddb6 | ||
|
|
cf2af56a05 | ||
|
|
50d1ae42c9 | ||
|
|
9501498a7e | ||
|
|
614ab08099 | ||
|
|
64ee338433 | ||
|
|
43556238d0 | ||
|
|
58d7ac0520 | ||
|
|
0754678ce7 | ||
|
|
2bea176816 | ||
|
|
fa90333219 | ||
|
|
e007b3bc0f | ||
|
|
978e83567b | ||
|
|
d01c1190cd | ||
|
|
0b1855df9b | ||
|
|
951f2785cc | ||
|
|
30090d3f8d | ||
|
|
b6ad67891c | ||
|
|
b61c9db6e6 | ||
|
|
29368ec2ee | ||
|
|
88ff86c910 | ||
|
|
0cc5ae521c | ||
|
|
da1b5ed9a0 | ||
|
|
f786d05c04 | ||
|
|
0bcbe9047e | ||
|
|
585346f753 | ||
|
|
324aa01f80 | ||
|
|
8d0adfa6b7 | ||
|
|
bffae3724c | ||
|
|
a60dc3d1c8 | ||
|
|
df9977d4da | ||
|
|
c31678d28e | ||
|
|
40c1a5a3ee | ||
|
|
846dbd9338 | ||
|
|
2bfed13ebc | ||
|
|
2a5c625a7f | ||
|
|
7660e4a5f1 | ||
|
|
779672a5b5 | ||
|
|
46e9ac86bc | ||
|
|
8d6ca79934 | ||
|
|
2212d1eebe | ||
|
|
c78c284f19 | ||
|
|
b6b30637c6 | ||
|
|
b17198697c | ||
|
|
3ec57a608d | ||
|
|
49cd14846c | ||
|
|
1fd794a5bc | ||
|
|
5848991c27 | ||
|
|
d71f92d034 | ||
|
|
f9719ae7f5 | ||
|
|
4e0be6645a | ||
|
|
da25a18610 | ||
|
|
7bc3aa52d4 | ||
|
|
ca5bb13096 | ||
|
|
da124475fa | ||
|
|
ff04b2e481 | ||
|
|
09d66135b2 | ||
|
|
65cb72f7e8 | ||
|
|
8ae1f93899 | ||
|
|
0017f81da5 | ||
|
|
8c782c5b4e | ||
|
|
ffd283d779 | ||
|
|
b9227e11df | ||
|
|
5a289add73 | ||
|
|
614254a40d | ||
|
|
e31981c4c8 | ||
|
|
eb67e7757b | ||
|
|
ececf4a76e | ||
|
|
0a437420d8 | ||
|
|
b6ddc22c80 | ||
|
|
83d88affb7 | ||
|
|
5ae835db6c | ||
|
|
47e16f5525 | ||
|
|
a6a3dffbd6 | ||
|
|
9d1fcb19bf | ||
|
|
7176277ddb | ||
|
|
d9acf28ea5 | ||
|
|
00bbb8b159 | ||
|
|
dbe22e99ee | ||
|
|
361aa04c6d | ||
|
|
7e82b93a84 | ||
|
|
36731d2606 | ||
|
|
2e3ca89e0b | ||
|
|
394c4d0791 | ||
|
|
2bc3d991c1 | ||
|
|
a479ea971d | ||
|
|
075a491847 | ||
|
|
fefaea005b | ||
|
|
c564fa6165 | ||
|
|
0f4d6b5f8b | ||
|
|
55059d60e7 | ||
|
|
d45b590e59 | ||
|
|
76938d27f9 | ||
|
|
e89b5a2d91 | ||
|
|
a9ffc57ce6 | ||
|
|
97fdee4616 | ||
|
|
f9884f3e9d | ||
|
|
87b9dbf36b | ||
|
|
415c49fdb9 | ||
|
|
89cbe86ad9 | ||
|
|
db605a774c | ||
|
|
0e00cf4ee9 | ||
|
|
5bfac19a2e | ||
|
|
ea34bd0950 | ||
|
|
eea301cb53 | ||
|
|
bb62c3a9b4 | ||
|
|
879d31a555 | ||
|
|
104007b8cd | ||
|
|
116f8b805e | ||
|
|
b95b731817 | ||
|
|
365d5285b3 | ||
|
|
0bd4f230d2 | ||
|
|
392b9e7a12 | ||
|
|
f60fc18d1b | ||
|
|
524dcf86be | ||
|
|
a1d634dcb6 | ||
|
|
d88bcf4a33 | ||
|
|
a540d139af | ||
|
|
06a4085aa6 | ||
|
|
225749e6aa | ||
|
|
a169dc02fc | ||
|
|
8cc9b44975 | ||
|
|
5c478cd6c9 | ||
|
|
a2ffdfcc4f | ||
|
|
5ba43e981d | ||
|
|
87c948bb03 | ||
|
|
e4c85b7a49 | ||
|
|
04f6b3223b | ||
|
|
9b3d4281ad | ||
|
|
e0dd960ba6 | ||
|
|
f51e4f0fda | ||
|
|
4a04089285 | ||
|
|
47cb7a4e01 | ||
|
|
904f6f55f5 | ||
|
|
d2e2bf982e | ||
|
|
ab59a2e575 | ||
|
|
e12462630e | ||
|
|
65f62d6012 | ||
|
|
0e6f7f5e35 | ||
|
|
a8e977f8b7 | ||
|
|
8dac9848ee | ||
|
|
e0129313c4 | ||
|
|
85c5dc6d26 | ||
|
|
84a9aa22b4 | ||
|
|
102cbcc181 | ||
|
|
db37d11d52 | ||
|
|
dad6343f1e | ||
|
|
eaecc4d3f4 | ||
|
|
9c1b04b3fe | ||
|
|
f9e28c39f9 | ||
|
|
63983d4f49 | ||
|
|
a39088084e | ||
|
|
5973cb7631 | ||
|
|
9a9da33989 | ||
|
|
8a5df61642 | ||
|
|
6ca72652a3 | ||
|
|
ce1a0c3605 | ||
|
|
920699e17b | ||
|
|
83f24cd94f | ||
|
|
c9aa3000d1 | ||
|
|
08d2a36f2f | ||
|
|
eebe3733fc | ||
|
|
67aab59d19 | ||
|
|
c1e4e42763 | ||
|
|
f3b85cec38 | ||
|
|
dc346f126d | ||
|
|
b565353372 | ||
|
|
b1e70ef272 | ||
|
|
ae072a2fa3 | ||
|
|
39d8fe3523 | ||
|
|
048638cdda | ||
|
|
70ae23809f | ||
|
|
260d66b20f | ||
|
|
4b38ffdf12 | ||
|
|
7ff0315ae9 | ||
|
|
ce5a828896 | ||
|
|
a6686ab4a2 | ||
|
|
55e07e7326 | ||
|
|
3cd69d3cb4 | ||
|
|
8531f8b5b4 | ||
|
|
9a6eef11ea | ||
|
|
ede057e8d1 | ||
|
|
22d3a18116 | ||
|
|
d37d2c08d9 | ||
|
|
49a9dfb0d3 | ||
|
|
69d85c5228 | ||
|
|
6d5ed33b54 | ||
|
|
d380f4571b | ||
|
|
418e9ff265 | ||
|
|
c31b2e1d27 | ||
|
|
38280bed8a | ||
|
|
f4e09f9e96 | ||
|
|
ce88211f50 | ||
|
|
f8d91f559a | ||
|
|
b936e3994b | ||
|
|
bf5a11e1a3 | ||
|
|
0fac20e467 | ||
|
|
0a990f91ee | ||
|
|
c0d14e6d62 | ||
|
|
01455ed0c2 | ||
|
|
727eebfabc | ||
|
|
8841d03fe5 | ||
|
|
4828cfdbf6 | ||
|
|
41310f5a05 | ||
|
|
d3325809ab | ||
|
|
1a538a0112 | ||
|
|
b64ac87881 | ||
|
|
2fe7595d76 | ||
|
|
5a22d20ed4 | ||
|
|
df0bcfc1d2 | ||
|
|
22c169fea8 | ||
|
|
87cfe53b52 | ||
|
|
2db390d2e2 | ||
|
|
f2128d4cb6 | ||
|
|
02a7023040 | ||
|
|
931e7a7b26 | ||
|
|
05b3808e5c | ||
|
|
bc95350f1e | ||
|
|
0ff20006c7 | ||
|
|
1ba2968df8 | ||
|
|
c4fd7e3176 | ||
|
|
e1cf4d5e70 | ||
|
|
31bc3c8aa8 | ||
|
|
dd917df96f | ||
|
|
a15e9bc2b4 | ||
|
|
254f340f4c | ||
|
|
800438a1d1 | ||
|
|
8eb2028cf2 | ||
|
|
ef2aa97967 | ||
|
|
165db3d5b6 | ||
|
|
76e0c78d15 | ||
|
|
2d5d6d1f56 | ||
|
|
6248fd1808 | ||
|
|
2c9465b4bb | ||
|
|
7897067eda | ||
|
|
3c53ab13c9 | ||
|
|
f32e0027ad | ||
|
|
4c46eb5fee | ||
|
|
a1fc29e66d | ||
|
|
8e17c968e2 | ||
|
|
ef9f13e83d | ||
|
|
b5cb430fe4 | ||
|
|
a12cd4234c | ||
|
|
100f038ae1 | ||
|
|
e1730460fe | ||
|
|
00c2383738 | ||
|
|
0f167686d9 | ||
|
|
d0be59edff | ||
|
|
dfbbafe87b | ||
|
|
3183d6340e |
5
.gitattributes
vendored
Normal file
5
.gitattributes
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
.gitignore export-ignore
|
||||
.gitattributes export-ignore
|
||||
remind.php export-ignore
|
||||
sync-to-dianne-git export-ignore
|
||||
php export-ignore
|
||||
2
.github/FUNDING.yml
vendored
Normal file
2
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
liberapay: dskoll
|
||||
7
.github/README.md
vendored
Normal file
7
.github/README.md
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
# Remind has moved
|
||||
|
||||
For various reasons, I have decided to move Remind off GitHub. This repo
|
||||
will be archived. To create merge requests or issues, please visit
|
||||
Remind's new home at https://salsa.debian.org/dskoll/remind
|
||||
|
||||
-- Dianne Skoll
|
||||
29
.github/workflows/github-action.yml
vendored
Normal file
29
.github/workflows/github-action.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
# language: bash
|
||||
---
|
||||
|
||||
name: Remind unit tests
|
||||
|
||||
on:
|
||||
push
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Remind
|
||||
uses: actions/checkout@v2
|
||||
- name: Add test user
|
||||
run: |
|
||||
sudo adduser --home /home/testuser --gecos 'Test User' --disabled-password testuser
|
||||
- name: Fix ownership
|
||||
run: |
|
||||
sudo chown -R testuser .
|
||||
- name: Build
|
||||
run: |
|
||||
sudo su -c './configure && make' testuser
|
||||
- name: Run Tests
|
||||
run: |
|
||||
sudo su -c 'make test' testuser
|
||||
- name: Fix up permissions so GitHub does not complain
|
||||
run: |
|
||||
sudo chmod -R a+rwX .
|
||||
34
.gitignore
vendored
Normal file
34
.gitignore
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
*.bak
|
||||
*.o
|
||||
*~
|
||||
.gitignore
|
||||
MYMETA.json
|
||||
MYMETA.yml
|
||||
Makefile
|
||||
TAGS
|
||||
autom4te.cache
|
||||
blib/
|
||||
config.log
|
||||
config.status
|
||||
man/rem.1
|
||||
man/rem2ps.1
|
||||
man/remind.1
|
||||
man/tkremind.1
|
||||
pm_to_blib
|
||||
rem2html/Makefile
|
||||
rem2html/rem2html.1
|
||||
rem2pdf/Makefile.PL
|
||||
rem2pdf/Makefile.old
|
||||
rem2pdf/Makefile.top
|
||||
rem2pdf/bin/rem2pdf
|
||||
set-irc-topic
|
||||
src/*.tar.gz*
|
||||
src/Makefile
|
||||
src/config.h
|
||||
src/rem2ps
|
||||
src/remind
|
||||
src/test-*.out
|
||||
src/version.h
|
||||
tests/test.out
|
||||
www/Makefile
|
||||
gmon.out
|
||||
13
.gitlab-ci.yml
Normal file
13
.gitlab-ci.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
tests:
|
||||
image: 'debian:stable-slim'
|
||||
before_script:
|
||||
- apt update && apt-get -y install gcc make
|
||||
- useradd --create-home testuser
|
||||
- chown -R testuser .
|
||||
- chmod -R go-w .
|
||||
script:
|
||||
- LANG=C.UTF-8 su testuser -c './configure && make all && make test'
|
||||
artifacts:
|
||||
when: always
|
||||
paths:
|
||||
- tests/test.out
|
||||
71
COPYRIGHT
71
COPYRIGHT
@@ -1,25 +1,15 @@
|
||||
$Id: COPYRIGHT,v 1.4 1996-10-12 03:13:04 dfs Exp $
|
||||
THE REMIND COPYRIGHT
|
||||
|
||||
1. REMIND refers to the entire set of files and documentation in the
|
||||
REMIND package.
|
||||
|
||||
2. REMIND is Copyright 1992-1996 by David Skoll,
|
||||
except where noted in individual files.
|
||||
2. REMIND is Copyright 1992-2023 Dianne Skoll, except where noted in
|
||||
individual files.
|
||||
|
||||
3. DISTRIBUTION AND USE
|
||||
|
||||
a) REMIND may not be used under Microsoft Windows (3.0, 3.1, 95
|
||||
or NT) or any future version of Windows. Such use constitutes
|
||||
a violation of copyright.
|
||||
|
||||
b) REMIND may not be used by Cadabra Design Libraries Inc. or its
|
||||
directors, nor by any of Cadabra's subsidiaries or their directors.
|
||||
Such use constitutes a violation of copyright.
|
||||
|
||||
c) Except for situations (a) and (b), REMIND may be used and
|
||||
distributed according to the terms of the GNU General Public
|
||||
License, Version 2, which follows:
|
||||
REMIND may be used and distributed according to the terms of the
|
||||
GNU General Public License, Version 2, which follows:
|
||||
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
@@ -302,56 +292,9 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
ACKNOWLEDGEMENTS:
|
||||
|
||||
I would like to thank the following people:
|
||||
|
||||
Bill Aten <netagw!bill@uunet.UU.NET> for providing remind-all.sh
|
||||
|
||||
Bradley D. Keister <keister@poincare.phys.cmu.edu>, Rhys Weatherly
|
||||
rhys@batserver.cs.uq.OZ.AU> and Anthony Cheng for initially providing
|
||||
the Turbo C compiler support.
|
||||
|
||||
Dennis Cottel <dennis@peanuts.nosc.mil> for providing the patch to
|
||||
produce calendars by weeks as well as by months.
|
||||
|
||||
Bill Silvert <bill%biomel@cs.dal.ca> and Dennis Cottel
|
||||
<dennis@peanuts.nosc.mil> for suggesting many of the new features in
|
||||
REMIND.
|
||||
|
||||
Dave Wolfe <dwolfe@pffft.sps.mot.com> and Raphael Manfredi
|
||||
<ram@eiffel.com> for noticing bugs and sending me fixes.
|
||||
|
||||
Dave Rickel and George M. Sipe for sample reminders and holidays.
|
||||
|
||||
Michael Salmon for ISO encoding of PostScript output.
|
||||
|
||||
Darrel Hankerson for helping me provide some OS/2 support. Sorry
|
||||
it's not complete, Darrel!
|
||||
|
||||
Phillipp Slusallek for suggesting the -k option.
|
||||
|
||||
Amos Shapir, David W. Tamkin and Frank Yellin for help with the Hebrew
|
||||
calendar.
|
||||
|
||||
All of the language translators whose names are listed in lang.h
|
||||
|
||||
Timo Salmi, Keith Petersen, Bill Davidsen and Kent Landfield for
|
||||
maintaining the uwasa and SIMTEL archives, and comp.binaries.ibm.pc
|
||||
and comp.sources.misc in the face of a flurry of updates to REMIND.
|
||||
|
||||
All others who have corresponded with me to report bugs, express
|
||||
appreciation or suggest features - too many people to list here.
|
||||
|
||||
Finally, all those who donated money to support the production of
|
||||
REMIND. Your donations were gratefully appreciated.
|
||||
|
||||
--
|
||||
David F. Skoll <dfs@doe.carleton.ca> <aa775@freenet.carleton.ca>
|
||||
986 Eiffel Avenue
|
||||
Ottawa, Ontario K2C 0J2
|
||||
CANADA
|
||||
Dianne Skoll <dianne@skoll.ca>
|
||||
|
||||
https://dianne.skoll.ca/projects/remind
|
||||
|
||||
Tel. (613) 225-8687
|
||||
|
||||
|
||||
30
MICROSOFT-AND-APPLE
Normal file
30
MICROSOFT-AND-APPLE
Normal file
@@ -0,0 +1,30 @@
|
||||
MICROSOFT WINDOWS
|
||||
=================
|
||||
|
||||
I used to prohibit porting Remind to Microsoft Windows. However, this
|
||||
may cause problems with the GPL, so I have removed that restriction.
|
||||
|
||||
Although I cannot prevent you from porting Remind to Windows, I appeal
|
||||
to you not to do it. I am trying to encourage the growth of free
|
||||
software, not proprietary software.
|
||||
|
||||
If you port Remind to Windows, I will not provide support or answers to
|
||||
questions -- you're on your own. On the other hand, I will feel no guilt
|
||||
in taking enhancements and merging them into the UNIX stream.
|
||||
|
||||
APPLE
|
||||
=====
|
||||
|
||||
I can't prevent you from using Remind on Apple's products, but I hope
|
||||
you don't. Apple's corporate culture is the very antithesis of Free
|
||||
Software. Rather than using Mac OS X, I encourage you to switch to
|
||||
Linux or FreeBSD, two Free Software operating systems that are every
|
||||
bit as capable as Mac OS X and which are unencumbered by Apple's
|
||||
arbitrary restrictions.
|
||||
|
||||
And if you're looking to port Remind to other Apple products like the
|
||||
iPhone or iPad, please don't. Those products enforce Apple's rigorous
|
||||
controls much more stringently than Mac OS X on an Apple PC.
|
||||
|
||||
--
|
||||
Dianne Skoll
|
||||
252
Makefile
252
Makefile
@@ -1,215 +1,53 @@
|
||||
# Makefile for REMIND
|
||||
# $Id: Makefile,v 1.14 1996-10-27 21:28:03 dfs Exp $
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# THINGS FOR YOU TO EDIT START BELOW
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Uncomment the next line if you are running on a SYSV system
|
||||
SYSV= -DSYSV
|
||||
|
||||
# Uncomment the next line if you are running under UNIX (including SYSV!)
|
||||
UNIX= -DUNIX
|
||||
|
||||
# Uncomment the next lines if you want to use gcc instead of default compiler
|
||||
# NOTE: Tempting as it may be, if you use 'cc' for the C compiler, do not
|
||||
# use 'ld' for the linker. It will probably work much better if you use
|
||||
# LD= cc rather than LD= ld.
|
||||
CC= gcc
|
||||
LD= gcc
|
||||
|
||||
# Put any additional flags for the C compiler or linker here - if you
|
||||
# are not using gcc, you probably want to remove '-ansi -pedantic -Wall'.
|
||||
CFLAGS= -O -ansi -pedantic -Wall
|
||||
CDEFS=
|
||||
LDFLAGS=
|
||||
|
||||
#### INSTALLATION LOCATIONS ####
|
||||
# Note that I use 'cp' rather than 'install' for improved portability.
|
||||
#
|
||||
# BINDIR: Where should the Remind executable be installed?
|
||||
BINDIR= /usr/local/bin
|
||||
|
||||
# SCRIPTDIR: Where should the kall and rem shell scripts be installed?
|
||||
SCRIPTDIR= /usr/local/bin
|
||||
|
||||
# MANDIR: Where should the man pages be installed?
|
||||
MANDIR= /usr/local/man
|
||||
|
||||
# MANSECT: Which man section should the man pages go into?
|
||||
MANSECT= 1
|
||||
|
||||
# EXEMODE: What file protection mode should be used for the executables?
|
||||
EXEMODE= 755
|
||||
|
||||
# MANMODE: What file protection mode should be used for the man pages?
|
||||
MANMODE= 644
|
||||
|
||||
# OWNER, GROUP: What owner and group to use for executables,
|
||||
# scripts and man pages?
|
||||
OWNER=bin
|
||||
GROUP=bin
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# YOU SHOULDN'T EDIT ANYTHING BELOW HERE. You may want to change some things
|
||||
# in config.h; then, you should be able to type 'make'.
|
||||
#-----------------------------------------------------------------------------
|
||||
VERSION= 03.00.15
|
||||
MATHLIB= -lm
|
||||
|
||||
HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \
|
||||
lang.h english.h german.h dutch.h finnish.h french.h norwgian.h \
|
||||
danish.h polish.h
|
||||
|
||||
STDHDRS= config.h types.h protos.h globals.h err.h lang.h
|
||||
|
||||
LANGHDRS= english.h german.h dutch.h finnish.h french.h norwgian.h danish.h \
|
||||
polish.h portbr.h italian.h
|
||||
|
||||
SRCS= calendar.c dorem.c dosubst.c expr.c files.c funcs.c globals.c hbcal.c \
|
||||
init.c main.c moon.c omit.c sort.c queue.c token.c trigger.c userfns.c \
|
||||
utils.c var.c
|
||||
|
||||
MANIFEST=COPYRIGHT Makefile Makefile_QDOS README.AMIGA README.BCC \
|
||||
README.DOS README.OS2 README.UNIX README_QDOS WHATSNEW.30 \
|
||||
amiga-SCOPTIONS amiga.c calendar.c config.h danish.h defs.rem dorem.c \
|
||||
dosubst.c dutch.h english.h err.h expr.c expr.h files.c finnish.h \
|
||||
french.h funcs.c german.h globals.c globals.h hbcal.c init.c italian.h kall \
|
||||
kall.1 lang.h lnk.bcc lnk.msc lnk.tc main.c makefile.bcc makefile.msc \
|
||||
makefile.os2 makefile.tc moon.c norwgian.h omit.c os2func.c polish.h \
|
||||
protos.h queue.c rem rem.1 rem2ps.1 rem2ps.c rem2ps.h remind-all.csh \
|
||||
remind-all.sh remind.1 remind.def smakefile sort.c test-rem \
|
||||
test-rem.ami test-rem.bat test-rem.cmd test-rem.rexx test.cmp test.rem \
|
||||
test1.cmp test2.cmp tkremind tkremind.1 token.c trigger.c tstlang.rem \
|
||||
types.h userfns.c utils.c var.c version.h remind.LSM
|
||||
|
||||
OBJS= $(SRCS:.c=.o)
|
||||
|
||||
all: remind rem2ps
|
||||
|
||||
.c.o:
|
||||
$(CC) $(UNIX) $(SYSV) -c $(CFLAGS) $(CDEFS) $*.c
|
||||
|
||||
rem2ps: rem2ps.o
|
||||
$(LD) $(LDFLAGS) -o rem2ps rem2ps.o
|
||||
|
||||
remind: $(OBJS)
|
||||
$(LD) $(LDFLAGS) -o remind $(OBJS) $(MATHLIB)
|
||||
# Top-level Makefile for Remind.
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
all: src/Makefile
|
||||
@echo ""
|
||||
@echo "*******************"
|
||||
@echo "* *"
|
||||
@echo "* Building REMIND *"
|
||||
@echo "* *"
|
||||
@echo "*******************"
|
||||
@echo ""
|
||||
@cd src && $(MAKE) all LANGDEF=$(LANGDEF)
|
||||
@$(MAKE) -C rem2pdf -f Makefile.top
|
||||
install:
|
||||
@echo ""
|
||||
@echo "**********************************"
|
||||
@echo "* *"
|
||||
@echo "* Installing REMIND (unstripped) *"
|
||||
@echo "* *"
|
||||
@echo "**********************************"
|
||||
@echo ""
|
||||
@$(MAKE) -C src install
|
||||
@$(MAKE) -C rem2html install
|
||||
@$(MAKE) -C rem2pdf -f Makefile.top install INSTALL_BASE=$(INSTALL_BASE)
|
||||
clean:
|
||||
rm -f *.o *~ core *.bak
|
||||
find . -name '*~' -exec rm {} \;
|
||||
-rm man/rem.1 man/rem2ps.1 man/remind.1 man/tkremind.1
|
||||
-$(MAKE) -C src clean
|
||||
-$(MAKE) -C rem2pdf clean
|
||||
|
||||
clobber:
|
||||
rm -f *.o *~ remind rem2ps test.out core *.bak
|
||||
install-stripped:
|
||||
@echo ""
|
||||
@echo "********************************"
|
||||
@echo "* *"
|
||||
@echo "* Installing REMIND (stripped) *"
|
||||
@echo "* *"
|
||||
@echo "**********************************"
|
||||
@echo ""
|
||||
@$(MAKE) -C src install-stripped
|
||||
@$(MAKE) -C rem2html install
|
||||
@$(MAKE) -C rem2pdf -f Makefile.top install INSTALL_BASE=$(INSTALL_BASE)
|
||||
|
||||
test: remind
|
||||
sh test-rem
|
||||
test:
|
||||
@$(MAKE) -C src -s test
|
||||
|
||||
rem2ps.o: rem2ps.c rem2ps.h lang.h config.h
|
||||
calendar.o: calendar.c $(STDHDRS) expr.h
|
||||
dorem.o: dorem.c $(STDHDRS) expr.h
|
||||
dosubst.o: dosubst.c $(STDHDRS) $(LANGHDRS)
|
||||
expr.o: expr.c $(STDHDRS) expr.h
|
||||
files.o: files.c $(STDHDRS)
|
||||
funcs.o: funcs.c $(STDHDRS) expr.h version.h
|
||||
globals.o: globals.c config.h types.h globals.h err.h lang.h $(LANGHDRS)
|
||||
hbcal.o: hbcal.c $(STDHDRS)
|
||||
init.o: init.c $(STDHDRS) expr.h version.h lang.h $(LANGHDRS)
|
||||
main.o: main.c $(STDHDRS) expr.h
|
||||
moon.o: moon.c $(STDHDRS)
|
||||
omit.o: omit.c $(STDHDRS)
|
||||
sort.o: sort.c $(STDHDRS)
|
||||
queue.o: queue.c $(STDHDRS)
|
||||
token.o: token.c $(STDHDRS)
|
||||
trigger.o: trigger.c $(STDHDRS) expr.h
|
||||
userfns.o: userfns.c $(STDHDRS) expr.h
|
||||
utils.o: utils.c $(STDHDRS)
|
||||
var.o: var.c $(STDHDRS) expr.h
|
||||
distclean: clean
|
||||
rm -f config.cache config.log config.status src/Makefile src/config.h tests/test.out www/Makefile rem2pdf/Makefile.top rem2pdf/Makefile.old rem2pdf/Makefile rem2pdf/Makefile.PL rem2pdf/bin/rem2pdf
|
||||
|
||||
# Some of these targets are just for my convenience and
|
||||
# probably won't be too useful to you! -- dfs
|
||||
src/Makefile: src/Makefile.in
|
||||
./configure
|
||||
|
||||
tgz:
|
||||
-rm -rf remind-$(VERSION)
|
||||
-mkdir remind-$(VERSION)
|
||||
cd remind-$(VERSION); for i in $(MANIFEST) ;do ln -s ../$$i .; done; cd ..
|
||||
tar -c -h -v -f remind-3.0.15.tar remind-$(VERSION)
|
||||
gzip -v -9 remind-3.0.15.tar
|
||||
mv remind-3.0.15.tar.gz remind-3.0.15.tgz
|
||||
rm -rf remind-$(VERSION)
|
||||
# DO NOT DELETE
|
||||
|
||||
shar:
|
||||
shar -o./Shar -sdfs@doe.carleton.ca -a -c -n"Remind $(VERSION)" -m -l58 -o./Shar $(MANIFEST)
|
||||
|
||||
backup:
|
||||
tar cvzf ../rbackup.tgz $(MANIFEST)
|
||||
|
||||
zip:
|
||||
zip ../rbackup.zip $(MANIFEST)
|
||||
|
||||
todos:
|
||||
rm -rf DOS
|
||||
mkdir DOS
|
||||
for i in $(MANIFEST) ; do todos < $$i > DOS/$$i; done
|
||||
|
||||
transmit:
|
||||
sz -a -e $(MANIFEST)
|
||||
|
||||
install: install-bin install-scripts install-man
|
||||
|
||||
install-bin: remind rem2ps
|
||||
cp remind $(BINDIR)/remind
|
||||
-chmod $(EXEMODE) $(BINDIR)/remind
|
||||
-chown $(OWNER) $(BINDIR)/remind
|
||||
-chgrp $(GROUP) $(BINDIR)/remind
|
||||
cp rem2ps $(BINDIR)/rem2ps
|
||||
-chmod $(EXEMODE) $(BINDIR)/rem2ps
|
||||
-chown $(OWNER) $(BINDIR)/rem2ps
|
||||
-chgrp $(GROUP) $(BINDIR)/rem2ps
|
||||
|
||||
install-scripts:
|
||||
cp kall $(SCRIPTDIR)/kall
|
||||
-chmod $(EXEMODE) $(SCRIPTDIR)/kall
|
||||
-chown $(OWNER) $(SCRIPTDIR)/kall
|
||||
-chgrp $(GROUP) $(SCRIPTDIR)/kall
|
||||
cp rem $(SCRIPTDIR)/rem
|
||||
-chmod $(EXEMODE) $(SCRIPTDIR)/rem
|
||||
-chown $(OWNER) $(SCRIPTDIR)/rem
|
||||
-chgrp $(GROUP) $(SCRIPTDIR)/rem
|
||||
cp tkremind $(SCRIPTDIR)/tkremind
|
||||
-chmod $(EXEMODE) $(SCRIPTDIR)/tkremind
|
||||
-chown $(OWNER) $(SCRIPTDIR)/tkremind
|
||||
-chgrp $(GROUP) $(SCRIPTDIR)/tkremind
|
||||
|
||||
install-man:
|
||||
cp remind.1 $(MANDIR)/man$(MANSECT)/remind.$(MANSECT)
|
||||
-chmod $(MANMODE) $(MANDIR)/man$(MANSECT)/remind.$(MANSECT)
|
||||
-chown $(OWNER) $(MANDIR)/man$(MANSECT)/remind.$(MANSECT)
|
||||
-chgrp $(GROUP) $(MANDIR)/man$(MANSECT)/remind.$(MANSECT)
|
||||
cp tkremind.1 $(MANDIR)/man$(MANSECT)/tkremind.$(MANSECT)
|
||||
-chmod $(MANMODE) $(MANDIR)/man$(MANSECT)/tkremind.$(MANSECT)
|
||||
-chown $(OWNER) $(MANDIR)/man$(MANSECT)/tkremind.$(MANSECT)
|
||||
-chgrp $(GROUP) $(MANDIR)/man$(MANSECT)/tkremind.$(MANSECT)
|
||||
cp rem.1 $(MANDIR)/man$(MANSECT)/rem.$(MANSECT)
|
||||
-chmod $(MANMODE) $(MANDIR)/man$(MANSECT)/rem.$(MANSECT)
|
||||
-chown $(OWNER) $(MANDIR)/man$(MANSECT)/rem.$(MANSECT)
|
||||
-chgrp $(GROUP) $(MANDIR)/man$(MANSECT)/rem.$(MANSECT)
|
||||
cp kall.1 $(MANDIR)/man$(MANSECT)/kall.$(MANSECT)
|
||||
-chmod $(MANMODE) $(MANDIR)/man$(MANSECT)/kall.$(MANSECT)
|
||||
-chown $(OWNER) $(MANDIR)/man$(MANSECT)/kall.$(MANSECT)
|
||||
-chgrp $(GROUP) $(MANDIR)/man$(MANSECT)/kall.$(MANSECT)
|
||||
cp rem2ps.1 $(MANDIR)/man$(MANSECT)/rem2ps.$(MANSECT)
|
||||
-chmod $(MANMODE) $(MANDIR)/man$(MANSECT)/rem2ps.$(MANSECT)
|
||||
-chown $(OWNER) $(MANDIR)/man$(MANSECT)/rem2ps.$(MANSECT)
|
||||
-chgrp $(GROUP) $(MANDIR)/man$(MANSECT)/rem2ps.$(MANSECT)
|
||||
|
||||
release:
|
||||
-mkdir RELEASE
|
||||
-rm -f RELEASE/*
|
||||
mkpatch ../prev . patch.15 Shar "Remind-3.0/Patch-15/part"
|
||||
mv Shar* RELEASE
|
||||
rm -f patch.15*
|
||||
for i in *.1; do nroff -man $$i | sed -e 's/_//g' > `basename $$i .1`.man; done
|
||||
mv *.man RELEASE
|
||||
for i in *.1; do groff -man -Tps $$i > `basename $$i .1`.ps; done
|
||||
mv *.ps RELEASE
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
#$Id: Makefile_QDOS,v 1.3 1996-09-28 18:17:06 dfs Exp $
|
||||
# Makefile for REMIND for QDOS / SMSQ
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# THINGS FOR YOU TO EDIT START BELOW
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Uncomment the next lines if you want to use gcc instead of default compiler
|
||||
# NOTE: Tempting as it may be, if you use 'cc' for the C compiler, do not
|
||||
# use 'ld' for the linker. It will probably work much better if you use
|
||||
# LD= cc rather than LD= ld.
|
||||
# QDOS remark: I made it work the following way, and I found it to be working.
|
||||
CC= cc
|
||||
LD= ld
|
||||
|
||||
# Put any additional flags for the C compiler or linker here - if you
|
||||
# are not using gcc, you probably want to remove '-ansi'.
|
||||
# QDOS remark: no -ansi option and no gcc on QDOS / SMSQ
|
||||
CFLAGS= -V -O -DQDOS
|
||||
CDEFS=
|
||||
LDFLAGS= -bufp200K
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# YOU SHOULDN'T EDIT ANYTHING BELOW HERE. You may want to change some things
|
||||
# in config_h; then, you should be able to type 'make'.
|
||||
#-----------------------------------------------------------------------------
|
||||
VERSION= 03.00.15
|
||||
MATHLIB= -lm
|
||||
|
||||
HDRS= config_h err_h expr_h globals_h protos_h types_h version_h \
|
||||
lang_h english_h german_h dutch_h finnish_h french_h norwgian_h \
|
||||
danish_h polish_h
|
||||
|
||||
STDHDRS= config_h types_h protos_h globals_h err_h lang_h
|
||||
|
||||
LANGHDRS= english_h german_h dutch_h finnish_h french_h norwgian_h danish_h \
|
||||
polish_h
|
||||
|
||||
SRCS= calendar_c dorem_c dosubst_c expr_c files_c funcs_c globals_c hbcal_c \
|
||||
init_c main_c moon_c omit_c sort_c queue_c token_c trigger_c userfns_c \
|
||||
utils_c var_c
|
||||
|
||||
OBJS= calendar_o dorem_o dosubst_o expr_o files_o funcs_o globals_o hbcal_o \
|
||||
init_o main_o moon_o omit_o sort_o queue_o token_o trigger_o userfns_o \
|
||||
utils_o var_o
|
||||
|
||||
all: remind rem2ps
|
||||
|
||||
# _c_o:
|
||||
# $(CC) $(UNIX) $(SYSV) -c $(CFLAGS) $(CDEFS) $*_c
|
||||
|
||||
rem2ps: rem2ps_o
|
||||
# $(CC) $(CFLAGS) rem2ps_c
|
||||
$(LD) $(LDFLAGS) -orem2ps rem2ps_o
|
||||
|
||||
remind: $(OBJS)
|
||||
# $(CC) $(CFLAGS) $(SRCS)
|
||||
$(LD) $(LDFLAGS) -oremind $(OBJS) $(MATHLIB)
|
||||
|
||||
rem2ps_o: rem2ps_c rem2ps_h lang_h config_h
|
||||
calendar_o: calendar_c $(STDHDRS) expr_h
|
||||
dorem_o: dorem_c $(STDHDRS) expr_h
|
||||
dosubst_o: dosubst_c $(STDHDRS) $(LANGHDRS)
|
||||
expr_o: expr_c $(STDHDRS) expr_h
|
||||
files_o: files_c $(STDHDRS)
|
||||
funcs_o: funcs_c $(STDHDRS) expr_h version_h
|
||||
globals_o: globals_c config_h types_h globals_h err_h lang_h $(LANGHDRS)
|
||||
hbcal_o: hbcal_c $(STDHDRS)
|
||||
init_o: init_c $(STDHDRS) expr_h version_h lang_h $(LANGHDRS)
|
||||
main_o: main_c $(STDHDRS) expr_h
|
||||
moon_o: moon_c $(STDHDRS)
|
||||
omit_o: omit_c $(STDHDRS)
|
||||
sort_o: sort_c $(STDHDRS)
|
||||
queue_o: queue_c $(STDHDRS)
|
||||
token_o: token_c $(STDHDRS)
|
||||
trigger_o: trigger_c $(STDHDRS) expr_h
|
||||
userfns_o: userfns_c $(STDHDRS) expr_h
|
||||
utils_o: utils_c $(STDHDRS)
|
||||
var_o: var_c $(STDHDRS) expr_h
|
||||
|
||||
|
||||
clean:
|
||||
rm -f *_o *_bak
|
||||
|
||||
clobber:
|
||||
rm -f *_o remind rem2ps test_out *_bak
|
||||
78
README
Normal file
78
README
Normal file
@@ -0,0 +1,78 @@
|
||||
REMIND
|
||||
|
||||
Remind is a full-featured calendar/alarm program. Copying policy is
|
||||
in the file "COPYRIGHT" in this directory.
|
||||
|
||||
Installation notes for various operating systems are in "docs". See
|
||||
the appropriate README file for installation on your system.
|
||||
|
||||
Manual pages are in "man".
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Quick UNIX installation instructions for the very impatient:
|
||||
|
||||
If you have Tcl/Tk (wish 4.1 or higher) installed and are running X Windows:
|
||||
--------------------------------------------------------------
|
||||
|
||||
1) Type: wish ./build.tk from this directory. Fill in the various
|
||||
options and hit "Build Remind"
|
||||
|
||||
2) Type: "make install" -- you may need to be root to do this.
|
||||
|
||||
If you do NOT have Tcl/Tk or are NOT running X Windows:
|
||||
-------------------------------------------------------
|
||||
|
||||
1) Edit the file "src/custom.h" according to your preferences.
|
||||
|
||||
2) Edit the file "src/lang.h" to choose a language.
|
||||
|
||||
3) Type: "./configure" (You can supply options; type "./configure --help"
|
||||
for details.)
|
||||
|
||||
4) Type: "make"
|
||||
|
||||
5) Type: "make install" -- you may need to be root to do this.
|
||||
|
||||
PREREQUISITES:
|
||||
--------------
|
||||
|
||||
Remind and rem2ps have no prerequisites beyond the standard C library and
|
||||
the standard math library.
|
||||
|
||||
Rem2HTML requires the JSON::MaybeXS Perl module.
|
||||
Rem2PDF requires the JSON::MaybeXS, Pango and Cairo Perl modules.
|
||||
|
||||
- On Debian-like systems, these prerequisites may be installed with:
|
||||
|
||||
apt install libjson-maybexs-perl libpango-perl libcairo-perl
|
||||
|
||||
- On RPM-based systems, you need perl-Pango, perl-Cairo and perl-JSON-MaybeXS
|
||||
|
||||
- On Gentoo, you need dev-perl/Pango, dev-perl/Cairo and dev-perl/JSON-MaybeXS.
|
||||
|
||||
- On Arch linux, you need pango-perl, cairo-perl and perl-json-maybexs
|
||||
|
||||
TkRemind requires Tcl/Tk and the tcllib library.
|
||||
|
||||
- On Debian-like systems, install with:
|
||||
|
||||
apt install tcl tk tcllib
|
||||
|
||||
- On RPM-based systems, you need tcl, tk and tcllib
|
||||
|
||||
- On Arch Linux, you need tk and tcllib. The latter is available at
|
||||
https://aur.archlinux.org/packages/tcllib
|
||||
|
||||
If the little arrows for "Previous Month" and "Next Month" do not display
|
||||
correctly in TkRemind, you may need to install the Noto Fonts. Install
|
||||
all of your distribution's Nonto Font-related packages.
|
||||
|
||||
- On Debian-like systems, install with:
|
||||
|
||||
apt install fonts-noto-core fonts-noto-color-emoji \
|
||||
fonts-noto-extra fonts-noto-ui-core fonts-noto-ui-extra
|
||||
|
||||
==========================================================================
|
||||
Contact info: mailto:dianne@skoll.ca
|
||||
Home page: https://dianne.skoll.ca/projects/remind/
|
||||
57
README.AMIGA
57
README.AMIGA
@@ -1,57 +0,0 @@
|
||||
$Id: README.AMIGA,v 1.1 1996-03-31 04:01:52 dfs Exp $
|
||||
REMIND version 3.0 for AmigaDOS
|
||||
|
||||
REMIND is a sophisticated alarm/calendar program. Details are given
|
||||
in the man page, "remind.1".
|
||||
|
||||
1 - Read the file COPYRIGHT.
|
||||
|
||||
2 - Examine the file config.h and adjust parameters as needed
|
||||
|
||||
3 - If you are using SAS/C to compile Remind, type:
|
||||
|
||||
copy amiga-SCOPTIONS SCOPTIONS
|
||||
smake -f smakefile
|
||||
|
||||
This will create remind, which is ready to be executed.
|
||||
|
||||
The file "defs.rem" has some sample Remind definitions and commands,
|
||||
as well as U.S. and Jewish holidays.
|
||||
|
||||
OTHER LANGUAGE SUPPORT
|
||||
|
||||
Remind has support for languages other than English. See the file
|
||||
"lang.h" for details. The language support may vary - you can change
|
||||
only the substitution filter, or you can translate all of the usage
|
||||
instructions and error messages as well. See "french.h" for an example.
|
||||
|
||||
If you add support for a non-English language, Remind will accept both the
|
||||
English and non-English names of months and weekdays in an input script.
|
||||
However, you should not rely on this feature if you want to write portable
|
||||
Remind scripts.
|
||||
|
||||
At a minimum, you should support month and day names in the foreign
|
||||
language, and should modify the substitution filter appropriately.
|
||||
If you are truly diligent, you can translate usage and error messages
|
||||
too.
|
||||
|
||||
Take a look at the files "english.h" and "german.h" if you want to add
|
||||
support for your favourite language. If you do add another language
|
||||
to Remind, please let me know! Here are the basic guidelines:
|
||||
|
||||
- Your language file should be called "lxxx.h", where lxxx is the first 8
|
||||
characters of the ENGLISH name of your language.
|
||||
|
||||
- You should define L_LANGNAME to be the full English name of your language,
|
||||
with the first letter capitalized and the rest lower-case.
|
||||
|
||||
[Please note: I CANNOT SUPPORT THE AMIGA VERSION!]
|
||||
|
||||
--
|
||||
David F. Skoll <dfs@doe.carleton.ca>
|
||||
986 Eiffel Avenue
|
||||
Ottawa, Ontario K2C 0J2
|
||||
CANADA
|
||||
|
||||
Tel. (613) 225-8687
|
||||
|
||||
65
README.BCC
65
README.BCC
@@ -1,65 +0,0 @@
|
||||
$Id: README.BCC,v 1.1 1996-03-27 03:25:48 dfs Exp $
|
||||
REMIND version 3.0 for Borland C++
|
||||
|
||||
1 - Read the file COPYRIGHT. (This may be called COPYRIGH on your
|
||||
MS-DOS system.)
|
||||
|
||||
2 - You must use the Borland C++ OS/2 or MSDOS/Windows compiler.
|
||||
|
||||
3 - Examine the file config.h and adjust parameters as needed
|
||||
|
||||
4 - Examine the file makefile.bcc and adjust parameters as needed.
|
||||
|
||||
5 - Type:
|
||||
|
||||
make -f makefile.bcc
|
||||
|
||||
This will make 'remind.exe' and 'rem2ps.exe' in the ..\os2-ex or ..\msdos-ex
|
||||
directories.
|
||||
|
||||
The file "defs.rem" has some sample Remind definitions and commands,
|
||||
as well as U.S. and Jewish holidays.
|
||||
|
||||
NOTE that I do not have access to an OS/2 system, so support for this
|
||||
system may not be as good as I'd like.
|
||||
|
||||
OS/2 support is courtesy of Russ Herman <rwh@gov.on.ca>, Norman Walsh
|
||||
<norm@ora.com>, and Darrel Hankerson <hankedr@mail.auburn.edu>.
|
||||
However, if you have problems, please contact me.
|
||||
|
||||
OTHER LANGUAGE SUPPORT
|
||||
|
||||
Remind has support for languages other than English. See the file
|
||||
"lang.h" for details. The language support may vary - you can change
|
||||
only the substitution filter, or you can translate all of the usage
|
||||
instructions and error messages as well. See "french.h" for an
|
||||
example of the latter.
|
||||
|
||||
If you add support for a non-English language, Remind will accept both the
|
||||
English and non-English names of months and weekdays in an input script.
|
||||
However, you should not rely on this feature if you want to write portable
|
||||
Remind scripts.
|
||||
|
||||
At a minimum, you should support month and day names in the foreign
|
||||
language, and should modify the substitution filter appropriately.
|
||||
If you are truly diligent, you can translate usage and error messages
|
||||
too.
|
||||
|
||||
Take a look at the files "english.h" and "german.h" if you want to add
|
||||
support for your favourite language. If you do add another language
|
||||
to Remind, please let me know! Here are the basic guidelines:
|
||||
|
||||
- Your language file should be called "lxxx.h", where lxxx is the first 8
|
||||
characters of the ENGLISH name of your language.
|
||||
|
||||
- You should define L_LANGNAME to be the full English name of your language,
|
||||
with the first letter capitalized and the rest lower-case.
|
||||
|
||||
--
|
||||
David F. Skoll <dfs@doe.carleton.ca>
|
||||
986 Eiffel Avenue
|
||||
Ottawa, Ontario K2C 0J2
|
||||
CANADA
|
||||
|
||||
Tel. (613) 225-8687
|
||||
|
||||
62
README.DOS
62
README.DOS
@@ -1,62 +0,0 @@
|
||||
$Id: README.DOS,v 1.2 1996-10-12 02:59:06 dfs Exp $
|
||||
REMIND version 3.0 for MS-DOS
|
||||
|
||||
IMPORTANT NOTE: I'm no longer officially supporting Remind under
|
||||
DOS. It may very well work, but if it doesn't... you're on your own.
|
||||
|
||||
REMIND is a sophisticated alarm/calendar program. Details are given
|
||||
in the man page, "remind.1".
|
||||
|
||||
1 - Read the file COPYRIGHT. (This may be called COPYRIGH on your
|
||||
MS-DOS system.)
|
||||
|
||||
2 - Examine the file config.h and adjust parameters as needed
|
||||
|
||||
3 - If you are using Turbo C to compile Remind, type:
|
||||
|
||||
make -fmakefile.tc
|
||||
|
||||
If you are using Microsoft C to compile Remind, type:
|
||||
|
||||
make makefile.msc
|
||||
|
||||
This will create REMIND.EXE, which is ready to be executed.
|
||||
|
||||
The file "defs.rem" has some sample Remind definitions and commands,
|
||||
as well as U.S. and Jewish holidays.
|
||||
|
||||
OTHER LANGUAGE SUPPORT
|
||||
|
||||
Remind has support for languages other than English. See the file
|
||||
"lang.h" for details. The language support may vary - you can change
|
||||
only the substitution filter, or you can translate all of the usage
|
||||
instructions and error messages as well. See "french.h" for an example.
|
||||
|
||||
If you add support for a non-English language, Remind will accept both the
|
||||
English and non-English names of months and weekdays in an input script.
|
||||
However, you should not rely on this feature if you want to write portable
|
||||
Remind scripts.
|
||||
|
||||
At a minimum, you should support month and day names in the foreign
|
||||
language, and should modify the substitution filter appropriately.
|
||||
If you are truly diligent, you can translate usage and error messages
|
||||
too.
|
||||
|
||||
Take a look at the files "english.h" and "german.h" if you want to add
|
||||
support for your favourite language. If you do add another language
|
||||
to Remind, please let me know! Here are the basic guidelines:
|
||||
|
||||
- Your language file should be called "lxxx.h", where lxxx is the first 8
|
||||
characters of the ENGLISH name of your language.
|
||||
|
||||
- You should define L_LANGNAME to be the full English name of your language,
|
||||
with the first letter capitalized and the rest lower-case.
|
||||
|
||||
--
|
||||
David F. Skoll <dfs@doe.carleton.ca>
|
||||
986 Eiffel Avenue
|
||||
Ottawa, Ontario K2C 0J2
|
||||
CANADA
|
||||
|
||||
Tel. (613) 225-8687
|
||||
|
||||
137
README.OS2
137
README.OS2
@@ -1,137 +0,0 @@
|
||||
$Id: README.OS2,v 1.1 1996-03-27 03:25:49 dfs Exp $
|
||||
REMIND version 3.0 for OS/2
|
||||
|
||||
This file contains instructions for compiling Remind under OS/2 with
|
||||
Eberhard Mattes' emx/gcc compiler and with the Microsoft C compiler.
|
||||
There are a number of targets in Makefile.os2, including OS/2-only
|
||||
versions and bound versions (programs which run under OS/2 and DOS).
|
||||
|
||||
Note that there is also support for OS/2 using the Borland C
|
||||
compiler--see the file README.BCC for details.
|
||||
|
||||
REMIND is a sophisticated alarm/calendar program. Details are given
|
||||
in the man page, "remind.1".
|
||||
|
||||
1 - Read the file COPYRIGHT. (This may be called COPYRIGH on your
|
||||
MS-DOS system.)
|
||||
|
||||
2 - To compile Remind for OS/2, you must use the Microsoft C compiler
|
||||
or emx/gcc. You must also have a decent version of 'make', such
|
||||
as dmake or GNU make.
|
||||
|
||||
3 - Examine the file config.h and adjust parameters as needed
|
||||
|
||||
4 - Examine the file Makefile.os2 and adjust parameters as needed.
|
||||
|
||||
5 - Type:
|
||||
|
||||
make -f Makefile.os2
|
||||
|
||||
to see a list of targets. For example,
|
||||
|
||||
make -f Makefile.os2 emx
|
||||
|
||||
will build a 32-bit emx version which runs under OS/2 2.x and DOS.
|
||||
|
||||
The file "defs.rem" has some sample Remind definitions and commands,
|
||||
as well as U.S. and Jewish holidays.
|
||||
|
||||
NOTE that I do not have access to an OS/2 system, so support for this
|
||||
system may not be as good as I'd like.
|
||||
|
||||
OS/2 support is courtesy of Russ Herman <rwh@gov.on.ca>, Norman Walsh
|
||||
<norm@ora.com>, and Darrel Hankerson <hankedr@mail.auburn.edu>.
|
||||
However, if you have problems, please contact me.
|
||||
|
||||
OTHER LANGUAGE SUPPORT
|
||||
|
||||
Remind has support for languages other than English. See the file
|
||||
"lang.h" for details. The language support may vary - you can change
|
||||
only the substitution filter, or you can translate all of the usage
|
||||
instructions and error messages as well. See "french.h" for an
|
||||
example of the latter.
|
||||
|
||||
If you add support for a non-English language, Remind will accept both the
|
||||
English and non-English names of months and weekdays in an input script.
|
||||
However, you should not rely on this feature if you want to write portable
|
||||
Remind scripts.
|
||||
|
||||
At a minimum, you should support month and day names in the foreign
|
||||
language, and should modify the substitution filter appropriately.
|
||||
If you are truly diligent, you can translate usage and error messages
|
||||
too.
|
||||
|
||||
Take a look at the files "english.h" and "german.h" if you want to add
|
||||
support for your favourite language. If you do add another language
|
||||
to Remind, please let me know! Here are the basic guidelines:
|
||||
|
||||
- Your language file should be called "lxxx.h", where lxxx is the first 8
|
||||
characters of the ENGLISH name of your language.
|
||||
|
||||
- You should define L_LANGNAME to be the full English name of your language,
|
||||
with the first letter capitalized and the rest lower-case.
|
||||
|
||||
RELEASE NOTES -- miscellaneous info that couldn't go anywhere else!
|
||||
|
||||
1. POPUP REMINDERS
|
||||
|
||||
If you define the symbol OS2_POPUP in the OS/2 Makefile, you get
|
||||
"full-screen popups" (as implemented by Russ Herman) for all MSG-
|
||||
and MSF-type reminders. You may or may not like this feature.
|
||||
|
||||
One way of implementing popup reminders is to get the program
|
||||
"pmpopup.exe" from ftp-os2.cdrom.com, and using Remind with the
|
||||
'-k' option as follows from C:\STARTUP.CMD:
|
||||
|
||||
start /pm /inv /n remind "-kstart pmpopup %%s" remfile
|
||||
|
||||
Alternatively, if you have the Vrexx package, you can use this
|
||||
procedure suggested by Norman Walsh:
|
||||
|
||||
Start remind like this in C:\STARTUP.CMD:
|
||||
|
||||
start /pm /inv /n \bin\remind -faz "-kstart popupmsg %%s" .reminders
|
||||
|
||||
The popups are done by POPUPMSG.CMD which looks like this:
|
||||
|
||||
-------------- Cut Here ---------- Cut Here ---------- Cut Here --------
|
||||
/* PopUpMsg */
|
||||
|
||||
'@echo off'
|
||||
|
||||
parse arg theargs
|
||||
if theargs = "" then
|
||||
theargs = "Empty message"
|
||||
|
||||
call RxFuncAdd 'VInit', 'VREXX', 'VINIT'
|
||||
initcode = VInit()
|
||||
if initcode = 'ERROR' then signal CLEANUP
|
||||
|
||||
signal on failure name CLEANUP
|
||||
signal on halt name CLEANUP
|
||||
signal on syntax name CLEANUP
|
||||
|
||||
/* example VMsgBox call */
|
||||
|
||||
msg.0 = 1
|
||||
msg.1 = theargs
|
||||
|
||||
call VDialogPos 50, 50
|
||||
call VMsgBox 'Popup Message', msg, 1
|
||||
|
||||
/* end of CMD file */
|
||||
|
||||
CLEANUP:
|
||||
call VExit
|
||||
|
||||
exit
|
||||
-------------- Cut Here ---------- Cut Here ---------- Cut Here --------
|
||||
|
||||
--
|
||||
David F. Skoll <dfs@doe.carleton.ca>
|
||||
986 Eiffel Avenue
|
||||
Ottawa, Ontario K2C 0J2
|
||||
CANADA
|
||||
|
||||
Tel. (613) 225-8687
|
||||
|
||||
147
README.UNIX
147
README.UNIX
@@ -1,147 +0,0 @@
|
||||
$Id: README.UNIX,v 1.2 1996-10-12 02:59:06 dfs Exp $
|
||||
REMIND version 3.0 for UNIX
|
||||
|
||||
REMIND is a sophisticated alarm/calendar program. Details are given
|
||||
in the man page, "remind.1".
|
||||
|
||||
1 - Read the file COPYRIGHT.
|
||||
|
||||
2- Before compiling the software, check to see if it includes patches.
|
||||
These are files called patch.xx. If there are patches, apply them all
|
||||
by typing:
|
||||
|
||||
cat patch.* | patch
|
||||
|
||||
3 - Examine the Makefile and change any parameters which need to be
|
||||
changed for your system. As it stands, the Makefile is set up for a
|
||||
Linux system.
|
||||
|
||||
4 - Examine the file config.h and adjust parameters as needed
|
||||
|
||||
5 - Examine lang.h and choose the language you want Remind to use.
|
||||
(You can do this on the "make" command-line -- see "OTHER
|
||||
LANGUAE SUPPORT.)
|
||||
|
||||
6 - Type 'make'
|
||||
|
||||
7 - Type 'sh test-rem' or 'make test' to run the acceptance test. Note
|
||||
that the test script works only for the English version of Remind.
|
||||
|
||||
8 - Type 'make install' to install Remind, kall, rem and the man
|
||||
pages.
|
||||
|
||||
Two shell scripts, "remind-all.csh" and "remind-all.sh" are provided.
|
||||
These allow automatic mailing of reminders to all users who create a
|
||||
$HOME/.reminders file. These two scripts are equivalent; one is a
|
||||
"sh" script and the other is a "csh" script. Pick the one you want to
|
||||
use, and follow the instructions in the opening comments of the
|
||||
script.
|
||||
|
||||
*** NOTE *** Please be aware that "remind-all.csh" and "remind-all.sh"
|
||||
have been changed since version 03.00.05 of Remind. If you install
|
||||
the new remind executable, make sure you switch over to the new
|
||||
"remind-all" scripts.
|
||||
|
||||
A shell script called "rem" is provided for those who like to have
|
||||
'remind' assume a default reminders file. A man page for this script
|
||||
is provided. You should examine the script to ensure that the defaults
|
||||
are correct.
|
||||
|
||||
Many people have asked me why I supply the "rem" script instead of
|
||||
having Remind assume a default file. The answer is: That's how I like
|
||||
it! My personal preference is for a program which normally takes
|
||||
parameters to display usage information when invoked with no
|
||||
parameters. I like that behaviour so I can quickly get an idea of
|
||||
what a program does without poring through the man page. And I think
|
||||
I'll keep Remind that way. Sorry to all who dislike it. :-)
|
||||
|
||||
A shell script called "kall" is provided so you can kill your background
|
||||
remind processes when you log out. See the man page. Note that kall
|
||||
depends on the output of "ps", and may not be portable.
|
||||
|
||||
The file "defs.rem" has some sample Remind definitions and commands,
|
||||
as well as U.S. and Jewish holidays.
|
||||
|
||||
OTHER LANGUAGE SUPPORT
|
||||
|
||||
Remind has support for languages other than English. See the file
|
||||
"lang.h" for details. The language support may vary - you can change
|
||||
only the substitution filter, or you can translate all of the usage
|
||||
instructions and error messages as well. See "french.h" for an
|
||||
example of the latter.
|
||||
|
||||
To compile Remind for a non-english language, look at the constants
|
||||
defined in "lang.h". Then, to compile Remind for Italian (as an
|
||||
example), type:
|
||||
|
||||
make "CDEFS=-DLANG=ITALIAN"
|
||||
|
||||
If you add support for a non-English language, Remind will accept both the
|
||||
English and non-English names of months and weekdays in an input script.
|
||||
However, you should not rely on this feature if you want to write portable
|
||||
Remind scripts.
|
||||
|
||||
At a minimum, you should support month and day names in the foreign
|
||||
language, and should modify the substitution filter appropriately.
|
||||
If you are truly diligent, you can translate usage and error messages
|
||||
too.
|
||||
|
||||
Take a look at the files "english.h" and "german.h" if you want to add
|
||||
support for your favourite language. If you do add another language
|
||||
to Remind, please let me know! Here are the basic guidelines:
|
||||
|
||||
- Your language file should be called "lxxx.h", where lxxx is the first 8
|
||||
characters of the ENGLISH name of your language.
|
||||
|
||||
- Your language file should define L_LANGNAME to be the full English
|
||||
name of your language, with the first letter capitalized and the rest
|
||||
lower-case.
|
||||
|
||||
RELEASE NOTES -- miscellaneous info that couldn't go anywhere else!
|
||||
|
||||
1. POPUP REMINDERS
|
||||
|
||||
If you're running under X-Windows and you have the TCL tools,
|
||||
you can create simple pop-up reminders by creating the following
|
||||
TCL script called 'popup'. It pops a message on to the screen and
|
||||
waits for you to press the 'OK' button. If you don't press the OK button
|
||||
within 15 seconds, it exits anyway. To use it, you can use the '-k' option
|
||||
for Remind as follows:
|
||||
|
||||
remind "-kpopup '%s'&" .reminders
|
||||
|
||||
Or use the following in your Remind script:
|
||||
|
||||
REM AT 17:00 RUN popup 'Time to go home.' &
|
||||
|
||||
This TCL script is a slightly modified version of one submitted by
|
||||
Norman Walsh. TCL is available via FTP at ftp.uu.net in /languages/tcl.
|
||||
|
||||
-------------- Cut Here ---------- Cut Here ---------- Cut Here -------------
|
||||
#!/usr/local/bin/wish -f
|
||||
|
||||
wm withdraw .
|
||||
|
||||
if { [ llength $argv ] == 1 } {
|
||||
eval set msg $argv
|
||||
} else {
|
||||
eval set msg [ list $argv ]
|
||||
}
|
||||
|
||||
after 15000 { destroy . ; exit }
|
||||
|
||||
tk_dialog .d { Message } $msg warning 0 { OK }
|
||||
|
||||
destroy .
|
||||
|
||||
exit
|
||||
-------------- Cut Here ---------- Cut Here ---------- Cut Here -------------
|
||||
|
||||
|
||||
--
|
||||
David F. Skoll <dfs@doe.carleton.ca>
|
||||
986 Eiffel Avenue
|
||||
Ottawa, Ontario K2C 0J2
|
||||
CANADA
|
||||
|
||||
Tel. (613) 225-8687
|
||||
95
README_QDOS
95
README_QDOS
@@ -1,95 +0,0 @@
|
||||
$Id: README_QDOS,v 1.3 1996-09-28 18:17:07 dfs Exp $
|
||||
REMIND version 3.0.15 for QDOS / SMSQ
|
||||
|
||||
REMIND is a sophisticated alarm/calendar program. Details are given
|
||||
in the documentation file, "remind_doc" (QUILL format).
|
||||
[Note from David Skoll -- I was not sent the file `remind_doc', so
|
||||
you're on your own here. You'll have to use the UNIX man pages.]
|
||||
|
||||
1 - Read the file COPYRIGHT.
|
||||
|
||||
2 - Do NOT redistribute Remind WITHOUT the sources!
|
||||
|
||||
3 - Examine the Makefile and change any parameters which need to be
|
||||
changed for your system. (The makefile for QDOS / SMSQ is
|
||||
makefile_QDOS).
|
||||
|
||||
4 - Examine the file config_h and adjust parameters as needed
|
||||
|
||||
5 - Examine lang_h and choose the language you want Remind to use.
|
||||
There has no effort been put in making the language modules working
|
||||
on the QL. You'll have to adjust the files for yourself to get
|
||||
them working (umlauts etc).
|
||||
|
||||
6 - Execute "make;'-fMakefile_QDOS'". Be sure, that your DATA_DEFAULT
|
||||
directory is the directory where the remind source files are
|
||||
placed.
|
||||
|
||||
7 - There is an acceptance test for other systems. If you want to
|
||||
test remind on your QDOS / SMSQ system execute the following
|
||||
commands from your command line:
|
||||
SETENV "TEST_GETENV=foo bar baz"
|
||||
ex datad$&'remind';'-e -dxte test_rem 16 feb 1991 > test_out'
|
||||
ex diff;'test_out test_cmp >test_diff'
|
||||
Then check the output of diff. You will find lots of differences.
|
||||
If there are other than differences in the filename
|
||||
(supplied test-result: ./test.rem, QDOS result: test_rem) and
|
||||
in the ostype (supplied: UNIX, QDOS: QDOS / SMSQ) Remind does
|
||||
not work correctly.
|
||||
|
||||
|
||||
The file "defs_rem" has some sample Remind definitions and commands,
|
||||
as well as U.S. and Jewish holidays. You should delete the definitions
|
||||
for ANSI colours as the QL does not support the ANSI standard.
|
||||
|
||||
|
||||
OTHER LANGUAGE SUPPORT
|
||||
|
||||
Remind has support for languages other than English. See the file
|
||||
"lang_h" for details. The language support may vary - you can change
|
||||
only the substitution filter, or you can translate all of the usage
|
||||
instructions and error messages as well. See "french_h" for an
|
||||
example of the latter.
|
||||
|
||||
If you add support for a non-English language, Remind will accept both the
|
||||
English and non-English names of months and weekdays in an input script.
|
||||
However, you should not rely on this feature if you want to write portable
|
||||
Remind scripts.
|
||||
|
||||
At a minimum, you should support month and day names in the foreign
|
||||
language, and should modify the substitution filter appropriately.
|
||||
If you are truly diligent, you can translate usage and error messages
|
||||
too.
|
||||
|
||||
Take a look at the files "english_h" and "german_h" if you want to add
|
||||
support for your favourite language. If you do add another language
|
||||
to Remind, please let me know! Here are the basic guidelines:
|
||||
|
||||
- Your language file should be called "lxxx_h", where lxxx is the first 8
|
||||
characters of the ENGLISH name of your language.
|
||||
|
||||
- Your language file should define L_LANGNAME to be the full English
|
||||
name of your language, with the first letter capitalized and the rest
|
||||
lower-case.
|
||||
|
||||
RELEASE NOTES -- miscellaneous info that couldn't go anywhere else!
|
||||
|
||||
The QDOS / SMSQ version does not support the enhanced features of
|
||||
the UNIX and/or OS/2 versions.
|
||||
|
||||
I had some problems with the sunrise() and sunset() functions,
|
||||
but didn't examine it.
|
||||
|
||||
I've ported Remind on a SMSQ/SGC system. It should work on other
|
||||
systems without problems. The compiler used was C68 v4.14c.
|
||||
|
||||
Remind should work with each QL or compatible with 512K or more RAM.
|
||||
It'll however NOT work on a standard QL due to it's code size.
|
||||
|
||||
Any problems with the QDOS / SMSQ versions should be sent to:
|
||||
|
||||
Robert H. Klein
|
||||
Bluecherstrasse 24
|
||||
D-56349 Kaub
|
||||
|
||||
Germany
|
||||
702
WHATSNEW.30
702
WHATSNEW.30
@@ -1,702 +0,0 @@
|
||||
CHANGES TO REMIND
|
||||
|
||||
* Version 3.0 Patch 15
|
||||
|
||||
+ IMPORTANT NOTES
|
||||
|
||||
- The tar file now unpacks into a Remind subdirectory rather than into
|
||||
the current working directory.
|
||||
|
||||
- I no longer support Remind under DOS. I don't think I've done anything
|
||||
to stop it from working under DOS, but will no longer compile and test
|
||||
it under DOS, and can't help you if you get stuck. Sorry -- I no longer
|
||||
have a DOS machine.
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
- Changed psshade() to accept 1 or 3 arguments for colored shading in
|
||||
PostScript calendar mode.
|
||||
|
||||
- Added a Print dialog to tkremind.
|
||||
|
||||
- Added support for Brazilian Portuguese courtesy of Marco Paganini
|
||||
|
||||
- Added support for Italian courtesy of Valerio Aimale
|
||||
|
||||
+ BUG FIXES
|
||||
|
||||
- Fixed confusing error in rem2ps help messages.
|
||||
|
||||
- Fixed bug in TkRemind which caused a crash if the "-m" option was used
|
||||
for a month beginning on Sunday. Doh!!!
|
||||
|
||||
* Version 3.0 Patch 14
|
||||
|
||||
+ CHANGE IN COPYING POLICY
|
||||
|
||||
- Remind is now distributed under an _AMENDED_ version of the Gnu
|
||||
General Public License. These amendments are listed in the
|
||||
file COPYRIGHT. The amendments were made for personal reasons;
|
||||
please don't ask me to explain them. They probably don't affect
|
||||
you, anyway.
|
||||
|
||||
+ MAJOR ENHANCEMENTS
|
||||
|
||||
- Added an X-Windows front-end to Remind. To use it, you must be
|
||||
running under X-Windows on UNIX, and have the "wish" tcl/tk
|
||||
interpreter, version 7.4 of tcl and 4.0 of tk. The front-end is
|
||||
called "tkremind".
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
- Added the WARN keyword for precise advance notice. You can now
|
||||
have advance warning 5, 3, 1 and 0 days in advance (for example.)
|
||||
The WARN keyword operates similarly to the SCHED keyword in that it
|
||||
calls a user-defined function to obtain the advance warning sequence.
|
||||
|
||||
- Added support for QDOS/SMSQ on the Sinclair QL microcomputer,
|
||||
courtesy of Robert H. Klein <kleir000@goofy.zdv.Uni-Mainz.de>
|
||||
NOTE THAT I CANNOT TEST NOR SUPPORT THIS VERSION!
|
||||
|
||||
- Added support for AmigaDOS / SAS/C, courtesy of Martin Hohl
|
||||
<martinh@caverna.tynet.sub.org>. As before, I CANNOT TEST NOR
|
||||
SUPPORT THIS VERSION, but will rely on feedback from others.
|
||||
|
||||
+ BUG FIXES
|
||||
|
||||
- Removed the "-n" option from Rem2PS. Instead, if you want the
|
||||
PostScript calendar to start on a Monday, supply the "-m" option
|
||||
to Remind. It was repugnant to have two options to two programs
|
||||
to accomplish one thing.
|
||||
|
||||
- The "hebdate" built-in function worked incorrectly with 5 arguments.
|
||||
The bug was pointed out by Hershel Safer <h.safer@ieee.org>
|
||||
|
||||
- This would hang up REMIND: REM Mon 31 Feb MSG Foo
|
||||
and this would fail quietly: REM Mon 31 Feb 1996 MSG Foo
|
||||
Both have been fixed and now report bad date specifications.
|
||||
|
||||
- Remind now compiles without complaint under gcc -ansi -Wall -pedantic
|
||||
(on my Linux system, anyway!)
|
||||
|
||||
+ IMPORTANT NOTE
|
||||
|
||||
- I had problems building the DOS version with Turbo C. I have access
|
||||
only to ancient versions of Turbo C and Microsoft C. Remind built
|
||||
fine with Microsoft C, but the TC version hung up. I am not too
|
||||
interested in maintaining the DOS version, so when the MSC compiler
|
||||
no longer works, I will drop DOS support. Please not that I will
|
||||
_not_ support MS Windows, and in fact do not allow Remind to run
|
||||
under Windows (see COPYRIGHT).
|
||||
|
||||
* Version 3.0 Patch 13
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
- Added extra parameters to the "psmoon" built-in function so you
|
||||
can annotate the PostScript moon icons.
|
||||
|
||||
- Added a command-line "time" argument to Remind for testing Remind
|
||||
scripts with specific system times. Also added the realnow() function
|
||||
which has the same relationship to now() as realtoday() has to today().
|
||||
(See the man page!)
|
||||
|
||||
- Modified Rem2PS so it prints progress messages to stderr if
|
||||
'-v' command-line argument is used.
|
||||
|
||||
- In the top of the 'finnish.h' file, added a note about
|
||||
Mikko Silvonen's file of Finnish holidays.
|
||||
|
||||
+ BUG FIXES
|
||||
|
||||
- Fixed a bug in rem2ps which sometimes caused incorrect PostScript if
|
||||
the -e and -m options were used. Thanks to Michael Neuhauser for
|
||||
reporting the bug and providing a fix.
|
||||
|
||||
- Made the '-k' option escape shell characters in the message to make it
|
||||
safer.
|
||||
|
||||
- Fixed a segmentation violation which resulted if not all
|
||||
PUSH-OMIT-CONTEXTs were balanced by POP-OMIT-CONTEXTs.
|
||||
|
||||
- Removed the prototype for DestroyValue, which is now a macro. I'm
|
||||
amazed that very few compilers complained about this one!
|
||||
|
||||
- Updated the copyright notices everywhere.
|
||||
|
||||
* Version 3.0 Patch 12
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
- Added support for the Danish language, courtesy of Mogens Lynnerup.
|
||||
|
||||
- Added support for the Polish language, courtesy of Jerzy Sobczyk.
|
||||
|
||||
- Made the Makefile more portable, thanks to Jim Budler.
|
||||
|
||||
- Removed some compiler warnings under Linux, thanks to Francois Pinard.
|
||||
|
||||
- Tidied the man page a bit; added a small bibliography.
|
||||
|
||||
+ BUG FIXES
|
||||
|
||||
- Fixed a problem with the '-k' option which resulted in a newline being
|
||||
placed after the message text. This was giving sh(1) heartburn...
|
||||
|
||||
* Version 3.0 Patch 11
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
- Added release notes to README.UNIX and README.OS2 describing one
|
||||
way to make pop-up alarms under X-Windows and Presentation Manager.
|
||||
|
||||
- Added the $DefaultPrio system variable
|
||||
|
||||
- Improved OS/2 support, thanks to Darrel Hankerson, Russ Herman
|
||||
and Norman Walsh.
|
||||
|
||||
- Made the pushing and popping of operators and operands during
|
||||
expression evaluation in-line code instead of function calls. Did the
|
||||
same for DestroyValue. I'm not sure if this was a good idea -- on the
|
||||
Sparc using gcc, this slowed things down... go figure.
|
||||
|
||||
+ BUG FIXES
|
||||
|
||||
- Fixed a potential memory leak in the char() function.
|
||||
|
||||
- Made the TRIGGER() built-in function return its answer in English even
|
||||
for the foreign-language versions -- this was required for compilers which
|
||||
are not 8-bit clean, and for languages with accented letters.
|
||||
|
||||
- Made expression evaluation slightly faster by eliminating some unnecessary
|
||||
copying of string values.
|
||||
|
||||
- Corrected some non-portable definitions of the macro UPPER(c)
|
||||
|
||||
- Fixed typos in french.h
|
||||
|
||||
* Version 3.0 Patch 10
|
||||
|
||||
+ MAJOR ENHANCEMENT
|
||||
|
||||
- OS/2 support is now much better, thanks to Russ Herman. The Borland
|
||||
C compiler under OS/2 and MS-DOS is supported.
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
- Added the SCHED keyword for precise control of scheduling of timed
|
||||
reminders -- it's really quite nifty!
|
||||
|
||||
- Modified the trigger() function to take up to three arguments -- in
|
||||
addition to a date, you can specify a time and a flag specifying that
|
||||
the trigger should be converted from UTC to local time.
|
||||
|
||||
- Added $SortByDate, $SortByTime and $SortByPrio system variables.
|
||||
|
||||
- Added test suites for MS-DOS and OS/2, courtesy of Russ Herman.
|
||||
|
||||
- In PostScript output, the month and year are output in the %%Page: comments.
|
||||
Makes it nicer to view multi-month calendars with previewers (eg,
|
||||
GhostView.)
|
||||
|
||||
- Added the PRIORITY keyword for more control of sort order of reminders.
|
||||
Based on a suggestion by George M. Sipe.
|
||||
|
||||
- Added the msgprefix() and msgsuffix() evaluations around MSG-type
|
||||
reminders for doing fancy things with reminders of different priorities.
|
||||
Also added calprefix() and calsuffix() for doing the same thing in
|
||||
calendar mode.
|
||||
|
||||
- Enabled the -g option during calendar mode as well as regular mode.
|
||||
|
||||
+ BUG FIXES
|
||||
|
||||
- Fixed minor bugs in the LocalToUTC and UTCToLocal functions.
|
||||
|
||||
- "remind -c -de file" used to cause a segmentation violation. Whoops...
|
||||
|
||||
- Some files which should have included <string.h> didn't include it - these
|
||||
are now fixed.
|
||||
|
||||
- Fixed the moondate() and moontime() functions, which used to be incorrect
|
||||
after November 1994.
|
||||
|
||||
- Fixed the Finnish language support which was missing a few newlines.
|
||||
|
||||
* Version 3.0 Patch 9
|
||||
|
||||
+ NOTES
|
||||
|
||||
- Remind is now too big to compile under the "small" model in
|
||||
MS-DOS. You must recompile everything under the "medium" model.
|
||||
|
||||
+ MAJOR ENHANCEMENTS
|
||||
|
||||
- Functions moonphase(), moondate() and moontime() were added for dealing
|
||||
with phases of the moon. The code was snarfed from "moontool" by
|
||||
John Walker - see the file "moon.c" for detailed acknowledgement. Also
|
||||
added psmoon() for putting little moon symbols on the PostScript calendar.
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
- Added some more examples to defs.rem - notably, support for ANSI
|
||||
terminal color-changing escape sequences, thanks to Gail Gurman.
|
||||
|
||||
- Modified both Remind and Rem2PS so that calendars can start on Sunday or
|
||||
Monday, depending on your preference. Unfortunately, the command-line
|
||||
options are different -- for Remind, it's '-m' and for Rem2PS it's '-n'
|
||||
because '-m' was already in use. Based on a suggestion by John Plate
|
||||
and a patch sent by Mikko Silvonen.
|
||||
|
||||
- The Finnish language support is better - now, all usage and error
|
||||
messages are in Finnish. In addition, the Finnish language module
|
||||
supports the IBM extended character set as well as ISOLATIN1.
|
||||
Thanks to Mikko Silvonen.
|
||||
|
||||
- Modified Rem2PS to allow more control over the placement of the small
|
||||
calendars, thanks to a suggestion by Frank Vance. Also added option
|
||||
to control the calendar title (e.g., "September 1993") independently
|
||||
of day-of-week headings.
|
||||
|
||||
- Added the psshade() function to make it easier to shade PostScript
|
||||
calendars.
|
||||
|
||||
- Allowed a repeat parameter '*num' to be supplied on command line so
|
||||
a 'preview' of many days' worth of reminders can be obtained easily.
|
||||
|
||||
- Added the $Location system variable.
|
||||
|
||||
- Allowed an expression to be supplied to EXIT to return an exit
|
||||
status.
|
||||
|
||||
- Added the FLUSH command.
|
||||
|
||||
+ BUG FIXES
|
||||
|
||||
- Fixed the MSF-type reminder to fill paragraphs more intelligently.
|
||||
It puts double spaces after '!', '.' and '?', and can handle quotes,
|
||||
brackets, etc. after periods, etc. These characters can be specified
|
||||
with the $EndSent and $EndSentIg system variables. Also modified it
|
||||
so that newlines in the body start new paragraphs, rather than being
|
||||
swallowed as white-space.
|
||||
|
||||
* Version 3.0 Patch 8
|
||||
|
||||
+ MAJOR ENHANCEMENTS
|
||||
|
||||
- Changed the code to more fully support foreign languages - error
|
||||
messages and usage instructions can now be changed. All changes can
|
||||
be localized in the appropriate language.h files.
|
||||
|
||||
- Added support for the French language, courtesy of Laurent Duperval.
|
||||
Note that the French support is more complete than for other languages -
|
||||
French usage instructions and error messages are supported.
|
||||
|
||||
- Added support for the Norwegian language, courtesy of Trygve Randen.
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
- Added code for the functions timelocal() and timegm(), courtesy of
|
||||
Lucio de Re. This is for those very few machines whose libraries
|
||||
include neither those functions nor mktime().
|
||||
|
||||
- Added the filedate() function.
|
||||
|
||||
- Allowed the filename to be specified as "-" to cause Remind to take
|
||||
its input from the standard input stream.
|
||||
|
||||
- Added the "MSF" keyword to cause reminders to be formatted automatically.
|
||||
This keyword paragraph-fills reminder text following user specifications.
|
||||
Based on a suggestion by Ken McGlothlen.
|
||||
|
||||
- Added the "-e" option to Rem2PS, allowing the PostScript calendar
|
||||
to fill the entire page. Thanks to Arthur G. Yaffe.
|
||||
|
||||
+ BUG FIXES
|
||||
|
||||
- Corrected the Hebrew holidays Tzom Gedalia, Tzom Tevet, Ta'anit
|
||||
Esther, Tzom Tamuz and Tisha B'Av so they won't occur on Saturday.
|
||||
Corrections made following the algorithm in "Calendrical Calculations"
|
||||
by Nachum Dershowitz and Edward M. Reingold.
|
||||
|
||||
- Changed the dutch.h language file as suggested by Erik-Jan Vens. Made
|
||||
month and day names lower-case; corrected the spelling of oktober.
|
||||
|
||||
- Changed HashVal in var.c to use unsigned arithmetic - it's conceivable
|
||||
that a machine with signed chars could cause problems otherwise.
|
||||
|
||||
- Changed the LONG_* macros in config.h to LON_* to avoid conflicts
|
||||
with names defined by ANSI C. Thanks to David W. Sanderson.
|
||||
|
||||
- Allowed the built-in function char() to accept numbers in the
|
||||
range [-128, 255] (but not 0) so that char(asc(s)) works even
|
||||
on machines with signed char types.
|
||||
|
||||
* Version 3.0 Patch 7
|
||||
|
||||
+ MAJOR ENHANCEMENTS
|
||||
|
||||
- Added "system variables" to allow the user more control over
|
||||
Remind operation, and to allow queries about the command-line
|
||||
options from within a reminder script. They allow for specification
|
||||
of longitude and latitude for use by sunrise/sunset calculations.
|
||||
|
||||
- Added sunrise(), sunset(), isdst() and minsfromutc() functions -
|
||||
these are needed to support sunrise and sunset calculations.
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
- Allowed the MSG, RUN, CAL, PS and PSF keywords to be used in the
|
||||
same reminder as the SATISFY keyword. This makes many complex
|
||||
reminders more compact.
|
||||
|
||||
- Added the filedir() function to enable Remind's include to emulate
|
||||
CPP's #include more closely.
|
||||
|
||||
- Allowed non-root users to use the "-u" option. It only affects
|
||||
the "SHELL", "HOME", "USER" and "LOGNAME" environment variables -
|
||||
it doesn't change the effective uid and gid when run by non-root.
|
||||
|
||||
- Added built-in function "easterdate" to calculate date of Easter
|
||||
Sunday - function courtesy of Michael Salmon.
|
||||
|
||||
- Improved the Jewish holiday reminders in "defs.rem" to give advance
|
||||
notice of holidays.
|
||||
|
||||
- Allowed the "simple calendar" option (-s) to specify a number of
|
||||
weeks as well as a number of months, in the same fashion as the
|
||||
-c option. Thanks to Dave Rickel.
|
||||
|
||||
+ BUG FIXES
|
||||
|
||||
- Corrected the behaviour of "hebdate" for jahrzeits; added an additional
|
||||
parameter to specify the behaviour of dates in Adar during leap years.
|
||||
|
||||
- Changed kall so that "kall sh" doesn't commit suicide - patch courtesy
|
||||
of Michael Salmon.
|
||||
|
||||
* Version 3.0 Patch 6
|
||||
|
||||
+ MINOR ENHANCEMENTS
|
||||
|
||||
- Added the PS- and PSFILE-type reminders - these allow you to include
|
||||
arbitrary PostScript code in your PostScript calendars. Useful for
|
||||
shading, drawing graphics on calendars, etc. Use with care, though!
|
||||
|
||||
- Added the "-ivar=val" option to initialize variables from the command
|
||||
line. Changed the remind-all.* shell scripts to predefine the variable
|
||||
"remind_all".
|
||||
|
||||
+ BUG FIXES
|
||||
|
||||
- Fixed a bug in the hebmon(), hebday() and hebyear() functions - there
|
||||
was an off-by-one error. Sorry!
|
||||
|
||||
- Fixed a bug in the hebdate() function which resulted in infinite loops
|
||||
for dates after about 2075
|
||||
|
||||
- Fixed a bug in the -u option which sometimes caused a core dump
|
||||
(embarrassed grin!) The fix is due to Tina Hoeltig. Thanks, Tina!
|
||||
|
||||
* Version 3.0 Patch 5
|
||||
|
||||
+ MAJOR ENHANCEMENTS:
|
||||
|
||||
- Added support for the Hebrew calendar - can now specify Jewish holidays
|
||||
easily. Thanks to Amos Shapir for explaining the Hebrew calendar, and
|
||||
to Danny Sadinoff, from whose HEBCAL program I got some inspiration.
|
||||
Also thanks to David W. Tamkin and Frank Yellin for explaining the rules
|
||||
for jahrzeits.
|
||||
|
||||
+ MINOR ENHANCEMENTS:
|
||||
|
||||
- Allowed the default page size used by Rem2PS to be selected in config.h
|
||||
|
||||
- Edited the defs.rem file to contain Jewish holidays. Cleaned up some
|
||||
of the examples and improved the layout - thanks to George M. Sipe.
|
||||
|
||||
- Modified the IIF function to be more general
|
||||
|
||||
- Updated finnish.h to support the ISO 8859-1 character set, courtesy
|
||||
of Mikko Silvonen.
|
||||
|
||||
- Changed the date conversion routines to greatly speed up conversion from
|
||||
Julian to yyyy/mm/dd form.
|
||||
|
||||
+ BUG FIXES:
|
||||
|
||||
- Fixed a bug in which Remind complained incorrectly about a missing quote
|
||||
in the command SET foo ""
|
||||
|
||||
- Fixed bugs in dosubst.c which caused the %o, %1 and %@ substitutions
|
||||
to be incorrect
|
||||
|
||||
- Fixed a bug in the man page - thanks to Ed Oskiewicz.
|
||||
|
||||
* Version 3.0 Patch 4
|
||||
|
||||
- Added the -g option - this sorts reminders by date/time before
|
||||
issuing them. (You can see I'm running out of letters to
|
||||
name options!) This feature was suggested by George M. Sipe,
|
||||
Paul D. Smith, and Francois Pinard.
|
||||
|
||||
- Added the "args()" and "dosubst()" built-in functions - see the
|
||||
man page for details.
|
||||
|
||||
- Added more support for the ISO 8859-1 character set, and
|
||||
modified the german.h file to take advantage of this, thanks
|
||||
to Robert Joop.
|
||||
|
||||
- Allowed any character to be used as date and time separator
|
||||
characters (not just "/-:.")
|
||||
|
||||
- Added support for the Dutch and Finnish languages, thanks to
|
||||
Willem Kasdorp and Mikko Silvonen. (Anyone care to contribute
|
||||
French? Italian? Spanish?)
|
||||
|
||||
- Made Remind issue a warning if you try to redefine a built-in
|
||||
function. This warning is disabled in 'Hush' mode.
|
||||
|
||||
- Added the SCANFROM clause to the REM command. This allows reasonably
|
||||
safe moveable OMITs such as the Labour Day example in the manual.
|
||||
|
||||
- Added more examples to the defs.rem file, and cleaned up some old
|
||||
examples. Note that there are now safe moveable holidays for most
|
||||
U.S. holidays provided in the defs.rem file.
|
||||
|
||||
- Added the '-k' option, which allows MSG-type reminders to be passed
|
||||
to any system command. (Idea and patch courtesy of Philipp Slusallek.)
|
||||
|
||||
- Allowed selection of ':' or '.' as time separator characters at
|
||||
compile-time.
|
||||
|
||||
- Edited the COPYRIGHT file to clarify the rules. Please read them.
|
||||
|
||||
- Removed hard-coding of "am" and "pm" and placed them in language-specific
|
||||
header files as #defines L_AM and L_PM
|
||||
|
||||
- Fixed a bug in the FindToken() routine which had, through sheer luck,
|
||||
never been activated until the SCANFROM clause was added!
|
||||
|
||||
- Fixed the UNTIL clause to check for a valid expiry date.
|
||||
|
||||
- Removed identifiers in the C source beginning with "_" to conform
|
||||
to ANSI practice.
|
||||
|
||||
- Fixed a bug in the -u option which resulted in environment variables
|
||||
SHELL and USER not being set correctly. Also made -u set the LOGNAME
|
||||
environment variable.
|
||||
|
||||
- Fixed a couple of typos in the man page; added LDFLAGS to the
|
||||
Makefile. (Thanks to Dave Wolfe.)
|
||||
|
||||
- Put my new mailing address in the README files.
|
||||
|
||||
* Version 3.0 Patch 3
|
||||
|
||||
- Corrected bugs in Remind and Rem2PS. No new features added. You
|
||||
should NOT use patch level 2 - either stick to 3.0.1 or upgrade to
|
||||
3.0.3.
|
||||
|
||||
* Version 3.0 Patch 2
|
||||
|
||||
- Added the -u option to Remind so that root can run it as any user.
|
||||
This simplifies the remind-all scripts, and makes them more efficient.
|
||||
If you are worried that this option is a security hole, you can
|
||||
disable it in config.h
|
||||
|
||||
- Changed the RUN command so that RUN OFF can be used anywhere, even
|
||||
though RUN ON only works in the top-level file. This eases the
|
||||
management of global files which may want to switch RUN OFF.
|
||||
|
||||
- Added ISO encoding (ISO 8859-1) to the PostScript output, courtesy of
|
||||
Michael Salmon. This can be selected with the '-i' option in rem2ps.
|
||||
|
||||
- Added support for the '-' date separator as well as the '/' separator.
|
||||
|
||||
- Added support for languages other than English. Note that this support
|
||||
is not complete - error messages are still in English. The idea and
|
||||
German translation came from Wolfgang Thronicke.
|
||||
|
||||
- Changed the -w option to include the "padding" and "spacing" options.
|
||||
NOTE INCOMPATIBILITY: In the previous patch level, creating a weekly
|
||||
calendar using the -c+n option left no blank lines between the day
|
||||
number and the first reminder entry. This has been changed so that one
|
||||
blank line is left. To revert to the old behaviour, use the "-w,,0"
|
||||
option.
|
||||
|
||||
- Added the -o option to Rem2ps. This allows you to specify the margins
|
||||
when producing a PostScript calendar.
|
||||
|
||||
- Updated the copyright notices in all the files. :-)
|
||||
|
||||
- Added 'make clobber' and 'make test' targets to the Unix makefile.
|
||||
|
||||
- Corrected typos in WHATSNEW.30 and remind.1 man page. Thanks to
|
||||
Dave Wolfe <dwolfe@pffft.sps.mot.com>
|
||||
|
||||
- Changed Remind so that supplying the -a option causes timed reminders
|
||||
not to be placed into the calendar in calendar mode.
|
||||
|
||||
* Version 3.0 Patch 1
|
||||
|
||||
- Wrote the Rem2ps program to produce PostScript calendars
|
||||
|
||||
- Added an 'install' target to the Makefile
|
||||
|
||||
- Fixed a bug which allowed the shell() function to execute in timed
|
||||
reminders which were queued with RUN disabled.
|
||||
|
||||
- Added support for OS/2, courtesy of DARREL HANKERSON
|
||||
<HANK@DUCVAX.AUBURN.EDU>
|
||||
|
||||
- In expressions, can now specify literal dates as 'yyyy/mm/dd' rather than
|
||||
using the date() function.
|
||||
|
||||
- Fixed all the source files to include "config.h" first.
|
||||
|
||||
- Changed the way triggers are calculated so that trigger dates are
|
||||
always valid if year, month and day are specified, and there is no
|
||||
UNTIL clause. See MAN page section "DETAILS ABOUT TRIGVALID()."
|
||||
|
||||
- Defined _POSIX_SOURCE so Remind will compile on SGI workstations (and
|
||||
be more portable... I hope.)
|
||||
|
||||
- Fixed some rather brain-dead definitions of UPPER and LOWER, as pointed
|
||||
out by <rsalz@osf.org>
|
||||
|
||||
- Added more details to the Man page concerning how triggers are computed,
|
||||
and added warnings about computing OMIT dates.
|
||||
|
||||
- Added the file defs.rem which contains examples of useful definitions and
|
||||
triggers.
|
||||
|
||||
- Changed the script test-rem to be a sh script instead of csh for improved
|
||||
portability.
|
||||
|
||||
- Fixed up the README.* files to reflect the changes.
|
||||
|
||||
- Re-formatted the WHATSNEW.30 file.
|
||||
|
||||
* Version 3.0
|
||||
|
||||
- Total rewrite from previous versions
|
||||
|
||||
- Added variables, expressions, flow-control statements, daemon mode
|
||||
|
||||
- Added "expression pasting"
|
||||
|
||||
- Added CAL-type reminders
|
||||
|
||||
- Added the SATISFY clause
|
||||
|
||||
- Improved debugging of reminder scripts
|
||||
|
||||
- Took out the "purge" option - it is in general too dificult to tell when
|
||||
a reminder has expired for good, so now it's up to you to do this
|
||||
by hand.
|
||||
|
||||
- Fixed a lurking bug in trigger date calculation which, amazingly, had not
|
||||
been caught in the couple of years that Remind has been out!
|
||||
|
||||
* Version 2.3 Patch 5
|
||||
|
||||
- Added the "c+n" option for printing a calendar by
|
||||
weeks instead of months, courtesy Dennis Cottel (dennis@peanuts.nosc.mil).
|
||||
|
||||
* Version 2.3 Patch 4
|
||||
|
||||
- Made the init.c file nicer. Made the Makefile
|
||||
prettier. Added "make test", "make tar" and "make shar" Makefile targets.
|
||||
|
||||
* Version 2.3 Patch 3
|
||||
|
||||
- Added a command-line option for Remind to process
|
||||
queued reminders in the foreground. This makes automatic termination
|
||||
of Remind processes from within X-Windows and Sunview easier.
|
||||
|
||||
* Version 2.3 Patch 2
|
||||
|
||||
- Fixed up a problem with timed reminders which resulted
|
||||
in cursor not starting from left side of screen on some systems.
|
||||
|
||||
- Fixed the SIGINT handler for SYSV systems - this was interrupting the
|
||||
sleep(2) system call.
|
||||
|
||||
- Closed stdin and stdout if remind was part of a pipe - this prevents other
|
||||
sections of the pipe from hanging as remind puts itself in the background.
|
||||
|
||||
- Added the "-h" (Hush mode) option
|
||||
|
||||
- Added the "%#" and "%@" modifiers for the current time.
|
||||
|
||||
- Made the Makefile more portable
|
||||
|
||||
* Version 2.3 Patch 1
|
||||
|
||||
- Added the "-t" command-line option to get Remind
|
||||
to trigger all non-expired reminders.
|
||||
|
||||
- Added Turbo C support courtesy of Rhys Weatherly
|
||||
|
||||
- Added the "RUN ON" and "RUN OFF" commands for a secure interface with
|
||||
the Elm mail system.
|
||||
|
||||
- Added the "rem" shell script for running Remind with a default script.
|
||||
|
||||
- Added manual pages for "kall" and "rem".
|
||||
|
||||
* Version 2.3
|
||||
|
||||
- Added the UNTIL keyword for forcing reminders to expire.
|
||||
|
||||
- Added the "++" form of 'back' and the "--" form of 'delta' for
|
||||
ignoring OMIT information.
|
||||
|
||||
- Added the CLEAR-OMIT-CONTEXT, PUSH-OMIT-CONTEXT and POP-OMIT-CONTEXT
|
||||
keywords for isolating personal or peculiar reminders from the global
|
||||
OMIT context.
|
||||
|
||||
- Speeded up the parsing of tokens.
|
||||
|
||||
- Changed the source to recognize and exploit ANSI-C compilers which
|
||||
accept function prototypes.
|
||||
|
||||
- Added the "-n" option to output the next occurrence of each reminder
|
||||
in SimpleCalendar format
|
||||
|
||||
- Modified the calendar and SimpleCalendar formats so that the % escape
|
||||
substitutions ARE performed.
|
||||
|
||||
* Version 2.2 - Patch 5
|
||||
|
||||
- Added the BEFORE, AFTER and SKIP tokens to make the
|
||||
handling of holidays more sensible. Also corrected a few more bugs.
|
||||
|
||||
* Version 2.2 - Patch 3
|
||||
|
||||
- Added the MSG or RUN tokens in an OMIT command; also
|
||||
allowed RUN-type reminders to be explicitly included in the calendar by
|
||||
using the %" escape sequence.
|
||||
|
||||
* Version 2.2
|
||||
|
||||
- Added the AT keyword, the timed reminders daemon, and the
|
||||
calendar facility.
|
||||
|
||||
* Version 2.1
|
||||
|
||||
- Added the "repeat" token for repeating reminders with a period
|
||||
other than 7 days. Also fixed some bugs from version 2.0
|
||||
|
||||
* Version 2.0
|
||||
|
||||
- first public release. Included advanced date specifications,
|
||||
character substitution, and the RUN keyword.
|
||||
|
||||
* Version 1.0
|
||||
|
||||
- never publicly released.
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
IGNORE=154
|
||||
IGNORE=161
|
||||
IGNORE=100
|
||||
IGNORE=85
|
||||
LINKOPT SC
|
||||
LINKOPT SD
|
||||
LINKOPT NOICONS
|
||||
63
amiga.c
63
amiga.c
@@ -1,63 +0,0 @@
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* AMIGA.C */
|
||||
/* */
|
||||
/* Support functions for AmigaDOS */
|
||||
/* */
|
||||
/* This file is Copyright (C) 1995 by Martin Hohl */
|
||||
/* */
|
||||
/* This file is part of REMIND. */
|
||||
/* Remind is Copyright (C) 1992-1996 by David F. Skoll */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
static char const RCSID[] = "$Id: amiga.c,v 1.1 1996-03-31 04:01:53 dfs Exp $";
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <exec/types.h>
|
||||
#include <dos/dos.h>
|
||||
#include <dos/dosextens.h>
|
||||
|
||||
#include <proto/dos.h>
|
||||
|
||||
#include "version.h" /* Hopefully this will define VERSION as a string */
|
||||
|
||||
#ifdef __SASC_60
|
||||
/* AmigaDOS 2.04 compatible version string for "version" utility */
|
||||
const static char ver_string[] = "$VER: remind "VERSION" "__AMIGADATE__;
|
||||
#endif
|
||||
|
||||
void sleep(int dt)
|
||||
{
|
||||
register long Ticks;
|
||||
|
||||
if (dt != 0) {
|
||||
Ticks = 50L * dt;
|
||||
Delay(Ticks);
|
||||
}
|
||||
}
|
||||
|
||||
void execvp(char *name, char **argvec)
|
||||
{
|
||||
char *cmdline;
|
||||
int i,l;
|
||||
|
||||
l = strlen(name)+2;
|
||||
i=1;
|
||||
while (argvec[i] != 0L) {
|
||||
l += strlen(argvec[i])+1;
|
||||
i++;
|
||||
};
|
||||
cmdline = malloc(l+1);
|
||||
if (cmdline == 0L) return;
|
||||
strcpy(cmdline,name);
|
||||
i=1;
|
||||
while (argvec[i] != 0L) {
|
||||
strcat(cmdline," ");
|
||||
strcat(cmdline,argvec[i]);
|
||||
i++;
|
||||
};
|
||||
system(cmdline);
|
||||
free(cmdline);
|
||||
}
|
||||
825
build.tk
Normal file
825
build.tk
Normal file
@@ -0,0 +1,825 @@
|
||||
#!/bin/sh
|
||||
# -*-Mode: TCL;-*-
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#--------------------------------------------------------------
|
||||
# BUILD.TK
|
||||
#
|
||||
# A cheesy graphical front-end for building and installing REMIND.
|
||||
#
|
||||
# This file is part of REMIND.
|
||||
# Copyright (C) 1992-2018 Dianne Skoll
|
||||
#
|
||||
#--------------------------------------------------------------
|
||||
|
||||
# the next line restarts using wish \
|
||||
exec wish "$0" "$@"
|
||||
|
||||
#***********************************************************************
|
||||
# %PROCEDURE: SetConfigDefaults
|
||||
# %ARGUMENTS:
|
||||
# None
|
||||
# %RETURNS:
|
||||
# Nothing
|
||||
# %DESCRIPTION:
|
||||
# Sets up default values for various parameters.
|
||||
#***********************************************************************
|
||||
proc SetConfigDefaults {} {
|
||||
global Config
|
||||
set Config(LAT_DEG) 45
|
||||
set Config(LAT_MIN) 24
|
||||
set Config(LAT_SEC) 14
|
||||
set Config(LON_DEG) 75
|
||||
set Config(LON_MIN) 39
|
||||
set Config(LON_SEC) 23
|
||||
set Config(LOCATION) "Ottawa"
|
||||
set Config(DEFAULT_PAGE) "Letter"
|
||||
set Config(DATESEP) "-"
|
||||
set Config(TIMESEP) ":"
|
||||
set Config(NORTHERN_HEMISPHERE) 1
|
||||
set Config(WESTERN_HEMISPHERE) 1
|
||||
set Config(LANGUAGE) "English"
|
||||
set Config(INST_DIR) "/usr/local/bin"
|
||||
set Config(MAN_DIR) "/usr/local/man"
|
||||
}
|
||||
|
||||
#***********************************************************************
|
||||
# %PROCEDURE: Bail
|
||||
# %ARGUMENTS:
|
||||
# msg -- a message
|
||||
# %RETURNS:
|
||||
# Does not return
|
||||
# %DESCRIPTION:
|
||||
# Pops up an error dialog; then calls exit.
|
||||
#***********************************************************************
|
||||
proc Bail { msg } {
|
||||
tk_dialog .err "Remind Configuration Error" $msg error 0 "Bummer"
|
||||
exit 1
|
||||
}
|
||||
|
||||
#***********************************************************************
|
||||
# %PROCEDURE: CheckSanity
|
||||
# %ARGUMENTS:
|
||||
# None
|
||||
# %RETURNS:
|
||||
# Nothing
|
||||
# %DESCRIPTION:
|
||||
# Checks sanity of install dir -- checks for critical files,
|
||||
# warns user if something looks wrong.
|
||||
#***********************************************************************
|
||||
proc CheckSanity {} {
|
||||
if {![file executable ./configure]} {
|
||||
wm withdraw .
|
||||
Bail "I can't seem to execute the file ./configure -- make sure you have all required files and are running this from the top-level Remind directory"
|
||||
}
|
||||
if {![file readable ./src/custom.h.in]} {
|
||||
wm withdraw .
|
||||
Bail "I can't seem to find the file src/custom.h.in -- make sure you have all required files and are running this from the top-level Remind directory"
|
||||
}
|
||||
}
|
||||
|
||||
#***********************************************************************
|
||||
# %PROCEDURE: CreateMainDialog
|
||||
# %ARGUMENTS:
|
||||
# None
|
||||
# %RETURNS:
|
||||
# Nothing
|
||||
# %DESCRIPTION:
|
||||
# Creates and displays the main configuration dialog
|
||||
#***********************************************************************
|
||||
proc CreateMainDialog {} {
|
||||
global Instdir Loc Options
|
||||
|
||||
wm title . "Remind Configuration"
|
||||
wm iconname . "Remind Config"
|
||||
|
||||
SetConfigFromRemind
|
||||
tabnotebook_create .tn
|
||||
|
||||
set Instdir [tabnotebook_page .tn "Installation Directories"]
|
||||
CreateInstallDirDialog $Instdir
|
||||
|
||||
set Loc [tabnotebook_page .tn "Location"]
|
||||
CreateLocationDialog $Loc
|
||||
|
||||
set Options [tabnotebook_page .tn "Options"]
|
||||
CreateOptionsDialog $Options
|
||||
pack .tn -side top -expand 1 -fill both
|
||||
|
||||
frame .buttons
|
||||
button .build -text "Build Remind" -command BuildRemind
|
||||
button .cancel -text "Cancel" -command exit
|
||||
|
||||
pack .build .cancel -in .buttons -side left -expand 1 -fill both
|
||||
pack .buttons -side top -expand 0 -fill x
|
||||
}
|
||||
|
||||
#***********************************************************************
|
||||
# %PROCEDURE: CreateInstallDirDialog
|
||||
# %ARGUMENTS:
|
||||
# w -- frame containing widgets
|
||||
# %RETURNS:
|
||||
# Nothing
|
||||
# %DESCRIPTION:
|
||||
# Creates the "installation directories" dialog.
|
||||
#***********************************************************************
|
||||
proc CreateInstallDirDialog { w } {
|
||||
global Config
|
||||
label $w.binlabel -text "Location for programs: "
|
||||
entry $w.bin -width 30
|
||||
$w.bin insert end $Config(INST_DIR)
|
||||
|
||||
label $w.manlabel -text "Location for man pages: "
|
||||
entry $w.man -width 30
|
||||
$w.man insert end $Config(MAN_DIR)
|
||||
|
||||
text $w.blurb -width 1 -height 5 -wrap word -relief flat -takefocus 0
|
||||
$w.blurb insert end "\n(Tabbed-notebook Tcl code taken from \"Effective Tcl/Tk Programming\" by Mark Harrison and Michael McLennan, Addison-Wesley Professional Computing Series.)"
|
||||
$w.blurb configure -state disabled
|
||||
# Disable all text-window behaviour
|
||||
bindtags $w.blurb {NoSuchTag}
|
||||
grid $w.binlabel -row 0 -column 0 -sticky e
|
||||
grid $w.bin -row 0 -column 1 -sticky nsew
|
||||
grid $w.manlabel -row 1 -column 0 -sticky e
|
||||
grid $w.man -row 1 -column 1 -sticky nsew
|
||||
grid $w.blurb - -sticky nsew
|
||||
}
|
||||
|
||||
#***********************************************************************
|
||||
# %PROCEDURE: CreateLocationDialog
|
||||
# %ARGUMENTS:
|
||||
# w -- frame containing dialog
|
||||
# %RETURNS:
|
||||
# Nothing
|
||||
# %DESCRIPTION:
|
||||
# Creates the location dialog
|
||||
#***********************************************************************
|
||||
proc CreateLocationDialog { w } {
|
||||
global Config
|
||||
scale $w.latdeg -label "Latitude (degrees)" -orient horizontal \
|
||||
-from 0 -to 89 -length 300 -variable Config(LAT_DEG)
|
||||
scale $w.latmin -label "Latitude (minutes)" -orient horizontal \
|
||||
-from 0 -to 59 -length 300 -variable Config(LAT_MIN)
|
||||
scale $w.latsec -label "Latitude (seconds)" -orient horizontal \
|
||||
-from 0 -to 59 -length 300 -variable Config(LAT_SEC)
|
||||
scale $w.londeg -label "Longitude (degrees)" -orient horizontal \
|
||||
-from 0 -to 179 -length 300 -variable Config(LON_DEG)
|
||||
scale $w.lonmin -label "Longtude (minutes)" -orient horizontal \
|
||||
-from 0 -to 59 -length 300 -variable Config(LON_MIN)
|
||||
scale $w.lonsec -label "Longitude (seconds)" -orient horizontal \
|
||||
-from 0 -to 59 -length 300 -variable Config(LON_SEC)
|
||||
|
||||
radiobutton $w.north -text "Northern Hemisphere" \
|
||||
-variable Config(NORTHERN_HEMISPHERE) -value 1
|
||||
radiobutton $w.south -text "Southern Hemisphere" \
|
||||
-variable Config(NORTHERN_HEMISPHERE) -value 0
|
||||
radiobutton $w.west -text "Western Hemisphere" \
|
||||
-variable Config(WESTERN_HEMISPHERE) -value 1
|
||||
radiobutton $w.east -text "Eastern Hemisphere" \
|
||||
-variable Config(WESTERN_HEMISPHERE) -value 0
|
||||
|
||||
label $w.loclab -text "City or Town: "
|
||||
entry $w.location -width 20
|
||||
$w.location insert end $Config(LOCATION)
|
||||
grid $w.latdeg -
|
||||
grid $w.latmin -
|
||||
grid $w.latsec -
|
||||
grid $w.londeg -
|
||||
grid $w.lonmin -
|
||||
grid $w.lonsec -
|
||||
|
||||
grid $w.north $w.west
|
||||
grid $w.south $w.east
|
||||
grid $w.loclab -sticky e
|
||||
grid $w.location -sticky nsew -row 6 -column 1
|
||||
}
|
||||
|
||||
#***********************************************************************
|
||||
# %PROCEDURE: CreateOptionsDialog
|
||||
# %ARGUMENTS:
|
||||
# w -- frame containing dialog
|
||||
# %RETURNS:
|
||||
# Nothing
|
||||
# %DESCRIPTION:
|
||||
# Creates the options dialog
|
||||
#***********************************************************************
|
||||
proc CreateOptionsDialog { w } {
|
||||
global Config
|
||||
|
||||
label $w.pagelabel -text "Default page size: "
|
||||
menubutton $w.page -text $Config(DEFAULT_PAGE) \
|
||||
-indicatoron 1 -relief raised \
|
||||
-menu $w.page.menu
|
||||
menu $w.page.menu -tearoff 0
|
||||
$w.page.menu add command -label "Letter" \
|
||||
-command "$w.page configure -text Letter"
|
||||
$w.page.menu add command -label "A4" -command "$w.page configure -text A4"
|
||||
|
||||
grid configure $w.pagelabel -row 0 -column 0 -sticky e
|
||||
grid configure $w.page -row 0 -column 1 -sticky nsew
|
||||
|
||||
label $w.datelabel -text "Default date separator: "
|
||||
menubutton $w.date -text $Config(DATESEP) -indicatoron 1 -relief raised \
|
||||
-menu $w.date.menu
|
||||
menu $w.date.menu -tearoff 0
|
||||
$w.date.menu add command -label "/" -command "$w.date configure -text /"
|
||||
$w.date.menu add command -label "-" -command "$w.date configure -text -"
|
||||
|
||||
grid configure $w.datelabel -row 1 -column 0 -sticky e
|
||||
grid configure $w.date -row 1 -column 1 -sticky nsew
|
||||
|
||||
label $w.timelabel -text "Default time separator: "
|
||||
menubutton $w.time -text $Config(TIMESEP) -indicatoron 1 -relief raised \
|
||||
-menu $w.time.menu
|
||||
menu $w.time.menu -tearoff 0
|
||||
$w.time.menu add command -label ":" -command "$w.time configure -text :"
|
||||
$w.time.menu add command -label "." -command "$w.time configure -text ."
|
||||
|
||||
grid configure $w.timelabel -row 2 -column 0 -sticky e
|
||||
grid configure $w.time -row 2 -column 1 -sticky nsew
|
||||
|
||||
label $w.langlabel -text "Language: "
|
||||
menubutton $w.lang -text $Config(LANGUAGE) -indicatoron 1 -relief raised \
|
||||
-menu $w.lang.menu
|
||||
menu $w.lang.menu -tearoff 0
|
||||
foreach lang {
|
||||
"Brazilian Portuguese"
|
||||
"Danish"
|
||||
"Dutch"
|
||||
"English"
|
||||
"Finnish"
|
||||
"French"
|
||||
"German"
|
||||
"Italian"
|
||||
"Norwegian"
|
||||
"Polish"
|
||||
"Romanian"
|
||||
"Spanish"
|
||||
"Icelandic"
|
||||
} {
|
||||
$w.lang.menu add command -label $lang -command [list $w.lang configure -text $lang]
|
||||
}
|
||||
|
||||
grid configure $w.langlabel -row 3 -column 0 -sticky e
|
||||
grid configure $w.lang -row 3 -column 1 -sticky nsew
|
||||
|
||||
}
|
||||
|
||||
#***********************************************************************
|
||||
# %PROCEDURE: BuildRemind
|
||||
# %ARGUMENTS:
|
||||
# None
|
||||
# %RETURNS:
|
||||
# Nothing
|
||||
# %DESCRIPTION:
|
||||
# Builds Remind by:
|
||||
# -- creating custom.h from custom.h.in
|
||||
# -- running ./configure
|
||||
# -- running make
|
||||
#***********************************************************************
|
||||
proc BuildRemind {} {
|
||||
pack forget .tn
|
||||
pack forget .buttons
|
||||
wm title . "Remind Configuration Status"
|
||||
text .msgs -width 130 -height 35 -wrap char -yscrollcommand ".sb set"
|
||||
scrollbar .sb -orient vertical -command ".msgs yview"
|
||||
|
||||
.msgs tag configure green -foreground #005500
|
||||
.msgs tag configure red -foreground #990000
|
||||
pack .msgs -side left -expand 1 -fill both
|
||||
pack .sb -side left -expand 0 -fill y
|
||||
|
||||
update
|
||||
|
||||
.msgs insert end "\n>>> Creating src/custom.h...\n\n" green
|
||||
CreateCustomH
|
||||
.msgs insert end ">>> Calling `./configure'...\n\n" green
|
||||
CallConfigure
|
||||
.msgs insert end ">>> Calling `make'...\n\n" green
|
||||
CallMake
|
||||
.msgs insert end "\n----------------------------------------------\n\n"
|
||||
.msgs insert end "Remind" red
|
||||
.msgs insert end " has been built. To install it, type:\n\n"
|
||||
.msgs insert end "make install\n\n" green
|
||||
.msgs insert end "from the top-level "
|
||||
.msgs insert end "Remind" red
|
||||
.msgs insert end " directory. (You may need to be root.)\n\n"
|
||||
.msgs insert end "After it's installed, create an empty file called:\n"
|
||||
.msgs insert end " \$HOME/.reminders\n" green
|
||||
.msgs insert end "and type "
|
||||
.msgs insert end "tkremind" green
|
||||
.msgs insert end " for a nice easy introduction to "
|
||||
.msgs insert end "Remind.\n\n" red
|
||||
.msgs insert end "Press me to exit --> "
|
||||
button .msgs.ok -text "OK" -command "exit"
|
||||
.msgs window create end -window .msgs.ok
|
||||
.msgs see end
|
||||
}
|
||||
|
||||
#***********************************************************************
|
||||
# %PROCEDURE: RunCommand
|
||||
# %ARGUMENTS:
|
||||
# cmd -- shell command to run
|
||||
# %RETURNS:
|
||||
# Return code of command
|
||||
# %DESCRIPTION:
|
||||
# Runs a command putting output into ".msgs"
|
||||
#***********************************************************************
|
||||
proc RunCommand { cmd } {
|
||||
global CmdDone
|
||||
|
||||
set CmdDone 0
|
||||
|
||||
.msgs insert end "$cmd\n" red
|
||||
|
||||
set problem [catch {set CmdFile [open "|$cmd" "r"]} err]
|
||||
if {$problem} {
|
||||
Bail "Error running command `$cmd': $err"
|
||||
}
|
||||
|
||||
fconfigure $CmdFile -blocking 0
|
||||
|
||||
fileevent $CmdFile readable "CommandReadable $CmdFile"
|
||||
vwait CmdDone
|
||||
|
||||
set problem [catch {close $CmdFile} err]
|
||||
if {$problem} {
|
||||
Bail "Error running command `$cmd': $err"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#***********************************************************************
|
||||
# %PROCEDURE: CommandReadable
|
||||
# %ARGUMENTS:
|
||||
# f -- file to read from
|
||||
# %RETURNS:
|
||||
# Nothing
|
||||
# %DESCRIPTION:
|
||||
# Reads characters from command pipeline and appends them to .msg.
|
||||
#***********************************************************************
|
||||
proc CommandReadable { f } {
|
||||
global CmdDone
|
||||
set stuff [read $f]
|
||||
.msgs insert end $stuff
|
||||
.msgs see end
|
||||
if {[eof $f]} {
|
||||
set CmdDone 1
|
||||
}
|
||||
}
|
||||
|
||||
#***********************************************************************
|
||||
# %PROCEDURE: CallConfigure
|
||||
# %ARGUMENTS:
|
||||
# None
|
||||
# %RETURNS:
|
||||
# Nothing
|
||||
# %DESCRIPTION:
|
||||
# Executes "./configure" with appropriate arguments
|
||||
# %PRECONDITIONS:
|
||||
# Any preconditions
|
||||
# %POSTCONDITIONS:
|
||||
# Any postconditions
|
||||
# %SIDE EFFECTS:
|
||||
# Any side effects
|
||||
#***********************************************************************
|
||||
proc CallConfigure {} {
|
||||
global Instdir
|
||||
set bin [$Instdir.bin get]
|
||||
set man [$Instdir.man get]
|
||||
RunCommand "./configure --bindir=$bin --mandir=$man"
|
||||
}
|
||||
|
||||
#***********************************************************************
|
||||
# %PROCEDURE: CreateCustomH
|
||||
# %ARGUMENTS:
|
||||
# None
|
||||
# %RETURNS:
|
||||
# Nothing
|
||||
# %DESCRIPTION:
|
||||
# Creates "src/custom.h" from "src/custom.h.in"
|
||||
#***********************************************************************
|
||||
proc CreateCustomH {} {
|
||||
global Loc Options Config
|
||||
set problem [catch {set in [open "src/custom.h.in" "r"]} err]
|
||||
if {$problem} {
|
||||
Bail "Can't read src/custom.h.in: $err"
|
||||
}
|
||||
set problem [catch {set out [open "src/custom.h" "w"]} err]
|
||||
if {$problem} {
|
||||
Bail "Can't write src/custom.h: $err"
|
||||
}
|
||||
|
||||
# Retrieve values
|
||||
# The latitude/longitude ones are tied to the scales; we can't
|
||||
# modify them willy-nilly
|
||||
set LAT_DEG $Config(LAT_DEG)
|
||||
set LAT_MIN $Config(LAT_MIN)
|
||||
set LAT_SEC $Config(LAT_SEC)
|
||||
set LON_DEG $Config(LON_DEG)
|
||||
set LON_MIN $Config(LON_MIN)
|
||||
set LON_SEC $Config(LON_SEC)
|
||||
if {!$Config(NORTHERN_HEMISPHERE)} {
|
||||
set LAT_DEG "-$LAT_DEG"
|
||||
set LAT_MIN "-$LAT_MIN"
|
||||
set LAT_SEC "-$LAT_SEC"
|
||||
}
|
||||
if {!$Config(WESTERN_HEMISPHERE)} {
|
||||
set LON_DEG "-$LON_DEG"
|
||||
set LON_MIN "-$LON_MIN"
|
||||
set LON_SEC "-$LON_SEC"
|
||||
}
|
||||
set Config(LOCATION) [$Loc.location get]
|
||||
|
||||
switch -- [$Options.page cget -text] {
|
||||
"A4" {
|
||||
set Config(DEFAULT_PAGE) "{\"A4\", 595, 842}"
|
||||
}
|
||||
default {
|
||||
set Config(DEFAULT_PAGE) "{\"Letter\", 612, 792}"
|
||||
}
|
||||
}
|
||||
set Config(DATESEP) [$Options.date cget -text]
|
||||
set Config(TIMESEP) [$Options.time cget -text]
|
||||
|
||||
while {[gets $in line] != -1} {
|
||||
switch -glob -- $line {
|
||||
"#define DEFAULT_LATITUDE *" {
|
||||
set lat [expr $LAT_DEG + ($LAT_MIN/60.0) + ($LAT_SEC/3600.0)];
|
||||
puts $out "#define DEFAULT_LATITUDE $lat"
|
||||
.msgs insert end "#define DEFAULT_LATITUDE $lat"
|
||||
}
|
||||
"#define DEFAULT_LONGITUDE *" {
|
||||
set lon [expr -1.0 * ($LON_DEG + ($LON_MIN/60.0) + ($LON_SEC/3600.0))]
|
||||
puts $out "#define DEFAULT_LONGITUDE $lon"
|
||||
.msgs insert end "#define DEFAULT_LONGITUDE $lon"
|
||||
}
|
||||
"#define LOCATION *" {
|
||||
puts $out "#define LOCATION \"$Config(LOCATION)\""
|
||||
.msgs insert end "#define LOCATION \"$Config(LOCATION)\"\n"
|
||||
}
|
||||
"#define DEFAULT_PAGE *" {
|
||||
puts $out "#define DEFAULT_PAGE $Config(DEFAULT_PAGE)"
|
||||
.msgs insert end "#define DEFAULT_PAGE $Config(DEFAULT_PAGE)\n"
|
||||
}
|
||||
"#define DATESEP *" {
|
||||
puts $out "#define DATESEP '$Config(DATESEP)'"
|
||||
.msgs insert end "#define DATESEP '$Config(DATESEP)'\n"
|
||||
}
|
||||
"#define TIMESEP *" {
|
||||
puts $out "#define TIMESEP '$Config(TIMESEP)'"
|
||||
.msgs insert end "#define TIMESEP '$Config(TIMESEP)'\n"
|
||||
}
|
||||
default {
|
||||
puts $out $line
|
||||
}
|
||||
}
|
||||
}
|
||||
close $in
|
||||
close $out
|
||||
}
|
||||
|
||||
#***********************************************************************
|
||||
# %PROCEDURE: CallMake
|
||||
# %ARGUMENTS:
|
||||
# None
|
||||
# %RETURNS:
|
||||
# Nothing
|
||||
# %DESCRIPTION:
|
||||
# Runs "make" with appropriate language definitions
|
||||
#***********************************************************************
|
||||
proc CallMake {} {
|
||||
global Options
|
||||
set lang [$Options.lang cget -text]
|
||||
switch -- $lang {
|
||||
"German" { set lang GERMAN }
|
||||
"Dutch" { set lang DUTCH }
|
||||
"Finnish" { set lang FINNISH }
|
||||
"French" { set lang FRENCH }
|
||||
"Norwegian" { set lang NORWEGIAN }
|
||||
"Danish" { set lang DANISH }
|
||||
"Polish" { set lang POLISH }
|
||||
"Brazilian Portuguese" { set lang BRAZPORT }
|
||||
"Italian" { set lang ITALIAN }
|
||||
"Romanian" { set lang ROMANIAN }
|
||||
"Spanish" { set lang SPANISH }
|
||||
"Icelandic" { set lang ICELANDIC }
|
||||
default { set lang ENGLISH }
|
||||
}
|
||||
RunCommand "make \"LANGDEF=-DLANG=$lang\""
|
||||
}
|
||||
|
||||
|
||||
# Tabbed notebook code from "Effective Tcl/Tk Programming"
|
||||
# ----------------------------------------------------------------------
|
||||
# EXAMPLE: tabnotebook that can dial up pages
|
||||
# ----------------------------------------------------------------------
|
||||
# Effective Tcl/Tk Programming
|
||||
# Mark Harrison, DSC Communications Corp.
|
||||
# Michael McLennan, Bell Labs Innovations for Lucent Technologies
|
||||
# Addison-Wesley Professional Computing Series
|
||||
# ======================================================================
|
||||
# Copyright (c) 1996-1997 Lucent Technologies Inc. and Mark Harrison
|
||||
# ======================================================================
|
||||
|
||||
option add *Tabnotebook.tabs.background #666666 widgetDefault
|
||||
option add *Tabnotebook.margin 6 widgetDefault
|
||||
option add *Tabnotebook.tabColor #a6a6a6 widgetDefault
|
||||
option add *Tabnotebook.activeTabColor #d9d9d9 widgetDefault
|
||||
option add *Tabnotebook.tabFont \
|
||||
-*-helvetica-bold-r-normal--*-120-* widgetDefault
|
||||
|
||||
proc tabnotebook_create {win} {
|
||||
global tnInfo
|
||||
|
||||
frame $win -class Tabnotebook
|
||||
canvas $win.tabs -highlightthickness 0
|
||||
pack $win.tabs -fill x
|
||||
|
||||
notebook_create $win.notebook
|
||||
pack $win.notebook -expand yes -fill both
|
||||
|
||||
set tnInfo($win-tabs) ""
|
||||
set tnInfo($win-current) ""
|
||||
set tnInfo($win-pending) ""
|
||||
return $win
|
||||
}
|
||||
|
||||
proc tabnotebook_page {win name} {
|
||||
global tnInfo
|
||||
|
||||
set page [notebook_page $win.notebook $name]
|
||||
lappend tnInfo($win-tabs) $name
|
||||
|
||||
if {$tnInfo($win-pending) == ""} {
|
||||
set id [after idle [list tabnotebook_refresh $win]]
|
||||
set tnInfo($win-pending) $id
|
||||
}
|
||||
return $page
|
||||
}
|
||||
|
||||
proc tabnotebook_refresh {win} {
|
||||
global tnInfo
|
||||
|
||||
$win.tabs delete all
|
||||
|
||||
set margin [option get $win margin Margin]
|
||||
set color [option get $win tabColor Color]
|
||||
set font [option get $win tabFont Font]
|
||||
set x 2
|
||||
set maxh 0
|
||||
|
||||
foreach name $tnInfo($win-tabs) {
|
||||
set id [$win.tabs create text \
|
||||
[expr $x+$margin+2] [expr -0.5*$margin] \
|
||||
-anchor sw -text $name -font $font \
|
||||
-tags [list $name]]
|
||||
|
||||
set bbox [$win.tabs bbox $id]
|
||||
set wd [expr [lindex $bbox 2]-[lindex $bbox 0]]
|
||||
set ht [expr [lindex $bbox 3]-[lindex $bbox 1]]
|
||||
if {$ht > $maxh} {
|
||||
set maxh $ht
|
||||
}
|
||||
|
||||
$win.tabs create polygon 0 0 $x 0 \
|
||||
[expr $x+$margin] [expr -$ht-$margin] \
|
||||
[expr $x+$margin+$wd] [expr -$ht-$margin] \
|
||||
[expr $x+$wd+2*$margin] 0 \
|
||||
2000 0 2000 10 0 10 \
|
||||
-outline black -fill $color \
|
||||
-tags [list $name tab tab-$name]
|
||||
|
||||
$win.tabs raise $id
|
||||
|
||||
$win.tabs bind $name <ButtonPress-1> \
|
||||
[list tabnotebook_display $win $name]
|
||||
|
||||
set x [expr $x+$wd+2*$margin]
|
||||
}
|
||||
set height [expr $maxh+2*$margin]
|
||||
$win.tabs move all 0 $height
|
||||
|
||||
$win.tabs configure -width $x -height [expr $height+4]
|
||||
|
||||
if {$tnInfo($win-current) != ""} {
|
||||
tabnotebook_display $win $tnInfo($win-current)
|
||||
} else {
|
||||
tabnotebook_display $win [lindex $tnInfo($win-tabs) 0]
|
||||
}
|
||||
set tnInfo($win-pending) ""
|
||||
}
|
||||
|
||||
proc tabnotebook_display {win name} {
|
||||
global tnInfo
|
||||
|
||||
notebook_display $win.notebook $name
|
||||
|
||||
set normal [option get $win tabColor Color]
|
||||
$win.tabs itemconfigure tab -fill $normal
|
||||
|
||||
set active [option get $win activeTabColor Color]
|
||||
$win.tabs itemconfigure tab-$name -fill $active
|
||||
$win.tabs raise $name
|
||||
|
||||
set tnInfo($win-current) $name
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# EXAMPLE: simple notebook that can dial up pages
|
||||
# ----------------------------------------------------------------------
|
||||
# Effective Tcl/Tk Programming
|
||||
# Mark Harrison, DSC Communications Corp.
|
||||
# Michael McLennan, Bell Labs Innovations for Lucent Technologies
|
||||
# Addison-Wesley Professional Computing Series
|
||||
# ======================================================================
|
||||
# Copyright (c) 1996-1997 Lucent Technologies Inc. and Mark Harrison
|
||||
# ======================================================================
|
||||
|
||||
option add *Notebook.borderWidth 2 widgetDefault
|
||||
option add *Notebook.relief sunken widgetDefault
|
||||
|
||||
proc notebook_create {win} {
|
||||
global nbInfo
|
||||
|
||||
frame $win -class Notebook
|
||||
pack propagate $win 0
|
||||
|
||||
set nbInfo($win-count) 0
|
||||
set nbInfo($win-pages) ""
|
||||
set nbInfo($win-current) ""
|
||||
return $win
|
||||
}
|
||||
|
||||
proc notebook_page {win name} {
|
||||
global nbInfo
|
||||
|
||||
set page "$win.page[incr nbInfo($win-count)]"
|
||||
lappend nbInfo($win-pages) $page
|
||||
set nbInfo($win-page-$name) $page
|
||||
|
||||
frame $page
|
||||
|
||||
if {$nbInfo($win-count) == 1} {
|
||||
after idle [list notebook_display $win $name]
|
||||
}
|
||||
return $page
|
||||
}
|
||||
|
||||
proc notebook_display {win name} {
|
||||
global nbInfo
|
||||
|
||||
set page ""
|
||||
if {[info exists nbInfo($win-page-$name)]} {
|
||||
set page $nbInfo($win-page-$name)
|
||||
} elseif {[winfo exists $win.page$name]} {
|
||||
set page $win.page$name
|
||||
}
|
||||
if {$page == ""} {
|
||||
error "bad notebook page \"$name\""
|
||||
}
|
||||
|
||||
notebook_fix_size $win
|
||||
|
||||
if {$nbInfo($win-current) != ""} {
|
||||
pack forget $nbInfo($win-current)
|
||||
}
|
||||
pack $page -expand yes -fill both
|
||||
set nbInfo($win-current) $page
|
||||
}
|
||||
|
||||
proc notebook_fix_size {win} {
|
||||
global nbInfo
|
||||
|
||||
update idletasks
|
||||
|
||||
set maxw 0
|
||||
set maxh 0
|
||||
foreach page $nbInfo($win-pages) {
|
||||
set w [winfo reqwidth $page]
|
||||
if {$w > $maxw} {
|
||||
set maxw $w
|
||||
}
|
||||
set h [winfo reqheight $page]
|
||||
if {$h > $maxh} {
|
||||
set maxh $h
|
||||
}
|
||||
}
|
||||
set bd [$win cget -borderwidth]
|
||||
set maxw [expr $maxw+2*$bd]
|
||||
set maxh [expr $maxh+2*$bd]
|
||||
$win configure -width $maxw -height $maxh
|
||||
}
|
||||
|
||||
#***********************************************************************
|
||||
# %PROCEDURE: FindRemind
|
||||
# %ARGUMENTS:
|
||||
# None
|
||||
# %RETURNS:
|
||||
# Full path to an existing "remind" if one is found. Otherwise,
|
||||
# empty string.
|
||||
#***********************************************************************
|
||||
proc FindRemind {} {
|
||||
global env
|
||||
set path [concat [split $env(PATH) ":"] "/bin" "/usr/bin" "/usr/local/bin"]
|
||||
foreach thing $path {
|
||||
if [file executable [file join $thing "remind"]] {
|
||||
return [file join $thing "remind"]
|
||||
}
|
||||
}
|
||||
return {}
|
||||
}
|
||||
|
||||
#***********************************************************************
|
||||
# %PROCEDURE: SetConfigFromRemind
|
||||
# %ARGUMENTS:
|
||||
# None
|
||||
# %RETURNS:
|
||||
# Sets config settings based on existing remind (if one found) or else
|
||||
# sensible defaults.
|
||||
#***********************************************************************
|
||||
proc SetConfigFromRemind {} {
|
||||
global Config
|
||||
SetConfigDefaults
|
||||
set rem [FindRemind]
|
||||
if {"$rem" == ""} {
|
||||
return
|
||||
}
|
||||
set dir [file dirname $rem]
|
||||
set Config(INST_DIR) $dir
|
||||
if {"$dir" == "/usr/local/bin"} {
|
||||
set Config(MAN_DIR) "/usr/local/man"
|
||||
} elseif {$dir == "/usr/bin"} {
|
||||
set Config(MAN_DIR) "/usr/share/man"
|
||||
}
|
||||
|
||||
# Check for existing man page
|
||||
if {[file readable "/usr/share/man/man1/remind.1"]} {
|
||||
set Config(MAN_DIR) "/usr/share/man"
|
||||
} elseif {[file readable "/usr/man/man1/remind.1"]} {
|
||||
set Config(MAN_DIR) "/usr/man"
|
||||
} elseif {[file readable "/usr/local/man/man1/remind.1"]} {
|
||||
set Config(MAN_DIR) "/usr/local/man"
|
||||
}
|
||||
|
||||
# Query Remind for the rest
|
||||
QueryRemind $rem LAT_DEG {$LatDeg}
|
||||
QueryRemind $rem LAT_MIN {$LatMin}
|
||||
QueryRemind $rem LAT_SEC {$LatSec}
|
||||
QueryRemind $rem LON_DEG {$LongDeg}
|
||||
QueryRemind $rem LON_MIN {$LongMin}
|
||||
QueryRemind $rem LON_SEC {$LongSec}
|
||||
QueryRemind $rem LOCATION {$Location}
|
||||
QueryRemind $rem DATESEP {$DateSep}
|
||||
QueryRemind $rem TIMESEP {$TimeSep}
|
||||
QueryRemind $rem LANGUAGE {language()}
|
||||
|
||||
set $Config(LAT_MIN) [expr abs($Config(LAT_MIN))]
|
||||
set $Config(LAT_SEC) [expr abs($Config(LAT_SEC))]
|
||||
if {$Config(LAT_DEG) >= 0} {
|
||||
set Config(NORTHERN_HEMISPHERE) 1
|
||||
} else {
|
||||
set Config(NORTHERN_HEMISPHERE) 0
|
||||
set Config(LAT_DEG) [expr abs($Config(LAT_DEG))]
|
||||
}
|
||||
|
||||
set $Config(LON_MIN) [expr abs($Config(LON_MIN))]
|
||||
set $Config(LON_SEC) [expr abs($Config(LON_SEC))]
|
||||
if {$Config(LON_DEG) >= 0} {
|
||||
set Config(WESTERN_HEMISPHERE) 1
|
||||
} else {
|
||||
set Config(WESTERN_HEMISPHERE) 0
|
||||
set Config(LON_DEG) [expr abs($Config(LON_DEG))]
|
||||
}
|
||||
|
||||
# Get default page from rem2ps
|
||||
set rem2ps [file join $dir "rem2ps"]
|
||||
|
||||
catch {
|
||||
exec $rem2ps -m help
|
||||
} err
|
||||
set errlist [split $err "\n"]
|
||||
set err [lindex $errlist end]
|
||||
if {[string match "Default media type is*" $err]} {
|
||||
set Config(DEFAULT_PAGE) [lindex $err end]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
proc QueryRemind { rem symbol rem_msg } {
|
||||
global Config
|
||||
catch {
|
||||
set fp [open "| $rem -" "r+"]
|
||||
puts $fp "banner %\nMSG \[$rem_msg\]%\nFLUSH\n"
|
||||
flush $fp
|
||||
gets $fp line
|
||||
catch { close $fp }
|
||||
}
|
||||
if {"$line" == ""} {
|
||||
return
|
||||
}
|
||||
set Config($symbol) $line
|
||||
}
|
||||
|
||||
CheckSanity
|
||||
CreateMainDialog
|
||||
925
calendar.c
925
calendar.c
@@ -1,925 +0,0 @@
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* CALENDAR.C */
|
||||
/* */
|
||||
/* The code for generating a calendar. */
|
||||
/* */
|
||||
/* This file is part of REMIND. */
|
||||
/* Copyright (C) 1992-1996 by David F. Skoll */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
static char const RCSID[] = "$Id: calendar.c,v 1.2 1996-03-31 04:01:54 dfs Exp $";
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
#include "types.h"
|
||||
#include "protos.h"
|
||||
#include "expr.h"
|
||||
#include "globals.h"
|
||||
#include "err.h"
|
||||
|
||||
/* Data structures used by the calendar */
|
||||
typedef struct cal_entry {
|
||||
struct cal_entry *next;
|
||||
char *text;
|
||||
char *pos;
|
||||
int time;
|
||||
int priority;
|
||||
} CalEntry;
|
||||
|
||||
/* Global variables */
|
||||
static CalEntry *CalColumn[7];
|
||||
static CalEntry *CalPs[7];
|
||||
|
||||
static int ColSpaces;
|
||||
|
||||
PRIVATE void SortCol ARGS((CalEntry **col));
|
||||
PRIVATE void DoCalendarOneWeek ARGS ((void));
|
||||
PRIVATE void DoCalendarOneMonth ARGS ((void));
|
||||
PRIVATE int WriteCalendarRow ARGS ((void));
|
||||
PRIVATE void PrintLeft ARGS ((char *s, int width, char pad));
|
||||
PRIVATE void PrintCentered ARGS ((char *s, int width, char pad));
|
||||
PRIVATE int WriteOneCalLine ARGS ((void));
|
||||
PRIVATE int WriteOneColLine ARGS ((int col));
|
||||
PRIVATE void GenerateCalEntries ARGS ((int col));
|
||||
PRIVATE void WriteCalHeader ARGS ((void));
|
||||
PRIVATE void WriteCalTrailer ARGS ((void));
|
||||
PRIVATE int DoCalRem ARGS ((ParsePtr p, int col));
|
||||
PRIVATE void WriteSimpleEntries ARGS ((int col, int jul));
|
||||
PRIVATE void WriteSolidCalLine ARGS ((void));
|
||||
PRIVATE void WriteIntermediateCalLine ARGS ((void));
|
||||
PRIVATE void WriteCalDays ARGS ((void));
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* ProduceCalendar */
|
||||
/* */
|
||||
/* Main loop for generating a calendar. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC void ProduceCalendar(void)
|
||||
#else
|
||||
void ProduceCalendar()
|
||||
#endif
|
||||
{
|
||||
int y, m, d;
|
||||
|
||||
ShouldCache = 1;
|
||||
|
||||
ColSpaces = (CalWidth - 9) / 7;
|
||||
CalWidth = 7*ColSpaces + 8;
|
||||
|
||||
if (CalMonths) {
|
||||
FromJulian(JulianToday, &y, &m, &d);
|
||||
JulianToday = Julian(y, m, 1);
|
||||
while (CalMonths--)
|
||||
DoCalendarOneMonth();
|
||||
return;
|
||||
} else {
|
||||
if (MondayFirst) JulianToday -= (JulianToday%7);
|
||||
else JulianToday -= ((JulianToday+1)%7);
|
||||
|
||||
if (!DoSimpleCalendar) {
|
||||
WriteIntermediateCalLine();
|
||||
WriteCalDays();
|
||||
WriteIntermediateCalLine();
|
||||
}
|
||||
|
||||
while (CalWeeks--)
|
||||
DoCalendarOneWeek();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* DoCalendarOneWeek */
|
||||
/* */
|
||||
/* Write a calendar for a single week */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE void DoCalendarOneWeek(void)
|
||||
#else
|
||||
static void DoCalendarOneWeek()
|
||||
#endif
|
||||
{
|
||||
int y, m, d, done, i, l, wd;
|
||||
char buf[81];
|
||||
int LinesWritten = 0;
|
||||
int OrigJul = JulianToday;
|
||||
|
||||
/* Fill in the column entries */
|
||||
for (i=0; i<7; i++) {
|
||||
GenerateCalEntries(i);
|
||||
JulianToday++;
|
||||
}
|
||||
|
||||
/* Output the entries */
|
||||
|
||||
/* If it's "Simple Calendar" format, do it simply... */
|
||||
if (DoSimpleCalendar) {
|
||||
if (MondayFirst) wd = JulianToday % 7;
|
||||
else wd = (JulianToday + 1) % 7;
|
||||
for (i=0; i<7; i++) {
|
||||
WriteSimpleEntries(i, OrigJul+i-wd);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/* Here come the first few lines... */
|
||||
PutChar('|');
|
||||
for (i=0; i<7; i++) {
|
||||
FromJulian(OrigJul+i, &y, &m, &d);
|
||||
sprintf(buf, "%d %c%c%c ", d, MonthName[m][0], MonthName[m][1],
|
||||
MonthName[m][2]);
|
||||
if (OrigJul+i == RealToday)
|
||||
PrintLeft(buf, ColSpaces, '*');
|
||||
else
|
||||
PrintLeft(buf, ColSpaces, ' ');
|
||||
PutChar('|');
|
||||
}
|
||||
PutChar('\n');
|
||||
for (l=0; l<CalPad; l++) {
|
||||
PutChar('|');
|
||||
for (i=0; i<7; i++) {
|
||||
PrintLeft("", ColSpaces, ' ');
|
||||
PutChar('|');
|
||||
}
|
||||
PutChar('\n');
|
||||
}
|
||||
|
||||
/* Write the body lines */
|
||||
done = 0;
|
||||
while (!done) {
|
||||
done = WriteOneCalLine();
|
||||
LinesWritten++;
|
||||
}
|
||||
|
||||
/* Write any blank lines required */
|
||||
while (LinesWritten++ < CalLines) {
|
||||
PutChar('|');
|
||||
for (i=0; i<7; i++) {
|
||||
PrintLeft("", ColSpaces, ' ');
|
||||
PutChar('|');
|
||||
}
|
||||
PutChar('\n');
|
||||
}
|
||||
|
||||
/* Write the final line */
|
||||
WriteIntermediateCalLine();
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* DoCalendarOneMonth */
|
||||
/* */
|
||||
/* Produce a calendar for the current month. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE void DoCalendarOneMonth(void)
|
||||
#else
|
||||
static void DoCalendarOneMonth()
|
||||
#endif
|
||||
{
|
||||
int y, m, d, mm, yy;
|
||||
|
||||
if (!DoSimpleCalendar) WriteCalHeader();
|
||||
|
||||
if (PsCal) {
|
||||
FromJulian(JulianToday, &y, &m, &d);
|
||||
printf("%s\n", PSBEGIN);
|
||||
printf("%s %d %d %d %d\n",
|
||||
MonthName[m], y, DaysInMonth(m, y), (JulianToday+1) % 7,
|
||||
MondayFirst);
|
||||
mm = m-1;
|
||||
if (mm<0) {
|
||||
mm = 11; yy = y-1;
|
||||
} else yy=y;
|
||||
|
||||
printf("%s %d\n", MonthName[mm], DaysInMonth(mm,yy));
|
||||
mm = m+1;
|
||||
if (mm>11) {
|
||||
mm = 0; yy = y+1;
|
||||
} else yy=y;
|
||||
printf("%s %d\n", MonthName[mm], DaysInMonth(mm,yy));
|
||||
}
|
||||
while (WriteCalendarRow()) continue;
|
||||
|
||||
if (PsCal) printf("%s\n", PSEND);
|
||||
if (!DoSimpleCalendar) WriteCalTrailer();
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* WriteCalendarRow */
|
||||
/* */
|
||||
/* Write one row of the calendar */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE int WriteCalendarRow(void)
|
||||
#else
|
||||
static int WriteCalendarRow()
|
||||
#endif
|
||||
{
|
||||
int y, m, d, wd, i, l;
|
||||
int done;
|
||||
char buf[81];
|
||||
int OrigJul = JulianToday;
|
||||
int LinesWritten = 0;
|
||||
|
||||
/* Get the date of the first day */
|
||||
FromJulian(JulianToday, &y, &m, &d);
|
||||
if (!MondayFirst) wd = (JulianToday + 1) % 7;
|
||||
else wd = JulianToday % 7;
|
||||
|
||||
/* Fill in the column entries */
|
||||
for (i=wd; i<7; i++) {
|
||||
if (d+i-wd > DaysInMonth(m, y)) break;
|
||||
GenerateCalEntries(i);
|
||||
JulianToday++;
|
||||
}
|
||||
|
||||
/* Output the entries */
|
||||
|
||||
/* If it's "Simple Calendar" format, do it simply... */
|
||||
if (DoSimpleCalendar) {
|
||||
for (i=wd; i<7 && d+i-wd<=DaysInMonth(m, y); i++) {
|
||||
WriteSimpleEntries(i, OrigJul+i-wd);
|
||||
}
|
||||
return (d+7-wd <= DaysInMonth(m, y));
|
||||
}
|
||||
|
||||
|
||||
/* Here come the first few lines... */
|
||||
PutChar('|');
|
||||
for (i=0; i<7; i++) {
|
||||
if (i < wd || d+i-wd>DaysInMonth(m, y))
|
||||
PrintLeft("", ColSpaces, ' ');
|
||||
else {
|
||||
sprintf(buf, "%d", d+i-wd);
|
||||
PrintLeft(buf, ColSpaces, ' ');
|
||||
}
|
||||
PutChar('|');
|
||||
}
|
||||
PutChar('\n');
|
||||
for (l=0; l<CalPad; l++) {
|
||||
PutChar('|');
|
||||
for (i=0; i<7; i++) {
|
||||
PrintLeft("", ColSpaces, ' ');
|
||||
PutChar('|');
|
||||
}
|
||||
PutChar('\n');
|
||||
}
|
||||
|
||||
/* Write the body lines */
|
||||
done = 0;
|
||||
while (!done) {
|
||||
done = WriteOneCalLine();
|
||||
LinesWritten++;
|
||||
}
|
||||
|
||||
/* Write any blank lines required */
|
||||
while (LinesWritten++ < CalLines) {
|
||||
PutChar('|');
|
||||
for (i=0; i<7; i++) {
|
||||
PrintLeft("", ColSpaces, ' ');
|
||||
PutChar('|');
|
||||
}
|
||||
PutChar('\n');
|
||||
}
|
||||
|
||||
WriteIntermediateCalLine();
|
||||
|
||||
/* Return non-zero if we have not yet finished */
|
||||
return (d+7-wd <= DaysInMonth(m, y));
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* PrintLeft */
|
||||
/* */
|
||||
/* Left-justify a piece of text. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE void PrintLeft(char *s, int width, char pad)
|
||||
#else
|
||||
static void PrintLeft(s, width, pad)
|
||||
char *s;
|
||||
int width;
|
||||
char pad;
|
||||
#endif
|
||||
{
|
||||
int len = strlen(s);
|
||||
printf("%s", s);
|
||||
while (len++ < width) PutChar(pad);
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* PrintCentered */
|
||||
/* */
|
||||
/* Center a piec of text */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE void PrintCentered(char *s, int width, char pad)
|
||||
#else
|
||||
static void PrintCentered(s, width, pad)
|
||||
char *s;
|
||||
int width;
|
||||
char pad;
|
||||
#endif
|
||||
{
|
||||
int len = strlen(s);
|
||||
int d = (width - len) / 2;
|
||||
int i;
|
||||
|
||||
for (i=0; i<d; i++) PutChar(pad);
|
||||
for (i=0; i<width; i++) {
|
||||
if (*s) PutChar(*s++); else break;
|
||||
}
|
||||
for (i=d+len; i<width; i++) PutChar(pad);
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* WriteOneCalLine */
|
||||
/* */
|
||||
/* Write a single line. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE int WriteOneCalLine(void)
|
||||
#else
|
||||
static int WriteOneCalLine()
|
||||
#endif
|
||||
{
|
||||
int done = 1, i;
|
||||
|
||||
PutChar('|');
|
||||
for (i=0; i<7; i++) {
|
||||
if (CalColumn[i]) {
|
||||
if (WriteOneColLine(i)) done = 0;
|
||||
} else {
|
||||
PrintCentered("", ColSpaces, ' ');
|
||||
}
|
||||
PutChar('|');
|
||||
}
|
||||
PutChar('\n');
|
||||
|
||||
return done;
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* WriteOneColLine */
|
||||
/* */
|
||||
/* Write a single line for a specified column. Return 1 if */
|
||||
/* the column still has entries; 0 otherwise. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE int WriteOneColLine(int col)
|
||||
#else
|
||||
static int WriteOneColLine(col)
|
||||
int col;
|
||||
#endif
|
||||
{
|
||||
CalEntry *e = CalColumn[col];
|
||||
char *s;
|
||||
char *space;
|
||||
int numwritten = 0;
|
||||
|
||||
/* Print as many characters as possible within the column */
|
||||
space = NULL;
|
||||
s = e->pos;
|
||||
|
||||
/* If we're at the end, and there's another entry, do a blank line and move
|
||||
to next entry. */
|
||||
if (!*s && e->next) {
|
||||
PrintLeft("", ColSpaces, ' ');
|
||||
CalColumn[col] = e->next;
|
||||
free(e->text);
|
||||
free(e);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Find the last space char within the column. */
|
||||
while (s - e->pos <= ColSpaces) {
|
||||
if (!*s) {space = s; break;}
|
||||
if (*s == ' ') space = s;
|
||||
s++;
|
||||
}
|
||||
|
||||
/* If we couldn't find a space char, print what we have. */
|
||||
if (!space) {
|
||||
for (s = e->pos; s - e->pos < ColSpaces; s++) {
|
||||
if (!*s) break;
|
||||
numwritten++;
|
||||
PutChar(*s);
|
||||
}
|
||||
e->pos = s;
|
||||
} else {
|
||||
|
||||
/* We found a space - print everything before it. */
|
||||
for (s = e->pos; s<space; s++) {
|
||||
if (!*s) break;
|
||||
numwritten++;
|
||||
PutChar(*s);
|
||||
}
|
||||
}
|
||||
|
||||
/* Flesh out the rest of the column */
|
||||
while(numwritten++ < ColSpaces) PutChar(' ');
|
||||
|
||||
/* Skip any spaces before next word */
|
||||
while (*s == ' ') s++;
|
||||
|
||||
/* If done, free memory if no next entry. */
|
||||
if (!*s && !e->next) {
|
||||
CalColumn[col] = e->next;
|
||||
free(e->text);
|
||||
free(e);
|
||||
} else {
|
||||
e->pos = s;
|
||||
}
|
||||
if (CalColumn[col]) return 1; else return 0;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* GenerateCalEntries */
|
||||
/* */
|
||||
/* Generate the calendar entries for the ith column */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE void GenerateCalEntries(int col)
|
||||
#else
|
||||
static void GenerateCalEntries(col)
|
||||
int col;
|
||||
#endif
|
||||
{
|
||||
int r;
|
||||
Token tok;
|
||||
char *s;
|
||||
Parser p;
|
||||
|
||||
/* Do some initialization first... */
|
||||
ClearGlobalOmits();
|
||||
DestroyOmitContexts();
|
||||
DestroyVars(0);
|
||||
NumTriggered = 0;
|
||||
|
||||
r=OpenFile(InitialFile);
|
||||
if (r) {
|
||||
fprintf(ErrFp, "%s %s: %s\n", ErrMsg[E_ERR_READING], InitialFile, ErrMsg[r]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
while(1) {
|
||||
r = ReadLine();
|
||||
if (r == E_EOF) return;
|
||||
if (r) {
|
||||
Eprint("%s: %s", ErrMsg[E_ERR_READING], ErrMsg[r]);
|
||||
exit(1);
|
||||
}
|
||||
s = FindInitialToken(&tok, CurLine);
|
||||
|
||||
/* Should we ignore it? */
|
||||
if (NumIfs &&
|
||||
tok.type != T_If &&
|
||||
tok.type != T_Else &&
|
||||
tok.type != T_EndIf &&
|
||||
tok.type != T_IfTrig &&
|
||||
ShouldIgnoreLine())
|
||||
{
|
||||
/* DO NOTHING */
|
||||
}
|
||||
else {
|
||||
/* Create a parser to parse the line */
|
||||
CreateParser(s, &p);
|
||||
|
||||
switch(tok.type) {
|
||||
|
||||
case T_Empty:
|
||||
case T_Comment:
|
||||
break;
|
||||
|
||||
case T_ErrMsg: r=DoErrMsg(&p); break;
|
||||
case T_Rem: r=DoCalRem(&p, col); break;
|
||||
case T_If: r=DoIf(&p); break;
|
||||
case T_IfTrig: r=DoIfTrig(&p); break;
|
||||
case T_Else: r=DoElse(&p); break;
|
||||
case T_EndIf: r=DoEndif(&p); break;
|
||||
case T_Include: r=DoInclude(&p); break;
|
||||
case T_Exit: DoExit(&p); break;
|
||||
case T_Set: r=DoSet(&p); break;
|
||||
case T_Fset: r=DoFset(&p); break;
|
||||
case T_UnSet: r=DoUnset(&p); break;
|
||||
case T_Clr: r=DoClear(&p); break;
|
||||
case T_Flush: r=DoFlush(&p); break;
|
||||
case T_Debug: break; /* IGNORE DEBUG CMD */
|
||||
case T_Dumpvars: break; /* IGNORE DUMPVARS CMD */
|
||||
case T_Banner: break; /* IGNORE BANNER CMD */
|
||||
case T_Omit: r=DoOmit(&p);
|
||||
if (r == E_PARSE_AS_REM) {
|
||||
DestroyParser(&p);
|
||||
CreateParser(s, &p);
|
||||
r=DoCalRem(&p, col);
|
||||
}
|
||||
break;
|
||||
case T_Pop: r=PopOmitContext(&p); break;
|
||||
case T_Push: r=PushOmitContext(&p); break;
|
||||
case T_Preserve: r=DoPreserve(&p); break;
|
||||
case T_RemType: if (tok.val == RUN_TYPE) {
|
||||
r=DoRun(&p);
|
||||
break;
|
||||
} else {
|
||||
CreateParser(CurLine, &p);
|
||||
r=DoCalRem(&p, col);
|
||||
break;
|
||||
}
|
||||
|
||||
/* If we don't recognize the command, do a REM by default */
|
||||
/* Note: Since the parser hasn't been used yet, we don't */
|
||||
/* need to destroy it here. */
|
||||
|
||||
default: CreateParser(CurLine, &p);
|
||||
r=DoCalRem(&p, col);
|
||||
break;
|
||||
}
|
||||
if (r && (!Hush || r != E_RUN_DISABLED)) Eprint("%s", ErrMsg[r]);
|
||||
|
||||
/* Destroy the parser - free up resources it may be tying up */
|
||||
DestroyParser(&p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* WriteCalHeader */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE void WriteCalHeader(void)
|
||||
#else
|
||||
static void WriteCalHeader()
|
||||
#endif
|
||||
{
|
||||
char buf[80];
|
||||
int y, m, d;
|
||||
|
||||
FromJulian(JulianToday, &y, &m, &d);
|
||||
sprintf(buf, "%s %d", MonthName[m], y);
|
||||
|
||||
WriteSolidCalLine();
|
||||
|
||||
PutChar('|');
|
||||
PrintCentered(buf, CalWidth-2, ' ');
|
||||
PutChar('|');
|
||||
PutChar('\n');
|
||||
|
||||
WriteIntermediateCalLine();
|
||||
WriteCalDays();
|
||||
WriteIntermediateCalLine();
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* WriteCalTrailer */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE void WriteCalTrailer(void)
|
||||
#else
|
||||
static void WriteCalTrailer()
|
||||
#endif
|
||||
{
|
||||
PutChar('\f');
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* DoCalRem */
|
||||
/* */
|
||||
/* Do the REM command in the context of a calendar. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE int DoCalRem(ParsePtr p, int col)
|
||||
#else
|
||||
static int DoCalRem(p, col)
|
||||
ParsePtr p;
|
||||
int col;
|
||||
#endif
|
||||
{
|
||||
|
||||
Trigger trig;
|
||||
TimeTrig tim;
|
||||
Value v;
|
||||
int r;
|
||||
int jul;
|
||||
CalEntry *CurCol = CalColumn[col];
|
||||
CalEntry *CurPs = CalPs[col];
|
||||
CalEntry *e;
|
||||
char *s, *s2;
|
||||
static char buf[TOKSIZE];
|
||||
static char obuf[LINELEN];
|
||||
Token tok;
|
||||
|
||||
/* Parse the trigger date and time */
|
||||
if ( (r=ParseRem(p, &trig, &tim)) ) return r;
|
||||
|
||||
/* Don't include timed reminders in calendar if -a option supplied. */
|
||||
#ifdef HAVE_QUEUED
|
||||
if (DontIssueAts && tim.ttime != NO_TIME) return OK;
|
||||
#endif
|
||||
if (trig.typ == NO_TYPE) return E_EOLN;
|
||||
if (trig.typ == SAT_TYPE) {
|
||||
r=DoSatRemind(&trig, &tim, p);
|
||||
if (r) return r;
|
||||
r=ParseToken(p, buf);
|
||||
if (r) return r;
|
||||
FindToken(buf, &tok);
|
||||
if (tok.type == T_Empty || tok.type == T_Comment) return OK;
|
||||
if (tok.type != T_RemType || tok.val == SAT_TYPE) return E_PARSE_ERR;
|
||||
trig.typ = tok.val;
|
||||
jul = LastTriggerDate;
|
||||
if (!LastTrigValid) return OK;
|
||||
} else {
|
||||
/* Calculate the trigger date */
|
||||
jul = ComputeTrigger(trig.scanfrom, &trig, &r);
|
||||
if (r) return r;
|
||||
}
|
||||
|
||||
if (!PsCal && (trig.typ == PS_TYPE || trig.typ == PSF_TYPE)) return OK;
|
||||
|
||||
/* Remove any "at" times from PS or PSFILE reminders */
|
||||
if (trig.typ == PS_TYPE || trig.typ == PSF_TYPE) tim.ttime = NO_TIME;
|
||||
|
||||
/* If trigger date == today, add it to the current entry */
|
||||
if (jul == JulianToday) {
|
||||
NumTriggered++;
|
||||
s = obuf;
|
||||
*s = 0;
|
||||
if (DoSimpleCalendar || tim.ttime != NO_TIME)
|
||||
s += strlen(SimpleTime(tim.ttime, s));
|
||||
if (trig.typ != PS_TYPE && trig.typ != PSF_TYPE &&
|
||||
UserFuncExists("calprefix")==1) {
|
||||
sprintf(buf, "calprefix(%d)", trig.priority);
|
||||
s2 = buf;
|
||||
r = EvalExpr(&s2, &v);
|
||||
if (!r) {
|
||||
if (!DoCoerce(STR_TYPE, &v)) {
|
||||
strcat(s, v.v.str);
|
||||
s += strlen(s);
|
||||
}
|
||||
DestroyValue(v);
|
||||
}
|
||||
}
|
||||
if ( (r=DoSubst(p, s, &trig, &tim, jul, CAL_MODE)) ) return r;
|
||||
if (!*s) return OK;
|
||||
if (trig.typ != PS_TYPE && trig.typ != PSF_TYPE &&
|
||||
UserFuncExists("calsuffix")==1) {
|
||||
sprintf(buf, "calsuffix(%d)", trig.priority);
|
||||
s2 = buf;
|
||||
r = EvalExpr(&s2, &v);
|
||||
if (!r) {
|
||||
if (!DoCoerce(STR_TYPE, &v)) {
|
||||
strcat(s, v.v.str);
|
||||
s += strlen(s);
|
||||
}
|
||||
DestroyValue(v);
|
||||
}
|
||||
}
|
||||
s = obuf;
|
||||
if (!DoSimpleCalendar) while (isspace(*s)) s++;
|
||||
e = NEW(CalEntry);
|
||||
if (!e) return E_NO_MEM;
|
||||
e->text = StrDup(s);
|
||||
if (!e->text) {
|
||||
free(e);
|
||||
return E_NO_MEM;
|
||||
}
|
||||
e->priority = trig.priority;
|
||||
if (trig.typ == PS_TYPE || trig.typ == PSF_TYPE) {
|
||||
e->pos = (trig.typ == PS_TYPE) ? "P" : "F";
|
||||
e->time = NO_TIME;
|
||||
e->next = CurPs;
|
||||
CalPs[col] = e;
|
||||
SortCol(&CalPs[col]);
|
||||
} else {
|
||||
e->pos = e->text;
|
||||
e->time = tim.ttime;
|
||||
e->next = CurCol;
|
||||
CalColumn[col] = e;
|
||||
SortCol(&CalColumn[col]);
|
||||
}
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* WriteSimpleEntries */
|
||||
/* */
|
||||
/* Write entries in 'simple calendar' format. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE void WriteSimpleEntries(int col, int jul)
|
||||
#else
|
||||
static void WriteSimpleEntries(col, jul)
|
||||
int col, jul;
|
||||
#endif
|
||||
{
|
||||
CalEntry *e = CalPs[col];
|
||||
CalEntry *n;
|
||||
int y, m, d;
|
||||
|
||||
/* Do all the PostScript entries first, if any */
|
||||
FromJulian(jul, &y, &m, &d);
|
||||
while(e) {
|
||||
printf("%c%c%c%c%c%02d%c%02d ", *(e->pos), *(e->pos),
|
||||
*(e->pos), *(e->pos), DATESEP,
|
||||
m+1, DATESEP, d);
|
||||
printf("%s\n", e->text);
|
||||
free(e->text);
|
||||
n = e->next;
|
||||
free(e);
|
||||
e = n;
|
||||
}
|
||||
CalPs[col] = NULL;
|
||||
|
||||
e = CalColumn[col];
|
||||
while(e) {
|
||||
printf("%04d%c%02d%c%02d ", y, DATESEP, m+1, DATESEP, d);
|
||||
printf("%s\n", e->text);
|
||||
free(e->text);
|
||||
n = e->next;
|
||||
free(e);
|
||||
e = n;
|
||||
}
|
||||
CalColumn[col] = NULL;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* Various functions for writing different types of lines. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE void WriteSolidCalLine(void)
|
||||
#else
|
||||
static void WriteSolidCalLine()
|
||||
#endif
|
||||
{
|
||||
PutChar('+');
|
||||
PrintCentered("", CalWidth-2, '-');
|
||||
PutChar('+');
|
||||
PutChar('\n');
|
||||
}
|
||||
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE void WriteIntermediateCalLine(void)
|
||||
#else
|
||||
static void WriteIntermediateCalLine()
|
||||
#endif
|
||||
{
|
||||
int i;
|
||||
|
||||
PutChar('+');
|
||||
for (i=0; i<7; i++) {
|
||||
PrintCentered("", ColSpaces, '-');
|
||||
PutChar('+');
|
||||
}
|
||||
PutChar('\n');
|
||||
}
|
||||
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE void WriteCalDays(void)
|
||||
#else
|
||||
static void WriteCalDays()
|
||||
#endif
|
||||
{
|
||||
int i;
|
||||
PutChar('|');
|
||||
for (i=0; i<7; i++) {
|
||||
if (!MondayFirst)
|
||||
PrintCentered(DayName[(i+6)%7], ColSpaces, ' ');
|
||||
else
|
||||
PrintCentered(DayName[i%7], ColSpaces, ' ');
|
||||
PutChar('|');
|
||||
}
|
||||
PutChar('\n');
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* SimpleTime */
|
||||
/* */
|
||||
/* Format the time according to simple time format. */
|
||||
/* If out is NULL, result placed in internal static buffer. */
|
||||
/* A trailing space is always added. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC char *SimpleTime(int tim, char *out)
|
||||
#else
|
||||
char *SimpleTime(tim, out)
|
||||
int tim;
|
||||
char *out;
|
||||
#endif
|
||||
{
|
||||
static buf[9];
|
||||
int h, min, hh;
|
||||
|
||||
if (!out) out = (char *) buf;
|
||||
|
||||
*out = 0;
|
||||
|
||||
switch(ScFormat) {
|
||||
|
||||
case SC_AMPM:
|
||||
if (tim == NO_TIME) sprintf(out, " ");
|
||||
else {
|
||||
h = tim / 60;
|
||||
min = tim % 60;
|
||||
if (h == 0) hh=12;
|
||||
else if (h > 12) hh=h-12;
|
||||
else hh=h;
|
||||
sprintf(out, "%2d%c%02d%s ", hh, TIMESEP, min, (h>=12) ? L_PM : L_AM);
|
||||
}
|
||||
break;
|
||||
|
||||
case SC_MIL:
|
||||
if (tim == NO_TIME) sprintf(out, " ");
|
||||
else {
|
||||
h = tim / 60;
|
||||
min = tim % 60;
|
||||
sprintf(out, "%02d%c%02d ", h, TIMESEP, min);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* SortCol */
|
||||
/* */
|
||||
/* Sort the calendar entries in a column by time and priority */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE void SortCol(CalEntry **col)
|
||||
#else
|
||||
static void SortCol(col)
|
||||
CalEntry **col;
|
||||
#endif
|
||||
{
|
||||
CalEntry *cur, *prev, *next;
|
||||
|
||||
cur = *col;
|
||||
prev = NULL;
|
||||
|
||||
/* Note that we use <= comparison rather than > comparison to preserve the
|
||||
file order of reminders which have the same time and priority */
|
||||
|
||||
while (cur->next &&
|
||||
CompareRems(0, cur->time, cur->priority,
|
||||
0, cur->next->time, cur->next->priority,
|
||||
SortByDate, SortByTime, SortByPrio) <= 0) {
|
||||
next = cur->next;
|
||||
/* Swap cur and next */
|
||||
if (!prev) {
|
||||
*col = next;
|
||||
cur->next = next->next;
|
||||
next->next = cur;
|
||||
prev = next;
|
||||
} else {
|
||||
prev->next = next;
|
||||
cur->next = next->next;
|
||||
next->next = cur;
|
||||
prev = next;
|
||||
}
|
||||
}
|
||||
}
|
||||
282
config.h
282
config.h
@@ -1,282 +0,0 @@
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* CONFIG.H */
|
||||
/* */
|
||||
/* Contains various configuration parameters for Remind. */
|
||||
/* You may have to edit this file to tweak parameters or take */
|
||||
/* care of certain system dependencies. */
|
||||
/* */
|
||||
/* This file is part of REMIND. */
|
||||
/* Copyright (C) 1992-1996 by David F. Skoll */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
/* $Id: config.h,v 1.5 1996-10-12 02:49:32 dfs Exp $ */
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* LAT_DEG, LAT_MIN and LAT_SEC: Latitude of your location */
|
||||
/* LON_DEG, LON_MIN and LON_SEC: Longitude of your location */
|
||||
/* LOCATION: A string identifying your location. */
|
||||
/* For latitude, north is positive, south is negative. */
|
||||
/* For longitude, west is positive, east is negative. */
|
||||
/* NOTE: For negative numbers, all three of DEG, MIN, SEC should be */
|
||||
/* negative. To indicate -20deg22'33'' use */
|
||||
/* DEG=-20, MIN=-22 and SEC=-33. */
|
||||
/* The default values are initially set to Ottawa, Ontario, Canada. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define LAT_DEG 45
|
||||
#define LAT_MIN 24
|
||||
#define LAT_SEC 0
|
||||
#define LON_DEG 75
|
||||
#define LON_MIN 39
|
||||
#define LON_SEC 0
|
||||
#define LOCATION "Ottawa"
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* HAVE_MKTIME: Define this if your C library includes the mktime() */
|
||||
/* function. Otherwise, will attempt to use the Unix */
|
||||
/* style time manipulations. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define HAVE_MKTIME 1
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* NEED_TIMEGM: If your C library does not have mktime() and it ALSO */
|
||||
/* does not have timelocal() or timegm(), uncomment the */
|
||||
/* next line. If HAVE_MKTIME is defined, NEED_TIMEGM is */
|
||||
/* ignored. Very few systems should require NEED_TIMEGM. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* #define NEED_TIMEGM 1 */
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* DEFAULT_PAGE: The default page size to use for Rem2PS. */
|
||||
/* The Letter version is appropriate for North America; the A4 version */
|
||||
/* is appropriate for Europe. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define DEFAULT_PAGE {"Letter", 612, 792}
|
||||
/* #define DEFAULT_PAGE {"A4", 595, 842} */
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* DATESEP: The default date separator. North American usage is '/'; */
|
||||
/* others may prefer '-'. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define DATESEP '/'
|
||||
/* #define DATESEP '-' */
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* TIMESEP: The default time separator. North American usage is ':'; */
|
||||
/* others may prefer '.'. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define TIMESEP ':'
|
||||
/* #define TIMESEP '.' */
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* ISOLATIN1: uncomment the following line if your system uses the */
|
||||
/* ISO 8859-1 character set instead of ASCII. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define ISOLATIN1 1
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* IBMEXTENDED: uncomment the following line if you want to use the */
|
||||
/* IBM extended character set. NOT ALL LANGUAGE MODULES SUPPORT THIS. */
|
||||
/* Note that at most one of ISOLATIN1 or IBMEXTENDED should be */
|
||||
/* defined; if both are defined, the results are unspecified. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* #define IBMEXTENDED 1 */
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* WANT_U_OPTION: Comment out the next define to permanently disable */
|
||||
/* the -u option. If you do this, however, remind-all.[c]sh will not */
|
||||
/* work. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define WANT_U_OPTION 1
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* WANT_SHELL_ESCAPING: Define this if you want special shell */
|
||||
/* characters to be escaped with a backslash for the -k option. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#if defined(UNIX)
|
||||
#define WANT_SHELL_ESCAPING 1
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* STRSTR: If your system does not have the "strstr" function, */
|
||||
/* uncomment the following line. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* #define NO_STRSTR 1 */
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* Some implementations have a broken 'putc' and 'putchar'. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#ifdef __SASC_60
|
||||
#define BROKEN_PUTC
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* STDLIB: If you don't have the <stdlib.h> header file, comment the */
|
||||
/* following line. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* MALLOC: If you do not have the <malloc.h> header file, */
|
||||
/* comment out the next 3 lines. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#ifdef UNIX
|
||||
#define HAVE_MALLOC_H 1
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* BASE: The base year for date calculation. NOTE! January 1 of the */
|
||||
/* base year MUST be a Monday, else Remind will not work! */
|
||||
/* IMPORTANT NOTE: The Hebrew date routines depend on BASE */
|
||||
/* being set to 1990. If you change it, you'll have to add the */
|
||||
/* number of days between 1 Jan <NEWBASE> and 1 Jan 1990 to the */
|
||||
/* manifest constant CORRECTION in hbcal.c. Also, the year */
|
||||
/* folding mechanism in main.c depends on BASE<2001. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define BASE 1990
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* YR_RANGE: The range of years allowed. Computers with 16-bit */
|
||||
/* integers can handle about 89 years worth of reminders; if */
|
||||
/* you use 32-bit integers, you can handle over 5 867 000 */
|
||||
/* years. Note that YR_RANGE is set to 88 rather than 89 */
|
||||
/* because we can range up to the last day of the 88th year. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define YR_RANGE 88
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* VAR_NAME_LEN: The maximum length of variable names. Don't make it */
|
||||
/* any less than 12. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define VAR_NAME_LEN 12
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* MAX_PRT_LEN: The maximum number of characters to print when */
|
||||
/* displaying a string value for debugging purposes. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define MAX_PRT_LEN 40
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* LINELEN: The maximum length of an input line */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define LINELEN 512
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* OP_STACK_SIZE: The size of the operator stack for expr. parsing */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define OP_STACK_SIZE 30
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* VAL_STACK_SIZE: The size of the operand stack for expr. parsing */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define VAL_STACK_SIZE 30
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* INCLUDE_NEST: How many nested INCLUDES do we handle? */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define INCLUDE_NEST 8
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* IF_NEST: How many nested IFs do we handle? Maximum is the number */
|
||||
/* of bits in an int, divided by two. Beware! */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define IF_NEST (4*sizeof(unsigned int))
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* Do we handle queued reminders? */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#if defined(UNIX) || defined(__OS2__)
|
||||
#define HAVE_QUEUED 1
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* Does our C compiler have prototypes? Override this test if you */
|
||||
/* are using a non-ANSI compiler that nevertheless has prototypes. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#if defined(__STDC__) || defined(__TURBOC__) || defined(__BORLANDC__)
|
||||
#define HAVE_PROTOS 1
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* Do we use the <stdarg.h> scheme for functions with variable number */
|
||||
/* of parameters? If not, the <varargs.h> scheme is assumed. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#if defined(__STDC__) || defined(__TURBOC__) || defined(__BORLANDC__)
|
||||
#define HAVE_STDARG 1
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* Does the function argument to the signal() function take an INT */
|
||||
/* argument? If yes, uncomment the next line. If you get it wrong, */
|
||||
/* the only bad side effect is a compiler warning, so don't worry too */
|
||||
/* much about it. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define SIGHANDLER_INT_ARG 1
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* Do we have the <unistd.h> header? If not, use sys/files.h */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#ifdef UNIX
|
||||
#define HAVE_UNISTD 1
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* How many attempts to resolve a weird date spec? */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define TRIG_ATTEMPTS 25
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* How many global omits of the form YYYY MM DD do we handle? */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define MAX_FULL_OMITS 75
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* How many global omits of the form MM DD do we handle? */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define MAX_PARTIAL_OMITS 75
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* The size of statically-allocated buffers for tokens. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define TOKSIZE 128
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* The size of the buffer for the shell() function. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define SHELLSIZE 512
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* A newline - some systems need "\n\r" */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define NL "\n"
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* Minimum number of linefeeds in each calendar "box" */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define CAL_LINES 5
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* Don't change the next definitions */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define PUBLIC
|
||||
#define PRIVATE static
|
||||
|
||||
#ifdef UNIX
|
||||
#define _POSIX_SOURCE
|
||||
#endif
|
||||
|
||||
#ifdef SYSV
|
||||
#define _SVID_SOURCE
|
||||
#endif
|
||||
|
||||
#define PSBEGIN "# rem2ps begin"
|
||||
#define PSEND "# rem2ps end"
|
||||
|
||||
#ifdef BROKEN_PUTC
|
||||
#define Putc SafePutc
|
||||
#define PutChar SafePutChar
|
||||
#else
|
||||
#define Putc putc
|
||||
#define PutChar putchar
|
||||
#endif
|
||||
98
configure.in
Normal file
98
configure.in
Normal file
@@ -0,0 +1,98 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT
|
||||
AC_CONFIG_SRCDIR([src/queue.c])
|
||||
|
||||
cat <<'EOF'
|
||||
|
||||
**********************
|
||||
* *
|
||||
* Configuring REMIND *
|
||||
* *
|
||||
**********************
|
||||
|
||||
EOF
|
||||
|
||||
AC_CONFIG_HEADERS([src/config.h])
|
||||
|
||||
AC_ARG_ENABLE(perl-build-artifacts,
|
||||
[ --disable-perl-build-artifacts
|
||||
Disable perllocal.pod and .packlist generation], ac_cv_perlartifacts=$enableval, ac_cv_perlartifacts=yes)
|
||||
|
||||
AH_BOTTOM([#include <custom.h>])
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PATH_PROG([PERL], [perl])
|
||||
|
||||
dnl Checks for libraries.
|
||||
AC_CHECK_LIB(m, sqrt)
|
||||
AC_CHECK_HEADERS_ONCE([sys/time.h])
|
||||
|
||||
dnl Integer sizes
|
||||
AC_CHECK_SIZEOF(unsigned int)
|
||||
AC_CHECK_SIZEOF(unsigned long)
|
||||
AC_CHECK_SIZEOF(time_t)
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_CHECK_HEADERS(sys/types.h glob.h wctype.h locale.h langinfo.h)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_STRUCT_TM
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_FUNC_UTIME_NULL
|
||||
if test "$GCC" = yes; then
|
||||
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes"
|
||||
# Check for link-time optimization support
|
||||
f=-flto=auto
|
||||
AC_MSG_CHECKING([whether $CC supports $f])
|
||||
if $CC -Werror -E $f - < /dev/null > /dev/null 2>&1 ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
CFLAGS="$CFLAGS $f"
|
||||
f=-ffat-lto-objects
|
||||
AC_MSG_CHECKING([whether $CC supports $f])
|
||||
if $CC -Werror -E $f - < /dev/null > /dev/null 2>&1 ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
CFLAGS="$CFLAGS $f"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl If sizeof(time_t) is 4, try to get 64-bit time_t
|
||||
if test "$ac_cv_sizeof_time_t" = "4" ; then
|
||||
AC_MSG_NOTICE([time_t is 32-bits on this system; attempting to use 64-bit time_t])
|
||||
CFLAGS="$CFLAGS -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64"
|
||||
fi
|
||||
|
||||
if test "$ac_cv_perlartifacts" = "yes" ; then
|
||||
PERLARTIFACTS=
|
||||
else
|
||||
PERLARTIFACTS='NO_PACKLIST=1 NO_PERLLOCAL=1'
|
||||
fi
|
||||
|
||||
RELEASE_DATE=`grep '[[0-9]][[0-9]][[0-9]][[0-9]]-[[0-9]][[0-9]]-[[0-9]][[0-9]]' docs/WHATSNEW | head -n 1 | awk '{print $NF}'`
|
||||
|
||||
# Sanity-check release date
|
||||
echo "$RELEASE_DATE" | grep '^....-..-..$' > /dev/null 2>&1
|
||||
if test "$?" != 0 ; then
|
||||
echo "*** COULD NOT DETERMINE RELEASE DATE: docs/WHATSNEW is incorrect!"
|
||||
exit 1
|
||||
fi
|
||||
AC_CHECK_FUNCS(setenv unsetenv glob mbstowcs setlocale initgroups)
|
||||
|
||||
VERSION=04.02.08
|
||||
AC_SUBST(VERSION)
|
||||
AC_SUBST(PERL)
|
||||
AC_SUBST(PERLARTIFACTS)
|
||||
AC_SUBST(RELEASE_DATE)
|
||||
AC_CONFIG_FILES([src/Makefile www/Makefile src/version.h rem2html/Makefile rem2pdf/Makefile.PL rem2pdf/Makefile.top rem2pdf/bin/rem2pdf man/rem.1 man/rem2ps.1 man/remind.1 man/tkremind.1])
|
||||
AC_OUTPUT
|
||||
chmod a+x rem2pdf/bin/rem2pdf
|
||||
9
contrib/README
Normal file
9
contrib/README
Normal file
@@ -0,0 +1,9 @@
|
||||
This directory contains contributed scripts. They are provided
|
||||
"as-is" with no warranty. Please do not contact Dianne Skoll for help
|
||||
with these scripts; instead, contact the script authors.
|
||||
|
||||
You should check the upstream sources; there may be newer versions
|
||||
of these scripts available.
|
||||
|
||||
--
|
||||
Dianne Skoll
|
||||
279
contrib/ical2rem.pl
Executable file
279
contrib/ical2rem.pl
Executable file
@@ -0,0 +1,279 @@
|
||||
#!/usr/bin/perl -w
|
||||
#
|
||||
# ical2rem.pl -
|
||||
# Reads iCal files and outputs remind-compatible files. Tested ONLY with
|
||||
# calendar files created by Mozilla Calendar/Sunbird. Use at your own risk.
|
||||
# Copyright (c) 2005, 2007, Justin B. Alcorn
|
||||
|
||||
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
#
|
||||
# version 0.5.2 2007-03-23
|
||||
# - BUG: leadtime for recurring events had a max of 4 instead of DEFAULT_LEAD_TIME
|
||||
# - remove project-lead-time, since Category was a non-standard attribute
|
||||
# - NOTE: There is a bug in iCal::Parser v1.14 that causes multiple calendars to
|
||||
# fail if a calendar with recurring events is followed by a calendar with no
|
||||
# recurring events. This has been reported to the iCal::Parser author.
|
||||
# version 0.5.1 2007-03-21
|
||||
# - BUG: Handle multiple calendars on STDIN
|
||||
# - add --heading option for priority on section headers
|
||||
# version 0.5 2007-03-21
|
||||
# - Add more help options
|
||||
# - --project-lead-time option
|
||||
# - Suppress printing of heading if there are no todos to print
|
||||
# version 0.4
|
||||
# - Version 0.4 changes all written or inspired by, and thanks to Mark Stosberg
|
||||
# - Change to GetOptions
|
||||
# - Change to pipe
|
||||
# - Add --label, --help options
|
||||
# - Add Help Text
|
||||
# - Change to subroutines
|
||||
# - Efficiency and Cleanup
|
||||
# version 0.3
|
||||
# - Convert to GPL (Thanks to Mark Stosberg)
|
||||
# - Add usage
|
||||
# version 0.2
|
||||
# - add command line switches
|
||||
# - add debug code
|
||||
# - add SCHED _sfun keyword
|
||||
# - fix typos
|
||||
# version 0.1 - ALPHA CODE.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
cat /path/to/file*.ics | ical2rem.pl > ~/.ical2rem
|
||||
|
||||
All options have reasonable defaults:
|
||||
--label Calendar name (Default: Calendar)
|
||||
--lead-time Advance days to start reminders (Default: 3)
|
||||
--todos, --no-todos Process Todos? (Default: Yes)
|
||||
--heading Define a priority for static entries
|
||||
--help Usage
|
||||
--man Complete man page
|
||||
|
||||
Expects an ICAL stream on STDIN. Converts it to the format
|
||||
used by the C<remind> script and prints it to STDOUT.
|
||||
|
||||
=head2 --label
|
||||
|
||||
ical2rem.pl --label "Bob's Calendar"
|
||||
|
||||
The syntax generated includes a label for the calendar parsed.
|
||||
By default this is "Calendar". You can customize this with
|
||||
the "--label" option.
|
||||
|
||||
=head2 --lead-time
|
||||
|
||||
ical2rem.pl --lead-time 3
|
||||
|
||||
How may days in advance to start getting reminders about the events. Defaults to 3.
|
||||
|
||||
=head2 --no-todos
|
||||
|
||||
ical2rem.pl --no-todos
|
||||
|
||||
If you don't care about the ToDos the calendar, this will suppress
|
||||
printing of the ToDo heading, as well as skipping ToDo processing.
|
||||
|
||||
=head2 --heading
|
||||
|
||||
ical2rem.pl --heading "PRIORITY 9999"
|
||||
|
||||
Set an option on static messages output. Using priorities can made the static messages look different from
|
||||
the calendar entries. See the file defs.rem from the remind distribution for more information.
|
||||
|
||||
=cut
|
||||
|
||||
use strict;
|
||||
use iCal::Parser;
|
||||
use DateTime;
|
||||
use Getopt::Long 2.24 qw':config auto_help';
|
||||
use Pod::Usage;
|
||||
use Data::Dumper;
|
||||
use vars '$VERSION';
|
||||
$VERSION = "0.5.2";
|
||||
|
||||
# Declare how many days in advance to remind
|
||||
my $DEFAULT_LEAD_TIME = 3;
|
||||
my $PROCESS_TODOS = 1;
|
||||
my $HEADING = "";
|
||||
my $help;
|
||||
my $man;
|
||||
|
||||
my $label = 'Calendar';
|
||||
GetOptions (
|
||||
"label=s" => \$label,
|
||||
"lead-time=i" => \$DEFAULT_LEAD_TIME,
|
||||
"todos!" => \$PROCESS_TODOS,
|
||||
"heading=s" => \$HEADING,
|
||||
"help|?" => \$help,
|
||||
"man" => \$man
|
||||
);
|
||||
pod2usage(1) if $help;
|
||||
pod2usage(-verbose => 2) if $man;
|
||||
|
||||
my $month = ['None','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
|
||||
|
||||
my @calendars;
|
||||
my $in;
|
||||
|
||||
while (<>) {
|
||||
$in .= $_;
|
||||
if (/END:VCALENDAR/) {
|
||||
push(@calendars,$in);
|
||||
$in = "";
|
||||
}
|
||||
}
|
||||
my $parser = iCal::Parser->new();
|
||||
my $hash = $parser->parse_strings(@calendars);
|
||||
|
||||
##############################################################
|
||||
#
|
||||
# Subroutines
|
||||
#
|
||||
#############################################################
|
||||
#
|
||||
# _process_todos()
|
||||
# expects 'todos' hashref from iCal::Parser is input
|
||||
# returns String to output
|
||||
sub _process_todos {
|
||||
my $todos = shift;
|
||||
|
||||
my ($todo, @newtodos, $leadtime);
|
||||
my $output = "";
|
||||
|
||||
$output .= 'REM '.$HEADING.' MSG '.$label.' ToDos:%"%"%'."\n";
|
||||
|
||||
# For sorting, make sure everything's got something
|
||||
# To sort on.
|
||||
my $now = DateTime->now;
|
||||
for $todo (@{$todos}) {
|
||||
# remove completed items
|
||||
if ($todo->{'STATUS'} && $todo->{'STATUS'} eq 'COMPLETED') {
|
||||
next;
|
||||
} elsif ($todo->{'DUE'}) {
|
||||
# All we need is a due date, everything else is sugar
|
||||
$todo->{'SORT'} = $todo->{'DUE'}->clone;
|
||||
} elsif ($todo->{'DTSTART'}) {
|
||||
# for sorting, sort on start date if there's no due date
|
||||
$todo->{'SORT'} = $todo->{'DTSTART'}->clone;
|
||||
} else {
|
||||
# if there's no due or start date, just make it now.
|
||||
$todo->{'SORT'} = $now;
|
||||
}
|
||||
push(@newtodos,$todo);
|
||||
}
|
||||
if (! (scalar @newtodos)) {
|
||||
return "";
|
||||
}
|
||||
# Now sort on the new Due dates and print them out.
|
||||
for $todo (sort { DateTime->compare($a->{'SORT'}, $b->{'SORT'}) } @newtodos) {
|
||||
my $due = $todo->{'SORT'}->clone();
|
||||
my $priority = "";
|
||||
if (defined($todo->{'PRIORITY'})) {
|
||||
if ($todo->{'PRIORITY'} == 1) {
|
||||
$priority = "PRIORITY 1000";
|
||||
} elsif ($todo->{'PRIORITY'} == 3) {
|
||||
$priority = "PRIORITY 7500";
|
||||
}
|
||||
}
|
||||
if (defined($todo->{'DTSTART'}) && defined($todo->{'DUE'})) {
|
||||
# Lead time is duration of task + lead time
|
||||
my $diff = ($todo->{'DUE'}->delta_days($todo->{'DTSTART'})->days())+$DEFAULT_LEAD_TIME;
|
||||
$leadtime = "+".$diff;
|
||||
} else {
|
||||
$leadtime = "+".$DEFAULT_LEAD_TIME;
|
||||
}
|
||||
$output .= "REM ".$due->month_abbr." ".$due->day." ".$due->year." $leadtime $priority MSG \%a $todo->{'SUMMARY'}\%\"\%\"\%\n";
|
||||
}
|
||||
$output .= 'REM '.$HEADING.' MSG %"%"%'."\n";
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
# Main Program
|
||||
#
|
||||
######################################################################
|
||||
|
||||
print _process_todos($hash->{'todos'}) if $PROCESS_TODOS;
|
||||
|
||||
my ($leadtime, $yearkey, $monkey, $daykey,$uid,%eventsbyuid);
|
||||
print 'REM '.$HEADING.' MSG '.$label.' Events:%"%"%'."\n";
|
||||
my $events = $hash->{'events'};
|
||||
foreach $yearkey (sort keys %{$events} ) {
|
||||
my $yearevents = $events->{$yearkey};
|
||||
foreach $monkey (sort {$a <=> $b} keys %{$yearevents}){
|
||||
my $monevents = $yearevents->{$monkey};
|
||||
foreach $daykey (sort {$a <=> $b} keys %{$monevents} ) {
|
||||
my $dayevents = $monevents->{$daykey};
|
||||
foreach $uid (sort {
|
||||
DateTime->compare($dayevents->{$a}->{'DTSTART'}, $dayevents->{$b}->{'DTSTART'})
|
||||
} keys %{$dayevents}) {
|
||||
my $event = $dayevents->{$uid};
|
||||
if ($eventsbyuid{$uid}) {
|
||||
my $curreventday = $event->{'DTSTART'}->clone;
|
||||
$curreventday->truncate( to => 'day' );
|
||||
$eventsbyuid{$uid}{$curreventday->epoch()} =1;
|
||||
for (my $i = 0;$i < $DEFAULT_LEAD_TIME && !defined($event->{'LEADTIME'});$i++) {
|
||||
if ($eventsbyuid{$uid}{$curreventday->subtract( days => $i+1 )->epoch() }) {
|
||||
$event->{'LEADTIME'} = $i;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$eventsbyuid{$uid} = $event;
|
||||
my $curreventday = $event->{'DTSTART'}->clone;
|
||||
$curreventday->truncate( to => 'day' );
|
||||
$eventsbyuid{$uid}{$curreventday->epoch()} =1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach $yearkey (sort keys %{$events} ) {
|
||||
my $yearevents = $events->{$yearkey};
|
||||
foreach $monkey (sort {$a <=> $b} keys %{$yearevents}){
|
||||
my $monevents = $yearevents->{$monkey};
|
||||
foreach $daykey (sort {$a <=> $b} keys %{$monevents} ) {
|
||||
my $dayevents = $monevents->{$daykey};
|
||||
foreach $uid (sort {
|
||||
DateTime->compare($dayevents->{$a}->{'DTSTART'}, $dayevents->{$b}->{'DTSTART'})
|
||||
} keys %{$dayevents}) {
|
||||
my $event = $dayevents->{$uid};
|
||||
if (exists($event->{'LEADTIME'})) {
|
||||
$leadtime = "+".$event->{'LEADTIME'};
|
||||
} else {
|
||||
$leadtime = "+".$DEFAULT_LEAD_TIME;
|
||||
}
|
||||
my $start = $event->{'DTSTART'};
|
||||
print "REM ".$start->month_abbr." ".$start->day." ".$start->year." $leadtime ";
|
||||
if ($start->hour > 0) {
|
||||
print " AT ";
|
||||
print $start->strftime("%H:%M");
|
||||
print " SCHED _sfun MSG %a %2 ";
|
||||
} else {
|
||||
print " MSG %a ";
|
||||
}
|
||||
print "%\"$event->{'SUMMARY'}";
|
||||
print " at $event->{'LOCATION'}" if $event->{'LOCATION'};
|
||||
print "\%\"%\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
exit 0;
|
||||
#:vim set ft=perl ts=4 sts=4 expandtab :
|
||||
13
contrib/rem2ics-0.93/Makefile
Normal file
13
contrib/rem2ics-0.93/Makefile
Normal file
@@ -0,0 +1,13 @@
|
||||
DESTDIR?=
|
||||
PREFIX?=/usr
|
||||
BINDIR?=$(PREFIX)/bin
|
||||
MANDIR?=$(PREFIX)/share/man
|
||||
|
||||
default: rem2ics.1
|
||||
|
||||
rem2ics.1:
|
||||
pod2man -c "" rem2ics > rem2ics.1
|
||||
|
||||
install: rem2ics.1
|
||||
install -p -D rem2ics $(DESTDIR)$(BINDIR)/rem2ics
|
||||
install -p -D -m 0644 rem2ics.1 $(DESTDIR)$(MANDIR)/man1/rem2ics.1
|
||||
847
contrib/rem2ics-0.93/rem2ics
Executable file
847
contrib/rem2ics-0.93/rem2ics
Executable file
@@ -0,0 +1,847 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# rem2ics -- convert the output of "remind -s" into RFC2445 iCalendar format.
|
||||
|
||||
# Copyright 2007,2008,2009
|
||||
# Mark Atwood <me@mark.atwood.name>
|
||||
# Paul Hinze <paul dot t dot hinze at gmail dot com>
|
||||
# Michael Schultz <mjschultz at gmail dot com>
|
||||
#
|
||||
# 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.
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston MA 02110-1301 USA
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
rem2ics - convert the output of "remind -s" into RFC2445 iCalendar format.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
TZ=I<timezone> B<rem2ics> [B<-man>] [B<-do>] [B<-norecur>] [B<-usetag>] E<lt>input E<gt>output
|
||||
|
||||
=head1 OPTIONS AND ARGUMENTS
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<-man>
|
||||
|
||||
Print the manual page and exit.
|
||||
|
||||
=item B<-do>
|
||||
|
||||
Actually do the conversion. Otherwise just print a brief help message
|
||||
and usage example, and then exit.
|
||||
|
||||
=item B<-norecur>
|
||||
|
||||
Do not attempt to detect and fold together recurring events.
|
||||
|
||||
=item B<-usetag>
|
||||
|
||||
Generate UIDs using remind TAG clauses.
|
||||
|
||||
=back
|
||||
|
||||
Input is from standard input
|
||||
|
||||
Output is to standard output.
|
||||
|
||||
=head1 USAGE
|
||||
|
||||
remind -s360 -irem2ics=1 ~/.reminders 1 Jan 1991 | TZ=PST8PDT rem2ics -do >reminders.ics
|
||||
|
||||
This tells B<remind> to use ~/.reminders, and to process the entire
|
||||
range of dates it can handle (from Jan 1 1991 to Dec 31 2020), and to
|
||||
define a variable named C<rem2ics>, which can be used in
|
||||
C<IF !defined("rem2ics")> / C<ENDIF> pairs.
|
||||
B<rem2ics> will use a timezone of PST8PDT, and will fold events that
|
||||
have the same name and duration into a single iCalendar VEVENT object.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
=head2 Timezones and the TZ environment variable.
|
||||
|
||||
B<rem2ics> uses the TZ environment variable to determine the value of
|
||||
the RFC2445 TZID property. If you are running on a Linux or other GNU
|
||||
libc based system, you probably don't (and probably shouldn't)
|
||||
normally have TZ set. You can confirm this by running C<printenv TZ>
|
||||
at a shell prompt. If your remind data is in your "local time", and
|
||||
it probably is, you should probably set TZ to a good name for your
|
||||
local timezone just for the run of this script. You probably should
|
||||
NOT set TZ in your login scripts.
|
||||
|
||||
You can use TZ like this:
|
||||
|
||||
remind -s ~/.reminders | TZ=PST8PDT rem2ics -do >reminders.ics
|
||||
|
||||
or
|
||||
|
||||
remind -s ~/.reminders | TZ=US/Pacific rem2ics -do >reminders.ics
|
||||
|
||||
|
||||
If, for some reason, your remind files are all in GMT instead of
|
||||
localtime (you smart person you!), you can do this:
|
||||
|
||||
remind -s ~/.reminders | TZ=GMT rem2ics -do >reminders.ics
|
||||
|
||||
or
|
||||
|
||||
remind -s ~/.reminders | TZ=0 rem2ics -do >reminders.ics
|
||||
|
||||
and B<rem2ics> will use the ISO8601 "Z" notation for GMT time in the ics
|
||||
file. (Other synonyms for GMT are the empty string (not the same as
|
||||
the TZ not set), "I<0>", "I<Z>", "I<Zulu>", "I<Greenwitch>", "I<GMT>",
|
||||
"I<GMT+0>, and "I<GMT-0>".)
|
||||
|
||||
If you leave TZ undefined and unset, B<rem2ics> will use the ISO8601
|
||||
"T" notation date strings with no TZID property, which RFC2445 calls a
|
||||
"floating time". Who knows, it might work for you!
|
||||
|
||||
The TZ string value is literally incorporated into the iCalendar
|
||||
stream, so whatever your iCalendar-using application needs is what you
|
||||
should use. You may have to experiment a bit.
|
||||
|
||||
You can look around in C</usr/share/zoneinfo> to get the names of
|
||||
every timezone anywhere. This is the "Olson database" that RFC2445
|
||||
refers to. Read the man page for L<tzfile(5)> for more than you ever
|
||||
wanted to know about the format of these files, and about GNU libc's
|
||||
handling of timezones. As complex as it is, it's certainly better
|
||||
than what POSIX defines or what most legacy UNIX systems do, and most
|
||||
certainly better than Microsoft, who in their "cutting edge" "state of
|
||||
the art" "server" OS, still hasn't figured out that daylight time
|
||||
rules might be different in different years.
|
||||
|
||||
If you just ran B<rem2ics> without reading all this stuff, or if you
|
||||
don't want to worry about it at all, and somehow your iCalendar
|
||||
application manager is able to guess the proper timezone for you, just
|
||||
leave TZ undefined, and B<rem2ics> will use the ISO8601 "T" notation
|
||||
date strings with no TZID property, which RFC2445 calls a "floating
|
||||
time". Who knows, it might work for you!
|
||||
|
||||
=head2 Detecting recurring events
|
||||
|
||||
B<rem2ics> tries to detect recurring events. If any multiple events
|
||||
appear with exactly the text and exactly the same duration (including
|
||||
"no duration"), instead of multiple VEVENT objects, there will be just
|
||||
one VEVENT object, that will have a RFC2445 C<RDATE> property.
|
||||
|
||||
B<rem2ics> is not yet smart enough to derive an C<RRULE> based
|
||||
recurrence. If you really want that feature, either implement it and
|
||||
send in a patch, or contact the author and convince him to do it.
|
||||
|
||||
=head2 Other iCalendar Properties
|
||||
|
||||
B<rem2ics> does not generate C<DESCRIPTION> or C<LOCATION>. One
|
||||
would have to heuristically parse them out of the text, and everyone
|
||||
uses a idiosyncratic way of putting things in B<remind>.
|
||||
|
||||
If the B<-usetag> option is not used or no C<TAG> is set for a
|
||||
reminder, B<rem2ics> will synthesize C<UID> properties for each
|
||||
VEVENT, but the UIDs will be different (and unique) for each run of
|
||||
B<rem2ics>. If you run rem2ics twice and import the two resulting ICS
|
||||
streams into your new scheduling program, your appointments will
|
||||
appear twice. If, however, you have set C<TAG> clauses in your
|
||||
reminders and activated B<-usetag>, these will be used. The same
|
||||
applies for tags synthesized by B<remind>'s B<-y> option. Hence, it
|
||||
is more useful to use the B<-y> option than to let B<rem2ics>
|
||||
synthesize UIDs, because the UIDs will stay the same across multiple
|
||||
runs.
|
||||
|
||||
=head2 Other iCalendar Perl objects
|
||||
|
||||
Why doesn't B<rem2ics> use any of the iCalendar Perl stuff in CPAN?
|
||||
Because I don't trust them, and they are too big for this app. One
|
||||
links to a binary library. Another hasn't been maintained since 1991,
|
||||
and is full of notes as to how buggy and incomplete it is. And so
|
||||
forth. I am not at this moment interested in groveling around in
|
||||
L<Net::iCal>, L<DateTime::Format::iCal>, L<Tie::iCal>,
|
||||
L<iCal::Parser>, or C<libical>.
|
||||
|
||||
=head2 Previous implementation
|
||||
|
||||
There is a working quick & dirty rem2ics written in awk
|
||||
by Anthony J. Chivetta E<lt>achivetta@gmail.comE<gt>.
|
||||
|
||||
But it has the following problems: it doesn't escape the text, it
|
||||
doesn't handle events that cross over midnight, it doesn't do
|
||||
timezones, it doesn't enforce the correct EOL sequence, and it doesn't
|
||||
fold long lines. This is a replacement for that script.
|
||||
|
||||
=head1 TODO
|
||||
|
||||
If TZ not set, grab out of system config somewhere
|
||||
Detect recurring events.
|
||||
If I'm REALLY smart, derive RRULE
|
||||
Handle characters not in US-ASCII. Latin1? UTF8?
|
||||
|
||||
=head1 VERSION HISTORY
|
||||
|
||||
=over 8
|
||||
|
||||
=item version 0.1 2007-02-08
|
||||
|
||||
First cut.
|
||||
|
||||
=item version 0.2 2007-02-09
|
||||
|
||||
Reorg into multipass over a data structure.
|
||||
|
||||
=item version 0.3 2007-02-10
|
||||
|
||||
Collapse repeating events. Fold output lines.
|
||||
|
||||
=item version 0.9 2007-02-11
|
||||
|
||||
POD. Command line options. First public release.
|
||||
|
||||
=item version 0.91 2007-02-14
|
||||
|
||||
Bug fix, error message for non-recurring events
|
||||
|
||||
=item version 0.92 2008-01-28
|
||||
|
||||
Bug fix,
|
||||
rem2ics 0.91 chokes on timed reminders with
|
||||
duration using `remind -s` as it functions in remind-03.01.03.
|
||||
Remind 3.01 changed how the -s data is formatted for events that have a duration
|
||||
Patch by Paul Hinze E<lt>paul dot t dot hinze at gmail dot comE<gt>
|
||||
and Michael Schultz E<lt>mjschultz at gmail dot comE<gt>
|
||||
|
||||
=item version 0.93 2009-06-25
|
||||
|
||||
Add B<-usetag> option to allow for UIDs to stay the same across multiple runs
|
||||
by using the remind TAG clause.
|
||||
Patch by Tim Weber E<lt>scy at scytale dot nameE<gt>
|
||||
|
||||
=back
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<http://mark.atwood.name/code/rem2ics>
|
||||
|
||||
L<http://en.wikipedia.org/wiki/ICalendar>
|
||||
|
||||
L<http://tools.ietf.org/html/rfc2445>
|
||||
|
||||
L<https://dianne.skoll.ca/projects/remind/>
|
||||
|
||||
L<remind(1)>
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Copyright 2007,2008,2009 by Mark Atwood E<lt>me+rem2ics@mark.atwood.nameE<gt>. L<http://mark.atwood.name/>.
|
||||
|
||||
Please report bugs (with patches, if possible).
|
||||
|
||||
Inspired by Anthony J. Chivetta E<lt>achivetta@gmail.comE<gt>'s
|
||||
rem2ics in awk.
|
||||
|
||||
Thank you to Dianne Skoll E<lt>dianne@skoll.ca<gt> for Remind,
|
||||
and to the IETF calsch wg for the iCalendar specification.
|
||||
|
||||
=cut
|
||||
|
||||
use Getopt::Long;
|
||||
use Pod::Usage;
|
||||
|
||||
my $app_name = "rem2ics";
|
||||
my $app_version = "0.93";
|
||||
|
||||
# process the command line
|
||||
my %options;
|
||||
GetOptions(\%options, qw(man do norecurr usetag)) || pod2usage(2);
|
||||
pod2usage(-verbose => 2) if ($options{man});
|
||||
|
||||
unless ($options{do}) {
|
||||
print STDERR "Run \"$0 -man\" for information and usage examples.\n"
|
||||
. "Pay special attention to information about timezone.\n";
|
||||
exit(99);
|
||||
}
|
||||
|
||||
# grab the hostname
|
||||
# this is used as part of the UID property of each VEVENT
|
||||
my $ical_uid_hostname = $ENV{'HOSTNAME'};
|
||||
unless ($ical_uid_hostname) {
|
||||
print STDERR "Warning! "
|
||||
. "The environment variable HOSTNAME was not properly set.\n"
|
||||
. "Will use \"localhost\" in the RFC2445 UID property\n";
|
||||
$ical_uid_hostname = "localhost";
|
||||
}
|
||||
|
||||
# look for the TZ
|
||||
my $ical_tzid = undef;
|
||||
if (exists $ENV{'TZ'}) {
|
||||
$ical_tzid = $ENV{'TZ'};
|
||||
my %synonyms_for_gmt = (
|
||||
'' => 1, '0' => 1, 'z' => 1, 'zulu' => 1, 'greenwitch' => 1,
|
||||
'gmt' => 1, 'gmt+0' => 1, 'gmt-0' => 1, );
|
||||
if (exists $synonyms_for_gmt{lc($ical_tzid)}) {
|
||||
$ical_tzid = ''; # empty means GMT, below
|
||||
}
|
||||
} else {
|
||||
# leave it undefined, that has a meaning below
|
||||
}
|
||||
|
||||
# RFC2445 DTSTAMP property will be the time we started running ($^T)
|
||||
my ($ical_dtstamp);
|
||||
{
|
||||
my @gt = gmtime($^T);
|
||||
$ical_dtstamp = sprintf("%04d%02d%02dZ%02d%02d%02dZ",
|
||||
1900+$gt[5], $gt[4]+1, $gt[3],
|
||||
$gt[2], $gt[1], $gt[0]);
|
||||
}
|
||||
|
||||
my ($cnt, $v, @events);
|
||||
|
||||
$cnt = 0;
|
||||
foreach (<STDIN>) {
|
||||
$cnt++;
|
||||
|
||||
s/#.*//; # toss comments
|
||||
next if /^\s*$/; # skip blank lines
|
||||
chomp;
|
||||
|
||||
$v = undef;
|
||||
|
||||
# store the raw line
|
||||
$v->{src} = $_;
|
||||
$v->{cnt} = $cnt;
|
||||
|
||||
# split and parse the line
|
||||
# if we don't like it, skip it and go around again
|
||||
|
||||
# sf[0] = date, in yyyy/mm/dd format
|
||||
# sf[1] = special, usually "*"
|
||||
# sf[2] = tag, usually "*"
|
||||
# sf[3] = duration, in minutes
|
||||
# sf[4] = time, since midnight, in minutes
|
||||
# sf[5] = text
|
||||
|
||||
my @sf = split(' ', $_, 6);
|
||||
next unless ($sf[1] eq '*'); # ignore SPECIAL lines
|
||||
next unless (($sf[3] eq '*') or ($sf[3] =~ m/\d+/));
|
||||
next unless (($sf[4] eq '*') or ($sf[4] =~ m/\d+/));
|
||||
next unless (length($sf[5]) > 0);
|
||||
|
||||
my @dt = split('/', $sf[0], 3);
|
||||
next unless ($dt[0] =~ m/^\d{4}$/); # year
|
||||
next unless ($dt[1] =~ m/^\d{2}$/); # month
|
||||
next unless ($dt[2] =~ m/^\d{2}$/); # day
|
||||
|
||||
if ($sf[4] ne "*") { # a time was given
|
||||
# When an event has a time, remind -s "helpfully" also
|
||||
# puts it as text at the start of the text portion.
|
||||
# This takes the following form:
|
||||
# ##:##[a|p]m <rest of MSG>
|
||||
# or, if the event has a duration:
|
||||
# ##:##[a|p]m-##:##[a|p]m <rest of MSG>
|
||||
# Rather than a nasty regex, just splitting at the
|
||||
# first space does the trick.
|
||||
my($extra_time, $textmsg) = split(' ', $sf[5], 2);
|
||||
$sf[5] = $textmsg;
|
||||
}
|
||||
|
||||
$v->{sf} = \@sf;
|
||||
$v->{dt} = \@dt;
|
||||
|
||||
push @events, $v;
|
||||
}
|
||||
|
||||
# generate the "date time string" for each event
|
||||
foreach $v (@events) {
|
||||
if (${$v->{sf}}[4] eq "*") { # no time was given
|
||||
$v->{dts} = sprintf("%04d%02d%02d", @{$v->{dt}});
|
||||
} else { # a time was given
|
||||
my ($t_hr, $t_mn) = &idiv(${$v->{sf}}[4], 60);
|
||||
$v->{dts} = sprintf("%04d%02d%02dT%02d%02d00",
|
||||
@{$v->{dt}}, $t_hr, $t_mn);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
my(%grovel);
|
||||
|
||||
# if the user doesn't want recurrence detection
|
||||
unless ($options{norecurr}) {
|
||||
|
||||
# then dont put events in the grovel hash
|
||||
|
||||
foreach $v (@events) {
|
||||
# key is duration followed by text
|
||||
# \036 is "ASCII RS Record Separator"
|
||||
my $k = ${$v->{sf}}[3] . "\036" . ${$v->{sf}}[5];
|
||||
push @{$grovel{$k}}, $v;
|
||||
}
|
||||
|
||||
foreach my $k (keys %grovel) {
|
||||
if ((scalar @{$grovel{$k}}) > 1) {
|
||||
$v = ${$grovel{$k}}[0];
|
||||
$v->{recurlist} = \@{$grovel{$k}};
|
||||
foreach my $v0 (@{$grovel{$k}}) {
|
||||
$v0->{is_recurrence} = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# All of the individual events are in the @events array. All of the
|
||||
# unique combinations of duration/event name are the keys in the
|
||||
# %grovel hash, the elements of which are references to an arrays of
|
||||
# references to the events, in the same ordering as they we read by
|
||||
# us, which *ought* to be in datewise order. I don't know if "remind
|
||||
# -s" actually sorts into true chronological order. If it doesn't, we
|
||||
# might have a problem if a recurring event has two instances both on
|
||||
# the first day.
|
||||
|
||||
# Every event that is recurring has a "is_recurrence" property.
|
||||
# Additionally, (hopefully) the first/earliest event in a set of
|
||||
# recurrences has a "recurlist" property. The "recurlist" is a
|
||||
# reference to a list of references to each of the events. The first
|
||||
# one on that list will be the same event that has the "recurlist"
|
||||
# property. The "is_recurrence" property is a reference back to the
|
||||
# event that has the "recurlist" property.
|
||||
|
||||
foreach my $k (keys %grovel) {
|
||||
next if ((scalar @{$grovel{$k}}) <= 1);
|
||||
|
||||
my $recur_str = "";
|
||||
foreach $v (@{$grovel{$k}}) {
|
||||
if (${$v->{sf}}[4] eq "*") { # no time was given
|
||||
$recur_str .= ($v->{dts} . ",");
|
||||
} else {
|
||||
if (defined($ical_tzid)) {
|
||||
if ($ical_tzid eq '') { # tz is defined but empty, so in GMT
|
||||
$recur_str .= $v->{dts} . "Z,";
|
||||
} else { # tz is non-zero, so output the tz as well
|
||||
$recur_str .= $v->{dts} . ",";
|
||||
}
|
||||
} else { # undefined tz, just floating time
|
||||
$recur_str .= $v->{dts} . ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# the recur_str now has an extra comma at the end. chop it off
|
||||
chop($recur_str);
|
||||
${$grovel{$k}}[0]->{recur_str} = $recur_str;
|
||||
}
|
||||
|
||||
foreach my $k (keys %grovel) {
|
||||
next if ((scalar @{$grovel{$k}}) <= 1);
|
||||
my $v = ${$grovel{$k}}[0]; # grab the head of each list
|
||||
if (${$v->{sf}}[4] eq "*") { # no time was given
|
||||
# the default value type for an RDATE is DATE-TIME,
|
||||
# we much change the type to DATE
|
||||
$v->{i_rdate} = sprintf("RDATE;VALUE=DATE:");
|
||||
} else {
|
||||
if (defined($ical_tzid)) {
|
||||
if ($ical_tzid eq '') { # tz is defined but empty, so in GMT
|
||||
$v->{i_rdate} = sprintf("RDATE:");
|
||||
} else { # tz is non-zero, so output the tz as well
|
||||
$v->{i_rdate} = sprintf("RDATE;TZID=%s:", $ical_tzid);
|
||||
}
|
||||
} else { # undefined tz, just floating time
|
||||
$v->{i_rdate} = sprintf("RDATE:");
|
||||
}
|
||||
}
|
||||
# now stick the recur_str onto the end
|
||||
$v->{i_rdate} .= $v->{recur_str};
|
||||
# if we ever get memory tight, we can probably undef($v->{recur_str})
|
||||
}
|
||||
|
||||
foreach $v (@events) {
|
||||
# for recurrent events, skip those that arnt the "head"
|
||||
next if ($v->{is_recurrence} and (not $v->{recurlist}));
|
||||
|
||||
if (${$v->{sf}}[4] eq "*") { # no time was given
|
||||
$v->{i_dtstart} = sprintf("DTSTART:%s", $v->{dts});
|
||||
} else {
|
||||
if (defined($ical_tzid)) {
|
||||
if ($ical_tzid eq '') { # tz is defined but empty, so in GMT
|
||||
$v->{i_dtstart} = sprintf("DTSTART:%sZ", $v->{dts});
|
||||
} else { # tz is non-zero, so output the tz as well
|
||||
$v->{i_dtstart} = sprintf("DTSTART;TZID=%s:%s",
|
||||
$ical_tzid, $v->{dts});
|
||||
}
|
||||
} else { # undefined tz, just floating time
|
||||
$v->{i_dtstart} = sprintf("DTSTART:%s", $v->{dts});
|
||||
}
|
||||
}
|
||||
|
||||
if (${$v->{sf}}[3] ne "*") { # a duration was given
|
||||
# It's convenient that RFC2445 defines DURATION, thus we
|
||||
# don't need to calculate DTEND, with awkward figuring out
|
||||
# crossing hours, days, months, year, etc. Instead we
|
||||
# will let the iCalendar consuming application worry about it.
|
||||
$v->{i_duration} = sprintf("PT%dM", ${$v->{sf}}[3]);
|
||||
}
|
||||
}
|
||||
|
||||
# output header
|
||||
print "BEGIN:VCALENDAR\015\012"
|
||||
. "VERSION:2.0\015\012"
|
||||
. "PRODID:http://mark.atwood.name/code/rem2ics"
|
||||
. " $app_name $app_version\015\012";
|
||||
|
||||
# output each vevent
|
||||
foreach $v (@events) {
|
||||
# for recurrent events, only output the "head", skip the others
|
||||
next if ($v->{is_recurrence} and (not $v->{recurlist}));
|
||||
|
||||
print "BEGIN:VEVENT\015\012";
|
||||
my $tag = ${$v->{sf}}[2];
|
||||
# if $tag is not set, fake up a UID from start time, process id & input line count
|
||||
if ($tag eq "*" || !$options{usetag}) {
|
||||
$tag = sprintf("%x.%x.%x", $^T, $$, $v->{cnt});
|
||||
}
|
||||
# add rem2ics and hostname to UID
|
||||
print &lineify(sprintf("UID:rem2ics.%s@%s",
|
||||
$tag, $ical_uid_hostname));
|
||||
print &lineify("SUMMARY:" . "ify(${$v->{sf}}[5]));
|
||||
print &lineify($v->{i_dtstart});
|
||||
print &lineify("DURATION:" . $v->{i_duration})
|
||||
if ($v->{i_duration});
|
||||
print &lineify($v->{i_rdate})
|
||||
if ($v->{i_rdate});
|
||||
print &lineify("DTSTAMP:" . $ical_dtstamp);
|
||||
print &lineify("COMMENT: generated by $app_name $app_version\\n"
|
||||
. " http://mark.atwood.name/code/rem2ics\\n"
|
||||
. " data[" . $v->{cnt} . "]=|" . "ify($v->{src}) . "|");
|
||||
print "END:VEVENT\015\012";
|
||||
}
|
||||
|
||||
# output trailer
|
||||
print "END:VCALENDAR\015\012";
|
||||
|
||||
|
||||
# integer division, return both quotient and remainder
|
||||
sub idiv {
|
||||
my $n = shift; my $d = shift;
|
||||
my $r = $n; my $q = 0;
|
||||
while ($r >= $d) {
|
||||
$r = $r - $d;
|
||||
$q = $q + 1;
|
||||
}
|
||||
return ($q, $r);
|
||||
}
|
||||
|
||||
# todo, perl5 version that defines ()*, need to specify a requires up top
|
||||
sub lineify {
|
||||
return join("\015\012 ", unpack('(A72)*', shift)) . "\015\012";
|
||||
}
|
||||
|
||||
sub quotify {
|
||||
my $s = shift;
|
||||
return $s if $s =~ m/^(\w| )*$/;
|
||||
|
||||
$s =~ s/\\/\\\\/gso;
|
||||
$s =~ s/\n/\\n/gso;
|
||||
$s =~ s/\s/ /gso;
|
||||
$s =~ s/\"/\\"/gso;
|
||||
$s =~ s/\,/\\,/gso;
|
||||
$s =~ s/\:/\\:/gso;
|
||||
$s =~ s/\;/\\;/gso;
|
||||
|
||||
return $s;
|
||||
}
|
||||
|
||||
__END__
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
EOF
|
||||
50
contrib/rem2ics-0.93/rem2ics.spec
Normal file
50
contrib/rem2ics-0.93/rem2ics.spec
Normal file
@@ -0,0 +1,50 @@
|
||||
Name: rem2ics
|
||||
Version: 0.93
|
||||
Release: 1%{?dist}
|
||||
Summary: Converts the output of "remind -s" into RFC2445 iCalendar format
|
||||
|
||||
Group: Applications/Productivity
|
||||
License: GPLv2+
|
||||
URL: http://mark.atwood.name/code/rem2ics/
|
||||
Source0: http://mark.atwood.name/code/rem2ics/rem2ics-%{version}.tar.gz
|
||||
Source1: rem2ics-Makefile
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: perl
|
||||
|
||||
|
||||
%description
|
||||
rem2ics converts the output of "remind -s" into RFC2445 iCalendar format.
|
||||
You may want to install remind if you install this package.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -c
|
||||
cp -a %SOURCE1 Makefile
|
||||
|
||||
|
||||
%build
|
||||
make %{?_smp_mflags}
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
mkdir $RPM_BUILD_ROOT
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc
|
||||
%{_bindir}/rem2ics
|
||||
%{_mandir}/man1/rem2ics.1*
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Mar 25 2008 Till Maas <opensource till name> - 0.92-1
|
||||
- initial spec for Fedora
|
||||
13
contrib/remind-conf-mode/README
Normal file
13
contrib/remind-conf-mode/README
Normal file
@@ -0,0 +1,13 @@
|
||||
Remind-conf-mode is a configuration mode designed to make it a little easier to configure remind using emacs.
|
||||
|
||||
It offers a vibrant colour syntax highlighting for those who like lots of colour, simple indentation and some hopefully useful functions for entering times and dates. Those functions have been exposed in a special menu for remind for those who have not turned off the emacs menu system.
|
||||
|
||||
Just copy remind-conf-mode.el to your elisp folder (whatever it is called) make sure it is in your path so emacs know where to look for it, and put (require 'remind-conf-mode) in your dotemacs file.
|
||||
|
||||
There are some more complex instructions in the file itself.
|
||||
|
||||
Have fun and if you can think of any improvements let me know, or fork it to your own git repository and experiment away.
|
||||
|
||||
The faux-locale branch has code for choosing the language you use remind in. Please try it out and let me know if there are any problems with it.
|
||||
|
||||
Shelagh
|
||||
56
contrib/remind-conf-mode/ac-remind.el
Normal file
56
contrib/remind-conf-mode/ac-remind.el
Normal file
@@ -0,0 +1,56 @@
|
||||
;;; setup for remind autocompletion (totally optional)
|
||||
|
||||
;; put something like
|
||||
;; (add-hook 'remind-conf-mode '(load-library "ac-remind")) in your .emacs file.
|
||||
(require 'auto-complete)
|
||||
|
||||
(define-key ac-complete-mode-map "\r" nil)
|
||||
|
||||
(defvar ac-remind-keywords
|
||||
'((candidates
|
||||
. (lambda ()
|
||||
(all-completions ac-target remind-keywords ))))
|
||||
"Source for remind-conf completion keywords.")
|
||||
|
||||
(defvar ac-remind-time-words
|
||||
'((candidates
|
||||
. (lambda ()
|
||||
(all-completions ac-target remind-time-words))))
|
||||
"Source for remind-conf time words completions.")
|
||||
|
||||
(defvar ac-remind-builtin-variables
|
||||
'((candidates
|
||||
. (lambda ()
|
||||
(all-completions ac-target remind-builtin-variables))))
|
||||
"Source for remind-conf builtin variables.")
|
||||
|
||||
(defvar ac-remind-type-keywords
|
||||
'((candidates
|
||||
. (lambda ()
|
||||
(all-completions ac-target remind-type-keywords))))
|
||||
"Source for remind-conf type keywords.")
|
||||
|
||||
(defvar ac-remind-builtin-functions
|
||||
'((candidates
|
||||
. (lambda ()
|
||||
(all-completions ac-target remind-builtin-functions))))
|
||||
"Source for remind-conf completion builtin functions.")
|
||||
|
||||
(add-hook 'remind-conf-mode-hook
|
||||
(lambda () "Makes auto-completion work in remind-conf-mode"
|
||||
(make-local-variable 'ac-sources)
|
||||
(setq ac-sources '(ac-remind-keywords
|
||||
ac-remind-builtin-variables
|
||||
ac-remind-builtin-functions
|
||||
ac-remind-type-keywords
|
||||
ac-remind-time-words
|
||||
ac-source-abbrev))
|
||||
(auto-complete-mode 1)))
|
||||
|
||||
(provide 'ac-remind)
|
||||
;; (define-skeleton ac-look
|
||||
;; ""
|
||||
;; (skeleton-read "well? ")
|
||||
;; "(when (looking-at (regexp-opt remind-" str " 'words))" \n
|
||||
;; >"(setq ac-sources '(ac-remind-" str ")))"
|
||||
;; )
|
||||
674
contrib/remind-conf-mode/gpl.txt
Normal file
674
contrib/remind-conf-mode/gpl.txt
Normal file
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
529
contrib/remind-conf-mode/remind-conf-mode.el
Normal file
529
contrib/remind-conf-mode/remind-conf-mode.el
Normal file
@@ -0,0 +1,529 @@
|
||||
;;; remind-conf-mode.el --- A mode to help configure remind.
|
||||
|
||||
;; Copyright (C) 2008 - 2011 Shelagh Manton <shelagh.manton@gmail.com>
|
||||
|
||||
;; Author: Shelagh Manton <shelagh.manton@gmail.com> with help from
|
||||
;; Dianne Skoll
|
||||
;; Keywords: remind configure convenience
|
||||
;; Version: 0.15-dfs2
|
||||
|
||||
;; 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.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Use this mode to help with the configuration of remind configuration files.
|
||||
;; Put (require 'remind-conf-mode) in your .emacs file
|
||||
;; or (autoload 'remind-conf-mode "remind-conf-mode" "Mode to help with remind files" t)
|
||||
;; also put (add-to-list 'auto-mode-alist '("\\.rem\\'" . remind-conf-mode)) and
|
||||
;; (setq auto-mode-alist
|
||||
;; (cons '(".reminders$" . remind-conf-mode) auto-mode-alist))
|
||||
;; if you want to have the mode work automatically when you open a remind configuration file.
|
||||
|
||||
;; If you want to use the auto-complete stuff, you will need to download and install the
|
||||
;; auto-complete library from http://www.cx4a.org/pub/auto-complete.el and put
|
||||
;; (require 'auto-complete) in your Emacs with
|
||||
;; (add-hook 'remind-conf-mode-hook
|
||||
;; (lambda ()
|
||||
;; (make-local-variable 'ac-sources)
|
||||
;; (setq ac-sources '(ac-remind-conf ac-remind-builtin-variables ac-remind-builtin-functions))
|
||||
;; (auto-complete t)))
|
||||
;; in your .emacs file
|
||||
|
||||
;; PS. you could add ac-source-abbrev ac-source-words-in-buffer to have abbrevs and
|
||||
;; other words in buffer auto-complete too
|
||||
|
||||
;;; History:
|
||||
;;Thu, Nov 26, 2009
|
||||
;; sorted out why the rem-save-file was not working. fixed.
|
||||
;;
|
||||
;; Thu, Feb 14, 2008
|
||||
;; Based mode on wpld-mode tutorial and sample-mode on emacs wiki.
|
||||
;; Ideas from mupad.el for font-lock styles.
|
||||
;; Mon, Jan 26, 2008
|
||||
;; Added rem-setup-colors to make it easy for colourised remind output.
|
||||
;; Added a demo skeleton for people to copy for easy entry of coloured remind entries.
|
||||
;; tried to hook in the auto-complete library so that all known functions and keywords can be easily entered.
|
||||
;; EXPERIMENTAL, but seems to work well here (emacs cvs).
|
||||
;; Seems to work without case folding which is nice.
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
||||
(require 'font-lock); this goes in the define-derived-mode part.
|
||||
(when (featurep 'xemacs)
|
||||
(require 'overlay)) ;supposed to make it compatible with Xemacs.
|
||||
|
||||
|
||||
(defgroup remind-conf nil
|
||||
"Options for remind-conf-mode."
|
||||
:group 'remind-conf
|
||||
:prefix "remind-conf-")
|
||||
|
||||
|
||||
(defvar remind-conf-mode-hook nil
|
||||
"Hook to run in `remind-conf-mode'.")
|
||||
|
||||
;; keymap
|
||||
|
||||
(defvar remind-conf-mode-map
|
||||
(let ((remind-conf-mode-map (make-sparse-keymap)))
|
||||
remind-conf-mode-map)
|
||||
"Keymap for `remind-conf-mode'.")
|
||||
|
||||
(define-key remind-conf-mode-map "\C-c\C-r" 'rem-skel)
|
||||
(define-key remind-conf-mode-map "\C-c\C-t" 'rem-today)
|
||||
(define-key remind-conf-mode-map "\C-c\C-d" 'rem-today-skel)
|
||||
(define-key remind-conf-mode-map "\C-c\C-w" 'rem-week-away)
|
||||
(define-key remind-conf-mode-map "\C-c\C-W" 'rem-weeks-away)
|
||||
(define-key remind-conf-mode-map "\C-c\C-x" 'rem-tomorrow)
|
||||
(define-key remind-conf-mode-map "\C-c\C-a" 'rem-days-away)
|
||||
(define-key remind-conf-mode-map "\M-j" 'remind-indent-line)
|
||||
(define-key remind-conf-mode-map "\C-c\C-c" 'rem-save-file)
|
||||
|
||||
;; syntax-table
|
||||
|
||||
(defvar remind-conf-syntax-table
|
||||
(let ((remind-conf-syntax-table (make-syntax-table text-mode-syntax-table)))
|
||||
(modify-syntax-entry ?\; ". 1b" remind-conf-syntax-table)
|
||||
(modify-syntax-entry ?\# ". 1b" remind-conf-syntax-table)
|
||||
(modify-syntax-entry ?\n "> b" remind-conf-syntax-table)
|
||||
;Names with _ are still one word.
|
||||
(modify-syntax-entry ?_ "w" remind-conf-syntax-table)
|
||||
(modify-syntax-entry ?. "w" remind-conf-syntax-table)
|
||||
remind-conf-syntax-table)
|
||||
"Syntax table for `remind-conf-mode'.")
|
||||
|
||||
;;; keyword sets
|
||||
|
||||
(defconst remind-keywords
|
||||
(sort
|
||||
(list "ADDOMIT" "AFTER" "AT" "BANNER" "BEFORE"
|
||||
"CAL" "CLEAR-OMIT-CONTEXT" "DEBUG" "DO" "DUMPVARS"
|
||||
"DURATION" "ELSE" "ENDIF" "ERRMSG" "EXIT" "FIRST"
|
||||
"FLUSH" "FOURTH" "FROM" "FSET" "IF" "IFTRIG" "IN"
|
||||
"INCLUDE" "INCLUDECMD" "LAST" "LASTDAY"
|
||||
"LASTWORKDAY" "MAYBE-UNCOMPUTABLE" "MSF"
|
||||
"MSG" "OMIT" "OMITFUNC" "ONCE"
|
||||
"POP-OMIT-CONTEXT" "PRESERVE" "PRIORITY" "PS" "PSFILE"
|
||||
"PUSH-OMIT-CONTEXT" "REM" "RUN" "SATISFY" "SCANFROM"
|
||||
"SCHED" "SECOND" "SET" "SKIP" "SPECIAL"
|
||||
"TAG" "THIRD" "THROUGH" "UNSET" "UNTIL"
|
||||
"WARN")
|
||||
#'(lambda (a b) (> (length a) (length b)))))
|
||||
|
||||
|
||||
(defconst remind-type-keywords
|
||||
(sort
|
||||
(list "INT" "STRING" "TIME" "DATE" "SHADE" "DATETIME")
|
||||
#'(lambda (a b) (> (length a) (length b)))))
|
||||
|
||||
(defconst remind-builtin-variables
|
||||
(sort
|
||||
(list "$Ago" "$Am" "$And" "$April" "$At" "$August" "$CalcUTC" "$CalMode" "$Daemon" "$DateSep"
|
||||
"$DateTimeSep" "$December" "$DefaultColor" "$DefaultPrio"
|
||||
"$DefaultTDelta" "$DeltaOffset" "$DontFork" "$DontQueue"
|
||||
"$DontTrigAts" "$EndSent" "$EndSentIg" "$February" "$FirstIndent"
|
||||
"$FoldYear" "$FormWidth" "$Friday" "$Fromnow" "$Hour" "$Hplu" "$HushMode" "$IgnoreOnce"
|
||||
"$InfDelta" "$IntMax" "$IntMin" "$Is" "$January" "$July" "$June" "$LatDeg"
|
||||
"$Latitude" "$LatMin" "$LatSec" "$Location" "$LongDeg" "$Longitude"
|
||||
"$LongMin" "$LongSec" "$March" "$MaxSatIter" "$MaxStringLen" "$May"
|
||||
"$MinsFromUTC" "$Minute" "$Monday" "$Mplu" "$NextMode" "$November" "$Now" "$NumQueued"
|
||||
"$NumTrig" "$October" "$On" "$Pm" "$PrefixLineNo" "$PSCal" "$RunOff" "$Saturday"
|
||||
"$September" "$SimpleCal" "$SortByDate" "$SortByPrio" "$SortByTime"
|
||||
"$SubsIndent" "$Sunday" "$SysInclude" "$T" "$Td" "$Thursday" "$TimeSep" "$Tm"
|
||||
"$Today" "$Tomorrow" "$Tuesday" "$Tw" "$Ty" "$U" "$Ud" "$Um" "$UntimedFirst" "$Uw" "$Uy"
|
||||
"$Was" "$Wednesday")
|
||||
#'(lambda (a b) (> (length a) (length b)))))
|
||||
|
||||
|
||||
(defconst remind-time-words
|
||||
(sort
|
||||
(list "Jan" "January" "Feb" "Mar" "Apr" "Jun" "Jul" "Aug" "Sept" "Sep" "Oct" "Nov" "Dec"
|
||||
"February" "March" "April" "May" "June" "July" "August" "September" "October"
|
||||
"November" "December" "Mon" "Monday" "Tue" "Tues" "Tuesday" "Wed" "Wednesday"
|
||||
"Thu" "Thursday" "Thurs" "Fri" "Friday" "Saturday" "Sat" "Sun" "Sunday")
|
||||
#'(lambda (a b) (> (length a) (length b)))))
|
||||
|
||||
|
||||
(defconst remind-builtin-functions
|
||||
(sort
|
||||
(list "abs" "access" "adawn" "adusk" "ampm" "args" "asc" "baseyr" "char"
|
||||
"choose" "coerce" "current" "date" "datepart" "datetime" "dawn" "day"
|
||||
"daysinmon" "defined" "dosubst" "dusk" "easterdate" "evaltrig"
|
||||
"filedate" "filedatetime" "filedir" "filename" "getenv" "hebdate"
|
||||
"hebday" "hebmon" "hebyear" "hour" "iif" "index" "isany" "isdst"
|
||||
"isleap" "isomitted" "language" "lower" "max" "min" "minsfromutc"
|
||||
"minute" "mon" "monnum" "moondate" "moondatetime" "moonphase"
|
||||
"moontime" "ndawn" "ndusk" "nonomitted" "now" "ord" "ostype" "pad" "plural"
|
||||
"psmoon" "psshade" "realcurrent" "realnow" "realtoday" "sgn" "shell"
|
||||
"shellescape" "slide" "strlen" "substr" "sunrise" "sunset" "time"
|
||||
"timepart" "today" "trig" "trigback" "trigdate" "trigdatetime"
|
||||
"trigdelta" "trigduration" "trigeventduration" "trigeventstart"
|
||||
"trigfrom" "trigger" "trigpriority" "trigrep" "trigscanfrom"
|
||||
"trigtime" "trigtimedelta" "trigtimerep" "triguntil" "trigvalid"
|
||||
"typeof" "tzconvert" "upper" "value" "version" "weekno" "wkday"
|
||||
"wkdaynum" "year")
|
||||
#'(lambda (a b) (> (length a) (length b)))))
|
||||
|
||||
;;; faces
|
||||
;;example of setting up special faces for a mode.
|
||||
|
||||
(defvar remind-conf-command-face 'remind-conf-command-face
|
||||
"Remind commands.")
|
||||
(defface remind-conf-command-face
|
||||
'((t :foreground "SeaGreen4" :bold t))
|
||||
"Font Lock mode face used to highlight commands."
|
||||
:group 'remind-conf)
|
||||
|
||||
(defvar remind-conf-keyword-face 'remind-conf-keyword-face
|
||||
"Remind keywords.")
|
||||
(defface remind-conf-keyword-face
|
||||
'((t :foreground "blue violet"))
|
||||
"Font Lock mode face used to highlight keywords."
|
||||
:group 'remind-conf)
|
||||
|
||||
(defvar remind-conf-substitutes-face 'remind-conf-substitutes-face
|
||||
"Remind substitutes.")
|
||||
(defface remind-conf-substitutes-face
|
||||
'((t :foreground "blue2"))
|
||||
"Font Lock mode face used to highlight substitutes."
|
||||
:group 'remind-conf)
|
||||
|
||||
(defvar remind-conf-endline-face 'remind-conf-endline-face
|
||||
"Remind endline.")
|
||||
(defface remind-conf-endline-face
|
||||
'((t :foreground "goldenrod2" :bold t))
|
||||
"Font Lock mode face used to highlight commands."
|
||||
:group 'remind-conf)
|
||||
|
||||
(defvar remind-conf-variable-face 'remind-conf-variable-face
|
||||
"Remind variable.")
|
||||
(defface remind-conf-variable-face
|
||||
'((t :foreground "DeepPink2" :bold t))
|
||||
"Font Lock mode face used to highlight commands."
|
||||
:group 'remind-conf)
|
||||
|
||||
(defvar remind-conf-color-face 'remind-conf-color-face
|
||||
"Remind color variables.")
|
||||
(defface remind-conf-color-face
|
||||
'((t :foreground "gold" :bold t))
|
||||
"Font Lock mode face used to highlight color changes."
|
||||
:group 'remind-conf)
|
||||
|
||||
(defvar remind-conf-delta-face 'remind-conf-delta-face
|
||||
"Remind deltas.")
|
||||
(defface remind-conf-delta-face
|
||||
'((t :foreground "sandy brown" :bold t))
|
||||
"Font Lock mode face used to highlight deltas."
|
||||
:group 'remind-conf)
|
||||
|
||||
(defvar remind-comment-face 'remind-comment-face
|
||||
"Remind comments.")
|
||||
(defface remind-comment-face
|
||||
'((t :foreground "brown"))
|
||||
"Font-lock face for highlighting comments."
|
||||
:group 'remind-conf)
|
||||
|
||||
(defvar remind-string-face 'remind-string-face
|
||||
"Remind strings.")
|
||||
(defface remind-string-face
|
||||
'((t :foreground "tomato"))
|
||||
"Font lock mode face used to highlight strings."
|
||||
:group 'remind-conf)
|
||||
|
||||
(defvar remind-time-face 'remind-time-face
|
||||
"Remind time words.")
|
||||
(defface remind-time-face
|
||||
'((t :foreground "LightSeaGreen" :bold t))
|
||||
"Font lock mode face to highlight time phrases."
|
||||
:group 'remind-conf)
|
||||
|
||||
(defvar remind-conf-type-face 'remind-conf-type-face
|
||||
"Remind type keywords.")
|
||||
(defface remind-conf-type-face
|
||||
'((t :foreground "orange" :bold t))
|
||||
"Font lock mode face to highlight type keywords."
|
||||
:group 'remind-conf)
|
||||
|
||||
(defcustom rem-post-save-function ""
|
||||
"Name of shell function that can be run when you save and close a remind file."
|
||||
:type 'string
|
||||
:group 'remind-conf
|
||||
)
|
||||
|
||||
(defconst remind-keywords-regex (regexp-opt remind-keywords 'words))
|
||||
(defconst remind-type-keywords-regex (regexp-opt remind-type-keywords 'words))
|
||||
(defconst remind-builtin-variables-regex (regexp-opt remind-builtin-variables 'words))
|
||||
(defconst remind-builtin-functions-regex (regexp-opt remind-builtin-functions 'words))
|
||||
(defconst remind-time-words-regex (regexp-opt remind-time-words 'words))
|
||||
|
||||
;; Case-insensitive matching functions
|
||||
(defun remind-keywords-matcher (limit)
|
||||
(let ((case-fold-search t))
|
||||
(re-search-forward remind-keywords-regex limit 'no-error)))
|
||||
(defun remind-type-keywords-matcher (limit)
|
||||
(let ((case-fold-search t))
|
||||
(re-search-forward remind-type-keywords-regex limit 'no-error)))
|
||||
(defun remind-builtin-variables-matcher (limit)
|
||||
(let ((case-fold-search t))
|
||||
(re-search-forward remind-builtin-variables-regex limit 'no-error)))
|
||||
(defun remind-builtin-functions-matcher (limit)
|
||||
(let ((case-fold-search t))
|
||||
(re-search-forward remind-builtin-functions-regex limit 'no-error)))
|
||||
(defun remind-time-words-matcher (limit)
|
||||
(let ((case-fold-search t))
|
||||
(re-search-forward remind-time-words-regex limit 'no-error)))
|
||||
|
||||
;; keywords
|
||||
|
||||
(defconst remind-conf-font-lock-keywords-1
|
||||
(list
|
||||
'("^[\;\#]\\s-+.*$" . remind-comment-face)
|
||||
'(remind-keywords-matcher . remind-conf-keyword-face)
|
||||
'("%[\"_]" . font-lock-warning-face)
|
||||
'("\\(%[a-mops-w]\\)" . remind-conf-substitutes-face)
|
||||
'("\"[^\"]*\"" . remind-string-face))
|
||||
"Minimal font-locking for `remind-conf-mode'.")
|
||||
|
||||
(defconst remind-conf-font-lock-keywords-2
|
||||
(append remind-conf-font-lock-keywords-1
|
||||
(list
|
||||
'(remind-time-words-matcher . remind-time-face)
|
||||
'(remind-builtin-functions-matcher . remind-conf-command-face)
|
||||
'("%$" . remind-conf-endline-face)))
|
||||
"Additional commands to highlight in `remind-conf-mode'.")
|
||||
|
||||
(defconst remind-conf-font-lock-keywords-3
|
||||
(append remind-conf-font-lock-keywords-2
|
||||
(list
|
||||
'(remind-type-keywords-matcher . remind-conf-type-face)
|
||||
'("\[[a-zA-Z]\\{3,6\\}\]" . remind-conf-color-face)
|
||||
'("\\s-+\\([12][0-9]\\|3[01]\\|0?[0-9]\\)\\s-+" . remind-conf-substitutes-face);better date regexp
|
||||
'("\\s-+\\([12][09][0-9][0-9][-/]\\(0[1-9]\\|1[0-2]\\)[-/]\\([12][0-9]\\|0[1-9]\\|3[01]\\)\\)\\s-+" . remind-time-face) ;; pseudo ISO 8601 date format.
|
||||
'("\\s-+\\([12][09][0-9][0-9][-/]\\(0[1-9]\\|1[0-2]\\)[-/]\\([12][0-9]\\|0[1-9]\\|3[01]\\)\\)@\\(2[0-4]\\|[01]?[0-9][.:][0-5][0-9]\\)\\s-+" . remind-time-face) ;;extended pseudo ISO time format
|
||||
'("\\s-+\\(\\(?:20\\|19\\)[0-9][0-9]\\)\\s-+" . remind-conf-substitutes-face);years
|
||||
'("\\s-+\\(2[0-4]\\|[01]?[0-9][.:][0-5][0-9]\\)\\s-+" . remind-conf-substitutes-face);24hour clock, more precise
|
||||
'("\\s-+\\([+-][+-]?[1-9][0-9]*\\)\\s-+" 1 remind-conf-delta-face prepend)
|
||||
'(remind-builtin-variables-matcher . remind-conf-variable-face)))
|
||||
"The ultimate in highlighting experiences for `remind-conf-mode'.")
|
||||
|
||||
;;YYYY-MM-DD@hh:mm, YYYY-MM-DD@hh.mm, YYYY/MM/DD@hh:mm and YYYY/MM/DD@hh.mm
|
||||
|
||||
(defcustom remind-conf-font-lock-keywords 'remind-conf-font-lock-keywords-3
|
||||
"Font-lock highlighting level for `remind-conf-mode'."
|
||||
:group 'remind-conf
|
||||
:type '(choice (const :tag "Barest minimum of highlighting." remind-conf-font-lock-keywords-1)
|
||||
(const :tag "Medium highlighting." remind-conf-font-lock-keywords-2)
|
||||
(const :tag "Fruit salad." remind-conf-font-lock-keywords-3)))
|
||||
|
||||
;;; Indentation (I'm sure this could be made more simple. But at least it works.)
|
||||
|
||||
(defcustom remind-indent-level 4
|
||||
"User definable indentation."
|
||||
:group 'remind-conf
|
||||
:type '(integer)
|
||||
)
|
||||
|
||||
(defun remind-indent-line ()
|
||||
"Indent current line for remind configuration files."
|
||||
(interactive)
|
||||
(forward-line 0) ;remember this happens on every line as it is done per line basis
|
||||
(if (bobp)
|
||||
(indent-line-to 0)
|
||||
(let ((not-indented t) cur-indent)
|
||||
(if (looking-at "^[ \t]*\\<\\(ENDIF\\|POP\\(?:-OMIT-CONTEXT\\)?\\)\\>")
|
||||
(progn
|
||||
(save-excursion
|
||||
(forward-line -1)
|
||||
(setq cur-indent (- (current-indentation) remind-indent-level))) ;note that not-indented is still t
|
||||
(if (< cur-indent 0) (setq cur-indent 0)))
|
||||
(save-excursion
|
||||
(while not-indented
|
||||
(forward-line -1)
|
||||
(if (looking-at "^[ \t]*\\<\\(ENDIF\\|POP\\(?:-OMIT-CONTEXT\\)?\\)\\>")
|
||||
(progn
|
||||
(setq cur-indent 0)
|
||||
(delete-horizontal-space) ;don't know why I need this when other similar indent functions don't.
|
||||
(setq not-indented nil))
|
||||
(if (looking-at "\\<\\(IF\\(?:TRIG\\)?\\|PUSH\\(?:-OMIT-CONTEXT\\)?\\)\\>")
|
||||
(progn
|
||||
(setq cur-indent remind-indent-level)
|
||||
(setq not-indented nil))
|
||||
(if (bobp)
|
||||
(setq not-indented nil))))))
|
||||
(if cur-indent
|
||||
(indent-line-to cur-indent)
|
||||
(indent-line-to 0))))))
|
||||
|
||||
;;; Convenience functions
|
||||
|
||||
(define-skeleton rem-skel
|
||||
"Skeleton to insert a rem line in a remind configuration file.
|
||||
|
||||
If you don't want an optional feature just RET and move on."
|
||||
nil
|
||||
'(setq v1 (skeleton-read "How many days in future?: "))
|
||||
"REM " (rem-days-away (string-to-number v1))
|
||||
("Optional: How many days warning? " " +" str )
|
||||
resume:
|
||||
("Optional: At what time? Format eg 13:00. " " AT " str)
|
||||
resume:
|
||||
("Optional: How many minutes warning? " " +" str )
|
||||
resume:
|
||||
("Optional: At what priority? eg 0-9999" " PRIORITY " str )
|
||||
resume:
|
||||
" MSG %\"" (skeleton-read "Your message? " )"%b%\"%" \n
|
||||
)
|
||||
|
||||
(define-skeleton rem-today-skel
|
||||
"Skeleton to insert a line for today's date."
|
||||
nil
|
||||
"REM " (format-time-string "%d %b %Y")
|
||||
("Optional: At what time? Format eg 13:20. " " AT " str)
|
||||
resume:
|
||||
("Optional: How many minutes warning? " " +" str )
|
||||
resume:
|
||||
("Optional: At what priority? eg 0-9999" " PRIORITY " str )
|
||||
resume:
|
||||
" MSG " (skeleton-read "Your message? " )"%b.%" \n
|
||||
)
|
||||
|
||||
(defun rem-today ()
|
||||
"Insert the date for today in a remind friendly style."
|
||||
(interactive)
|
||||
(insert (format-time-string "%e %b %Y")))
|
||||
|
||||
(defun rem-tomorrow ()
|
||||
"Insert tomorrow's date in a remind friendly style."
|
||||
(interactive)
|
||||
(insert (format-time-string "%e %b %Y" (time-add (current-time) (days-to-time 1)))))
|
||||
|
||||
(defun rem-days-away (arg)
|
||||
"Insert a day ARG number of days in the future."
|
||||
(interactive "nHow many Days?: ")
|
||||
(insert (format-time-string "%e %b %Y" (time-add (current-time) (days-to-time arg)))))
|
||||
|
||||
(defun rem-week-away ()
|
||||
"Insert a day 7 days in the future."
|
||||
(interactive)
|
||||
(insert (format-time-string "%e %b %Y" (time-add (current-time) (days-to-time 7)))))
|
||||
|
||||
(defun rem-weeks-away (arg)
|
||||
"Insert a day ARG many weeks in future."
|
||||
(interactive "nHow many weeks?: ")
|
||||
(insert (format-time-string "%e %b %Y" (time-add (current-time) (days-to-time (* 7 arg))))))
|
||||
|
||||
(defun rem-save-file ()
|
||||
"Save the file and start the shell function in one go.
|
||||
|
||||
This function will close the window after running. It needs the
|
||||
variable `rem-post-save-function' to be set. It will be most
|
||||
useful to people who have some sort of function they run to use
|
||||
remind data ie producing calendars."
|
||||
(interactive)
|
||||
(if (boundp 'rem-post-save-function)
|
||||
(progn (save-buffer)
|
||||
(shell-command rem-post-save-function)
|
||||
(kill-buffer-and-window))
|
||||
(error "`rem-post-save-function' variable is not set")))
|
||||
|
||||
(defun rem-setup-colors ()
|
||||
"Insert set of variables for coloured output in remind messages.
|
||||
|
||||
You would only need to do this once in your main reminders file."
|
||||
(interactive)
|
||||
(find-file (expand-file-name "~/.reminders"))
|
||||
(goto-char 0) ;we do want it somewhere near the top of the file.
|
||||
(save-excursion
|
||||
(re-search-forward "\n\n"); squeeze it in where you have a free line.
|
||||
(insert "\nSET Esc CHAR(27)
|
||||
SET Nrm Esc + \"[0m\"
|
||||
SET Blk Esc + \"[0;30m\"
|
||||
SET Red Esc + \"[0;31m\"
|
||||
SET Grn Esc + \"[0;32m\"
|
||||
SET Ylw Esc + \"[0;33m\"
|
||||
SET Blu Esc + \"[0;34m\"
|
||||
SET Mag Esc + \"[0;35m\"
|
||||
SET Cyn Esc + \"[0;36m\"
|
||||
SET Wht Esc + \"[0;37m\"
|
||||
SET Gry Esc + \"[30;1m\"
|
||||
SET BrRed Esc + \"[31;1m\"
|
||||
SET BrGrn Esc + \"[32;1m\"
|
||||
SET BrYlw Esc + \"[33;1m\"
|
||||
SET BrBlu Esc + \"[34;1m\"
|
||||
SET BrMag Esc + \"[35;1m\"
|
||||
SET BrCyn Esc + \"[36;1m\"
|
||||
SET BrWht Esc + \"[37;1m\" \n \n")))
|
||||
|
||||
;; So now you can do things like:
|
||||
|
||||
(define-skeleton rem-birthday
|
||||
"Make birthdays magenta.
|
||||
Acts on the region or places point where it needs to be."
|
||||
nil
|
||||
"[Mag]" _ " [Nrm]")
|
||||
|
||||
(define-skeleton rem-urgent
|
||||
"Colour urgent notices red.
|
||||
Acts on the region or places point where it needs to be."
|
||||
nil
|
||||
"[Red]" _ " [Nrm]")
|
||||
|
||||
;; menu anyone?
|
||||
|
||||
(easy-menu-define remind-menu
|
||||
remind-conf-mode-map
|
||||
"Menu used in remind-conf-mode."
|
||||
(append '("Remind")
|
||||
'([ "Insert a reminder" rem-skel t])
|
||||
'([ "Insert todays date" rem-today t])
|
||||
'([ "Insert tomorrows date" rem-tomorrow t])
|
||||
'([ "How many days away?" rem-days-away t])
|
||||
'([ "A week away" rem-week-away t])
|
||||
'([ "How many weeks away?" rem-weeks-away t])
|
||||
'([ "Birthday color" rem-birthday t])
|
||||
'([ "Urgent color" rem-urgent t])
|
||||
'([ "Save the file and run a script" rem-save-file t])
|
||||
'("-----")
|
||||
'([ "Setting up the colors - once-off" rem-setup-colors t])
|
||||
))
|
||||
|
||||
|
||||
;; finally the derived mode.
|
||||
|
||||
;;;###autoload
|
||||
(define-derived-mode remind-conf-mode text-mode "Remind Conf Mode"
|
||||
"Major mode for editing remind calendar configuration files.
|
||||
|
||||
\\{remind-conf-mode-map}"
|
||||
:syntax-table remind-conf-syntax-table
|
||||
(set (make-local-variable 'font-lock-defaults) '(remind-conf-font-lock-keywords))
|
||||
(set (make-local-variable 'comment-start) ";")
|
||||
(set (make-local-variable 'comment-start) "#")
|
||||
(set (make-local-variable 'comment-end) "\n")
|
||||
(set (make-local-variable 'comment-end-skip) "[ \t]*\\(\\s>\\||#\\)")
|
||||
(set (make-local-variable 'skeleton-end-hook) nil) ; so the skeletons will not automatically go to a new line.
|
||||
(set (make-local-variable 'fill-column) '100);cause I was having problems with autofill.
|
||||
(set (make-local-variable 'indent-line-function) 'remind-indent-line)
|
||||
(use-local-map remind-conf-mode-map)
|
||||
)
|
||||
|
||||
|
||||
(provide 'remind-conf-mode)
|
||||
;;; remind-conf-mode.el ends here
|
||||
|
||||
;;; work out how to make the syntax highlighting work only before the
|
||||
;;; (MSG|MSF) keywords and not after.
|
||||
629
defs.rem
629
defs.rem
@@ -1,629 +0,0 @@
|
||||
#############################################################################
|
||||
# #
|
||||
# DEFS.REM #
|
||||
# #
|
||||
# This file is a reminder script, which contains a few handy definitions. #
|
||||
# Cut and paste as desired! Also, near the end, there are a bunch of #
|
||||
# holiday definitions for the U.S. #
|
||||
# #
|
||||
# Some examples provided by George M. Sipe <gsipe@pyratl.ga.pyramid.com> #
|
||||
# #
|
||||
# U.S. holidays provided by Dave Rickel <drickel@sjc.mentorg.com> #
|
||||
# #
|
||||
# Use your text editor to search for: #
|
||||
# "#USHOLS" for U.S. holidays #
|
||||
# "#JHOLS" for Jewish holidays #
|
||||
# "#PSSTUFF" for nifty PostScript examples #
|
||||
# "#COLORS" for examples of ANSI color escape sequences. #
|
||||
# #
|
||||
# This file is part of REMIND. #
|
||||
# Copyright (C) 1992-1996 by David F. Skoll #
|
||||
# #
|
||||
#############################################################################
|
||||
|
||||
#
|
||||
# $Id: defs.rem,v 1.1 1996-03-27 03:25:51 dfs Exp $
|
||||
#
|
||||
|
||||
RUN OFF
|
||||
|
||||
################################################
|
||||
# Ensure required version of remind is used... #
|
||||
################################################
|
||||
IF version() < "03.00.10"
|
||||
ERRMSG This file requires at least version 03.00.10 of Remind.%
|
||||
ERRMSG This version is version [version()].
|
||||
EXIT
|
||||
ENDIF
|
||||
|
||||
######################################
|
||||
# Symbolic constants for weekdays... #
|
||||
######################################
|
||||
SET Sunday 0
|
||||
SET Monday 1
|
||||
SET Tuesday 2
|
||||
SET Wednesday 3
|
||||
SET Thursday 4
|
||||
SET Friday 5
|
||||
SET Saturday 6
|
||||
|
||||
SET Sun 0
|
||||
SET Mon 1
|
||||
SET Tue 2
|
||||
SET Wed 3
|
||||
SET Thu 4
|
||||
SET Fri 5
|
||||
SET Sat 6
|
||||
|
||||
#########################################
|
||||
# Symbolic constants for month names... #
|
||||
#########################################
|
||||
|
||||
SET Jan 1
|
||||
SET Feb 2
|
||||
SET Mar 3
|
||||
SET Apr 4
|
||||
SET May 5
|
||||
SET Jun 6
|
||||
SET Jul 7
|
||||
SET Aug 8
|
||||
SET Sep 9
|
||||
SET Oct 10
|
||||
SET Nov 11
|
||||
SET Dec 12
|
||||
|
||||
SET January 1
|
||||
SET February 2
|
||||
SET March 3
|
||||
SET April 4
|
||||
SET May 5
|
||||
SET June 6
|
||||
SET July 7
|
||||
SET August 8
|
||||
SET September 9
|
||||
SET October 10
|
||||
SET November 11
|
||||
SET December 12
|
||||
|
||||
###########################################################
|
||||
# Other symbolic constants and functions for "pasting"... #
|
||||
###########################################################
|
||||
|
||||
SET Quote CHAR(34)
|
||||
|
||||
# Handy constants/function for specifing week of month...
|
||||
SET Week_1 1
|
||||
SET Week_2 8
|
||||
SET Week_3 15
|
||||
SET Week_4 22
|
||||
FSET _last(mo) "1 " + MON((mo%12)+1)+" --7"
|
||||
|
||||
# Shorthand for commonly used expression...
|
||||
FSET _trig() TRIGGER(TRIGDATE())
|
||||
|
||||
# Handy function to provide SCANFROM dates...
|
||||
FSET _back(days) TRIGGER(TODAY()-days)
|
||||
|
||||
###########################################################
|
||||
# On MS-DOS systems, the standard C library functions are #
|
||||
# not reliable for computing offsets from local time to #
|
||||
# UTC. The following provides a work-around for the #
|
||||
# sunrise() and sunset() functions. Note, however, that #
|
||||
# if Daylight Savings Time is in effect for today(), the #
|
||||
# sun functions return times in DST even for dates on #
|
||||
# which DST is not in effect; the converse can also occur.#
|
||||
# #
|
||||
# Change the timezone to your timezone - the default is #
|
||||
# for EST which is 5 hours (300 minutes) behind UTC. #
|
||||
# The code is correct for places in which Daylight Savings#
|
||||
# Time begins on the last Sunday in April and ends on the #
|
||||
# last Sunday in October. #
|
||||
###########################################################
|
||||
|
||||
IF OSTYPE() == "MSDOS"
|
||||
# Eastern Standard Time
|
||||
SET TimeZone -300
|
||||
|
||||
# Use --8 rather than --7 because we want the last day BEFORE
|
||||
# the time switch occurs.
|
||||
REM Sun 1 May --8 SATISFY 1
|
||||
SET BegDst TRIGDATE()
|
||||
|
||||
REM Sun 1 Nov --8 SATISFY 1
|
||||
SET EndDst TRIGDATE()
|
||||
|
||||
SET $CalcUTC 0
|
||||
|
||||
# Check out the following IF statement and figure out why it works!
|
||||
IF EndDst < BegDst
|
||||
# Daylight Savings Time
|
||||
SET $MinsFromUTC TimeZone+60
|
||||
ELSE
|
||||
# Standard Time
|
||||
SET $MinsFromUTC TimeZone
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
###########################################################
|
||||
# Function which returns a string in "am/pm" format based #
|
||||
# on the time. For example, set a am_pm(NOW())... #
|
||||
###########################################################
|
||||
|
||||
FSET _am_pm(tm) IIF(tm<01:00, tm+12*60+"am", \
|
||||
tm<12:00, tm+"am", \
|
||||
tm<13:00, tm+"pm", \
|
||||
tm-12*60+"pm")
|
||||
|
||||
#################################################################
|
||||
# Function which removes a single leading zero from a string... #
|
||||
#################################################################
|
||||
|
||||
FSET _no_lz(s) IIF(SUBSTR(s, 1, 1)=="0", SUBSTR(s, 2), s)
|
||||
|
||||
############################################################
|
||||
# Function to calculate number of years since a given year #
|
||||
# or number of months since a given month and year... #
|
||||
############################################################
|
||||
|
||||
FSET _yr_num(yr) ORD(YEAR(TRIGDATE()) - yr)
|
||||
FSET _mo_num(mo, yr) ORD(12 * (YEAR(TRIGDATE()) - yr) + \
|
||||
MONNUM(TRIGDATE()) - mo)
|
||||
|
||||
# Here's an example of how to use them:
|
||||
REM 1 Nov ++12 MSG %"Dean's [_yr_num(1984)] birthday%" is %b.
|
||||
REM 1 MSG Dean's [_mo_num(11, 1984)] 'monthly' anniversary
|
||||
|
||||
###########################################################
|
||||
# Function to send mail via elm's "fastmail" (by GMS!)... #
|
||||
###########################################################
|
||||
|
||||
#FSET _mail(from, subj) "mailx -s " + \
|
||||
# Quote + from + " : " + subj + Quote \
|
||||
# GETENV("LOGNAME") + " < /dev/null 1>&0"
|
||||
FSET _mail(from, subj) "fastmail -f " + \
|
||||
Quote + from + Quote + \
|
||||
" -s " + Quote + subj + Quote + \
|
||||
" /dev/null " + GETENV("LOGNAME")
|
||||
|
||||
#############################################################################
|
||||
# Here's a tricky problem: The 4th of July is a holiday in the U.S.
|
||||
# However, if it falls on a Saturday, the previous Friday is a holiday.
|
||||
# If it falls on a Sunday, the next Monday is a holiday. Here's how
|
||||
# to do it. NOTE that the following procedure makes the OMIT context
|
||||
# dependent upon the current date. SInce it only depends on the current
|
||||
# year, which is not likely to change while producing a calendar, we
|
||||
# are fairly safe. However, reminders with huge DELTA or BACK components
|
||||
# may not operate as expected. In general, any time you make OMIT
|
||||
# dependent upon the current date, it's tricky and results may not be
|
||||
# what you expect. You should try to make sure that the OMIT context
|
||||
# "near" any current reminders will not change during a calendar run.
|
||||
# The SCANFROM clause should help make these OMITs very safe.
|
||||
############################################################################
|
||||
|
||||
# Calculate the weekday of the holiday.
|
||||
REM 4 July SCANFROM [_back(7)] SATISFY 1
|
||||
|
||||
IF WKDAYNUM(TRIGDATE()) == Sat
|
||||
REM [TRIGGER(TRIGDATE())] MSG Independence day (actual)
|
||||
OMIT [TRIGGER(TRIGDATE()-1)] MSG Independence day (observed)
|
||||
ELSE
|
||||
IF WKDAYNUM(TRIGDATE()) == Sun
|
||||
REM [TRIGGER(TRIGDATE())] MSG Independence day (actual)
|
||||
OMIT [TRIGGER(TRIGDATE()+1)] MSG Independence day (observed)
|
||||
ELSE
|
||||
OMIT [TRIGGER(TRIGDATE())] MSG Independence day
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
############################################################################
|
||||
# #
|
||||
# A meeting on the first Monday of every month which is moved to the #
|
||||
# second Monday in the event of a holiday. #
|
||||
# #
|
||||
############################################################################
|
||||
|
||||
# First, the normal meeting. However, the SKIP keyword means this
|
||||
# one won't be triggered if the first Monday is a holiday
|
||||
REM Mon 1 SKIP MSG Meeting
|
||||
|
||||
# Now, calculate the "potential" delayed meeting
|
||||
REM Mon 8 SATISFY 1
|
||||
|
||||
# But only actually trigger the delayed meeting if the previous
|
||||
# Monday was a holiday
|
||||
IF ISOMITTED(TRIGDATE()-7)
|
||||
REM [TRIGGER(TRIGDATE())] MSG Delayed meeting
|
||||
ENDIF
|
||||
|
||||
############################################################################
|
||||
# #
|
||||
# A very complicated reminder sent in by a Remind user. #
|
||||
# This person gets paid every two weeks, starting from 8 January 1993. #
|
||||
# If a pay date occurs before the twelfth of a month, then that #
|
||||
# he pays his mortgage on that pay date. Otherwise, he pays the mortgage #
|
||||
# on the previous pay date. Furthermore, he has to schedule his #
|
||||
# mortgage payment six days before it is due. He wants to be reminded #
|
||||
# a further four days before the scheduling deadline. He also #
|
||||
# wants to be mailed a notice two weeks before the scheduling deadline. #
|
||||
# #
|
||||
# Here's the solution - if you can follow this, consider yourself a #
|
||||
# Remind programmer extraordinaire! #
|
||||
# #
|
||||
############################################################################
|
||||
|
||||
# A function to determine whether or not a pay-date is a mortgage-date.
|
||||
|
||||
FSET _IsMortDate(x) DAY(x) < 12 || (DAY(x+14) >= 12 && DAY(x+14) <= 14)
|
||||
|
||||
# Paydays - for reference
|
||||
|
||||
REM 8 Jan 1993 *14 MSG Payday
|
||||
|
||||
# Calculate the mortgage payment six days ahead of time. Note that this
|
||||
# is done "implicitly" by subtracting 6 from the starting date - we start
|
||||
# on 2 Jan rather than 8 Jan. We add 6 to TRIGDATE() in _IsMortDate to
|
||||
# compensate.
|
||||
|
||||
REM 2 Jan 1993 *14 ++4 SATISFY [_IsMortDate(TRIGDATE()+6)] \
|
||||
MSG %"Schedule mortgage payment%" for %a.
|
||||
|
||||
# Now the mail reminder two weeks before the payment date - because two
|
||||
# weeks before a payment date is also a payment date, no pre-compensation
|
||||
# in the starting date of 8 Jan is necessary - convince yourself of this!
|
||||
# This uses the _mail() function defined earlier.
|
||||
|
||||
REM ONCE 8 Jan 1993 *14 SATISFY [_IsMortDate(TRIGDATE()+14)] \
|
||||
RUN [_mail("Decatur Federal", \
|
||||
"Pay mortgage by the " + ORD(DAY(TRIGDATE()+14)))]
|
||||
|
||||
# Make an entry on the calendar when the mortgage should be paid
|
||||
|
||||
REM 8 Jan 1993 *14 SATISFY [_IsMortDate(TRIGDATE())] \
|
||||
CAL Mortgage payment
|
||||
|
||||
##########################################################################
|
||||
# #
|
||||
# On our UNIX system, I run a program which queries the university #
|
||||
# library and creates a file called ".booksdue". This file is #
|
||||
# a REMIND script to tell me when my library books are due. Here's #
|
||||
# an example from my reminder file - it shows the use of filedate(). #
|
||||
# When the .booksdue file is at least 7 days old, I create a new version #
|
||||
# by querying the library computer. Note the use of realtoday() rather #
|
||||
# than today. #
|
||||
# #
|
||||
##########################################################################
|
||||
|
||||
IF !$RunOff && !$CalMode && !$SimpleCal
|
||||
IF REALTODAY()-FILEDATE("/home/dfs/.booksdue") >= 7
|
||||
REM RUN /home/dfs/bilge/library/getbooks
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
#PSSTUFF
|
||||
##########################################################################
|
||||
# #
|
||||
# This portion of the file contains some cute examples of the new #
|
||||
# PS-type reminders. You need a PostScript printer or viewer to #
|
||||
# appreciate these. To use them, pipe the output of remind -p into the #
|
||||
# rem2ps program. #
|
||||
# #
|
||||
##########################################################################
|
||||
|
||||
# Convenient to stick all the PostScript code in a string var - makes
|
||||
# reminders easier to understand and faster. The variable "shade" will
|
||||
# contain PostScript code to shade in a particular box on the calendar.
|
||||
SET shade psshade(95)
|
||||
|
||||
# The following reminder will shade the Saturday and Sunday calendar
|
||||
# entries.
|
||||
REM Sat Sun PS [shade]
|
||||
|
||||
# The following will fill in the Hebrew dates on the calendar. For this
|
||||
# example, I recommend that you use the -sd 10 option for Rem2PS.
|
||||
REM PS Border Border moveto \
|
||||
/DayFont findfont DaySize scalefont setfont \
|
||||
([hebday(today())] [hebmon(today())]) show
|
||||
|
||||
# Fill in the phases of the moon on the PostScript calendar
|
||||
[trigger(moondate(0))] PS [psmoon(0)]
|
||||
[trigger(moondate(1))] PS [psmoon(1)]
|
||||
[trigger(moondate(2))] PS [psmoon(2)]
|
||||
[trigger(moondate(3))] PS [psmoon(3)]
|
||||
|
||||
# The following example puts sunrise and sunset times in PostScript in the
|
||||
# calendar - the sizes are hard-coded, however, and work best in landscape.
|
||||
REM PS Border Border 5 sub moveto \
|
||||
/SmallFont findfont 4 scalefont setfont \
|
||||
(Sunrise: [sunrise(trigdate())] Sunset: [sunset(trigdate())]) show
|
||||
|
||||
# The next one puts the day number (1-366) and days left in the year at the
|
||||
# bottom of the post-script calendar. Again, the hard-coded sizes work best
|
||||
# in landscape.
|
||||
FSET _DayOfYear(x) x-(date(year(x),1,1) - 1)
|
||||
REM PS BoxWidth 3 mul 4 div Border 5 sub moveto \
|
||||
/SmallFont findfont 4 scalefont setfont \
|
||||
([_DayOfYear(today())]([365+isleap(today())-_DayOfYear(today())])) show
|
||||
|
||||
#USHOLS
|
||||
#############################################################################
|
||||
# #
|
||||
# The following holidays were provided by Dave Rickel #
|
||||
# Modified by D. Skoll to give safe OMITs for moveable holidays #
|
||||
# #
|
||||
#############################################################################
|
||||
|
||||
SET SaveTrig $NumTrig
|
||||
SET easter EASTERDATE(YEAR(TODAY()))
|
||||
REM [TRIGGER(easter-46)] MSG %"Ash Wednesday%"
|
||||
REM [TRIGGER(easter-7)] MSG %"Palm Sunday%"
|
||||
OMIT [TRIGGER(easter-2)] MSG %"Good Friday%"
|
||||
OMIT [TRIGGER(easter)] MSG %"Easter%" Sunday
|
||||
REM [TRIGGER(easter+39)] MSG %"Ascension Day%"
|
||||
REM [TRIGGER(easter+49)] MSG %"Pentecost%"
|
||||
|
||||
# Some holidays are omitted, some are not. You may want to change
|
||||
# which ones are omitted - use the general forms shown below.
|
||||
# You'll need the _back() function and the Week_n variables defined
|
||||
# way up in the file.
|
||||
|
||||
OMIT Jan 1 MSG %"New Year's%" Day
|
||||
REM Mon Jan [Week_3] MSG Martin Luther King - %"MLK Day%"
|
||||
REM Feb 2 MSG %"Ground Hog Day%"
|
||||
REM Feb 14 MSG %"Valentine's%" Day
|
||||
REM Mon Feb [Week_3] SCANFROM [_back(7)] SATISFY 1
|
||||
OMIT [_trig()] MSG %"President's Day%"
|
||||
REM Mar 17 MSG %"St. Patrick's%" Day
|
||||
REM Sun Apr 1 ++2 MSG Daylight Savings Time - %"DST starts%" %b
|
||||
REM Apr 1 MSG %"April Fool's%" Day
|
||||
REM Mon Tue Wed Thu Fri Sat 15 Apr MSG %"Income tax%" due
|
||||
REM May 5 MSG %"Cinco de Mayo%"
|
||||
REM Sat May [Week_1] MSG %"Kentucky Derby%"
|
||||
REM Sun May [Week_2] MSG %"Mother's Day%"
|
||||
REM Sat May [Week_3] MSG %"Armed Forces Day%"
|
||||
REM Mon [_last(May)] SCANFROM [_back(7)] SATISFY 1
|
||||
OMIT [_trig()] MSG %"Memorial Day%"
|
||||
REM Jun 14 MSG %"Flag Day%"
|
||||
REM Sun Jun [Week_3] MSG %"Father's Day%"
|
||||
REM Mon Sep [Week_1] SCANFROM [_back(7)] SATISFY 1
|
||||
OMIT [_trig()] MSG %"Labor Day%"
|
||||
REM Mon Oct [Week_2] MSG %"Columbus Day%"
|
||||
REM Nov 11 MSG %"Veterans Day%"
|
||||
REM Sun [_last(Oct)] MSG Daylight Savings Time - %"DST over%"
|
||||
REM Oct 30 MSG %"Mischief Night%"
|
||||
REM Oct 31 MSG %"Halloween%"
|
||||
REM Tue Nov 2 SCANFROM [_back(7)] \
|
||||
SATISFY [(YEAR(TRIGDATE()) % 4) == 0] \
|
||||
MSG %"Election%" Day
|
||||
REM Thu Nov [Week_4] SCANFROM [_back(7)] SATISFY 1
|
||||
OMIT [_trig()] MSG %"Thanksgiving%" Day
|
||||
REM Fri Nov [Week_4+1] SCANFROM [_back(7)] SATISFY 1
|
||||
OMIT [_trig()] MSG %"Thanksgiving%" (cont.)
|
||||
OMIT Dec 24 MSG %"Christmas Eve%"
|
||||
OMIT Dec 25 MSG %"Christmas%" Day
|
||||
|
||||
##########################################################################
|
||||
# #
|
||||
# The next block uses the shade variable defined in PSSTUFF above. #
|
||||
# If any US holidays were triggered above, shade in the calendar #
|
||||
# entry in PostScript. This is not quite correct, as it blots out the #
|
||||
# other PostScript stuff above. I was too lazy to do it properly :-) #
|
||||
# #
|
||||
##########################################################################
|
||||
if $NumTrig > SaveTrig
|
||||
REM PS [shade]
|
||||
endif
|
||||
|
||||
# Seasons (valid from 1992 to 2000)...
|
||||
REM Mar 20 MSG %"Spring%" begins
|
||||
REM Jun [IIF(YEAR(TODAY())%4, 21, 20)] MSG %"Summer%" begins
|
||||
REM Sep [CHOOSE(YEAR(TODAY())-1991, 22,22,23,23,22,22,22,23,22)] \
|
||||
MSG %"Fall%" begins
|
||||
REM Dec [IIF((YEAR(TODAY())+1)%4, 21, 22)] MSG %"Winter%" begins
|
||||
|
||||
#JHOLS
|
||||
##########################################################################
|
||||
# #
|
||||
# This portion of the file contains reminders for Jewish holidays. The #
|
||||
# dates were obtained from "The First Jewish Catalog" by Richard Siegel #
|
||||
# and Michael and Sharon Strassfeld, published by the Jewish Publication #
|
||||
# Society of America. The Reform version of the calendar was guessed #
|
||||
# at by David Skoll based on experience. There is probably no standard #
|
||||
# Reform position on many of the holidays, so you may have to adjust #
|
||||
# the file as required. #
|
||||
# #
|
||||
# Additional corrections were made from the paper "Calendrical #
|
||||
# Calculations" by Nachum Dershowitz and Edward M. Reingold. Any #
|
||||
# further corrections are welcome. #
|
||||
# #
|
||||
##########################################################################
|
||||
|
||||
# Here are some general functions that you might find nice to use
|
||||
|
||||
# _hstr: Returns a string which is the full Hebrew date of its argument.
|
||||
# Example: hstr('1994/02/02') returns "21 Shvat 5754"
|
||||
FSET _hstr(x) HEBDAY(x) + " " + HEBMON(x) + " " + HEBYEAR(x)
|
||||
|
||||
# _hyrlen: Return the length of the specified Hebrew year
|
||||
# Example: _hyrlen(5754) returns 355
|
||||
FSET _hyrlen(x) HEBDATE(1, "Tishrey", x+1) - HEBDATE(1, "Tishrey", x)
|
||||
|
||||
# --- HERE ARE THE JEWISH HOLIDAYS ---
|
||||
# Set the variable InIsrael to 1 if you live in Israel. Otherwise,
|
||||
# you get the Diaspora versions of Jewish holidays
|
||||
SET InIsrael 0
|
||||
|
||||
# Set the variable Reform to 1 if you want the Reform version of the
|
||||
# Jewish calendar. Otherwise, you get the traditional version
|
||||
SET Reform 0
|
||||
|
||||
# Convenient function definition to save typing
|
||||
FSET _h(x, y) TRIGGER(HEBDATE(x,y))
|
||||
FSET _h2(x, y) HEBDATE(x, y, TODAY()-7)
|
||||
FSET _PastSat(x, y) TRIGGER(IIF(WKDAYNUM(_h2(x,y))!=6, _h2(x,y), _h2(x,y)+1))
|
||||
|
||||
# Default values in case InIsrael and Reform are not set
|
||||
SET InIsrael VALUE("InIsrael", 0)
|
||||
SET Reform VALUE("Reform", 0)
|
||||
|
||||
[_h(1, "Tishrey")] ++4 MSG %"Rosh Hashana 1%" is %b.
|
||||
|
||||
# No RH-2 or Tzom Gedalia in Reform
|
||||
IF !Reform
|
||||
[_h(2, "Tishrey")] ++4 MSG %"Rosh Hashana 2%" is %b.
|
||||
[_PastSat(3, "Tishrey")] ++4 MSG %"Tzom Gedalia%" is %b.
|
||||
ENDIF
|
||||
|
||||
[_h(10, "Tishrey")] ++4 MSG %"Yom Kippur%" is %b.
|
||||
[_h(15, "Tishrey")] ++4 MSG %"Sukkot 1%" is %b.
|
||||
|
||||
IF !InIsrael
|
||||
[_h(16, "Tishrey")] MSG %"Sukkot 2%"
|
||||
ENDIF
|
||||
|
||||
[_h(21, "Tishrey")] ++4 MSG %"Hashana Rabba%" is %b.
|
||||
[_h(22, "Tishrey")] ++4 MSG %"Shemini Atzeret%" is %b.
|
||||
|
||||
IF InIsrael
|
||||
[_h(22, "Tishrey")] ++4 MSG %"Simchat Torah%" is %b.
|
||||
ELSE
|
||||
[_h(23, "Tishrey")] ++4 MSG %"Simchat Torah%" is %b.
|
||||
ENDIF
|
||||
|
||||
# Because Kislev can change length, we must be more careful about Chanukah
|
||||
FSET _chan(x) TRIGGER(HEBDATE(24, "Kislev", today()-9)+x)
|
||||
[_chan(1)] ++4 MSG %"Chanukah 1%" is %b.
|
||||
[_chan(2)] MSG %"Chanukah 2%"
|
||||
[_chan(3)] MSG %"Chanukah 3%"
|
||||
[_chan(4)] MSG %"Chanukah 4%"
|
||||
[_chan(5)] MSG %"Chanukah 5%"
|
||||
[_chan(6)] MSG %"Chanukah 6%"
|
||||
[_chan(7)] MSG %"Chanukah 7%"
|
||||
[_chan(8)] MSG %"Chanukah 8%"
|
||||
|
||||
# Not sure about Reform's position on the next one.
|
||||
IF !Reform
|
||||
# 10 Tevet will never be a Saturday, so whether or not to
|
||||
# move it is moot. (Thanks to Art Werschulz.)
|
||||
[_h(10, "Tevet")] MSG %"Tzom Tevet%" is %b.
|
||||
ENDIF
|
||||
|
||||
[_h(15, "Shvat")] ++4 MSG %"Tu B'Shvat%" is %b.
|
||||
[_h(15, "Adar A")] ++4 MSG %"Purim Katan%" is %b.
|
||||
|
||||
# If Purim is on Sunday, then Fast of Esther is 11 Adar.
|
||||
IF WKDAYNUM(_h2(13, "Adar")) != 6
|
||||
REM [TRIGGER(_h2(13, "Adar"))] ++4 MSG %"Fast of Esther%" is %b.
|
||||
ELSE
|
||||
REM [TRIGGER(_h2(11, "Adar"))] ++4 MSG %"Fast of Esther%" is %b.
|
||||
ENDIF
|
||||
[_h(14, "Adar")] ++4 MSG %"Purim%" is %b.
|
||||
[_h(15, "Nisan")] ++4 MSG %"Pesach%" is %b.
|
||||
|
||||
IF !InIsrael
|
||||
[_h(16, "Nisan")] MSG %"Pesach 2%"
|
||||
ENDIF
|
||||
|
||||
[_h(21, "Nisan")] MSG %"Pesach 7%"
|
||||
|
||||
IF !InIsrael && !Reform
|
||||
[_h(22, "Nisan")] MSG %"Pesach 8%"
|
||||
ENDIF
|
||||
|
||||
[_h(27, "Nisan")] ++4 MSG %"Yom HaShoah%" is %b.
|
||||
[_h(4, "Iyar")] ++4 MSG %"Yom HaZikaron%" is %b.
|
||||
[_h(5, "Iyar")] ++4 MSG %"Yom Ha'atzmaut%" is %b.
|
||||
|
||||
# Not sure about Reform's position on Lag B'Omer
|
||||
IF !Reform
|
||||
[_h(18, "Iyar")] ++4 MSG %"Lag B'Omer%" is %b.
|
||||
ENDIF
|
||||
|
||||
[_h(28, "Iyar")] ++4 MSG %"Yom Yerushalayim%" is %b.
|
||||
[_h(6, "Sivan")] ++4 MSG %"Shavuot%" is %b.
|
||||
|
||||
IF !InIsrael && !Reform
|
||||
[_h(7, "Sivan")] MSG %"Shavuot 2%"
|
||||
ENDIF
|
||||
|
||||
# Fairly sure Reform Jews don't observe the next two
|
||||
IF !Reform
|
||||
# Tzom Tamuz and Tish'a B'Av are moved to Sunday if they normally
|
||||
# fall on a Saturday
|
||||
[_PastSat(17, "Tamuz")] ++4 MSG %"Tzom Tammuz%" is %b.
|
||||
[_PastSat(9, "Av")] ++4 MSG %"Tish'a B'Av%" is %b.
|
||||
ENDIF
|
||||
|
||||
# Counting the omer - do the whole spiel, i.e:
|
||||
# "This is the xth day of the omer, being y weeks and z days of the omer."
|
||||
# Nice Remind programming example here!
|
||||
SET ostart HEBDATE(16, "Nisan", TODAY()-50)
|
||||
IF ostart <= TODAY() && (TODAY() - ostart < 49)
|
||||
SET odays TODAY()-ostart+1
|
||||
IF odays < 7
|
||||
MSG %"%"Today is the [ORD(odays)] day of the Omer.
|
||||
ELSE
|
||||
IF !(odays % 7)
|
||||
MSG %"%"Today is the [ORD(odays)] day of the Omer, being [odays / 7] [PLURAL(odays/7, "week")] of the Omer.
|
||||
ELSE
|
||||
MSG %"%"Today is the [ORD(odays)] day of the Omer, being [odays/7] [PLURAL(odays/7, "week")] and [odays%7] [PLURAL(odays%7, "day")] of the Omer.
|
||||
ENDIF
|
||||
ENDIF
|
||||
CAL [ORD(odays)] of Omer
|
||||
ENDIF
|
||||
|
||||
### Candle lighting and Havdalah. You should probably add candle lighting
|
||||
### for other holidays besides Shabbat. These just create calendar entries
|
||||
### for Friday and Saturday. Note: You must set your latitude, longitude
|
||||
### and possibly time zone for these to work properly!
|
||||
|
||||
REM Friday CAL Candle lighting at [sunset(trigdate())-18]
|
||||
REM Saturday CAL Havdalah at [sunset(trigdate())+42]
|
||||
|
||||
#COLORS
|
||||
##########################################################################
|
||||
# #
|
||||
# This contains sample ANSI escape sequences for coloring messages. #
|
||||
# It should work on an IBM PC with the ANSI.SYS driver, and on #
|
||||
# other terminals which use the ANSI sequences. #
|
||||
# #
|
||||
# This information was provided by Gail Gurman.
|
||||
# #
|
||||
##########################################################################
|
||||
# Colors - use Nrm to reset to normal text.
|
||||
SET Esc CHAR(27)
|
||||
|
||||
SET Nrm Esc + "[0m"
|
||||
SET Blk Esc + "[0;30m"
|
||||
SET Red Esc + "[0;31m"
|
||||
SET Grn Esc + "[0;32m"
|
||||
SET Ylw Esc + "[0;33m"
|
||||
SET Blu Esc + "[0;34m"
|
||||
SET Mag Esc + "[0;35m"
|
||||
SET Cyn Esc + "[0;36m"
|
||||
SET Wht Esc + "[0;37m"
|
||||
SET Gry Esc + "[30;1m"
|
||||
SET BrRed Esc + "[31;1m"
|
||||
SET BrGrn Esc + "[32;1m"
|
||||
SET BrYlw Esc + "[33;1m"
|
||||
SET BrBlu Esc + "[34;1m"
|
||||
SET BrMag Esc + "[35;1m"
|
||||
SET BrCyn Esc + "[36;1m"
|
||||
SET BrWht Esc + "[37;1m"
|
||||
|
||||
# Examples
|
||||
REM MSG A [Blu]blue[Nrm] reminder.
|
||||
REM MSG [Red]%"A red reminder%" safe to use in the calendar mode.[Nrm]
|
||||
|
||||
# Here is an example of how to use msgprefix() and msgsuffix(). These
|
||||
# will highlight priority-0 reminders in bright red,
|
||||
# priority-2500 in red, and priority-7500 in blue. All others
|
||||
# will be in the normal colors
|
||||
FSET msgprefix(x) iif(x==0, BrRed, x==2500, Red, x==7500, Blu, Nrm)
|
||||
|
||||
# Don't forget to return to normal color set at the end of reminder!
|
||||
FSET msgsuffix(x) Nrm
|
||||
|
||||
# The next examples are great for putting right at the end of the reminder
|
||||
# file. They make queued reminders more eye-catching when they pop up.
|
||||
FSET msgprefix(x) char(13,10,13,10)+"******************"+char(13,10,13,10)
|
||||
FSET msgsuffix(x) char(13,10)+"******************"+char(13,10,13,10)
|
||||
106
docs/README.UNIX
Normal file
106
docs/README.UNIX
Normal file
@@ -0,0 +1,106 @@
|
||||
REMIND version 3.2 for UNIX
|
||||
|
||||
REMIND is a sophisticated alarm/calendar program. Details are given
|
||||
in the man page, "remind.1".
|
||||
|
||||
INSTALLING REMIND:
|
||||
-----------------
|
||||
|
||||
If you have Tcl/Tk (wish 4.1 or higher) installed and are running X11:
|
||||
----------------------------------------------------------------------
|
||||
|
||||
1) Type: wish ./build.tk from the top-level Remind directory.
|
||||
Fill in the various options and hit "Build Remind"
|
||||
|
||||
2) Type: "make install" -- you may need to be root to do this.
|
||||
|
||||
If you do NOT have Tcl/Tk or are NOT running X11:
|
||||
-------------------------------------------------
|
||||
|
||||
1) Edit the file "src/custom.h" according to your preferences.
|
||||
|
||||
2) Edit the file "src/lang.h" to choose a language.
|
||||
|
||||
3) Type: "make"
|
||||
|
||||
4) Type: "make install" -- you may need to be root to do this.
|
||||
|
||||
The subdirectory "www" contains scripts for making a nice calendar
|
||||
web server. See the files README and Makefile in that directory.
|
||||
|
||||
The file "examples/defs.rem" has some sample Remind definitions and
|
||||
commands, as well as U.S. and Jewish holidays.
|
||||
|
||||
OTHER LANGUAGE SUPPORT
|
||||
|
||||
Remind has support for languages other than English. See the file
|
||||
"src/lang.h" for details. The language support may vary - you can change
|
||||
only the substitution filter, or you can translate all of the usage
|
||||
instructions and error messages as well. See "src/langs/french.h" for an
|
||||
example of the latter.
|
||||
|
||||
To compile Remind for a non-english language, look at the constants
|
||||
defined in "src/lang.h". Then, to compile Remind for Italian (as an
|
||||
example), type:
|
||||
|
||||
make "LANGDEF=-DLANG=ITALIAN"
|
||||
|
||||
If you add support for a non-English language, Remind will accept both the
|
||||
English and non-English names of months and weekdays in an input script.
|
||||
However, you should not rely on this feature if you want to write portable
|
||||
Remind scripts.
|
||||
|
||||
At a minimum, you should support month and day names in the foreign
|
||||
language, and should modify the substitution filter appropriately.
|
||||
If you are truly diligent, you can translate usage and error messages
|
||||
too.
|
||||
|
||||
Take a look at the files "src/langs/english.h" and
|
||||
"src/langs/german.h" if you want to add support for your favourite
|
||||
language. If you do add another language to Remind, please let me
|
||||
know! Here are the basic guidelines:
|
||||
|
||||
- Your language file should be called "src/langs/lxxx.h", where lxxx
|
||||
is the first 8 characters of the ENGLISH name of your language.
|
||||
|
||||
- Your language file should define L_LANGNAME to be the full English
|
||||
name of your language, with the first letter capitalized and the rest
|
||||
lower-case.
|
||||
|
||||
- You can test your language file with the script "tests/tstlang.rem"
|
||||
|
||||
- Your localized strings must be encoded using UTF-8.
|
||||
|
||||
RELEASE NOTES -- miscellaneous info that couldn't go anywhere else!
|
||||
|
||||
1. POPUP REMINDERS
|
||||
|
||||
If you're running under X11 and you have the Tcl tools, you can create
|
||||
simple pop-up reminders by creating the following Tcl script called
|
||||
'popup'. It pops a message on to the screen and waits for you to
|
||||
press the 'OK' button. If you don't press the OK button within 15
|
||||
seconds, it exits anyway. To use it, you can use the '-k' option for
|
||||
Remind as follows:
|
||||
|
||||
remind "-kpopup '%s'&" .reminders
|
||||
|
||||
Or use the following in your Remind script:
|
||||
|
||||
REM AT 17:00 RUN popup 'Time to go home.' &
|
||||
|
||||
This Tcl script is a slightly modified version of one submitted by
|
||||
Norman Walsh.
|
||||
|
||||
-------------- Cut Here ---------- Cut Here ---------- Cut Here -------------
|
||||
#!/usr/local/bin/wish
|
||||
wm withdraw .
|
||||
after 15000 { destroy . ; exit }
|
||||
tk_dialog .d { Message } $argv warning 0 { OK }
|
||||
destroy .
|
||||
exit
|
||||
-------------- Cut Here ---------- Cut Here ---------- Cut Here -------------
|
||||
|
||||
|
||||
--
|
||||
Dianne Skoll <dianne@skoll.ca>
|
||||
https://dianne.skoll.ca/projects/remind/
|
||||
2373
docs/WHATSNEW
Normal file
2373
docs/WHATSNEW
Normal file
File diff suppressed because it is too large
Load Diff
880
dorem.c
880
dorem.c
@@ -1,880 +0,0 @@
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* DOREM.C */
|
||||
/* */
|
||||
/* Contains routines for parsing reminders and evaluating */
|
||||
/* triggers. Also contains routines for parsing OMIT */
|
||||
/* commands. */
|
||||
/* */
|
||||
/* This file is part of REMIND. */
|
||||
/* Copyright (C) 1992-1996 by David F. Skoll */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
static char const RCSID[] = "$Id: dorem.c,v 1.3 1996-04-28 02:01:54 dfs Exp $";
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include "globals.h"
|
||||
#include "err.h"
|
||||
#include "types.h"
|
||||
#include "protos.h"
|
||||
#include "expr.h"
|
||||
|
||||
/* Define the shell characters to escape */
|
||||
static char const EscapeMe[] =
|
||||
#ifdef QDOS
|
||||
"\"'!$%^&*()|<>[]{}\x9F~;?\\";
|
||||
#else
|
||||
"\"'!$%^&*()|<>[]{}`~;?\\";
|
||||
#endif
|
||||
|
||||
PRIVATE int ParseTimeTrig ARGS ((ParsePtr s, TimeTrig *tim));
|
||||
PRIVATE int ParseLocalOmit ARGS ((ParsePtr s, Trigger *t));
|
||||
PRIVATE int ParseScanFrom ARGS ((ParsePtr s, Trigger *t));
|
||||
PRIVATE int ParsePriority ARGS ((ParsePtr s, Trigger *t));
|
||||
PRIVATE int ParseUntil ARGS ((ParsePtr s, Trigger *t));
|
||||
PRIVATE int ShouldTriggerBasedOnWarn ARGS ((Trigger *t, int jul));
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* DoRem */
|
||||
/* */
|
||||
/* Do the REM command. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC int DoRem(ParsePtr p)
|
||||
#else
|
||||
int DoRem(p)
|
||||
ParsePtr p;
|
||||
#endif
|
||||
{
|
||||
|
||||
Trigger trig;
|
||||
TimeTrig tim;
|
||||
int r;
|
||||
int jul;
|
||||
char buf[TOKSIZE];
|
||||
Token tok;
|
||||
|
||||
/* Parse the trigger date and time */
|
||||
if ( (r=ParseRem(p, &trig, &tim)) ) return r;
|
||||
|
||||
if (trig.typ == NO_TYPE) return E_EOLN;
|
||||
if (trig.typ == SAT_TYPE) {
|
||||
r=DoSatRemind(&trig, &tim, p);
|
||||
if (r) return r;
|
||||
r=ParseToken(p, buf);
|
||||
if (r) return r;
|
||||
FindToken(buf, &tok);
|
||||
if (tok.type == T_Empty || tok.type == T_Comment) return OK;
|
||||
if (tok.type != T_RemType || tok.val == SAT_TYPE) return E_PARSE_ERR;
|
||||
trig.typ = tok.val;
|
||||
jul = LastTriggerDate;
|
||||
if (!LastTrigValid) return OK;
|
||||
} else {
|
||||
/* Calculate the trigger date */
|
||||
jul = ComputeTrigger(trig.scanfrom, &trig, &r);
|
||||
if (r) return r;
|
||||
}
|
||||
|
||||
/* Queue the reminder, if necessary */
|
||||
#ifdef HAVE_QUEUED
|
||||
if (jul == JulianToday &&
|
||||
!(!IgnoreOnce &&
|
||||
trig.once != NO_ONCE &&
|
||||
FileAccessDate == JulianToday))
|
||||
QueueReminder(p, trig.typ, &tim, trig.sched);
|
||||
/* If we're in daemon mode, do nothing over here */
|
||||
if (Daemon) return OK;
|
||||
#endif
|
||||
|
||||
|
||||
if (ShouldTriggerReminder(&trig, &tim, jul)) {
|
||||
#ifdef OS2_POPUP
|
||||
if ( (r=TriggerReminder(p, &trig, &tim, jul, 0)) ) {
|
||||
#else
|
||||
if ( (r=TriggerReminder(p, &trig, &tim, jul)) ) {
|
||||
#endif
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* ParseRem */
|
||||
/* */
|
||||
/* Given a parse pointer, parse line and fill in a */
|
||||
/* trigger structure. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC int ParseRem(ParsePtr s, Trigger *trig, TimeTrig *tim)
|
||||
#else
|
||||
int ParseRem(s, trig, tim)
|
||||
ParsePtr s;
|
||||
Trigger *trig;
|
||||
TimeTrig *tim;
|
||||
#endif
|
||||
{
|
||||
register int r;
|
||||
Token tok;
|
||||
|
||||
trig->y = NO_YR;
|
||||
trig->m = NO_MON;
|
||||
trig->d = NO_DAY;
|
||||
trig->wd = NO_WD;
|
||||
trig->back = NO_BACK;
|
||||
trig->delta = NO_DELTA;
|
||||
trig->until = NO_UNTIL;
|
||||
trig->rep = NO_REP;
|
||||
trig->localomit = NO_WD;
|
||||
trig->skip = NO_SKIP;
|
||||
trig->once = NO_ONCE;
|
||||
trig->typ = NO_TYPE;
|
||||
trig->scanfrom = NO_DATE;
|
||||
trig->priority = DefaultPrio;
|
||||
trig->sched[0] = 0;
|
||||
trig->warn[0] = 0;
|
||||
tim->ttime = NO_TIME;
|
||||
tim->delta = NO_DELTA;
|
||||
tim->rep = NO_REP;
|
||||
|
||||
while(1) {
|
||||
/* Read space-delimited string */
|
||||
r = ParseToken(s, TokBuffer);
|
||||
if (r) return r;
|
||||
|
||||
/* Figure out what we've got */
|
||||
FindToken(TokBuffer, &tok);
|
||||
switch(tok.type) {
|
||||
case T_WkDay:
|
||||
if (trig->wd & (1 << tok.val)) return E_WD_TWICE;
|
||||
trig->wd |= (1 << tok.val);
|
||||
break;
|
||||
|
||||
case T_Month:
|
||||
if (trig->m != NO_MON) return E_MON_TWICE;
|
||||
trig->m = tok.val;
|
||||
break;
|
||||
|
||||
case T_Skip:
|
||||
if (trig->skip != NO_SKIP) return E_SKIP_ERR;
|
||||
trig->skip = tok.val;
|
||||
break;
|
||||
|
||||
case T_Priority:
|
||||
r=ParsePriority(s, trig);
|
||||
if (r) return r;
|
||||
break;
|
||||
|
||||
case T_At:
|
||||
r=ParseTimeTrig(s, tim);
|
||||
if (r) return r;
|
||||
break;
|
||||
|
||||
case T_Scanfrom:
|
||||
r=ParseScanFrom(s, trig);
|
||||
if (r) return r;
|
||||
break;
|
||||
|
||||
case T_RemType:
|
||||
trig->typ = tok.val;
|
||||
if (s->isnested) return E_CANT_NEST_RTYPE;
|
||||
if (trig->scanfrom == NO_DATE) trig->scanfrom = JulianToday;
|
||||
return OK;
|
||||
|
||||
case T_Until:
|
||||
r=ParseUntil(s, trig);
|
||||
if (r) return r;
|
||||
break;
|
||||
|
||||
case T_Year:
|
||||
if (trig->y != NO_YR) return E_YR_TWICE;
|
||||
trig->y = tok.val;
|
||||
break;
|
||||
|
||||
case T_Day:
|
||||
if (trig->d != NO_DAY) return E_DAY_TWICE;
|
||||
trig->d = tok.val;
|
||||
break;
|
||||
|
||||
case T_Rep:
|
||||
if (trig->rep != NO_REP) return E_REP_TWICE;
|
||||
trig->rep = tok.val;
|
||||
break;
|
||||
|
||||
case T_Delta:
|
||||
if (trig->delta != NO_DELTA) return E_DELTA_TWICE;
|
||||
trig->delta = tok.val;
|
||||
break;
|
||||
|
||||
case T_Back:
|
||||
if (trig->back != NO_BACK) return E_BACK_TWICE;
|
||||
trig->back = tok.val;
|
||||
break;
|
||||
|
||||
case T_Once:
|
||||
if (trig->once != NO_ONCE) return E_ONCE_TWICE;
|
||||
trig->once = ONCE_ONCE;
|
||||
break;
|
||||
|
||||
case T_Omit:
|
||||
r = ParseLocalOmit(s, trig);
|
||||
if (r) return r;
|
||||
break;
|
||||
|
||||
case T_Empty:
|
||||
if (trig->scanfrom == NO_DATE) trig->scanfrom = JulianToday;
|
||||
return OK;
|
||||
|
||||
case T_Warn:
|
||||
r=ParseToken(s, TokBuffer);
|
||||
if(r) return r;
|
||||
StrnCpy(trig->warn, TokBuffer, VAR_NAME_LEN);
|
||||
break;
|
||||
|
||||
case T_Sched:
|
||||
r=ParseToken(s, TokBuffer);
|
||||
if(r) return r;
|
||||
StrnCpy(trig->sched, TokBuffer, VAR_NAME_LEN);
|
||||
break;
|
||||
|
||||
default:
|
||||
Eprint("%s: %s", ErrMsg[E_UNKNOWN_TOKEN], TokBuffer);
|
||||
return E_UNKNOWN_TOKEN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* ParseTimeTrig - parse the AT part of a timed reminder */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE int ParseTimeTrig(ParsePtr s, TimeTrig *tim)
|
||||
#else
|
||||
static int ParseTimeTrig(s, tim)
|
||||
ParsePtr s;
|
||||
TimeTrig *tim;
|
||||
#endif
|
||||
{
|
||||
Token tok;
|
||||
int r;
|
||||
|
||||
while(1) {
|
||||
r = ParseToken(s, TokBuffer);
|
||||
if (r) return r;
|
||||
FindToken(TokBuffer, &tok);
|
||||
switch(tok.type) {
|
||||
case T_Time:
|
||||
tim->ttime = tok.val;
|
||||
break;
|
||||
|
||||
case T_Delta:
|
||||
tim->delta = (tok.val > 0) ? tok.val : -tok.val;
|
||||
break;
|
||||
|
||||
case T_Rep:
|
||||
tim->rep = tok.val;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (tim->ttime == NO_TIME) return E_EXPECT_TIME;
|
||||
/* Save in global variable */
|
||||
LastTriggerTime = tim->ttime;
|
||||
PushToken(TokBuffer);
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* ParseLocalOmit - parse the local OMIT portion of a */
|
||||
/* reminder. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE int ParseLocalOmit(ParsePtr s, Trigger *t)
|
||||
#else
|
||||
static int ParseLocalOmit(s, t)
|
||||
ParsePtr s;
|
||||
Trigger *t;
|
||||
#endif
|
||||
{
|
||||
Token tok;
|
||||
int r;
|
||||
|
||||
while(1) {
|
||||
r = ParseToken(s, TokBuffer);
|
||||
if (r) return r;
|
||||
FindToken(TokBuffer, &tok);
|
||||
switch(tok.type) {
|
||||
case T_WkDay:
|
||||
t->localomit |= (1 << tok.val);
|
||||
break;
|
||||
|
||||
default:
|
||||
PushToken(TokBuffer);
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* ParseUntil - parse the UNTIL portion of a reminder */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE int ParseUntil(ParsePtr s, Trigger *t)
|
||||
#else
|
||||
static int ParseUntil(s, t)
|
||||
ParsePtr s;
|
||||
Trigger *t;
|
||||
#endif
|
||||
{
|
||||
int y = NO_YR,
|
||||
m = NO_MON,
|
||||
d = NO_DAY;
|
||||
|
||||
Token tok;
|
||||
int r;
|
||||
|
||||
if (t->until != NO_UNTIL) return E_UNTIL_TWICE;
|
||||
|
||||
while(1) {
|
||||
r = ParseToken(s, TokBuffer);
|
||||
if (r) return r;
|
||||
FindToken(TokBuffer, &tok);
|
||||
switch(tok.type) {
|
||||
case T_Year:
|
||||
if (y != NO_YR) {
|
||||
Eprint("UNTIL: %s", ErrMsg[E_YR_TWICE]);
|
||||
return E_YR_TWICE;
|
||||
}
|
||||
y = tok.val;
|
||||
break;
|
||||
|
||||
case T_Month:
|
||||
if (m != NO_MON) {
|
||||
Eprint("UNTIL: %s", ErrMsg[E_MON_TWICE]);
|
||||
return E_MON_TWICE;
|
||||
}
|
||||
m = tok.val;
|
||||
break;
|
||||
|
||||
case T_Day:
|
||||
if (d != NO_DAY) {
|
||||
Eprint("UNTIL: %s", ErrMsg[E_DAY_TWICE]);
|
||||
return E_DAY_TWICE;
|
||||
}
|
||||
d = tok.val;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (y == NO_YR || m == NO_MON || d == NO_DAY) {
|
||||
Eprint("UNTIL: %s", ErrMsg[E_INCOMPLETE]);
|
||||
return E_INCOMPLETE;
|
||||
}
|
||||
if (!DateOK(y, m, d)) return E_BAD_DATE;
|
||||
t->until = Julian(y, m, d);
|
||||
PushToken(TokBuffer);
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* ParseScanFrom - parse the SCANFROM portion of a reminder */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE int ParseScanFrom(ParsePtr s, Trigger *t)
|
||||
#else
|
||||
static int ParseScanFrom(s, t)
|
||||
ParsePtr s;
|
||||
Trigger *t;
|
||||
#endif
|
||||
{
|
||||
int y = NO_YR,
|
||||
m = NO_MON,
|
||||
d = NO_DAY;
|
||||
|
||||
Token tok;
|
||||
int r;
|
||||
|
||||
if (t->scanfrom != NO_DATE) return E_SCAN_TWICE;
|
||||
|
||||
while(1) {
|
||||
r = ParseToken(s, TokBuffer);
|
||||
if (r) return r;
|
||||
FindToken(TokBuffer, &tok);
|
||||
switch(tok.type) {
|
||||
case T_Year:
|
||||
if (y != NO_YR) {
|
||||
Eprint("SCANFROM: %s", ErrMsg[E_YR_TWICE]);
|
||||
return E_YR_TWICE;
|
||||
}
|
||||
y = tok.val;
|
||||
break;
|
||||
|
||||
case T_Month:
|
||||
if (m != NO_MON) {
|
||||
Eprint("SCANFROM: %s", ErrMsg[E_MON_TWICE]);
|
||||
return E_MON_TWICE;
|
||||
}
|
||||
m = tok.val;
|
||||
break;
|
||||
|
||||
case T_Day:
|
||||
if (d != NO_DAY) {
|
||||
Eprint("SCANFROM: %s", ErrMsg[E_DAY_TWICE]);
|
||||
return E_DAY_TWICE;
|
||||
}
|
||||
d = tok.val;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (y == NO_YR || m == NO_MON || d == NO_DAY) {
|
||||
Eprint("SCANFROM: %s", ErrMsg[E_INCOMPLETE]);
|
||||
return E_INCOMPLETE;
|
||||
}
|
||||
if (!DateOK(y, m, d)) return E_BAD_DATE;
|
||||
t->scanfrom = Julian(y, m, d);
|
||||
PushToken(TokBuffer);
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* TriggerReminder */
|
||||
/* */
|
||||
/* Trigger the reminder if it's a RUN or MSG type. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
#ifdef OS2_POPUP
|
||||
PUBLIC int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul,
|
||||
int AsPopUp)
|
||||
#else /* ! OS2_POPUP */
|
||||
PUBLIC int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul)
|
||||
#endif /* OS2_POPUP */
|
||||
#else /* ! HAVE_PROTOS */
|
||||
#ifdef OS2_POPUP
|
||||
int TriggerReminder(p, t, tim, jul, AsPopUp)
|
||||
ParsePtr p;
|
||||
Trigger *t;
|
||||
TimeTrig *tim;
|
||||
int jul;
|
||||
int AsPopUp;
|
||||
#else /* ! OS2_POPUP */
|
||||
int TriggerReminder(p, t, tim, jul)
|
||||
ParsePtr p;
|
||||
Trigger *t;
|
||||
TimeTrig *tim;
|
||||
int jul;
|
||||
#endif /* OS2_POPUP */
|
||||
#endif /* HAVE_PROTOS */
|
||||
{
|
||||
int r, y, m, d;
|
||||
char PrioExpr[25];
|
||||
static char buf[LINELEN+TOKSIZE];
|
||||
char *s, *s2;
|
||||
Value v;
|
||||
|
||||
if (t->typ == RUN_TYPE && RunDisabled) return E_RUN_DISABLED;
|
||||
if (t->typ == CAL_TYPE || t->typ == PS_TYPE || t->typ == PSF_TYPE)
|
||||
return OK;
|
||||
|
||||
/* If it's a MSG-type reminder, and no -k option was used, issue the banner. */
|
||||
if ((t->typ == MSG_TYPE || t->typ == MSF_TYPE)
|
||||
&& !NumTriggered && !NextMode && !MsgCommand) {
|
||||
if (!DoSubstFromString(Banner, SubstBuffer, JulianToday, NO_TIME) && *SubstBuffer)
|
||||
#ifdef OS2_POPUP
|
||||
if (AsPopUp)
|
||||
PutlPopUp(SubstBuffer);
|
||||
else
|
||||
printf("%s\n", SubstBuffer);
|
||||
#else
|
||||
printf("%s\n", SubstBuffer);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* If it's NextMode, process as a CAL-type entry, and issue simple-calendar
|
||||
format. */
|
||||
if (NextMode) {
|
||||
if ( (r=DoSubst(p, SubstBuffer, t, tim, jul, CAL_MODE)) ) return r;
|
||||
if (!*SubstBuffer) return OK;
|
||||
FromJulian(jul, &y, &m, &d);
|
||||
#ifdef OS2_POPUP
|
||||
if (AsPopUp) {
|
||||
sprintf(buf, "%04d%c%02d%c%02d %s", y, DATESEP, m+1, DATESEP, d,
|
||||
SimpleTime(tim->ttime, NULL));
|
||||
StartPopUp();
|
||||
PutsPopUp(buf);
|
||||
PutlPopUp(SubstBuffer);
|
||||
}
|
||||
else
|
||||
printf("%04d%c%02d%c%02d %s%s\n", y, DATESEP, m+1, DATESEP, d,
|
||||
SimpleTime(tim->ttime, NULL),
|
||||
SubstBuffer);
|
||||
#else
|
||||
printf("%04d%c%02d%c%02d %s%s\n", y, DATESEP, m+1, DATESEP, d,
|
||||
SimpleTime(tim->ttime, NULL),
|
||||
SubstBuffer);
|
||||
#endif
|
||||
return OK;
|
||||
}
|
||||
|
||||
/* Put the substituted string into the SubstBuffer */
|
||||
s2 = buf;
|
||||
*s2 = 0;
|
||||
if (UserFuncExists("msgprefix") == 1) {
|
||||
sprintf(PrioExpr, "msgprefix(%d)", t->priority);
|
||||
s = PrioExpr;
|
||||
r = EvalExpr(&s, &v);
|
||||
if (!r) {
|
||||
if (!DoCoerce(STR_TYPE, &v)) {
|
||||
sprintf(s2, "%s", v.v.str);
|
||||
s2 += strlen(s2);
|
||||
}
|
||||
DestroyValue(v);
|
||||
}
|
||||
}
|
||||
if ( (r=DoSubst(p, s2, t, tim, jul, NORMAL_MODE)) ) return r;
|
||||
s2 += strlen(s2);
|
||||
if (UserFuncExists("msgsuffix") == 1) {
|
||||
sprintf(PrioExpr, "msgsuffix(%d)", t->priority);
|
||||
s = PrioExpr;
|
||||
r = EvalExpr(&s, &v);
|
||||
if (!r) {
|
||||
if (!DoCoerce(STR_TYPE, &v)) {
|
||||
sprintf(s2, "%s", v.v.str);
|
||||
s2 += strlen(s2);
|
||||
}
|
||||
DestroyValue(v);
|
||||
}
|
||||
}
|
||||
if ((!MsgCommand && t->typ == MSG_TYPE) || t->typ == MSF_TYPE) {
|
||||
*s2++ = '\n';
|
||||
}
|
||||
*s2 = 0;
|
||||
|
||||
/* If we are sorting, just queue it up in the sort buffer */
|
||||
if (SortByDate) {
|
||||
if (InsertIntoSortBuffer(jul, tim->ttime, buf, t->typ, t->priority) == OK) {
|
||||
NumTriggered++;
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we didn't insert the reminder into the sort buffer, issue the
|
||||
reminder now. */
|
||||
switch(t->typ) {
|
||||
case MSG_TYPE:
|
||||
if (MsgCommand) {
|
||||
DoMsgCommand(MsgCommand, buf);
|
||||
} else {
|
||||
#ifdef OS2_POPUP
|
||||
if (AsPopUp)
|
||||
PutlPopUp(buf);
|
||||
else
|
||||
printf("%s", buf);
|
||||
#else
|
||||
printf("%s", buf);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
case MSF_TYPE:
|
||||
#ifdef OS2_POPUP
|
||||
if (AsPopUp) {
|
||||
StartPopUp();
|
||||
FillParagraph(buf, 1);
|
||||
EndPopUp();
|
||||
} else {
|
||||
FillParagraph(buf, 0);
|
||||
}
|
||||
#else
|
||||
FillParagraph(buf);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case RUN_TYPE:
|
||||
system(buf);
|
||||
break;
|
||||
|
||||
default: /* Unknown/illegal type? */
|
||||
return E_SWERR;
|
||||
}
|
||||
|
||||
NumTriggered++;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* ShouldTriggerReminder */
|
||||
/* */
|
||||
/* Return 1 if we should trigger a reminder, based on today's */
|
||||
/* date and the trigger. Return 0 if reminder should not be */
|
||||
/* triggered. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef __TURBOC__
|
||||
#pragma argsused
|
||||
#endif
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC int ShouldTriggerReminder(Trigger *t, TimeTrig *tim, int jul)
|
||||
#else
|
||||
int ShouldTriggerReminder(t, tim, jul)
|
||||
Trigger *t;
|
||||
TimeTrig *tim;
|
||||
int jul;
|
||||
#endif
|
||||
{
|
||||
int r;
|
||||
|
||||
/* Handle the ONCE modifier in the reminder. */
|
||||
if (!IgnoreOnce && t->once !=NO_ONCE && FileAccessDate == JulianToday)
|
||||
return 0;
|
||||
|
||||
if (jul < JulianToday) return 0;
|
||||
|
||||
/* Don't trigger timed reminders if DontIssueAts is true, and if the
|
||||
reminder is for today */
|
||||
|
||||
#ifdef HAVE_QUEUED
|
||||
if (jul == JulianToday && DontIssueAts && tim->ttime != NO_TIME) return 0;
|
||||
#endif
|
||||
|
||||
/* Don't trigger "old" timed reminders */
|
||||
/*** REMOVED...
|
||||
if (jul == JulianToday &&
|
||||
tim->ttime != NO_TIME &&
|
||||
tim->ttime < SystemTime(0) / 60) return 0;
|
||||
*** ...UNTIL HERE */
|
||||
|
||||
/* If "infinite delta" option is chosen, always trigger future reminders */
|
||||
if (InfiniteDelta || NextMode) return 1;
|
||||
|
||||
/* If there's a "warn" function, it overrides any deltas */
|
||||
if (t->warn[0] != 0) {
|
||||
return ShouldTriggerBasedOnWarn(t, jul);
|
||||
}
|
||||
|
||||
/* Move back by delta days, if any */
|
||||
if (t->delta != NO_DELTA) {
|
||||
if (t->delta < 0)
|
||||
jul = jul + t->delta;
|
||||
else {
|
||||
r = t->delta;
|
||||
while(r && jul > JulianToday) {
|
||||
jul--;
|
||||
if (!IsOmitted(jul, t->localomit)) r--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Should we trigger the reminder? */
|
||||
return (jul <= JulianToday);
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* DoSatRemind */
|
||||
/* */
|
||||
/* Do the "satisfying..." remind calculation. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef __TURBOC__
|
||||
#pragma argsused
|
||||
#endif
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC int DoSatRemind(Trigger *trig, TimeTrig *tim, ParsePtr p)
|
||||
#else
|
||||
int DoSatRemind(trig, tim, p)
|
||||
Trigger *trig;
|
||||
TimeTrig *tim;
|
||||
ParsePtr p;
|
||||
#endif
|
||||
{
|
||||
int iter, jul, r;
|
||||
Value v;
|
||||
char *s, *t;
|
||||
|
||||
t = p->pos;
|
||||
iter = 0;
|
||||
jul = trig->scanfrom;
|
||||
while (iter++ < MaxSatIter) {
|
||||
jul = ComputeTrigger(jul, trig, &r);
|
||||
if (r) {
|
||||
if (r == E_CANT_TRIG) return OK; else return r;
|
||||
}
|
||||
s = p->pos;
|
||||
r = EvaluateExpr(p, &v);
|
||||
t = p->pos;
|
||||
if (r) return r;
|
||||
if (v.type != INT_TYPE && v.type != STR_TYPE) return E_BAD_TYPE;
|
||||
if (v.type == INT_TYPE && v.v.val) return OK;
|
||||
if (v.type == STR_TYPE && *v.v.str) return OK;
|
||||
p->pos = s;
|
||||
jul++;
|
||||
}
|
||||
p->pos = t;
|
||||
LastTrigValid = 0;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* ParsePriority - parse the PRIORITY portion of a reminder */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE int ParsePriority(ParsePtr s, Trigger *t)
|
||||
#else
|
||||
static int ParsePriority(s, t)
|
||||
ParsePtr s;
|
||||
Trigger *t;
|
||||
#endif
|
||||
{
|
||||
int p, r;
|
||||
char *u;
|
||||
|
||||
r = ParseToken(s, TokBuffer);
|
||||
if(r) return r;
|
||||
u = TokBuffer;
|
||||
|
||||
if (!isdigit(*u)) return E_EXPECTING_NUMBER;
|
||||
p = 0;
|
||||
while (isdigit(*u)) {
|
||||
p = p*10 + *u - '0';
|
||||
u++;
|
||||
}
|
||||
if (*u) return E_EXPECTING_NUMBER;
|
||||
|
||||
/* Tricky! The only way p can be < 0 is if overflow occurred; thus,
|
||||
E2HIGH is indeed the appropriate error message. */
|
||||
if (p<0 || p>9999) return E_2HIGH;
|
||||
t->priority = p;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* DoMsgCommand */
|
||||
/* */
|
||||
/* Execute the '-k' command, escaping shell chars in message. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC void DoMsgCommand(char *cmd, char *msg)
|
||||
#else
|
||||
void DoMsgCommand(cmd, msg)
|
||||
char *cmd;
|
||||
char *msg;
|
||||
#endif
|
||||
{
|
||||
|
||||
#ifdef WANT_SHELL_ESCAPING
|
||||
char buf[2*LINELEN+TOKSIZE];
|
||||
char *s, *t;
|
||||
|
||||
/* Escape shell characters in msg INCLUDING WHITESPACE! */
|
||||
for (t=buf, s=msg; *s; s++) {
|
||||
if (isspace(*s) || strchr(EscapeMe, *s)) *t++ = '\\';
|
||||
*t++ = *s;
|
||||
}
|
||||
*t = 0;
|
||||
|
||||
/* Use SubstBuffer -- not too safe, since no check for overflow... */
|
||||
sprintf(SubstBuffer, cmd, buf);
|
||||
#else
|
||||
sprintf(SubstBuffer, cmd, msg);
|
||||
#endif /* WANT_SHELL_ESCAPING */
|
||||
system(SubstBuffer);
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* ShouldTriggerBasedOnWarn */
|
||||
/* */
|
||||
/* Determine whether to trigger a reminder based on its WARN */
|
||||
/* function. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE int ShouldTriggerBasedOnWarn(Trigger *t, int jul)
|
||||
#else
|
||||
static int ShouldTriggerBasedOnWarn(t, jul)
|
||||
Trigger *t;
|
||||
int jul;
|
||||
#endif
|
||||
{
|
||||
char buffer[VAR_NAME_LEN+15];
|
||||
int i;
|
||||
char *s;
|
||||
int r;
|
||||
Value v;
|
||||
int lastReturnVal = 0; /* Silence compiler warning */
|
||||
|
||||
/* If no proper function exists, barf... */
|
||||
if (UserFuncExists(t->warn) != 1) {
|
||||
Eprint("%s: `%s'", ErrMsg[M_BAD_WARN_FUNC], t->warn);
|
||||
return (jul == JulianToday);
|
||||
}
|
||||
for (i=1; ; i++) {
|
||||
sprintf(buffer, "%s(%d)", t->warn, i);
|
||||
s = buffer;
|
||||
r = EvalExpr(&s, &v);
|
||||
if (r) {
|
||||
Eprint("%s: `%s': %s", ErrMsg[M_BAD_WARN_FUNC],
|
||||
t->warn, ErrMsg[r]);
|
||||
return (jul == JulianToday);
|
||||
}
|
||||
if (v.type != INT_TYPE) {
|
||||
DestroyValue(v);
|
||||
Eprint("%s: `%s': %s", ErrMsg[M_BAD_WARN_FUNC],
|
||||
t->warn, ErrMsg[E_BAD_TYPE]);
|
||||
return (jul == JulianToday);
|
||||
}
|
||||
|
||||
/* If absolute value of return is not monotonically
|
||||
decreasing, exit */
|
||||
if (i > 1 && abs(v.v.val) >= lastReturnVal) {
|
||||
return (jul == JulianToday);
|
||||
}
|
||||
|
||||
lastReturnVal = abs(v.v.val);
|
||||
/* Positive values: Just subtract. Negative values:
|
||||
skip omitted days. */
|
||||
if (v.v.val >= 0) {
|
||||
if (JulianToday + v.v.val == jul) return 1;
|
||||
} else {
|
||||
int j = jul;
|
||||
while (v.v.val) {
|
||||
j--;
|
||||
if (!IsOmitted(j, t->localomit)) v.v.val++;
|
||||
}
|
||||
if (j == JulianToday) return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
672
dosubst.c
672
dosubst.c
@@ -1,672 +0,0 @@
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* DOSUBST.C */
|
||||
/* */
|
||||
/* This performs all the "%" substitution functions when */
|
||||
/* reminders are triggered. */
|
||||
/* */
|
||||
/* This file is part of REMIND. */
|
||||
/* Copyright (C) 1992-1996 by David F. Skoll */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
static char const RCSID[] = "$Id: dosubst.c,v 1.3 1996-10-12 02:49:32 dfs Exp $";
|
||||
|
||||
#define L_IN_DOSUBST
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include "globals.h"
|
||||
#include "err.h"
|
||||
#include "types.h"
|
||||
#include "protos.h"
|
||||
|
||||
#define UPPER(c) (islower(c) ? toupper(c) : c)
|
||||
#define ABS(x) ( (x) < 0 ? -(x) : (x) )
|
||||
#ifndef NL
|
||||
#define NL "\n"
|
||||
#endif
|
||||
|
||||
static char TODAY[] = L_TODAY;
|
||||
static char TOMORROW[] = L_TOMORROW;
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* DoSubst */
|
||||
/* */
|
||||
/* Process the % escapes in the reminder. If */
|
||||
/* mode==NORMAL_MODE, ignore the %" sequence. If */
|
||||
/* mode==CAL_MODE, process the %" sequence. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC int DoSubst(ParsePtr p, char *out, Trigger *t, TimeTrig *tt, int jul, int mode)
|
||||
#else
|
||||
int DoSubst(p, out, t, tt, jul, mode)
|
||||
ParsePtr p;
|
||||
char *out;
|
||||
Trigger *t;
|
||||
TimeTrig *tt;
|
||||
int jul, mode;
|
||||
#endif
|
||||
{
|
||||
int diff = jul - JulianToday;
|
||||
int curtime = SystemTime(0) / 60;
|
||||
int err, done;
|
||||
int c;
|
||||
int d, m, y;
|
||||
int tim = tt->ttime;
|
||||
int h, min, hh, ch, cmin, chh;
|
||||
char *pm, *cpm;
|
||||
int tdiff, adiff, mdiff, hdiff;
|
||||
char *mplu, *hplu, *when, *plu;
|
||||
int has_quote = 0;
|
||||
char *s = out;
|
||||
char *os;
|
||||
|
||||
FromJulian(jul, &y, &m, &d);
|
||||
|
||||
if (tim == NO_TIME) tim = curtime;
|
||||
tdiff = tim - curtime;
|
||||
adiff = ABS(tdiff);
|
||||
mdiff = adiff % 60;
|
||||
hdiff = adiff / 60;
|
||||
|
||||
#ifdef L_MPLU_OVER
|
||||
L_MPLU_OVER
|
||||
#else /* L_MPLU_OVER */
|
||||
mplu = (mdiff == 1 ? "" : L_MPLU);
|
||||
#endif /* L_MPLU_OVER */
|
||||
|
||||
#ifdef L_HPLU_OVER
|
||||
L_HPLU_OVER
|
||||
#else /* L_HPLU_OVER */
|
||||
hplu = (hdiff == 1 ? "" : L_HPLU);
|
||||
#endif /* L_HPLU_OVER */
|
||||
|
||||
when = (tdiff < 0 ? L_AGO : L_FROMNOW);
|
||||
|
||||
h = tim / 60;
|
||||
min = tim % 60;
|
||||
|
||||
#ifdef L_AMPM_OVERRIDE
|
||||
L_AMPM_OVERRIDE (pm, h)
|
||||
#else
|
||||
pm = (h < 12) ? L_AM : L_PM;
|
||||
#endif
|
||||
hh = (h == 12) ? 12 : h % 12;
|
||||
|
||||
ch = curtime / 60;
|
||||
cmin = curtime % 60;
|
||||
|
||||
#ifdef L_AMPM_OVERRIDE
|
||||
L_AMPM_OVERRIDE (cpm, ch)
|
||||
#else
|
||||
cpm = (ch < 12) ? L_AM : L_PM;
|
||||
#endif
|
||||
chh = (ch == 12) ? 12 : ch % 12;
|
||||
|
||||
#ifdef L_ORDINAL_OVERRIDE
|
||||
L_ORDINAL_OVERRIDE
|
||||
#else
|
||||
switch(d) {
|
||||
case 1:
|
||||
case 21:
|
||||
case 31: plu = "st"; break;
|
||||
|
||||
case 2:
|
||||
case 22: plu = "nd"; break;
|
||||
|
||||
case 3:
|
||||
case 23: plu = "rd"; break;
|
||||
|
||||
default: plu = "th"; break;
|
||||
}
|
||||
#endif
|
||||
|
||||
while(1) {
|
||||
c = ParseChar(p, &err, 0);
|
||||
if (err) return err;
|
||||
if (c == '\n') continue;
|
||||
if (!c) {
|
||||
if (mode != CAL_MODE && t->typ != RUN_TYPE && !MsgCommand)
|
||||
*s++ = '\n';
|
||||
*s++ = 0;
|
||||
break;
|
||||
}
|
||||
if (c != '%') {
|
||||
*s++ = c;
|
||||
continue;
|
||||
}
|
||||
c = ParseChar(p, &err, 0);
|
||||
if (err) return err;
|
||||
if (!c) {
|
||||
*s++ = 0;
|
||||
break;
|
||||
}
|
||||
os = s;
|
||||
done = 0;
|
||||
if (diff <= 1) {
|
||||
switch(UPPER(c)) {
|
||||
#ifndef L_NOTOMORROW_A
|
||||
case 'A':
|
||||
#endif
|
||||
#ifndef L_NOTOMORROW_B
|
||||
case 'B':
|
||||
#endif
|
||||
#ifndef L_NOTOMORROW_C
|
||||
case 'C':
|
||||
#endif
|
||||
#ifndef L_NOTOMORROW_E
|
||||
case 'E':
|
||||
#endif
|
||||
#ifndef L_NOTOMORROW_F
|
||||
case 'F':
|
||||
#endif
|
||||
#ifndef L_NOTOMORROW_G
|
||||
case 'G':
|
||||
#endif
|
||||
#ifndef L_NOTOMORROW_H
|
||||
case 'H':
|
||||
#endif
|
||||
#ifndef L_NOTOMORROW_I
|
||||
case 'I':
|
||||
#endif
|
||||
#ifndef L_NOTOMORROW_J
|
||||
case 'J':
|
||||
#endif
|
||||
#ifndef L_NOTOMORROW_K
|
||||
case 'K':
|
||||
#endif
|
||||
#ifndef L_NOTOMORROW_L
|
||||
case 'L':
|
||||
#endif
|
||||
#ifndef L_NOTOMORROW_U
|
||||
case 'U':
|
||||
#endif
|
||||
#ifndef L_NOTOMORROW_V
|
||||
case 'V':
|
||||
#endif
|
||||
sprintf(s, "%s", (diff ? TOMORROW : TODAY));
|
||||
s += strlen(s);
|
||||
done = 1;
|
||||
break;
|
||||
|
||||
default: done = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (!done) switch(UPPER(c)) {
|
||||
case 'A':
|
||||
#ifdef L_A_OVER
|
||||
L_A_OVER
|
||||
#else
|
||||
sprintf(s, "%s %s, %d %s, %d", L_ON, DayName[jul%7], d,
|
||||
MonthName[m], y);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'B':
|
||||
#ifdef L_B_OVER
|
||||
L_B_OVER
|
||||
#else
|
||||
sprintf(s, L_INXDAYS, diff);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'C':
|
||||
#ifdef L_C_OVER
|
||||
L_C_OVER
|
||||
#else
|
||||
sprintf(s, "%s %s", L_ON, DayName[jul%7]);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
#ifdef L_D_OVER
|
||||
L_D_OVER
|
||||
#else
|
||||
sprintf(s, "%d", d);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'E':
|
||||
#ifdef L_E_OVER
|
||||
L_E_OVER
|
||||
#else
|
||||
sprintf(s, "%s %02d%c%02d%c%04d", L_ON, d, DATESEP,
|
||||
m+1, DATESEP, y);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'F':
|
||||
#ifdef L_F_OVER
|
||||
L_F_OVER
|
||||
#else
|
||||
sprintf(s, "%s %02d%c%02d%c%04d", L_ON, m+1, DATESEP, d, DATESEP, y);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'G':
|
||||
#ifdef L_G_OVER
|
||||
L_G_OVER
|
||||
#else
|
||||
sprintf(s, "%s %s, %d %s", L_ON, DayName[jul%7], d, MonthName[m]);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'H':
|
||||
#ifdef L_H_OVER
|
||||
L_H_OVER
|
||||
#else
|
||||
sprintf(s, "%s %02d%c%02d", L_ON, d, DATESEP, m+1);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'I':
|
||||
#ifdef L_I_OVER
|
||||
L_I_OVER
|
||||
#else
|
||||
sprintf(s, "%s %02d%c%02d", L_ON, m+1, DATESEP, d);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'J':
|
||||
#ifdef L_J_OVER
|
||||
L_J_OVER
|
||||
#else
|
||||
sprintf(s, "%s %s, %s %d%s, %d", L_ON, DayName[jul%7],
|
||||
MonthName[m], d, plu, y);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'K':
|
||||
#ifdef L_K_OVER
|
||||
L_K_OVER
|
||||
#else
|
||||
sprintf(s, "%s %s, %s %d%s", L_ON, DayName[jul%7],
|
||||
MonthName[m], d, plu);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
#ifdef L_L_OVER
|
||||
L_L_OVER
|
||||
#else
|
||||
sprintf(s, "%s %04d%c%02d%c%02d", L_ON, y, DATESEP, m+1, DATESEP, d);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
#ifdef L_M_OVER
|
||||
L_M_OVER
|
||||
#else
|
||||
sprintf(s, "%s", MonthName[m]);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'N':
|
||||
#ifdef L_N_OVER
|
||||
L_N_OVER
|
||||
#else
|
||||
sprintf(s, "%d", m+1);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'O':
|
||||
#ifdef L_O_OVER
|
||||
L_O_OVER
|
||||
#else
|
||||
if (RealToday == JulianToday) sprintf(s, " (%s)", L_TODAY);
|
||||
else *s = 0;
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'P':
|
||||
#ifdef L_P_OVER
|
||||
L_P_OVER
|
||||
#else
|
||||
sprintf(s, (diff == 1 ? "" : L_PLURAL));
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'Q':
|
||||
#ifdef L_Q_OVER
|
||||
L_Q_OVER
|
||||
#else
|
||||
sprintf(s, (diff == 1 ? "'s" : "s'"));
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'R':
|
||||
#ifdef L_R_OVER
|
||||
L_R_OVER
|
||||
#else
|
||||
sprintf(s, "%02d", d);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
#ifdef L_S_OVER
|
||||
L_S_OVER
|
||||
#else
|
||||
sprintf(s, plu);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'T':
|
||||
#ifdef L_T_OVER
|
||||
L_T_OVER
|
||||
#else
|
||||
sprintf(s, "%02d", m+1);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'U':
|
||||
#ifdef L_U_OVER
|
||||
L_U_OVER
|
||||
#else
|
||||
sprintf(s, "%s %s, %d%s %s, %d", L_ON, DayName[jul%7], d,
|
||||
plu, MonthName[m], y);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'V':
|
||||
#ifdef L_V_OVER
|
||||
L_V_OVER
|
||||
#else
|
||||
sprintf(s, "%s %s, %d%s %s", L_ON, DayName[jul%7], d, plu,
|
||||
MonthName[m]);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'W':
|
||||
#ifdef L_W_OVER
|
||||
L_W_OVER
|
||||
#else
|
||||
sprintf(s, DayName[jul%7]);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'X':
|
||||
#ifdef L_X_OVER
|
||||
L_X_OVER
|
||||
#else
|
||||
sprintf(s, "%d", diff);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'Y':
|
||||
#ifdef L_Y_OVER
|
||||
L_Y_OVER
|
||||
#else
|
||||
sprintf(s, "%d", y);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case 'Z':
|
||||
#ifdef L_Z_OVER
|
||||
L_Z_OVER
|
||||
#else
|
||||
sprintf(s, "%d", y % 100);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case '1':
|
||||
#ifdef L_1_OVER
|
||||
L_1_OVER
|
||||
#else
|
||||
if (tdiff == 0)
|
||||
sprintf(s, L_NOW);
|
||||
else if (hdiff == 0)
|
||||
sprintf(s, "%d %s%s %s", mdiff, L_MINUTE, mplu, when);
|
||||
else if (mdiff == 0)
|
||||
sprintf(s, "%d %s%s %s", hdiff, L_HOUR, hplu, when);
|
||||
else
|
||||
sprintf(s, "%d %s%s %s %d %s%s %s", hdiff, L_HOUR, hplu,
|
||||
L_AND, mdiff, L_MINUTE, mplu, when);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case '2':
|
||||
#ifdef L_2_OVER
|
||||
L_2_OVER
|
||||
#else
|
||||
sprintf(s, "%s %d%c%02d%s", L_AT, hh, TIMESEP, min, pm);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case '3':
|
||||
#ifdef L_3_OVER
|
||||
L_3_OVER
|
||||
#else
|
||||
|
||||
sprintf(s, "%s %02d%c%02d", L_AT, h, TIMESEP, min);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case '4':
|
||||
#ifdef L_4_OVER
|
||||
L_4_OVER
|
||||
#else
|
||||
sprintf(s, "%d", tdiff);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case '5':
|
||||
#ifdef L_5_OVER
|
||||
L_5_OVER
|
||||
#else
|
||||
sprintf(s, "%d", adiff);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case '6':
|
||||
#ifdef L_6_OVER
|
||||
L_6_OVER
|
||||
#else
|
||||
sprintf(s, when);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case '7':
|
||||
#ifdef L_7_OVER
|
||||
L_7_OVER
|
||||
#else
|
||||
sprintf(s, "%d", hdiff);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case '8':
|
||||
#ifdef L_8_OVER
|
||||
L_8_OVER
|
||||
#else
|
||||
sprintf(s, "%d", mdiff);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case '9':
|
||||
#ifdef L_9_OVER
|
||||
L_9_OVER
|
||||
#else
|
||||
sprintf(s, mplu);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case '0':
|
||||
#ifdef L_0_OVER
|
||||
L_0_OVER
|
||||
#else
|
||||
sprintf(s, hplu);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case '!':
|
||||
#ifdef L_BANG_OVER
|
||||
L_BANG_OVER
|
||||
#else
|
||||
sprintf(s, (tdiff >= 0 ? L_IS : L_WAS));
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case '@':
|
||||
#ifdef L_AT_OVER
|
||||
L_AT_OVER
|
||||
#else
|
||||
sprintf(s, "%d%c%02d%s", chh, TIMESEP, cmin, cpm);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case '#':
|
||||
#ifdef L_HASH_OVER
|
||||
L_HASH_OVER
|
||||
#else
|
||||
sprintf(s, "%02d%c%02d", ch, TIMESEP, cmin);
|
||||
#endif
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case '_':
|
||||
if (mode != CAL_MODE && !MsgCommand)
|
||||
sprintf(s, "%s", NL);
|
||||
else
|
||||
sprintf(s, " ");
|
||||
s += strlen(s);
|
||||
break;
|
||||
|
||||
case QUOTE_MARKER:
|
||||
/* Swallow any QUOTE_MARKERs which may somehow creep in... */
|
||||
break;
|
||||
|
||||
case '"':
|
||||
*s++ = QUOTE_MARKER;
|
||||
has_quote = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
*s++ = c;
|
||||
}
|
||||
if (isupper(c)) *os = UPPER(*os);
|
||||
}
|
||||
|
||||
/* We're outside the big while loop. The only way to get here is for c to
|
||||
be null. Now we go through and delete %" sequences, if it's the
|
||||
NORMAL_MODE, or retain only things within a %" sequence if it's the
|
||||
CAL_MODE. */
|
||||
|
||||
/* If there are NO quotes, then: If CAL_MODE && RUN_TYPE, we don't want the
|
||||
reminder in the calendar. Zero the output buffer and quit. */
|
||||
if (!has_quote) {
|
||||
if (mode == CAL_MODE && t->typ == RUN_TYPE) *out = 0;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/* There ARE quotes. If in CAL_MODE, delete everything before first quote
|
||||
and after second quote. If in NORMAL_MODE, delete the %" sequences. */
|
||||
|
||||
s = out;
|
||||
os = out;
|
||||
if (mode == NORMAL_MODE) {
|
||||
while (*s) {
|
||||
if (*s != QUOTE_MARKER) *os++ = *s;
|
||||
s++;
|
||||
}
|
||||
*os = 0;
|
||||
} else {
|
||||
|
||||
/* Skip past the quote marker */
|
||||
while (*s && (*s != QUOTE_MARKER)) s++;
|
||||
|
||||
/* Security check... actually, *s must == QUOTE_MARKER at this point, but
|
||||
it doesn't hurt to make it a bit robust. */
|
||||
if (*s) s++;
|
||||
|
||||
/* Copy the output until the next QUOTE_MARKER */
|
||||
while (*s && (*s != QUOTE_MARKER)) *os++ = *s++;
|
||||
*os = 0;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* DoSubstFromString */
|
||||
/* */
|
||||
/* DoSubst consumes input from a parser. This function */
|
||||
/* consumes characters from a string. It also provides */
|
||||
/* default triggers and a mode of NORMAL_MODE. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC int DoSubstFromString(char *source, char *dest, int jul, int tim)
|
||||
#else
|
||||
int DoSubstFromString(source, dest, jul, tim)
|
||||
char *source;
|
||||
char *dest;
|
||||
int jul;
|
||||
int tim;
|
||||
#endif
|
||||
{
|
||||
Trigger tempTrig;
|
||||
TimeTrig tempTime;
|
||||
Parser tempP;
|
||||
int r;
|
||||
|
||||
if (jul == NO_DATE) jul=JulianToday;
|
||||
if (tim == NO_TIME) tim=SystemTime(0)/60;
|
||||
CreateParser(source, &tempP);
|
||||
tempP.allownested = 0;
|
||||
tempTrig.typ = MSG_TYPE;
|
||||
tempTime.ttime = tim;
|
||||
|
||||
r = DoSubst(&tempP, dest, &tempTrig, &tempTime, jul, NORMAL_MODE);
|
||||
DestroyParser(&tempP);
|
||||
return r;
|
||||
}
|
||||
19
examples/alignment.rem
Normal file
19
examples/alignment.rem
Normal file
@@ -0,0 +1,19 @@
|
||||
# Demo the columns() function
|
||||
#
|
||||
# Run as: remind -@2 alignment.rem
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
SET $AddBlankLines 0
|
||||
BANNER %
|
||||
|
||||
FSET center(x) pad("", " ", (columns() - columns(x))/2) + x
|
||||
FSET right(x) pad("", " ", columns() - columns(x)) + x
|
||||
|
||||
MSG This is left-aligned.
|
||||
MSG [ansicolor(0,255,0)]🌕 🌕 🌕 🌕 This is also left-aligned.[ansicolor("")]
|
||||
|
||||
MSG [center("This is centered.")]
|
||||
MSG [ansicolor(255,255,0) + center("🌕 🌕 🌕 🌕 This is also centered. ") + ansicolor("")]
|
||||
|
||||
msg [right("This is right-aligned.")]
|
||||
msg [ansicolor(255,0,0) + right("This is also right-aligned. 🌕 🌕 🌕") + ansicolor("")]
|
||||
36
examples/ansitext
Executable file
36
examples/ansitext
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# A little demo script that displays ANSI text attributes
|
||||
# Not all attributes work on all terminals... your mileage may vary.
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
remind -@2 - <<'EOF'
|
||||
|
||||
SET $AddBlankLines 0
|
||||
BANNER %
|
||||
INCLUDE [$SysInclude]/ansitext.rem
|
||||
MSG This file shows off some ANSI text attributes and colors.
|
||||
MSG Not all attributes work on all terminals.%_
|
||||
|
||||
MSG This is [ansi_bold]bold.[ansi_normal]
|
||||
MSG This is [ansi_faint]faint.[ansi_normal]
|
||||
MSG This is [ansi_italic]italic.[ansi_normal]
|
||||
MSG This is [ansi_underline]underline.[ansi_normal]
|
||||
MSG This is [ansi_underline2]underline2.[ansi_normal]%_
|
||||
MSG This is [ansi_reverse]reverse.[ansi_normal]%_
|
||||
MSG This is [ansi_strikeout]strikeout.[ansi_normal]%_
|
||||
MSG This is [ansi_overline]overline.[ansi_normal]%_
|
||||
|
||||
MSG This is [ansicolor(255,0,0)]red.[ansicolor("")]
|
||||
MSG This is [ansicolor(0,255,0)]green.[ansicolor("")]
|
||||
MSG This is [ansicolor(0,0,255)]blue.[ansicolor("")]
|
||||
MSG This is [ansicolor(255,255,0)]yellow.[ansicolor("")]
|
||||
MSG This is [ansicolor(255,0,255)]magenta.[ansicolor("")]
|
||||
MSG This is [ansicolor(0,255,255)]cyan.[ansicolor("")]%_
|
||||
|
||||
# You can combine attributes
|
||||
MSG This is [ansicolor(0,255,0)][ansicolor(0,0,96,1)][ansi_italic][ansi_bold]Green-Bold-Italic-on-Blue[ansi_normal][ansicolor("")]
|
||||
|
||||
EOF
|
||||
|
||||
exit 0
|
||||
69
examples/astro
Executable file
69
examples/astro
Executable file
@@ -0,0 +1,69 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# A little demo script that displays astronomical events
|
||||
#
|
||||
# Best used in a UTF-8 environment.
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
# Set this variable to 1 if your terminal has a dark background or 0 if
|
||||
# it: light.
|
||||
|
||||
# Set your latitude and longitude correctly for Sunrise/Sunset/Equinox/Solstice
|
||||
#
|
||||
# The values below are for Ottawa, Ontario, Canada
|
||||
latitude="45.420556"
|
||||
longitude="-75.689722"
|
||||
|
||||
remind -g "-i\$Latitude=\"$latitude\"" "-i\$Longitude=\"$longitude\"" -q -@2 - "$@" <<'EOF'
|
||||
SET $AddBlankLines 0
|
||||
BANNER %
|
||||
|
||||
INCLUDE [$SysInclude]/ansitext.rem
|
||||
|
||||
MSG Today is [ansi_bold][$T][ansi_normal], being the [ord($T-date(year($T),1,1)+1)] day of [year($T)].%_
|
||||
|
||||
IF $TerminalBackground == 0
|
||||
SPECIAL COLOR 255 255 0 Sunrise: 🌅 [sunrise()] today and [sunrise($T+1)] tomorrow
|
||||
SPECIAL COLOR 255 128 0 Sunset: 🌇 [sunset()] today and [sunset($T+1)] tomorrow%_
|
||||
ELSE
|
||||
SPECIAL COLOR 128 128 0 Sunrise: 🌅 [sunrise()] today and [sunrise($T+1)] tomorrow
|
||||
SPECIAL COLOR 128 32 0 Sunset: 🌇 [sunset()] today and [sunset($T+1)] tomorrow%_
|
||||
|
||||
ENDIF
|
||||
EOF
|
||||
|
||||
remind -g "-i\$Latitude=\"$latitude\"" "-i\$Longitude=\"$longitude\"" -q -@2 - "$@" <<'EOF'
|
||||
SET $AddBlankLines 0
|
||||
BANNER %
|
||||
IF $TerminalBackground == 0
|
||||
REM [moondatetime(0)] +60 SPECIAL COLOR 255 255 0 New moon: 🌑 [$T] %3 (%b)
|
||||
REM [moondatetime(1)] +60 SPECIAL COLOR 255 255 128 First Quarter: 🌓 [$T] %3 (%b)
|
||||
REM [moondatetime(2)] +60 SPECIAL COLOR 255 255 255 Full moon: 🌕 [$T] %3 (%b)
|
||||
REM [moondatetime(3)] +60 SPECIAL COLOR 255 255 128 Last Quarter: 🌗 [$T] %3 (%b)
|
||||
ELSE
|
||||
REM [moondatetime(0)] +60 SPECIAL COLOR 128 128 0 New moon: 🌑 [$T] %3 (%b)
|
||||
REM [moondatetime(1)] +60 SPECIAL COLOR 128 128 64 First Quarter: 🌓 [$T] %3 (%b)
|
||||
REM [moondatetime(2)] +60 SPECIAL COLOR 0 0 0 Full moon: 🌕 [$T] %3 (%b)
|
||||
REM [moondatetime(3)] +60 SPECIAL COLOR 128 128 64 Last Quarter: 🌗 [$T] %3 (%b)
|
||||
ENDIF
|
||||
EOF
|
||||
|
||||
echo ""
|
||||
|
||||
remind -g "-i\$Latitude=\"$latitude\"" "-i\$Longitude=\"$longitude\"" -q -@2 - "$@" <<'EOF'
|
||||
SET $AddBlankLines 0
|
||||
BANNER %
|
||||
|
||||
IF $LatDeg >= 0
|
||||
REM [soleq(0)] +366 MSG Next Vernal Equinox: 🌼 [$T] %3 (%b)
|
||||
REM [soleq(1)] +366 MSG Next Summer Solstice: 😎 [$T] %3 (%b)
|
||||
REM [soleq(2)] +366 MSG Next Autumnal Equinox: 🍂 [$T] %3 (%b)
|
||||
REM [soleq(3)] +366 MSG Next Winter Solstice: ❄️ [$T] %3 (%b)
|
||||
ELSE
|
||||
REM [soleq(0)] +366 MSG Next Autumnal Equinox: 🍂 [$T] %3 (%b)
|
||||
REM [soleq(1)] +366 MSG Next Winter Solstice: ❄️ [$T] %3 (%b)
|
||||
REM [soleq(2)] +366 MSG Next Vernal Equinox: 🌼 [$T] %3 (%b)
|
||||
REM [soleq(3)] +366 MSG Next Summer Solstice: 😎 [$T] %3 (%b)
|
||||
ENDIF
|
||||
|
||||
EOF
|
||||
454
examples/defs.rem
Normal file
454
examples/defs.rem
Normal file
@@ -0,0 +1,454 @@
|
||||
#############################################################################
|
||||
# #
|
||||
# DEFS.REM #
|
||||
# #
|
||||
# This file is a reminder script, which contains a few handy definitions. #
|
||||
# Cut and paste as desired! Also, near the end, there are a bunch of #
|
||||
# holiday definitions for the U.S. #
|
||||
# #
|
||||
# Some examples provided by George M. Sipe <gsipe@pyratl.ga.pyramid.com> #
|
||||
# #
|
||||
# U.S. holidays provided by Dave Rickel <drickel@sjc.mentorg.com> #
|
||||
# #
|
||||
# Use your text editor to search for: #
|
||||
# "#USHOLS" for U.S. holidays #
|
||||
# "#JHOLS" for Jewish holidays #
|
||||
# "#PSSTUFF" for nifty PostScript examples #
|
||||
# #
|
||||
# This file is part of REMIND. #
|
||||
# Copyright (C) 1992-2023 Dianne Skoll #
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
# #
|
||||
#############################################################################
|
||||
|
||||
RUN OFF
|
||||
|
||||
################################################
|
||||
# Ensure required version of remind is used... #
|
||||
################################################
|
||||
IF version() < "03.04.02"
|
||||
ERRMSG This file requires at least version 03.01.10 of Remind.%
|
||||
ERRMSG This version is version [version()].
|
||||
EXIT
|
||||
ENDIF
|
||||
|
||||
###########################################################
|
||||
# Symbolic constants and functions for "pasting"... #
|
||||
###########################################################
|
||||
SET Quote CHAR(34)
|
||||
|
||||
# Handy constants/function for specifying week of month...
|
||||
SET Week_1 1
|
||||
SET Week_2 8
|
||||
SET Week_3 15
|
||||
SET Week_4 22
|
||||
|
||||
#################################################################
|
||||
# Function that removes a single leading zero from a string... #
|
||||
#################################################################
|
||||
FSET _no_lz(s) IIF(SUBSTR(s, 1, 1)=="0", SUBSTR(s, 2), s)
|
||||
|
||||
#################################################################
|
||||
# Return the length of the daylight/night portion of a date, #
|
||||
# in minutes. #
|
||||
#################################################################
|
||||
FSET _light_len(date) MAX(SUNSET(date)-SUNRISE(date), 0)
|
||||
FSET _dark_len(date) 1440-_light_len(date)
|
||||
|
||||
############################################################
|
||||
# Function to calculate number of years since a given year #
|
||||
# or number of months since a given month and year... #
|
||||
############################################################
|
||||
FSET _yr_num(yr) ORD($Ty - yr)
|
||||
FSET _mo_num(mo, yr) ORD(12 * ($Ty - yr) + $Tm - mo)
|
||||
|
||||
# Here's an example of how to use them:
|
||||
REM 1 Nov ++12 MSG %"John's [_yr_num(1984)] birthday%" is %b.
|
||||
REM 1 MSG John's [_mo_num(11, 1984)] 'monthly' anniversary
|
||||
|
||||
#############################################################################
|
||||
# Here's a tricky problem: The 4th of July is a holiday in the U.S.
|
||||
# However, if it falls on a Saturday, the previous Friday is a holiday.
|
||||
# If it falls on a Sunday, the next Monday is a holiday. Here's how
|
||||
# to do it.
|
||||
#
|
||||
# For those reminders that update the OMIT context with ADDOMIT, we use
|
||||
# SCANFROM -7 for safety; see the man page about moveable OMITs.
|
||||
############################################################################
|
||||
|
||||
# If it falls on a Saturday, bump to previous Friday
|
||||
REM 3 JULY SCANFROM -7 ADDOMIT SATISFY [$Tw == 5] MSG Independence day (observed)
|
||||
|
||||
# If it falls on a Sunday, bump to following Monday
|
||||
REM 5 July SCANFROM -7 ADDOMIT SATISFY [$Tw == 1] MSG Independence day (observed)
|
||||
|
||||
# If it falls on Sat or Sun, note the actual day
|
||||
REM 4 July SCANFROM -7 ADDOMIT SATISFY [$Tw == 0 || $Tw == 6] MSG Independence day (actual)
|
||||
|
||||
# Otherwise observed and actual is on the 4th
|
||||
REM 4 July SCANFROM -7 ADDOMIT SATISFY [$Tw >= 1 && $Tw <= 5] MSG Independence Day
|
||||
|
||||
##########################################################################
|
||||
# #
|
||||
# On our UNIX system, I run a program that queries the university #
|
||||
# library and creates a file called ".booksdue". This file is #
|
||||
# a REMIND script to tell me when my library books are due. Here's #
|
||||
# an example from my reminder file - it shows the use of filedate(). #
|
||||
# When the .booksdue file is at least 7 days old, I create a new version #
|
||||
# by querying the library computer. Note the use of realtoday() rather #
|
||||
# than today(). #
|
||||
# #
|
||||
##########################################################################
|
||||
IF !$RunOff && !$CalMode && !$SimpleCal
|
||||
IF REALTODAY()-FILEDATE("/home/dfs/.booksdue") >= 7
|
||||
REM RUN /home/dfs/bilge/library/getbooks
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
#PSSTUFF1
|
||||
##########################################################################
|
||||
# #
|
||||
# This portion of the file contains some cute examples of the new #
|
||||
# PS-type reminders. You need a PostScript printer or viewer to #
|
||||
# appreciate these. To use them, pipe the output of remind -p into the #
|
||||
# rem2ps program. More examples are in the PSSTUFF2 section, below. #
|
||||
# #
|
||||
##########################################################################
|
||||
|
||||
# The following reminder will shade the Saturday and Sunday calendar
|
||||
# entries.
|
||||
REM Sat Sun SPECIAL SHADE 220
|
||||
|
||||
#USHOLS
|
||||
#############################################################################
|
||||
# #
|
||||
# The following holidays were provided by Dave Rickel #
|
||||
# Modified by D. Skoll to give safe OMITs for moveable holidays #
|
||||
# #
|
||||
# NOTE: See include/holidays/us.rem for more up-to-date definitions #
|
||||
# #
|
||||
#############################################################################
|
||||
|
||||
SET SaveTrig $NumTrig
|
||||
SET easter EASTERDATE($Uy)
|
||||
REM [easter-46] MSG %"Ash Wednesday%"
|
||||
REM [easter-7] MSG %"Palm Sunday%"
|
||||
OMIT [easter-2] MSG %"Good Friday%"
|
||||
OMIT [easter] MSG %"Easter%" Sunday
|
||||
REM [easter+39] MSG %"Ascension Day%"
|
||||
REM [easter+49] MSG %"Pentecost%"
|
||||
|
||||
# Some holidays are omitted, some are not. You may want to change
|
||||
# which ones are omitted - use the general forms shown below. You'll
|
||||
# need the Week_n variables defined way up in the file.
|
||||
|
||||
OMIT Jan 1 MSG %"New Year's Day%"
|
||||
REM Third Monday in Jan MSG Martin Luther King - %"MLK Day%"
|
||||
REM Feb 2 MSG %"Ground Hog Day%"
|
||||
REM Feb 14 MSG %"Valentine's Day%"
|
||||
REM Third Monday in Feb SCANFROM -7 ADDOMIT MSG %"President's Day%"
|
||||
REM Mar 17 MSG %"St. Patrick's Day%"
|
||||
|
||||
# The DST rules are accurate for most locations in
|
||||
# North America
|
||||
REM Sun Apr 1 ++2 UNTIL 1 Jan 2007 MSG Daylight Saving Time - %"DST starts%" %b
|
||||
REM Sun Mar 8 ++2 FROM 1 Jan 2007 MSG Daylight Saving Time - %"DST starts%" %b
|
||||
|
||||
REM Last Sunday in October ++2 UNTIL 1 Jan 2007 MSG Daylight Saving Time - %"DST ends%" %b
|
||||
REM First Sunday in November ++2 FROM 1 Jan 2007 MSG Daylight Saving Time - %"DST ends%" %b
|
||||
|
||||
REM Apr 1 MSG %"April Fool's%" Day
|
||||
|
||||
# US Tax Day
|
||||
PUSH-OMIT-CONTEXT
|
||||
# Normal case: 16 April falls Mon-Fri
|
||||
REM 16 Apr SCANFROM -7 ADDOMIT SATISFY [$Tw >= 1 && $Tw <= 5] MSG Emancipation Day
|
||||
|
||||
# 16 April falls on Saturday: Observe on the 15th
|
||||
REM 15 Apr SCANFROM -7 ADDOMIT SATISFY [$Tw == 5] MSG Emancipation Day (observed)
|
||||
|
||||
# 16 April falls on Sunday: Observe on the 17th
|
||||
REM 17 Apr SCANFROM -7 ADDOMIT SATISFY [$Tw == 1] MSG Emancipation Day (observed)
|
||||
|
||||
# If you live in Maine or Massachussetts, uncomment the next line
|
||||
# REM Third Monday in April SCANFROM -7 ADDOMIT MSG Patriots Day
|
||||
|
||||
REM Apr 15 OMIT Sat Sun AFTER MSG Tax Day
|
||||
POP-OMIT-CONTEXT
|
||||
|
||||
REM May 5 MSG %"Cinco de Mayo%"
|
||||
REM First Sat in May MSG %"Kentucky Derby%"
|
||||
REM Second Sun in May MSG %"Mother's Day%"
|
||||
REM Third Sat in May MSG %"Armed Forces Day%"
|
||||
REM Last Monday in May SCANFROM -7 ADDOMIT MSG %"Memorial Day%"
|
||||
REM Jun 14 MSG %"Flag Day%"
|
||||
REM Third Sun in June MSG %"Father's Day%"
|
||||
REM First Mon in Sep SCANFROM -7 ADDOMIT MSG %"Labor Day%"
|
||||
REM Second Mon in Oct MSG %"Columbus Day%"
|
||||
REM Nov 11 MSG %"Veterans Day%"
|
||||
|
||||
REM Oct 30 MSG %"Mischief Night%"
|
||||
REM Oct 31 MSG %"Halloween%"
|
||||
REM Tue Nov 2 SCANFROM -7 SATISFY [($Ty % 4) == 0] MSG %"Election Day%"
|
||||
REM Thu Nov [Week_4] SCANFROM -7 ADDOMIT MSG %"Thanksgiving Day%"
|
||||
REM Fri Nov [Week_4+1] SCANFROM -7 ADDOMIT MSG %"Thanksgiving (cont.)%"
|
||||
OMIT Dec 24 MSG %"Christmas Eve%"
|
||||
OMIT Dec 25 MSG %"Christmas%" Day
|
||||
|
||||
##########################################################################
|
||||
# #
|
||||
# If any US holidays were triggered above, shade in the calendar #
|
||||
# entry in PostScript. #
|
||||
# #
|
||||
##########################################################################
|
||||
if $NumTrig > SaveTrig
|
||||
REM SPECIAL SHADE 220
|
||||
endif
|
||||
|
||||
############################################################################
|
||||
# A meeting on the first Monday of every month which is moved to the #
|
||||
# second Monday in the event of a holiday. #
|
||||
############################################################################
|
||||
|
||||
# First, the normal meeting. However, the SKIP keyword means this
|
||||
# one won't be triggered if the first Monday is a holiday
|
||||
REM First Monday SKIP MSG Meeting
|
||||
|
||||
# Now, calculate the "potential" delayed meeting
|
||||
REM Second Monday SATISFY 1
|
||||
|
||||
# But only actually trigger the delayed meeting if the previous
|
||||
# Monday was a holiday
|
||||
IF ISOMITTED($T-7)
|
||||
REM [$T] MSG Delayed meeting
|
||||
ENDIF
|
||||
|
||||
#PSSTUFF2
|
||||
##########################################################################
|
||||
# #
|
||||
# Since the SHADE special blots out any previous PostScript #
|
||||
# reminders for a date, these examples need to follow the US Holidays #
|
||||
# section, which uses SHADE. #
|
||||
# #
|
||||
##########################################################################
|
||||
|
||||
# The following will fill in the Hebrew dates on the calendar. For this
|
||||
# example, I recommend that you use the -sd 10 option for Rem2PS.
|
||||
REM PS Border Border moveto \
|
||||
/DayFont findfont DaySize scalefont setfont \
|
||||
([hebday($U)] [hebmon($U)]) show
|
||||
|
||||
# Fill in the phases of the moon on the PostScript calendar
|
||||
REM [moondate(0)] SPECIAL MOON 0
|
||||
REM [moondate(1)] SPECIAL MOON 1
|
||||
REM [moondate(2)] SPECIAL MOON 2
|
||||
REM [moondate(3)] SPECIAL MOON 3
|
||||
|
||||
# The following example puts sunrise and sunset times in PostScript in the
|
||||
# calendar - the sizes are hard-coded, however, and work best in landscape.
|
||||
REM PS Border Border 5 sub moveto \
|
||||
/SmallFont findfont 4 scalefont setfont \
|
||||
(Sunrise: [sunrise($T)] Sunset: [sunset($T)]) show
|
||||
|
||||
# The next one puts the day number (1-366) and days left in the year at the
|
||||
# bottom of the post-script calendar. Again, the hard-coded sizes work best
|
||||
# in landscape.
|
||||
FSET _DayOfYear(x) x-(date(year(x),1,1) - 1)
|
||||
REM PS BoxWidth 3 mul 4 div Border 5 sub moveto \
|
||||
/SmallFont findfont 4 scalefont setfont \
|
||||
([_DayOfYear($U)]([365+isleap($U)-_DayOfYear($U)])) show
|
||||
|
||||
#JHOLS
|
||||
##########################################################################
|
||||
# #
|
||||
# This portion of the file contains reminders for Jewish holidays. The #
|
||||
# dates were obtained from "The First Jewish Catalog" by Richard Siegel #
|
||||
# and Michael and Sharon Strassfeld, published by the Jewish Publication #
|
||||
# Society of America. The Reform version of the calendar was guessed #
|
||||
# at by Dianne Skoll based on experience. There is probably no standard #
|
||||
# Reform position on many of the holidays, so you may have to adjust #
|
||||
# the file as required. #
|
||||
# #
|
||||
# Additional corrections were made from the paper "Calendrical #
|
||||
# Calculations" by Nachum Dershowitz and Edward M. Reingold. Any #
|
||||
# further corrections are welcome. #
|
||||
# #
|
||||
##########################################################################
|
||||
|
||||
# Here are some general functions that you might find nice to use
|
||||
|
||||
# _hstr: Returns a string which is the full Hebrew date of its argument.
|
||||
# Example: hstr('1994/02/02') returns "21 Shvat 5754"
|
||||
FSET _hstr(x) HEBDAY(x) + " " + HEBMON(x) + " " + HEBYEAR(x)
|
||||
|
||||
# _hyrlen: Return the length of the specified Hebrew year
|
||||
# Example: _hyrlen(5754) returns 355
|
||||
FSET _hyrlen(x) HEBDATE(1, "Tishrey", x+1) - HEBDATE(1, "Tishrey", x)
|
||||
|
||||
# --- HERE ARE THE JEWISH HOLIDAYS ---
|
||||
# Set the variable InIsrael to 1 if you live in Israel. Otherwise,
|
||||
# you get the Diaspora versions of Jewish holidays
|
||||
SET InIsrael 0
|
||||
|
||||
# Set the variable Reform to 1 if you want the Reform version of the
|
||||
# Jewish calendar. Otherwise, you get the traditional version
|
||||
SET Reform 0
|
||||
|
||||
# Convenient function definition to save typing
|
||||
FSET _h(x, y) HEBDATE(x,y)
|
||||
FSET _h2(x, y) HEBDATE(x, y, $U-7)
|
||||
FSET _PastSat(x, y) IIF(WKDAYNUM(_h2(x,y))!=6, _h2(x,y), _h2(x,y)+1)
|
||||
FSET _PastSun(x, y) IIF(WKDAYNUM(_h2(x,y))!=0, _h2(x,y), _h2(x,y)+1)
|
||||
FSET _PastMon(x, y) IIF(WKDAYNUM(_h2(x,y))!=1, _h2(x,y), _h2(x,y)+1)
|
||||
|
||||
# Default values in case InIsrael and Reform are not set
|
||||
SET InIsrael VALUE("InIsrael", 0)
|
||||
SET Reform VALUE("Reform", 0)
|
||||
|
||||
[_h(1, "Tishrey")] ++4 MSG %"Rosh Hashana 1%" is %b.
|
||||
|
||||
# No RH-2 or Tzom Gedalia in Reform
|
||||
IF !Reform
|
||||
[_h(2, "Tishrey")] ++4 MSG %"Rosh Hashana 2%" is %b.
|
||||
[_PastSat(3, "Tishrey")] ++4 MSG %"Tzom Gedalia%" is %b.
|
||||
ENDIF
|
||||
|
||||
[_h(10, "Tishrey")] ++4 MSG %"Yom Kippur%" is %b.
|
||||
[_h(15, "Tishrey")] ++4 MSG %"Sukkot 1%" is %b.
|
||||
|
||||
IF !InIsrael
|
||||
[_h(16, "Tishrey")] MSG %"Sukkot 2%"
|
||||
ENDIF
|
||||
|
||||
[_h(21, "Tishrey")] ++4 MSG %"Hoshana Rabba%" is %b.
|
||||
[_h(22, "Tishrey")] ++4 MSG %"Shemini Atzeret%" is %b.
|
||||
|
||||
IF InIsrael
|
||||
[_h(22, "Tishrey")] ++4 MSG %"Simchat Torah%" is %b.
|
||||
ELSE
|
||||
[_h(23, "Tishrey")] ++4 MSG %"Simchat Torah%" is %b.
|
||||
ENDIF
|
||||
|
||||
# Because Kislev can change length, we must be more careful about Chanukah
|
||||
FSET _chan(x) HEBDATE(24, "Kislev", $U-9)+x
|
||||
[_chan(1)] ++4 MSG %"Chanukah 1%" is %b.
|
||||
[_chan(2)] MSG %"Chanukah 2%"
|
||||
[_chan(3)] MSG %"Chanukah 3%"
|
||||
[_chan(4)] MSG %"Chanukah 4%"
|
||||
[_chan(5)] MSG %"Chanukah 5%"
|
||||
[_chan(6)] MSG %"Chanukah 6%"
|
||||
[_chan(7)] MSG %"Chanukah 7%"
|
||||
[_chan(8)] MSG %"Chanukah 8%"
|
||||
|
||||
# Not sure about Reform's position on the next one.
|
||||
IF !Reform
|
||||
# 10 Tevet will never be a Saturday, so whether or not to
|
||||
# move it is moot. (Thanks to Art Werschulz.)
|
||||
[_h(10, "Tevet")] MSG %"Tzom Tevet%" is %b.
|
||||
ENDIF
|
||||
|
||||
[_h(15, "Shvat")] ++4 MSG %"Tu B'Shvat%" is %b.
|
||||
[_h(14, "Adar A")] ++4 MSG %"Purim Katan%" is %b.
|
||||
[_h(15, "Adar A")] ++4 MSG %"Shushan Purim Katan%" is %b.
|
||||
|
||||
# If Purim is on Sunday, then Fast of Esther is 11 Adar.
|
||||
IF WKDAYNUM(_h2(13, "Adar")) != 6
|
||||
REM [_h2(13, "Adar")] ++4 MSG %"Fast of Esther%" is %b.
|
||||
ELSE
|
||||
REM [_h2(11, "Adar")] ++4 MSG %"Fast of Esther%" is %b.
|
||||
ENDIF
|
||||
[_h(14, "Adar")] ++4 MSG %"Purim%" is %b.
|
||||
[_h(15, "Adar")] ++4 MSG %"Shushan Purim%" is %b.
|
||||
[_h(15, "Nisan")] ++4 MSG %"Pesach%" is %b.
|
||||
|
||||
IF !InIsrael
|
||||
[_h(16, "Nisan")] MSG %"Pesach 2%"
|
||||
ENDIF
|
||||
|
||||
[_h(21, "Nisan")] MSG %"Pesach 7%"
|
||||
|
||||
IF !InIsrael && !Reform
|
||||
[_h(22, "Nisan")] MSG %"Pesach 8%"
|
||||
ENDIF
|
||||
|
||||
REM [_PastSun(27, "Nisan")] SATISFY 1
|
||||
|
||||
IF $Tw == 5
|
||||
REM [_PastSun(26, "Nisan")] ++4 MSG %"Yom HaShoah%" is %b.
|
||||
ELSE
|
||||
REM [_PastSun(27, "Nisan")] ++4 MSG %"Yom HaShoah%" is %b.
|
||||
ENDIF
|
||||
|
||||
# If 4 Iyar is a Thursday or Friday, then Yom Hazikaron is
|
||||
# the Wednesday before and Yom Ha'atzmaut is on
|
||||
# Thursday. If 4 Iyar is a Sunday, then Yom Hazikaron
|
||||
# moves to 5 Iyar and Yom Ha'atzmaut to 6 Iyar.
|
||||
IF WKDAYNUM(_h2(4, "Iyar")) == 4 || WKDAYNUM(_h2(4, "Iyar")) == 5
|
||||
[_h(2, "Iyar")] ++4 MSG %"Yom Hazikaron%" is %b.
|
||||
[_h(3, "Iyar")] ++4 MSG %"Yom Ha'atzmaut%" is %b.
|
||||
ELSE
|
||||
IF WKDAYNUM(_h2(4, "Iyar")) == 0
|
||||
[_h(5, "Iyar")] ++4 MSG %"Yom Hazikaron%" is %b.
|
||||
[_h(6, "Iyar")] ++4 MSG %"Yom Ha'atzmaut%" is %b.
|
||||
ELSE
|
||||
[_h(4, "Iyar")] ++4 MSG %"Yom Hazikaron%" is %b.
|
||||
[_h(5, "Iyar")] ++4 MSG %"Yom Ha'atzmaut%" is %b.
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
# Not sure about Reform's position on Lag B'Omer
|
||||
IF !Reform
|
||||
[_h(18, "Iyar")] ++4 MSG %"Lag B'Omer%" is %b.
|
||||
ENDIF
|
||||
|
||||
[_h(28, "Iyar")] ++4 MSG %"Yom Yerushalayim%" is %b.
|
||||
[_h(6, "Sivan")] ++4 MSG %"Shavuot%" is %b.
|
||||
|
||||
IF !InIsrael && !Reform
|
||||
[_h(7, "Sivan")] MSG %"Shavuot 2%"
|
||||
ENDIF
|
||||
|
||||
# Fairly sure Reform Jews don't observe the next two
|
||||
IF !Reform
|
||||
# Tzom Tamuz and Tish'a B'Av are moved to Sunday if they normally
|
||||
# fall on a Saturday
|
||||
[_PastSat(17, "Tamuz")] ++4 MSG %"Tzom Tammuz%" is %b.
|
||||
[_PastSat(9, "Av")] ++4 MSG %"Tish'a B'Av%" is %b.
|
||||
ENDIF
|
||||
|
||||
# Counting the omer - do the whole spiel, i.e:
|
||||
# "This is the xth day of the omer, being y weeks and z days of the omer."
|
||||
# Nice Remind programming example here!
|
||||
SET ostart HEBDATE(16, "Nisan", $U-50)
|
||||
IF ostart <= $U && ($U - ostart < 49)
|
||||
SET odays $U-ostart+1
|
||||
IF odays < 7
|
||||
MSG %"%"Today is the [ORD(odays)] day of the Omer.
|
||||
ELSE
|
||||
IF !(odays % 7)
|
||||
MSG %"%"Today is the [ORD(odays)] day of the Omer, being [odays / 7] [PLURAL(odays/7, "week")] of the Omer.
|
||||
ELSE
|
||||
MSG %"%"Today is the [ORD(odays)] day of the Omer, being [odays/7] [PLURAL(odays/7, "week")] and [odays%7] [PLURAL(odays%7, "day")] of the Omer.
|
||||
ENDIF
|
||||
ENDIF
|
||||
CAL [ORD(odays)] of Omer
|
||||
ENDIF
|
||||
|
||||
### Candle lighting and Havdalah. You should probably add candle lighting
|
||||
### for other holidays besides Shabbat. These just create calendar entries
|
||||
### for Friday and Saturday. Note: You must set your latitude, longitude
|
||||
### and possibly time zone for these to work properly!
|
||||
|
||||
REM Friday CAL Candle lighting at [sunset($T)-18]
|
||||
REM Saturday CAL Havdalah at [sunset($T)+42]
|
||||
|
||||
#COLORS
|
||||
|
||||
# Examples
|
||||
REM 1 SPECIAL COLOR 0 0 255 A blue reminder.
|
||||
REM 2 SPECIAL COLOR 255 0 0 %"A red reminder%" safe to use in the calendar mode.
|
||||
|
||||
# The next examples are great for putting right at the end of the reminder
|
||||
# file. They make queued reminders more eye-catching when they pop up.
|
||||
FSET msgprefix(x) char(13,10,13,10)+"******************"+char(13,10,13,10)
|
||||
FSET msgsuffix(x) char(13,10)+"******************"+char(13,10,13,10)
|
||||
79
examples/remind.vim
Normal file
79
examples/remind.vim
Normal file
@@ -0,0 +1,79 @@
|
||||
" Vim syntax file
|
||||
" Language: Remind
|
||||
" Maintainer: Davide Alberani <da@erlug.linux.it>
|
||||
" Last Change: 02 Nov 2015 + 13 Mar 2022 by Dianne Skoll <dianne@skoll.ca>
|
||||
" Version: 0.7+dianne1
|
||||
" URL: http://ismito.it/vim/syntax/remind.vim
|
||||
"
|
||||
" remind is a sophisticated reminder service
|
||||
" you can download remind from:
|
||||
" https://dianne.skoll.ca/projects/remind/
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" shut case off.
|
||||
syn case ignore
|
||||
|
||||
syn keyword remindCommands REM OMIT SET FSET UNSET
|
||||
syn keyword remindExpiry UNTIL FROM SCANFROM SCAN WARN SCHED THROUGH
|
||||
syn keyword remindTag PRIORITY TAG
|
||||
syn keyword remindTimed AT DURATION
|
||||
syn keyword remindMove ONCE SKIP BEFORE AFTER
|
||||
syn keyword remindSpecial INCLUDE INC BANNER PUSH-OMIT-CONTEXT PUSH CLEAR-OMIT-CONTEXT CLEAR POP-OMIT-CONTEXT POP COLOR COLOUR DO
|
||||
syn keyword remindRun MSG MSF RUN CAL SATISFY SPECIAL PS PSFILE SHADE MOON
|
||||
syn keyword remindConditional IF ELSE ENDIF IFTRIG
|
||||
syn keyword remindDebug DEBUG DUMPVARS DUMP ERRMSG FLUSH PRESERVE
|
||||
syn match remindComment "#.*$"
|
||||
syn region remindString start=+'+ end=+'+ skip=+\\\\\|\\'+ oneline
|
||||
syn region remindString start=+"+ end=+"+ skip=+\\\\\|\\"+ oneline
|
||||
syn match remindVar "\$[_a-zA-Z][_a-zA-Z0-9]*"
|
||||
syn match remindSubst "%[^ ]"
|
||||
syn match remindAdvanceNumber "\(\*\|+\|-\|++\|--\)[0-9]\+"
|
||||
" XXX: use different separators for dates and times?
|
||||
syn match remindDateSeparators "[/:@\.-]" contained
|
||||
syn match remindTimes "[0-9]\{1,2}[:\.][0-9]\{1,2}" contains=remindDateSeparators
|
||||
" XXX: why not match only valid dates? Ok, checking for 'Feb the 30' would
|
||||
" be impossible, but at least check for valid months and times.
|
||||
syn match remindDates "'[0-9]\{4}[/-][0-9]\{1,2}[/-][0-9]\{1,2}\(@[0-9]\{1,2}[:\.][0-9]\{1,2}\)\?'" contains=remindDateSeparators
|
||||
" This will match trailing whitespaces that seem to break rem2ps.
|
||||
" Courtesy of Michael Dunn.
|
||||
syn match remindWarning display excludenl "\S\s\+$"ms=s+1
|
||||
|
||||
|
||||
if version >= 508 || !exists("did_remind_syn_inits")
|
||||
if version < 508
|
||||
let did_remind_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink remindCommands Function
|
||||
HiLink remindExpiry Repeat
|
||||
HiLink remindTag Label
|
||||
HiLink remindTimed Statement
|
||||
HiLink remindMove Statement
|
||||
HiLink remindSpecial Include
|
||||
HiLink remindRun Function
|
||||
HiLink remindConditional Conditional
|
||||
HiLink remindComment Comment
|
||||
HiLink remindTimes String
|
||||
HiLink remindString String
|
||||
HiLink remindDebug Debug
|
||||
HiLink remindVar Identifier
|
||||
HiLink remindSubst Constant
|
||||
HiLink remindAdvanceNumber Number
|
||||
HiLink remindDateSeparators Comment
|
||||
HiLink remindDates String
|
||||
HiLink remindWarning Error
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "remind"
|
||||
|
||||
" vim: ts=8 sw=2
|
||||
558
files.c
558
files.c
@@ -1,558 +0,0 @@
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* FILES.C */
|
||||
/* */
|
||||
/* Controls the opening and closing of files, etc. Also */
|
||||
/* handles caching of lines and reading of lines from */
|
||||
/* files. */
|
||||
/* */
|
||||
/* This file is part of REMIND. */
|
||||
/* Copyright (C) 1992-1996 by David F. Skoll */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
static char const RCSID[] = "$Id: files.c,v 1.3 1996-05-25 19:10:12 dfs Exp $";
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <time.h>
|
||||
|
||||
#if defined(__MSDOS__)
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#ifdef __MSC__
|
||||
#include <dos.h>
|
||||
#endif
|
||||
|
||||
#include "types.h"
|
||||
#include "protos.h"
|
||||
#include "globals.h"
|
||||
#include "err.h"
|
||||
|
||||
|
||||
/* Convenient macro for closing files */
|
||||
#define FCLOSE(fp) (((fp)&&((fp)!=stdin)) ? (fclose(fp),(fp)=NULL) : ((fp)=NULL))
|
||||
|
||||
/* Define the structures needed by the file caching system */
|
||||
typedef struct cache {
|
||||
struct cache *next;
|
||||
char *text;
|
||||
int LineNo;
|
||||
} CachedLine;
|
||||
|
||||
typedef struct cheader {
|
||||
struct cheader *next;
|
||||
char *filename;
|
||||
CachedLine *cache;
|
||||
} CachedFile;
|
||||
|
||||
/* Define the structures needed by the INCLUDE file system */
|
||||
typedef struct {
|
||||
char *filename;
|
||||
int LineNo;
|
||||
unsigned int IfFlags;
|
||||
int NumIfs;
|
||||
long offset;
|
||||
CachedLine *CLine;
|
||||
} IncludeStruct;
|
||||
|
||||
static CachedFile *CachedFiles = (CachedFile *) NULL;
|
||||
static CachedLine *CLine = (CachedLine *) NULL;
|
||||
|
||||
static FILE *fp;
|
||||
|
||||
static IncludeStruct IStack[INCLUDE_NEST];
|
||||
static int IStackPtr = 0;
|
||||
|
||||
PRIVATE int ReadLineFromFile ARGS ((void));
|
||||
PRIVATE int CacheFile ARGS ((const char *fname));
|
||||
PRIVATE void DestroyCache ARGS ((CachedFile *cf));
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* ReadLine */
|
||||
/* */
|
||||
/* Read a line from the file or cache. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC int ReadLine(void)
|
||||
#else
|
||||
int ReadLine()
|
||||
#endif
|
||||
{
|
||||
int r;
|
||||
|
||||
/* If we're at the end of a file, pop */
|
||||
while (!CLine && !fp) {
|
||||
r = PopFile();
|
||||
if (r) return r;
|
||||
}
|
||||
|
||||
/* If it's cached, read line from the cache */
|
||||
if (CLine) {
|
||||
CurLine = CLine->text;
|
||||
LineNo = CLine->LineNo;
|
||||
CLine = CLine->next;
|
||||
FreshLine = 1;
|
||||
if (DebugFlag & DB_ECHO_LINE) OutputLine(ErrFp);
|
||||
return OK;
|
||||
}
|
||||
|
||||
/* Not cached. Read from the file. */
|
||||
return ReadLineFromFile();
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* ReadLineFromFile */
|
||||
/* */
|
||||
/* Read a line from the file pointed to by fp. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE int ReadLineFromFile(void)
|
||||
#else
|
||||
static ReadLineFromFile()
|
||||
#endif
|
||||
{
|
||||
int l;
|
||||
char *ptr;
|
||||
char *tmp;
|
||||
|
||||
CurLine = LineBuffer;
|
||||
*LineBuffer = (char) 0;
|
||||
l = 0;
|
||||
ptr = LineBuffer;
|
||||
while(fp) {
|
||||
tmp=fgets(ptr, LINELEN-l, fp);
|
||||
LineNo++;
|
||||
if (ferror(fp)) return E_IO_ERR;
|
||||
if (feof(fp) || !tmp) {
|
||||
FCLOSE(fp);
|
||||
}
|
||||
l = strlen(LineBuffer);
|
||||
if (l && (LineBuffer[l-1] == '\n')) LineBuffer[--l] = '\0';
|
||||
if (l && (LineBuffer[l-1] == '\\')) {
|
||||
l--;
|
||||
ptr = LineBuffer+l;
|
||||
if (l >= LINELEN-1) return E_LINE_2_LONG;
|
||||
continue;
|
||||
}
|
||||
FreshLine = 1;
|
||||
if (DebugFlag & DB_ECHO_LINE) OutputLine(ErrFp);
|
||||
return OK;
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* OpenFile */
|
||||
/* */
|
||||
/* Open a file for reading. If it's in the cache, set */
|
||||
/* CLine. Otherwise, open it on disk and set fp. If */
|
||||
/* ShouldCache is 1, cache the file */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC int OpenFile(const char *fname)
|
||||
#else
|
||||
int OpenFile(fname)
|
||||
char *fname;
|
||||
#endif
|
||||
{
|
||||
CachedFile *h = CachedFiles;
|
||||
int r;
|
||||
|
||||
/* If it's in the cache, get it from there. */
|
||||
|
||||
while (h) {
|
||||
if (!strcmp(fname, h->filename)) {
|
||||
CLine = h->cache;
|
||||
STRSET(FileName, fname);
|
||||
LineNo = 0;
|
||||
if (FileName) return OK; else return E_NO_MEM;
|
||||
}
|
||||
h = h->next;
|
||||
}
|
||||
|
||||
/* If it's a dash, then it's stdin */
|
||||
if (!strcmp(fname, "-")) {
|
||||
fp = stdin;
|
||||
} else {
|
||||
fp = fopen(fname, "r");
|
||||
}
|
||||
if (!fp) return E_CANT_OPEN;
|
||||
CLine = NULL;
|
||||
if (ShouldCache) {
|
||||
LineNo = 0;
|
||||
r = CacheFile(fname);
|
||||
if (r == OK) {
|
||||
fp = NULL;
|
||||
CLine = CachedFiles->cache;
|
||||
} else {
|
||||
if (strcmp(fname, "-"))
|
||||
fp = fopen(fname, "r");
|
||||
else
|
||||
fp = stdin;
|
||||
if (!fp) return E_CANT_OPEN;
|
||||
}
|
||||
}
|
||||
STRSET(FileName, fname);
|
||||
LineNo = 0;
|
||||
if (FileName) return OK; else return E_NO_MEM;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* CacheFile */
|
||||
/* */
|
||||
/* Cache a file in memory. If we fail, set ShouldCache to 0 */
|
||||
/* Returns an indication of success or failure. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE int CacheFile(const char *fname)
|
||||
#else
|
||||
static int CacheFile(fname)
|
||||
char *fname;
|
||||
#endif
|
||||
{
|
||||
int r;
|
||||
CachedFile *cf;
|
||||
CachedLine *cl;
|
||||
char *s;
|
||||
|
||||
cl = NULL;
|
||||
/* Create a file header */
|
||||
cf = NEW(CachedFile);
|
||||
cf->cache = NULL;
|
||||
if (!cf) { ShouldCache = 0; FCLOSE(fp); return E_NO_MEM; }
|
||||
cf->filename = StrDup(fname);
|
||||
if (!cf->filename) {
|
||||
ShouldCache = 0;
|
||||
FCLOSE(fp);
|
||||
free(cf);
|
||||
return E_NO_MEM;
|
||||
}
|
||||
|
||||
/* Read the file */
|
||||
while(fp) {
|
||||
r = ReadLineFromFile();
|
||||
if (r) {
|
||||
DestroyCache(cf);
|
||||
ShouldCache = 0;
|
||||
FCLOSE(fp);
|
||||
return r;
|
||||
}
|
||||
/* Skip blank chars */
|
||||
s = LineBuffer;
|
||||
while (isspace(*s)) s++;
|
||||
if (*s && *s!=';' && *s!='#') {
|
||||
/* Add the line to the cache */
|
||||
if (!cl) {
|
||||
cf->cache = NEW(CachedLine);
|
||||
if (!cf->cache) {
|
||||
DestroyCache(cf);
|
||||
ShouldCache = 0;
|
||||
FCLOSE(fp);
|
||||
return E_NO_MEM;
|
||||
}
|
||||
cl = cf->cache;
|
||||
} else {
|
||||
cl->next = NEW(CachedLine);
|
||||
if (!cl->next) {
|
||||
DestroyCache(cf);
|
||||
ShouldCache = 0;
|
||||
FCLOSE(fp);
|
||||
return E_NO_MEM;
|
||||
}
|
||||
cl = cl->next;
|
||||
}
|
||||
cl->next = NULL;
|
||||
cl->LineNo = LineNo;
|
||||
cl->text = StrDup(s);
|
||||
if (!cl->text) {
|
||||
DestroyCache(cf);
|
||||
ShouldCache = 0;
|
||||
FCLOSE(fp);
|
||||
return E_NO_MEM;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Put the cached file at the head of the queue */
|
||||
cf->next = CachedFiles;
|
||||
CachedFiles = cf;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* PopFile - we've reached the end. Pop up to the previous */
|
||||
/* file, or return E_EOF */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC int PopFile(void)
|
||||
#else
|
||||
int PopFile()
|
||||
#endif
|
||||
{
|
||||
IncludeStruct *i;
|
||||
|
||||
if (!Hush && NumIfs) Eprint("%s", ErrMsg[E_MISS_ENDIF]);
|
||||
if (!IStackPtr) return E_EOF;
|
||||
IStackPtr--;
|
||||
i = &IStack[IStackPtr];
|
||||
|
||||
LineNo = i->LineNo;
|
||||
IfFlags = i->IfFlags;
|
||||
NumIfs = i->NumIfs;
|
||||
CLine = i->CLine;
|
||||
fp = NULL;
|
||||
STRSET(FileName, i->filename);
|
||||
if (!CLine && (i->offset != -1L)) {
|
||||
/* We must open the file, then seek to specified position */
|
||||
if (strcmp(i->filename, "-"))
|
||||
fp = fopen(i->filename, "r");
|
||||
else
|
||||
fp = stdin;
|
||||
if (!fp) return E_CANT_OPEN;
|
||||
if (fp != stdin)
|
||||
(void) fseek(fp, i->offset, 0); /* Trust that it works... */
|
||||
}
|
||||
free(i->filename);
|
||||
return OK;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* DoInclude */
|
||||
/* */
|
||||
/* The INCLUDE command. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC int DoInclude(ParsePtr p)
|
||||
#else
|
||||
int DoInclude(p)
|
||||
ParsePtr p;
|
||||
#endif
|
||||
{
|
||||
char tok[TOKSIZE];
|
||||
int r, e;
|
||||
|
||||
if ( (r=ParseToken(p, tok)) ) return r;
|
||||
e = VerifyEoln(p);
|
||||
if (e) Eprint("%s", ErrMsg[e]);
|
||||
if ( (r=IncludeFile(tok)) ) return r;
|
||||
NumIfs = 0;
|
||||
IfFlags = 0;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* IncludeFile */
|
||||
/* */
|
||||
/* Process the INCLUDE command - actually do the file */
|
||||
/* inclusion. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC int IncludeFile(const char *fname)
|
||||
#else
|
||||
int IncludeFile(fname)
|
||||
char *fname;
|
||||
#endif
|
||||
{
|
||||
IncludeStruct *i;
|
||||
int r;
|
||||
|
||||
if (IStackPtr+1 >= INCLUDE_NEST) return E_NESTED_INCLUDE;
|
||||
i = &IStack[IStackPtr];
|
||||
|
||||
i->filename = StrDup(FileName);
|
||||
if (!i->filename) return E_NO_MEM;
|
||||
i->LineNo = LineNo;
|
||||
i->NumIfs = NumIfs;
|
||||
i->IfFlags = IfFlags;
|
||||
i->CLine = CLine;
|
||||
i->offset = -1L;
|
||||
if (fp) {
|
||||
i->offset = ftell(fp);
|
||||
FCLOSE(fp);
|
||||
}
|
||||
|
||||
IStackPtr++;
|
||||
|
||||
/* Try to open the new file */
|
||||
if (!OpenFile(fname)) {
|
||||
return OK;
|
||||
}
|
||||
/* Ugh! We failed! */
|
||||
if ( (r=PopFile()) ) return r;
|
||||
Eprint("%s: %s", ErrMsg[E_CANT_OPEN], fname);
|
||||
return E_CANT_OPEN;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* GetAccessDate - get the access date of a file. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC int GetAccessDate(char *file)
|
||||
#else
|
||||
int GetAccessDate(file)
|
||||
char *file;
|
||||
#endif
|
||||
{
|
||||
struct stat statbuf;
|
||||
struct tm *t1;
|
||||
|
||||
if (stat(file, &statbuf)) return -1;
|
||||
#ifdef __TURBOC__
|
||||
t1 = localtime( (time_t *) &(statbuf.st_atime) );
|
||||
#else
|
||||
t1 = localtime(&(statbuf.st_atime));
|
||||
#endif
|
||||
|
||||
if (t1->tm_year + 1900 < BASE)
|
||||
return 0;
|
||||
else
|
||||
return Julian(t1->tm_year+1900, t1->tm_mon, t1->tm_mday);
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* SetAccessDate */
|
||||
/* */
|
||||
/* Used only by DOS to set access date after we close the */
|
||||
/* file. Not needed for UNIX. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#if defined(__MSDOS__)
|
||||
/*
|
||||
* WARNING WARNING WARNING WARNING
|
||||
* In the version of Turbo C which I have, there is a bug in the
|
||||
* stdio.h file. The following lines correct the bug. YOU MAY
|
||||
* HAVE TO REMOVE THESE LINES FOR LATER VERSIONS OF TURBOC
|
||||
*/
|
||||
#ifdef __TURBOC__
|
||||
#ifndef fileno
|
||||
#define fileno(f) ((f)->fd)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC int SetAccessDate(char *fname, int jul)
|
||||
#else
|
||||
int SetAccessDate(fname, jul)
|
||||
char *fname;
|
||||
int jul;
|
||||
#endif
|
||||
{
|
||||
|
||||
#ifdef __TURBOC__
|
||||
int y, m, d;
|
||||
struct ftime ft;
|
||||
FILE *f;
|
||||
|
||||
FromJulian(jul, &y, &m, &d);
|
||||
ft.ft_tsec = 0;
|
||||
ft.ft_min = 0;
|
||||
ft.ft_hour = 12; /* Arbitrarily set time to noon. */
|
||||
ft.ft_day = (unsigned int) d;
|
||||
ft.ft_month = (unsigned int) m+1;
|
||||
ft.ft_year = (unsigned int) (y - 1980);
|
||||
|
||||
f = fopen(fname, "r");
|
||||
if (!f || setftime(fileno(f) , &ft)) {
|
||||
|
||||
#else /* Must be MSC */
|
||||
if (utime(fname, (struct utimbuf *) NULL)) {
|
||||
#endif
|
||||
fprintf(ErrFp, ErrMsg[M_CANTSET_ACCESS], fname);
|
||||
|
||||
#ifdef __TURBOC__
|
||||
if (f) FCLOSE(f);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef __TURBOC__
|
||||
FCLOSE(f);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* __MSDOS__ */
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* DestroyCache */
|
||||
/* */
|
||||
/* Free all the memory used by a cached file. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE void DestroyCache(CachedFile *cf)
|
||||
#else
|
||||
static void DestroyCache(cf)
|
||||
CachedFile *cf;
|
||||
#endif
|
||||
{
|
||||
CachedLine *cl, *cnext;
|
||||
CachedFile *temp;
|
||||
if (cf->filename) free(cf->filename);
|
||||
cl = cf->cache;
|
||||
while (cl) {
|
||||
if (cl->text) free (cl->text);
|
||||
cnext = cl->next;
|
||||
free(cl);
|
||||
cl = cnext;
|
||||
}
|
||||
if (CachedFiles == cf) CachedFiles = cf->next;
|
||||
else {
|
||||
temp = CachedFiles;
|
||||
while(temp) {
|
||||
if (temp->next == cf) {
|
||||
temp->next = cf->next;
|
||||
break;
|
||||
}
|
||||
temp = temp->next;
|
||||
}
|
||||
}
|
||||
free(cf);
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* TopLevel */
|
||||
/* */
|
||||
/* Returns 1 if current file is top level, 0 otherwise. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC int TopLevel(void)
|
||||
#else
|
||||
int TopLevel()
|
||||
#endif
|
||||
{
|
||||
return !IStackPtr;
|
||||
}
|
||||
622
finnish.h
622
finnish.h
@@ -1,622 +0,0 @@
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* FINNISH.H */
|
||||
/* */
|
||||
/* Support for the Finnish language. */
|
||||
/* */
|
||||
/* Author: Mikko Silvonen <Mikko.Silvonen@Helsinki.FI> */
|
||||
/* */
|
||||
/* Finnish holidays and name days for Remind are available */
|
||||
/* at ftp.funet.fi (pub/unix/misc/remind-fin*). */
|
||||
/* */
|
||||
/* This file is part of REMIND. */
|
||||
/* This file is Copyright (C) 1993, 1994 by Mikko Silvonen. */
|
||||
/* REMIND is Copyright (C) 1992-1996 by David F. Skoll */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
/* $Id: finnish.h,v 1.3 1996-04-29 19:34:37 dfs Exp $ */
|
||||
|
||||
/* The very first define in a language support file must be L_LANGNAME: */
|
||||
#define L_LANGNAME "Finnish"
|
||||
|
||||
/* Day names */
|
||||
#define L_SUNDAY "sunnuntai"
|
||||
#define L_MONDAY "maanantai"
|
||||
#define L_TUESDAY "tiistai"
|
||||
#define L_WEDNESDAY "keskiviikko"
|
||||
#define L_THURSDAY "torstai"
|
||||
#define L_FRIDAY "perjantai"
|
||||
#define L_SATURDAY "lauantai"
|
||||
|
||||
/* Day initials - first letter only */
|
||||
#define L_DAYINIT "SMTKTPL"
|
||||
|
||||
/* Month names */
|
||||
#define L_JAN "tammikuu"
|
||||
#define L_FEB "helmikuu"
|
||||
#define L_MAR "maaliskuu"
|
||||
#define L_APR "huhtikuu"
|
||||
#define L_MAY "toukokuu"
|
||||
#if defined(ISOLATIN1)
|
||||
#define L_JUN "kes\xE4kuu"
|
||||
#define L_JUL "hein\xE4kuu"
|
||||
#elif defined(IBMEXTENDED)
|
||||
#define L_JUN "kes\x84kuu"
|
||||
#define L_JUL "hein\x84kuu"
|
||||
#else
|
||||
#define L_JUN "kes{kuu"
|
||||
#define L_JUL "hein{kuu"
|
||||
#endif
|
||||
#define L_AUG "elokuu"
|
||||
#define L_SEP "syyskuu"
|
||||
#define L_OCT "lokakuu"
|
||||
#define L_NOV "marraskuu"
|
||||
#define L_DEC "joulukuu"
|
||||
|
||||
/* Today and tomorrow */
|
||||
#if defined(ISOLATIN1)
|
||||
#define L_TODAY "t\xE4n\xE4\xE4n"
|
||||
#elif defined(IBMEXTENDED)
|
||||
#define L_TODAY "t\x84n\x84\x84n"
|
||||
#else
|
||||
#define L_TODAY "t{n{{n"
|
||||
#endif
|
||||
#define L_TOMORROW "huomenna"
|
||||
|
||||
/* The default banner */
|
||||
#define L_BANNER "Viestit %wna, %d. %mta %y%o:"
|
||||
|
||||
/* "am" and "pm" */
|
||||
#define L_AM "ap"
|
||||
#define L_PM "ip"
|
||||
|
||||
/*** The following are only used in dosubst.c ***/
|
||||
#ifdef L_IN_DOSUBST
|
||||
|
||||
/* Ago and from now */
|
||||
#define L_AGO "sitten"
|
||||
#define L_FROMNOW "kuluttua"
|
||||
|
||||
/* "in %d days' time" */
|
||||
#if defined(ISOLATIN1)
|
||||
#define L_INXDAYS "%d p\xE4iv\xE4n kuluttua"
|
||||
#elif defined(IBMEXTENDED)
|
||||
#define L_INXDAYS "%d p\x84iv\x84n kuluttua"
|
||||
#else
|
||||
#define L_INXDAYS "%d p{iv{n kuluttua"
|
||||
#endif
|
||||
|
||||
/* "on" as in "on date...", but in Finnish it is a case ending;
|
||||
L_PARTIT is the partitive ending appended to -kuu and -tai */
|
||||
#define L_ON "na"
|
||||
#define L_PARTIT "ta"
|
||||
|
||||
/* Pluralizing - this is a problem for many languages and may require
|
||||
a more drastic fix */
|
||||
/* The partitive ending of "day" */
|
||||
#if defined(ISOLATIN1)
|
||||
#define L_PLURAL "\xE4"
|
||||
#elif defined(IBMEXTENDED)
|
||||
#define L_PLURAL "\x84"
|
||||
#else
|
||||
#define L_PLURAL "{"
|
||||
#endif
|
||||
|
||||
/* Minutes, hours, at, etc */
|
||||
#define L_NOW "nyt"
|
||||
#define L_AT "klo"
|
||||
#define L_MINUTE "minuutti"
|
||||
#define L_HOUR "tunti"
|
||||
#define L_IS "on"
|
||||
#define L_WAS "oli"
|
||||
#define L_AND "ja"
|
||||
|
||||
/* What to add to make "hour" plural (or actually partitive) */
|
||||
#define L_HPLU "a"
|
||||
/* What to add to make "minute" plural (or actually partitive) */
|
||||
#define L_MPLU "a"
|
||||
|
||||
/* Genitive form of "hour" */
|
||||
#define L_HGEN "tunnin"
|
||||
/* Genitive form of "minute" */
|
||||
#define L_MGEN "minuutin"
|
||||
|
||||
/* Define any overrides here, such as L_ORDINAL_OVERRIDE, L_A_OVER, etc.
|
||||
See the file dosubst.c for more info. */
|
||||
|
||||
#if defined(ISOLATIN1)
|
||||
#define L_ORDINAL_OVERRIDE switch(d) { \
|
||||
case 1: plu = ":sen\xE4"; break; \
|
||||
case 2: plu = ":sena"; break; \
|
||||
default: \
|
||||
switch(d%10) { \
|
||||
case 2: \
|
||||
case 3: \
|
||||
case 6: \
|
||||
case 8: plu = ":ntena"; break; \
|
||||
default: plu = ":nten\xE4"; break; \
|
||||
} \
|
||||
}
|
||||
#elif defined(IBMEXTENDED)
|
||||
#define L_ORDINAL_OVERRIDE switch(d) { \
|
||||
case 1: plu = ":sen\x84"; break; \
|
||||
case 2: plu = ":sena"; break; \
|
||||
default: \
|
||||
switch(d%10) { \
|
||||
case 2: \
|
||||
case 3: \
|
||||
case 6: \
|
||||
case 8: plu = ":ntena"; break; \
|
||||
default: plu = ":nten\x84"; break; \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define L_ORDINAL_OVERRIDE switch(d) { \
|
||||
case 1: plu = ":sen{"; break; \
|
||||
case 2: plu = ":sena"; break; \
|
||||
default: \
|
||||
switch(d%10) { \
|
||||
case 2: \
|
||||
case 3: \
|
||||
case 6: \
|
||||
case 8: plu = ":ntena"; break; \
|
||||
default: plu = ":nten{"; break; \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
#define L_A_OVER sprintf(s, "%s%s, %d. %s%s %d", DayName[jul%7], L_ON, d, \
|
||||
MonthName[m], L_PARTIT, y);
|
||||
#define L_C_OVER sprintf(s, "%s%s", DayName[jul%7], L_ON);
|
||||
#define L_E_OVER sprintf(s, "%02d%c%02d%c%04d", d, DATESEP, m+1, DATESEP, \
|
||||
y);
|
||||
#define L_F_OVER sprintf(s, "%02d%c%02d%c%04d", m+1, DATESEP, d, DATESEP, y);
|
||||
#define L_G_OVER sprintf(s, "%s%s, %d. %s%s", DayName[jul%7], L_ON, d, \
|
||||
MonthName[m], L_PARTIT);
|
||||
#define L_H_OVER sprintf(s, "%02d%c%02d", d, DATESEP, m+1);
|
||||
#define L_I_OVER sprintf(s, "%02d%c%02d", m+1, DATESEP, d);
|
||||
#define L_J_OVER sprintf(s, "%s%s, %sn %d%s %d", DayName[jul%7], L_ON, \
|
||||
MonthName[m], d, plu, y);
|
||||
#define L_K_OVER sprintf(s, "%s%s, %sn %d%s", DayName[jul%7], L_ON, \
|
||||
MonthName[m], d, plu);
|
||||
#define L_L_OVER sprintf(s, "%04d%c%02d%c%02d", y, DATESEP, m+1, DATESEP, d);
|
||||
#define L_Q_OVER sprintf(s, "n");
|
||||
#define L_U_OVER sprintf(s, "%s%s, %d%s %s%s %d", DayName[jul%7], L_ON, \
|
||||
d, plu, MonthName[m], L_PARTIT, y);
|
||||
#define L_V_OVER sprintf(s, "%s%s, %d%s %s%s", DayName[jul%7], L_ON, d, \
|
||||
plu, MonthName[m], L_PARTIT);
|
||||
#define L_1_OVER if (tdiff == 0) \
|
||||
sprintf(s, L_NOW); \
|
||||
else { \
|
||||
if (hdiff != 0) { \
|
||||
if (tdiff < 0) \
|
||||
sprintf(s, "%d %s%s ", hdiff, L_HOUR, hplu); \
|
||||
else \
|
||||
sprintf(s, "%d %s ", hdiff, L_HGEN); \
|
||||
s += strlen(s); \
|
||||
} \
|
||||
if (mdiff != 0) { \
|
||||
if (tdiff < 0) \
|
||||
sprintf(s, "%d %s%s ", mdiff, L_MINUTE, \
|
||||
mplu); \
|
||||
else \
|
||||
sprintf(s, "%d %s ", mdiff, L_MGEN); \
|
||||
s += strlen(s); \
|
||||
} \
|
||||
sprintf(s, when); \
|
||||
}
|
||||
#endif /* L_IN_DOSUBST */
|
||||
|
||||
/* The next ones are used only when MK_GLOBALS is set */
|
||||
#ifdef MK_GLOBALS
|
||||
#define L_ERR_OVERRIDE 1
|
||||
EXTERN char *ErrMsg[] =
|
||||
{
|
||||
#if defined(ISOLATIN1)
|
||||
"Ok",
|
||||
"Puuttuva ']'",
|
||||
"Puuttuva lainausmerkki",
|
||||
"Liian monimutkainen lauseke - liikaa operaattoreita",
|
||||
"Liian monimutkainen lauseke - liikaa operandeja",
|
||||
"Puuttuva ')'",
|
||||
"M\xE4\xE4rittelem\xE4t\xF6n funktio",
|
||||
"Virheellinen merkki",
|
||||
"Kaksipaikkainen operaattori puuttuu",
|
||||
"Muisti loppui",
|
||||
"Virheellinen luku",
|
||||
"Operaattoripino tyhj\xE4 - sis\xE4inen virhe",
|
||||
"Muuttujapino tyhj\xE4 - sis\xE4inen virhe",
|
||||
"Tyyppimuunnos ei onnistu",
|
||||
"Virheellinen tyyppi",
|
||||
"Liian suuri p\xE4iv\xE4ys",
|
||||
"Pinovirhe - sis\xE4inen virhe",
|
||||
"Jako nollalla",
|
||||
"M\xE4\xE4rittelem\xE4t\xF6n funktio",
|
||||
"Odottamaton rivin loppu",
|
||||
"Odottamaton tiedoston loppu",
|
||||
"Sy\xF6tt\xF6- tai tulostusvirhe",
|
||||
"Liian pitk\xE4 rivi",
|
||||
"Sis\xE4inen virhe",
|
||||
"Virheellinen p\xE4iv\xE4ys",
|
||||
"Liian v\xE4h\xE4n argumentteja",
|
||||
"Liian paljon argumentteja",
|
||||
"Virheellinen aika",
|
||||
"Liian suuri luku",
|
||||
"Liian pieni luku",
|
||||
"Tiedoston avaus ei onnistu",
|
||||
"Liian monta sis\xE4kk\xE4ist\xE4 INCLUDEa",
|
||||
"J\xE4sennysvirhe",
|
||||
"Laukaisuhetken laskenta ei onnistu",
|
||||
"Liian monta sis\xE4kk\xE4ist\xE4 IF-lausetta",
|
||||
"ELSE ilman IF-lausetta",
|
||||
"ENDIF ilman IF-lausetta",
|
||||
"Kaikkia viikonp\xE4ivi\xE4 ei voi j\xE4tt\xE4\xE4 pois",
|
||||
"Ylim\xE4\xE4r\xE4isi\xE4 merkkej\xE4 rivill\xE4",
|
||||
"POP-OMIT-CONTEXT ilman PUSH-OMIT-CONTEXTia",
|
||||
"RUN-lauseen k\xE4ytt\xF6 estetty",
|
||||
"Arvoaluevirhe",
|
||||
"Virheellinen tunniste",
|
||||
"Rekursiivinen funktiokutsu havaittu",
|
||||
"",
|
||||
"J\xE4rjestelm\xE4muuttujan muuttaminen ei onnistu",
|
||||
"C-kirjastofunktio ei pysty esitt\xE4m\xE4\xE4n p\xE4iv\xE4yst\xE4 tai aikaa",
|
||||
"Sis\xE4isen funktion m\xE4\xE4ritelm\xE4\xE4 yritettiin muuttaa",
|
||||
"Lausekkeessa ei voi olla sis\xE4kk\xE4isi\xE4 funktiom\xE4\xE4ritelmi\xE4",
|
||||
"P\xE4iv\xE4yksen t\xE4ytyy olla t\xE4ydellinen toistokertoimessa",
|
||||
"Vuosi annettu kahdesti",
|
||||
"Kuukausi annettu kahdesti",
|
||||
"P\xE4iv\xE4 annettu kahdesti",
|
||||
"Tuntematon sana tai merkki",
|
||||
"OMIT-komennossa on annettava kuukausi ja p\xE4iv\xE4",
|
||||
"Liian monta osittaista OMIT-komentoa",
|
||||
"Liian monta t\xE4ydellist\xE4 OMIT-komentoa",
|
||||
"Varoitus: PUSH-OMIT-CONTEXT ilman POP-OMIT-CONTEXTia",
|
||||
"Virhe tiedoston luvussa",
|
||||
"Pilkku puuttuu",
|
||||
"Virheellinen juutalainen p\xE4iv\xE4ys",
|
||||
"IIF vaatii parittoman m\xE4\xE4r\xE4n argumentteja",
|
||||
"Varoitus: puuttuva ENDIF",
|
||||
"Pilkku puuttuu",
|
||||
"Viikonp\xE4iv\xE4 annettu kahdesti",
|
||||
"K\xE4yt\xE4 vain yht\xE4 komennoista BEFORE, AFTER ja SKIP",
|
||||
"Sis\xE4kk\xE4isi\xE4 MSG-, MSF- ja RUN-lauseita ei voi k\xE4ytt\xE4\xE4 lausekkeessa",
|
||||
"Toistokerroin annettu kahdesti",
|
||||
"Delta-arvo annettu kahdesti",
|
||||
"Peruutusarvo annettu kahdesti",
|
||||
"ONCE-avainsanaa k\xE4ytetty kahdesti. (Hah.)",
|
||||
"AT-sanan per\xE4st\xE4 puuttuu aika",
|
||||
"UNTIL-sanaa k\xE4ytetty kahdesti",
|
||||
"Ep\xE4t\xE4ydellinen p\xE4iv\xE4ys",
|
||||
"SCANFROM-sanaa k\xE4ytetty kahdesti",
|
||||
"Muuttuja",
|
||||
"Arvo",
|
||||
"*M\xC4\xC4RITTELEM\xC4T\xD6N*",
|
||||
"Siirryt\xE4\xE4n funktioon",
|
||||
"Poistutaan funktiosta",
|
||||
"Vanhentunut",
|
||||
"fork() ep\xE4onnistui - jonomuistutukset eiv\xE4t toimi",
|
||||
"Tiedoston avaus ei onnistu",
|
||||
"Virheellinen j\xE4rjestelm\xE4p\xE4iv\xE4ys: vuosi on v\xE4hemm\xE4n kuin %d\n",
|
||||
"Tuntematon virheenetsint\xE4tarkenne '%c'\n",
|
||||
"Tuntematon tarkenne '%c'\n",
|
||||
"Tuntematon k\xE4ytt\xE4j\xE4 '%s'\n",
|
||||
"Ryhm\xE4numeron vaihto %d:ksi ei onnistunut\n",
|
||||
"K\xE4ytt\xE4j\xE4numeron vaihto %d:ksi ei onnistunut\n",
|
||||
"Muisti ei riit\xE4 ymp\xE4rist\xF6lle\n",
|
||||
"Puuttuva '='-merkki",
|
||||
"Puuttuva muuttujanimi",
|
||||
"Puuttuva lauseke",
|
||||
"P\xE4iv\xE4n asetus %s:ksi ei onnitus\n",
|
||||
"Remind: tarkenne '-i': %s\n",
|
||||
"Ei viestej\xE4.",
|
||||
"%d viesti(\xE4) t\xE4m\xE4n p\xE4iv\xE4n jonossa.\n",
|
||||
"Numero puuttuu",
|
||||
"Illegal function in WARN clause (NEEDS TRANSLATION)"
|
||||
|
||||
#elif defined(IBMEXTENDED)
|
||||
"Ok",
|
||||
"Puuttuva ']'",
|
||||
"Puuttuva lainausmerkki",
|
||||
"Liian monimutkainen lauseke - liikaa operaattoreita",
|
||||
"Liian monimutkainen lauseke - liikaa operandeja",
|
||||
"Puuttuva ')'",
|
||||
"M\x84\x84rittelem\x84t\x94n funktio",
|
||||
"Virheellinen merkki",
|
||||
"Kaksipaikkainen operaattori puuttuu",
|
||||
"Muisti loppui",
|
||||
"Virheellinen luku",
|
||||
"Operaattoripino tyhj\x84 - sis\x84inen virhe",
|
||||
"Muuttujapino tyhj\x84 - sis\x84inen virhe",
|
||||
"Tyyppimuunnos ei onnistu",
|
||||
"Virheellinen tyyppi",
|
||||
"Liian suuri p\x84iv\x84ys",
|
||||
"Pinovirhe - sis\x84inen virhe",
|
||||
"Jako nollalla",
|
||||
"M\x84\x84rittelem\x84t\x94n funktio",
|
||||
"Odottamaton rivin loppu",
|
||||
"Odottamaton tiedoston loppu",
|
||||
"Sy\x94tt\x94- tai tulostusvirhe",
|
||||
"Liian pitk\x84 rivi",
|
||||
"Sis\x84inen virhe",
|
||||
"Virheellinen p\x84iv\x84ys",
|
||||
"Liian v\x84h\x84n argumentteja",
|
||||
"Liian paljon argumentteja",
|
||||
"Virheellinen aika",
|
||||
"Liian suuri luku",
|
||||
"Liian pieni luku",
|
||||
"Tiedoston avaus ei onnistu",
|
||||
"Liian monta sis\x84kk\x84ist\x84 INCLUDEa",
|
||||
"J\x84sennysvirhe",
|
||||
"Laukaisuhetken laskenta ei onnistu",
|
||||
"Liian monta sis\x84kk\x84ist\x84 IF-lausetta",
|
||||
"ELSE ilman IF-lausetta",
|
||||
"ENDIF ilman IF-lausetta",
|
||||
"Kaikkia viikonp\x84ivi\x84 ei voi j\x84tt\x84\x84 pois",
|
||||
"Ylim\x84\x84r\x84isi\x84 merkkej\x84 rivill\x84",
|
||||
"POP-OMIT-CONTEXT ilman PUSH-OMIT-CONTEXTia",
|
||||
"RUN-lauseen k\x84ytt\x94 estetty",
|
||||
"Arvoaluevirhe",
|
||||
"Virheellinen tunniste",
|
||||
"Rekursiivinen funktiokutsu havaittu",
|
||||
"",
|
||||
"J\x84rjestelm\x84muuttujan muuttaminen ei onnistu",
|
||||
"C-kirjastofunktio ei pysty esitt\x84m\x84\x84n p\x84iv\x84yst\x84 tai aikaa",
|
||||
"Sis\x84isen funktion m\x84\x84ritelm\x84\x84 yritettiin muuttaa",
|
||||
"Lausekkeessa ei voi olla sis\x84kk\x84isi\x84 funktiom\x84\x84ritelmi\x84",
|
||||
"P\x84iv\x84yksen t\x84ytyy olla t\x84ydellinen toistokertoimessa",
|
||||
"Vuosi annettu kahdesti",
|
||||
"Kuukausi annettu kahdesti",
|
||||
"P\x84iv\x84 annettu kahdesti",
|
||||
"Tuntematon sana tai merkki",
|
||||
"OMIT-komennossa on annettava kuukausi ja p\x84iv\x84",
|
||||
"Liian monta osittaista OMIT-komentoa",
|
||||
"Liian monta t\x84ydellist\x84 OMIT-komentoa",
|
||||
"Varoitus: PUSH-OMIT-CONTEXT ilman POP-OMIT-CONTEXTia",
|
||||
"Virhe tiedoston luvussa",
|
||||
"Pilkku puuttuu",
|
||||
"Virheellinen juutalainen p\x84iv\x84ys",
|
||||
"IIF vaatii parittoman m\x84\x84r\x84n argumentteja",
|
||||
"Varoitus: puuttuva ENDIF",
|
||||
"Pilkku puuttuu",
|
||||
"Viikonp\x84iv\x84 annettu kahdesti",
|
||||
"K\x84yt\x84 vain yht\x84 komennoista BEFORE, AFTER ja SKIP",
|
||||
"Sis\x84kk\x84isi\x84 MSG-, MSF- ja RUN-lauseita ei voi k\x84ytt\x84\x84 lausekkeessa",
|
||||
"Toistokerroin annettu kahdesti",
|
||||
"Delta-arvo annettu kahdesti",
|
||||
"Peruutusarvo annettu kahdesti",
|
||||
"ONCE-avainsanaa k\x84ytetty kahdesti. (Hah.)",
|
||||
"AT-sanan per\x84st\x84 puuttuu aika",
|
||||
"UNTIL-sanaa k\x84ytetty kahdesti",
|
||||
"Ep\x84t\x84ydellinen p\x84iv\x84ys",
|
||||
"SCANFROM-sanaa k\x84ytetty kahdesti",
|
||||
"Muuttuja",
|
||||
"Arvo",
|
||||
"*M\x8E\x8ERITTELEM\x8ET\x99N*",
|
||||
"Siirryt\x84\x84n funktioon",
|
||||
"Poistutaan funktiosta",
|
||||
"Vanhentunut",
|
||||
"fork() ep\x84onnistui - jonomuistutukset eiv\x84t toimi",
|
||||
"Tiedoston avaus ei onnistu",
|
||||
"Virheellinen j\x84rjestelm\x84p\x84iv\x84ys: vuosi on v\x84hemm\x84n kuin %d\n",
|
||||
"Tuntematon virheenetsint\x84tarkenne '%c'\n",
|
||||
"Tuntematon tarkenne '%c'\n",
|
||||
"Tuntematon k\x84ytt\x84j\x84 '%s'\n",
|
||||
"Ryhm\x84numeron vaihto %d:ksi ei onnistunut\n",
|
||||
"K\x84ytt\x84j\x84numeron vaihto %d:ksi ei onnistunut\n",
|
||||
"Muisti ei riit\x84 ymp\x84rist\x94lle\n",
|
||||
"Puuttuva '='-merkki",
|
||||
"Puuttuva muuttujanimi",
|
||||
"Puuttuva lauseke",
|
||||
"P\x84iv\x84n asetus %s:ksi ei onnitus\n",
|
||||
"Remind: tarkenne '-i': %s\n",
|
||||
"Ei viestej\x84.",
|
||||
"%d viesti(\x84) t\x84m\x84n p\x84iv\x84n jonossa.\n",
|
||||
"Numero puuttuu"
|
||||
"Illegal function in WARN clause (NEEDS TRANSLATION)"
|
||||
#else
|
||||
"Ok",
|
||||
"Puuttuva ']'",
|
||||
"Puuttuva lainausmerkki",
|
||||
"Liian monimutkainen lauseke - liikaa operaattoreita",
|
||||
"Liian monimutkainen lauseke - liikaa operandeja",
|
||||
"Puuttuva ')'",
|
||||
"M{{rittelem{t|n funktio",
|
||||
"Virheellinen merkki",
|
||||
"Kaksipaikkainen operaattori puuttuu",
|
||||
"Muisti loppui",
|
||||
"Virheellinen luku",
|
||||
"Operaattoripino tyhj{ - sis{inen virhe",
|
||||
"Muuttujapino tyhj{ - sis{inen virhe",
|
||||
"Tyyppimuunnos ei onnistu",
|
||||
"Virheellinen tyyppi",
|
||||
"Liian suuri p{iv{ys",
|
||||
"Pinovirhe - sis{inen virhe",
|
||||
"Jako nollalla",
|
||||
"M{{rittelem{t|n funktio",
|
||||
"Odottamaton rivin loppu",
|
||||
"Odottamaton tiedoston loppu",
|
||||
"Sy|tt|- tai tulostusvirhe",
|
||||
"Liian pitk{ rivi",
|
||||
"Sis{inen virhe",
|
||||
"Virheellinen p{iv{ys",
|
||||
"Liian v{h{n argumentteja",
|
||||
"Liian paljon argumentteja",
|
||||
"Virheellinen aika",
|
||||
"Liian suuri luku",
|
||||
"Liian pieni luku",
|
||||
"Tiedoston avaus ei onnistu",
|
||||
"Liian monta sis{kk{ist{ INCLUDEa",
|
||||
"J{sennysvirhe",
|
||||
"Laukaisuhetken laskenta ei onnistu",
|
||||
"Liian monta sis{kk{ist{ IF-lausetta",
|
||||
"ELSE ilman IF-lausetta",
|
||||
"ENDIF ilman IF-lausetta",
|
||||
"Kaikkia viikonp{ivi{ ei voi j{tt{{ pois",
|
||||
"Ylim{{r{isi{ merkkej{ rivill{",
|
||||
"POP-OMIT-CONTEXT ilman PUSH-OMIT-CONTEXTia",
|
||||
"RUN-lauseen k{ytt| estetty",
|
||||
"Arvoaluevirhe",
|
||||
"Virheellinen tunniste",
|
||||
"Rekursiivinen funktiokutsu havaittu",
|
||||
"",
|
||||
"J{rjestelm{muuttujan muuttaminen ei onnistu",
|
||||
"C-kirjastofunktio ei pysty esitt{m{{n p{iv{yst{ tai aikaa",
|
||||
"Sis{isen funktion m{{ritelm{{ yritettiin muuttaa",
|
||||
"Lausekkeessa ei voi olla sis{kk{isi{ funktiom{{ritelmi{",
|
||||
"P{iv{yksen t{ytyy olla t{ydellinen toistokertoimessa",
|
||||
"Vuosi annettu kahdesti",
|
||||
"Kuukausi annettu kahdesti",
|
||||
"P{iv{ annettu kahdesti",
|
||||
"Tuntematon sana tai merkki",
|
||||
"OMIT-komennossa on annettava kuukausi ja p{iv{",
|
||||
"Liian monta osittaista OMIT-komentoa",
|
||||
"Liian monta t{ydellist{ OMIT-komentoa",
|
||||
"Varoitus: PUSH-OMIT-CONTEXT ilman POP-OMIT-CONTEXTia",
|
||||
"Virhe tiedoston luvussa",
|
||||
"Pilkku puuttuu",
|
||||
"Virheellinen juutalainen p{iv{ys",
|
||||
"IIF vaatii parittoman m{{r{n argumentteja",
|
||||
"Varoitus: puuttuva ENDIF",
|
||||
"Pilkku puuttuu",
|
||||
"Viikonp{iv{ annettu kahdesti",
|
||||
"K{yt{ vain yht{ komennoista BEFORE, AFTER ja SKIP",
|
||||
"Sis{kk{isi{ MSG-, MSF- ja RUN-lauseita ei voi k{ytt{{ lausekkeessa",
|
||||
"Toistokerroin annettu kahdesti",
|
||||
"Delta-arvo annettu kahdesti",
|
||||
"Peruutusarvo annettu kahdesti",
|
||||
"ONCE-avainsanaa k{ytetty kahdesti. (Hah.)",
|
||||
"AT-sanan per{st{ puuttuu aika",
|
||||
"UNTIL-sanaa k{ytetty kahdesti",
|
||||
"Ep{t{ydellinen p{iv{ys",
|
||||
"SCANFROM-sanaa k{ytetty kahdesti",
|
||||
"Muuttuja",
|
||||
"Arvo",
|
||||
"*M[[RITTELEM[T\\N*",
|
||||
"Siirryt{{n funktioon",
|
||||
"Poistutaan funktiosta",
|
||||
"Vanhentunut",
|
||||
"fork() ep{onnistui - jonomuistutukset eiv{t toimi",
|
||||
"Tiedoston avaus ei onnistu",
|
||||
"Virheellinen j{rjestelm{p{iv{ys: vuosi on v{hemm{n kuin %d\n",
|
||||
"Tuntematon virheenetsint{tarkenne '%c'\n",
|
||||
"Tuntematon tarkenne '%c'\n",
|
||||
"Tuntematon k{ytt{j{ '%s'\n",
|
||||
"Ryhm{numeron vaihto %d:ksi ei onnistunut\n",
|
||||
"K{ytt{j{numeron vaihto %d:ksi ei onnistunut\n",
|
||||
"Muisti ei riit{ ymp{rist|lle\n",
|
||||
"Puuttuva '='-merkki",
|
||||
"Puuttuva muuttujanimi",
|
||||
"Puuttuva lauseke",
|
||||
"P{iv{n asetus %s:ksi ei onnitus\n",
|
||||
"Remind: tarkenne '-i': %s\n",
|
||||
"Ei viestej{.",
|
||||
"%d viesti({) t{m{n p{iv{n jonossa.\n",
|
||||
"Numero puuttuu",
|
||||
"Illegal function in WARN clause (NEEDS TRANSLATION)"
|
||||
#endif
|
||||
};
|
||||
#endif /* MK_GLOBALS */
|
||||
|
||||
/* The following is only used in init.c */
|
||||
#ifdef L_IN_INIT
|
||||
#define L_USAGE_OVERRIDE 1
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC void Usage(void)
|
||||
#else
|
||||
void Usage()
|
||||
#endif /* HAVE_PROTOS */
|
||||
{
|
||||
fprintf(ErrFp, "\nREMIND %s (%s version) Copyright 1992-1994 by David F. Skoll\n", VERSION, L_LANGNAME);
|
||||
#ifdef BETA
|
||||
fprintf(ErrFp, ">>>> BETAVERSIO <<<<\n");
|
||||
#endif
|
||||
#if defined(ISOLATIN1)
|
||||
fprintf(ErrFp, "K\xE4ytt\xF6: remind [tarkenteet] tiedosto [p\xE4iv\xE4ys] [aika] [*toisto]\n");
|
||||
fprintf(ErrFp, "Tarkenteet:\n");
|
||||
fprintf(ErrFp, " -n Tulosta viestien seuraavat esiintymiskerrat yksink. muodossa\n");
|
||||
fprintf(ErrFp, " -r Est\xE4 RUN-lauseiden k\xE4ytt\xF6\n");
|
||||
fprintf(ErrFp, " -c[n] Tulosta n:n kuukauden kalenteri (oletus 1)\n");
|
||||
fprintf(ErrFp, " -c+[n] Tulosta n:n viikon kalenteri (oletus 1)\n");
|
||||
fprintf(ErrFp, " -w[n[,p[,s]]] Aseta kalenterin leveys, tasaus ja v\xE4lit\n");
|
||||
fprintf(ErrFp, " -s[+][n] Tulosta n:n kuukauden (viikon) 'yksink. kalenteri' (oletus 1)\n");
|
||||
fprintf(ErrFp, " -p[n] Kuten -s, mutta tulosta rem2ps:lle sopivassa muodossa\n");
|
||||
fprintf(ErrFp, " -v Laveat tulostukset\n");
|
||||
fprintf(ErrFp, " -o \xC4l\xE4 noudata ONCE-lauseita\n");
|
||||
fprintf(ErrFp, " -t Laukaise kaikki viestit deltan arvosta v\xE4litt\xE4m\xE4tt\xE4\n");
|
||||
fprintf(ErrFp, " -h Suppeat tulostukset\n");
|
||||
#ifdef HAVE_QUEUED
|
||||
fprintf(ErrFp, " -a \xC4l\xE4 laukaise viestej\xE4 heti - lis\xE4\xE4 ne jonoon\n");
|
||||
fprintf(ErrFp, " -q \xC4l\xE4 lis\xE4\xE4 viestej\xE4 jonoon\n");
|
||||
fprintf(ErrFp, " -f Laukaise viestit, pysy etualalla\n");
|
||||
fprintf(ErrFp, " -z[n] K\xE4ynnisty demonina, her\xE4tys n:n (5:n) minuutin v\xE4lein\n");
|
||||
#endif
|
||||
fprintf(ErrFp, " -d... Virheenetsint\xE4: e=echo x=expr-eval t=trig v=dumpvars l=showline\n");
|
||||
fprintf(ErrFp, " -e Ohjaa virhetulostus stdout-vuohon\n");
|
||||
fprintf(ErrFp, " -b[n] Ajan ilmaisu: 0=ap/ip, 1=24 tuntia, 2=ei aikoja\n");
|
||||
fprintf(ErrFp, " -x[n] SATISFY-lauseen toistoraja (oletus 150)\n");
|
||||
fprintf(ErrFp, " -kcmd Suorita 'cmd' MSG-tyyppisille viesteille\n");
|
||||
fprintf(ErrFp, " -g[ddd] Lajittele viestit p\xE4iv\xE4yksen, ajan ja t\xE4rkeyden mukaan\n");
|
||||
fprintf(ErrFp, " -ivar=val Alusta muuttuja var arvolla val ja s\xE4ilyt\xE4 var\n");
|
||||
fprintf(ErrFp, " -m Aloita kalenteri maanantaista eik\xE4 sunnuntaista\n");
|
||||
exit(1);
|
||||
#elif defined(IBMEXTENDED)
|
||||
fprintf(ErrFp, "K\x84ytt\x94: remind [tarkenteet] tiedosto [p\x84iv\x84ys] [aika] [*toisto]\n");
|
||||
fprintf(ErrFp, "Tarkenteet:\n");
|
||||
fprintf(ErrFp, " -n Tulosta viestien seuraavat esiintymiskerrat yksink. muodossa\n");
|
||||
fprintf(ErrFp, " -r Est\x84 RUN-lauseiden k\x84ytt\x94\n");
|
||||
fprintf(ErrFp, " -c[n] Tulosta n:n kuukauden kalenteri (oletus 1)\n");
|
||||
fprintf(ErrFp, " -c+[n] Tulosta n:n viikon kalenteri (oletus 1)\n");
|
||||
fprintf(ErrFp, " -w[n[,p[,s]]] Aseta kalenterin leveys, tasaus ja v\x84lit\n");
|
||||
fprintf(ErrFp, " -s[+][n] Tulosta n:n kuukauden (viikon) 'yksink. kalenteri' (oletus 1)\n");
|
||||
fprintf(ErrFp, " -p[n] Kuten -s, mutta tulosta rem2ps:lle sopivassa muodossa\n");
|
||||
fprintf(ErrFp, " -v Laveat tulostukset\n");
|
||||
fprintf(ErrFp, " -o \x8El\x84 noudata ONCE-lauseita\n");
|
||||
fprintf(ErrFp, " -t Laukaise kaikki viestit deltan arvosta v\x84litt\x84m\x84tt\x84\n");
|
||||
fprintf(ErrFp, " -h Suppeat tulostukset\n");
|
||||
#ifdef HAVE_QUEUED
|
||||
fprintf(ErrFp, " -a \x8El\x84 laukaise viestej\x84 heti - lis\x84\x84 ne jonoon\n");
|
||||
fprintf(ErrFp, " -q \x8El\x84 lis\x84\x84 viestej\x84 jonoon\n");
|
||||
fprintf(ErrFp, " -f Laukaise viestit, pysy etualalla\n");
|
||||
fprintf(ErrFp, " -z[n] K\x84ynnisty demonina, her\x84tys n:n (5:n) minuutin v\x84lein\n");
|
||||
#endif
|
||||
fprintf(ErrFp, " -d... Virheenetsint\x84: e=echo x=expr-eval t=trig v=dumpvars l=showline\n");
|
||||
fprintf(ErrFp, " -e Ohjaa virhetulostus stdout-vuohon\n");
|
||||
fprintf(ErrFp, " -b[n] Ajan ilmaisu: 0=ap/ip, 1=24 tuntia, 2=ei aikoja\n");
|
||||
fprintf(ErrFp, " -x[n] SATISFY-lauseen toistoraja (oletus 150)\n");
|
||||
fprintf(ErrFp, " -kcmd Suorita 'cmd' MSG-tyyppisille viesteille\n");
|
||||
fprintf(ErrFp, " -g[ddd] Lajittele viestit p\x84iv\x84yksen, ajan ja t\x84rkeyden mukaan\n");
|
||||
fprintf(ErrFp, " -ivar=val Alusta muuttuja var arvolla val ja s\x84ilyt\x84 var\n");
|
||||
fprintf(ErrFp, " -m Aloita kalenteri maanantaista eik\x84 sunnuntaista\n");
|
||||
exit(1);
|
||||
#else
|
||||
fprintf(ErrFp, "K{ytt|: remind [tarkenteet] tiedosto [p{iv{ys] [aika] [*toisto]\n");
|
||||
fprintf(ErrFp, "Tarkenteet:\n");
|
||||
fprintf(ErrFp, " -n Tulosta viestien seuraavat esiintymiskerrat yksink. muodossa\n");
|
||||
fprintf(ErrFp, " -r Est{ RUN-lauseiden k{ytt|\n");
|
||||
fprintf(ErrFp, " -c[n] Tulosta n:n kuukauden kalenteri (oletus 1)\n");
|
||||
fprintf(ErrFp, " -c+[n] Tulosta n:n viikon kalenteri (oletus 1)\n");
|
||||
fprintf(ErrFp, " -w[n[,p[,s]]] Aseta kalenterin leveys, tasaus ja v{lit\n");
|
||||
fprintf(ErrFp, " -s[+][n] Tulosta n:n kuukauden (viikon) 'yksink. kalenteri' (oletus 1)\n");
|
||||
fprintf(ErrFp, " -p[n] Kuten -s, mutta tulosta rem2ps:lle sopivassa muodossa\n");
|
||||
fprintf(ErrFp, " -v Laveat tulostukset\n");
|
||||
fprintf(ErrFp, " -o [l{ noudata ONCE-lauseita\n");
|
||||
fprintf(ErrFp, " -t Laukaise kaikki viestit deltan arvosta v{litt{m{tt{\n");
|
||||
fprintf(ErrFp, " -h Suppeat tulostukset\n");
|
||||
#ifdef HAVE_QUEUED
|
||||
fprintf(ErrFp, " -a [l{ laukaise viestej{ heti - lis{{ ne jonoon\n");
|
||||
fprintf(ErrFp, " -q [l{ lis{{ viestej{ jonoon\n");
|
||||
fprintf(ErrFp, " -f Laukaise viestit, pysy etualalla\n");
|
||||
fprintf(ErrFp, " -z[n] K{ynnisty demonina, her{tys n:n (5:n) minuutin v{lein\n");
|
||||
#endif
|
||||
fprintf(ErrFp, " -d... Virheenetsint{: e=echo x=expr-eval t=trig v=dumpvars l=showline\n");
|
||||
fprintf(ErrFp, " -e Ohjaa virhetulostus stdout-vuohon\n");
|
||||
fprintf(ErrFp, " -b[n] Ajan ilmaisu: 0=ap/ip, 1=24 tuntia, 2=ei aikoja\n");
|
||||
fprintf(ErrFp, " -x[n] SATISFY-lauseen toistoraja (oletus 150)\n");
|
||||
fprintf(ErrFp, " -kcmd Suorita 'cmd' MSG-tyyppisille viesteille\n");
|
||||
fprintf(ErrFp, " -g[ddd] Lajittele viestit p{iv{yksen, ajan ja t{rkeyden mukaan\n");
|
||||
fprintf(ErrFp, " -ivar=val Alusta muuttuja var arvolla val ja s{ilyt{ var\n");
|
||||
fprintf(ErrFp, " -m Aloita kalenteri maanantaista eik{ sunnuntaista\n");
|
||||
exit(1);
|
||||
#endif
|
||||
}
|
||||
#endif /* L_IN_INIT */
|
||||
427
french.h
427
french.h
@@ -1,427 +0,0 @@
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* FRENCH.H */
|
||||
/* */
|
||||
/* Support for the French language. */
|
||||
/* */
|
||||
/* Contributed by Laurent Duperval. */
|
||||
/* */
|
||||
/* This file is part of REMIND. */
|
||||
/* */
|
||||
/* REMIND is Copyright (C) 1992-1996 by David F. Skoll */
|
||||
/* This file is Copyright (C) 1993 by Laurent Duperval and */
|
||||
/* David F. Skoll. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
/* $Id: french.h,v 1.3 1996-04-29 19:34:37 dfs Exp $ */
|
||||
|
||||
/* The very first define in a language support file must be L_LANGNAME: */
|
||||
#define L_LANGNAME "French"
|
||||
|
||||
/* Day names */
|
||||
#define L_SUNDAY "dimanche"
|
||||
#define L_MONDAY "lundi"
|
||||
#define L_TUESDAY "mardi"
|
||||
#define L_WEDNESDAY "mercredi"
|
||||
#define L_THURSDAY "jeudi"
|
||||
#define L_FRIDAY "vendredi"
|
||||
#define L_SATURDAY "samedi"
|
||||
|
||||
/* Day initials - first letter only */
|
||||
#define L_DAYINIT "dlmmjvs"
|
||||
|
||||
/* Month names */
|
||||
#define L_JAN "janvier"
|
||||
#ifdef ISOLATIN1
|
||||
#define L_FEB "f\351vrier"
|
||||
#else
|
||||
#define L_FEB "fevrier"
|
||||
#endif
|
||||
#define L_MAR "mars"
|
||||
#define L_APR "avril"
|
||||
#define L_MAY "mai"
|
||||
#define L_JUN "juin"
|
||||
#define L_JUL "juillet"
|
||||
#ifdef ISOLATIN1
|
||||
#define L_AUG "ao\373t"
|
||||
#else
|
||||
#define L_AUG "aout"
|
||||
#endif
|
||||
#define L_SEP "septembre"
|
||||
#define L_OCT "octobre"
|
||||
#define L_NOV "novembre"
|
||||
#ifdef ISOLATIN1
|
||||
#define L_DEC "d\351cembre"
|
||||
#else
|
||||
#define L_DEC "decembre"
|
||||
#endif
|
||||
/* Today and tomorrow */
|
||||
#define L_TODAY "aujourd'hui"
|
||||
#define L_TOMORROW "demain"
|
||||
|
||||
/* The default banner */
|
||||
#define L_BANNER "Rappels pour %w, %d%s %m, %y%o:"
|
||||
|
||||
/* "am" and "pm" */
|
||||
#define L_AM "am"
|
||||
#define L_PM "pm"
|
||||
|
||||
/*** The following are only used in dosubst.c ***/
|
||||
#ifdef L_IN_DOSUBST
|
||||
|
||||
/* Ago and from now */
|
||||
#define L_AGO "il y a"
|
||||
#define L_FROMNOW "dans"
|
||||
|
||||
/* "in %d days' time" */
|
||||
#define L_INXDAYS "dans %d jours"
|
||||
|
||||
/* "on" as in "on date..." */
|
||||
#define L_ON "le"
|
||||
|
||||
/* Pluralizing - this is a problem for many languages and may require
|
||||
a more drastic fix */
|
||||
#define L_PLURAL "s"
|
||||
|
||||
/* Minutes, hours, at, etc */
|
||||
#define L_NOW "maintenant"
|
||||
#ifdef ISOLATIN1
|
||||
#define L_AT "\340"
|
||||
#else
|
||||
#define L_AT "a"
|
||||
#endif
|
||||
#define L_MINUTE "minute"
|
||||
#define L_HOUR "heure"
|
||||
#define L_IS "est"
|
||||
#ifdef ISOLATIN1
|
||||
#define L_WAS "\351tait"
|
||||
#else
|
||||
#define L_WAS "etait"
|
||||
#endif
|
||||
#define L_AND "et"
|
||||
/* What to add to make "hour" plural */
|
||||
#define L_HPLU "s"
|
||||
/* What to add to make "minute" plural */
|
||||
#define L_MPLU "s"
|
||||
|
||||
/* Define any overrides here, such as L_ORDINAL_OVERRIDE, L_A_OVER, etc.
|
||||
See the file dosubst.c for more info. */
|
||||
|
||||
#define L_ORDINAL_OVERRIDE \
|
||||
switch(d) { \
|
||||
case 1: plu = "er"; break; \
|
||||
default: plu = ""; break; \
|
||||
}
|
||||
|
||||
#define L_1_OVER \
|
||||
if (tdiff == 0) \
|
||||
sprintf(s, L_NOW); \
|
||||
else if (tdiff < 0) { \
|
||||
if (mdiff == 0) \
|
||||
sprintf(s, "il y a %d heure%s", hdiff, hplu); \
|
||||
else if (hdiff == 0) \
|
||||
sprintf(s, "il y a %d minute%s", mdiff, mplu); \
|
||||
else \
|
||||
sprintf(s, "il y a %d heure%s et %d minute%s", hdiff, hplu, mdiff, mplu); \
|
||||
} else { \
|
||||
if (mdiff == 0) \
|
||||
sprintf(s, "dans %d heure%s", hdiff, hplu); \
|
||||
else if (hdiff == 0) \
|
||||
sprintf(s, "dans %d minute%s", mdiff, mplu); \
|
||||
else \
|
||||
sprintf(s, "dans %d heure%s et %d minute%s", hdiff, hplu, mdiff, mplu); \
|
||||
}
|
||||
|
||||
#define L_J_OVER \
|
||||
sprintf(s, "%s %s, %d%s %s, %d", L_ON, DayName[jul%7], \
|
||||
d, plu, MonthName[m], y);
|
||||
|
||||
#define L_K_OVER \
|
||||
sprintf(s, "%s %s, %d%s %s", L_ON, DayName[jul%7], \
|
||||
d, plu, MonthName[m]);
|
||||
|
||||
#endif /* L_IN_DOSUBST */
|
||||
|
||||
/* The next ones are used only when MK_GLOBALS is set */
|
||||
#ifdef MK_GLOBALS
|
||||
#define L_ERR_OVERRIDE 1
|
||||
EXTERN char *ErrMsg[] =
|
||||
{
|
||||
#ifdef ISOLATIN1
|
||||
"Ok",
|
||||
"']' manquant",
|
||||
"Apostrophe manquant",
|
||||
"Expression trop complexe - trop d'op\351rateurs",
|
||||
"Expression trop complexe - trop d'op\351randes",
|
||||
"')' manquante",
|
||||
"Fonction non-d\351finie",
|
||||
"Caract\350re ill\351gal",
|
||||
"Op\351rateur binaire attendu",
|
||||
"Manque de m\351moire",
|
||||
"Nombre mal form\351",
|
||||
"Erreur interne - 'underflow' de la pile d'op\351rateurs",
|
||||
"Erreur interne - 'underflow' de la pile de variables",
|
||||
"Impossible de convertir",
|
||||
"Types non-\351quivalents",
|
||||
"D\351bordement de date",
|
||||
"Erreur interne - erreur de pile",
|
||||
"Division par z\351ro",
|
||||
"Variable non d\351finie",
|
||||
"Fin de ligne non attendue",
|
||||
"Fin de fichier non attendue",
|
||||
"Erreur I/O",
|
||||
"Ligne trop longue",
|
||||
"Erreur interne",
|
||||
"Mauvaise date sp\351cifi\351e",
|
||||
"Pas assez d'arguments",
|
||||
"Trop d'arguments",
|
||||
"Heure mal form\351e",
|
||||
"Nombre trop \351lev\351",
|
||||
"Nombre trop bas",
|
||||
"Impossible d'ouvrir le fichier",
|
||||
"Trop d'INCLUDE imbriqu\351s",
|
||||
"Erreur d'analyse",
|
||||
"Impossible de calculer le d\351clenchement",
|
||||
"Trop de IF imbriqu\351s",
|
||||
"ELSE sans IF correspondant",
|
||||
"ENDIF sans IF correspondant",
|
||||
"Impossible d'omettre (OMIT) tous les jours",
|
||||
"El\351ment(s) \351tranger(s) sur la ligne",
|
||||
"POP-OMIT-CONTEXT sans PUSH-OMIT-CONTEXT correspondant",
|
||||
"RUN d\351activ\351",
|
||||
"Erreur de domaine",
|
||||
"Identificateur invalide",
|
||||
"Appel r\351cursif d\351tect\351",
|
||||
"",
|
||||
"Impossible de modifier une variable syst\350me",
|
||||
"Fonction de la librairie C ne peut repr\351senter la date/l'heure",
|
||||
"Tentative de red\351finition d'une fonction intrins\350que",
|
||||
"Impossible d'imbriquer une d\351finition de fonction dans une expression",
|
||||
"Pour utiliser le facteur de r\351p\351tition la date doit \352tre sp\351cifi\351e au complet",
|
||||
"Ann\351e sp\351cifi\351e deux fois",
|
||||
"Mois sp\351cifi\351 deux fois",
|
||||
"Jour sp\351cifi\351 deux fois",
|
||||
"El\351ment inconnu",
|
||||
"Mois et jour doivent \352tre sp\351cifi\351s dans commande OMIT",
|
||||
"Trop de OMITs partiels",
|
||||
"Trop de OMITs complets",
|
||||
"Attention: PUSH-OMIT-CONTEXT sans POP-OMIT-CONTEXT correspondant",
|
||||
"Erreur \340 la lecture du fichier",
|
||||
"Fin de ligne attendue",
|
||||
"Date h\351breuse invalide",
|
||||
"IIF demande nombre d'arguments impair",
|
||||
"Attention: ENDIF manquant",
|
||||
"Virgule attendue",
|
||||
"Jour de la semaine sp\351cifi\351 deux fois",
|
||||
"Utiliser un seul parmi BEFORE, AFTER ou SKIP",
|
||||
"Impossible d'imbriquer MSG, MSF, RUN, etc. dans une expression",
|
||||
"Valeur de r\351p\351tition sp\351cifi\351e deux fois",
|
||||
"Valeur delta sp\351cifi\351e deux fois",
|
||||
"Valeur de retour sp\351cifi\351e deux fois",
|
||||
"Mot-cl\351 ONCE utilis\351 deux fois. (Hah.)",
|
||||
"Heure attendue apr\350s AT",
|
||||
"Mot-cl\351 UNTIL utilis\351 deux fois",
|
||||
"Sp\351cification de date incompl\350te",
|
||||
"Mot-cl\351 SCANFROM utilis\351 deux fois",
|
||||
"Variable",
|
||||
"Valeur",
|
||||
"*NON-DEFINI*",
|
||||
"Entr\351e dans UserFN",
|
||||
"Sortie de UserFN",
|
||||
"Expir\351",
|
||||
"fork() \351chou\351 - impossible de faire les appels en queue",
|
||||
"Impossible d'acc\351der au fichier",
|
||||
"Date syst\350me ill\351gale: Ann\351e est inf\351rieure \340 %d\n",
|
||||
"Option de d\351verminage inconnue '%c'\n",
|
||||
"Option inconnue '%c'\n",
|
||||
"Usager inconnu '%s'\n",
|
||||
"Impossible de changer gid pour %d\n",
|
||||
"Impossible de changer uid pour %d\n",
|
||||
"Manque de m\351moire pour environnement\n",
|
||||
"Signe '=' manquant",
|
||||
"Nom de variable absent",
|
||||
"Expression absente",
|
||||
"Impossible de changer la date d'acc\350s de %s\n",
|
||||
"Remind: '-i' option: %s\n",
|
||||
"Pas de rappels.",
|
||||
"%d rappel(s) en file pour aujourd'hui.\n",
|
||||
"Nombre attendu",
|
||||
"Fonction ill\351gale apr\350s WARN"
|
||||
#else /* ISOLATIN1 */
|
||||
"Ok",
|
||||
"']' manquant",
|
||||
"Apostrophe manquant",
|
||||
"Expression trop complexe - trop d'operateurs",
|
||||
"Expression trop complexe - trop d'operandes",
|
||||
"')' manquante",
|
||||
"Fonction non-definie",
|
||||
"Caractere illegal",
|
||||
"Operateur binaire attendu",
|
||||
"Manque de memoire",
|
||||
"Nombre mal forme",
|
||||
"Erreur interne - 'underflow' de la pile d'operateurs",
|
||||
"Erreur interne - 'underflow' de la pile de variables",
|
||||
"Impossible de convertir",
|
||||
"Types non-equivalents",
|
||||
"Debordement de date",
|
||||
"Erreur interne - erreur de pile",
|
||||
"Division par zero",
|
||||
"Variable non definie",
|
||||
"Fin de ligne non attendue",
|
||||
"Fin de fichier non attendue",
|
||||
"Erreur I/O",
|
||||
"Ligne trop longue",
|
||||
"Erreur interne",
|
||||
"Mauvaise date specifiee",
|
||||
"Pas assez d'arguments",
|
||||
"Trop d'arguments",
|
||||
"Heure mal formee",
|
||||
"Nombre trop eleve",
|
||||
"Nombre trop bas",
|
||||
"Impossible d'ouvrir le fichier",
|
||||
"Trop d'INCLUDE imbriques",
|
||||
"erreur d'analyse",
|
||||
"Impossible de calculer le declenchement",
|
||||
"Trop de IF imbriques",
|
||||
"ELSE sans IF correspondant",
|
||||
"ENDIF sans IF correspondant",
|
||||
"Impossible d'omettre (OMIT) tous les jours",
|
||||
"Element(s) etranger(s) sur la ligne",
|
||||
"POP-OMIT-CONTEXT sans PUSH-OMIT-CONTEXT correspondant",
|
||||
"RUN desactive",
|
||||
"Erreur de domaine",
|
||||
"Identificateur invalide",
|
||||
"Appel recursif detecte",
|
||||
"",
|
||||
"Impossible de modifier une variable systeme",
|
||||
"Fonction de la librairie C ne peut representer la date/l'heure",
|
||||
"Tentative de redefinition d'une fonction intrinseque",
|
||||
"Impossible d'imbriquer une definition de fonction dans une expression",
|
||||
"Pour utiliser le facteur de repetition la date doit etre specifiee au complet",
|
||||
"Annee specifiee deux fois",
|
||||
"Mois specifie deux fois",
|
||||
"Jour specifie deux fois",
|
||||
"Element inconnu",
|
||||
"Mois et jour doivent etre specifies dans commande OMIT",
|
||||
"Trop de OMITs partiels",
|
||||
"Trop de OMITs complets",
|
||||
"Attention: PUSH-OMIT-CONTEXT sans POP-OMIT-CONTEXT correspondant",
|
||||
"Erreur a la lecture du fichier",
|
||||
"Fin de ligne attendue",
|
||||
"Date hebreuse invalide",
|
||||
"IIF demande nombre d'arguments impair",
|
||||
"Attention: ENDIF manquant",
|
||||
"Virgule attendue",
|
||||
"Jour de la semaine specifie deux fois",
|
||||
"Utiliser un seul parmi BEFORE, AFTER ou SKIP",
|
||||
"Impossible d'imbriquer MSG, MSF, RUN, etc. dans une expression",
|
||||
"Valeur de repetition specifiee deux fois",
|
||||
"Valeur delta specifiee deux fois",
|
||||
"Valeur de retour specifiee deux fois",
|
||||
"Mot-cle ONCE utilise deux fois. (Hah.)",
|
||||
"Heure attendue apres AT",
|
||||
"Mot-cle UNTIL utilise deux fois",
|
||||
"Specification de date incomplete",
|
||||
"Mot-cle SCANFROM utilise deux fois",
|
||||
"Variable",
|
||||
"Valeur",
|
||||
"*NON-DEFINI*",
|
||||
"Entree dans UserFN",
|
||||
"Sortie de UserFN",
|
||||
"Expire",
|
||||
"fork() echoue - impossible de faire les appels en queue",
|
||||
"Impossible d'acceder au fichier",
|
||||
"Date systeme illegale: Annee est inferieure a %d\n",
|
||||
"Option de deverminage inconnue '%c'\n",
|
||||
"Option inconnue '%c'\n",
|
||||
"Usager inconnu '%s'\n",
|
||||
"Impossible de changer gid pour %d\n",
|
||||
"Impossible de changer uid pour %d\n",
|
||||
"Manque de memoire pour environnement\n",
|
||||
"Signe '=' manquant",
|
||||
"Nom de variable absent",
|
||||
"Expression absente",
|
||||
"Impossible de changer la date d'acces de %s\n",
|
||||
"Remind: '-i' option: %s\n",
|
||||
"Pas de rappels.",
|
||||
"%d rappel(s) en file pour aujourd'hui.\n",
|
||||
"Nombre attendu",
|
||||
"Fonction illegale apres WARN"
|
||||
#endif /* ISOLATIN1 */
|
||||
};
|
||||
#endif /* MK_GLOBALS */
|
||||
|
||||
/* The following is only used in init.c */
|
||||
#ifdef L_IN_INIT
|
||||
#define L_USAGE_OVERRIDE 1
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC void Usage(void)
|
||||
#else
|
||||
void Usage()
|
||||
#endif /* HAVE_PROTOS */
|
||||
{
|
||||
fprintf(ErrFp, "\nREMIND %s (%s version) Copyright 1992-1996 by David F. Skoll\n", VERSION, L_LANGNAME);
|
||||
#ifdef BETA
|
||||
fprintf(ErrFp, ">>>> BETA VERSION <<<<\n");
|
||||
#endif
|
||||
#ifdef ISOLATIN1
|
||||
fprintf(ErrFp, "\nUtilisation: remind [options] fichier [date] [heure] [*r\351p\351tition]\n");
|
||||
fprintf(ErrFp, "Options:\n");
|
||||
fprintf(ErrFp, " -n Afficher la prochaine occurence des rappels en format simple\n");
|
||||
fprintf(ErrFp, " -r D\351sactiver les instructions RUN\n");
|
||||
fprintf(ErrFp, " -c[n] Produire un calendrier pour n (d\351faut 1) mois\n");
|
||||
fprintf(ErrFp, " -c+[n] Produire un calendrier pour n (d\351faut 1) semaines\n");
|
||||
fprintf(ErrFp, " -w[n[,p[,s]]] Sp\351cifier largeur, remplissage et espacement du calendrier\n");
|
||||
fprintf(ErrFp, " -s[+][n] Produire un 'calendrier simple' pour n (1) mois (semaines)\n");
|
||||
fprintf(ErrFp, " -p[n] Comme -s, mais avec entr\351e compatible avec rem2ps\n");
|
||||
fprintf(ErrFp, " -v Mode verbeux\n");
|
||||
fprintf(ErrFp, " -o Ignorer instructions ONCE\n");
|
||||
fprintf(ErrFp, " -t D\351clencher tous les rappels peu importe le delta\n");
|
||||
fprintf(ErrFp, " -h Mode silencieux\n");
|
||||
#ifdef HAVE_QUEUED
|
||||
fprintf(ErrFp, " -a Ne pas d\351clencher les rappels minut\351s imm\351diatement - les mettre en file\n");
|
||||
fprintf(ErrFp, " -q Ne pas mettre les rappels minut\351s en file\n");
|
||||
fprintf(ErrFp, " -f D\351clencher les rappels minut\351s imm\351diatement en restant en avant-plan\n");
|
||||
fprintf(ErrFp, " -z[n] Entrer en mode 'daemon', r\351veil chaque n (5) minutes\n");
|
||||
#endif
|
||||
fprintf(ErrFp, " -d... Debug: e=echo x=expr-eval t=trig v=dumpvars l=showline\n");
|
||||
fprintf(ErrFp, " -e Envoyer les messages de stderr \340 stdout\n");
|
||||
fprintf(ErrFp, " -b[n] Formats de l'heure pour le calendrier: 0=am/pm, 1=24hr, 2=aucun\n");
|
||||
fprintf(ErrFp, " -x[n] Limite d'it\351rations pour la clause SATISFY (def=150)\n");
|
||||
fprintf(ErrFp, " -kcmd Ex\351cuter 'cmd' pour les rappels de type MSG\n");
|
||||
fprintf(ErrFp, " -g[ddd] Trier les rappels par date, heure et priorit\351 avant d'\351mettre\n");
|
||||
fprintf(ErrFp, " -ivar=val Initialiser var \340 val et conserver var\n");
|
||||
fprintf(ErrFp, " -m Commencer le calendrier avec lundi plut\364t que dimanche\n");
|
||||
#else /* ISOLATIN1 */
|
||||
fprintf(ErrFp, "\nUtilisation: remind [options] fichier [date] [heure] [*repetition]\n");
|
||||
fprintf(ErrFp, "Options:\n");
|
||||
fprintf(ErrFp, " -n Afficher la prochaine occurence des rappels en format simple\n");
|
||||
fprintf(ErrFp, " -r Desactiver les instructions RUN\n");
|
||||
fprintf(ErrFp, " -c[n] Produire un calendrier pour n (defaut 1) mois\n");
|
||||
fprintf(ErrFp, " -c+[n] Produire un calendrier pour n (defaut 1) semaines\n");
|
||||
fprintf(ErrFp, " -w[n[,p[,s]]] Specifier largeur, remplissage et espacement du calendrier\n");
|
||||
fprintf(ErrFp, " -s[+][n] Produire un 'calendrier simple' pour n (1) mois (semaines)\n");
|
||||
fprintf(ErrFp, " -p[n] Comme -s, mais avec entree compatible avec rem2ps\n");
|
||||
fprintf(ErrFp, " -v Mode verbeux\n");
|
||||
fprintf(ErrFp, " -o Ignorer instructions ONCE\n");
|
||||
fprintf(ErrFp, " -t Declencher tous les rappels peu importe le delta\n");
|
||||
fprintf(ErrFp, " -h Mode silencieux\n");
|
||||
#ifdef HAVE_QUEUED
|
||||
fprintf(ErrFp, " -a Ne pas declencher les rappels minutes immediatement - les mettre en file\n");
|
||||
fprintf(ErrFp, " -q Ne pas mettre les rappels minutes en file\n");
|
||||
fprintf(ErrFp, " -f Declencher les rappels minutes immediatement en restant en avant-plan\n");
|
||||
fprintf(ErrFp, " -z[n] Entrer en mode 'daemon', reveil chaque n (5) minutes\n");
|
||||
#endif
|
||||
fprintf(ErrFp, " -d... Debug: e=echo x=expr-eval t=trig v=dumpvars l=showline\n");
|
||||
fprintf(ErrFp, " -e Envoyer les messages de stderr a stdout\n");
|
||||
fprintf(ErrFp, " -b[n] Formats de l'heure pour le calendrier: 0=am/pm, 1=24hr, 2=aucun\n");
|
||||
fprintf(ErrFp, " -x[n] Limite d'iterations pour la clause SATISFY (def=150)\n");
|
||||
fprintf(ErrFp, " -kcmd Executer 'cmd' pour les rappels de type MSG\n");
|
||||
fprintf(ErrFp, " -g[ddd] Trier les rappels par date, heure et priorite avant d'emettre\n");
|
||||
fprintf(ErrFp, " -ivar=val Initialiser var a val et conserver var\n");
|
||||
fprintf(ErrFp, " -m Commencer le calendrier avec lundi plutot que dimanche\n");
|
||||
#endif /* ISOLATIN1 */
|
||||
exit(1);
|
||||
}
|
||||
#endif /* L_IN_INIT */
|
||||
35
include/ansitext.rem
Normal file
35
include/ansitext.rem
Normal file
@@ -0,0 +1,35 @@
|
||||
# Global variables for various ANSI escape-code sequences
|
||||
# Not all sequences are supported by all terminals.
|
||||
|
||||
# This file is part of REMIND
|
||||
# REMIND is Copyright (C) 1992-2023 by Dianne Skoll
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
if !defined("ansi_bold")
|
||||
# Disable ANSI attributes in calandar mode
|
||||
if $CalMode
|
||||
set ansi_normal ""
|
||||
set ansi_bold ""
|
||||
set ansi_faint ""
|
||||
set ansi_italic ""
|
||||
set ansi_underline ""
|
||||
set ansi_reverse ""
|
||||
set ansi_strikeout ""
|
||||
set ansi_underline2 ""
|
||||
set ansi_overline ""
|
||||
else
|
||||
set ansi_normal char(27) + "[0m"
|
||||
set ansi_bold char(27) + "[1m"
|
||||
set ansi_faint char(27) + "[2m"
|
||||
set ansi_italic char(27) + "[3m"
|
||||
set ansi_underline char(27) + "[4m"
|
||||
set ansi_reverse char(27) + "[7m"
|
||||
set ansi_strikeout char(27) + "[9m"
|
||||
set ansi_underline2 char(27) + "[21m"
|
||||
set ansi_overline char(27) + "[53m"
|
||||
endif
|
||||
preserve ansi_normal ansi_bold ansi_faint ansi_italic ansi_underline2 ansi_reverse ansi_strikeout ansi_underline2 ansi_overline
|
||||
endif
|
||||
|
||||
# Example: REM MSG I must [ansi_bold]emphasize[ansi_normal] \
|
||||
# the [ansi_italic]severity[ansi_normal] of the situation!
|
||||
30
include/holidays/ca.rem
Normal file
30
include/holidays/ca.rem
Normal file
@@ -0,0 +1,30 @@
|
||||
# Canadian holidays
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
OMIT 1 Jan MSG New Year's Day
|
||||
|
||||
# This varies by province
|
||||
REM Third Monday in Feb SCANFROM -7 ADDOMIT MSG Family Day
|
||||
|
||||
# This varies by province
|
||||
OMIT [easterdate($Uy) - 2] MSG Good Friday
|
||||
|
||||
# This varies by province
|
||||
OMIT [easterdate($Uy) + 1] MSG Easter Monday
|
||||
|
||||
REM Mon 18 May SCANFROM -7 ADDOMIT MSG Victoria Day
|
||||
OMIT 1 July MSG Canada Day
|
||||
|
||||
# This varies by province
|
||||
REM First Monday in Aug SCANFROM -7 ADDOMIT MSG Civic Holiday
|
||||
|
||||
REM First Monday in Sep SCANFROM -7 ADDOMIT MSG Labour Day
|
||||
|
||||
REM Second Monday in Oct SCANFROM -7 ADDOMIT MSG Thanksgiving Day
|
||||
|
||||
REM 11 November MSG Remembrance Day
|
||||
|
||||
OMIT 25 Dec MSG Christmas
|
||||
|
||||
OMIT 26 Dec MSG Boxing Day
|
||||
|
||||
20
include/holidays/fr.rem
Normal file
20
include/holidays/fr.rem
Normal file
@@ -0,0 +1,20 @@
|
||||
#
|
||||
# France Holidays
|
||||
#
|
||||
# Source: Article L3133-1
|
||||
# https://www.legifrance.gouv.fr/codes/section_lc/LEGITEXT000006072050/LEGISCTA000006178007/2016-08-10/
|
||||
#
|
||||
|
||||
SET easter EASTERDATE($Uy)
|
||||
|
||||
REM Jan 1 MSG %"Jour de l'an%"
|
||||
REM [easter+1] MSG %"Lundi de Pâques%"
|
||||
REM May 1 MSG %"Fête du Travail%"
|
||||
REM May 8 MSG %"Victoire des alliés%"
|
||||
REM [easter+39] MSG %"Jeudi de l'Ascension%"
|
||||
REM [easter+50] MSG %"Lundi de Pentecôte%"
|
||||
REM Jul 14 MSG %"Fête nationale%"
|
||||
REM Aug 15 MSG %"Assomption%"
|
||||
REM Nov 1 MSG %"La Toussaint%"
|
||||
REM Nov 11 MSG %"Armistice%"
|
||||
REM Dec 25 MSG %"Noël%"
|
||||
39
include/holidays/gr.rem
Normal file
39
include/holidays/gr.rem
Normal file
@@ -0,0 +1,39 @@
|
||||
# Greek national holidays
|
||||
# ΑΡΓΙΕΣ (για όλους)
|
||||
|
||||
# fixed
|
||||
REM 1 Jan MSG ΠΡΩΤΟΧΡΟΝΙΑ
|
||||
REM 6 Jan MSG ΤΑ ΦΩΤΑ/ ΘΕΟΦΑΝΕΙΑ
|
||||
REM 25 Mar MSG η 25η Μαρτίου
|
||||
REM 15 Aug MSG 15Αύγουστος
|
||||
REM 28 Oct MSG ΟΧΙ
|
||||
REM 25 Dec MSG ΧΡΙΣΤΟΥΓΕΝΝΑ
|
||||
REM 26 Dec MSG ΧΡΙΣΤΟΥΓΕΝΝΑ2
|
||||
|
||||
REM [orthodoxeaster($Uy)+1] ΔΕΥΤΕΡΑ ΤΟΥ ΠΑΣΧΑ
|
||||
|
||||
|
||||
# May first is a national holiday except if Sunday, day of great week (week before easter) or Monday after easter, then
|
||||
# minister decides moving that holiday. Here is a likely assumption of how this day might be moved.
|
||||
# Uncomment following lines to enable.
|
||||
|
||||
set PM date($Uy,5,1)
|
||||
# IF PM>=orthodoxeaster($Uy)-7 && PM<=orthodoxeaster($Uy)+1
|
||||
# IF PM<orthodoxeaster($Uy)-3
|
||||
# REM orthodoxeaster($Uy) -8 MSG πιθανόν ΕΡΓΑΤΙΚΗ Πρωτομαγιά
|
||||
# ELSE
|
||||
# REM [plusfunc(2)] MSG πιθανόν ΕΡΓΑΤΙΚΗ Πρωτομαγιά
|
||||
# ENDIF
|
||||
# ENDIF
|
||||
# REM [PM] OMIT Sun AFTER MSG Πρωτομαγιά
|
||||
|
||||
REM 1 May MSG Πρωτομαγιά
|
||||
# end of May 1 speculations
|
||||
|
||||
# The following are main national holidays per custom (observed by most but not all)
|
||||
REM [orthodoxeaster($Uy)] -48 MSG Καθαρά Δευτέρα
|
||||
REM [orthodoxeaster($Uy)] -2 MSG Μεγάλη Παρασκευή
|
||||
REM [orthodoxeaster($Uy)] -1 MSG Μεγάλο Σάββατο
|
||||
REM [orthodoxeaster($Uy)+50] MSG Αγίου Πνεύματος
|
||||
|
||||
|
||||
42
include/holidays/ie.rem
Normal file
42
include/holidays/ie.rem
Normal file
@@ -0,0 +1,42 @@
|
||||
;
|
||||
; Irish Holidays
|
||||
;
|
||||
; The dates for the Public ("bank") holidays are taken from the following site:
|
||||
; https://www.citizensinformation.ie/en/employment/employment-rights-and-conditions/leave-and-holidays/public-holidays/
|
||||
;
|
||||
; This file was derived from:
|
||||
; https://github.com/mhwombat/dotWombat/blob/master/.config/remind/IrishHolidays.rem
|
||||
; by Amy de Buitléir.
|
||||
|
||||
; fixed dates
|
||||
OMIT 31 December MSG New Year's Eve (Oíche Chinn Bliana) Public Holiday
|
||||
OMIT 1 January MSG New Year's Day (Lá Caille, Lá Bliana Nua) Public Holiday
|
||||
OMIT 17 March MSG Saint Patrick's Day (Lá Fhéile Pádraig) Public Holiday
|
||||
OMIT 24 December MSG Christmas Eve (Oíche Nollag) Public Holiday
|
||||
OMIT 25 December MSG Christmas Day (Lá Nollag) Public Holiday
|
||||
OMIT 26 December MSG Saint Stephen's Day, Wren Day (Lá Fhéile Stiofáin, Lá an Dreoilín) Public Holiday
|
||||
|
||||
; moving dates
|
||||
|
||||
; First Monday in May
|
||||
REM Monday 1 May SCANFROM -7 ADDOMIT MSG May Day (Lá Bealtaine) Public Holiday
|
||||
|
||||
; First Monday in June
|
||||
REM Monday 1 June SCANFROM -7 ADDOMIT MSG June Public Holiday
|
||||
|
||||
; First Monday in August
|
||||
REM Monday 1 August SCANFROM -7 ADDOMIT MSG August Public Holiday
|
||||
|
||||
; Last Monday in October
|
||||
REM Monday 1 -7 November SCANFROM -7 ADDOMIT MSG October Public Holiday
|
||||
|
||||
; Easter
|
||||
SET easter easterdate(today())
|
||||
REM [TRIGGER(easter-2)] MSG Good Friday (Aoine an Chéasta)
|
||||
REM [TRIGGER(easter)] MSG Easter Sunday (Domhnach Cásca)
|
||||
OMIT [TRIGGER(easter+1)] MSG Easter Monday (Luan Cásca) Public Holiday
|
||||
|
||||
; St. Brigid's Day
|
||||
REM 1 February MSG Saint Brigid's Day (Lá Fhéile Bríde or Imbolc)
|
||||
; The public holiday is the first Monday in February, or 1 February if the date falls on a Friday
|
||||
REM February SCANFROM -7 ADDOMIT SATISFY [($Td==1 && $Tw==5) || ($Td<8 && $Tw==1 && $Td!=4)] MSG Public Holiday
|
||||
112
include/holidays/jewish.rem
Normal file
112
include/holidays/jewish.rem
Normal file
@@ -0,0 +1,112 @@
|
||||
# Major Jewish Holidays
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
# Set the variable InIsrael to 1 if you live in Israel. Otherwise,
|
||||
# you get the Diaspora versions of Jewish holidays
|
||||
SET InIsrael value("InIsrael", 0)
|
||||
|
||||
# Set the variable Reform to 1 if you want the Reform version of the
|
||||
# Jewish calendar. Otherwise, you get the traditional version
|
||||
SET Reform value("Reform", 0)
|
||||
|
||||
# Convenient function definition to save typing
|
||||
FSET _h(x, y) HEBDATE(x,y)
|
||||
FSET _h2(x, y) HEBDATE(x, y, $U-7)
|
||||
FSET _PastSat(x, y) IIF(WKDAYNUM(_h2(x,y))!=6, _h2(x,y), _h2(x,y)+1)
|
||||
FSET _BackTwoFri(x, y) IIF(WKDAYNUM(_h2(x,y))!=5, _h2(x,y), _h2(x,y)-2)
|
||||
FSET _BackTwoSat(x, y) IIF(WKDAYNUM(_h2(x,y))!=6, _h2(x,y), _h2(x,y)-2)
|
||||
# Default values in case InIsrael and Reform are not set
|
||||
SET InIsrael VALUE("InIsrael", 0)
|
||||
SET Reform VALUE("Reform", 0)
|
||||
|
||||
[_h(1, "Tishrey")] ++4 MSG %"Rosh Hashana 1%" is %b.
|
||||
|
||||
# No RH-2 or Tzom Gedalia in Reform
|
||||
IF !Reform
|
||||
[_h(2, "Tishrey")] ++4 MSG %"Rosh Hashana 2%" is %b.
|
||||
[_PastSat(3, "Tishrey")] ++4 MSG %"Tzom Gedalia%" is %b.
|
||||
ENDIF
|
||||
|
||||
[_h(10, "Tishrey")] ++4 MSG %"Yom Kippur%" is %b.
|
||||
[_h(15, "Tishrey")] ++4 MSG %"Sukkot 1%" is %b.
|
||||
|
||||
IF !InIsrael
|
||||
[_h(16, "Tishrey")] MSG %"Sukkot 2%"
|
||||
ENDIF
|
||||
|
||||
[_h(21, "Tishrey")] ++4 MSG %"Hoshana Rabba%" is %b.
|
||||
[_h(22, "Tishrey")] ++4 MSG %"Shemini Atzeret%" is %b.
|
||||
|
||||
IF InIsrael
|
||||
[_h(22, "Tishrey")] ++4 MSG %"Simchat Torah%" is %b.
|
||||
ELSE
|
||||
[_h(23, "Tishrey")] ++4 MSG %"Simchat Torah%" is %b.
|
||||
ENDIF
|
||||
|
||||
# Because Kislev can change length, we must be more careful about Chanukah
|
||||
FSET _chan(x) HEBDATE(24, "Kislev", $U-9)+x
|
||||
[_chan(1)] ++4 MSG %"Chanukah 1%" is %b.
|
||||
[_chan(2)] MSG %"Chanukah 2%"
|
||||
[_chan(3)] MSG %"Chanukah 3%"
|
||||
[_chan(4)] MSG %"Chanukah 4%"
|
||||
[_chan(5)] MSG %"Chanukah 5%"
|
||||
[_chan(6)] MSG %"Chanukah 6%"
|
||||
[_chan(7)] MSG %"Chanukah 7%"
|
||||
[_chan(8)] MSG %"Chanukah 8%"
|
||||
|
||||
# Not sure about Reform's position on the next one.
|
||||
IF !Reform
|
||||
# 10 Tevet will never be a Saturday, so whether or not to
|
||||
# move it is moot. (Thanks to Art Werschulz.)
|
||||
[_h(10, "Tevet")] MSG %"Tzom Tevet%" is %b.
|
||||
ENDIF
|
||||
|
||||
[_h(15, "Shvat")] ++4 MSG %"Tu B'Shvat%" is %b.
|
||||
[_h(14, "Adar A")] ++4 MSG %"Purim Katan%" is %b.
|
||||
|
||||
# If Purim is on Sunday, then Fast of Esther is 11 Adar.
|
||||
IF WKDAYNUM(_h2(13, "Adar")) != 6
|
||||
REM [_h2(13, "Adar")] ++4 MSG %"Fast of Esther%" is %b.
|
||||
ELSE
|
||||
REM [_h2(11, "Adar")] ++4 MSG %"Fast of Esther%" is %b.
|
||||
ENDIF
|
||||
[_h(14, "Adar")] ++4 MSG %"Purim%" is %b.
|
||||
[_h(15, "Nisan")] ++4 MSG %"Pesach%" is %b.
|
||||
|
||||
IF !InIsrael
|
||||
[_h(16, "Nisan")] MSG %"Pesach 2%"
|
||||
ENDIF
|
||||
|
||||
[_h(21, "Nisan")] MSG %"Pesach 7%"
|
||||
|
||||
IF !InIsrael && !Reform
|
||||
[_h(22, "Nisan")] MSG %"Pesach 8%"
|
||||
ENDIF
|
||||
|
||||
[_h(27, "Nisan")] ++4 MSG %"Yom HaShoah%" is %b.
|
||||
[_BackTwoFri(4, "Iyar")] ++4 MSG %"Yom HaZikaron%" is %b.
|
||||
[_BackTwoSat(5, "Iyar")] ++4 MSG %"Yom Ha'atzmaut%" is %b.
|
||||
|
||||
# Not sure about Reform's position on Lag B'Omer
|
||||
IF !Reform
|
||||
[_h(18, "Iyar")] ++4 MSG %"Lag B'Omer%" is %b.
|
||||
ENDIF
|
||||
|
||||
[_h(28, "Iyar")] ++4 MSG %"Yom Yerushalayim%" is %b.
|
||||
[_h(6, "Sivan")] ++4 MSG %"Shavuot%" is %b.
|
||||
|
||||
IF !InIsrael && !Reform
|
||||
[_h(7, "Sivan")] MSG %"Shavuot 2%"
|
||||
ENDIF
|
||||
|
||||
# Fairly sure Reform Jews don't observe the next two
|
||||
IF !Reform
|
||||
# Tzom Tamuz and Tish'a B'Av are moved to Sunday if they normally
|
||||
# fall on a Saturday
|
||||
[_PastSat(17, "Tamuz")] ++4 MSG %"Tzom Tammuz%" is %b.
|
||||
[_PastSat(9, "Av")] ++4 MSG %"Tish'a B'Av%" is %b.
|
||||
ENDIF
|
||||
|
||||
# Clean up
|
||||
FUNSET _h _h2 _PastSat _BackTwoFri _BackTwoSat _chan
|
||||
|
||||
82
include/holidays/us.rem
Normal file
82
include/holidays/us.rem
Normal file
@@ -0,0 +1,82 @@
|
||||
# US holidays
|
||||
# This file is part of REMIND.
|
||||
# Copyright (C) 1992-2023 Dianne Skoll
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
REM [easterdate($Uy)-46] MSG Ash Wednesday
|
||||
REM [easterdate($Uy)-7] MSG Palm Sunday
|
||||
OMIT [easterdate($Uy)-2] MSG Good Friday
|
||||
OMIT [easterdate($Uy)] MSG %"Easter%" Sunday
|
||||
REM [easterdate($Uy)+39] MSG Ascension Day
|
||||
REM [easterdate($Uy)+49] MSG Pentecost
|
||||
|
||||
# Some holidays are omitted, some are not. You may want to change
|
||||
# which ones are omitted.
|
||||
|
||||
OMIT Jan 1 MSG New Year's Day
|
||||
REM 31 Dec SCANFROM -7 ADDOMIT SATISFY [$Tw==5] MSG New Year's Day (observed)
|
||||
REM 2 Jan SCANFROM -7 ADDOMIT SATISFY [$Tw==1] MSG New Year's Day (observed)
|
||||
|
||||
REM Third Monday in Jan MSG Martin Luther King - %"MLK Day%"
|
||||
REM Feb 2 MSG Ground Hog Day
|
||||
REM Feb 14 MSG Valentine's Day
|
||||
REM Third Monday in Feb SCANFROM -7 ADDOMIT MSG President's Day
|
||||
REM Mar 17 MSG St. Patrick's Day
|
||||
|
||||
# These are accurate for most places in North America
|
||||
REM MAYBE-UNCOMPUTABLE Sun November SATISFY [isdst($T) && !isdst($T+1)] MSG Daylight Saving Time Ends
|
||||
REM MAYBE-UNCOMPUTABLE Sun March SATISFY [!isdst($T) && isdst($T+1)] MSG Daylight Saving Time Starts
|
||||
|
||||
REM Apr 1 MSG %"April Fool's%" Day
|
||||
|
||||
PUSH-OMIT-CONTEXT
|
||||
# Normal case: 16 April falls Mon-Fri
|
||||
REM 16 Apr SCANFROM -7 ADDOMIT SATISFY [$Tw >= 1 && $Tw <= 5] MSG Emancipation Day
|
||||
|
||||
# 16 April falls on Saturday: Observe on the 15th
|
||||
REM 15 Apr SCANFROM -7 ADDOMIT SATISFY [$Tw == 5] MSG Emancipation Day (observed)
|
||||
|
||||
# 16 April falls on Sunday: Observe on the 17th
|
||||
REM 17 Apr SCANFROM -7 ADDOMIT SATISFY [$Tw == 1] MSG Emancipation Day (observed)
|
||||
|
||||
# If you live in Maine or Massachussetts, uncomment the next line
|
||||
# REM Third Monday in April SCANFROM -7 ADDOMIT MSG Patriots Day
|
||||
|
||||
REM Apr 15 OMIT Sat Sun AFTER MSG %"Income tax%" due
|
||||
POP-OMIT-CONTEXT
|
||||
|
||||
REM May 5 MSG Cinco de Mayo
|
||||
REM First Sat in May MSG Kentucky Derby
|
||||
REM Second Sun in May MSG Mother's Day
|
||||
REM Third Sat in May MSG Armed Forces Day
|
||||
REM Last Monday in May SCANFROM -7 ADDOMIT MSG Memorial Day
|
||||
REM Jun 14 MSG Flag Day
|
||||
|
||||
OMIT 19 June MSG Juneteenth
|
||||
REM 18 June SCANFROM -7 ADDOMIT SATISFY [$Tw==5] MSG Juneteenth (observed)
|
||||
REM 20 June SCANFROM -7 ADDOMIT SATISFY [$Tw==1] MSG Juneteenth (observed)
|
||||
|
||||
REM July 4 SCANFROM -7 ADDOMIT MSG Independence Day
|
||||
REM July 3 SCANFROM -7 ADDOMIT SATISFY [$Tw==5] MSG Independence Day (observed)
|
||||
REM July 5 SCANFROM -7 ADDOMIT SATISFY [$Tw==1] MSG Independence Day (observed)
|
||||
|
||||
REM Third Sun in June MSG Father's Day
|
||||
REM First Mon in Sep SCANFROM -7 ADDOMIT MSG Labor Day
|
||||
REM Second Mon in Oct MSG Columbus Day / Indigenous Peoples' Day
|
||||
|
||||
OMIT 11 Nov MSG Veterans Day
|
||||
REM 10 Nov SCANFROM -7 ADDOMIT SATISFY [$Tw==5] MSG Veterans Day (observed)
|
||||
REM 12 Nov SCANFROM -7 ADDOMIT SATISFY [$Tw==1] MSG Veterans Day (observed)
|
||||
|
||||
REM Oct 30 MSG Mischief Night
|
||||
REM Oct 31 MSG Halloween
|
||||
|
||||
REM Tue Nov 2 SCANFROM -7 SATISFY [($Ty % 4) == 0] MSG Election Day
|
||||
|
||||
REM Thu 22 Nov SCANFROM -7 ADDOMIT MSG Thanksgiving Day
|
||||
REM Fri 23 Nov SCANFROM -7 ADDOMIT MSG Thanksgiving (cont.)
|
||||
|
||||
REM Dec 24 MSG Christmas Eve
|
||||
OMIT Dec 25 MSG %"Christmas%" Day
|
||||
REM 24 Dec SCANFROM -7 ADDOMIT SATISFY [$Tw==5] MSG Christmas (observed)
|
||||
REM 26 Dec SCANFROM -7 ADDOMIT SATISFY [$Tw==1] MSG Christmas (observed)
|
||||
24
include/lang/auto.rem
Normal file
24
include/lang/auto.rem
Normal file
@@ -0,0 +1,24 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
SET autolang getenv("REMIND_LANG")
|
||||
|
||||
IF autolang == ""
|
||||
SET autolang getenv("LC_ALL")
|
||||
ENDIF
|
||||
IF autolang == ""
|
||||
SET autolang getenv("LANGUAGE")
|
||||
ENDIF
|
||||
IF autolang == ""
|
||||
SET autolang getenv("LANG")
|
||||
ENDIF
|
||||
|
||||
IF autolang != ""
|
||||
IF access($SysInclude + "/lang/" + lower(substr(autolang, 1, 5)) + ".rem", "r") == 0
|
||||
INCLUDE [$SysInclude]/lang/[lower(substr(autolang, 1, 5))].rem
|
||||
ELSE
|
||||
IF access($SysInclude + "/lang/" + lower(substr(autolang, 1, 2)) + ".rem", "r") == 0
|
||||
INCLUDE [$SysInclude]/lang/[lower(substr(autolang, 1, 2))].rem
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
UNSET autolang
|
||||
69
include/lang/da.rem
Normal file
69
include/lang/da.rem
Normal file
@@ -0,0 +1,69 @@
|
||||
# Support for the Danish language.
|
||||
# This file is part of REMIND.
|
||||
# REMIND is Copyright (C) 1992-2023 by Dianne Skoll
|
||||
# This file is derived from a translation by Mogens Lynnerup.
|
||||
|
||||
SET $Sunday "Søndag"
|
||||
SET $Monday "Mandag"
|
||||
SET $Tuesday "Tirsdag"
|
||||
SET $Wednesday "Onsdag"
|
||||
SET $Thursday "Torsdag"
|
||||
SET $Friday "Fredag"
|
||||
SET $Saturday "Lørdag"
|
||||
|
||||
SET $January "Januar"
|
||||
SET $February "Februar"
|
||||
SET $March "Marts"
|
||||
SET $April "April"
|
||||
SET $May "Maj"
|
||||
SET $June "Juni"
|
||||
SET $July "Juli"
|
||||
SET $August "August"
|
||||
SET $September "September"
|
||||
SET $October "Oktober"
|
||||
SET $November "November"
|
||||
SET $December "December"
|
||||
|
||||
SET $Today "i dag"
|
||||
SET $Tomorrow "i morgen"
|
||||
|
||||
BANNER Påmindelse for %w, %d. %m, %y%o:
|
||||
|
||||
SET $Am "am"
|
||||
SET $Pm "pm"
|
||||
|
||||
SET $Ago "siden"
|
||||
SET $Fromnow "fra nu"
|
||||
|
||||
SET $On "på"
|
||||
|
||||
SET $Now "nu"
|
||||
SET $At "kl."
|
||||
SET $Minute "minut"
|
||||
SET $Hour "time"
|
||||
SET $Is "er"
|
||||
SET $Was "var"
|
||||
SET $And "og"
|
||||
SET $Hplu "r"
|
||||
SET $Mplu "ter"
|
||||
|
||||
FSET subst_ampm(h) iif(h<5, " om natten", h < 12, " om formiddagen", h < 18, " om eftermiddagen", " om aftenen")
|
||||
FSET subst_ordinal(d) "."
|
||||
|
||||
FSET subst_p(alt, d, t) iif(d==today()+1, "", "e")
|
||||
FSET zeropad(s, len) pad(s, "0", len)
|
||||
FSET subst_a_alt(d) wkday(d) + ", den " + day(d) + ". " + mon(d) + " " + year(d)
|
||||
FSET subst_ax(alt, d, t) iif(alt, subst_a_alt(d), $On + " " + subst_a_alt(d))
|
||||
|
||||
FSET subst_bx(a, d, t) "om " + (d-today()) + " dage"
|
||||
|
||||
FSET subst_ex(alt, d, t) "den " + zeropad(day(d), 2) + $DateSep + zeropad(monnum(d), 2) + $DateSep + zeropad(year(d), 4)
|
||||
FSET subst_fx(alt, d, t) "den " + zeropad(monnum(d), 2) + $DateSep + zeropad(day(d), 2) + $DateSep + zeropad(year(d), 4)
|
||||
|
||||
FSET subst_g_alt(d) wkday(d) + ", den " + day(d) + ". " + mon(d)
|
||||
FSET subst_gx(alt, d, t) iif(alt, subst_g_alt(d), $On + " " + subst_g_alt(d))
|
||||
|
||||
FSET subst_hx(alt, d, t) "den " + zeropad(day(d), 2) + $DateSep + zeropad(monnum(d), 2)
|
||||
FSET subst_ix(alt, d, t) "den " + zeropad(monnum(d), 2) + $DateSep + zeropad(day(d), 2)
|
||||
FSET subst_ux(alt, d, t) subst_ax(alt, d, t)
|
||||
FSET subst_vx(alt, d, t) subst_gx(alt, d, t)
|
||||
89
include/lang/de.rem
Normal file
89
include/lang/de.rem
Normal file
@@ -0,0 +1,89 @@
|
||||
# Support for the German language.
|
||||
# This file is part of REMIND.
|
||||
# REMIND is Copyright (C) 1992-2023 by Dianne Skoll
|
||||
# This file is derived from a translation by Wolfgang Thronicke
|
||||
|
||||
# Day names
|
||||
SET $Sunday "Sonntag"
|
||||
SET $Monday "Montag"
|
||||
SET $Tuesday "Dienstag"
|
||||
SET $Wednesday "Mittwoch"
|
||||
SET $Thursday "Donnerstag"
|
||||
SET $Friday "Freitag"
|
||||
SET $Saturday "Samstag"
|
||||
|
||||
# Month names
|
||||
SET $January "Januar"
|
||||
SET $February "Februar"
|
||||
SET $March "März"
|
||||
SET $April "April"
|
||||
SET $May "Mai"
|
||||
SET $June "Juni"
|
||||
SET $July "Juli"
|
||||
SET $August "August"
|
||||
SET $September "September"
|
||||
SET $October "Oktober"
|
||||
SET $November "November"
|
||||
SET $December "Dezember"
|
||||
|
||||
SET $Today "heute"
|
||||
SET $Tomorrow "morgen"
|
||||
|
||||
# Banner
|
||||
BANNER Termine für %w, den %d. %m %y%o:
|
||||
|
||||
SET $Am "am"
|
||||
SET $Pm "pm"
|
||||
SET $On "am"
|
||||
SET $Hplu "n"
|
||||
SET $Mplu "n"
|
||||
SET $Now "jetzt"
|
||||
SET $At "um"
|
||||
SET $Minute "Minute"
|
||||
SET $Hour "Stunde"
|
||||
SET $Is "ist"
|
||||
SET $Was "war"
|
||||
SET $And "und"
|
||||
SET $Ago "vorher"
|
||||
SET $Fromnow "von heute"
|
||||
|
||||
FSET subst_ampm(h) iif(h<5, " nachts", h<12, " vormittags", h<=17, " nachmittags", " abends")
|
||||
FSET subst_ordinal(d) "."
|
||||
|
||||
FSET subst_a_alt(d) wkday(d) + ", den " + day(d) + ". " + mon(d) + " " + year(d)
|
||||
FSET subst_ax(alt, d, t) iif(alt, subst_a_alt(d), $On + " " + subst_a_alt(d))
|
||||
|
||||
FSET subst_bx(a, d, t) "in " + (d-today()) + " Tagen"
|
||||
|
||||
FSET subst_g_alt(d) wkday(d) + ", den " + day(d) + ". " + mon(d)
|
||||
FSET subst_gx(alt, d, t) iif(alt, subst_g_alt(d), $On + " " + subst_g_alt(d))
|
||||
|
||||
FSET subst_ux(alt, d, t) subst_ax(alt, d, t)
|
||||
FSET subst_vx(alt, d, t) subst_gx(alt, d, t)
|
||||
FSET subst_p(alt, d, t) iif(d == today()+1, "", "en")
|
||||
|
||||
# Localization of various astronomical events
|
||||
|
||||
# Perihelion
|
||||
SET earthseasons_Perihelion_str "Perihel"
|
||||
|
||||
# Vernal equinox
|
||||
SET earthseasons_EquinoxMar_str "Frühlingsanfang"
|
||||
|
||||
# Summer solstice
|
||||
SET earthseasons_SolsticeJun_str "Sommeranfang"
|
||||
|
||||
# Aphelion
|
||||
SET earthseasons_Aphelion_str "Aphel"
|
||||
|
||||
# Autumnal Equinox
|
||||
SET earthseasons_EquinoxSep_str "Herbstanfang"
|
||||
|
||||
# Winter Solstice
|
||||
SET earthseasons_SolsticeDec_str "Winteranfang"
|
||||
|
||||
# Daylight saving time starts
|
||||
SET daylightST_starts_str "Beginn Sommerzeit"
|
||||
|
||||
# Daylight saving time ends
|
||||
SET daylightST_ends_str "Ende Sommerzeit"
|
||||
4
include/lang/en.rem
Normal file
4
include/lang/en.rem
Normal file
@@ -0,0 +1,4 @@
|
||||
# Support for the English language.
|
||||
# This file is part of REMIND.
|
||||
# REMIND is Copyright (C) 1992-2023 by Dianne Skoll
|
||||
# Nothing to do for English since it is the default.
|
||||
48
include/lang/es.rem
Normal file
48
include/lang/es.rem
Normal file
@@ -0,0 +1,48 @@
|
||||
# Support for the Spanish language.
|
||||
# This file is part of REMIND.
|
||||
# REMIND is Copyright (C) 1992-2023 by Dianne Skoll
|
||||
# This file is derived from a translation by Rafa Couto <rafacouto@biogate.com>
|
||||
|
||||
SET $Sunday "Domingo"
|
||||
SET $Monday "Lunes"
|
||||
SET $Tuesday "Martes"
|
||||
SET $Wednesday "Miércoles"
|
||||
SET $Thursday "Jueves"
|
||||
SET $Friday "Viernes"
|
||||
SET $Saturday "Sábado"
|
||||
|
||||
SET $January "Enero"
|
||||
SET $February "Febrero"
|
||||
SET $March "Marzo"
|
||||
SET $April "Abril"
|
||||
SET $May "Mayo"
|
||||
SET $June "Junio"
|
||||
SET $July "Julio"
|
||||
SET $August "Agosto"
|
||||
SET $September "Septiembre"
|
||||
SET $October "Octubre"
|
||||
SET $November "Noviembre"
|
||||
SET $December "Diciembre"
|
||||
|
||||
SET $Today "hoy"
|
||||
SET $Tomorrow "mañana"
|
||||
|
||||
BANNER Agenda para el %w, %d%s %m, %y%o:
|
||||
|
||||
SET $Am "am"
|
||||
SET $Pm "pm"
|
||||
|
||||
SET $Ago "hace"
|
||||
SET $Fromnow "desde hoy"
|
||||
SET $On "el día"
|
||||
SET $Now "ahora"
|
||||
SET $At "a las"
|
||||
SET $Minute "minuto"
|
||||
SET $Hour "hora"
|
||||
SET $Is "es"
|
||||
SET $Was "fue"
|
||||
SET $And "y"
|
||||
SET $Hplu "s"
|
||||
SET $Mplu "s"
|
||||
|
||||
FSET subst_bx(a, d, t) "dentro de " + (d-today()) + " días"
|
||||
94
include/lang/fi.rem
Normal file
94
include/lang/fi.rem
Normal file
@@ -0,0 +1,94 @@
|
||||
# Support for the Finnish language.
|
||||
# This file is part of REMIND.
|
||||
# REMIND is Copyright (C) 1992-2023 by Dianne Skoll
|
||||
# This file is derived from a translation by Mikko Silvonen
|
||||
|
||||
SET $Sunday "sunnuntai"
|
||||
SET $Monday "maanantai"
|
||||
SET $Tuesday "tiistai"
|
||||
SET $Wednesday "keskiviikko"
|
||||
SET $Thursday "torstai"
|
||||
SET $Friday "perjantai"
|
||||
SET $Saturday "lauantai"
|
||||
|
||||
SET $January "tammikuu"
|
||||
SET $February "helmikuu"
|
||||
SET $March "maaliskuu"
|
||||
SET $April "huhtikuu"
|
||||
SET $May "toukokuu"
|
||||
SET $June "kesäkuu"
|
||||
SET $July "heinäkuu"
|
||||
SET $August "elokuu"
|
||||
SET $September "syyskuu"
|
||||
SET $October "lokakuu"
|
||||
SET $November "marraskuu"
|
||||
SET $December "joulukuu"
|
||||
|
||||
SET $Today "tänään"
|
||||
SET $Tomorrow "huomenna"
|
||||
|
||||
BANNER Viestit %wna %d. %mta %y%o:
|
||||
|
||||
SET $Am " ap."
|
||||
SET $Pm " ip."
|
||||
|
||||
SET $ago "sitten"
|
||||
SET $Fromnow "kuluttua"
|
||||
|
||||
SET $On "na"
|
||||
|
||||
SET $Now "nyt"
|
||||
SET $At "klo"
|
||||
SET $Minute "minuutti"
|
||||
SET $Hour "tunti"
|
||||
SET $Is "on"
|
||||
SET $Was "oli"
|
||||
SET $And "ja"
|
||||
SET $Hplu "a"
|
||||
SET $Mplu "a"
|
||||
|
||||
FSET zeropad(s, len) pad(s, "0", len)
|
||||
|
||||
FSET subst_ordinal(d) iif(d==1, ":senä", d==2, ":sena", (d%10)==2||(d%10)==3||(d%10)==6||(d%10)==8, ":ntena", ":ntenä")
|
||||
|
||||
FSET subst_a_alt(d, o, p) wkday(d) + o + " " + day(d) + ". " + mon(d) + p + " " + year(d)
|
||||
FSET subst_ax(a, d, t) iif(a, subst_a_alt(d, "", ""), subst_a_alt(d, $On, "ta"))
|
||||
|
||||
FSET subst_bx(a, d, t) (d-today()) + " päivän kuluttua"
|
||||
FSET subst_cx(a, d, t) iif(a, wkday(d), wkday(d) + $On)
|
||||
|
||||
FSET subst_ex(a, d, t) zeropad(day(d), 2) + $DateSep + zeropad(monnum(d), 2) + $DateSep + zeropad(year(d), 4)
|
||||
FSET subst_fx(a, d, t) zeropad(monnum(d), 2) + $DateSep + zeropad(day(d), 2) + $DateSep + zeropad(year(d), 4)
|
||||
|
||||
FSET subst_g_alt(d, o, p) wkday(d) + o + " " + day(d) + ". " + mon(d) + p
|
||||
FSET subst_gx(a, d, t) iif(a, subst_g_alt(d, "", ""), subst_g_alt(d, $On, "ta"))
|
||||
|
||||
FSET subst_hx(a, d, t) zeropad(day(d), 2) + $DateSep + zeropad(monnum(d), 2)
|
||||
FSET subst_ix(a, d, t) zeropad(monnum(d), 2) + $DateSep + zeropad(day(d), 2)
|
||||
|
||||
FSET subst_j_alt(d, o) wkday(d) + o + " " + mon(d) + "n " + day(d) + subst_ordinal(day(d)) + " " + year(d)
|
||||
FSET subst_jx(a, d, t) iif(a, subst_j_alt(d, ""), subst_j_alt(d, $On))
|
||||
|
||||
FSET subst_k_alt(d, o) wkday(d) + o + " " + mon(d) + "n " + day(d) + subst_ordinal(day(d))
|
||||
FSET subst_kx(a, d, t) iif(a, subst_k_alt(d, ""), subst_k_alt(d, $On))
|
||||
|
||||
FSET subst_lx(a, d, t) zeropad(year(d), 4) + $DateSep + zeropad(monnum(d), 2) + $DateSep + zeropad(day(d), 2)
|
||||
FSET subst_p(a, d, t) iif(d==today()+1, "", "ä")
|
||||
FSET subst_qx(a, d, t) "n"
|
||||
|
||||
FSET subst_u_alt(d, o, p) wkday(d) + o + " " + day(d) + subst_ordinal(day(d)) + " " + mon(d) + p + " " + year(d)
|
||||
FSET subst_ux(a, d, t) iif(a, subst_u_alt(d, "", ""), subst_u_alt(d, $On, "ta"))
|
||||
|
||||
FSET subst_v_alt(d, o, p) wkday(d) + o + " " + day(d) + subst_ordinal(day(d)) + " " + mon(d) + p
|
||||
FSET subst_vx(a, d, t) iif(a, subst_v_alt(d, "", ""), subst_v_alt(d, $On, "ta"))
|
||||
|
||||
|
||||
FSET subst_1(a, d, t) iif(t==now(), $Now, t<now(), subst1_past(now()-t), subst1_future(t-now()))
|
||||
|
||||
FSET subst1_past(mins) subst_hour_past(mins/60) + subst_min_past(mins%60) + $Ago
|
||||
FSET subst1_future(mins) subst_hour_future(mins/60) + subst_min_future(mins%60) + $Fromnow
|
||||
|
||||
FSET subst_hour_past(h) iif(h==0, "", h + " " + $Hour + iif(h==1, " ", $Hplu + " "))
|
||||
FSET subst_min_past(m) iif(m==0, "", m + " " + $Minute + iif(m==1, " ", $Mplu + " "))
|
||||
FSET subst_hour_future(h) iif(h==0, "", h + " tunnin ")
|
||||
FSET subst_min_future(m) iif(m==0, "", m + " minuutin ")
|
||||
62
include/lang/fr.rem
Normal file
62
include/lang/fr.rem
Normal file
@@ -0,0 +1,62 @@
|
||||
# Support for the French language.
|
||||
# This file is part of REMIND.
|
||||
# REMIND is Copyright (C) 1992-2023 by Dianne Skoll
|
||||
# This file is derived from a translation by Laurent Duperval
|
||||
|
||||
SET $Sunday "dimanche"
|
||||
SET $Monday "lundi"
|
||||
SET $Tuesday "mardi"
|
||||
SET $Wednesday "mercredi"
|
||||
SET $Thursday "jeudi"
|
||||
SET $Friday "vendredi"
|
||||
SET $Saturday "samedi"
|
||||
|
||||
SET $January "janvier"
|
||||
SET $February "février"
|
||||
SET $March "mars"
|
||||
SET $April "avril"
|
||||
SET $May "mai"
|
||||
SET $June "juin"
|
||||
SET $July "juillet"
|
||||
SET $August "août"
|
||||
SET $September "septembre"
|
||||
SET $October "octobre"
|
||||
SET $November "novembre"
|
||||
SET $December "décembre"
|
||||
|
||||
SET $Today "aujourd'hui"
|
||||
SET $Tomorrow "demain"
|
||||
SET $On "le"
|
||||
SET $At "à"
|
||||
SET $Now "maintenant"
|
||||
SET $Minute "minute"
|
||||
SET $Hour "heure"
|
||||
SET $Is "est"
|
||||
SET $Was "était"
|
||||
SET $And "et"
|
||||
SET $Hplu "s"
|
||||
SET $Mplu "s"
|
||||
SET $Ago "il y a"
|
||||
SET $Fromnow "dans"
|
||||
|
||||
# Banner
|
||||
BANNER Rappels pour %w, %d%s %m, %y%o:
|
||||
|
||||
# Ordinal for a day (English would be "st", "nd", "rd", "th")
|
||||
FSET subst_ordinal(d) iif(d == 1, "er", "")
|
||||
|
||||
# "%d hours", "%d minutes", or "%d hours and %d minutes"
|
||||
FSET subst_tdiff(hdiff, mdiff) iif(hdiff==0&&mdiff==0, $Now, \
|
||||
hdiff==0, mdiff + plural(mdiff, " minute"), \
|
||||
mdiff==0, hdiff + plural(hdiff, " heure"), \
|
||||
hdiff + plural(hdiff, " heure") + " et " + mdiff + plural(mdiff, " minute"))
|
||||
FSET subst_1(alt, date, time) iif(time == now(), "maintenant", \
|
||||
time > now(), "dans " + subst_tdiff((time-now())/60, (time-now())%60), \
|
||||
"il y a " + subst_tdiff ((now()-time)/60, (now()-time)%60))
|
||||
|
||||
FSET subst_bx(alt, date, time) "dans " + (date-today()) + " jours"
|
||||
FSET subst_j_alt(date) wkday(date) + ", " + day(date) + subst_ordinal(day(date)) + " " + mon(date) + ", " + year(date)
|
||||
FSET subst_jx(alt, date, time) iif(alt, subst_j_alt(date), $On + " " + subst_j_alt(date))
|
||||
|
||||
FSET subst_k_alt(date) wkday(date) + ", " + day(date) + subst_ordinal(day(date)) + " " + mon(date)
|
||||
FSET subst_kx(alt, date, time) iif(alt, subst_k_alt(date), $On + " " + subst_k_alt(date))
|
||||
83
include/lang/gr.rem
Normal file
83
include/lang/gr.rem
Normal file
@@ -0,0 +1,83 @@
|
||||
# Support for the Hellenic (Greek) language.
|
||||
# This file is part of REMIND.
|
||||
# REMIND is Copyright (C) 1992-2023 by Dianne Skoll
|
||||
# This file is derived from a translation by jarlaxl lamat (jarlaxl@freemail.gr)
|
||||
|
||||
SET $Sunday "Κυριακή"
|
||||
SET $Monday "Δευτέρα"
|
||||
SET $Tuesday "Τρίτη"
|
||||
SET $Wednesday "Τετάρτη"
|
||||
SET $Thursday "Πέμπτη"
|
||||
SET $Friday "Παρασκευή"
|
||||
SET $Saturday "Σάββατο"
|
||||
|
||||
SET $January "Ιανουάρ."
|
||||
SET $February "Φεβρουάρ."
|
||||
SET $March "Μάρτ."
|
||||
SET $April "Απρίλ."
|
||||
SET $May "Μαι."
|
||||
SET $June "Ιούν."
|
||||
SET $July "Ιούλ."
|
||||
SET $August "Αυγουστ."
|
||||
SET $September "Σεπτέμβρ."
|
||||
SET $October "Οκτώβρ."
|
||||
SET $November "Νοέμβρ."
|
||||
SET $December "Δεκέμβρ."
|
||||
|
||||
SET $Today "σήμερα"
|
||||
SET $Tomorrow "αύριο"
|
||||
|
||||
BANNER Υπενθυμίσεις: %w, %d %m, %y%o:
|
||||
|
||||
SET $Am "πμ"
|
||||
SET $Pm "μμ"
|
||||
|
||||
SET $Ago "πριν"
|
||||
SET $Fromnow "από τώρα"
|
||||
|
||||
SET $On "την"
|
||||
|
||||
SET $Now "τώρα"
|
||||
SET $At "στις"
|
||||
SET $Minute "λεπτά"
|
||||
SET $Hour "ώρες"
|
||||
SET $Is "είναι"
|
||||
SET $Was "ήταν"
|
||||
SET $And "και"
|
||||
SET $Hplu ""
|
||||
SET $Mplu ""
|
||||
|
||||
FSET subst_bx(a, d, t) "σε " + (d - today()) + " ημέρες"
|
||||
FSET subst_ordinal(d) "."
|
||||
FSET subst_a_alt(d) wkday(d) + ", " + day(d) + ". " + mon(d) + " " + year(d)
|
||||
FSET subst_ax(alt, d, t) iif(alt, subst_a_alt(d), $On + " " + subst_a_alt(d))
|
||||
FSET subst_g_alt(d) wkday(d) + ", " + day(d) + ". " + mon(d)
|
||||
FSET subst_gx(alt, d, t) iif(alt, subst_g_alt(d), $On + " " + subst_g_alt(d))
|
||||
FSET subst_ux(alt, d, t) subst_ax(alt, d, t)
|
||||
FSET subst_vx(alt, d, t) subst_gx(alt, d, t)
|
||||
|
||||
# Localization of various astronomical events
|
||||
|
||||
# Perihelion
|
||||
SET earthseasons_Perihelion_str "Περιήλιον"
|
||||
|
||||
# Vernal equinox
|
||||
SET earthseasons_EquinoxMar_str "Εαρινή ισημερία"
|
||||
|
||||
# Summer solstice
|
||||
SET earthseasons_SolsticeJun_str "Θερινό ηλιοστάσιο"
|
||||
|
||||
# Aphelion
|
||||
SET earthseasons_Aphelion_str "Αφήλιον"
|
||||
|
||||
# Autumnal Equinox
|
||||
SET earthseasons_EquinoxSep_str "Φθινοπωρινή ισημερία"
|
||||
|
||||
# Winter Solstice
|
||||
SET earthseasons_SolsticeDec_str "Χειμερινό ηλιοστάσιο"
|
||||
|
||||
# Daylight saving time starts
|
||||
SET daylightST_starts_str "Έναρξη θέρους"
|
||||
|
||||
# Daylight saving time ends
|
||||
SET daylightST_ends_str "Τέλος θέρους"
|
||||
51
include/lang/is.rem
Normal file
51
include/lang/is.rem
Normal file
@@ -0,0 +1,51 @@
|
||||
# Support for the Icelanding language.
|
||||
# This file is part of REMIND.
|
||||
# REMIND is Copyright (C) 1992-2023 by Dianne Skoll
|
||||
# This file is derived from a translation by Björn Davíðsson (bjossi@snerpa.is)
|
||||
|
||||
SET $Sunday "sunnudagur"
|
||||
SET $Monday "mánudagur"
|
||||
SET $Tuesday "þriðjudagur"
|
||||
SET $Wednesday "miðvikudagur"
|
||||
SET $Thursday "fimmtudagur"
|
||||
SET $Friday "föstudagur"
|
||||
SET $Saturday "laugardagur"
|
||||
|
||||
SET $January "janúar"
|
||||
SET $February "febrúar"
|
||||
SET $March "mars"
|
||||
SET $April "apríl"
|
||||
SET $May "maí"
|
||||
SET $June "júní"
|
||||
SET $July "júlí"
|
||||
SET $August "ágúst"
|
||||
SET $September "september"
|
||||
SET $October "október"
|
||||
SET $November "nóvember"
|
||||
SET $December "desember"
|
||||
|
||||
SET $Today "í dag"
|
||||
SET $Tomorrow "á morgun"
|
||||
|
||||
BANNER Minnisatriði: %w, %d%s %m, %y%o:
|
||||
|
||||
SET $Am "fh"
|
||||
SET $Pm "eh"
|
||||
|
||||
SET $Ago "síðan"
|
||||
SET $Fromnow "frá því nú"
|
||||
|
||||
SET $On "þann"
|
||||
|
||||
SET $Now "núna"
|
||||
SET $At "kl."
|
||||
SET $Minute "mínútu"
|
||||
SET $Hour "klukkustund"
|
||||
SET $Is "er"
|
||||
SET $Was "var"
|
||||
SET $And "og"
|
||||
SET $Hplu "ir"
|
||||
SET $Mplu "r"
|
||||
|
||||
FSET subst_bx(a, d, t) "eftir " + (d - today()) + " daga"
|
||||
fset subst_p(a, d, t) iif(d == today()+1, "", "a")
|
||||
67
include/lang/it.rem
Normal file
67
include/lang/it.rem
Normal file
@@ -0,0 +1,67 @@
|
||||
# Support for the Italian language.
|
||||
# This file is part of REMIND.
|
||||
# REMIND is Copyright (C) 1992-2023 by Dianne Skoll
|
||||
# This file is derived from a translation by Valerio Aimale
|
||||
|
||||
SET $Sunday "Domenica"
|
||||
SET $Monday "Lunedì"
|
||||
SET $Tuesday "Martedì"
|
||||
SET $Wednesday "Mercoledì"
|
||||
SET $Thursday "Giovedì"
|
||||
SET $Friday "Venerdì"
|
||||
SET $Saturday "Sabato"
|
||||
|
||||
SET $January "Gennaio"
|
||||
SET $February "Febbraio"
|
||||
SET $March "Marzo"
|
||||
SET $April "Aprile"
|
||||
SET $May "Maggio"
|
||||
SET $June "Giugno"
|
||||
SET $July "Luglio"
|
||||
SET $August "Agosto"
|
||||
SET $September "Settembre"
|
||||
SET $October "Ottobre"
|
||||
SET $November "Novembre"
|
||||
SET $December "Dicembre"
|
||||
|
||||
SET $Today "oggi"
|
||||
SET $Tomorrow "domani"
|
||||
|
||||
BANNER Promemoria per %w, %d %m %y%o:
|
||||
|
||||
SET $Am "am"
|
||||
SET $Pm "pm"
|
||||
|
||||
SET $Ago "fa"
|
||||
SET $Fromnow "da oggi"
|
||||
|
||||
SET $On ""
|
||||
SET $Now "ora"
|
||||
SET $At "alle"
|
||||
SET $Minute "minuto"
|
||||
SET $Hour "ora"
|
||||
SET $Is "è"
|
||||
SET $Was "era"
|
||||
SET $And "e"
|
||||
SET $Hplu "a"
|
||||
SET $Mplu "i"
|
||||
|
||||
FSET subst_bx(a, d, t) "fra " + (d-today()) + " giorni"
|
||||
FSET subst_p(a, d, t) iif(d==today()+1, "o", "i")
|
||||
FSET subst_q(a, d, t) iif(d==today()+1, "a", "e")
|
||||
|
||||
FSET subst_ax(a, d, t) wkday(d) + ", " + day(d) + " " + mon(d) + " " + year(d)
|
||||
FSET subst_jx(a, d, t) subst_ax(a, d, t)
|
||||
FSET subst_kx(a, d, t) wkday(d) + ", " + day(d) + " " + mon(d)
|
||||
FSET subst_ux(a, d, t) subst_ax(a, d, t)
|
||||
FSET subst_vx(a, d, t) subst_kx(a, d, t)
|
||||
|
||||
FSET subst_1(a, d, t) iif(t==now(), $Now, t<now(), subst_1a(now()-t, $Ago), subst_1a(t-now(), $Fromnow))
|
||||
FSET subst_1a(diff, when) subst_1b(diff/60, diff%60) + " " + when
|
||||
|
||||
FSET subst_1b(hdiff, mdiff) iif(hdiff==0, subst_minutes(mdiff), mdiff==0, subst_hours(hdiff), subst_hours(hdiff) + " " + $And + " " + subst_minutes(mdiff))
|
||||
FSET subst_minutes(m) iif(m==1, "1 minuto", m + " minuti")
|
||||
FSET subst_hours(h) iif(h==1, "1 ora", h + " ore")
|
||||
|
||||
FSET subst_0(a, d, t) iif(abs(now()-t)/60==1, "a", "e")
|
||||
FSET subst_9(a, d, t) iif(abs(now()-t)%60==1, "o", "i")
|
||||
56
include/lang/nl.rem
Normal file
56
include/lang/nl.rem
Normal file
@@ -0,0 +1,56 @@
|
||||
# Support for the Dutch language.
|
||||
# This file is part of REMIND.
|
||||
# REMIND is Copyright (C) 1992-2023 by Dianne Skoll
|
||||
# This file is derived from a translation by Willem Kasdorp and Erik-Jan Vens
|
||||
|
||||
SET $Sunday "zondag"
|
||||
SET $Monday "maandag"
|
||||
SET $Tuesday "dinsdag"
|
||||
SET $Wednesday "woensdag"
|
||||
SET $Thursday "donderdag"
|
||||
SET $Friday "vrijdag"
|
||||
SET $Saturday "zaterdag"
|
||||
|
||||
SET $January "januari"
|
||||
SET $February "februari"
|
||||
SET $March "maart"
|
||||
SET $April "april"
|
||||
SET $May "mei"
|
||||
SET $June "juni"
|
||||
SET $July "juli"
|
||||
SET $August "augustus"
|
||||
SET $September "september"
|
||||
SET $October "oktober"
|
||||
SET $November "november"
|
||||
SET $December "december"
|
||||
|
||||
SET $Today "vandaag"
|
||||
SET $Tomorrow "morgen"
|
||||
|
||||
BANNER Herinneringen voor %w, %d%s %m, %y%o:
|
||||
|
||||
SET $Am "am"
|
||||
SET $Pm "pm"
|
||||
|
||||
SET $Ago "geleden"
|
||||
SET $Fromnow "vanaf nu"
|
||||
SET $On "op"
|
||||
|
||||
SET $Now "nu"
|
||||
SET $At "op"
|
||||
SET $Minute "minuut"
|
||||
SET $Hour "uur"
|
||||
SET $Is "is"
|
||||
SET $Was "was"
|
||||
SET $And "en"
|
||||
SET $Hplu "en"
|
||||
SET $Mplu "en"
|
||||
|
||||
FSET subst_1(a, d, t) iif(t==now(), $Now, t<now(), subst_1a(now()-t, $Ago), subst_1a(t-now(), $Fromnow))
|
||||
FSET subst_1a(diff, when) subst_1b(diff/60, diff%60) + " " + when
|
||||
|
||||
FSET subst_1b(hdiff, mdiff) iif(hdiff==0, subst_minutes(mdiff), mdiff==0, subst_hours(hdiff), subst_hours(hdiff) + " " + $And + " " + subst_minutes(mdiff))
|
||||
FSET subst_minutes(m) iif(m==1, "1 minuut", m + " minuten")
|
||||
FSET subst_hours(h) iif(h==1, "1 uur", h + " uren")
|
||||
|
||||
FSET subst_bx(a, d, t) "over " + (d-today()) + " dagen"
|
||||
58
include/lang/no.rem
Normal file
58
include/lang/no.rem
Normal file
@@ -0,0 +1,58 @@
|
||||
# Support for the Norwegian language.
|
||||
# This file is part of REMIND.
|
||||
# REMIND is Copyright (C) 1992-2023 by Dianne Skoll
|
||||
# This file is derived from a translation by Trygve Randen
|
||||
|
||||
SET $Sunday "Søndag"
|
||||
SET $Monday "Mandag"
|
||||
SET $Tuesday "Tirsdag"
|
||||
SET $Wednesday "Onsdag"
|
||||
SET $Thursday "Torsdag"
|
||||
SET $Friday "Fredag"
|
||||
SET $Saturday "Lørdag"
|
||||
|
||||
SET $January "Januar"
|
||||
SET $February "Februar"
|
||||
SET $March "Mars"
|
||||
SET $April "April"
|
||||
SET $May "Mai"
|
||||
SET $June "Juni"
|
||||
SET $July "Juli"
|
||||
SET $August "August"
|
||||
SET $September "September"
|
||||
SET $October "Oktober"
|
||||
SET $November "November"
|
||||
SET $December "Desember"
|
||||
|
||||
SET $Today "i dag"
|
||||
SET $Tomorrow "i morgen"
|
||||
|
||||
BANNER Påminnelse for %w, %d. %m, %y%o:
|
||||
|
||||
SET $Am "am"
|
||||
SET $Pm "pm"
|
||||
|
||||
SET $Ago "siden"
|
||||
SET $Fromnow "fra nå"
|
||||
|
||||
SET $On "den"
|
||||
SET $Now "nå"
|
||||
SET $At "kl."
|
||||
SET $Minute "minutt"
|
||||
SET $Hour "time"
|
||||
SET $Is "er"
|
||||
SET $Was "var"
|
||||
SET $And "og"
|
||||
SET $Hplu "r"
|
||||
SET $Mplu "er"
|
||||
|
||||
FSET subst_bx(a, d, t) "om " + (d-today()) + " dager"
|
||||
FSET subst_ordinal(d) "."
|
||||
|
||||
FSET subst_ax(a, d, t) iif(a, subst_a_alt(d), $On + " " + subst_a_alt(d))
|
||||
FSET subst_a_alt(d) wkday(d) + ", den " + day(d) + ". " + mon(d) + " " + year(d)
|
||||
FSET subst_gx(a, d, t) iif(a, subst_g_alt(d), $On + " " + subst_g_alt(d))
|
||||
FSET subst_g_alt(d) wkday(d) + ", den " + day(d) + ". " + mon(d)
|
||||
FSET subst_ux(a, d, t) subst_ax(a, d, t)
|
||||
FSET subst_vx(a, d, t) subst_gx(a, d, t)
|
||||
FSET subst_p(a, d, t) iif(d==today()+1, "", "er")
|
||||
69
include/lang/pl.rem
Normal file
69
include/lang/pl.rem
Normal file
@@ -0,0 +1,69 @@
|
||||
# Support for the Polish language.
|
||||
# This file is part of REMIND.
|
||||
# REMIND is Copyright (C) 1992-2023 by Dianne Skoll
|
||||
# This file is derived from a translation by Jerzy Sobczyk
|
||||
|
||||
SET $Sunday "Niedziela"
|
||||
SET $Monday "Poniedziałek"
|
||||
SET $Tuesday "Wtorek"
|
||||
SET $Wednesday "Środa"
|
||||
SET $Thursday "Czwartek"
|
||||
SET $Friday "Piątek"
|
||||
SET $Saturday "Sobota"
|
||||
|
||||
SET $January "Styczeń"
|
||||
SET $February "Luty"
|
||||
SET $March "Marzec"
|
||||
SET $April "Kwiecień"
|
||||
SET $May "Maj"
|
||||
SET $June "Czerwiec"
|
||||
SET $July "Lipiec"
|
||||
SET $August "Sierpień"
|
||||
SET $September "Wrzesień"
|
||||
SET $October "Październik"
|
||||
SET $November "Listopad"
|
||||
SET $December "Grudzień"
|
||||
|
||||
SET $Today "dzisiaj"
|
||||
SET $Tomorrow "jutro"
|
||||
|
||||
BANNER Terminarz na %w, %d. %m %y%o:
|
||||
|
||||
SET $Am "am"
|
||||
SET $Pm "pm"
|
||||
|
||||
SET $Ago "temu"
|
||||
SET $Fromnow "od teraz"
|
||||
SET $On "-"
|
||||
SET $Now "teraz"
|
||||
SET $At "o"
|
||||
SET $Minute "minut"
|
||||
SET $Hour "godzin"
|
||||
SET $Is "będzie"
|
||||
SET $Was "było"
|
||||
SET $And "i"
|
||||
SET $Hplu ""
|
||||
SET $Mplu ""
|
||||
|
||||
FSET subst_pl_plu(n) iif(n==1, "ę", (n==12||n==13||n==14), "", (n%10==2||n%10==3||n%10==4), "y", "")
|
||||
FSET subst_ampm(h) iif(h<5, " w nocy", h<10, " rano", h<12, " przed południem", h<18, " po południu", h<22, " wieczorem", " w nocy")
|
||||
FSET subst_ordinal(d) ""
|
||||
|
||||
FSET subst_a_alt(d) wkday(d) + ", " + day(d) + ". " + mon(d) + " " + year(d)
|
||||
FSET subst_ax(a, d, t) iif(a, subst_a_alt(d), $On + " " + subst_a_alt(d))
|
||||
FSET subst_bx(a, d, t) "za " + (d-today()) + " dni"
|
||||
FSET subst_g_alt(d) wkday(d) + ", " + day(d) + ". " + mon(d)
|
||||
FSET subst_gx(a, d, t) iif(a, subst_g_alt(d), $On + " " + subst_g_alt(d))
|
||||
FSET subst_ux(a, d, t) subst_ax(a, d, t)
|
||||
FSET subst_vx(a, d, t) subst_gx(a, d, t)
|
||||
FSET subst_p(a, d, t) ""
|
||||
FSET subst_0(a, d, t) subst_pl_plu(abs(t-now())/60)
|
||||
FSET subst_9(a, d, t) subst_pl_plu(abs(t-now())%60)
|
||||
|
||||
FSET subst_1(a, d, t) iif(t==now(), $Now, t<now(), subst_1past(now()-t), subst_1future(t-now()))
|
||||
|
||||
FSET subst_1future(diff) "za " + iif(diff/60==0, subst_1min(diff%60), diff%60==0, subst_1h(diff/60), subst_1h(diff/60) + " " + $And + " " + subst_1min(diff%60))
|
||||
FSET subst_1past(diff) iif(diff/60==0, subst_1min(diff%60), diff%60==0, subst_1h(diff/60), subst_1h(diff/60) + " " + $And + " " + subst_1min(diff%60)) + " temu"
|
||||
|
||||
FSET subst_1min(m) m + " " + $Minute + subst_pl_plu(m)
|
||||
FSET subst_1h(h) h + " " + $Hour + subst_pl_plu(h)
|
||||
69
include/lang/pt.rem
Normal file
69
include/lang/pt.rem
Normal file
@@ -0,0 +1,69 @@
|
||||
# Support for the (Brazilian) Portuguese language.
|
||||
# This file is part of REMIND.
|
||||
# REMIND is Copyright (C) 1992-2023 by Dianne Skoll
|
||||
# This file is derived from a translation by Marco Paganini
|
||||
|
||||
SET $Sunday "domingo"
|
||||
SET $Monday "segunda"
|
||||
SET $Tuesday "terça"
|
||||
SET $Wednesday "quarta"
|
||||
SET $Thursday "quinta"
|
||||
SET $Friday "sexta"
|
||||
SET $Saturday "sábado"
|
||||
|
||||
SET $January "janeiro"
|
||||
SET $February "fevereiro"
|
||||
SET $March "março"
|
||||
SET $April "abril"
|
||||
SET $May "maio"
|
||||
SET $June "junho"
|
||||
SET $July "julho"
|
||||
SET $August "agosto"
|
||||
SET $September "setembro"
|
||||
SET $October "outubro"
|
||||
SET $November "novembro"
|
||||
SET $December "dezembro"
|
||||
|
||||
SET $Today "hoje"
|
||||
SET $Tomorrow "amanhã"
|
||||
|
||||
BANNER Avisos para %w, %d de %m de %y%o:
|
||||
|
||||
SET $Am "am"
|
||||
SET $Pm "pm"
|
||||
|
||||
SET $Ago "atrás"
|
||||
SET $Fromnow "adiante"
|
||||
|
||||
SET $On "em"
|
||||
SET $Now "agora"
|
||||
SET $At "as"
|
||||
SET $Minute "minuto"
|
||||
SET $Hour "hora"
|
||||
SET $Is "é"
|
||||
SET $Was "foi"
|
||||
SET $And "e"
|
||||
|
||||
SET $Hplu "s"
|
||||
SET $Mplu "s"
|
||||
|
||||
FSET subst_ordinal(d) ""
|
||||
FSET subst_on_wd(d) iif(wkdaynum(d) == 1 || wkdaynum(d) == 2, "no", "na")
|
||||
|
||||
FSET subst_a_alt(d) wkday(d) + ", " + day(d) + " de " + mon(d) + " de " + year(d)
|
||||
FSET subst_bx(a, d, t) "em " + (d-today()) + " dias"
|
||||
FSET subst_c_alt(d) wkday(d)
|
||||
FSET subst_g_alt(d) wkday(d) + ", " + day(d) + " " + mon(d)
|
||||
FSET subst_ax(a, d, t) iif(a, subst_a_alt(d), subst_on_wd(d) + " " + subst_a_alt(d))
|
||||
FSET subst_cx(a, d, t) iif(a, subst_c_alt(d), subst_on_wd(d) + " " + subst_c_alt(d))
|
||||
FSET subst_gx(a, d, t) iif(a, subst_g_alt(d), subst_on_wd(d) + " " + subst_g_alt(d))
|
||||
FSET subst_jx(a, d, t) subst_ax(a, d, t)
|
||||
FSET subst_k_alt(d) wkday(d) + ", " + day(d) + " de " + mon(d)
|
||||
FSET subst_kx(a, d, t) iif(a, subst_k_alt(d), subst_on_wd(d) + " " + subst_k_alt(d))
|
||||
FSET subst_ux(a, d, t) subst_ax(a, d, t)
|
||||
FSET subst_vx(a, d, t) subst_kx(a, d, t)
|
||||
|
||||
FSET subst_1(a, d, t) iif(t==now(), $Now, t>now(), "em " + subst_1help(t-now()), subst_1help(now()-t) + " " + $Ago)
|
||||
FSET subst_1help(diff) iif(diff/60==0, subst_mplu(diff%60), diff%60==0, subst_hplu(diff/60), subst_hplu(diff/60) + " " + $And + " " + subst_mplu(diff%60))
|
||||
FSET subst_mplu(m) iif(m==1, "1 " + $Minute, m + " " + $Minute + $Mplu)
|
||||
FSET subst_hplu(h) iif(h==1, "1 " + $Hour, h + " " + $Hour + $Hplu)
|
||||
68
include/lang/ro.rem
Normal file
68
include/lang/ro.rem
Normal file
@@ -0,0 +1,68 @@
|
||||
# Support for the Romanian language.
|
||||
# This file is part of REMIND.
|
||||
# REMIND is Copyright (C) 1992-2023 by Dianne Skoll
|
||||
# This file is derived from a translation by Liviu Daia
|
||||
|
||||
SET $Sunday "Duminică"
|
||||
SET $Monday "Luni"
|
||||
SET $Tuesday "Marți"
|
||||
SET $Wednesday "Miercuri"
|
||||
SET $Thursday "Joi"
|
||||
SET $Friday "Vineri"
|
||||
SET $Saturday "Sâmbătă"
|
||||
|
||||
SET $January "Ianuarie"
|
||||
SET $February "Februarie"
|
||||
SET $March "Martie"
|
||||
SET $April "Aprilie"
|
||||
SET $May "Mai"
|
||||
SET $June "Iunie"
|
||||
SET $July "Iulie"
|
||||
SET $August "August"
|
||||
SET $September "Septembrie"
|
||||
SET $October "Octombrie"
|
||||
SET $November "Noiembrie"
|
||||
SET $December "Decembrie"
|
||||
|
||||
SET $Today "astăzi"
|
||||
SET $Tomorrow "mâine"
|
||||
|
||||
BANNER Reamintiri pentru %w, %d %m %y%o:
|
||||
|
||||
SET $Am "am"
|
||||
SET $Pm "pm"
|
||||
|
||||
SET $Ago "acum"
|
||||
SET $Fromnow "peste"
|
||||
|
||||
SET $On "pe"
|
||||
|
||||
SET $Now "acum"
|
||||
SET $At "la ora"
|
||||
SET $Minute "minut"
|
||||
SET $Hour "or"
|
||||
SET $Is "este"
|
||||
SET $Was "a fost"
|
||||
SET $Mplu "e"
|
||||
SET $Hplu "e"
|
||||
SET $And "şi"
|
||||
|
||||
FSET subst_bx(a, d, t) "peste " + (d-today()) + " zile"
|
||||
|
||||
FSET subst_ampm(h) iif(h<4, " noaptea", h<12, " dimineaţa", h<18, " după-amiaza", " seara")
|
||||
FSET subst_ordinal(d) ""
|
||||
|
||||
FSET subst_ax(a, d, t) wkday(d) + ", " + day(d) + " " + mon(d) + " " + year(d)
|
||||
FSET subst_cx(a, d, t) wkday(d)
|
||||
FSET subst_gx(a, d, t) wkday(d) + ", " + day(d) + " " + mon(d)
|
||||
FSET subst_jx(a, d, t) wkday(d) + ", " + mon(d) + " " + day(d) + ", " + year(d)
|
||||
FSET subst_kx(a, d, t) wkday(d) + ", " + mon(d) + " " + day(d)
|
||||
FSET subst_ux(a, d, t) subst_ax(a, d, t)
|
||||
FSET subst_vx(a, d, t) subst_gx(a, d, t)
|
||||
FSET subst_p(a, d, t) iif(d==today()+1, "", "le")
|
||||
|
||||
FSET subst_1(a, d, t) iif(t==now(), $Now, t<now(), subst_1helper(now()-t, "acum "), subst_1helper(t-now(), "peste "))
|
||||
FSET subst_1helper(diff, when) when + iif(diff%60==0, subst_1h(diff/60), diff/60==0, subst_1m(diff%60), subst_1h(diff/60) + " " + $And + " " + subst_1m(diff%60))
|
||||
FSET subst_1h(h) iif(h==1, "1 oră", h + " ore")
|
||||
FSET subst_1m(m) iif(m==1, "1 minut", m + " minute")
|
||||
FSET subst_0(a, d, t) iif(abs(t-now())/60==1, "ă", "e")
|
||||
16
include/seasons.rem
Normal file
16
include/seasons.rem
Normal file
@@ -0,0 +1,16 @@
|
||||
# Equinoxes and solstices
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
IF $LatDeg >= 0
|
||||
# Northern Hemisphere
|
||||
REM NOQUEUE [soleq(0)] MSG %"Vernal Equinox%" is %3.
|
||||
REM NOQUEUE [soleq(1)] MSG %"Summer Solstice%" is %3.
|
||||
REM NOQUEUE [soleq(2)] MSG %"Autumnal Equinox%" is %3.
|
||||
REM NOQUEUE [soleq(3)] MSG %"Winter Solstice%" is %3.
|
||||
ELSE
|
||||
# Southern Hemisphere
|
||||
REM NOQUEUE [soleq(0)] MSG %"Autumnal Equinox%" is %3.
|
||||
REM NOQUEUE [soleq(1)] MSG %"Winter Solstice%" is %3.
|
||||
REM NOQUEUE [soleq(2)] MSG %"Vernal Equinox%" is %3.
|
||||
REM NOQUEUE [soleq(3)] MSG %"Summer Solstice%" is %3.
|
||||
ENDIF
|
||||
2
include/site/README
Normal file
2
include/site/README
Normal file
@@ -0,0 +1,2 @@
|
||||
This directory is for system administrators to install site-wide
|
||||
Remind scripts that are useful to their user-base.
|
||||
633
init.c
633
init.c
@@ -1,633 +0,0 @@
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* INIT.C */
|
||||
/* */
|
||||
/* Initialize remind; perform certain tasks between */
|
||||
/* iterations in calendar mode; do certain checks after end */
|
||||
/* in normal mode. */
|
||||
/* */
|
||||
/* This file is part of REMIND. */
|
||||
/* Copyright (C) 1992-1996 by David F. Skoll */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
static char const RCSID[] = "$Id: init.c,v 1.3 1996-10-27 21:28:03 dfs Exp $";
|
||||
|
||||
#define L_IN_INIT 1
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#ifdef UNIX
|
||||
#include <sys/types.h>
|
||||
#include <pwd.h>
|
||||
#ifdef HAVE_UNISTD
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
#include "types.h"
|
||||
#include "protos.h"
|
||||
#include "expr.h"
|
||||
#include "err.h"
|
||||
#include "version.h"
|
||||
#include "globals.h"
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Command line options recognized:
|
||||
*
|
||||
* -n = Output next trigger date of each reminder in
|
||||
* simple calendar format.
|
||||
* -r = Disallow RUN mode
|
||||
* -c[n] = Produce a calendar for n months (default = 1)
|
||||
* -w[n,n,n] = Specify output device width, padding and spacing
|
||||
* -s[n] = Produce calendar in "simple calendar" format
|
||||
* -p[n] = Produce calendar in format compatible with rem2ps
|
||||
* -v = Verbose mode
|
||||
* -o = Ignore ONCE directives
|
||||
* -a = Don't issue timed reminders which will be queued
|
||||
* -q = Don't queue timed reminders
|
||||
* -t = Trigger all reminders (infinite delta)
|
||||
* -h = Hush mode
|
||||
* -f = Do not fork
|
||||
* -dchars = Debugging mode: Chars are:
|
||||
* e = Echo input lines
|
||||
* x = Display expression evaluation
|
||||
* t = Display trigger dates
|
||||
* v = Dump variables at end
|
||||
* l = Display entire line in error messages
|
||||
* -e = Send messages normally sent to stderr to stdout instead
|
||||
* -z[n] = Daemon mode waking up every n (def 5) minutes.
|
||||
* -bn = Time format for cal (0, 1, or 2)
|
||||
* -xn = Max. number of iterations for SATISFY
|
||||
* -uname = Run as user 'name' - only valid when run by root. If run
|
||||
* by non-root, changes environment but not effective uid.
|
||||
* -kcmd = Run 'cmd' for MSG-type reminders instead of printing to stdout
|
||||
* -iVAR=EXPR = Initialize and preserve VAR.
|
||||
* -m = Start calendar with Monday instead of Sunday.
|
||||
* A minus sign alone indicates to take input from stdin
|
||||
*
|
||||
**************************************************************/
|
||||
|
||||
/* For parsing an integer */
|
||||
#define PARSENUM(var, s) \
|
||||
var = 0; \
|
||||
while (isdigit(*(s))) { \
|
||||
var *= 10; \
|
||||
var += *(s) - '0'; \
|
||||
s++; \
|
||||
}
|
||||
|
||||
#ifdef UNIX
|
||||
PRIVATE void ChgUser ARGS((char *uname));
|
||||
#endif
|
||||
|
||||
PRIVATE void InitializeVar ARGS ((char *str));
|
||||
|
||||
static char *BadDate = "Illegal date on command line\n";
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* InitRemind */
|
||||
/* */
|
||||
/* Initialize the system - called only once at beginning! */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC void InitRemind(int argc, char *argv[])
|
||||
#else
|
||||
void InitRemind(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
#endif
|
||||
{
|
||||
char *arg;
|
||||
int i;
|
||||
int y, m, d, rep;
|
||||
Token tok;
|
||||
|
||||
y = NO_YR;
|
||||
m = NO_MON;
|
||||
d = NO_DAY;
|
||||
rep = NO_REP;
|
||||
|
||||
RealToday = SystemDate(&CurYear, &CurMon, &CurDay);
|
||||
if (RealToday < 0) {
|
||||
fprintf(ErrFp, ErrMsg[M_BAD_SYS_DATE], BASE);
|
||||
exit(1);
|
||||
}
|
||||
JulianToday = RealToday;
|
||||
FromJulian(JulianToday, &CurYear, &CurMon, &CurDay);
|
||||
|
||||
#if !defined(HAVE_QUEUED)
|
||||
DontFork = 1;
|
||||
DontQueue = 1;
|
||||
NumQueued = 0;
|
||||
DontIssueAts = 0;
|
||||
Daemon = 0;
|
||||
#elif defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
DontFork = 1;
|
||||
#elif defined(__OS2__) && defined (__MSDOS__)
|
||||
if (DOSMODE)
|
||||
DontFork = 1;
|
||||
#endif
|
||||
|
||||
/* Parse the command-line options */
|
||||
i = 1;
|
||||
while (i < argc) {
|
||||
arg = argv[i];
|
||||
if (*arg != '-') break; /* Exit the loop if it's not an option */
|
||||
i++;
|
||||
arg++;
|
||||
if (!*arg) {
|
||||
UseStdin = 1;
|
||||
IgnoreOnce = 1;
|
||||
i--;
|
||||
break;
|
||||
}
|
||||
while (*arg) {
|
||||
switch(*arg++) {
|
||||
|
||||
case 'i':
|
||||
case 'I':
|
||||
InitializeVar(arg);
|
||||
while(*arg) arg++;
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
case 'N':
|
||||
NextMode = 1;
|
||||
#ifdef HAVE_QUEUED
|
||||
DontQueue = 1;
|
||||
Daemon = 0;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
case 'R':
|
||||
RunDisabled = 1;
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
case 'M':
|
||||
MondayFirst = 1;
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
case 'O':
|
||||
IgnoreOnce = 1;
|
||||
break;
|
||||
|
||||
case 't':
|
||||
case 'T':
|
||||
InfiniteDelta = 1;
|
||||
break;
|
||||
|
||||
case 'e':
|
||||
case 'E':
|
||||
ErrFp = stdout;
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
case 'H':
|
||||
Hush = 1;
|
||||
break;
|
||||
|
||||
case 'g':
|
||||
case 'G':
|
||||
SortByDate = SORT_ASCEND;
|
||||
SortByTime = SORT_ASCEND;
|
||||
SortByPrio = SORT_ASCEND;
|
||||
if (*arg) {
|
||||
if (*arg == 'D' || *arg == 'd')
|
||||
SortByDate = SORT_DESCEND;
|
||||
arg++;
|
||||
}
|
||||
if (*arg) {
|
||||
if (*arg == 'D' || *arg == 'd')
|
||||
SortByTime = SORT_DESCEND;
|
||||
arg++;
|
||||
}
|
||||
if (*arg) {
|
||||
if (*arg == 'D' || *arg == 'd')
|
||||
SortByPrio = SORT_DESCEND;
|
||||
arg++;
|
||||
}
|
||||
break;
|
||||
|
||||
#if defined(UNIX) && defined(WANT_U_OPTION)
|
||||
case 'u':
|
||||
case 'U':
|
||||
ChgUser(arg);
|
||||
while (*arg) arg++;
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_QUEUED
|
||||
case 'z':
|
||||
case 'Z':
|
||||
DontFork = 1;
|
||||
PARSENUM(Daemon, arg);
|
||||
if (Daemon<5) Daemon=5;
|
||||
else if (Daemon>60) Daemon=60;
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
case 'A':
|
||||
DontIssueAts = 1;
|
||||
break;
|
||||
|
||||
case 'q':
|
||||
case 'Q':
|
||||
DontQueue = 1;
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
case 'F':
|
||||
DontFork = 1;
|
||||
break;
|
||||
#endif
|
||||
case 'c':
|
||||
case 'C':
|
||||
DoCalendar = 1;
|
||||
if (*arg == '+') {
|
||||
arg++;
|
||||
PARSENUM(CalWeeks, arg);
|
||||
if (!CalWeeks) CalWeeks = 1;
|
||||
} else {
|
||||
PARSENUM(CalMonths, arg);
|
||||
if (!CalMonths) CalMonths = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case 's':
|
||||
case 'S':
|
||||
DoSimpleCalendar = 1;
|
||||
if (*arg == '+') {
|
||||
arg++;
|
||||
PARSENUM(CalWeeks, arg);
|
||||
if (!CalWeeks) CalWeeks = 1;
|
||||
} else {
|
||||
PARSENUM(CalMonths, arg);
|
||||
if (!CalMonths) CalMonths = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
case 'P':
|
||||
DoSimpleCalendar = 1;
|
||||
PsCal = 1;
|
||||
PARSENUM(CalMonths, arg);
|
||||
if (!CalMonths) CalMonths = 1;
|
||||
break;
|
||||
|
||||
case 'w':
|
||||
case 'W':
|
||||
if (*arg != ',') {
|
||||
PARSENUM(CalWidth, arg);
|
||||
if (CalWidth < 80) CalWidth = 80;
|
||||
}
|
||||
if (*arg == ',') {
|
||||
arg++;
|
||||
if (*arg != ',') {
|
||||
PARSENUM(CalLines, arg);
|
||||
if (CalLines > 20) CalLines = 20;
|
||||
}
|
||||
if (*arg == ',') {
|
||||
arg++;
|
||||
PARSENUM(CalPad, arg);
|
||||
if (CalPad > 20) CalPad = 20;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
case 'D':
|
||||
while (*arg) {
|
||||
switch(*arg++) {
|
||||
case 'e': case 'E': DebugFlag |= DB_ECHO_LINE; break;
|
||||
case 'x': case 'X': DebugFlag |= DB_PRTEXPR; break;
|
||||
case 't': case 'T': DebugFlag |= DB_PRTTRIG; break;
|
||||
case 'v': case 'V': DebugFlag |= DB_DUMP_VARS; break;
|
||||
case 'l': case 'L': DebugFlag |= DB_PRTLINE; break;
|
||||
default:
|
||||
fprintf(ErrFp, ErrMsg[M_BAD_DB_FLAG], *(arg-1));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
case 'V':
|
||||
DebugFlag |= DB_PRTLINE;
|
||||
ShowAllErrors = 1;
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
case 'B':
|
||||
PARSENUM(ScFormat, arg);
|
||||
if (ScFormat<0 || ScFormat>2) ScFormat=SC_AMPM;
|
||||
break;
|
||||
|
||||
case 'x':
|
||||
case 'X':
|
||||
PARSENUM(MaxSatIter, arg);
|
||||
if (MaxSatIter < 10) MaxSatIter=10;
|
||||
break;
|
||||
|
||||
case 'k':
|
||||
case 'K':
|
||||
MsgCommand = arg;
|
||||
while (*arg) arg++; /* Chew up remaining chars in this arg */
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(ErrFp, ErrMsg[M_BAD_OPTION], *(arg-1));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* Get the filename. */
|
||||
if (i >= argc) {
|
||||
Usage();
|
||||
exit(1);
|
||||
}
|
||||
InitialFile = argv[i++];
|
||||
|
||||
/* Get the date, if any */
|
||||
if (i < argc) {
|
||||
while (i < argc) {
|
||||
arg = argv[i++];
|
||||
FindToken(arg, &tok);
|
||||
switch (tok.type) {
|
||||
case T_Time:
|
||||
if (SysTime != -1L) Usage();
|
||||
else {
|
||||
SysTime = (long) tok.val * 60L;
|
||||
#ifdef HAVE_QUEUED
|
||||
DontQueue = 1;
|
||||
Daemon = 0;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
case T_Month:
|
||||
if (m != NO_MON) Usage();
|
||||
else m = tok.val;
|
||||
break;
|
||||
|
||||
case T_Day:
|
||||
if (d != NO_DAY) Usage();
|
||||
else d = tok.val;
|
||||
break;
|
||||
|
||||
case T_Year:
|
||||
if (y != NO_YR) Usage();
|
||||
else y = tok.val;
|
||||
break;
|
||||
|
||||
case T_Rep:
|
||||
if (rep != NO_REP) Usage();
|
||||
else rep = tok.val;
|
||||
break;
|
||||
|
||||
default: Usage();
|
||||
}
|
||||
}
|
||||
|
||||
if (rep > 0) {
|
||||
Iterations = rep;
|
||||
DontQueue = 1;
|
||||
Daemon = 0;
|
||||
}
|
||||
|
||||
/* Must supply date in the form: day, mon, yr OR mon, yr */
|
||||
if (m != NO_MON || y != NO_YR || d != NO_DAY) {
|
||||
if (m == NO_MON || y == NO_YR) {
|
||||
if (rep == NO_REP) Usage();
|
||||
else if (m != NO_MON || y != NO_YR) Usage();
|
||||
else {
|
||||
m = CurMon;
|
||||
y = CurYear;
|
||||
if (d == NO_DAY) d = CurDay;
|
||||
}
|
||||
}
|
||||
if (d == NO_DAY) d=1;
|
||||
if (d > DaysInMonth(m, y)) {
|
||||
fprintf(ErrFp, BadDate);
|
||||
Usage();
|
||||
}
|
||||
JulianToday = Julian(y, m, d);
|
||||
if (JulianToday == -1) {
|
||||
fprintf(ErrFp, BadDate);
|
||||
Usage();
|
||||
}
|
||||
CurYear = y;
|
||||
CurMon = m;
|
||||
CurDay = d;
|
||||
if (JulianToday != RealToday) IgnoreOnce = 1;
|
||||
}
|
||||
|
||||
}
|
||||
/* Figure out the offset from UTC */
|
||||
if (CalculateUTC)
|
||||
(void) CalcMinsFromUTC(JulianToday, SystemTime(1)/60,
|
||||
&MinsFromUTC, NULL);
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* Usage */
|
||||
/* */
|
||||
/* Print the usage info. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifndef L_USAGE_OVERRIDE
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC void Usage(void)
|
||||
#else
|
||||
void Usage()
|
||||
#endif /* HAVE_PROTOS */
|
||||
{
|
||||
fprintf(ErrFp, "\nREMIND %s (%s version) Copyright 1992-1996 by David F. Skoll\n", VERSION, L_LANGNAME);
|
||||
#ifdef BETA
|
||||
fprintf(ErrFp, ">>>> BETA VERSION <<<<\n");
|
||||
#endif
|
||||
fprintf(ErrFp, "Usage: remind [options] filename [date] [time] [*rep]\n");
|
||||
fprintf(ErrFp, "Options:\n");
|
||||
fprintf(ErrFp, " -n Output next occurrence of reminders in simple format\n");
|
||||
fprintf(ErrFp, " -r Disable RUN directives\n");
|
||||
fprintf(ErrFp, " -c[n] Produce a calendar for n (default 1) months\n");
|
||||
fprintf(ErrFp, " -c+[n] Produce a calendar for n (default 1) weeks\n");
|
||||
fprintf(ErrFp, " -w[n[,p[,s]]] Specify width, padding and spacing of calendar\n");
|
||||
fprintf(ErrFp, " -s[+][n] Produce `simple calendar' for n (1) months (weeks)\n");
|
||||
fprintf(ErrFp, " -p[n] Same as -s, but input compatible with rem2ps\n");
|
||||
fprintf(ErrFp, " -v Verbose mode\n");
|
||||
fprintf(ErrFp, " -o Ignore ONCE directives\n");
|
||||
fprintf(ErrFp, " -t Trigger all future reminders regardless of delta\n");
|
||||
fprintf(ErrFp, " -h `Hush' mode - be very quiet\n");
|
||||
#ifdef HAVE_QUEUED
|
||||
fprintf(ErrFp, " -a Don't trigger timed reminders immediately - just queue them\n");
|
||||
fprintf(ErrFp, " -q Don't queue timed reminders\n");
|
||||
fprintf(ErrFp, " -f Trigger timed reminders by staying in foreground\n");
|
||||
fprintf(ErrFp, " -z[n] Enter daemon mode, waking every n (5) minutes.\n");
|
||||
#endif
|
||||
fprintf(ErrFp, " -d... Debug: e=echo x=expr-eval t=trig v=dumpvars l=showline\n");
|
||||
fprintf(ErrFp, " -e Divert messages normally sent to stderr to stdout\n");
|
||||
fprintf(ErrFp, " -b[n] Time format for cal: 0=am/pm, 1=24hr, 2=none\n");
|
||||
fprintf(ErrFp, " -x[n] Iteration limit for SATISFY clause (def=150)\n");
|
||||
fprintf(ErrFp, " -kcmd Run `cmd' for MSG-type reminders\n");
|
||||
fprintf(ErrFp, " -g[ddd] Sort reminders by date, time and priority before issuing\n");
|
||||
fprintf(ErrFp, " -ivar=val Initialize var to val and preserve var\n");
|
||||
fprintf(ErrFp, " -m Start calendar with Monday rather than Sunday\n");
|
||||
exit(1);
|
||||
}
|
||||
#endif /* L_USAGE_OVERRIDE */
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* ChgUser */
|
||||
/* */
|
||||
/* Run as a specified user. Can only be used if Remind is */
|
||||
/* started by root. This changes the real and effective uid, */
|
||||
/* the real and effective gid, and sets the HOME, SHELL and */
|
||||
/* USER environment variables. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#if defined(UNIX) && defined(WANT_U_OPTION)
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE void ChgUser(char *user)
|
||||
#else
|
||||
static void ChgUser(user)
|
||||
char *user;
|
||||
#endif /* HAVE_PROTOS */
|
||||
{
|
||||
#ifdef SYSV
|
||||
/* uid_t myuid; This seems to mess up on XENIX, so forget it... */
|
||||
int myuid;
|
||||
#else
|
||||
int myuid;
|
||||
#endif
|
||||
|
||||
struct passwd *pwent;
|
||||
static char *home, *shell, *username, *logname;
|
||||
|
||||
myuid = getuid();
|
||||
|
||||
pwent = getpwnam(user);
|
||||
|
||||
if (!pwent) {
|
||||
fprintf(ErrFp, ErrMsg[M_BAD_USER], user);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!myuid && setgid(pwent->pw_gid)) {
|
||||
fprintf(ErrFp, ErrMsg[M_NO_CHG_GID], pwent->pw_gid);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!myuid && setuid(pwent->pw_uid)) {
|
||||
fprintf(ErrFp, ErrMsg[M_NO_CHG_UID], pwent->pw_uid);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
home = malloc(strlen(pwent->pw_dir) + 6);
|
||||
if (!home) {
|
||||
fprintf(ErrFp, ErrMsg[M_NOMEM_ENV]);
|
||||
exit(1);
|
||||
}
|
||||
sprintf(home, "HOME=%s", pwent->pw_dir);
|
||||
putenv(home);
|
||||
|
||||
shell = malloc(strlen(pwent->pw_shell) + 7);
|
||||
if (!shell) {
|
||||
fprintf(ErrFp, ErrMsg[M_NOMEM_ENV]);
|
||||
exit(1);
|
||||
}
|
||||
sprintf(shell, "SHELL=%s", pwent->pw_shell);
|
||||
putenv(shell);
|
||||
|
||||
if (pwent->pw_uid) {
|
||||
username = malloc(strlen(pwent->pw_name) + 6);
|
||||
if (!username) {
|
||||
fprintf(ErrFp, ErrMsg[M_NOMEM_ENV]);
|
||||
exit(1);
|
||||
}
|
||||
sprintf(username, "USER=%s", pwent->pw_name);
|
||||
putenv(username);
|
||||
logname= malloc(strlen(pwent->pw_name) + 9);
|
||||
if (!logname) {
|
||||
fprintf(ErrFp, ErrMsg[M_NOMEM_ENV]);
|
||||
exit(1);
|
||||
}
|
||||
sprintf(logname, "LOGNAME=%s", pwent->pw_name);
|
||||
putenv(logname);
|
||||
}
|
||||
}
|
||||
#endif /* UNIX && WANT_U_OPTION */
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* InitializeVar */
|
||||
/* */
|
||||
/* Initialize and preserve a variable */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE void InitializeVar(char *str)
|
||||
#else
|
||||
static void InitializeVar(str)
|
||||
char *str;
|
||||
#endif
|
||||
{
|
||||
char *varname, *expr;
|
||||
|
||||
Value val;
|
||||
|
||||
int r;
|
||||
|
||||
/* Scan for an '=' sign */
|
||||
varname = str;
|
||||
while (*str && *str != '=') str++;
|
||||
if (!*str) {
|
||||
fprintf(ErrFp, ErrMsg[M_I_OPTION], ErrMsg[E_MISS_EQ]);
|
||||
return;
|
||||
}
|
||||
*str = 0;
|
||||
if (!*varname) {
|
||||
fprintf(ErrFp, ErrMsg[M_I_OPTION], ErrMsg[E_MISS_VAR]);
|
||||
return;
|
||||
}
|
||||
expr = str+1;
|
||||
if (!*expr) {
|
||||
fprintf(ErrFp, ErrMsg[M_I_OPTION], ErrMsg[E_MISS_EXPR]);
|
||||
return;
|
||||
}
|
||||
|
||||
r=EvalExpr(&expr, &val);
|
||||
if (r) {
|
||||
fprintf(ErrFp, ErrMsg[M_I_OPTION], ErrMsg[r]);
|
||||
return;
|
||||
}
|
||||
|
||||
if (*varname == '$') {
|
||||
r=SetSysVar(varname+1, &val);
|
||||
if (r) fprintf(ErrFp, ErrMsg[M_I_OPTION], ErrMsg[r]);
|
||||
return;
|
||||
}
|
||||
|
||||
r=SetVar(varname, &val);
|
||||
if (r) {
|
||||
fprintf(ErrFp, ErrMsg[M_I_OPTION], ErrMsg[r]);
|
||||
return;
|
||||
}
|
||||
r=PreserveVar(varname);
|
||||
if (r) fprintf(ErrFp, ErrMsg[M_I_OPTION], ErrMsg[r]);
|
||||
return;
|
||||
}
|
||||
|
||||
238
install-sh
Executable file
238
install-sh
Executable file
@@ -0,0 +1,238 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
#
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
else
|
||||
instcmd=mkdir
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
||||
42
kall
42
kall
@@ -1,42 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $Id: kall,v 1.1 1996-03-27 03:25:59 dfs Exp $
|
||||
#
|
||||
# kall - kill all processes belonging to this user that match
|
||||
# specified string.
|
||||
|
||||
signal=`echo $1 | grep '^\-.*'`
|
||||
me=`basename $0`
|
||||
|
||||
if [ "$signal" != "" ]; then
|
||||
shift
|
||||
else
|
||||
signal="-TERM"
|
||||
fi
|
||||
|
||||
if [ "$1" = "" ]; then
|
||||
echo "usage: $me [-signal] string [string...]"
|
||||
echo " kills all of your processes where command name matches"
|
||||
echo " any of the given strings."
|
||||
exit
|
||||
fi
|
||||
|
||||
msg="0"
|
||||
|
||||
while [ "$1" != "" ]; do
|
||||
|
||||
# NOTE: You may have to modify the next line, since PS is non-portable.
|
||||
# The 'awk' command picks out the process IDs to pass them on to kill.
|
||||
rprocs=`ps cx | awk '{if(prog == $NF && $1 != mypid) print $1}' prog=$1 mypid=$$ -`
|
||||
if [ "$rprocs" != "" ]; then
|
||||
msg="1"
|
||||
echo -n "${me}: Sending $signal signal to $1 process(es)"
|
||||
echo '...'
|
||||
kill $signal $rprocs
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if [ $msg = "1" ]; then
|
||||
echo "${me}: Done."
|
||||
fi
|
||||
28
kall.1
28
kall.1
@@ -1,28 +0,0 @@
|
||||
.\" $Id: kall.1,v 1.2 1996-04-28 02:01:58 dfs Exp $
|
||||
.TH KALL 1 "26 February 1991"
|
||||
.UC 4
|
||||
.SH NAME
|
||||
kall \- kill processes by command name
|
||||
.SH SYNOPSIS
|
||||
.B kall
|
||||
[\-\fIsignal\fR] prog1 [prog2...]
|
||||
.SH DESCRIPTION
|
||||
.B Kall
|
||||
sends the specified \fIsignal\fR (defaults to \fB-TERM\fR) to all processes
|
||||
whose command name is specified on the command line. For example:
|
||||
.PP
|
||||
.nf
|
||||
kall -HUP remind foobar
|
||||
.fi
|
||||
.PP
|
||||
sends a \fBHUP\fR signal to all \fIremind\fR and \fIfoobar\fR programs.
|
||||
Note that \fBkall\fR sends signals only to those processes owned by the
|
||||
user invoking \fBkall\fR.
|
||||
.SH AUTHOR
|
||||
David F. Skoll
|
||||
.SH BUGS
|
||||
.B Kall
|
||||
is a sh(1) script and depends on the behaviour of ps(1); thus, it is
|
||||
not especially portable.
|
||||
.SH SEE ALSO
|
||||
remind, rem
|
||||
20
lnk.bcc
20
lnk.bcc
@@ -1,20 +0,0 @@
|
||||
calendar.obj
|
||||
dorem.obj
|
||||
dosubst.obj
|
||||
expr.obj
|
||||
files.obj
|
||||
funcs.obj
|
||||
globals.obj
|
||||
hbcal.obj
|
||||
init.obj
|
||||
main.obj
|
||||
moon.obj
|
||||
omit.obj
|
||||
os2func.obj
|
||||
queue.obj
|
||||
sort.obj
|
||||
token.obj
|
||||
trigger.obj
|
||||
userfns.obj
|
||||
utils.obj
|
||||
var.obj
|
||||
23
lnk.msc
23
lnk.msc
@@ -1,23 +0,0 @@
|
||||
calendar.obj +
|
||||
dorem.obj +
|
||||
dosubst.obj +
|
||||
expr.obj +
|
||||
files.obj +
|
||||
funcs.obj +
|
||||
globals.obj +
|
||||
hbcal.obj +
|
||||
init.obj +
|
||||
main.obj +
|
||||
moon.obj +
|
||||
omit.obj +
|
||||
sort.obj +
|
||||
token.obj +
|
||||
trigger.obj +
|
||||
userfns.obj +
|
||||
utils.obj +
|
||||
var.obj
|
||||
remind.exe
|
||||
nul
|
||||
|
||||
|
||||
|
||||
19
lnk.tc
19
lnk.tc
@@ -1,19 +0,0 @@
|
||||
-eremind.exe
|
||||
calendar.obj
|
||||
dorem.obj
|
||||
dosubst.obj
|
||||
expr.obj
|
||||
files.obj
|
||||
funcs.obj
|
||||
globals.obj
|
||||
hbcal.obj
|
||||
init.obj
|
||||
main.obj
|
||||
moon.obj
|
||||
omit.obj
|
||||
sort.obj
|
||||
token.obj
|
||||
trigger.obj
|
||||
userfns.obj
|
||||
utils.obj
|
||||
var.obj
|
||||
97
makefile.bcc
97
makefile.bcc
@@ -1,97 +0,0 @@
|
||||
# Makefile for REMIND for Borland C++
|
||||
# $Id: makefile.bcc,v 1.3 1996-09-28 18:17:07 dfs Exp $
|
||||
|
||||
VERSION= 03.00.15
|
||||
|
||||
MODEL=l
|
||||
|
||||
!if $d(__OS2__)
|
||||
CFLAGS= -DOS2_POPUP -w-pia -O2
|
||||
BINDIR= ..\OS2-EX
|
||||
DELFLAG= /f
|
||||
!else
|
||||
CFLAGS= -w-pia -O2 -m$(MODEL)
|
||||
BINDIR= ..\MSDOS-EX
|
||||
DELFLAG=
|
||||
!endif
|
||||
|
||||
HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \
|
||||
lang.h english.h german.h dutch.h finnish.h french.h norwgian.h \
|
||||
danish.h polish.h
|
||||
|
||||
STDHDRS= config.h types.h protos.h globals.h err.h lang.h
|
||||
|
||||
LANGHDRS= english.h german.h dutch.h finnish.h french.h norwgian.h danish.h \
|
||||
polish.h
|
||||
|
||||
SRCS= calendar.c dorem.c dosubst.c expr.c files.c funcs.c globals.c init.c \
|
||||
main.c omit.c sort.c token.c trigger.c userfns.c utils.c var.c hbcal.c \
|
||||
queue.c moon.c os2func.c
|
||||
|
||||
OBJS=calendar.obj dorem.obj dosubst.obj expr.obj files.obj funcs.obj \
|
||||
globals.obj init.obj main.obj omit.obj sort.obj token.obj trigger.obj \
|
||||
utils.obj userfns.obj var.obj hbcal.obj queue.obj moon.obj os2func.obj
|
||||
|
||||
all: exes test-rem.cmd test-rem.bat
|
||||
test-rem
|
||||
|
||||
clean:
|
||||
-del $(DELFLAG) *.obj
|
||||
-del $(DELFLAG) $(BINDIR)\*.exe
|
||||
|
||||
exes: $(BINDIR)\remind.exe $(BINDIR)\rem2ps.exe
|
||||
|
||||
..\os2-ex\remind.exe: $(OBJS)
|
||||
bcc -e..\os2-ex\remind @lnk.bcc -lap;Toe
|
||||
|
||||
..\msdos-ex\remind.exe: $(OBJS)
|
||||
bcc -e..\msdos-ex\remind -m$(MODEL) @lnk.bcc
|
||||
|
||||
..\os2-ex\rem2ps.exe: rem2ps.obj
|
||||
bcc -e..\os2-ex\rem2ps rem2ps.obj -lap;Toe
|
||||
|
||||
..\msdos-ex\rem2ps.exe: rem2ps.obj
|
||||
bcc -e..\msdos-ex\rem2ps -m$(MODEL) rem2ps.obj
|
||||
|
||||
.c.obj:
|
||||
bcc $(CFLAGS) -c {$< }
|
||||
|
||||
rem2ps.obj: rem2ps.c rem2ps.h config.h lang.h
|
||||
|
||||
calendar.obj: calendar.c $(STDHDRS) expr.h
|
||||
|
||||
dorem.obj: dorem.c $(STDHDRS) expr.h
|
||||
|
||||
dosubst.obj: dosubst.c $(STDHDRS) $(LANGHDRS)
|
||||
|
||||
expr.obj: expr.c $(STDHDRS) expr.h
|
||||
|
||||
files.obj: files.c $(STDHDRS)
|
||||
|
||||
funcs.obj: funcs.c $(STDHDRS) expr.h version.h
|
||||
|
||||
globals.obj: globals.c config.h types.h globals.h err.h lang.h
|
||||
|
||||
init.obj: init.c $(STDHDRS) expr.h version.h
|
||||
|
||||
main.obj: main.c $(STDHDRS) expr.h
|
||||
|
||||
moon.obj: moon.c $(STDHDRS) expr.h
|
||||
|
||||
omit.obj: omit.c $(STDHDRS)
|
||||
|
||||
os2func.obj: os2func.c $(STDHDRS)
|
||||
|
||||
queue.obj: queue.c $(STDHDRS)
|
||||
|
||||
sort.obj: sort.c $(STDHDRS)
|
||||
|
||||
token.obj: token.c $(STDHDRS)
|
||||
|
||||
trigger.obj: trigger.c $(STDHDRS) expr.h
|
||||
|
||||
userfns.obj: userfns.c $(STDHDRS) expr.h
|
||||
|
||||
utils.obj: utils.c $(STDHDRS)
|
||||
|
||||
var.obj: var.c $(STDHDRS) expr.h
|
||||
74
makefile.msc
74
makefile.msc
@@ -1,74 +0,0 @@
|
||||
# Makefile for REMIND for Microsoft C for MSDOS
|
||||
# $Id: makefile.msc,v 1.1 1996-03-27 03:26:01 dfs Exp $
|
||||
|
||||
OBJS= calendar.obj dorem.obj dosubst.obj expr.obj files.obj funcs.obj \
|
||||
globals.obj init.obj main.obj omit.obj token.obj trigger.obj userfns.obj \
|
||||
utils.obj var.obj sort.obj hbcal.obj moon.obj
|
||||
|
||||
DEFINES= /D__MSDOS__ /D__MSC__
|
||||
|
||||
MODEL= /AM
|
||||
|
||||
calendar.obj: calendar.c
|
||||
cl /c $(DEFINES) $(MODEL) /Focalendar.obj calendar.c
|
||||
|
||||
dorem.obj: dorem.c
|
||||
cl /c $(DEFINES) $(MODEL) /Fodorem.obj dorem.c
|
||||
|
||||
dosubst.obj: dosubst.c
|
||||
cl /c $(DEFINES) $(MODEL) /Fodosubst.obj dosubst.c
|
||||
|
||||
expr.obj: expr.c
|
||||
cl /c $(DEFINES) $(MODEL) /Foexpr.obj expr.c
|
||||
|
||||
hbcal.obj: hbcal.c
|
||||
cl /c $(DEFINES) $(MODEL) /Fohbcal.obj hbcal.c
|
||||
|
||||
sort.obj: sort.c
|
||||
cl /c $(DEFINES) $(MODEL) /Fosort.obj sort.c
|
||||
|
||||
files.obj: files.c
|
||||
cl /c $(DEFINES) $(MODEL) /Fofiles.obj files.c
|
||||
|
||||
funcs.obj: funcs.c
|
||||
cl /c $(DEFINES) $(MODEL) /Fofuncs.obj funcs.c
|
||||
|
||||
globals.obj: globals.c
|
||||
cl /c $(DEFINES) $(MODEL) /Foglobals.obj globals.c
|
||||
|
||||
init.obj: init.c
|
||||
cl /c $(DEFINES) $(MODEL) /Foinit.obj init.c
|
||||
|
||||
main.obj: main.c
|
||||
cl /c $(DEFINES) $(MODEL) /Fomain.obj main.c
|
||||
|
||||
moon.obj: moon.c
|
||||
cl /c $(DEFINES) $(MODEL) /Fomoon.obj moon.c
|
||||
|
||||
omit.obj: omit.c
|
||||
cl /c $(DEFINES) $(MODEL) /Foomit.obj omit.c
|
||||
|
||||
token.obj: token.c
|
||||
cl /c $(DEFINES) $(MODEL) /Fotoken.obj token.c
|
||||
|
||||
trigger.obj: trigger.c
|
||||
cl /c $(DEFINES) $(MODEL) /Fotrigger.obj trigger.c
|
||||
|
||||
userfns.obj: userfns.c
|
||||
cl /c $(DEFINES) $(MODEL) /Fouserfns.obj userfns.c
|
||||
|
||||
utils.obj: utils.c
|
||||
cl /c $(DEFINES) $(MODEL) /Foutils.obj utils.c
|
||||
|
||||
var.obj: var.c
|
||||
cl /c $(DEFINES) $(MODEL) /Fovar.obj var.c
|
||||
|
||||
remind.exe: $(OBJS)
|
||||
link /NOI @lnk.msc
|
||||
|
||||
rem2ps.obj: rem2ps.c
|
||||
cl /c $(DEFINES) $(MODEL) /Forem2ps.obj rem2ps.c
|
||||
|
||||
rem2ps.exe: rem2ps.obj
|
||||
link /NOI rem2ps,rem2ps.exe,,,
|
||||
|
||||
112
makefile.os2
112
makefile.os2
@@ -1,112 +0,0 @@
|
||||
# Makefile for REMIND
|
||||
#
|
||||
# $Id: makefile.os2,v 1.2 1996-10-12 02:49:34 dfs Exp $
|
||||
#
|
||||
# THIS IS OUT OF DATE!
|
||||
#
|
||||
# - for GNU gcc (emx 0.8g kit) [executables for OS/2 2.x or DOS (32-bit)]
|
||||
# - for Microsoft C 6.00A [executables for OS/2 or MSDOS (16-bit)]
|
||||
|
||||
# To use, enter "make -f Makefile.os2" (this makefile depends on its
|
||||
# name being "Makefile.os2").
|
||||
#
|
||||
# Tested with dmake 3.8 and GNU make 3.68 under OS/2
|
||||
|
||||
default:
|
||||
@echo "Enter $(MAKE) -f Makefile.os2 target "
|
||||
@echo " where 'target' is chosen from "
|
||||
@echo " msc OS/2 exe [Microsoft C 6.00a] "
|
||||
@echo " mscbnd OS/2 and DOS exe [Microsoft C 6.00a] "
|
||||
@echo " emx OS/2 and DOS 32-bit exe [EMX/gcc] "
|
||||
|
||||
|
||||
msc:
|
||||
$(MAKE) -f Makefile.os2 all \
|
||||
CC="cl -nologo -AM" O=".obj" \
|
||||
CFLAGS="-D__STDC__ -D__OS2__" \
|
||||
LFLAGS="-Lp" \
|
||||
LFLAGS2="setargv.obj remind.def -link /NOE"
|
||||
|
||||
mscbnd:
|
||||
$(MAKE) -f Makefile.os2 all \
|
||||
CC="cl -nologo -AM" O=".obj" \
|
||||
CFLAGS="-D__STDC__ -D__OS2__ -D__MSDOS__" \
|
||||
LFLAGS="-Lp" LBIND="-Fb" \
|
||||
LFLAGS2="setargv.obj remind.def -link /NOE" \
|
||||
BIND="bind remind /n DOSMAKEPIPE DOSCWAIT VIOENDPOPUP VIOPOPUP"
|
||||
|
||||
emx:
|
||||
$(MAKE) -f Makefile.os2 all \
|
||||
CC="gcc -O -s" O=".o" \
|
||||
CFLAGS="-D__OS2__ -D__MSDOS__" \
|
||||
LFLAGS=""
|
||||
|
||||
|
||||
# OS2_POPUP enables Russ Herman's popup reminders
|
||||
#OS2_POPUP =
|
||||
OS2_POPUP = -DOS2_POPUP
|
||||
|
||||
HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \
|
||||
lang.h english.h german.h dutch.h finnish.h french.h norwgian.h \
|
||||
danish.h polish.h
|
||||
|
||||
STDHDRS= config.h types.h protos.h globals.h err.h lang.h
|
||||
|
||||
LANGHDRS= english.h german.h dutch.h finnish.h french.h norwgian.h danish.h \
|
||||
polish.h
|
||||
|
||||
SRCS= calendar.c dorem.c dosubst.c expr.c files.c funcs.c globals.c hbcal.c \
|
||||
init.c main.c moon.c omit.c sort.c queue.c token.c trigger.c userfns.c \
|
||||
utils.c var.c os2func.c
|
||||
|
||||
MANIFEST= README.UNIX README.DOS COPYRIGHT $(HDRS) $(SRCS) Makefile rem rem.1 \
|
||||
remind.1 remind-all.csh remind-all.sh test.rem test-rem test.cmp makefile.tc \
|
||||
makefile.msc lnk.msc lnk.tc MANIFEST.UNX MANIFEST.DOS WHATSNEW.30 kall kall.1 \
|
||||
defs.rem README.OS2 makefile.os2 rem2ps.c rem2ps.h remind.def rem2ps.1 \
|
||||
tstlang.rem README.BCC lnk.bcc makefile.bcc os2func.c \
|
||||
test-rem.bat test-rem.cmd test1.cmp test2.cmp
|
||||
|
||||
|
||||
OBJS= $(SRCS:.c=$O)
|
||||
|
||||
all: remind.exe rem2ps.exe
|
||||
|
||||
.c$O:
|
||||
$(CC) -c $(CFLAGS) $(OS2_POPUP) $*.c
|
||||
|
||||
rem2ps.exe: rem2ps$O
|
||||
$(CC) $(LFLAGS) $(LBIND) -o $@ rem2ps$O $(LFLAGS2)
|
||||
|
||||
remind.exe: $(OBJS)
|
||||
$(CC) $(LFLAGS) -o $@ $(OBJS) $(LFLAGS2)
|
||||
$(BIND)
|
||||
|
||||
clean:
|
||||
rm -f *.o *.obj *~ core *.bak
|
||||
|
||||
clobber:
|
||||
rm -f *.o *.obj *~ remind.exe rem2ps.exe test.out core *.bak
|
||||
|
||||
test:
|
||||
test-rem.cmd
|
||||
|
||||
rem2ps$O: rem2ps.c rem2ps.h lang.h config.h
|
||||
calendar$O: calendar.c $(STDHDRS) expr.h
|
||||
dorem$O: dorem.c $(STDHDRS) expr.h
|
||||
dosubst$O: dosubst.c $(STDHDRS) $(LANGHDRS)
|
||||
expr$O: expr.c $(STDHDRS) expr.h
|
||||
files$O: files.c $(STDHDRS)
|
||||
funcs$O: funcs.c $(STDHDRS) expr.h version.h
|
||||
globals$O: globals.c config.h types.h globals.h err.h lang.h $(LANGHDRS)
|
||||
hbcal$O: hbcal.c $(STDHDRS)
|
||||
init$O: init.c $(STDHDRS) expr.h version.h $(LANGHDRS)
|
||||
main$O: main.c $(STDHDRS) expr.h
|
||||
moon$O: moon.c $(STDHDRS)
|
||||
omit$O: omit.c $(STDHDRS)
|
||||
sort$O: sort.c $(STDHDRS)
|
||||
queue$O: queue.c $(STDHDRS)
|
||||
token$O: token.c $(STDHDRS)
|
||||
trigger$O: trigger.c $(STDHDRS) expr.h
|
||||
userfns$O: userfns.c $(STDHDRS) expr.h
|
||||
utils$O: utils.c $(STDHDRS)
|
||||
var$O: var.c $(STDHDRS) expr.h
|
||||
68
makefile.tc
68
makefile.tc
@@ -1,68 +0,0 @@
|
||||
# Makefile for REMIND for Turbo C for MSDOS
|
||||
# $Id: makefile.tc,v 1.3 1996-09-28 18:17:08 dfs Exp $
|
||||
|
||||
CC= tcc
|
||||
VERSION= 03.00.15
|
||||
|
||||
HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \
|
||||
lang.h english.h german.h dutch.h finnish.h french.h norwgian.h \
|
||||
danish.h polish.h
|
||||
|
||||
STDHDRS= config.h types.h protos.h globals.h err.h lang.h
|
||||
|
||||
LANGHDRS= english.h german.h dutch.h finnish.h french.h norwgian.h danish.h \
|
||||
polish.h
|
||||
|
||||
SRCS= calendar.c dorem.c dosubst.c expr.c files.c funcs.c globals.c init.c \
|
||||
moon.c main.c omit.c sort.c token.c trigger.c userfns.c utils.c var.c hbcal.c
|
||||
|
||||
OBJS=calendar.obj dorem.obj dosubst.obj expr.obj files.obj funcs.obj \
|
||||
globals.obj init.obj main.obj omit.obj sort.obj token.obj trigger.obj \
|
||||
utils.obj userfns.obj var.obj hbcal.obj
|
||||
|
||||
all: remind.exe rem2ps.exe
|
||||
|
||||
remind.exe: $(OBJS)
|
||||
$(CC) @lnk.tc
|
||||
|
||||
rem2ps.exe: rem2ps.obj
|
||||
$(CC) -erem2ps.exe rem2ps.obj
|
||||
|
||||
.c.obj:
|
||||
$(CC) -w-pia -c -O -mm {$< }
|
||||
|
||||
rem2ps.obj: rem2ps.c rem2ps.h config.h lang.h
|
||||
|
||||
calendar.obj: calendar.c $(STDHDRS) expr.h
|
||||
|
||||
dorem.obj: dorem.c $(STDHDRS) expr.h
|
||||
|
||||
dosubst.obj: dosubst.c $(STDHDRS) $(LANGHDRS)
|
||||
|
||||
expr.obj: expr.c $(STDHDRS) expr.h
|
||||
|
||||
files.obj: files.c $(STDHDRS)
|
||||
|
||||
funcs.obj: funcs.c $(STDHDRS) expr.h version.h
|
||||
|
||||
globals.obj: globals.c config.h types.h globals.h err.h lang.h
|
||||
|
||||
init.obj: init.c $(STDHDRS) expr.h version.h
|
||||
|
||||
main.obj: main.c $(STDHDRS) expr.h
|
||||
|
||||
moon.obj: moon.c $(STDHDRS) expr.h
|
||||
|
||||
omit.obj: omit.c $(STDHDRS)
|
||||
|
||||
sort.obj: sort.c $(STDHDRS)
|
||||
|
||||
token.obj: token.c $(STDHDRS)
|
||||
|
||||
trigger.obj: trigger.c $(STDHDRS) expr.h
|
||||
|
||||
userfns.obj: userfns.c $(STDHDRS) expr.h
|
||||
|
||||
utils.obj: utils.c $(STDHDRS)
|
||||
|
||||
var.obj: var.c $(STDHDRS) expr.h
|
||||
22
man/rem.1.in
Normal file
22
man/rem.1.in
Normal file
@@ -0,0 +1,22 @@
|
||||
.TH REM 1 "@RELEASE_DATE@" "User Commands" "VERSION @VERSION@"
|
||||
.UC 4
|
||||
.SH NAME
|
||||
rem \- Invoke Remind with a default filename
|
||||
.SH SYNOPSIS
|
||||
.B rem [\fIoptions\fR] [\fIdate\fR] [\fI*rep\fR] [\fItime\fR]
|
||||
.SH DESCRIPTION
|
||||
\fBrem\fR is a symbolic link to \fBremind\fR. When \fBremind\fR
|
||||
determines that it has been invoked as \fBrem\fR, it uses a default
|
||||
filename rather than expecting a filename to be supplied on the command
|
||||
line.
|
||||
.PP
|
||||
If the environment variable DOTREMINDERS is set, \fBremind\fR uses the
|
||||
value of DOTREMINDERS as the filename. Otherwise, \fBremind\fR uses
|
||||
the filename $HOME/.reminders
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
Remind was written by Dianne Skoll <dianne@skoll.ca>
|
||||
.SH HOME PAGE
|
||||
https://dianne.skoll.ca/projects/remind/
|
||||
.SH SEE ALSO
|
||||
\fBremind\fR(1)
|
||||
693
man/rem2ps.1.in
Normal file
693
man/rem2ps.1.in
Normal file
@@ -0,0 +1,693 @@
|
||||
.TH REM2PS 1 "@RELEASE_DATE@" "User Commands" "VERSION @VERSION@"
|
||||
.UC 4
|
||||
.SH NAME
|
||||
rem2ps \- draw a PostScript calendar from Remind output
|
||||
.SH SYNOPSIS
|
||||
.B rem2ps [\fIoptions\fR]
|
||||
.SH DESCRIPTION
|
||||
\fBRem2ps\fR reads the standard input, which should be the results of
|
||||
running \fBRemind\fR with the \fB\-p\fR or \fB\-pp\fR option. It
|
||||
emits PostScript code (which draws a calendar) to the standard output.
|
||||
.PP
|
||||
See the section "Rem2PS Input Format" for details about the \fB\-p\fR
|
||||
data. This may be useful if you wish to create other \fBRemind\fR
|
||||
back-ends.
|
||||
.PP
|
||||
Note that \fBRem2PS\fR does not handle UTF-8 input. If you need to
|
||||
render characters outside the ASCII character set, see
|
||||
\fBrem2pdf\fR instead.
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-v
|
||||
Be more verbose. This causes \fBRem2ps\fR to print progress messages
|
||||
to the standard error stream. Normally, it is silent.
|
||||
.TP
|
||||
.B \-p file
|
||||
Include the contents of \fIfile\fR in the PostScript prologue. This
|
||||
allows you to define procedures, variables etc. which can be used
|
||||
by the \fBPS\fR and \fBPSFILE\fR reminders. You should not
|
||||
include any document structuring comments in your prologue.
|
||||
.TP
|
||||
.B \-l
|
||||
Produce the calendar in landscape mode rather than the default
|
||||
portrait mode.
|
||||
.TP
|
||||
.B \-x
|
||||
When printing the calendar, place the day numbers in the top-left of each
|
||||
day's box. If this option is omitted, the day numbers appear in the
|
||||
top-right.
|
||||
.TP
|
||||
\fB\-c\fR[\fIn\fR]
|
||||
If \fIn\fR is omitted, disables the small calendars for next and previous
|
||||
months which are normally generated. If \fIn\fR is supplied, it can range
|
||||
from 0 to 3, with the following meanings:
|
||||
.RS
|
||||
.TP
|
||||
.B 0
|
||||
Disable small calendars
|
||||
.TP
|
||||
.B 1
|
||||
Place the small calendars at the bottom-right if there is room; otherwise,
|
||||
place them at the top-left.
|
||||
.TP
|
||||
.B 2
|
||||
Place the small calendars at the top-left if there is room; otherwise,
|
||||
place them at the bottom-right.
|
||||
.TP
|
||||
.B 3
|
||||
Place the previous month's small calendar at the top-left and the next
|
||||
month's at the bottom-right if there is room; otherwise, follow \fIn\fR=1.
|
||||
A moment's thought reveals that an option which splits the calendars if
|
||||
there is room and otherwise follows \fIn\fR=2 yields the same results as
|
||||
\fIn\fR=3.
|
||||
.RE
|
||||
.TP
|
||||
.B \-i
|
||||
Use ISO 8859-1 standard encoding for the PostScript fonts. If you do
|
||||
not use this option, the default encoding is used. If you use this option,
|
||||
you probably also need to convert Remind's output (typically UTF-8)
|
||||
to ISO-8859-1 using \fBiconv\fR(1).
|
||||
.TP
|
||||
.B \-e
|
||||
Make the calendar fill the entire page. By default, the calendar is
|
||||
slightly smaller than the page. This allows days with many reminders
|
||||
to "expand" as needed. However, if you don't have days which expand,
|
||||
you can use this option to make all of the boxes slightly bigger.
|
||||
One caveat: If you do use the \fB\-e\fR option and one day has many
|
||||
reminders, the calendar may expand off the page, losing some information.
|
||||
Experiment!
|
||||
.TP
|
||||
.B \-m media
|
||||
Set the page size. If you use the \-m option, you must specify the
|
||||
media type, which can be one of the
|
||||
following. (Sizes are approximate.)
|
||||
.RS
|
||||
.TP
|
||||
Letter
|
||||
8.5 x 11 in.
|
||||
.TP
|
||||
Legal
|
||||
8.5 x 14 in.
|
||||
.TP
|
||||
Ledger
|
||||
11 x 17 in.
|
||||
.TP
|
||||
Statement
|
||||
5.5 x 8.5 in.
|
||||
.TP
|
||||
Executive
|
||||
7.5 x 10 in.
|
||||
.TP
|
||||
A3
|
||||
29.7 x 42 cm.
|
||||
.TP
|
||||
A4
|
||||
21 x 29.7 cm.
|
||||
.TP
|
||||
A5
|
||||
14.8 x 21 cm.
|
||||
.TP
|
||||
B4
|
||||
25.7 x 36.4 cm.
|
||||
.TP
|
||||
B5
|
||||
18.3 x 25.7 cm.
|
||||
.TP
|
||||
Folio
|
||||
8.5 x 13 in.
|
||||
.TP
|
||||
Quarto
|
||||
8.5 x 10.8 in.
|
||||
.TP
|
||||
10x14
|
||||
10 x 14 in.
|
||||
.TP
|
||||
\fIX\fRx\fIY\fRin
|
||||
\fIX\fR by \fIY\fR inches, where \fIX\fR and \fIY\fR can be floating-point
|
||||
numbers.
|
||||
.TP
|
||||
\fIX\fRx\fIY\fRcm
|
||||
\fIX\fR by \fIY\fR centimetres, where \fIX\fR and \fIY\fR can be floating-point
|
||||
numbers.
|
||||
|
||||
.PP
|
||||
Type "rem2ps \-m help" for a list of available media. Note that the media
|
||||
type (and all \fBRem2ps\fR options) are case-sensitive. If you don't use
|
||||
the \fB\-m\fR option, the media defaults to a compiled-in default - this
|
||||
is usually Letter for North America and A4 for Europe. The "\-m help"
|
||||
option will display the compiled-in default.
|
||||
.RE
|
||||
.TP
|
||||
\fB\-f\fR[\fBtshed\fR] \fIfont\fR
|
||||
Set the font for the calendar title,
|
||||
the small calendars, the day-of-week headings, the calendar
|
||||
entries, and the day numbers, respectively. \fIFont\fR must be the
|
||||
name of a valid PostScript font. The default fonts are equivalent to
|
||||
specifying:
|
||||
.RS
|
||||
.PP
|
||||
.nf
|
||||
\-ftshe Helvetica \-fd Helvetica-BoldOblique
|
||||
.fi
|
||||
.PP
|
||||
In other words, the heading, entry and small-calendar fonts are set
|
||||
to Helvetica, and the font for the day numbers is set to
|
||||
Helvetica-BoldOblique.
|
||||
.RE
|
||||
.TP
|
||||
\fB\-s\fR[\fBthed\fR] \fIsize\fR
|
||||
Set the size (in points) of the text for the the calendar title,
|
||||
day-of-week headings, the calendar entries, and the day numbers,
|
||||
respectively. \fISize\fR must be a decimal number. The default sizes
|
||||
are equivalent to specifying:
|
||||
.RS
|
||||
.PP
|
||||
.nf
|
||||
\-sthd 14 \-se 8
|
||||
.fi
|
||||
.PP
|
||||
In other words, the heading and day numbers are 14-point fonts, and the
|
||||
calendar entries are printed in 8-point text.
|
||||
.RE
|
||||
.TP
|
||||
\fB\-b\fR \fIsize\fR
|
||||
Set the size of the blank white border in each calendar box to \fIsize\fR
|
||||
points. The default border size is 6 points, or 1/12 in.
|
||||
.TP
|
||||
\fB\-t\fR \fIsize\fR
|
||||
Set the thickness of the black calendar grid lines. The default is 1,
|
||||
for a line thickness of one point (1/72 in.)
|
||||
.TP
|
||||
\fB\-o\fR[\fBlrtb\fR] \fIsize\fR
|
||||
Set the left, right, top, and/or bottom margins to \fIsize\fR points.
|
||||
For this option only, \fIsize\fR must be an integer. It represents the
|
||||
margin size in units of 1/72 in. The default margin sizes are 36, for
|
||||
half-inch margins. If you wish to punch holes in the calendar page to insert
|
||||
it into a binder, you may wish to increase the left margin to one inch.
|
||||
In that case, you should also decrease the heading font size to 12 points
|
||||
for good output:
|
||||
.PP
|
||||
.nf
|
||||
# This gives good results for putting into a binder
|
||||
rem2ps \-ol 72 \-sh 12
|
||||
.fi
|
||||
.SH USAGE
|
||||
To use \fBRem2ps\fR, you should pipe the output of \fBRemind\fR with the \fB\-p\fR
|
||||
option to \fBRem2ps\fR, and then send the result to a printer. This is most easily
|
||||
illustrated with examples:
|
||||
.PP
|
||||
.nf
|
||||
remind \-p12 /dev/null 1 jan 1994 | rem2ps | lpr \-Plaser
|
||||
.fi
|
||||
.PP
|
||||
That example creates a blank calendar for the entire year of 1994, and
|
||||
sends it the the printer named "laser."
|
||||
.PP
|
||||
.nf
|
||||
remind \-p ~/.reminders | rem2ps \-l \-sd 18 > cal.ps
|
||||
.fi
|
||||
.PP
|
||||
This reminder creates a calendar for the current month, filling in
|
||||
entries from the reminder file "~/.reminders." The calendar is produced
|
||||
in landscape mode, with a font size of 18 for the day numbers. The result
|
||||
is put in the PostScript file "cal.ps."
|
||||
.PP
|
||||
.SH VARIABLES AVAILABLE TO USER-SUPPLIED POSTSCRIPT CODE
|
||||
.PP
|
||||
The following variables are available to \fBPS\fR and
|
||||
\fBPSFILE\fR-type reminders. (This material is duplicated
|
||||
in the \fBRemind\fR manual page.)
|
||||
.TP
|
||||
LineWidth
|
||||
The width of the black grid lines making up the calendar.
|
||||
.TP
|
||||
Border
|
||||
The border between the center of the grid lines and the space used to print
|
||||
calendar entries. This border is normally blank space.
|
||||
.TP
|
||||
BoxWidth and BoxHeight
|
||||
The width and height of the calendar box, from center-to-center of the
|
||||
black gridlines.
|
||||
.TP
|
||||
InBoxHeight
|
||||
The height from the center of the bottom black gridline to the top
|
||||
of the regular calendar entry area. The space from here to the top
|
||||
of the box is used only to draw the day number.
|
||||
.TP
|
||||
/DayFont, /TitleFont, /EntryFont, /SmallFont and /HeadFont
|
||||
The fonts used to draw the day numbers, the month and year title,
|
||||
the calendar entries, the small
|
||||
calendars, and the day-of-week headings, respectively.
|
||||
.TP
|
||||
DaySize, TitleSize, EntrySize and HeadSize
|
||||
The sizes of the above fonts. (The size of the small calendar font
|
||||
is \fInot\fR defined here.) For example, if you wanted to print
|
||||
the Hebrew date next to the regular day number in the calendar, use:
|
||||
.PP
|
||||
.nf
|
||||
REM PS Border BoxHeight Border sub DaySize sub moveto \\
|
||||
/DayFont findfont DaySize scalefont setfont \\
|
||||
([hebday(today())] [hebmon(today())]) show
|
||||
.fi
|
||||
.PP
|
||||
.RS
|
||||
Note how /DayFont and DaySize are used.
|
||||
.RE
|
||||
.PP
|
||||
Note that if you supply PostScript code, it is possible to produce invalid
|
||||
PostScript files. Always test your PostScript thoroughly with a PostScript
|
||||
viewer before sending it to the printer. You should not use any document
|
||||
structuring comments in your PostScript code.
|
||||
.PP
|
||||
In addition, prior to drawing a calendar page, \fBRem2ps\fR emits
|
||||
the following PostScript code:
|
||||
.PP
|
||||
.nf
|
||||
save (mon) (yr) PreCal restore
|
||||
.fi
|
||||
.PP
|
||||
where \fImon\fR and \fIyr\fR are the month and year of the calendar
|
||||
page. The default \fBPreCal\fR procedure simply pops
|
||||
the arguments and does nothing. However, you can define a \fBPreCal\fR
|
||||
function in your prologue file to do whatever you want - it can draw a
|
||||
background for the entire calendar, for instance.
|
||||
.PP
|
||||
In the context of the \fBPreCal\fR procedure, the following conditions
|
||||
hold:
|
||||
.TP
|
||||
o
|
||||
The PostScript origin is at the bottom left-hand corner of the page, and
|
||||
PostScript units of 1/72 inch are in effect.
|
||||
.TP
|
||||
o
|
||||
The variables MinX, MinY, MaxX and MaxY define the bounding box within
|
||||
which the calendar will be drawn.
|
||||
.TP
|
||||
o
|
||||
The font and font-size variables, as well as Border and LineWidth described
|
||||
previously, are valid.
|
||||
.PP
|
||||
For an example, create a file called "myprolog" whose contents are:
|
||||
.PP
|
||||
.nf
|
||||
/PreCal {
|
||||
/yr exch def
|
||||
/mon exch def
|
||||
/xsiz1 MaxX MinX sub def
|
||||
/ysiz1 MaxY MinY sub def
|
||||
/xsiz xsiz1 MinX sub MinX sub def
|
||||
/ysiz ysiz1 MinY sub MinY sub def
|
||||
xsiz
|
||||
ysiz
|
||||
lt
|
||||
{/len xsiz 1.41 mul def
|
||||
MinX MinX add ysiz1 xsiz1 sub 2 div MinY add MinY add moveto}
|
||||
{/len ysiz 1.41 mul def
|
||||
xsiz1 ysiz1 sub 2 div MinX add MinX add MinY MinY add moveto}
|
||||
ifelse
|
||||
/Helvetica-Bold findfont 1 scalefont setfont
|
||||
mon stringwidth pop
|
||||
( ) stringwidth pop add
|
||||
yr stringwidth pop add
|
||||
len exch div /len exch def
|
||||
/Helvetica-Bold findfont len scalefont setfont
|
||||
0.95 setgray
|
||||
45 rotate
|
||||
mon show
|
||||
( ) show
|
||||
yr show
|
||||
} bind def
|
||||
.fi
|
||||
.PP
|
||||
Use that file with the \fBRem2ps\fR \fB\-p\fR option to create calendars
|
||||
with the year and month in large grey letters in the background of the
|
||||
calendar.
|
||||
.PP
|
||||
.SH REM2PS INPUT FORMAT (-P OPTION)
|
||||
The \fB\-p\fR option is an older, simpler interchange format used by
|
||||
\fBRemind\fR to communicate with back-ends. New back-ends are
|
||||
encouraged to support the new \fB\-pp\fR format preferably, though they
|
||||
are encouraged to support the older \fB\-p\fR format as well if the
|
||||
older format contains enough information for them to work properly.
|
||||
.PP
|
||||
\fBRemind \-p\fR sends the following lines to standard output.
|
||||
The information is designed to be easily parsed by back-end programs:
|
||||
.TP
|
||||
.B # rem2ps begin
|
||||
This line signifies the start of calendar data. Back-ends can search
|
||||
for it to verify they are being fed correct information.
|
||||
.TP
|
||||
\fImonth_name year num_days first_day monday_first\fR
|
||||
On this line, \fImonth_name\fR is the name of the month whose calendar
|
||||
information is about to follow. \fInum_days\fR is the number of days
|
||||
in this month. \fIfirst_day\fR is the weekday of the first day of the
|
||||
month (0 = Sunday, 1 = Monday, 6 = Saturday.) And \fImonday_first\fR is
|
||||
1 if the \fB\-m\fR flag was supplied to \fBRemind\fR, or 0 if it was not.
|
||||
All this information is supplied so back-ends don't need any date calculation
|
||||
facilities.
|
||||
|
||||
Note that all spaces in \fImonth_name\fR will be replaced with
|
||||
underscores. Back-ends should undo this replacement.
|
||||
|
||||
.TP
|
||||
\fIsun mon tue wed thu fri sat\fR
|
||||
This line consists of
|
||||
space-separated names of days in whatever language \fBRemind\fR was
|
||||
compiled for. This information can be used by back-ends to annotate
|
||||
calendars, and means they don't have to be created for a specific
|
||||
language.
|
||||
|
||||
Note that all spaces in day names will be replaced with
|
||||
underscores. Back-ends should undo this replacement.
|
||||
.TP
|
||||
\fInext_mon next_days\fR
|
||||
The name of the next month and the number of days in it.
|
||||
.TP
|
||||
\fIprev_mon prev_days\fR
|
||||
The name of the previous month and the number of days in it. The
|
||||
\fInext_mon\fR and \fIprev_mon\fR lines could be used to generate small
|
||||
inset calendars for the next and previous months.
|
||||
.PP
|
||||
The remaining data consists of calendar entries, in the following format:
|
||||
.PP
|
||||
\fIyyyy/mm/dd special tag dur time body\fR
|
||||
.PP
|
||||
Here, \fIyyyy\fR is the year, \fImm\fR is the month (01-12) and
|
||||
\fIdd\fR is the day of the month. Note that the date components are
|
||||
always separated by "/" even if the date separator in \fBRemind\fR has
|
||||
been set to "-". The consistent use of "/" is designed to ease parsing.
|
||||
.PP
|
||||
\fIspecial\fR is a string used
|
||||
for "out-of-band" communication with back-ends. If the reminder
|
||||
is a normal reminder, \fIspecial\fR is "*". The \fBRem2PS\fR
|
||||
back-end understands the specials \fBPostScript\fR and \fBPSFile\fR.
|
||||
Other back-ends may understand other specials. A back end should
|
||||
\fIsilently ignore\fR a reminder with a special it doesn't understand.
|
||||
.PP
|
||||
\fItag\fR is whatever tag the user provided with the \fBTAG\fR clause,
|
||||
or "*" if no tag was provided. If there is more than one \fBTAG\fR clause,
|
||||
the tags appear in a comma-separated list. For example, the command
|
||||
\fBREM TAG foo TAG bar TAG quux\fR would result in \fBfoo,bar,quux\fR
|
||||
in the \fItag\fR field.
|
||||
.PP
|
||||
\fIdur\fR is the \fBDURATION\fR value in minutes, or "*" if no duration
|
||||
was provided.
|
||||
.PP
|
||||
\fItime\fR is the time of the reminder in minutes past midnight, or
|
||||
"*" if the reminder was not a timed reminder.
|
||||
.PP
|
||||
\fIbody\fR is the body of the reminder.
|
||||
.PP
|
||||
Future versions of \fBRemind\fR may add additional keys to the JSON
|
||||
object. Back-ends \fImust\fR ignore keys they don't recognize.
|
||||
.PP
|
||||
After a month's worth of reminders have been emitted, \fBRemind\fR
|
||||
emits the line:
|
||||
.PP
|
||||
\fB# rem2ps end
|
||||
.PP
|
||||
However, back-ends should keep reading until EOF in case more data for
|
||||
subsequent months is forthcoming.
|
||||
.PP
|
||||
If you supply the \fB\-l\fR option to \fBremind\fR, then reminders
|
||||
may be preceded by a line that looks like this:
|
||||
.PP
|
||||
\fB# fileinfo \fIlineno filename\fR
|
||||
.PP
|
||||
The word \fBfileinfo\fR is literal; \fIlineno\fR and \fIfilename\fR specify
|
||||
the line number and file name of the file containing the reminder. Back-ends
|
||||
that don't care about this information should ignore lines starting with
|
||||
"#" (except, of course, for the # rem2ps lines.)
|
||||
.PP
|
||||
.SH REM2PS PARTIAL JSON INPUT FORMAT (-PP OPTION)
|
||||
\fBRemind \-pp\fR sends the following lines to standard output. They
|
||||
are designed to be easily parsed, but contain much more information
|
||||
than the old-style \fBremind -p\fR output. The extra information
|
||||
contains a representation of the parsed "REM" statement, which could
|
||||
allow converters to better preserve semantics of a reminder. For
|
||||
example, this format passes enough information to allow a back-end to
|
||||
(in many cases) determine a reminder's recurrence rather than just treating
|
||||
each reminder as a one-off event.
|
||||
.PP
|
||||
The lines emitted by \fBremind \-pp\fR are as follows:
|
||||
.TP
|
||||
.B # rem2ps2 begin
|
||||
This line signifies the start of calendar data. Back-ends can search
|
||||
for it to verify they are being fed correct information. Note the
|
||||
"2" after "rem2ps", which distinguishes this format from the older \fB\-p\fR
|
||||
format.
|
||||
.TP
|
||||
\fImonth_name year num_days first_day monday_first\fR
|
||||
Same as the \fB\-p\fR format
|
||||
.TP
|
||||
\fIsun mon tue wed thu fri sat\fR
|
||||
Same as the \fB\-p\fR format
|
||||
.TP
|
||||
\fInext_mon next_days\fR
|
||||
Same as the \fB\-p\fR format
|
||||
.TP
|
||||
\fIprev_mon prev_days\fR
|
||||
Same as the \fB\-p\fR format
|
||||
.PP
|
||||
.B CALENDAR ENTRIES
|
||||
.PP
|
||||
The remaining data consists of calendar entries expressed as a JSON object
|
||||
on a single line. Each such line will begin with "{" and will be a well-formed
|
||||
JSON object. The keys that may be present in the JSON object are as
|
||||
follows:
|
||||
.TP
|
||||
.B date \fIYYYY-MM-DD\fR
|
||||
The \fBdate\fR key will \fIalways\fR be present; it is the trigger date
|
||||
of the reminder expressed as a string in the format \fIYYYY-MM-DD\fR
|
||||
.TP
|
||||
.B filename \fIf\fR
|
||||
The filename in which the reminder was found.
|
||||
.TP
|
||||
.B lineno \fIn\fR
|
||||
The line number within the file on which the reminder was found.
|
||||
.TP
|
||||
.B nonconst_expr 1
|
||||
If the reminder contained a non-constant expression that had to be evaluated
|
||||
to determine the trigger date, this key will be present with the value 1.
|
||||
If this key is present, then it is unsafe for a back-end to rely on
|
||||
recurrence semantics or even the semantics of any part of the parsed
|
||||
reminder, as they may have been computed in a way that cannot be expressed
|
||||
in JSON.
|
||||
.TP
|
||||
.B if_depth \fIn\fR
|
||||
If the reminder is inside one or more IF or ELSE statements, this key
|
||||
will be present and the value will be the number of nested IFs from
|
||||
the top-level to the reminder. Back-ends should be wary of
|
||||
interpreting recurrence semantics of reminders within an IF or ELSE
|
||||
block.
|
||||
.TP
|
||||
.B passthru \fIspecial\fR
|
||||
If the reminder was a SPECIAL reminder, the \fBpassthru\fR key will be
|
||||
present and the value will be the type of SPECIAL (such as SHADE, COLOR,
|
||||
MOON, etc.)
|
||||
.TP
|
||||
.B tags \fIdata\fR
|
||||
If any TAG clauses are present, the \fBtags\fR key will be present and consist
|
||||
of a comma-separated list of tags.
|
||||
.TP
|
||||
.B time \fIt\fR
|
||||
If an AT clause was present, this key will contain the time of the AT clause
|
||||
in minutes after midnight.
|
||||
.TP
|
||||
.B tdelta \fIn\fR
|
||||
If a time delta (+n after an AT clause) was present, this key contains the
|
||||
delta value in minutes.
|
||||
.TP
|
||||
.B trep \fIn\fR
|
||||
If a time repeat (*n after an AT clause) was present, this key contains the
|
||||
repeat value in minutes.
|
||||
.TP
|
||||
.B eventduration \fIn\fR
|
||||
If a DURATION clause was present, this key contains the event duration in
|
||||
minutes.
|
||||
.TP
|
||||
.B duration \fIn\fR
|
||||
If a DURATION clause was present, this key contains today's duration in
|
||||
minutes. See the \fBremind(1)\fR man page, "MULTI-DAY EVENTS", for a
|
||||
discussion of duration vs. event duration.
|
||||
.TP
|
||||
.B eventstart \fIdt\fR
|
||||
If an AT clause was present, this key contains the event start time in
|
||||
the format \fIYYYY-MM-DDTHH:MM\fR.
|
||||
.TP
|
||||
.B back \fIn\fR
|
||||
If the reminder contained a "back" clause (\-n or \-\-n), this key
|
||||
contains the back value. If the "back" value was \-n, the value will
|
||||
be positive; if it was \-\-n, the value will be negative.
|
||||
.TP
|
||||
.B delta \fIn\fR
|
||||
If the reminder contained a "delta" clause (\+n or \+\+n), this key
|
||||
contains the delta value. If the "delta" value was \+n, the value will
|
||||
be positive; if it was \+\+n, the value will be negative.
|
||||
.TP
|
||||
.B rep \fIn\fR
|
||||
If the reminder contained a "repeat" clause (*n), this key contains
|
||||
the repeat value.
|
||||
.TP
|
||||
.B skip \fItype\fR
|
||||
If the reminder contained a SKIP, BEFORE or AFTER keyword, then this
|
||||
key will contain that keyword.
|
||||
.TP
|
||||
.B localomit \fIarray\fR
|
||||
If the reminder contains a local OMIT keyword, this key will be present.
|
||||
Its value will be an array of English day names that are OMITted.
|
||||
.TP
|
||||
.B wd \fIarray\fR
|
||||
If the reminder contains one or more weekdays, this key will be present.
|
||||
Its value will be an array of English day names that are present.
|
||||
.TP
|
||||
.B d \fIn\fR
|
||||
If a day-of-month is present in the reminder specification, this key
|
||||
will be present and its value will be the day number.
|
||||
.TP
|
||||
.B m \fIn\fR
|
||||
If a month is present in the reminder specification, this key
|
||||
will be present and its value will be the month number.
|
||||
.TP
|
||||
.B y \fIn\fR
|
||||
If a year is present in the reminder specification, this key
|
||||
will be present and its value will be the year.
|
||||
.TP
|
||||
.B until \fIYYYY-MM-DD\fR
|
||||
If the reminder contains an UNTIL or THROUGH clause, this key
|
||||
will be present. Its value will be a string of the form YYYY-MM-DD.
|
||||
.TP
|
||||
.B once 1
|
||||
If the reminder contains a ONCE keyword, this key will be present
|
||||
with a value of 1.
|
||||
.TP
|
||||
.B scanfrom \fIYYYY-MM-DD\fR
|
||||
If the reminder contains a SCANFROM keyword, this key will be present
|
||||
and its value will be a string of the form YYYY-MM-DD.
|
||||
.TP
|
||||
.B from \fIYYYY-MM-DD\fR
|
||||
If the reminder contains a FROM keyword, this key will be present
|
||||
and its value will be a string of the form YYYY-MM-DD.
|
||||
.TP
|
||||
.B priority \fIn\fR
|
||||
The priority of the reminder. Always present; if no PRIORITY keyword
|
||||
is specified, then a reminder has a default priority of 5000.
|
||||
.TP
|
||||
.B r \fIn\fR
|
||||
For a SHADE or COLOR special, the red color component.
|
||||
.TP
|
||||
.B g \fIn\fR
|
||||
For a SHADE or COLOR special, the green color component.
|
||||
.TP
|
||||
.B b \fIn\fR
|
||||
For a SHADE or COLOR special, the blue color component.
|
||||
.TP
|
||||
.B body \fIbody\fR
|
||||
The body of the reminder to issue. Always present.
|
||||
.TP
|
||||
.B calendar_body \fIbody\fR
|
||||
The text appropriate to include in a calendar. Only present if the
|
||||
original body contains %"...%" sequences and the "q" modifier was used
|
||||
with Remind's "-pp..." flag.
|
||||
.TP
|
||||
.B plain_body \fIbody\fR
|
||||
The "plain" body of the reminder with any %"...%" sequences removed.
|
||||
If your back-end is designed to draw a calendar, then it should
|
||||
use the \fBcalendar_body\fR if present. If not, then it
|
||||
should use the \fBplain_body\fR if present, and if not, then it
|
||||
should fall back on the \fBbody\fR.
|
||||
.TP
|
||||
.B rawbody \fIraw\fR
|
||||
The "raw" body of the reminder, before any expression-pasting or
|
||||
substitution-sequence processing. If the raw body would be the same
|
||||
as the processed body, then this key is not present.
|
||||
.PP
|
||||
After a month's worth of reminders have been emitted, \fBRemind\fR
|
||||
emits the line:
|
||||
.PP
|
||||
\fB# rem2ps2 end
|
||||
.PP
|
||||
However, back-ends should keep reading until EOF in case more data for
|
||||
subsequent months is forthcoming.
|
||||
.PP
|
||||
|
||||
.SH REM2PS PURE JSON INPUT FORMAT (-PPP OPTION)
|
||||
\fBRemind \-ppp\fR emits \fIpure JSON\fR output. The format is
|
||||
as follows:
|
||||
.PP
|
||||
\fBRemind\fR outputs a JSON array. Each element of the array is a
|
||||
\fImonth descriptor\fR.
|
||||
.PP
|
||||
Each month descriptor is a JSON object with the following elements:
|
||||
.TP
|
||||
.B monthname \fIname\fR
|
||||
The name of the month.
|
||||
.TP
|
||||
.B year \fIyyyy\fR
|
||||
The year.
|
||||
.TP
|
||||
.B daysinmonnth \fIn\fR
|
||||
The number of days in the current month.
|
||||
.TP
|
||||
.B firstwkday \fIn\fR
|
||||
The weekday of the first day of the month (0 = Sunday, 1 = Monday, 6 = Saturday).
|
||||
.TP
|
||||
.B mondayfirst \fIn\fR
|
||||
An indicator of whether or not the calendar week should start with
|
||||
Sunday (n=0) or Monday (n=1).
|
||||
.TP
|
||||
.B daynames \fR[\fIdays\fR]
|
||||
A seven-element array of day names; each element is a string representing
|
||||
the names of the days from Sunday through Saturday.
|
||||
.TP
|
||||
.B prevmonthname \fIname\fR
|
||||
The name of the previous month.
|
||||
.TP
|
||||
.B daysinprevmonth \fIn\fR
|
||||
The number of days in the previous month.
|
||||
.TP
|
||||
.B prevmonthyear \fIyyyy\fR
|
||||
The year of the previous month. (The same as \fByear\fR unless the current
|
||||
month is January.)
|
||||
.TP
|
||||
.B nextmonthname \fIname\fR
|
||||
The name of the following month.
|
||||
.TP
|
||||
.B daysinnextmonth \fIn\fR
|
||||
The number of days in the following month.
|
||||
.TP
|
||||
.B nextmonthyear \fIyyyy\fR
|
||||
The year of the following month. (The same as \fByear\fR unless the
|
||||
current month is December.)
|
||||
.TP
|
||||
.B entries \fR[\fIarray\fR]
|
||||
The \fBentries\fR key consists of an array of calendar entries; each
|
||||
entry is a JSON object that has the same format as described in the
|
||||
\fBCALENDAR ENTRIES\fR section in the \fB\-PP FORMAT\fR section,
|
||||
\fIwith the following difference\fR: In \fB\-PP\fR mode, if a reminder
|
||||
has \fB%"\fR markers, only the text between the markers
|
||||
is included in the \fBbody\fR element. In \fB\-PPP\fR mode, the
|
||||
entire text \fIincluding\fR the \fB%"\fR markers is included and it's up to
|
||||
the back-end to extract the portion between the markers if that
|
||||
is desired.
|
||||
|
||||
|
||||
.SH AUTHOR
|
||||
Rem2PS was written by Dianne Skoll <dianne@skoll.ca>
|
||||
.SH BUGS
|
||||
All \fBRem2ps\fR options are case-sensitive, unlike \fBRemind\fR.
|
||||
Any time you supply
|
||||
a font name or size, line thickness, or border width, it is treated as a
|
||||
string and sent straight to the PostScript interpreter. Thus, if you
|
||||
supply invalid fonts or sizes, \fBRem2ps\fR will not complain, but the
|
||||
resulting PostScript output will probably not work.
|
||||
.PP
|
||||
You should ensure that the values you supply for margin widths are sensible.
|
||||
If they are too big for the media size, \fBRem2ps\fR will not complain,
|
||||
but again, the PostScript output will probably not work.
|
||||
.SH HOME PAGE
|
||||
https://dianne.skoll.ca/projects/remind/
|
||||
.SH SEE ALSO
|
||||
\fBremind\fR, \fBrem2pdf\fR, \fBrem2html\fR, \fBtkremind\fR.
|
||||
|
||||
5960
man/remind.1.in
Normal file
5960
man/remind.1.in
Normal file
File diff suppressed because it is too large
Load Diff
454
man/tkremind.1.in
Normal file
454
man/tkremind.1.in
Normal file
@@ -0,0 +1,454 @@
|
||||
.TH TKREMIND 1 "@RELEASE_DATE@" "User Commands" "VERSION @VERSION@"
|
||||
.UC 4
|
||||
.SH NAME
|
||||
tkremind \- graphical front-end to Remind calendar program
|
||||
.SH SYNOPSIS
|
||||
.B tkremind \fR[\fIoptions\fR] [\fIread_file\fR [\fIwrite_file\fR [\fIconfig_file\fR]]]
|
||||
.SH DESCRIPTION
|
||||
\fBTkRemind\fR is a graphical front-end to the \fBRemind\fR program.
|
||||
It provides a friendly graphical interface which allows you to view
|
||||
your calendar and add reminders without learning the syntax of \fBRemind\fR.
|
||||
Although not all of \fBRemind\fR's features are available with \fBTkRemind\fR,
|
||||
\fBTkRemind\fR gives you an opportunity to edit the reminder commands which
|
||||
it creates. This allows you to learn \fBRemind\fR's syntax and then add
|
||||
extra features as you become a more sophisticated \fBRemind\fR programmer.
|
||||
|
||||
\fBTkRemind\fR is written in Tcl, and requires version 8.5 (or higher)
|
||||
as well as the tcllib extension. It also requires a \fBwish\fR
|
||||
binary. If you are using Tcl/Tk 8.5, you may also need either the Img
|
||||
or the tkpng extension to handle PNG images.
|
||||
|
||||
.SH COMMAND-LINE OPTIONS
|
||||
\fBTkRemind\fR itself has no command-line options. However, it passes
|
||||
certain options on to \fBRemind\fR. The options it passes are
|
||||
\fB\-b\fR, \fB\-g\fR, \fB\-x\fR, \fB\-i\fR and \fB\-m\fR. See the
|
||||
\fBRemind\fR man page for details about the options. Note that
|
||||
\fBTkRemind\fR will respect the \fB\-m\fR and \fB\-b1\fR options and
|
||||
adjust its appearance accordingly.
|
||||
|
||||
\fIRead_file\fR is the file from which \fBTkRemind\fR reads reminders.
|
||||
It is in standard \fBRemind\fR format. \fIWrite_file\fR is the file
|
||||
to which \fBTkRemind\fR writes reminders which you add using the GUI.
|
||||
If \fIRead_file\fR is omitted, it defaults to \fB$HOME/.reminders\fR.
|
||||
If \fIWrite_file\fR is omitted, it defaults to \fIRead_file\fR.
|
||||
|
||||
You may wish to have a different \fIWrite_file\fR from \fIRead_file\fR if
|
||||
you want to collect all of \fBTkRemind\fR's reminders in one place. Suppose
|
||||
your main file is \fI$HOME/.reminders\fR and you want \fBTkRemind\fR to put
|
||||
its reminders in \fI$HOME/.tkreminders\fR. In \fI$HOME/.reminders\fR,
|
||||
include the line:
|
||||
.PP
|
||||
.nf
|
||||
INCLUDE [getenv("HOME")]/.tkreminders
|
||||
.fi
|
||||
.PP
|
||||
|
||||
\fIConfig_file\fR is the file in which \fBTkRemind\fR stores
|
||||
its options. If it is omitted, it defaults to \fI$HOME/.config/tkremindrc\fR.
|
||||
|
||||
.PP
|
||||
If \fB$HOME/.reminders\fR is a \fIdirectory\fR, then \fBTkRemind\fR defaults to
|
||||
reading \fB$HOME/.reminders\fR and writing new reminders to
|
||||
\fB$HOME/.reminders/100-tkremind.rem\fR. If you want to keep your
|
||||
reminders in a directory \fB$HOME/.reminders\fR, you should create that
|
||||
directory before starting \fBTkRemind\fR.
|
||||
.SH THE CALENDAR WINDOW
|
||||
When you start \fBTkRemind\fR, it displays a calendar for the current
|
||||
month, with today's date highlighted. Reminders are filled into each
|
||||
box on the calendar. If a box contains many reminders, you can scroll
|
||||
it up and down by dragging mouse button 2 in the box. Note that there
|
||||
is no specific indication of an over-full box; you'll just have to
|
||||
notice that the box appears completely full.
|
||||
|
||||
.SH NAVIGATING
|
||||
To change to the previous or next month, click the \fB<\-\fR
|
||||
or \fB\->\fR button, respectively. You can also use the left/right arrow
|
||||
keys or PageUp/PageDown to navigate.
|
||||
|
||||
To change back to the current month, click \fBToday\fR or press the
|
||||
Home key. To go to a specific month, click \fBGo To Date...\fR. This
|
||||
pops up a dialog box which allows you to select a month and enter a
|
||||
year. Once you've done this, click \fBGo\fR to go to the date, or
|
||||
\fBCancel\fR to cancel.
|
||||
|
||||
To exit \fBTkRemind\fR, click \fBQuit\fR.
|
||||
|
||||
.SH ADDING REMINDERS
|
||||
To add a reminder, click button 1 in any day number in the calendar.
|
||||
The \fBAdd Reminder...\fR dialog will pop up, with values preselected for
|
||||
the day you clicked.
|
||||
|
||||
The dialog has six basic groups of controls. The first three lines
|
||||
select one of three types of reminders. Choose the type of reminder
|
||||
with the radio buttons, and choose the values of the days, months, and
|
||||
years by selecting values from pull-down menus. The pull-down menus
|
||||
appear when you click the raised value buttons.
|
||||
|
||||
The next control specifies an expiry date for the reminder. Select
|
||||
the check button to enable an expiry date, and fill in the values
|
||||
using pull-down menus.
|
||||
|
||||
The third control specifies how much advance notice you want (if any),
|
||||
and whether or not weekends and holidays are counted when computing advance
|
||||
notice.
|
||||
|
||||
The fourth control specifies which days \fBRemind\fR considers
|
||||
as part of the weekend. This can affect the interpretation of "weekday"
|
||||
in the second and third types of reminders.
|
||||
|
||||
The fifth control associates a time with the reminder.
|
||||
You can also specify advance notice, possibly repeating.
|
||||
|
||||
The sixth control specifies what \fBRemind\fR should do if a reminder
|
||||
falls on a holiday or weekend.
|
||||
|
||||
Enter the body of the reminder into the \fBBody:\fR text entry.
|
||||
|
||||
To add the reminder to the reminder file, click \fBAdd to reminder file\fR.
|
||||
To close the dialog without adding the reminder to the file, click
|
||||
\fBCancel\fR. To preview the reminder, click \fBPreview reminder\fR.
|
||||
This pops up the \fBPreview reminder\fR dialog box.
|
||||
|
||||
.SH PREVIEWING REMINDERS
|
||||
The \fBPreview reminder\fR dialog box is an excellent way to learn
|
||||
\fBRemind\fR. It displays the \fBRemind\fR command which realizes the
|
||||
reminder you entered using the \fBAdd Reminder...\fR dialog. You can
|
||||
edit the reminder, thereby gaining access to advanced features of
|
||||
\fBRemind\fR. You can also use it simply to play around and discover
|
||||
\fBRemind\fR's idioms for expressing different types of reminders.
|
||||
|
||||
.SH PRINTING
|
||||
To print the current month's calendar, click \fBPrint...\fR on the
|
||||
main calendar window. This brings up the print dialog. Printing
|
||||
either produces a PostScript file or sends PostScript to a UNIX command.
|
||||
(If you have \fBrem2pdf\fR installed, you can choose to produce
|
||||
PDF output rather than PostScript.)
|
||||
|
||||
Select the print destination by choosing either \fBTo file:\fR or
|
||||
\fBTo command:\fR in the print dialog. Press \fBBrowse...\fR to bring
|
||||
up a file browser. In the file browser, you can enter a filename in
|
||||
the text entry, double-click on a filename in the listbox, or
|
||||
double-click on a directory to navigate the file system. You can also
|
||||
type the first few characters of a file name in the text entry box and
|
||||
press space to complete the name to the first matching entry.
|
||||
|
||||
The \fBMatch:\fR box contains a filename wildcard which filters files
|
||||
in the listbox. You can change the filter and press enter to rescan
|
||||
the directory.
|
||||
|
||||
Select the appropriate paper size and orientation. Activate
|
||||
\fBFill page\fR if you want the calendar to fill the page. This should
|
||||
be the normal case unless you have many reminders in a particular
|
||||
day. (See the \fBRem2PS\fR or \fBrem2pdf\fR documentation.)
|
||||
|
||||
Finally, click \fBPrint\fR to print or \fBCancel\fR to cancel. Note
|
||||
that during printing, \fBRemind\fR is called with the
|
||||
\fB-itkremind=1\fR option and also an additional \fB-itkprint=1\fR
|
||||
option. If you are producing PDF output, then the option \fB-itkpdf=1\fR
|
||||
is also supplied to \fBRemind\fR.
|
||||
|
||||
|
||||
.SH EDITING REMINDERS
|
||||
|
||||
If you created a reminder with \fBTkRemind\fR, it will turn red as the
|
||||
mouse cursor passes over it in the calendar window. Click
|
||||
button-1 over the reminder and you will be presented with a dialog
|
||||
window whose state is identical to the one used to create the reminder.
|
||||
At this point, you can change the reminder by editing the dialog
|
||||
entries and selecting \fBReplace reminder\fR. You can delete the
|
||||
reminder entirely by selecting \fBDelete reminder\fR. The remaining
|
||||
buttons, \fBPreview reminder\fR and \fBCancel\fR operate identically
|
||||
to the dialog in "ADDING REMINDERS."
|
||||
|
||||
Note that if you edit a reminder (using \fBPreview reminder\fR),
|
||||
any edits you made are \fInot\fR retained in the dialog box. You
|
||||
should not attempt to edit such reminders; you have to retype them
|
||||
in the \fBPreview reminder\fR dialog.
|
||||
|
||||
If the reminder was not created with \fBTkRemind\fR, you can't edit
|
||||
it with \fBTkRemind\fR.
|
||||
|
||||
.SH USING A TEXT EDITOR
|
||||
|
||||
If you have set the "text editor" option correctly, right-clicking
|
||||
on a reminder will bring up a text editor on the file containing
|
||||
the reminder. The cursor will be positioned on the line that
|
||||
generated the reminder. In addition, if you have a reminder that
|
||||
is editable with an editor but was not created using \fBTkRemind\fR,
|
||||
it will be underlined when you move the cursor over it, and
|
||||
you can edit it in a text editor by either left- or right-clicking
|
||||
on the reminder.
|
||||
|
||||
.SH ERRORS
|
||||
|
||||
If there are any errors in your reminder file, the "Queue..." button
|
||||
changes to "Errors...". Click on "Errors..." to see the Remind error
|
||||
output. Click "OK" to close the error window; this makes the button
|
||||
in the main TkRemind window to revert to "Queue..."
|
||||
|
||||
.SH BACKGROUND REMINDERS
|
||||
|
||||
If you create "timed" reminders, \fBTkRemind\fR will queue them in
|
||||
the background and pop up boxes as they are triggered. Additionally,
|
||||
if you created the reminder using \fBTkRemind\fR, you will be given the
|
||||
option of "turning off" the reminder for the rest of the day.
|
||||
\fBTkRemind\fR achieves queueing of background reminders by running
|
||||
\fBRemind\fR in \fIserver mode\fR, described later.
|
||||
|
||||
.SH OPTIONS
|
||||
|
||||
The final button on the calendar window, \fBOptions\fR, lets you configure
|
||||
certain aspects of \fBTkRemind\fR. The configuration options are:
|
||||
|
||||
.TP
|
||||
.B Start up Iconified
|
||||
If this is selected, \fBTkRemind\fR starts up iconified. Otherwise,
|
||||
it starts up in a normal window.
|
||||
|
||||
.TP
|
||||
.B Show Today's Reminders on Startup
|
||||
If this is selected, \fBTkRemind\fR shows a text window containing reminders
|
||||
which would be issued by "remind \-q \-a \-r" on startup, and when the date
|
||||
changes at midnight.
|
||||
|
||||
.TP
|
||||
.B Confirm Quit
|
||||
If this is selected, you will be asked to confirm when you press
|
||||
\fBQuit\fR. If not, \fBTkRemind\fR quits without prompting.
|
||||
|
||||
.TP
|
||||
.B Automatically close pop-up reminders after a minute
|
||||
If this is selected, pop-up reminder boxes will be closed after one minute
|
||||
has elapsed. Otherwise, they remain on your screen forever until you
|
||||
explicitly dismiss them.
|
||||
|
||||
.TP
|
||||
.B Beep terminal when popping up a reminder
|
||||
If selected, \fBTkRemind\fR beeps the terminal bell when a queued reminder
|
||||
pops up.
|
||||
|
||||
.TP
|
||||
.B Deiconify calendar window when popping up a reminder
|
||||
If selected, does what it says.
|
||||
|
||||
.TP
|
||||
.B Run command when popping up a reminder
|
||||
If this entry is not blank, the specified command is run whenever a
|
||||
background reminder pops up.
|
||||
|
||||
.TP
|
||||
.B Feed popped-up reminder to command's standard input
|
||||
If selected, feeds the text of the reminder to the command described
|
||||
above. The text of the reminder is prefixed by "HH:MM ", where HH:MM
|
||||
is the time of the reminder.
|
||||
|
||||
.TP
|
||||
.B E-mail reminders here if popup not dismissed
|
||||
If you enter a non-blank e-mail address in this field, then \fBTkRemind\fR
|
||||
will e-mail you a reminder if you don't dismiss the popup box within
|
||||
one minute. This is useful if you need to leave your terminal but
|
||||
want your reminders to "follow" you via e-mail.
|
||||
|
||||
.TP
|
||||
.B Name or IP address of SMTP server
|
||||
\fBTkRemind\fR uses a direct SMTP connection to send mail. Enter the
|
||||
IP address of your SMTP server here.
|
||||
|
||||
.TP
|
||||
.B Text Editor
|
||||
This specifies a text editor to invoke when a reminder is right-clicked.
|
||||
The characters "%d" are replaced with the lined number of the file
|
||||
containing the reminder, and "%s" are replaced with the file name.
|
||||
Useful strings might be "emacs +%d %s" or "gvim +%d %s"
|
||||
|
||||
.TP
|
||||
.B Extra Argument for Remind
|
||||
This specifies any extra arguments that should be passed to Remind
|
||||
when \BTkRemind\fR invokes \fBremind\fR. Unless you know what
|
||||
you are doing, leave this blank.
|
||||
|
||||
.TP
|
||||
.B Change entry font...
|
||||
This button pops up a font selection dialog that lets you change the
|
||||
font used to draw calendar items in the calendar boxes.
|
||||
|
||||
.TP
|
||||
.B Change heading font...
|
||||
Similar to Change entry font, but applies to calendar heading
|
||||
(the month and day names and the day numbers.)
|
||||
|
||||
.PP
|
||||
Once you've configured the options the way you like them,
|
||||
press \fBApply Options\fR to put them into effect, \fBSave Options\fR
|
||||
to put them into effect and save them in $HOME/.config/tkremindrc, or
|
||||
\fBCancel\fR to cancel any changes you made.
|
||||
|
||||
.SH KEYBOARD SHORTCUTS
|
||||
\fBTkRemind\fR's main window includes the following keyboard shortcuts:
|
||||
|
||||
.TP
|
||||
.B Ctrl-Q
|
||||
Quit
|
||||
.TP
|
||||
.B Left Arrow
|
||||
Previous Month
|
||||
.TP
|
||||
.B Right Arrow
|
||||
Next Month
|
||||
.TP
|
||||
.B Home
|
||||
Today
|
||||
|
||||
.SH IMMEDIATE UPDATES
|
||||
|
||||
If you are running \fBTkRemind\fR on Linux and have the
|
||||
\fBinotifywait\fR program installed (part of the \fBinotify-tools\fR
|
||||
or similar package), then \fBTkRemind\fR redraws the calendar window
|
||||
\fIimmediately\fR if \fB$HOME/.reminders\fR changes (or, if it is a
|
||||
directory, any files in that directory change.)
|
||||
.PP
|
||||
This lets \fBTkRemind\fR react immediately to hand-edited reminders or
|
||||
to reminder files that are imported from another calendar system (for example,
|
||||
you may have a cron job that periodically imports your Google Calendar
|
||||
entries into Remind format.)
|
||||
|
||||
.SH ODDS AND ENDS
|
||||
\fBTkRemind\fR performs some basic consistency checks when you add or
|
||||
preview a reminder. However, if you edit a reminder in the previewer,
|
||||
\fBTkRemind\fR does \fInot\fR check the edited reminder. You can
|
||||
produce illegal reminders which may cause problems. (This is one good
|
||||
reason to isolate \fBTkRemind\fR's reminders in a separate file.)
|
||||
.PP
|
||||
\fBTkRemind\fR does \fInot\fR check the body of the reminder in any
|
||||
way. You can use the normal \fBRemind\fR substitution sequences in
|
||||
the body. Furthermore, if you use expression-pasting in the body,
|
||||
\fBTkRemind\fR does \fInot\fR validate the expressions.
|
||||
.PP
|
||||
When \fBTkRemind\fR invokes \fBRemind\fR, it supplies the option:
|
||||
.PP
|
||||
.nf
|
||||
\-itkremind=1
|
||||
.fi
|
||||
.PP
|
||||
on the command line. So, in your \fBRemind\fR file, you can include:
|
||||
.PP
|
||||
.nf
|
||||
IF defined("tkremind")
|
||||
# Then I'm probably being invoked by TkRemind
|
||||
ENDIF
|
||||
.fi
|
||||
.PP
|
||||
You can use this to activate certain reminders in different ways
|
||||
for \fBTkRemind\fR (for example).
|
||||
.PP
|
||||
\fBTkRemind\fR uses tags to keep track of reminders in the
|
||||
script file. You can certainly mix
|
||||
"hand-crafted" reminders with reminders created by \fBTkRemind\fR
|
||||
if you are aware of the following rules and limitations:
|
||||
.TP
|
||||
o
|
||||
\fBTkRemind\fR uses \fBTAG\fRs of the form \fBTKTAG\fR\fInnn\fR
|
||||
where \fInnn\fR is a number. You should not use such \fBTAG\fRs
|
||||
in hand-crafted reminders.
|
||||
.TP
|
||||
o
|
||||
Hand-crafted reminders cannot be edited with \fBTkRemind\fR, and
|
||||
for hand-crafted timed reminders, you will not be presented with
|
||||
the "Don't remind me again" option when they pop up.
|
||||
|
||||
.PP
|
||||
However, rather than mixing hand-edited files with \fBTkRemind\fR-generated
|
||||
ones, it is better to make \fB$HOME/.reminders\fR a directory and keep
|
||||
your hand-edited files in a separate \fB*.rem\fR file than \fBTkRemind\fR's
|
||||
\fB100-tkremind.rem\fR file.
|
||||
|
||||
.SH SERVER MODE
|
||||
|
||||
\fBRemind\fR has a special mode for interacting with programs like
|
||||
\fBTkRemind\fR. This mode is called \fIserver mode\fR and is
|
||||
selected by supplying the \fB\-z0\fR option to \fBRemind\fR.
|
||||
|
||||
In server mode, \fBRemind\fR operates similar to daemon mode, except
|
||||
it reads commands (one per line)
|
||||
from standard input and writes status lines to standard output.
|
||||
|
||||
The commands accepted in server mode are:
|
||||
|
||||
.TP
|
||||
EXIT
|
||||
Terminate the \fBRemind\fR process. EOF on standard input does the
|
||||
same thing.
|
||||
|
||||
.TP
|
||||
STATUS
|
||||
Return the number of queued reminders.
|
||||
|
||||
.TP
|
||||
QUEUE
|
||||
Returns the contents of the queue, printed between "NOTE queue" and
|
||||
"NOTE endqueue" lines.
|
||||
|
||||
.TP
|
||||
JSONQUEUE
|
||||
Returns the contents of the queue in JSON format, printed between
|
||||
"NOTE JSONQUEUE" and "NOTE ENDJSONQUEUE" lines.
|
||||
|
||||
.TP
|
||||
REREAD
|
||||
Re-read the reminder file
|
||||
|
||||
.PP
|
||||
The status lines written are as follows:
|
||||
|
||||
.TP
|
||||
NOTE reminder \fItime\fR \fItag\fR
|
||||
Signifies the beginning of a timed reminder whose trigger time is
|
||||
\fItime\fR with tag \fItag\fR. If the reminder has no tag, an
|
||||
asterisk is supplied for \fItag\fR. All lines following this line
|
||||
are the body of the reminder, until the line \fBNOTE endreminder\fR
|
||||
is transmitted.
|
||||
|
||||
.TP
|
||||
NOTE newdate
|
||||
This line is emitted whenever \fBRemind\fR has detected a rollover of
|
||||
the system date. The front-end program should redraw its calendar
|
||||
or take whatever other action is needed.
|
||||
|
||||
.TP
|
||||
NOTE reread
|
||||
This line is emitted whenever the number of reminders in \fBRemind\fR's
|
||||
queue changes because of a date rollover or a \fBREREAD\fR command.
|
||||
The front-end should issue a \fBSTATUS\fR command in response to this
|
||||
message.
|
||||
|
||||
.TP
|
||||
NOTE queued \fIn\fR
|
||||
This line is emitted in response to a \fBSTATUS\fR command. The number
|
||||
\fIn\fR is the number of reminders in the queue.
|
||||
|
||||
.TP
|
||||
NOTE queue
|
||||
Indicates that queue contents are about to follow. The end of the
|
||||
queue is indicated by a NOTE endqueue line.
|
||||
|
||||
.TP
|
||||
NOTE JSONQUEUE
|
||||
Indicates that queue contents in JSON format are about to follow. The
|
||||
end of the queue is indicated by a NOTE ENDJSONQUEUE line.
|
||||
|
||||
.SH AUTHOR
|
||||
TkRemind was written by Dianne Skoll <dianne@skoll.ca>
|
||||
|
||||
\fBTkRemind\fR is Copyright 1996-2023 by Dianne Skoll.
|
||||
|
||||
.SH FILES
|
||||
|
||||
$HOME/.reminders -- default reminder file or directory.
|
||||
|
||||
$HOME/.config/tkremindrc -- \fBTkRemind\fR saved options.
|
||||
|
||||
.SH HOME PAGE
|
||||
https://dianne.skoll.ca/projects/remind/
|
||||
.SH SEE ALSO
|
||||
\fBremind\fR, \fBrem2ps\fR, \fBrem2pdf\fR, \fBrem2html\fR
|
||||
|
||||
158
os2func.c
158
os2func.c
@@ -1,158 +0,0 @@
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* OS2FUNC.C */
|
||||
/* */
|
||||
/* Functions to support OS/2. */
|
||||
/* */
|
||||
/* This file is part of REMIND. */
|
||||
/* */
|
||||
/* This file is Copyright (C) 1993 by Russ Herman. */
|
||||
/* REMIND is Copyright (C) 1992-1996 by David F. Skoll */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
static char const RCSID[] = "$Id: os2func.c,v 1.1 1996-03-27 03:26:04 dfs Exp $";
|
||||
|
||||
#ifdef OS2_POPUP
|
||||
#define INCL_VIO
|
||||
#define INCL_KBD
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define INCL_DOSPROCESS
|
||||
#endif
|
||||
|
||||
#if defined(OS2_POPUP) || defined(_MSC_VER)
|
||||
#include <os2.h>
|
||||
#endif
|
||||
|
||||
#ifdef OS2_POPUP
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef OS2DBG
|
||||
#include <dos.h>
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#include "config.h"
|
||||
#include "globals.h"
|
||||
|
||||
/* EMX defines PS_TYPE, so we undefine it here to avoid
|
||||
a redefinition warning when we include "types.h" */
|
||||
#ifdef PS_TYPE
|
||||
#undef PS_TYPE
|
||||
#endif
|
||||
|
||||
#include "types.h"
|
||||
#include "protos.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
typedef USHORT APIRET;
|
||||
#endif
|
||||
|
||||
static APIRET apiret = 0;
|
||||
static KBDKEYINFO kbci;
|
||||
static char *pszPressAny = "\r\nPress any key to continue";
|
||||
static USHORT pflags = VP_WAIT; /* | VP_TRANSPARENT; */
|
||||
static HKBD hkbd = 0;
|
||||
static char VioSubstBuffer[SHELLSIZE + 1];
|
||||
|
||||
void StartPopUp()
|
||||
{
|
||||
if (OS2MODE)
|
||||
if (!(DebugFlag & DB_ECHO_LINE))
|
||||
VioPopUp(&pflags, 0);
|
||||
}
|
||||
|
||||
void EndPopUp()
|
||||
{
|
||||
if (DebugFlag & DB_ECHO_LINE)
|
||||
return;
|
||||
if (OS2MODE) {
|
||||
VioWrtTTY(pszPressAny, strlen(pszPressAny), 0);
|
||||
KbdCharIn(&kbci, IO_WAIT, hkbd);
|
||||
VioEndPopUp(0);
|
||||
}
|
||||
}
|
||||
|
||||
int PutsPopUp(char *s)
|
||||
{
|
||||
char c, *os = VioSubstBuffer;
|
||||
|
||||
if (DebugFlag & DB_ECHO_LINE)
|
||||
printf("%s", s);
|
||||
else {
|
||||
do {
|
||||
/* Convert \n to \r\n in auxiliary buffer for VIO */
|
||||
if ((c= *s++) == '\n')
|
||||
*os++ = '\r';
|
||||
*os++ = c;
|
||||
} while (c > 0);
|
||||
VioWrtTTY(VioSubstBuffer, strlen(VioSubstBuffer), 0);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
int PutlPopUp(char *s)
|
||||
{
|
||||
StartPopUp();
|
||||
PutsPopUp(s);
|
||||
if (DebugFlag & DB_ECHO_LINE)
|
||||
fputc('\n', stdout);
|
||||
else
|
||||
VioWrtTTY("\r\n", 2, 0);
|
||||
EndPopUp();
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
int PutcPopUp(int c)
|
||||
{
|
||||
char *s = " ";
|
||||
|
||||
if (DebugFlag & DB_ECHO_LINE)
|
||||
fputc(c, stdout);
|
||||
else {
|
||||
switch (c) {
|
||||
case '\n':
|
||||
VioWrtTTY("\r\n", 2, 0);
|
||||
break;
|
||||
default:
|
||||
s[0] = c;
|
||||
VioWrtTTY(s, 1, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
#ifdef OS2DBG
|
||||
#define DB_ECHO_LINE 16
|
||||
int DebugFlag = 0;
|
||||
void main(/* int argc, char **argv */)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = os2fputs("Test VIO PopUp Writing");
|
||||
if (ret)
|
||||
fprintf(stderr, "Test VIO PopUP Writing returned %d %ld",
|
||||
ret, apiret);
|
||||
exit(ret);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
unsigned sleep(unsigned sec)
|
||||
{
|
||||
return DosSleep(sec * 1000L);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef __EMX__
|
||||
int fork()
|
||||
{
|
||||
return(-1);
|
||||
}
|
||||
#endif
|
||||
|
||||
466
polish.h
466
polish.h
@@ -1,466 +0,0 @@
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* POLISH.H */
|
||||
/* */
|
||||
/* Support for the Polish language. */
|
||||
/* */
|
||||
/* This file was submitted by Jerzy Sobczyk. I don't */
|
||||
/* guarantee that there are no mistakes - I don't speak */
|
||||
/* Polish. */
|
||||
/* */
|
||||
/* This file is part of REMIND. */
|
||||
/* Copyright (C) 1992-1996 by David F. Skoll */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
/* $Id: polish.h,v 1.3 1996-04-29 19:34:38 dfs Exp $ */
|
||||
|
||||
/* The very first define in a language support file must be L_LANGNAME: */
|
||||
#define L_LANGNAME "Polish"
|
||||
|
||||
/* Day names */
|
||||
#ifdef ISOLATIN1
|
||||
# define L_SUNDAY "Niedziela"
|
||||
# define L_MONDAY "Poniedzia\263ek"
|
||||
# define L_TUESDAY "Wtorek"
|
||||
# define L_WEDNESDAY "\246roda"
|
||||
# define L_THURSDAY "Czwartek"
|
||||
# define L_FRIDAY "Pi\261tek"
|
||||
# define L_SATURDAY "Sobota"
|
||||
#else
|
||||
# define L_SUNDAY "Niedziela"
|
||||
# define L_MONDAY "Poniedzialek"
|
||||
# define L_TUESDAY "Wtorek"
|
||||
# define L_WEDNESDAY "Sroda"
|
||||
# define L_THURSDAY "Czwartek"
|
||||
# define L_FRIDAY "Piatek"
|
||||
# define L_SATURDAY "Sobota"
|
||||
#endif
|
||||
|
||||
/* Day initials - first letter only */
|
||||
#ifdef ISOLATIN1
|
||||
#define L_DAYINIT "NPW\246CPS"
|
||||
#else
|
||||
#define L_DAYINIT "NPWSCPS"
|
||||
#endif
|
||||
|
||||
/* Month names */
|
||||
#ifdef ISOLATIN1
|
||||
# define L_JAN "Stycze\361"
|
||||
# define L_FEB "Luty"
|
||||
# define L_MAR "Marzec"
|
||||
# define L_APR "Kwiecie\361"
|
||||
# define L_MAY "Maj"
|
||||
# define L_JUN "Czerwiec"
|
||||
# define L_JUL "Lipiec"
|
||||
# define L_AUG "Sierpie\361"
|
||||
# define L_SEP "Wrzesie\361"
|
||||
# define L_OCT "Pa\274dziernik"
|
||||
# define L_NOV "Listopad"
|
||||
# define L_DEC "Grudzie\361"
|
||||
#else
|
||||
# define L_JAN "Styczen"
|
||||
# define L_FEB "Luty"
|
||||
# define L_MAR "Marzec"
|
||||
# define L_APR "Kwiecien"
|
||||
# define L_MAY "Maj"
|
||||
# define L_JUN "Czerwiec"
|
||||
# define L_JUL "Lipiec"
|
||||
# define L_AUG "Sierpien"
|
||||
# define L_SEP "Wrzesien"
|
||||
# define L_OCT "Pazdziernik"
|
||||
# define L_NOV "Listopad"
|
||||
# define L_DEC "Grudzien"
|
||||
#endif
|
||||
|
||||
/* Today and tomorrow */
|
||||
#define L_TODAY "dzisiaj"
|
||||
#define L_TOMORROW "jutro"
|
||||
|
||||
/* The default banner */
|
||||
#define L_BANNER "Terminarz na %w, %d. %m %y%o:"
|
||||
|
||||
/* "am" and "pm" */
|
||||
#define L_AM "am"
|
||||
#define L_PM "pm"
|
||||
|
||||
/*** The following are only used in dosubst.c ***/
|
||||
#ifdef L_IN_DOSUBST
|
||||
|
||||
/* Ago and from now */
|
||||
#define L_AGO "temu"
|
||||
#define L_FROMNOW "od teraz"
|
||||
|
||||
/* "in %d days' time" */
|
||||
#define L_INXDAYS "za %d dni"
|
||||
|
||||
/* "on" as in "on date..." */
|
||||
#define L_ON "-"
|
||||
|
||||
/* Pluralizing - this is a problem for many languages and may require
|
||||
a more drastic fix */
|
||||
#define L_PLURAL ""
|
||||
|
||||
/* Minutes, hours, at, etc */
|
||||
#define L_NOW "teraz"
|
||||
#define L_AT "o"
|
||||
#define L_MINUTE "minut"
|
||||
#define L_HOUR "godzin"
|
||||
#ifdef ISOLATIN1
|
||||
# define L_IS "b\352dzie"
|
||||
# define L_WAS "by\263o"
|
||||
#else
|
||||
# define L_IS "bedzie"
|
||||
# define L_WAS "bylo"
|
||||
#endif
|
||||
#define L_AND "i"
|
||||
/* What to add to make "hour" or "minute" plural */
|
||||
#ifdef ISOLATIN1
|
||||
#define L_NPLU( N ) ((N == 1) ? "\352" : ((N==12) || (N==13) || (N==14)) ? "" : \
|
||||
((N%10==2) || (N%10==3) || (N%10==4)) ? "y" : "" )
|
||||
#else
|
||||
#define L_NPLU( N ) ((N == 1) ? "e" : ((N==12) || (N==13) || (N==14)) ? "" : \
|
||||
((N%10==2) || (N%10==3) || (N%10==4)) ? "y" : "" )
|
||||
#endif
|
||||
/* What to add to make "hour" plural */
|
||||
#define L_HPLU L_NPLU( hdiff )
|
||||
/* What to add to make "minute" plural */
|
||||
#define L_MPLU L_NPLU( mdiff )
|
||||
|
||||
/* Define any overrides here, such as L_ORDINAL_OVERRIDE, L_A_OVER, etc.
|
||||
See the file dosubst.c for more info. */
|
||||
#ifdef ISOLATIN1
|
||||
#define L_AMPM_OVERRIDE(ampm, hour) \
|
||||
ampm = (hour<12) ? \
|
||||
(hour<5) ? " w nocy" \
|
||||
: (hour<10) ? " rano" \
|
||||
: " przed po\263udniem" \
|
||||
: (hour<18) ? " po po\263udniu" \
|
||||
: (hour<22) ? " wieczorem" \
|
||||
: " w nocy";
|
||||
#else
|
||||
#define L_AMPM_OVERRIDE(ampm, hour) \
|
||||
ampm = (hour<12) ? \
|
||||
(hour<5) ? " w nocy" \
|
||||
: (hour<10) ? " rano" \
|
||||
: " przed poludniem" \
|
||||
: (hour<18) ? " po poludniu" \
|
||||
: (hour<22) ? " wieczorem" \
|
||||
: " w nocy";
|
||||
#endif
|
||||
#define L_ORDINAL_OVERRIDE plu = "";
|
||||
#define L_A_OVER sprintf(s, "%s %s, %d. %s %d", L_ON, DayName[jul%7], d, MonthName[m], y);
|
||||
#define L_G_OVER sprintf(s, "%s %s, %d. %s", L_ON, DayName[jul%7], d, MonthName[m]);
|
||||
#define L_U_OVER L_A_OVER
|
||||
#define L_V_OVER L_G_OVER
|
||||
|
||||
#endif /* L_IN_DOSUBST */
|
||||
|
||||
#define L_0_OVER sprintf(s, L_HPLU);
|
||||
#define L_9_OVER sprintf(s, L_MPLU);
|
||||
#define L_1_OVER \
|
||||
if (tdiff == 0) \
|
||||
sprintf(s, L_NOW); \
|
||||
else if (tdiff > 0) \
|
||||
{ \
|
||||
if (hdiff == 0) \
|
||||
sprintf(s, "za %d %s%s", mdiff, L_MINUTE, L_MPLU); \
|
||||
else if (mdiff == 0) \
|
||||
sprintf(s, "za %d %s%s", hdiff, L_HOUR, L_HPLU); \
|
||||
else \
|
||||
sprintf(s, "za %d %s%s %s %d %s%s", hdiff, L_HOUR, L_HPLU, \
|
||||
L_AND, mdiff, L_MINUTE, L_MPLU); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
if (hdiff == 0) \
|
||||
sprintf(s, "%d %s%s temu", mdiff, L_MINUTE, L_MPLU); \
|
||||
else if (mdiff == 0) \
|
||||
sprintf(s, "%d %s%s temu", hdiff, L_HOUR, L_HPLU); \
|
||||
else \
|
||||
sprintf(s, "%d %s%s %s %d %s%s temu", hdiff, L_HOUR, L_HPLU, \
|
||||
L_AND, mdiff, L_MINUTE, L_MPLU); \
|
||||
}
|
||||
|
||||
/* The next ones are used only when MK_GLOBALS is set */
|
||||
#ifdef MK_GLOBALS
|
||||
#define L_ERR_OVERRIDE 1
|
||||
EXTERN char *ErrMsg[] =
|
||||
{
|
||||
#ifdef ISOLATIN1
|
||||
"OK",
|
||||
"Brakuj\261cy ']'",
|
||||
"Brakuj\261cy nawias",
|
||||
"Zbyt skomplikowane wyra\277enie - za du\277o operator\363w",
|
||||
"Zbyt skomplikowane wyra\277enie - za du\277o argument\363w",
|
||||
"Brakuj\261cy ')'",
|
||||
"Nie zdefiniowana funkcja",
|
||||
"Nielegalny znak",
|
||||
"Spodziewany operator binarny",
|
||||
"Brak pami\352ci",
|
||||
"Niepoprawny numer",
|
||||
"Pusty stos operator\363w - b\263\261d wewn\352trzny",
|
||||
"Pusty stos zmiennych - b\263\261d wewn\352trzny",
|
||||
"Niemo\277liwa konwersja",
|
||||
"B\263\261d typu",
|
||||
"Nadmiar daty",
|
||||
"B\263\261d stosu - b\263\261d wewn\352trzny",
|
||||
"Dzielenie przez zero",
|
||||
"Niezdefiniowana zmienna",
|
||||
"Niespodziewany koniec linii",
|
||||
"Niespodziewany koniec pliku",
|
||||
"B\263\261d wejscia/wyjscia",
|
||||
"Za d\263uga linia",
|
||||
"B\263\261d wewn\352trzny",
|
||||
"Z\263a specyfikacja daty",
|
||||
"Za ma\263o argument\363w",
|
||||
"Za du\277o argument\363w",
|
||||
"Nieprawid\263owy czas",
|
||||
"Liczba za du\277a",
|
||||
"Liczba za ma\263a",
|
||||
"Nie mog\352 otworzy\346 pliku",
|
||||
"Zbyt zagnie\277d\277one INCLUDE",
|
||||
"B\263\261d sk\263adniowy",
|
||||
"Nie mog\352 obliczy\346 przypomnienia",
|
||||
"Zbyt zagnie\277d\277one IF",
|
||||
"ELSE bez IF do pary",
|
||||
"ENDIF bez IF do pary",
|
||||
"Nie mog\352 omin\261\346 (OMIT) wszystkich dni",
|
||||
"Niespodziewany wyraz w lini",
|
||||
"POP-OMIT-CONTEXT bez PUSH-OMIT-CONTEXT",
|
||||
"Komenda RUN zablokowana",
|
||||
"B\263\261d dziedziny",
|
||||
"Niepoprawny identyfikator",
|
||||
"Wykryto rekursywne wywo\263anie funkcji",
|
||||
"",
|
||||
"Nie mog\352 zmieni\346 zmiennej systemowej",
|
||||
"Funkcja biblioteki C nie mo\277e reprezentowac daty/czasu",
|
||||
"Pr\363ba redefinicji funkcji wbudowanej",
|
||||
"Nie wolno zagnie\277d\277a\346 definicji funkcji w wyra\277eniu",
|
||||
"Aby u\277yc powt\363rzenia trzeba w pe\263ni wyspecyfikowa\346 dat\352",
|
||||
"Rok podany dw\363krotnie",
|
||||
"Miesi\261c podany dw\363krotnie",
|
||||
"Dzie\361 podany dw\363krotnie",
|
||||
"Nieznane s\263owo",
|
||||
"W komendzie OMIT trzeba poda\346 miesi\261c i dzie\361",
|
||||
"Za du\277o cz\352\266ciowych komend OMIT",
|
||||
"Za du\277o pe\263nych komend OMIT",
|
||||
"Ostrze\277enie: PUSH-OMIT-CONTEXT bez POP-OMIT-CONTEXT",
|
||||
"B\263\261d odczytu pliku",
|
||||
"Oczekiwany koniec linii",
|
||||
"B\263\352dna data hebrajska",
|
||||
"IIF wymaga nieparzystej liczby argument\363w",
|
||||
"Ostrze\277enie: Brakujacy ENDIF",
|
||||
"Oczekiwany przecinek",
|
||||
"Dzie\361 tygodnia podany dw\363krotnie",
|
||||
"Dozwolone tylko jedno z: BEFORE, AFTER i SKIP",
|
||||
"Nie mo\277na zagnie\277d\277a\346 MSG, MSF, RUN, itp. w wyra\277eniu",
|
||||
"Warto\266\346 powtorzenia podana dw\363krotnie",
|
||||
"Warto\266\346 r\363\277nicy podana dw\363krotnie",
|
||||
"Warto\266\346 cofni\352cia podana dw\363krotnie",
|
||||
"S\263owo ONCE u\277yte dw\363krotnie.",
|
||||
"Po AT oczekiwany jest czas",
|
||||
"S\263owo UNTIL u\277yte dw\363krotnie",
|
||||
"Niekompletna specyfikacja daty",
|
||||
"S\263owo SCANFROM u\277yte dw\363krotnie",
|
||||
"Zmienna",
|
||||
"Warto\266\346",
|
||||
"*NIE ZDEFINIOWANE*",
|
||||
"Pocz\261tek UserFN",
|
||||
"Koniec UserFN",
|
||||
"Przemine\263o",
|
||||
"Niepowodzenie w funkcji fork() - nie mog\352 kolejkowa\346 przypomnie\361",
|
||||
"Nie ma dost\352pu do pliku",
|
||||
"B\263\352dna data systemowa: Rok mniejszy ni\277 %d\n",
|
||||
"Nieznana flaga odpluskwiania '%c'\n",
|
||||
"Nieznana opcja '%c'\n",
|
||||
"Nieznany u\277ytkownik '%s'\n",
|
||||
"Nie mog\352 zmieni\346 gid na %d\n",
|
||||
"Nie mog\352 zmieni\346 uid na %d\n",
|
||||
"Brak pami\352ci na zmienne \266rodowiska\n",
|
||||
"Brak znaku '='",
|
||||
"Brak nazwy zmiennej",
|
||||
"Brak wyra\277enia",
|
||||
"Nie mog\352 zmieni\346 daty dost\352pu pliku %s\n",
|
||||
"Remind: '-i' option: %s\n",
|
||||
"Brak przypomnie\361.",
|
||||
"%d Przypomnienia zakolejkowane na p\363\274niej.\n",
|
||||
"Spodziewana liczba",
|
||||
"Illegal function in WARN clause (NEEDS TRANSLATION TO POLISH)"
|
||||
#else /* ISOLATIN1 */
|
||||
"OK",
|
||||
"Brakujacy ']'",
|
||||
"Brakujacy nawias",
|
||||
"Zbyt skomplikowane wyrazenie - za duzo operatorow",
|
||||
"Zbyt skomplikowane wyrazenie - za duzo argumentow",
|
||||
"Brakujacy ')'",
|
||||
"Niezdefiniowana funkcja",
|
||||
"Nielegalny znak",
|
||||
"Spodziewany operator binarny",
|
||||
"Brak pamieci",
|
||||
"Niepoprawny numer",
|
||||
"Pusty stos operatorow - blad wewnetrzny",
|
||||
"Pusty stos zmiennych - blad wewnetrzny",
|
||||
"Niemozliwa konwersja",
|
||||
"Blad typu",
|
||||
"Nadmiar daty",
|
||||
"Blad stosu - blad wewnetrzny",
|
||||
"Dzielenie przez zero",
|
||||
"Niezdefiniowana zmienna",
|
||||
"Niespodziewany koniec linii",
|
||||
"Niespodziewany koniec pliku",
|
||||
"Blad wejscia/wyjscia",
|
||||
"Za dluga linia",
|
||||
"Blad wewnetrzny",
|
||||
"Zla specyfikacja daty",
|
||||
"Za malo argumentow",
|
||||
"Za duzo argumentow",
|
||||
"Nieprawidlowy czas",
|
||||
"Liczba za duza",
|
||||
"Liczba za mala",
|
||||
"Nie moge otworzyc pliku",
|
||||
"INCLUDE zbyt zagniezdzone",
|
||||
"Blad skladniowy",
|
||||
"Nie moge obliczyc przypomnienia",
|
||||
"Zbyt zagniezdzone IF",
|
||||
"ELSE bez IF do pary",
|
||||
"ENDIF bez IF do pary",
|
||||
"Nie moge ominac (OMIT) wszystkich dni",
|
||||
"Niespodziewany wyraz w lini",
|
||||
"POP-OMIT-CONTEXT bez PUSH-OMIT-CONTEXT",
|
||||
"Komenda RUN zablokowana",
|
||||
"Blad dziedziny",
|
||||
"Niepoprawny identyfikator",
|
||||
"Wykryto rekursywne wywolanie funkcji",
|
||||
"",
|
||||
"Nie moga zmienic zmiennej systemowej",
|
||||
"Funkcja biblioteki C nie moze reprezentowac daty/czasu",
|
||||
"Proba redefinicji funkcji wbudowanej",
|
||||
"Nie wolno zagniezdzac definicji funkcji w wyrazeniu",
|
||||
"Aby uzyc powtorzenia trzeba w pelni wyspecyfikowac date",
|
||||
"Rok podany dwokrotnie",
|
||||
"Miesiac podany dwokrotnie",
|
||||
"Dzien podany dwokrotnie",
|
||||
"Nieznane slowo",
|
||||
"W komendzie OMIT trzeba podac miesiac i dzien",
|
||||
"Za duzo czesciowych komend OMIT",
|
||||
"Za duzo pelnych komend OMIT",
|
||||
"ostrzezenie: PUSH-OMIT-CONTEXT bez POP-OMIT-CONTEXT",
|
||||
"Blad odczytu pliku",
|
||||
"Oczekiwany koniec linii",
|
||||
"Bledna data hebrajska",
|
||||
"IIF wymaga nieparzystej liczby argumentow",
|
||||
"Ostrzezenie: Brakujacy ENDIF",
|
||||
"Oczekiwany przecinek",
|
||||
"Dzien tygodnia podany dwokrotnie",
|
||||
"Dozwolone tylko jedno z: BEFORE, AFTER i SKIP",
|
||||
"Nie mozna zagniezdzac MSG, MSF, RUN, itp. w wyrazeniu",
|
||||
"Wartosc powtorzenia podana dwokrotnie",
|
||||
"Wartosc roznicy podana dwokrotnie",
|
||||
"Wartosc cofniecia podana dwokrotnie",
|
||||
"Slowo ONCE uzyte dwokrotnie.",
|
||||
"Po AT oczekiwany jest czas",
|
||||
"Slowo UNTIL uzyte dwokrotnie",
|
||||
"Niekompletna specyfikacja daty",
|
||||
"Slowo SCANFROM uzyte dwokrotnie",
|
||||
"Zmienna",
|
||||
"Wartosc",
|
||||
"*UNDEFINED*",
|
||||
"Poczatek UserFN",
|
||||
"Koniec UserFN",
|
||||
"Przeminelo",
|
||||
"niepowodzenie w funkcji fork() - nie moge kolejkowac przypomnien",
|
||||
"Nie ma dostepu do pliku",
|
||||
"Bledna data systemowa: Rok mniejszy niz %d\n",
|
||||
"Nieznana flaga odpluskwiania '%c'\n",
|
||||
"Nieznana opcja '%c'\n",
|
||||
"Nieznany uzytkownik '%s'\n",
|
||||
"Nie moge zmienic gid na %d\n",
|
||||
"Nie moge zmienic uid na %d\n",
|
||||
"Brak pamieci na zmienne srodowiska\n",
|
||||
"Brak znaku '='",
|
||||
"Brak nazwy zmiennej",
|
||||
"Brak wyrazenia",
|
||||
"Nie moge zmienic daty dostepu pliku %s\n",
|
||||
"Remind: '-i' option: %s\n",
|
||||
"Brak przypomnien.",
|
||||
"%d Przypomnienia zakolejkowane na pozniej.\n",
|
||||
"Spodziewana liczba",
|
||||
"Illegal function in WARN clause (NEEDS TRANSLATION TO POLISH)"
|
||||
#endif /* ISOLATIN1 */
|
||||
};
|
||||
#endif /* MK_GLOBALS */
|
||||
|
||||
/* The following is only used in init.c */
|
||||
#ifdef L_IN_INIT
|
||||
#define L_USAGE_OVERRIDE 1
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC void Usage(void)
|
||||
#else
|
||||
void Usage()
|
||||
#endif /* HAVE_PROTOS */
|
||||
{
|
||||
fprintf(ErrFp, "\nREMIND %s (%s version) Copyright 1992-1996 by David F. Skoll\n", VERSION, L_LANGNAME);
|
||||
#ifdef BETA
|
||||
fprintf(ErrFp, ">>>> BETA VERSION <<<<\n");
|
||||
#endif
|
||||
#ifdef ISOLATIN1
|
||||
fprintf(ErrFp, "\nSpos\363b u\277ycia: remind [opcje] plik [data] [czas] [*powt\363rzenie]\n");
|
||||
fprintf(ErrFp, "Opcje:\n");
|
||||
fprintf(ErrFp, " -n Wypisz nast\352pne przypomnienia w prostym formacie\n");
|
||||
fprintf(ErrFp, " -r Zablokuj dyrektywy RUN\n");
|
||||
fprintf(ErrFp, " -c[n] Wypisz kalendarz na n (domy\266lnie 1) miesi\352cy\n");
|
||||
fprintf(ErrFp, " -c+[n] Wypisz kalendarz na n (domy\266lnie 1) tygodni\n");
|
||||
fprintf(ErrFp, " -w[n[,p[,s]]] Ustaw szeroko\266\346, wype\263nienie i odst\352py w kalendarzu\n");
|
||||
fprintf(ErrFp, " -s[+][n] Wypisz uproszczony kalendarz na n (1) miesi\352cy (tygodni)\n");
|
||||
fprintf(ErrFp, " -p[n] To samo co -s, ale kompatybilne z rem2ps\n");
|
||||
fprintf(ErrFp, " -v Obszerniejsze komentarze\n");
|
||||
fprintf(ErrFp, " -o Ignoruj instrukcje ONCE\n");
|
||||
fprintf(ErrFp, " -t Odpal wszystkie przysz\263e przypomnienia niezale\277nie od delty\n");
|
||||
fprintf(ErrFp, " -h Praca bezszmerowa\n");
|
||||
#ifdef HAVE_QUEUED
|
||||
fprintf(ErrFp, " -a Nie odpalaj przyponie\361 czasowych - kolejkuj je\n");
|
||||
fprintf(ErrFp, " -q Nie kolejkuj przyponie\361 czasowych\n");
|
||||
fprintf(ErrFp, " -f Nie przechod\274 do pracy w tle\n");
|
||||
fprintf(ErrFp, " -z[n] Pracuj jako demon, budz\261c si\352 co n (5) minut\n");
|
||||
#endif
|
||||
fprintf(ErrFp, " -d... Odpluskwianie: e=echo x=expr-eval t=trig v=dumpvars l=showline\n");
|
||||
fprintf(ErrFp, " -e Komunikaty o b\263\352dach skieruj na stdout\n");
|
||||
fprintf(ErrFp, " -b[n] Format czasu: 0=am/pm, 1=24godz., 2=\277aden\n");
|
||||
fprintf(ErrFp, " -x[n] Limit powt\363rze\361 klauzuli SATISFY (domy\266lnie=150)\n");
|
||||
fprintf(ErrFp, " -kcmd Wywo\263aj 'cmd' dla przypomnie\361 typu MSG\n");
|
||||
fprintf(ErrFp, " -g[ddd] Sortuj przypomnienia wed\263ug daty, czasu i priorytetu\n");
|
||||
fprintf(ErrFp, " -ivar=val Zainicjuj zmienn\261 var warto\266cia val i zachowaj ja\n");
|
||||
fprintf(ErrFp, " -m Rozpocznij kalendarz od poniedzia\263ku zamiast od niedzieli\n");
|
||||
#else /* ISOLATIN1 */
|
||||
fprintf(ErrFp, "\nSposob uzycia: remind [opcje] plik [data] [czas] [*powtorzenie]\n");
|
||||
fprintf(ErrFp, "Opcje:\n");
|
||||
fprintf(ErrFp, " -n Wypisz nastepne przypomnienia w prostym formacie\n");
|
||||
fprintf(ErrFp, " -r Zablokuj dyrektywy RUN\n");
|
||||
fprintf(ErrFp, " -c[n] Wypisz kalendarz na n (domyslnie 1) miesiecy\n");
|
||||
fprintf(ErrFp, " -c+[n] Wypisz kalendarz na n (domyslnie 1) tygodni\n");
|
||||
fprintf(ErrFp, " -w[n[,p[,s]]] Ustaw szerokosc, wypelnienie i odstepy w kalendarzu\n");
|
||||
fprintf(ErrFp, " -s[+][n] Wypisz uproszczony kalendarz na n (1) miesiecy (tygodni)\n");
|
||||
fprintf(ErrFp, " -p[n] To samo co -s, ale kompatybilne z rem2ps\n");
|
||||
fprintf(ErrFp, " -v Obszerniejsze komentarze\n");
|
||||
fprintf(ErrFp, " -o Ignoruj instrukcje ONCE\n");
|
||||
fprintf(ErrFp, " -t Odpal wszystkie przyszle przypomnienia niezaleznie od delty\n");
|
||||
fprintf(ErrFp, " -h Praca bezszmerowa\n");
|
||||
#ifdef HAVE_QUEUED
|
||||
fprintf(ErrFp, " -a Nie odpalaj przyponien czasowych - kolejkuj je\n");
|
||||
fprintf(ErrFp, " -q Nie kolejkuj przyponien czasowych\n");
|
||||
fprintf(ErrFp, " -f Nie przechodz do pracy w tle\n");
|
||||
fprintf(ErrFp, " -z[n] Pracuj jako demon, budzac sie co n (5) minut\n");
|
||||
#endif
|
||||
fprintf(ErrFp, " -d... Odpluskwianie: e=echo x=expr-eval t=trig v=dumpvars l=showline\n");
|
||||
fprintf(ErrFp, " -e Komunikaty o bledach skieruj na stdout\n");
|
||||
fprintf(ErrFp, " -b[n] Format czasu: 0=am/pm, 1=24godz., 2=zaden\n");
|
||||
fprintf(ErrFp, " -x[n] Limit powtorzen klauzuli SATISFY (domyslnie=150)\n");
|
||||
fprintf(ErrFp, " -kcmd Wywolaj 'cmd' dla przypomnien typu MSG\n");
|
||||
fprintf(ErrFp, " -g[ddd] Sortuj przypomnienia wedlug daty, czasu i priorytetu\n");
|
||||
fprintf(ErrFp, " -ivar=val Zainicjuj zmienna var wartoscia val i zachowaj ja\n");
|
||||
fprintf(ErrFp, " -m Rozpocznij kalendarz od poniedzialku zamiast od niedzieli\n");
|
||||
#endif /* ISOLATIN1 */
|
||||
exit(1);
|
||||
}
|
||||
#endif /* L_IN_INIT */
|
||||
176
protos.h
176
protos.h
@@ -1,176 +0,0 @@
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* PROTOS.H */
|
||||
/* */
|
||||
/* Function Prototypes. */
|
||||
/* */
|
||||
/* This file is part of REMIND. */
|
||||
/* Copyright (C) 1992-1996 by David F. Skoll */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
/* $Id: protos.h,v 1.2 1996-03-31 04:01:57 dfs Exp $ */
|
||||
|
||||
#ifdef HAVE_PROTOS
|
||||
#define ARGS(x) x
|
||||
#else
|
||||
#define ARGS(x) ()
|
||||
#endif
|
||||
|
||||
/* Define a string assignment macro - be careful!!! */
|
||||
#define STRSET(x, str) { if (x) free(x); (x) = StrDup(str); }
|
||||
|
||||
/* Define a general malloc routine for creating pointers to objects */
|
||||
#define NEW(type) ((type *) malloc(sizeof(type)))
|
||||
|
||||
#ifdef NO_STRSTR
|
||||
char *strstr ARGS ((char *s1, char *s2));
|
||||
#endif
|
||||
|
||||
int CallUserFunc ARGS ((char *name, int nargs));
|
||||
int DoFset ARGS ((ParsePtr p));
|
||||
void ProduceCalendar ARGS ((void));
|
||||
char *SimpleTime ARGS ((int tim, char *out));
|
||||
int DoRem ARGS ((ParsePtr p));
|
||||
int DoFlush ARGS ((ParsePtr p));
|
||||
void DoExit ARGS ((ParsePtr p));
|
||||
int ParseRem ARGS ((ParsePtr s, Trigger *trig, TimeTrig *tim));
|
||||
#ifdef OS2_POPUP
|
||||
int TriggerReminder ARGS ((ParsePtr p, Trigger *t, TimeTrig *tim, int jul,
|
||||
int AsPopUp));
|
||||
#else
|
||||
int TriggerReminder ARGS ((ParsePtr p, Trigger *t, TimeTrig *tim, int jul));
|
||||
#endif
|
||||
int ShouldTriggerReminder ARGS ((Trigger *t, TimeTrig *tim, int jul));
|
||||
int DoSubst ARGS ((ParsePtr p, char *out, Trigger *t, TimeTrig *tt, int jul, int mode));
|
||||
int DoSubstFromString ARGS ((char *source, char *dest, int jul, int tim));
|
||||
int EvalExpr ARGS ((char **e, Value *v));
|
||||
int DoCoerce ARGS ((char type, Value *v));
|
||||
void PrintValue ARGS ((Value *v, FILE *fp));
|
||||
int CopyValue ARGS ((Value *dest, const Value *src));
|
||||
int ReadLine ARGS ((void));
|
||||
int OpenFile ARGS ((const char *fname));
|
||||
int PopFile ARGS ((void));
|
||||
int DoInclude ARGS ((ParsePtr p));
|
||||
int IncludeFile ARGS ((const char *fname));
|
||||
int GetAccessDate ARGS ((char *file));
|
||||
int SetAccessDate ARGS ((char *fname, int jul));
|
||||
int TopLevel ARGS ((void));
|
||||
int CallFunc ARGS ((Operator *f, int nargs));
|
||||
void InitRemind ARGS ((int argc, char *argv[]));
|
||||
void Usage ARGS ((void));
|
||||
int main ARGS ((int argc, char *argv[]));
|
||||
int Julian ARGS ((int year, int month, int day));
|
||||
void FromJulian ARGS ((int jul, int *y, int *m, int *d));
|
||||
int ParseChar ARGS ((ParsePtr p, int *err, int peek));
|
||||
int ParseToken ARGS ((ParsePtr p, char *out));
|
||||
int ParseIdentifier ARGS ((ParsePtr p, char *out));
|
||||
int EvaluateExpr ARGS ((ParsePtr p, Value *v));
|
||||
int Evaluate ARGS ((char **s, Var *locals));
|
||||
int FnPopValStack ARGS ((Value *val));
|
||||
void Eprint ARGS ((const char *fmt, ...));
|
||||
void OutputLine ARGS ((FILE *fp));
|
||||
void CreateParser ARGS ((char *s, ParsePtr p));
|
||||
void DestroyParser ARGS ((ParsePtr p));
|
||||
void PushToken ARGS ((const char *tok));
|
||||
long SystemTime ARGS ((int realtime));
|
||||
int SystemDate ARGS ((int *y, int *m, int *d));
|
||||
int DoIf ARGS ((ParsePtr p));
|
||||
int DoElse ARGS ((ParsePtr p));
|
||||
int DoEndif ARGS ((ParsePtr p));
|
||||
int DoIfTrig ARGS ((ParsePtr p));
|
||||
int ShouldIgnoreLine ARGS ((void));
|
||||
int VerifyEoln ARGS ((ParsePtr p));
|
||||
int DoDebug ARGS ((ParsePtr p));
|
||||
int DoBanner ARGS ((ParsePtr p));
|
||||
int DoRun ARGS ((ParsePtr p));
|
||||
int DoErrMsg ARGS ((ParsePtr p));
|
||||
int ClearGlobalOmits ARGS ((void));
|
||||
int DoClear ARGS ((ParsePtr p));
|
||||
int DestroyOmitContexts ARGS ((void));
|
||||
int PushOmitContext ARGS ((ParsePtr p));
|
||||
int PopOmitContext ARGS ((ParsePtr p));
|
||||
int IsOmitted ARGS ((int jul, int localomit));
|
||||
int DoOmit ARGS ((ParsePtr p));
|
||||
int QueueReminder ARGS ((ParsePtr p, int typ, TimeTrig *tim, const char *sched));
|
||||
void HandleQueuedReminders ARGS ((void));
|
||||
char *FindInitialToken ARGS ((Token *tok, char *s));
|
||||
void FindToken ARGS ((const char *s, Token *tok));
|
||||
void FindNumericToken ARGS ((const char *s, Token *t));
|
||||
int ComputeTrigger ARGS ((int today, Trigger *trig, int *err));
|
||||
char *StrnCpy ARGS ((char *dest, const char *source, int n));
|
||||
int StrMatch ARGS ((const char *s1, const char *s2, int n));
|
||||
int StrinCmp ARGS ((const char *s1, const char *s2, int n));
|
||||
char *StrDup ARGS ((const char *s));
|
||||
int StrCmpi ARGS ((const char *s1, const char *s2));
|
||||
Var *FindVar ARGS ((const char *str, int create));
|
||||
int DeleteVar ARGS ((const char *str));
|
||||
int SetVar ARGS ((const char *str, Value *val));
|
||||
int GetVarValue ARGS ((const char *str, Value *val, Var *locals));
|
||||
int DoSet ARGS ((Parser *p));
|
||||
int DoUnset ARGS ((Parser *p));
|
||||
int DoDump ARGS ((ParsePtr p));
|
||||
void DumpVarTable ARGS ((void));
|
||||
void DestroyVars ARGS ((int all));
|
||||
int PreserveVar ARGS ((char *name));
|
||||
int DoPreserve ARGS ((Parser *p));
|
||||
int DoSatRemind ARGS ((Trigger *trig, TimeTrig *tim, ParsePtr p));
|
||||
void DoMsgCommand ARGS ((char *cmd, char *msg));
|
||||
int ParseNonSpaceChar ARGS ((ParsePtr p, int *err, int peek));
|
||||
unsigned int HashVal ARGS ((const char *str));
|
||||
int DateOK ARGS ((int y, int m, int d));
|
||||
Operator *FindFunc ARGS ((char *name, Operator where[], int num));
|
||||
int InsertIntoSortBuffer ARGS ((int jul, int tim, char *body, int typ, int prio));
|
||||
void IssueSortedReminders ARGS ((void));
|
||||
int UserFuncExists ARGS ((char *fn));
|
||||
void JulToHeb ARGS((int jul, int *hy, int *hm, int *hd));
|
||||
int HebNameToNum ARGS((const char *mname));
|
||||
char *HebMonthName ARGS((int m, int y));
|
||||
int RoshHashana ARGS((int i));
|
||||
long DaysToHebYear ARGS((int y));
|
||||
int DaysInHebYear ARGS((int y));
|
||||
char *DaysInHebMonths ARGS((int ylen));
|
||||
int HebToJul ARGS((int hy, int hm, int hd));
|
||||
int GetValidHebDate ARGS((int yin, int min, int din, int adarbehave, int *mout, int *dout, int yahr));
|
||||
int GetNextHebrewDate ARGS((int julstart, int hm, int hd, int yahr, int adarbehave, int *ans));
|
||||
int ComputeJahr ARGS ((int y, int m, int d, int *ans));
|
||||
int GetSysVar ARGS ((const char *name, Value *val));
|
||||
int SetSysVar ARGS ((const char *name, Value *val));
|
||||
void DumpSysVarByName ARGS ((const char *name));
|
||||
int CalcMinsFromUTC ARGS ((int jul, int tim, int *mins, int *isdst));
|
||||
#ifdef OS2_POPUP
|
||||
void FillParagraph ARGS ((char *s, int AsPopUp));
|
||||
#else
|
||||
void FillParagraph ARGS ((char *s));
|
||||
#endif
|
||||
void LocalToUTC ARGS ((int locdate, int loctime, int *utcdate, int *utctime));
|
||||
void UTCToLocal ARGS ((int utcdate, int utctime, int *locdate, int *loctime));
|
||||
int MoonPhase ARGS ((int date, int time));
|
||||
void HuntPhase ARGS ((int startdate, int starttim, int phas, int *date, int *time));
|
||||
int CompareRems ARGS ((int dat1, int tim1, int prio1, int dat2, int tim2, int prio2, int bydate, int bytime, int byprio));
|
||||
#ifdef __BORLANDC__
|
||||
void __cdecl SigIntHandler ARGS ((int d));
|
||||
#else
|
||||
#ifdef SIGHANDLER_INT_ARG
|
||||
void SigIntHandler ARGS ((int d));
|
||||
#else
|
||||
void SigIntHandler ARGS ((void));
|
||||
#endif
|
||||
#endif
|
||||
void GotSigInt ARGS ((void));
|
||||
|
||||
#if defined(__OS2__)
|
||||
int fork ARGS ((void));
|
||||
#if defined(OS2_POPUP)
|
||||
void StartPopUp ARGS ((void));
|
||||
void EndPopUp ARGS ((void));
|
||||
int PutcPopUp ARGS ((int c));
|
||||
int PutlPopUp ARGS ((char *s));
|
||||
int PutsPopUp ARGS ((char *s));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BROKEN_PUTC
|
||||
int SafePutChar ARGS ((int ch));
|
||||
int SafePutc ARGS ((int ch, FILE *fp));
|
||||
#endif
|
||||
412
queue.c
412
queue.c
@@ -1,412 +0,0 @@
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* QUEUE.C */
|
||||
/* */
|
||||
/* Queue up reminders for subsequent execution. */
|
||||
/* */
|
||||
/* This file is part of REMIND. */
|
||||
/* Copyright (C) 1992-1996 by David F. Skoll */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
static char const RCSID[] = "$Id: queue.c,v 1.1 1996-03-27 03:26:05 dfs Exp $";
|
||||
|
||||
#include "config.h"
|
||||
|
||||
/* We only want object code generated if we have queued reminders */
|
||||
#ifdef HAVE_QUEUED
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(__OS2__) || defined(__MSDOS__)
|
||||
#include <io.h>
|
||||
#if defined(__BORLANDC__)
|
||||
#include <dos.h>
|
||||
#endif
|
||||
#include <process.h>
|
||||
#endif
|
||||
|
||||
#include "globals.h"
|
||||
#include "err.h"
|
||||
#include "types.h"
|
||||
#include "protos.h"
|
||||
#include "expr.h"
|
||||
|
||||
/* List structure for holding queued reminders */
|
||||
typedef struct queuedrem {
|
||||
struct queuedrem *next;
|
||||
int typ;
|
||||
int RunDisabled;
|
||||
int ntrig;
|
||||
char *text;
|
||||
char sched[VAR_NAME_LEN+1];
|
||||
TimeTrig tt;
|
||||
} QueuedRem;
|
||||
|
||||
/* Global variables */
|
||||
|
||||
static QueuedRem *QueueHead;
|
||||
static time_t FileModTime;
|
||||
static struct stat StatBuf;
|
||||
|
||||
PRIVATE void CheckInitialFile ARGS ((void));
|
||||
PRIVATE int CalculateNextTime ARGS ((QueuedRem *q));
|
||||
PRIVATE QueuedRem *FindNextReminder ARGS ((void));
|
||||
PRIVATE int CalculateNextTimeUsingSched ARGS ((QueuedRem *q));
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* QueueReminder */
|
||||
/* */
|
||||
/* Put the reminder on a queue for later, if queueing is */
|
||||
/* enabled. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC int QueueReminder(ParsePtr p, int typ, TimeTrig *tim, const char *sched)
|
||||
#else
|
||||
int QueueReminder(p, typ, tim, sched)
|
||||
ParsePtr p;
|
||||
int typ;
|
||||
TimeTrig *tim;
|
||||
char *sched;
|
||||
#endif
|
||||
{
|
||||
QueuedRem *qelem;
|
||||
|
||||
if (DontQueue ||
|
||||
tim->ttime == NO_TIME ||
|
||||
typ == CAL_TYPE ||
|
||||
tim->ttime < SystemTime(0) / 60 ||
|
||||
((typ == RUN_TYPE) && RunDisabled)) return OK;
|
||||
|
||||
qelem = NEW(QueuedRem);
|
||||
if (!qelem) {
|
||||
return E_NO_MEM;
|
||||
}
|
||||
qelem->text = StrDup(p->pos); /* Guaranteed that parser is not nested. */
|
||||
if (!qelem->text) {
|
||||
free(qelem);
|
||||
return E_NO_MEM;
|
||||
}
|
||||
qelem->typ = typ;
|
||||
qelem->tt = *tim;
|
||||
qelem->next = QueueHead;
|
||||
qelem->RunDisabled = RunDisabled;
|
||||
qelem->ntrig = 0;
|
||||
strcpy(qelem->sched, sched);
|
||||
QueueHead = qelem;
|
||||
NumQueued++;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* HandleQueuedReminders */
|
||||
/* */
|
||||
/* Handle the issuing of queued reminders in the background */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PUBLIC void HandleQueuedReminders(void)
|
||||
#else
|
||||
void HandleQueuedReminders()
|
||||
#endif
|
||||
{
|
||||
QueuedRem *q = QueueHead;
|
||||
long TimeToSleep;
|
||||
unsigned SleepTime;
|
||||
Parser p;
|
||||
Trigger trig;
|
||||
|
||||
/* Suppress the BANNER from being issued */
|
||||
NumTriggered = 1;
|
||||
|
||||
/* If we are not connected to a tty, then we must close the
|
||||
* standard file descriptors. This is to prevent someone
|
||||
* doing:
|
||||
* remind file | <filter> | >log
|
||||
* and have <filter> hung because the child (us) is still
|
||||
* connected to it. This means the only commands that will be
|
||||
* processed correctly are RUN commands, provided they mail
|
||||
* the result back or use their own resource (as a window).
|
||||
*/
|
||||
if (!DontFork && (!isatty(1) || !isatty(2))) {
|
||||
close(1);
|
||||
close(2);
|
||||
}
|
||||
|
||||
/* If we're a daemon, get the mod time of initial file */
|
||||
if (Daemon) {
|
||||
if (stat(InitialFile, &StatBuf)) {
|
||||
fprintf(ErrFp, "Cannot stat %s - not running as daemon!\n",
|
||||
InitialFile);
|
||||
Daemon = 0;
|
||||
} else FileModTime = StatBuf.st_mtime;
|
||||
}
|
||||
|
||||
/* Initialize the queue - initialize all the entries time of issue */
|
||||
|
||||
while (q) {
|
||||
q->tt.nexttime = (int) (SystemTime(0)/60 - 1);
|
||||
q->tt.nexttime = CalculateNextTime(q);
|
||||
q = q->next;
|
||||
}
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
signal(SIGINT, SigIntHandler);
|
||||
#else
|
||||
if (!DontFork || Daemon) signal(SIGINT, SigIntHandler);
|
||||
#endif
|
||||
|
||||
/* Sit in a loop, issuing reminders when necessary */
|
||||
while(1) {
|
||||
q = FindNextReminder();
|
||||
|
||||
/* If no more reminders to issue, we're done unless we're a daemon. */
|
||||
if (!q && !Daemon) break;
|
||||
|
||||
if (Daemon && !q)
|
||||
TimeToSleep = (long) 60*Daemon;
|
||||
else
|
||||
TimeToSleep = (long) q->tt.nexttime * 60L - SystemTime(0);
|
||||
|
||||
while (TimeToSleep > 0L) {
|
||||
SleepTime = (unsigned) ((TimeToSleep > 30000L) ? 30000 : TimeToSleep);
|
||||
|
||||
if (Daemon && SleepTime > 60*Daemon) SleepTime = 60*Daemon;
|
||||
|
||||
sleep(SleepTime);
|
||||
|
||||
if (Daemon && SleepTime) CheckInitialFile();
|
||||
|
||||
if (Daemon && !q)
|
||||
TimeToSleep = (long) 60*Daemon;
|
||||
else
|
||||
TimeToSleep = (long) q->tt.nexttime * 60L - SystemTime(0);
|
||||
}
|
||||
|
||||
/* Trigger the reminder */
|
||||
CreateParser(q->text, &p);
|
||||
trig.typ = q->typ;
|
||||
RunDisabled = q->RunDisabled;
|
||||
#ifdef OS2_POPUP
|
||||
(void) TriggerReminder(&p, &trig, &q->tt, JulianToday, 1);
|
||||
#else
|
||||
(void) TriggerReminder(&p, &trig, &q->tt, JulianToday);
|
||||
#endif
|
||||
fflush(stdout);
|
||||
|
||||
/* Calculate the next trigger time */
|
||||
q->tt.nexttime = CalculateNextTime(q);
|
||||
}
|
||||
#ifdef __BORLANDC__
|
||||
signal(SIGINT, SIG_DFL);
|
||||
#endif
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* CalculateNextTime */
|
||||
/* */
|
||||
/* Calculate the next time when a reminder should be issued. */
|
||||
/* Return NO_TIME if reminder expired. */
|
||||
/* Strategy is: If a sched() function is defined, call it. */
|
||||
/* Otherwise, use AT time with delta and rep. If sched() */
|
||||
/* fails, revert to AT with delta and rep. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE int CalculateNextTime(QueuedRem *q)
|
||||
#else
|
||||
static int CalculateNextTime(q)
|
||||
QueuedRem *q;
|
||||
#endif
|
||||
{
|
||||
int tim = q->tt.ttime;
|
||||
int rep = q->tt.rep;
|
||||
int delta = q->tt.delta;
|
||||
int curtime = q->tt.nexttime+1;
|
||||
int r;
|
||||
|
||||
/* Increment number of times this one has been triggered */
|
||||
q->ntrig++;
|
||||
if (q->sched[0]) {
|
||||
r = CalculateNextTimeUsingSched(q);
|
||||
if (r != NO_TIME) return r;
|
||||
}
|
||||
if (delta == NO_DELTA)
|
||||
if (tim < curtime) return NO_TIME; else return tim;
|
||||
|
||||
tim -= delta;
|
||||
if (rep == NO_REP) rep = delta;
|
||||
if (tim < curtime) tim += ((curtime - tim) / rep) * rep;
|
||||
if (tim < curtime) tim += rep;
|
||||
if (tim > q->tt.ttime) tim = q->tt.ttime;
|
||||
if (tim < curtime) return NO_TIME; else return tim;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* FindNextReminder */
|
||||
/* */
|
||||
/* Find the next reminder to trigger */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE QueuedRem *FindNextReminder(void)
|
||||
#else
|
||||
static QueuedRem *FindNextReminder()
|
||||
#endif
|
||||
{
|
||||
QueuedRem *q = QueueHead;
|
||||
QueuedRem *ans = NULL;
|
||||
|
||||
while (q) {
|
||||
if (q->tt.nexttime != NO_TIME) {
|
||||
if (!ans) ans = q;
|
||||
else if (q->tt.nexttime < ans->tt.nexttime) ans = q;
|
||||
}
|
||||
|
||||
q = q->next;
|
||||
}
|
||||
return ans;
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* GotSigInt */
|
||||
/* */
|
||||
/* Split out what's done on a SIGINT from the SIGINT Handler. */
|
||||
/* This will be necessary for OS/2 multithreaded. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
void GotSigInt(void)
|
||||
#else
|
||||
void GotSigInt()
|
||||
#endif
|
||||
{
|
||||
QueuedRem *q = QueueHead;
|
||||
|
||||
printf("Contents of AT queue:%s", NL);
|
||||
|
||||
while (q) {
|
||||
if (q->tt.nexttime != NO_TIME) {
|
||||
printf("Trigger: %02d%c%02d Activate: %02d%c%02d Rep: %d Delta: %d Sched: %s",
|
||||
q->tt.ttime / 60, TIMESEP, q->tt.ttime % 60,
|
||||
q->tt.nexttime / 60, TIMESEP, q->tt.nexttime % 60,
|
||||
q->tt.rep, q->tt.delta, q->sched);
|
||||
if (*q->sched) printf("(%d)", q->ntrig+1);
|
||||
printf("%s", NL);
|
||||
printf("Text: %s %s%s%s", ((q->typ == MSG_TYPE) ? "MSG" :
|
||||
((q->typ == MSF_TYPE) ? "MSF" :"RUN")),
|
||||
q->text,
|
||||
NL, NL);
|
||||
}
|
||||
q = q->next;
|
||||
}
|
||||
printf(NL);
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* CheckInitialFile */
|
||||
/* */
|
||||
/* If the initial file has been modified, then restart the */
|
||||
/* daemon. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE void CheckInitialFile(void)
|
||||
#else
|
||||
static void CheckInitialFile()
|
||||
#endif
|
||||
{
|
||||
/* If date has rolled around, or file has changed, spawn a new version. */
|
||||
time_t tim = FileModTime;
|
||||
int y, m, d;
|
||||
|
||||
if (stat(InitialFile, &StatBuf) == 0) tim = StatBuf.st_mtime;
|
||||
if (tim != FileModTime ||
|
||||
RealToday != SystemDate(&y, &m, &d))
|
||||
execvp(ArgV[0], ArgV);
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* */
|
||||
/* CalculateNextTimeUsingSched */
|
||||
/* */
|
||||
/* Call the scheduling function. */
|
||||
/* */
|
||||
/***************************************************************/
|
||||
#ifdef HAVE_PROTOS
|
||||
PRIVATE int CalculateNextTimeUsingSched(QueuedRem *q)
|
||||
#else
|
||||
static int CalculateNextTimeUsingSched(q)
|
||||
QueuedRem *q;
|
||||
#endif
|
||||
{
|
||||
/* Use LineBuffer for temp. string storage. */
|
||||
int r;
|
||||
Value v;
|
||||
char *s;
|
||||
int LastTime = -1;
|
||||
int ThisTime;
|
||||
|
||||
if (UserFuncExists(q->sched) != 1) {
|
||||
q->sched[0] = 0;
|
||||
return NO_TIME;
|
||||
}
|
||||
|
||||
RunDisabled = q->RunDisabled; /* Don't want weird scheduling functions
|
||||
to be a security hole! */
|
||||
while(1) {
|
||||
sprintf(LineBuffer, "%s(%d)", q->sched, q->ntrig);
|
||||
s = LineBuffer;
|
||||
r = EvalExpr(&s, &v);
|
||||
if (r) {
|
||||
q->sched[0] = 0;
|
||||
return NO_TIME;
|
||||
}
|
||||
if (v.type == TIM_TYPE) {
|
||||
ThisTime = v.v.val;
|
||||
} else if (v.type == INT_TYPE) {
|
||||
if (v.v.val > 0)
|
||||
ThisTime = q->tt.nexttime + v.v.val;
|
||||
else
|
||||
ThisTime = q->tt.ttime + v.v.val;
|
||||
|
||||
} else {
|
||||
DestroyValue(v);
|
||||
q->sched[0] = 0;
|
||||
return NO_TIME;
|
||||
}
|
||||
if (ThisTime < 0) ThisTime = 0; /* Can't be less than 00:00 */
|
||||
if (ThisTime > 1439) ThisTime = 1439; /* or greater than 11:59 */
|
||||
if (ThisTime > q->tt.nexttime) return ThisTime;
|
||||
if (ThisTime <= LastTime) {
|
||||
q->sched[0] = 0;
|
||||
return NO_TIME;
|
||||
}
|
||||
LastTime = ThisTime;
|
||||
q->ntrig++;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* HAVE_QUEUED from way at the top */
|
||||
45
rem
45
rem
@@ -1,45 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# rem - by David Skoll - 26 February 1991
|
||||
#
|
||||
# $Id: rem,v 1.1 1996-03-27 03:26:06 dfs Exp $
|
||||
#
|
||||
# This script runs 'remind' with a default reminder file assumed. You
|
||||
# can override the default by using "rem -F newfile ..." (But why would
|
||||
# you use rem unless you wanted to accept the default??)
|
||||
|
||||
# ------ You may wish to change the defaults below this line ------
|
||||
|
||||
# The default reminder file
|
||||
DEFAULT=$HOME/.reminders
|
||||
|
||||
# The executable file (you may wish to change this to /usr/local/bin/remind
|
||||
# or whatever.
|
||||
EXECUTABLE=remind
|
||||
|
||||
# No options yet
|
||||
OPTIONS=""
|
||||
|
||||
# No parameters yet
|
||||
PARAMETERS=""
|
||||
|
||||
# ------ You shouldn't change anything below this line -----
|
||||
|
||||
# Scan for options
|
||||
while test "$1" != ""
|
||||
do
|
||||
case $1 in
|
||||
|
||||
-F) DEFAULT=$2
|
||||
shift
|
||||
shift ;;
|
||||
|
||||
-*) OPTIONS="$OPTIONS $1"
|
||||
shift ;;
|
||||
|
||||
*) PARAMETERS=$*
|
||||
break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
$EXECUTABLE $OPTIONS $DEFAULT $PARAMETERS
|
||||
35
rem.1
35
rem.1
@@ -1,35 +0,0 @@
|
||||
.\" $Id: rem.1,v 1.2 1996-04-28 02:02:01 dfs Exp $
|
||||
.TH REM 1 "26 February 1991"
|
||||
.UC 4
|
||||
.SH NAME
|
||||
rem \- run 'remind' with a default reminder file
|
||||
.SH SYNOPSIS
|
||||
.B rem
|
||||
[\-F \fIfilename\fR] [\fIremind_options\fR] [\fIremind_params\fR]
|
||||
.SH DESCRIPTION
|
||||
.B Rem
|
||||
runs the \fBremind\fR program with a default reminder file of
|
||||
"$HOME/.reminders". You can supply remind options on the command line,
|
||||
as well as a date specification, just as with \fBremind\fR.
|
||||
|
||||
If you don't want to use the default filename, you can override it with
|
||||
the "-F" option, followed by a space and a filename. (This, however,
|
||||
defeats the purpose of \fBrem\fR)
|
||||
.PP
|
||||
For example, typing:
|
||||
.PP
|
||||
.nf
|
||||
rem -c 1 jan 1992
|
||||
.fi
|
||||
.PP
|
||||
has the same effect as typing:
|
||||
.PP
|
||||
.nf
|
||||
remind -c $HOME/.reminders 1 jan 1992
|
||||
.fi
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
David F. Skoll
|
||||
.SH SEE ALSO
|
||||
remind, kall
|
||||
|
||||
30
rem2html/Makefile.in
Normal file
30
rem2html/Makefile.in
Normal file
@@ -0,0 +1,30 @@
|
||||
# Set by configure - don't touch.
|
||||
srcdir=@srcdir@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
mandir=@mandir@
|
||||
bindir=@bindir@
|
||||
datadir=@datadir@
|
||||
datarootdir=@datarootdir@
|
||||
PERL=@PERL@
|
||||
PERLMODS_NEEDED=JSON::MaybeXS Getopt::Long
|
||||
all:
|
||||
true
|
||||
|
||||
install:
|
||||
@if test "$(PERL)" = "" ; then \
|
||||
echo "Not installing rem2html; Perl is required"; exit 0; fi; \
|
||||
for m in $(PERLMODS_NEEDED) ; \
|
||||
do \
|
||||
$(PERL) -M$$m -e 1 > /dev/null 2>&1; \
|
||||
if test $$? != 0 ; then echo "Not installing rem2html; missing $$m"; exit 0; fi; \
|
||||
done; \
|
||||
pod2man --center "VERSION @VERSION@" --date "@RELEASE_DATE@" rem2html > rem2html.1 && mkdir -p $(DESTDIR)$(mandir)/man1 && cp rem2html.1 $(DESTDIR)$(mandir)/man1/rem2html.1 || true; \
|
||||
echo "Installing rem2html in $(DESTDIR)$(bindir)"; \
|
||||
mkdir -p $(DESTDIR)$(bindir) && sed -e 's|^#!perl|#!$(PERL)|' < rem2html > $(DESTDIR)$(bindir)/rem2html && chmod 755 $(DESTDIR)$(bindir)/rem2html && exit 0; \
|
||||
exit 1;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
12
rem2html/README.rem2html
Normal file
12
rem2html/README.rem2html
Normal file
@@ -0,0 +1,12 @@
|
||||
REM2HTML
|
||||
--------
|
||||
|
||||
rem2html is a Perl script that transforms the output of `remind -pp
|
||||
...' to HTML. Type `perl rem2html --help' for usage information.
|
||||
|
||||
rem2html requires the Perl modules `JSON::Any' and `Getopt::Long'. It
|
||||
will not be installed unless you have those modules as well as Perl
|
||||
itself.
|
||||
|
||||
--
|
||||
Dianne Skoll
|
||||
809
rem2html/rem2html
Normal file
809
rem2html/rem2html
Normal file
@@ -0,0 +1,809 @@
|
||||
#!perl
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Getopt::Long;
|
||||
use JSON::MaybeXS;
|
||||
use Encode;
|
||||
|
||||
my %Options;
|
||||
|
||||
my $rem2html_version = '2.1';
|
||||
|
||||
my($days, $shades, $moons, $classes, $Month, $Year, $Numdays, $Firstwkday, $Mondayfirst, $weeks,
|
||||
@Daynames, $Nextmon, $Nextlen, $Prevmon, $Prevlen);
|
||||
|
||||
my $TIDY_PROGNAME = $0;
|
||||
$TIDY_PROGNAME =~ s|^.*/||;
|
||||
|
||||
# rem2html -- convert the output of "remind -pp" to HTML
|
||||
|
||||
=head1 NAME
|
||||
|
||||
rem2html - Convert the output of "remind -pp" to HTML
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
remind -pp ... | rem2html [options]
|
||||
|
||||
You can also use the old interchange format as below, but the -pp
|
||||
version is preferred.
|
||||
|
||||
remind -p ... | rem2html [options]
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
=item --help, -h
|
||||
|
||||
Print usage information
|
||||
|
||||
=item --version
|
||||
|
||||
Print version
|
||||
|
||||
=item --utf8
|
||||
|
||||
Assume standard input is encoded in UTF-8; write UTF-8 data to standard
|
||||
output.
|
||||
|
||||
=item --backurl I<url>
|
||||
|
||||
When producing the small calendar for the previous month, make the
|
||||
month name a link to I<url>.
|
||||
|
||||
=item --forwurl I<url>
|
||||
|
||||
When producing the small calendar for the next month, make the
|
||||
month name a link to I<url>.
|
||||
|
||||
=item --imgbase I<url>
|
||||
|
||||
When creating URLs for the stylesheet or external images, use I<url>
|
||||
as the base URL.
|
||||
|
||||
=item --pngs
|
||||
|
||||
Normally, rem2html uses inline "data:" URLs for the moon phase images,
|
||||
yielding a standalone HTML file. The C<--pngs> option makes it use
|
||||
external images named firstquarter.png, fullmoon.png, lastquarter.png
|
||||
and newmoon.png, which are expected to live in C<--imgbase>.
|
||||
|
||||
=item --stylesheet I<url.css>
|
||||
|
||||
Use I<url.css> as the stylesheet. If this option is used,
|
||||
I<url.css> is interpreted relative to B<imgbase> I<unless> it starts
|
||||
with a "/".
|
||||
|
||||
=item --nostyle
|
||||
|
||||
Produce basic HTML that does not use a CSS stylesheet.
|
||||
|
||||
=item --tableonly
|
||||
|
||||
Output results as a E<lt>tableE<gt> ... E<lt>/tableE<gt> sequence only
|
||||
without any E<lt>htmlE<gt> or E<lt>bodyE<gt> tags.
|
||||
|
||||
=item --title I<title>
|
||||
|
||||
Use I<title> as the content between E<lt>titleE<gt> and E<lt>/titleE<gt>
|
||||
tags.
|
||||
|
||||
|
||||
=item --prologue I<html_text>
|
||||
|
||||
Insert I<html_text> right after the E<lt>bodyE<gt> tag.
|
||||
|
||||
=item --epilogue I<html_text>
|
||||
|
||||
Insert I<html_text> right before the E<lt>/bodyE<gt> tag.
|
||||
|
||||
=back
|
||||
|
||||
=head1 SPECIALS SUPPORTED
|
||||
|
||||
The rem2html back-end supports the following SPECIAL reminders:
|
||||
|
||||
=over
|
||||
|
||||
=item HTML
|
||||
|
||||
Add an HTML reminder to the calendar. All HTML tags are available.
|
||||
|
||||
=item HTMLCLASS
|
||||
|
||||
Add a CSS class to the box representing the trigger date. See
|
||||
"HIGHLIGHTING TODAY" for an example
|
||||
|
||||
=item WEEK, MOON, SHARE, COLOR
|
||||
|
||||
The standard SPECIALs supported by all back-ends
|
||||
|
||||
=back
|
||||
|
||||
=head1 HIGHLIGHTING TODAY
|
||||
|
||||
Older versions of rem2html used to highlight today's date with a red outline.
|
||||
The current version does not do that by default. If you wish to highlight
|
||||
today's date, add the following reminder to your reminders file:
|
||||
|
||||
REM [realtoday()] SPECIAL HTMLCLASS rem-today
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
rem2html was written by Dianne Skoll with much inspiration from an
|
||||
earlier version by Don Schwarz.
|
||||
|
||||
=head1 HOME PAGE
|
||||
|
||||
L<https://dianne.skoll.ca/projects/remind/>
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
B<remind>, B<rem2ps>, B<rem2pdf>, B<tkremind>
|
||||
=cut
|
||||
|
||||
sub usage
|
||||
{
|
||||
my ($exit_status) = @_;
|
||||
if (!defined($exit_status)) {
|
||||
$exit_status = 1;
|
||||
}
|
||||
print STDERR <<"EOM";
|
||||
$TIDY_PROGNAME: Produce an HTML calendar from the output of "remind -pp"
|
||||
|
||||
Usage: remind -pp ... | rem2html [options]
|
||||
|
||||
Options:
|
||||
|
||||
--help, -h Print usage information
|
||||
--utf8 Assume UTF-8 input and write UTF-8 output
|
||||
--man Show man page (requires "perldoc")
|
||||
--version Print version
|
||||
--backurl url Make the title on the previous month's small calendar
|
||||
entry a link to <url>
|
||||
--forwurl url Same as --backurl, but for the next month's small calendar
|
||||
--imgbase url Base URL of images and default stylesheet file
|
||||
--pngs Use external .PNG images for moon phases rater than
|
||||
inline data: URLs
|
||||
--stylesheet url.css URL of CSS stylesheet. If specified, imgbase is NOT
|
||||
prepended to url.css
|
||||
--nostyle Produce basic HTML that does not use a CSS stylesheet
|
||||
--tableonly Output results as a <table> only, no <html>, <body>, etc.
|
||||
--title string What to put in <title>...</title> tags
|
||||
--prologue html_text Text to insert at the top of the body
|
||||
--epilogue html_text Text to insert at the end of the body
|
||||
EOM
|
||||
exit($exit_status);
|
||||
}
|
||||
|
||||
sub smoosh
|
||||
{
|
||||
my ($first, $second) = @_;
|
||||
return $second unless defined ($first);
|
||||
return $second if $first eq '';
|
||||
return $second if ($second =~ m|^/|); # Absolute path given for second
|
||||
|
||||
# Squash multiple slashes
|
||||
$first =~ s|/+|/|g;
|
||||
|
||||
# Special case
|
||||
return "/$second" if ($first eq '/');
|
||||
|
||||
# Delete trailing slash
|
||||
$first =~ s|/$||;
|
||||
|
||||
return "$first/$second";
|
||||
}
|
||||
|
||||
sub parse_options
|
||||
{
|
||||
local $SIG{__WARN__} = sub { print STDERR "$TIDY_PROGNAME: $_[0]\n"; };
|
||||
if (!GetOptions(\%Options, "help|h",
|
||||
"man",
|
||||
"utf8",
|
||||
"pngs",
|
||||
"version",
|
||||
"stylesheet=s",
|
||||
"nostyle",
|
||||
"backurl=s",
|
||||
"forwurl=s",
|
||||
"title=s",
|
||||
"prologue=s",
|
||||
"epilogue=s",
|
||||
"imgbase=s",
|
||||
"tableonly")) {
|
||||
usage(1);
|
||||
}
|
||||
$Options{title} ||= 'HTML Calendar';
|
||||
|
||||
my $stylesheet = $Options{stylesheet};
|
||||
if ($stylesheet) {
|
||||
$Options{stylesheet} = smoosh($Options{imgbase}, $stylesheet);
|
||||
}
|
||||
if ($Options{utf8}) {
|
||||
binmode(STDIN, ':encoding(UTF-8)');
|
||||
binmode(STDOUT, ':encoding(UTF-8)');
|
||||
}
|
||||
}
|
||||
|
||||
sub start_output
|
||||
{
|
||||
return if ($Options{tableonly});
|
||||
|
||||
print("<html>\n<head>\n");
|
||||
if ($Options{utf8}) {
|
||||
print '<meta charset="UTF-8">' . "\n";
|
||||
}
|
||||
|
||||
print("<title>" . $Options{title} . "</title>\n");
|
||||
if (!$Options{nostyle}) {
|
||||
if ($Options{stylesheet}) {
|
||||
print('<link rel="stylesheet" type="text/css" href="' .
|
||||
$Options{stylesheet} . '">' . "\n");
|
||||
} else {
|
||||
print("<style>\n");
|
||||
print default_stylesheet();
|
||||
print("</style>\n");
|
||||
}
|
||||
}
|
||||
print("</head>\n<body>\n");
|
||||
if ($Options{prologue}) {
|
||||
print $Options{prologue} . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub end_output
|
||||
{
|
||||
return if ($Options{tableonly});
|
||||
if ($Options{epilogue}) {
|
||||
print $Options{epilogue} . "\n";
|
||||
}
|
||||
print("</body>\n</html>\n");
|
||||
}
|
||||
|
||||
sub parse_input
|
||||
{
|
||||
undef $days;
|
||||
undef $shades;
|
||||
undef $moons;
|
||||
undef $classes;
|
||||
undef $weeks;
|
||||
|
||||
my $found_data = 0;
|
||||
while(<STDIN>) {
|
||||
chomp;
|
||||
last if /^\# rem2ps2? begin$/;
|
||||
}
|
||||
|
||||
my $line;
|
||||
# Month Year numdays firstday monday_first_flag
|
||||
$line = <STDIN>;
|
||||
return 0 unless $line;
|
||||
chomp($line);
|
||||
($Month, $Year, $Numdays, $Firstwkday, $Mondayfirst) = split(' ', $line);
|
||||
|
||||
$Month =~ s/_/ /g;
|
||||
# Day names
|
||||
$line = <STDIN>;
|
||||
return 0 unless $line;
|
||||
chomp($line);
|
||||
@Daynames = split(' ', $line);
|
||||
|
||||
for (my $i=0; $i<7; $i++) {
|
||||
$Daynames[$i] =~ s/_/ /g;
|
||||
}
|
||||
|
||||
# Prevmon prevlen
|
||||
$line = <STDIN>;
|
||||
return 0 unless $line;
|
||||
chomp($line);
|
||||
($Prevmon, $Prevlen) = split(' ', $line);
|
||||
$Prevmon =~ s/_/ /g;
|
||||
|
||||
# Nextmon nextlen
|
||||
$line = <STDIN>;
|
||||
return 0 unless $line;
|
||||
chomp($line);
|
||||
($Nextmon, $Nextlen) = split(' ', $line);
|
||||
$Nextmon =~ s/_/ /g;
|
||||
|
||||
$found_data = 1;
|
||||
my $class;
|
||||
if ($Options{nostyle}) {
|
||||
$class = '';
|
||||
} else {
|
||||
$class = ' class="rem-entry"';
|
||||
}
|
||||
while(<STDIN>) {
|
||||
chomp;
|
||||
last if /^\# rem2ps2? end$/;
|
||||
next if /^\#/;
|
||||
my ($y, $m, $d, $special, $tag, $duration, $time, $body);
|
||||
if (m/^(\d*).(\d*).(\d*)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*(.*)$/) {
|
||||
($y, $m, $d, $special, $tag, $duration, $time, $body) =
|
||||
($1, $2, $3, $4, $5, $6, $7, $8);
|
||||
} elsif (/\{/) {
|
||||
my $obj;
|
||||
if ($Options{utf8}) {
|
||||
$obj = decode_json(encode('UTF-8', $_, Encode::FB_DEFAULT));
|
||||
} else {
|
||||
$obj = decode_json($_);
|
||||
}
|
||||
next unless ($obj->{date} =~ /^(\d+)-(\d+)-(\d+)$/);
|
||||
$y = $1;
|
||||
$m = $2;
|
||||
$d = $3;
|
||||
$special = $obj->{passthru} || '*';
|
||||
$tag = $obj->{tags} || '*';
|
||||
$duration = $obj->{duration} || '*';
|
||||
$time = $obj->{time} || '*';
|
||||
$body = $obj->{body};
|
||||
} else {
|
||||
next;
|
||||
}
|
||||
my $d1 = $d;
|
||||
$d1 =~ s/^0+//;
|
||||
$special = uc($special);
|
||||
if ($special eq 'HTML') {
|
||||
push(@{$days->[$d]}, $body);
|
||||
} elsif ($special eq 'HTMLCLASS') {
|
||||
$classes->[$d] = $body;
|
||||
} elsif ($special eq 'WEEK') {
|
||||
$body =~ s/^\s+//;
|
||||
$body =~ s/\s+$//;
|
||||
$weeks->{$d1} = $body;
|
||||
} elsif ($special eq 'MOON') {
|
||||
if ($body =~ /(\S+)\s+(\S+)\s+(\S+)\s+(.*)$/) {
|
||||
my ($phase, $moonsize, $fontsize, $msg) = ($1, $2, $3, $4);
|
||||
$moons->[$d]->{'phase'} = $phase;
|
||||
$moons->[$d]->{'msg'} = $msg;
|
||||
} elsif ($body =~ /(\S+)/) {
|
||||
$moons->[$d]->{'phase'} = $1;
|
||||
$moons->[$d]->{'msg'} = '';
|
||||
}
|
||||
} elsif ($special eq 'SHADE') {
|
||||
if ($body =~ /(\d+)\s+(\d+)\s+(\d+)/) {
|
||||
$shades->[$d] = sprintf("#%02X%02X%02X",
|
||||
($1 % 256), ($2 % 256), ($3 % 256));
|
||||
} elsif ($body =~ /(\d+)/) {
|
||||
$shades->[$d] = sprintf("#%02X%02X%02X",
|
||||
($1 % 256), ($1 % 256), ($1 % 256));
|
||||
}
|
||||
} elsif ($special eq 'COLOR' || $special eq 'COLOUR') {
|
||||
if ($body =~ /(\d+)\s+(\d+)\s+(\d+)\s+(.*)$/) {
|
||||
my($r, $g, $b, $text) = ($1, $2, $3, $4);
|
||||
my $color = sprintf("style=\"color: #%02X%02X%02X;\"",
|
||||
$r % 256, $g % 256, $b % 256);
|
||||
push(@{$days->[$d]}, "<p$class $color>" . escape_html($text) . '</p>');
|
||||
}
|
||||
} elsif ($special eq '*') {
|
||||
push(@{$days->[$d]}, "<p$class>" . escape_html($body) . '</p>');
|
||||
}
|
||||
}
|
||||
return $found_data;
|
||||
}
|
||||
|
||||
sub small_calendar
|
||||
{
|
||||
my($month, $monlen, $url, $first_col) = @_;
|
||||
if ($Mondayfirst) {
|
||||
$first_col--;
|
||||
if ($first_col < 0) {
|
||||
$first_col = 6;
|
||||
}
|
||||
}
|
||||
|
||||
if ($Options{nostyle}) {
|
||||
print "<td width=\"14%\">\n";
|
||||
print "<table border=\"0\">\n";
|
||||
print "<caption>";
|
||||
} else {
|
||||
print "<td class=\"rem-small-calendar\">\n";
|
||||
print "<table class=\"rem-sc-table\">\n";
|
||||
print "<caption class=\"rem-sc-caption\">";
|
||||
}
|
||||
print "<a href=\"$url\">" if ($url);
|
||||
print $month;
|
||||
print "</a>" if ($url);
|
||||
print "</caption>\n";
|
||||
|
||||
my $class;
|
||||
if ($Options{nostyle}) {
|
||||
print '<tr>';
|
||||
$class = ' align="right"';
|
||||
} else {
|
||||
print '<tr class="rem-sc-hdr-row">';
|
||||
$class = ' class="rem-sc-hdr"';
|
||||
}
|
||||
if (!$Mondayfirst) {
|
||||
print "<th$class>" . substr($Daynames[0], 0, 1) . '</th>';
|
||||
}
|
||||
for (my $i=1; $i<7; $i++) {
|
||||
print "<th$class>" . substr($Daynames[$i], 0, 1) . '</th>';
|
||||
}
|
||||
if ($Mondayfirst) {
|
||||
print "<th$class>" . substr($Daynames[0], 0, 1) . '</th>';
|
||||
}
|
||||
print("</tr>\n");
|
||||
my $col = 0;
|
||||
for (; $col<$first_col; $col++) {
|
||||
if ($col == 0) {
|
||||
print("<tr>\n");
|
||||
}
|
||||
if ($Options{nostyle}) {
|
||||
print("<td align=\"right\" width=\"14%\"> </td>");
|
||||
} else {
|
||||
print("<td class=\"rem-sc-empty-cell\"> </td>");
|
||||
}
|
||||
}
|
||||
|
||||
for (my $day=1; $day <= $monlen; $day++) {
|
||||
if ($col == 0) {
|
||||
print("<tr>\n");
|
||||
}
|
||||
$col++;
|
||||
if ($Options{nostyle}) {
|
||||
print("<td align=\"right\" width=\"14%\">$day</td>");
|
||||
} else {
|
||||
print("<td class=\"rem-sc-cell\">$day</td>");
|
||||
}
|
||||
if ($col == 7) {
|
||||
print("</tr>\n");
|
||||
$col = 0;
|
||||
}
|
||||
}
|
||||
if ($col) {
|
||||
while ($col < 7) {
|
||||
if ($Options{nostyle}) {
|
||||
print("<td align=\"right\" width=\"14%\"> </td>");
|
||||
} else {
|
||||
print("<td class=\"rem-sc-empty-cell\"> </td>");
|
||||
}
|
||||
$col++;
|
||||
}
|
||||
print("</tr>\n");
|
||||
}
|
||||
print("</table>\n");
|
||||
print "</td>\n";
|
||||
}
|
||||
|
||||
sub output_calendar
|
||||
{
|
||||
# Which column is 1st of month in?
|
||||
my $first_col = $Firstwkday;
|
||||
if ($Mondayfirst) {
|
||||
$first_col--;
|
||||
if ($first_col < 0) {
|
||||
$first_col = 6;
|
||||
}
|
||||
}
|
||||
|
||||
# Last column
|
||||
my $last_col = ($first_col + $Numdays - 1) % 7;
|
||||
|
||||
# Figure out how many rows
|
||||
my $number_of_rows = int(($first_col + $Numdays ) / 7 + 0.999);
|
||||
|
||||
# Add a row for small calendars if necessary
|
||||
if ($first_col == 0 && $last_col == 6) {
|
||||
$number_of_rows++;
|
||||
}
|
||||
|
||||
# Start the table
|
||||
my $class;
|
||||
if ($Options{nostyle}) {
|
||||
print '<table width="100%" border="1" cellspacing=\"0\"><caption>' .
|
||||
$Month . ' ' . $Year . '</caption>' . "\n";
|
||||
print '<tr>';
|
||||
$class = ' width="14%"';
|
||||
} else {
|
||||
print '<table class="rem-cal"><caption class="rem-cal-caption">' .
|
||||
$Month . ' ' . $Year . '</caption>' . "\n";
|
||||
print '<tr class="rem-cal-hdr-row">';
|
||||
$class = ' class="rem-cal-hdr"';
|
||||
}
|
||||
if (!$Mondayfirst) {
|
||||
print "<th$class>" . $Daynames[0] . '</th>';
|
||||
}
|
||||
for (my $i=1; $i<7; $i++) {
|
||||
print "<th$class>" . $Daynames[$i] . '</th>';
|
||||
}
|
||||
if ($Mondayfirst) {
|
||||
print "<th$class>" . $Daynames[0] . '</th>';
|
||||
}
|
||||
print "</tr>\n";
|
||||
|
||||
# Start the calendar rows
|
||||
my $col = 0;
|
||||
if ($Options{nostyle}) {
|
||||
print "<tr>\n";
|
||||
} else {
|
||||
print "<tr class=\"rem-cal-row rem-cal-row-$number_of_rows-rows\">\n";
|
||||
}
|
||||
if ($first_col > 0) {
|
||||
small_calendar($Prevmon, $Prevlen, $Options{backurl},
|
||||
($Firstwkday - $Prevlen + 35) % 7);
|
||||
$col++;
|
||||
}
|
||||
|
||||
if ($last_col == 6 && $first_col > 0) {
|
||||
small_calendar($Nextmon, $Nextlen, $Options{forwurl},
|
||||
($Firstwkday + $Numdays) % 7);
|
||||
$col++;
|
||||
}
|
||||
if ($Options{nostyle}) {
|
||||
$class = ' width="14%"';
|
||||
} else {
|
||||
$class = ' class="rem-empty rem-empty-$number_of_rows-rows"';
|
||||
}
|
||||
while ($col < $first_col) {
|
||||
print("<td$class> </td>\n");
|
||||
$col++;
|
||||
}
|
||||
|
||||
for (my $day=1; $day<=$Numdays; $day++) {
|
||||
draw_day_cell($day, $number_of_rows);
|
||||
$col++;
|
||||
if ($col == 7) {
|
||||
$col = 0;
|
||||
print "</tr>\n";
|
||||
if ($day < $Numdays) {
|
||||
if ($Options{nostyle}) {
|
||||
print "<tr>\n";
|
||||
} else {
|
||||
print "<tr class=\"rem-cal-row rem-cal-row-$number_of_rows-rows\">\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($col) {
|
||||
while ($col < 7) {
|
||||
if ($col == 5) {
|
||||
if ($first_col == 0) {
|
||||
small_calendar($Prevmon, $Prevlen, $Options{backurl},
|
||||
($Firstwkday - $Prevlen + 35) % 7);
|
||||
} else {
|
||||
print("<td$class> </td>\n");
|
||||
}
|
||||
} elsif ($col == 6) {
|
||||
small_calendar($Nextmon, $Nextlen, $Options{forwurl},
|
||||
($Firstwkday + $Numdays) % 7);
|
||||
} else {
|
||||
print("<td$class> </td>\n");
|
||||
}
|
||||
$col++;
|
||||
}
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
# Add a row for small calendars if they were not yet done!
|
||||
if ($first_col == 0 && $last_col == 6) {
|
||||
if ($Options{nostyle}) {
|
||||
print "<tr>\n";
|
||||
} else {
|
||||
print "<tr class=\"rem-cal-row rem-cal-row-$number_of_rows-rows\">\n";
|
||||
}
|
||||
small_calendar($Prevmon, $Prevlen, $Options{backurl},
|
||||
($Firstwkday - $Prevlen + 35) % 7);
|
||||
for (my $i=0; $i<5; $i++) {
|
||||
print("<td$class> </td>\n");
|
||||
}
|
||||
small_calendar($Nextmon, $Nextlen, $Options{forwurl},
|
||||
($Firstwkday + $Numdays) % 7);
|
||||
print("</tr>\n");
|
||||
}
|
||||
# End the table
|
||||
print "</table>\n";
|
||||
}
|
||||
|
||||
sub draw_day_cell
|
||||
{
|
||||
my($day, $number_of_rows) = @_;
|
||||
my $shade = $shades->[$day];
|
||||
my $week = '';
|
||||
if (exists($weeks->{$day})) {
|
||||
$week = ' ' . $weeks->{$day};
|
||||
}
|
||||
my $class;
|
||||
if ($Options{nostyle}) {
|
||||
$class = $classes->[$day] || '';
|
||||
} else {
|
||||
$class = $classes->[$day] || "rem-cell rem-cell-$number_of_rows-rows";
|
||||
}
|
||||
if ($shade) {
|
||||
$shade = " style=\"background: $shade;\"";
|
||||
} else {
|
||||
$shade = "";
|
||||
}
|
||||
if ($class ne '') {
|
||||
print "<td class=\"$class\"$shade>\n";
|
||||
} else {
|
||||
print "<td valign=\"top\" $shade>\n";
|
||||
}
|
||||
if ($moons->[$day]) {
|
||||
my $phase = $moons->[$day]->{'phase'};
|
||||
my $msg = $moons->[$day]->{'msg'};
|
||||
$msg ||= '';
|
||||
if ($msg ne '') {
|
||||
$msg = ' ' . escape_html($msg);
|
||||
}
|
||||
my $img;
|
||||
my $alt;
|
||||
my $title;
|
||||
if ($phase == 0) {
|
||||
if ($Options{pngs}) {
|
||||
$img = smoosh($Options{imgbase}, 'newmoon.png');
|
||||
} else {
|
||||
$img = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAGQAAABkABchkaRQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAC6SURBVDiNpdNNbsIwFATgL0HKolchHKBX6yFaBOEyoPYUabvOIVKJRaCL2JX5TRNGGvnJ8ozGz89cYoElPvET+BX2yivn/1Bggw5HHMKa1h2qcPZC/JEIhvh+brIZIY6sorhMYo9hh3KGFzzfa84NZNjDt9OG/ZcH1BlaPE1IAG0+URhxzNGESKPFaHJs9Q0Ziww7HnvGeXSrJhis0jiFfjwnj3I0WRv+TKtr4hQl3lDrZ6QN9Wt654hfWfGDmBpUwDkAAAAASUVORK5CYII=';
|
||||
}
|
||||
$title = 'New Moon';
|
||||
$alt = 'new';
|
||||
} elsif ($phase == 1) {
|
||||
if ($Options{pngs}) {
|
||||
$img = smoosh($Options{imgbase}, 'firstquarter.png');
|
||||
} else {
|
||||
$img = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAGQAAABkABchkaRQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAADfSURBVDiNndM9TsNAFATgzy5yjZSAE85JBygETgENUPF3iBCitHAFQkcIhZ/Ryn9gRlrZmp2Z3ef3TBOHOMULPrDBMrhpi/4HI5xjix2+4nmJRbx/Yh7ahvkpRPVV4QDXwT3UQy46zGkAZDgK/iytefvHgCrkJsqZUH6cLnNbABSxd5Jhhf1IbkMXv8Qux7hH1Ic1xvk/jBWy6gavumvtwx7ectwZXkKh7MA95XgObeOtpI2U4zl0kGbpxgiPvwQUcXLrKFchc82f6Ur0PK49azOnmOI4TBu84zm4SV38DeIVYkrYJyNbAAAAAElFTkSuQmCC';
|
||||
}
|
||||
$title = 'First Quarter';
|
||||
$alt = '1st';
|
||||
} elsif ($phase == 2) {
|
||||
if ($Options{pngs}) {
|
||||
$img = smoosh($Options{imgbase}, 'fullmoon.png');
|
||||
} else {
|
||||
$img = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAGQAAABkABchkaRQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAADlSURBVDiNrdNBUsJAEAXQlyw4hq4hwWPqTixET6ELkZ16CcAq7oFLqXExjaYgQVNlV/Viev7/6XT/4TjGuME7PiLXUatb8N8xwB12SFjiIXIZtU/MAntEfgvQE4YtHxhiHpjXQ5H7uLhEcaLLAleBvd0Xx9Ha/BdyU+Q5OBV5OKmj7a4YBWdSyNPe4aKHAHkzqcQZNj3JgnNexqE8heyIAulffuFF3kTfIVbBVeu/xoXGGsn2TLJJ/mqkafNiINszySYZdbS90GHlvcgsWktY4TFy7ecxTdvIzahxHQLbyFXUqkPwF2ASRNYgB/PXAAAAAElFTkSuQmCC';
|
||||
}
|
||||
$alt = 'full';
|
||||
$title = 'Full Moon';
|
||||
} else {
|
||||
if ($Options{pngs}) {
|
||||
$img = smoosh($Options{imgbase}, 'lastquarter.png');
|
||||
} else {
|
||||
$img = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAGQAAABkABchkaRQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAADmSURBVDiNndMxTsNAEIXhzy5yCyQ6FAgcE7oQheQWUAAl5BIkREoZrgB0GFNkHBl7bURGsryaee/3jHeXdpxjghU+8InXyI0S+n0MMEeBEi+4jfV3vAvMQtsyL0J0j2GtViaeRRMyj8IlsgY8BSijE2Kur/hy09wHKMJrEolhwtwHKDHOsI4OLnoAXfl1jiNsOkR9keE4P8D4q4scbzg5xIxtjie709f1E7siC+9+Gx/8fxvPKtEsklcJSBdgWhcN8ByFR5z+AWgd5QpyE+OUWOJO+zJNU+Z6jHAdgHe7K73CuD5zFT9nCmRDIssCaAAAAABJRU5ErkJggg==';
|
||||
}
|
||||
$alt = 'last';
|
||||
$title = 'Last Quarter';
|
||||
}
|
||||
if ($Options{nostyle}) {
|
||||
print("<div style=\"float: left\"><img border=\"0\" width=\"16\" height=\"16\" alt=\"$alt\" title=\"$title\" src=\"$img\">$msg</div>");
|
||||
} else {
|
||||
print("<div class=\"rem-moon\"><img width=\"16\" height=\"16\" alt=\"$alt\" title=\"$title\" src=\"$img\">$msg</div>");
|
||||
}
|
||||
}
|
||||
|
||||
if ($Options{nostyle}) {
|
||||
print "<div style=\"float: right\">$day$week</div>\n";
|
||||
print "<p> </p>\n";
|
||||
} else {
|
||||
print "<div class=\"rem-daynumber\">$day$week</div>\n";
|
||||
}
|
||||
if ($days->[$day]) {
|
||||
print(join("\n", @{$days->[$day]}));
|
||||
}
|
||||
|
||||
print "</td>\n";
|
||||
}
|
||||
|
||||
sub escape_html
|
||||
{
|
||||
my($in) = @_;
|
||||
$in =~ s/\&/\&/g;
|
||||
$in =~ s/\</\</g;
|
||||
$in =~ s/\>/\>/g;
|
||||
return $in;
|
||||
}
|
||||
|
||||
parse_options();
|
||||
if ($Options{help}) {
|
||||
usage(0);
|
||||
exit(0);
|
||||
} elsif ($Options{man}) {
|
||||
system("perldoc $0");
|
||||
exit(0);
|
||||
} elsif ($Options{version}) {
|
||||
print "rem2html version $rem2html_version.\n";
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (-t STDIN) { ## no critic
|
||||
print STDERR "$TIDY_PROGNAME: Input should not come from a terminal.\n\n";
|
||||
usage(1);
|
||||
}
|
||||
|
||||
my $found_something = 0;
|
||||
while(1) {
|
||||
last if (!parse_input());
|
||||
start_output() unless $found_something;
|
||||
$found_something = 1;
|
||||
output_calendar();
|
||||
}
|
||||
if ($found_something) {
|
||||
end_output();
|
||||
exit(0);
|
||||
} else {
|
||||
print STDERR "$TIDY_PROGNAME: Could not find any calendar data on STDIN.\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
sub default_stylesheet
|
||||
{
|
||||
return <<'EOF';
|
||||
table.rem-cal {
|
||||
font-family: helvetica, arial, sans-serif;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
table.rem-sc-table {
|
||||
font-family: helvetica, arial, sans-serif;
|
||||
font-size: 10pt;
|
||||
width: 95%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
caption.rem-cal-caption {
|
||||
font-size: 14pt;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
th.rem-cal-hdr {
|
||||
width: 14%;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
vertical-align: top;
|
||||
}
|
||||
td.rem-empty, td.rem-cell, td.rem-small-calendar {
|
||||
width: 14%;
|
||||
height: 7em;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
vertical-align: top;
|
||||
}
|
||||
td.rem-today {
|
||||
width: 14%;
|
||||
height: 7em;
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
border-color: #EE3333;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
table.rem-cal {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
div.rem-daynumber {
|
||||
float: right;
|
||||
text-align: right;
|
||||
vertical-align: top;
|
||||
font-size: 14pt;
|
||||
}
|
||||
|
||||
p.rem-entry {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
div.rem-moon {
|
||||
float: left;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
th.rem-sc-hdr {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
td.rem-sc-empty-cell, td.rem-sc-cell {
|
||||
text-align: right;
|
||||
width: 14%;
|
||||
}
|
||||
|
||||
caption.rem-sc-caption {
|
||||
font-size: 12pt;
|
||||
}
|
||||
EOF
|
||||
}
|
||||
23
rem2pdf/Makefile.PL.in
Normal file
23
rem2pdf/Makefile.PL.in
Normal file
@@ -0,0 +1,23 @@
|
||||
use ExtUtils::MakeMaker;
|
||||
{
|
||||
# Override pod2man options
|
||||
package MY;
|
||||
sub manifypods {
|
||||
my ($self,%attribs) = @_;
|
||||
my $result = $self->SUPER::manifypods(%attribs);
|
||||
$result =~ s/^(POD2MAN_EXE\s*=\s*)(.+)$/$1$2 --center 'VERSION @VERSION@' --date '@RELEASE_DATE@'/m;
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
WriteMakefile(
|
||||
NAME => 'Remind::PDF',
|
||||
AUTHOR => q{Dianne Skoll <dianne@skoll.ca>},
|
||||
VERSION => '@VERSION@',
|
||||
PREREQ_PM => {
|
||||
'Getopt::Long' => 0,
|
||||
'Cairo' => 0,
|
||||
'Pango' => 0,
|
||||
},
|
||||
EXE_FILES => [ 'bin/rem2pdf' ]
|
||||
);
|
||||
48
rem2pdf/Makefile.top.in
Normal file
48
rem2pdf/Makefile.top.in
Normal file
@@ -0,0 +1,48 @@
|
||||
# Set by configure - don't touch.
|
||||
srcdir=@srcdir@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
mandir=@mandir@
|
||||
bindir=@bindir@
|
||||
datadir=@datadir@
|
||||
datarootdir=@datarootdir@
|
||||
PERL=@PERL@
|
||||
PERLMODS_NEEDED=Getopt::Long Cairo Pango
|
||||
|
||||
all: Makefile
|
||||
@if test "$(PERL)" = "" ; then \
|
||||
echo "Not building rem2pdf; Perl is required"; exit 0; fi; \
|
||||
for m in $(PERLMODS_NEEDED) ; \
|
||||
do \
|
||||
$(PERL) -M$$m -e 1 > /dev/null 2>&1; \
|
||||
if test $$? != 0 ; then echo "Not building rem2pdf; missing $$m"; exit 0; fi; \
|
||||
done; \
|
||||
$(MAKE) all && exit 0; \
|
||||
exit 1;
|
||||
|
||||
install:
|
||||
@if test "$(PERL)" = "" ; then \
|
||||
echo "Not installing rem2pdf; Perl is required"; exit 0; fi; \
|
||||
for m in $(PERLMODS_NEEDED) ; \
|
||||
do \
|
||||
$(PERL) -M$$m -e 1 > /dev/null 2>&1; \
|
||||
if test $$? != 0 ; then echo "Not installing rem2pdf; missing $$m"; exit 0; fi; \
|
||||
done; \
|
||||
echo "Installing rem2pdf"; \
|
||||
if test "$(INSTALL_BASE)" != "" ; then \
|
||||
$(MAKE) install DESTDIR=$(DESTDIR) "INSTALL_BASE=$(INSTALL_BASE)" && exit 0; \
|
||||
elif test "$(prefix)" = "/usr" ; then \
|
||||
$(MAKE) install DESTDIR=$(DESTDIR) INSTALLDIRS=vendor && exit 0; \
|
||||
elif test "$(prefix)" = "/usr/local" ; then \
|
||||
$(MAKE) install DESTDIR=$(DESTDIR) && exit 0; \
|
||||
else \
|
||||
$(MAKE) install DESTDIR=$(DESTDIR) "INSTALL_BASE=$(prefix)" && exit 0; \
|
||||
fi; \
|
||||
exit 1;
|
||||
|
||||
Makefile: Makefile.PL
|
||||
if test "$(prefix)" != "/usr" -a "$(prefix)" != "/usr/local" -a "$(INSTALL_BASE)" = "" ; then \
|
||||
$(PERL) Makefile.PL @PERLARTIFACTS@ INSTALL_BASE=$(prefix) || true;\
|
||||
else \
|
||||
$(PERL) Makefile.PL @PERLARTIFACTS@ INSTALL_BASE=$(INSTALL_BASE) || true;\
|
||||
fi
|
||||
22
rem2pdf/README
Normal file
22
rem2pdf/README
Normal file
@@ -0,0 +1,22 @@
|
||||
rem2pdf is a Perl program that takes the output of "remind -p" and
|
||||
produces a PDF calendar. See "man rem2pdf" for details.
|
||||
|
||||
rem2pdf has the following Perl modules as prerequisites:
|
||||
|
||||
Pango - https://metacpan.org/pod/Pango
|
||||
Cairo - https://metacpan.org/pod/Cairo
|
||||
|
||||
On Debian or Debian-derived systems, these can be installed with:
|
||||
|
||||
apt install libpango-perl libcairo-perl
|
||||
|
||||
On Red Hat or Red Hat-derived systems, you need to install the perl-Pango
|
||||
and perl-Cairo RPMs, which may require adding other repos to your list of
|
||||
RPM sources.
|
||||
|
||||
rem2pdf is built and installed in the usual Perl program way:
|
||||
|
||||
perl Makefile.PL && make && sudo make install
|
||||
|
||||
--
|
||||
Dianne Skoll - <dianne@skoll.ca>
|
||||
526
rem2pdf/bin/rem2pdf.in
Normal file
526
rem2pdf/bin/rem2pdf.in
Normal file
@@ -0,0 +1,526 @@
|
||||
#!@PERL@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
use strict;
|
||||
use warnings;
|
||||
use lib '@prefix@/lib/perl5';
|
||||
|
||||
use Encode;
|
||||
use Cairo;
|
||||
use Pango;
|
||||
use Getopt::Long;
|
||||
|
||||
my $VERSION = '@VERSION@';
|
||||
|
||||
use Remind::PDF;
|
||||
|
||||
my $media_to_size = {
|
||||
"Letter" => [ 612, 792],
|
||||
"Tabloid" => [ 792, 1224],
|
||||
"Ledger" => [1224, 792],
|
||||
"Legal" => [ 612, 1008],
|
||||
"Statement" => [ 396, 612],
|
||||
"Executive" => [ 540, 720],
|
||||
"A3" => [ 842, 1190],
|
||||
"A4" => [ 595, 842],
|
||||
"A5" => [ 420, 595],
|
||||
"B4" => [ 729, 1032],
|
||||
"B5" => [ 519, 729],
|
||||
"Folio" => [ 612, 936],
|
||||
"Quarto" => [ 612, 780],
|
||||
"10x14" => [ 720, 1008],
|
||||
};
|
||||
|
||||
my $help = 0;
|
||||
|
||||
my $settings = {
|
||||
landscape => 0,
|
||||
numbers_on_left => 0,
|
||||
small_calendars => 0,
|
||||
fill_entire_page => 0,
|
||||
wrap_calendar => 0,
|
||||
media => 'Letter',
|
||||
width => 0,
|
||||
height => 0,
|
||||
|
||||
title_font => 'Sans',
|
||||
header_font => 'Sans',
|
||||
daynum_font => 'Sans Bold Oblique',
|
||||
entry_font => 'Sans',
|
||||
small_cal_font => 'Sans',
|
||||
|
||||
title_size => 14,
|
||||
header_size => 12,
|
||||
daynum_size => 14,
|
||||
entry_size => 8,
|
||||
|
||||
border_size => 4,
|
||||
line_thickness => 1,
|
||||
|
||||
margin_top => 36,
|
||||
margin_bottom => 36,
|
||||
margin_left => 36,
|
||||
margin_right => 36,
|
||||
|
||||
verbose => 0,
|
||||
};
|
||||
|
||||
my $me = $0;
|
||||
$me =~ s/^.*\///;
|
||||
|
||||
set_default_media();
|
||||
|
||||
sub usage
|
||||
{
|
||||
print <<"EOF";
|
||||
$me (version $VERSION): Convert Remind -pp output to a PDF calendar.
|
||||
|
||||
Usage: remind -pp [options] filename | $me [options] > out.pdf
|
||||
|
||||
Options:
|
||||
|
||||
--landscape, -l Print in landscape orientation
|
||||
--small-calendars=N Choose location for small calendars
|
||||
-cN Synonym for --small-calendars=N
|
||||
--left-numbers, -x Print day numbers on the left
|
||||
--fill-page, -e Fill the entire page
|
||||
--media=MEDIA, -mMEDIA Size for specified media
|
||||
--width=W, -wW Specify media width in 1/72nds of an inch
|
||||
--height=H, -hH Specify media height in 1/72nds of an inch
|
||||
--wrap, -y Make calendar fit in at most 5 rows
|
||||
--title-font=FONT Specify font for calendar title
|
||||
--header-font=FONT Specify font for weekday names
|
||||
--daynum-font=FONT Specify font for day numbers
|
||||
--entry-font=FONT Specify font for calendar entries
|
||||
--small-cal-font=FONT Specify font for small calendars
|
||||
--title-size=S Specify size of font for calendar title in points
|
||||
--header-size=S Specify size of font for weekday names
|
||||
--daynum-size=S Specify size of font for day numbers
|
||||
--entry-size=S Specify size of font for calendar entries
|
||||
--border-size=S Specify size of gaps between items in 1/72nds of an inch
|
||||
--line-thickness=S Specify line thickness in 1/72nds of an inch
|
||||
--margin-top=S Specify top margin size in 1/72nds of an inch
|
||||
--margin-bottom=S Specify bottom margin size in 1/72nds of an inch
|
||||
--margin-left=S Specify left margin size in 1/72nds of an inch
|
||||
--margin-right=S Specify right margin size in 1/72nds of an inch
|
||||
--verbose, -v Print progress messages
|
||||
--help Display this help
|
||||
EOF
|
||||
}
|
||||
|
||||
Getopt::Long::Configure('bundling_values');
|
||||
|
||||
my $ret = GetOptions('landscape|l' => \$settings->{landscape},
|
||||
'small-calendars|c=i' => \$settings->{small_calendars},
|
||||
'left-numbers|x' => \$settings->{numbers_on_left},
|
||||
'fill-page|e' => \$settings->{fill_entire_page},
|
||||
'media|m=s' => \$settings->{media},
|
||||
'width|w=i' => \$settings->{width},
|
||||
'wrap|y' => \$settings->{wrap_calendar},
|
||||
'height|h=i' => \$settings->{height},
|
||||
'title-font=s' => \$settings->{title_font},
|
||||
'header-font=s' => \$settings->{header_font},
|
||||
'daynum-font=s' => \$settings->{daynum_font},
|
||||
'entry-font=s' => \$settings->{entry_font},
|
||||
'small-cal-font=s' => \$settings->{small_cal_font},
|
||||
'title-size=f' => \$settings->{title_size},
|
||||
'header-size=f' => \$settings->{header_size},
|
||||
'daynum-size=f' => \$settings->{daynum_size},
|
||||
'entry-size=f' => \$settings->{entry_size},
|
||||
'border-size=f' => \$settings->{border_size},
|
||||
'line-thickness=f' => \$settings->{line_thickness},
|
||||
'margin-top=f' => \$settings->{margin_top},
|
||||
'margin-bottom=f' => \$settings->{margin_bottom},
|
||||
'margin-left=f' => \$settings->{margin_left},
|
||||
'margin-right=f' => \$settings->{margin_right},
|
||||
'verbose|v' => \$settings->{verbose},
|
||||
'help' => \$help
|
||||
);
|
||||
if (!$ret) {
|
||||
usage();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ($help) {
|
||||
usage();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if ($settings->{width} <= 0 ||
|
||||
$settings->{height} <= 0) {
|
||||
my $size = $media_to_size->{ucfirst($settings->{media})};
|
||||
if (!$size) {
|
||||
if (lc($settings->{media}) ne 'help') {
|
||||
print STDERR "Unknown media " . $settings->{media} . "\n";
|
||||
}
|
||||
set_default_media();
|
||||
printf("%-12s Size in 1/72 in\n", "Valid media:");
|
||||
foreach my $m (sort { $a cmp $b } (keys(%$media_to_size))) {
|
||||
if ($m eq $settings->{media}) {
|
||||
print "* ";
|
||||
} else {
|
||||
print " ";
|
||||
}
|
||||
printf("%-12s %4d x %4d\n", $m,
|
||||
$media_to_size->{$m}->[0],
|
||||
$media_to_size->{$m}->[1]);
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
$settings->{width} = $size->[0];
|
||||
$settings->{height} = $size->[1];
|
||||
}
|
||||
|
||||
if ($settings->{landscape}) {
|
||||
my $tmp = $settings->{width};
|
||||
$settings->{width} = $settings->{height};
|
||||
$settings->{height} = $tmp;
|
||||
}
|
||||
|
||||
# Don't read from a terminal
|
||||
if (-t STDIN) { ## no critic
|
||||
print STDERR "I can't read data from a terminal. Please run like this:\n";
|
||||
print STDERR " remind -pp [options] filename | $me [options] > out.pdf\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
my $done_one = 0;
|
||||
|
||||
my $errored_out = 0;
|
||||
|
||||
my $surface = Cairo::PdfSurface->create_for_stream(sub { print $_[1] unless $errored_out; }, undef,
|
||||
$settings->{width}, $settings->{height});
|
||||
|
||||
# set_metadata not available in older versions of Cairo
|
||||
eval { $surface->set_metadata('title', 'Calendar'); };
|
||||
eval { $surface->set_metadata('author', 'Remind (https://dianne.skoll.ca/projects/remind/)'); };
|
||||
eval { $surface->set_metadata('creator', 'rem2pdf (https://dianne.skoll.ca/projects/remind/)'); };
|
||||
eval { $surface->set_metadata('subject', 'Calendar'); };
|
||||
|
||||
my $cr = Cairo::Context->create($surface);
|
||||
$cr->set_line_width($settings->{line_thickness});
|
||||
|
||||
while(1) {
|
||||
my ($obj, $err) = Remind::PDF->create_from_stream(*STDIN,
|
||||
{color => 1,
|
||||
shade => 1,
|
||||
moon => 1,
|
||||
pango => 1,
|
||||
week => 1,});
|
||||
|
||||
if (!$obj) {
|
||||
if (!$done_one) {
|
||||
$errored_out = 1;
|
||||
print STDERR "$me: $err\n";
|
||||
exit(1);
|
||||
}
|
||||
last;
|
||||
}
|
||||
$done_one = 1;
|
||||
$obj->render($cr, $settings);
|
||||
}
|
||||
|
||||
$surface->finish();
|
||||
|
||||
sub set_default_media
|
||||
{
|
||||
my $paper;
|
||||
$paper = $ENV{PAPERSIZE};
|
||||
if ($paper && set_media(ucfirst($paper))) {
|
||||
return 1;
|
||||
}
|
||||
if ($ENV{PAPERCONF}) {
|
||||
if (set_media_from_file($ENV{PAPERCONF})) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if (set_media_from_file('/etc/papersize')) {
|
||||
return 1;
|
||||
}
|
||||
return set_media('Letter');
|
||||
}
|
||||
|
||||
sub set_media
|
||||
{
|
||||
my ($m) = @_;
|
||||
|
||||
return 0 unless $media_to_size->{$m};
|
||||
$settings->{media} = $m;
|
||||
return 1;
|
||||
}
|
||||
|
||||
sub set_media_from_file
|
||||
{
|
||||
my ($fn) = @_;
|
||||
my $IN;
|
||||
if (!open($IN, '<', $fn)) {
|
||||
return 0;
|
||||
}
|
||||
while(<$IN>) {
|
||||
chomp;
|
||||
s/^\s+//;
|
||||
s/\s+$//;
|
||||
next if ($_ eq '');
|
||||
next if ($_ =~ /^#/);
|
||||
my $m = $_;
|
||||
close($IN);
|
||||
return set_media($m);
|
||||
}
|
||||
close($IN);
|
||||
return 0;
|
||||
}
|
||||
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
rem2pdf - draw a PDF calendar from Remind output
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
remind -pp [options] file | rem2pdf [options] > output.pdf
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
B<rem2pdf> reads the standard input, which should be the results of
|
||||
running B<remind> with the B<-p>, B<-pp> or B<-ppp> options. It emits
|
||||
PDF code that draws a calendar to standard output.
|
||||
|
||||
B<rem2pdf> uses the Pango text formatting library (L<https://pango.gnome.org/>)
|
||||
and the Cairo graphics library (L<https://www.cairographics.org/>) to produce
|
||||
its output. The CPAN modules Pango (L<https://metacpan.org/pod/Pango>)
|
||||
and Cairo (L<https://metacpan.org/pod/Cairo>) are prerequisites.
|
||||
|
||||
B<rem2pdf> assumes that its input stream is valid UTF-8. If this is not
|
||||
the case, it may render output incorrectly or even fail to render
|
||||
output at all.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over
|
||||
|
||||
=item --landscape, -l
|
||||
|
||||
Print the calendar in landscape orientation. Essentially, this swaps
|
||||
the width and height of the output media.
|
||||
|
||||
=item --small-calendars=I<n>, -cI<n>
|
||||
|
||||
Control the inclusion of small calendars for the previous and next
|
||||
month. Possible values for I<n> are:
|
||||
|
||||
=over
|
||||
|
||||
=item Z<>0
|
||||
|
||||
Do not draw any small calendares
|
||||
|
||||
=item Z<>1
|
||||
|
||||
Place the small calendars at the bottom-right if there is room;
|
||||
otherwise, place them at the top-left.
|
||||
|
||||
=item Z<>2
|
||||
|
||||
Place the small calendars at the top-left if there is room; otherwise,
|
||||
place them at the bottom-right.
|
||||
|
||||
=item Z<>3
|
||||
|
||||
Place the previous month's small calendar at the top-left and the next
|
||||
month's at the bottom-right if there is room; otherwise, follow
|
||||
I<n>=1. A moment's thought reveals that an option which splits the
|
||||
calendars if there is room and otherwise follows I<n>=2 yields the
|
||||
same results.
|
||||
|
||||
=back
|
||||
|
||||
=item --left-numbers, -x
|
||||
|
||||
Draw the day numbers in the top-left corner of each day's box rather than
|
||||
the default top-right.
|
||||
|
||||
=item --fill-page, -e
|
||||
|
||||
Make the calendar fill the available space on the page.
|
||||
|
||||
=item --media=I<media>, -mI<media>
|
||||
|
||||
Specify the paper size (Letter, A4, etc.) For a list of valid media sizes,
|
||||
run:
|
||||
|
||||
rem2pdf --media=help
|
||||
|
||||
The default media size will be marked with an asterisk.
|
||||
|
||||
=item --width=I<n>, -wI<n>, --height=I<m>, -hI<m>
|
||||
|
||||
Rather than specifying a named media size, directly specify the width
|
||||
and height of the output in 1/72ths of an inch. You must specify both
|
||||
width and height for the options to be respected.
|
||||
|
||||
=item --title-font=I<font>
|
||||
|
||||
Specify the font used for the calendar title. It can be any font that
|
||||
the Pango library on your system can use. The default is Sans. If
|
||||
you choose a font with spaces in its name, you may need to quote this
|
||||
argument.
|
||||
|
||||
=item --header-font=I<font>
|
||||
|
||||
Specify the font used for the weekday names. The default is Sans.
|
||||
|
||||
=item --daynum-font=I<font>
|
||||
|
||||
Specify the font used for the day numbers. The default is
|
||||
Sans Bold Oblique.
|
||||
|
||||
=item --entry-font=I<font>
|
||||
|
||||
Specify the font used for calendar entries. The default is Sans.
|
||||
|
||||
=item --small-cal-font=I<font>
|
||||
|
||||
Specify the font used for the small next- and previous-month
|
||||
calendars. The default is Sans.
|
||||
|
||||
=item --title-size=I<n>
|
||||
|
||||
Specify the size of the title font in 1/72ths of an inch. The default
|
||||
is 14. This size, and indeed all following sizes, may be specified as
|
||||
floating-point numbers.
|
||||
|
||||
=item --header-size=I<n>
|
||||
|
||||
Specify the size of the header font in 1/72ths of an inch. The default is 14.
|
||||
|
||||
=item --daynum-size=I<n>
|
||||
|
||||
Specify the size of the day number font in 1/72ths of an inch. The
|
||||
default is 14.
|
||||
|
||||
=item --entry-size=I<n>
|
||||
|
||||
Specify the size of the calendar entry font in 1/72ths of an inch.
|
||||
The default is 8.
|
||||
|
||||
=item --border-size=I<n>
|
||||
|
||||
Specify the size of the blank border between the contents of a calendar
|
||||
box and the centre of the lines surrounding it, in 1/72ths of an inch.
|
||||
The default is 4.
|
||||
|
||||
=item --line-thickness=I<n>
|
||||
|
||||
Specify the thickness of the lines drawn on the calendar. The default is 1.
|
||||
|
||||
=item --margin-top=I<n>
|
||||
|
||||
The size of the margin at the top of the page in 1/72ths of an inch.
|
||||
The default is 36.
|
||||
|
||||
=item --margin-bottom=I<n>
|
||||
|
||||
The size of the margin at the bottom of the page in 1/72ths of an inch.
|
||||
The default is 36.
|
||||
|
||||
=item --margin-left=I<n>
|
||||
|
||||
The size of the margin at the left of the page in 1/72ths of an inch.
|
||||
The default is 36.
|
||||
|
||||
=item --margin-right=I<n>
|
||||
|
||||
The size of the margin at the right of the page in 1/72ths of an inch.
|
||||
The default is 36.
|
||||
|
||||
=item --wrap, -y
|
||||
|
||||
Modify the calendar so that if it would normally require 6 rows to print,
|
||||
then the last day (or last two days, as needed) are moved to the
|
||||
first row of the calendar, and adjust the small calendar positions
|
||||
as needed. This results in a calendar that only requires 5 rows, but
|
||||
with the last day or two appearing in the I<first> row.
|
||||
|
||||
=item --verbose, -v
|
||||
|
||||
Print (on STDERR) the name of the month and year for each month that
|
||||
is rendered.
|
||||
|
||||
=back
|
||||
|
||||
=head1 USAGE
|
||||
|
||||
To use B<rem2df>, pipe the output of B<remind> with one of the
|
||||
B<-p>, B<-pp> or B<-ppp> options into B<rem2pdf>. The PDF output
|
||||
will be sent to standard output. So for example, to print a 12-month
|
||||
calendar for the year 2030, use:
|
||||
|
||||
remind -pp12 /dev/null Jan 2030 | rem2pdf -e -l -c3 | lpr
|
||||
|
||||
You can concatenate multiple B<remind> runs. For example, the following
|
||||
will produce a PDF calendar for January through March of 2023, and
|
||||
June of 2023 (for a total of four pages);
|
||||
|
||||
(remind -pp3 /dev/null Jan 2023 ; \
|
||||
remind -pp /dev/null June 2023) | rem2pdf -e -l -c3 > cal.pdf
|
||||
|
||||
=head1 FORMATTED TEXT
|
||||
|
||||
B<rem2pdf> supports a B<SPECIAL> reminder type called B<PANGO>. This
|
||||
lets you format text using the Pango markup language, described at
|
||||
L<https://docs.gtk.org/Pango/pango_markup.html>. Here are some
|
||||
examples:
|
||||
|
||||
REM Mon SPECIAL PANGO <b>Bold</b> and <i>italic</i>
|
||||
REM Tue SPECIAL PANGO <span face="zapf chancery">Fancy</span>
|
||||
REM Wed SPECIAL PANGO <span foreground="red"><b>Bold red</b></span>
|
||||
|
||||
Other back-ends such as B<rem2ps> and B<rem2html> will ignore PANGO
|
||||
special reminders.
|
||||
|
||||
Neither B<remind> nor B<rem2pdf> will check the markup to ensure
|
||||
it is syntactically correct. If you use invalid Pango markup, the
|
||||
Pango library will print a warning and B<rem2pdf> will not render any
|
||||
output for the invalid reminder.
|
||||
|
||||
=head1 ABSOLUTELY-POSITIONED TEXT
|
||||
|
||||
If your B<PANGO> special reminder starts with C<@I<x>,I<y>> where I<x>
|
||||
and I<y> are floating-point numbers, then the Pango marked-up test is
|
||||
positioned absolutely with respect to the day's box (and is not
|
||||
counted when calculating the box's height.)
|
||||
|
||||
A positive I<x> value positions the left edge of the text I<x> points
|
||||
to the right of the left side of the calendar box, while a negative
|
||||
I<x> value positions the right edge of the text I<x> points to the left
|
||||
of the right side of the calendar box.
|
||||
|
||||
A positive I<y> value positions the top edge of the text I<y> points
|
||||
below the top of the calendar box, while a negative I<y> value
|
||||
positions the bottom edge of the text I<y> points above the bottom of
|
||||
the calendar box.
|
||||
|
||||
If you use absolutely-positioned text, it's up to you to make sure it
|
||||
doesn't overlap other text; B<rem2pdf> takes no special precautions to
|
||||
prevent this.
|
||||
|
||||
As an example, this places Sunrise and Sunset times at the bottom left
|
||||
of each calendar box:
|
||||
|
||||
REM SPECIAL PANGO @1,-1 <span size="4800"><i>Rise [sunrise($U)] Set [sunset($U)]</i></span>
|
||||
|
||||
(Note that Pango expresses font sizes in 1024's of a point, so a size of
|
||||
4800 works out to about 4.6 points.)
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
B<Rem2PDF> was written by Dianne Skoll <dianne@skoll.ca>
|
||||
|
||||
=head1 HOME PAGE
|
||||
|
||||
L<https://dianne.skoll.ca/projects/remind/>
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
B<remind>, B<rem2ps>, B<rem2html>, B<tkremind>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user