AGENDA. An event-scheduler C1991 Pagani Massimiliano 0 DISTRIBUTION RULES You can freely copy this program and give a copy to anyone you want exclusively free (no charge on it). When you give away this program you must include the files 'agenda.c', 'agenda.doc' and 'agenda.e.doc'. Nobody can modify the files agenda.doc, agenda.e.doc and agenda.c without the written authorization from the author. The author is not responsible for data loses or damages deriving from the use direct, or not, correct, or not, of AGENDA. OK. stop with this & go on. 0.1 Files AGENDA must be distributed with the following files: AGENDA - the executable (12444 bytes) AGENDA.c - the source (6867 bytes) AGENDA.doc - italian version of this doc (9777 bytes) AGENDA.e.doc - this english doc (8530 bytes) If you can't find all this file, you can ask them directly to me. My address is at the end of this file. 0.2 Translation I'm from Italy and my native language is italian, so I've used it in my program. If you want an english version, you have to substitute italian strings in english one: week days Sabato -> Saturday Domenica -> Sunday Lunedì -> Monday Martedì -> Tuesday Mercoledì -> Wednesday Giovedì -> Thursday Venerdì -> Friday months of the year gennaio -> january febbraio -> february marzo -> march aprile -> april maggio -> may giugno -> june luglio -> july agosto -> august settembre -> september ottobre -> october novembre -> november dicembre -> december Simply change every occorrence of this strings in agenda.c and then recompile it. 1 WHAT DOES AGENDA DO? Every time you invoke AGENDA, it shows the events of the next ten days. The events are in the file "Grasso:etc/appuntamenti". If you don't like this place for this file, you can change the `NOME_AGENDA' costant value (line 41). Otherwise you can make the `etc' directory where you prefer and then assign the device `Grasso' to where `etc' is located. For example if you want to keep `etc' in the S: directory, you have to do this way: 1> makedir S:etc 1> assign Grasso: S: I haven't put the events file in the s: directory from the beginning because it is in the boot partition of my hard disk. 2 THE EVENTS FILE In this file there are all the events agenda will show a maximum of ten day before. To change the range from 10 days you have to modify and recompile the program. (Maybe in a future version...). This file is organized line by line. Every line that begins with any character but digits and '*' will be ignored, as every empty line. 2.1 FIXED EVENTS Every non-ignored line must contain an event with the following format: ddmmyy [hh:mm:[ss]] [event description] ddmmyy is the event date, for example 140991 is for 14 September 1991. I suppose that around the year 2000 there will be some problems using AGENDA, as there will be in every system using only the last two digits to specify a year. But I think the in the 2000 we all will have already changed computer. If this should be a serious problem it will be enough to check the year, for example you can implement that years less than 78 are 2000..2078, while years more than 78 are 1979..1999. Another way to solve this problem is to expand the year to four digits (ddmmyyyy), in this case I think you should have some problem around year 10000 (eh eh :). A space must follow the date, then you can specify the event hour. The event hour must be formatted as hh:mm or hh:mm:ss. Note that are all two digits numbers. i.e. if you want to set 9:00, you have to type 09:00. There are no particular checks on syntax correctness. An error in the events file could cause confusion to AGENDA, but it shouldn't degenerate in a GURU. Event description is facultative, but it makes no sense not writing the description of the event we want to REMEMBER. 2.2 PERIODICAL EVENTS To specify a periodical event (for example a birthday) you have to put `**' instead of the two year digits. For example: 2908** Massimiliano (Pagani) birthday. Remember present! will remember you my birthday (If you'll let me know in advance I'll give you a list of the presents I'm interested). You can specify an event which happens every month: 18**91 buy Spider Man comics But if you want to buy `Spider Man' every month of all future years you have to insert the following line in your event file: 18**** buy Spider Man comics (only if you are a Spidey fan). You can also specify an event which happens every day using six `*', but if you forget something that you have to do every day, I suggest you to go to a very EXPERT doctor. 2.3 EVENTS FILE STRUCTURE In the events file you have first to include sorted periodical events, then sorted fixed event. The last set must be sorted from the nearest event in the future, to the most remote. If you have any problem creating your own events file, i suggest you to modify my `appuntamenti' file (this works! I grant you) until you understand how AGENDA works. 2.4 MODIFING EVENTS FILE To create and modify this file will suffice an ascii editor. You can use the ed command in the C: directory or mEmacs in the extras disk, or the TxEd+ (that is share-ware) or CygnusEd (that isn't share-ware). 3 USE Simply invoke AGENDA without parameters and you get the events of the next ten days recorded in the "Grasso:etc/appuntamenti" file. I've found very useful to insert it in the s:shell-startup in the following way: (...) IF NOT EXISTS ENV:agenda agenda SETENV agenda fatto ENDIF (...) In this way AGENDA will be displayed only in the first opened shell. If you invoke AGENDA with one or more parameters you'll get the following message: 1> agenda ? Agenda v1.0 -------------------------- © 1991 Pagani Massimiliano read 'agenda.doc' or 'agenda.e.doc' to see how Agenda 1.0 works. I'm sorry, but it's not easy to explain what AGENDA does in few words. 4. LIMITS AGENDA works at the best on a computer (not necessarily an Amiga) with battery backed up clock and a hard disk. AGENDA is acceptable on a computer without hard-disk, but it's very uncomformtable yo use if you have to set every time the date. The algorithm for computing the day of the month works only with Gregorian calendar, this shouldn't be a problem, since AGENDA is to remember you FUTURE events. As said before there'll be some problems from year 2000 on, but i'm too lazy to see what kind of problem and how to eliminate it. 5 SOON ON YOUR SCREENS There are some ideas on AGENDA future. First it's possible to add some options to read events from any file, to see events any number of days in advance, to display sorted events. With quite a lot of work I could make AGENDA entirely mouse driven, with intuition event creation and modification. With other works it will be possible to use AGENDA directly from Workbench and put it in the 2.0 startup-drawer. Much work again and I can integrate AGENDA with a phone directory, then with a tetris game, with the new Eliza version, with an expert system for mineral classification and make it read internet mail and news :). Unfortunately every modify of this eat up space. Now AGENDA is something more than 10k, then it's not a very little program. It's possible to rewrite it in machine code or recompile it with space optimization option. Anyway an intuition interfaces take always at least 20-30k. For what you get from AGENDA it is a little too big, and make it bigger means to slow down loadings. Who has a hard disk, like me, doesn't care, but Who has floppy disk and must wait some minutes to end the startup-sequence... 6 FINALS I've used AGENDA for 5 month executing it practically every day and I've never had trouble. If you sum this to the polite programmation rules I've learned on the school desk and on the work field, you get a good anti-GURU insurance. AGENDA is NOT a pure program, i.e. if you make it resident you can't run more than a copy of it at once. If you often use AGENDA and you find it useful, your coscience could insist to make you send me some money. Since I don't want go against your coscience, here is my address: Pagani Massimiliano via Mazzini 40 21052 Busto Arsizio (VA) ITALIA You can send there suggestions, questions, problems or requests for the last CAL version (with a blank disk), or other PD software, too. You can also contact me at the following e-mail address: ele0001@cdc835.cdc.polimi.it I'm not interested in copied software but PD and share-ware. Thanks and enjoy.