home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2303 < prev    next >
SHell self-extracting ARchive  |  1990-12-28  |  34.2 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: SHell self-extracting ARchive (archive/shar).

You can browse this item here: 2303

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news or mail, ASCII text default
100% TrID E-Mail message (Var. 2) default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/rfc822 default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 3a 20 6a 61 | 73 6f 6e 40 67 63 78 31 |From: ja|son@gcx1|
|00000010| 2e 73 73 64 2e 63 73 64 | 2e 68 61 72 72 69 73 2e |.ssd.csd|.harris.|
|00000020| 63 6f 6d 20 28 4a 61 73 | 6f 6e 20 42 61 69 65 74 |com (Jas|on Baiet|
|00000030| 74 6f 29 0a 4e 65 77 73 | 67 72 6f 75 70 73 3a 20 |to).News|groups: |
|00000040| 61 6c 74 2e 73 6f 75 72 | 63 65 73 0a 53 75 62 6a |alt.sour|ces.Subj|
|00000050| 65 63 74 3a 20 78 64 69 | 61 72 79 20 33 2f 35 20 |ect: xdi|ary 3/5 |
|00000060| 28 58 20 62 61 73 65 64 | 20 63 61 6c 65 6e 64 61 |(X based| calenda|
|00000070| 72 20 61 6e 64 20 64 69 | 61 72 79 29 0a 4d 65 73 |r and di|ary).Mes|
|00000080| 73 61 67 65 2d 49 44 3a | 20 3c 31 37 39 36 40 74 |sage-ID:| <1796@t|
|00000090| 72 61 76 69 73 2e 63 73 | 64 2e 68 61 72 72 69 73 |ravis.cs|d.harris|
|000000a0| 2e 63 6f 6d 3e 0a 44 61 | 74 65 3a 20 31 32 20 44 |.com>.Da|te: 12 D|
|000000b0| 65 63 20 39 30 20 32 33 | 3a 32 37 3a 34 39 20 47 |ec 90 23|:27:49 G|
|000000c0| 4d 54 0a 0a 23 21 20 2f | 62 69 6e 2f 73 68 0a 23 |MT..#! /|bin/sh.#|
|000000d0| 20 54 68 69 73 20 69 73 | 20 61 20 73 68 65 6c 6c | This is| a shell|
|000000e0| 20 61 72 63 68 69 76 65 | 2e 20 20 52 65 6d 6f 76 | archive|. Remov|
|000000f0| 65 20 61 6e 79 74 68 69 | 6e 67 20 62 65 66 6f 72 |e anythi|ng befor|
|00000100| 65 20 74 68 69 73 20 6c | 69 6e 65 2c 20 74 68 65 |e this l|ine, the|
|00000110| 6e 20 75 6e 70 61 63 6b | 0a 23 20 69 74 20 62 79 |n unpack|.# it by|
|00000120| 20 73 61 76 69 6e 67 20 | 69 74 20 69 6e 74 6f 20 | saving |it into |
|00000130| 61 20 66 69 6c 65 20 61 | 6e 64 20 74 79 70 69 6e |a file a|nd typin|
|00000140| 67 20 22 73 68 20 66 69 | 6c 65 22 2e 20 20 54 6f |g "sh fi|le". To|
|00000150| 20 6f 76 65 72 77 72 69 | 74 65 20 65 78 69 73 74 | overwri|te exist|
|00000160| 69 6e 67 0a 23 20 66 69 | 6c 65 73 2c 20 74 79 70 |ing.# fi|les, typ|
|00000170| 65 20 22 73 68 20 66 69 | 6c 65 20 2d 63 22 2e 20 |e "sh fi|le -c". |
|00000180| 20 59 6f 75 20 63 61 6e | 20 61 6c 73 6f 20 66 65 | You can| also fe|
|00000190| 65 64 20 74 68 69 73 20 | 61 73 20 73 74 61 6e 64 |ed this |as stand|
|000001a0| 61 72 64 20 69 6e 70 75 | 74 20 76 69 61 0a 23 20 |ard inpu|t via.# |
|000001b0| 75 6e 73 68 61 72 2c 20 | 6f 72 20 62 79 20 74 79 |unshar, |or by ty|
|000001c0| 70 69 6e 67 20 22 73 68 | 20 3c 66 69 6c 65 22 2c |ping "sh| <file",|
|000001d0| 20 65 2e 67 2e 2e 20 20 | 49 66 20 74 68 69 73 20 | e.g.. |If this |
|000001e0| 61 72 63 68 69 76 65 20 | 69 73 20 63 6f 6d 70 6c |archive |is compl|
|000001f0| 65 74 65 2c 20 79 6f 75 | 0a 23 20 77 69 6c 6c 20 |ete, you|.# will |
|00000200| 73 65 65 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |see the |followin|
|00000210| 67 20 6d 65 73 73 61 67 | 65 20 61 74 20 74 68 65 |g messag|e at the|
|00000220| 20 65 6e 64 3a 0a 23 09 | 09 22 45 6e 64 20 6f 66 | end:.#.|."End of|
|00000230| 20 61 72 63 68 69 76 65 | 20 33 20 28 6f 66 20 35 | archive| 3 (of 5|
|00000240| 29 2e 22 0a 23 20 43 6f | 6e 74 65 6e 74 73 3a 20 |).".# Co|ntents: |
|00000250| 20 64 69 61 72 79 2e 63 | 20 78 64 69 61 72 79 2e | diary.c| xdiary.|
|00000260| 6d 61 6e 0a 23 20 57 72 | 61 70 70 65 64 20 62 79 |man.# Wr|apped by|
|00000270| 20 6a 61 73 6f 6e 40 68 | 63 78 32 20 6f 6e 20 54 | jason@h|cx2 on T|
|00000280| 68 75 20 44 65 63 20 20 | 36 20 31 32 3a 34 39 3a |hu Dec |6 12:49:|
|00000290| 32 32 20 31 39 39 30 0a | 50 41 54 48 3d 2f 62 69 |22 1990.|PATH=/bi|
|000002a0| 6e 3a 2f 75 73 72 2f 62 | 69 6e 3a 2f 75 73 72 2f |n:/usr/b|in:/usr/|
|000002b0| 75 63 62 20 3b 20 65 78 | 70 6f 72 74 20 50 41 54 |ucb ; ex|port PAT|
|000002c0| 48 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 64 69 |H.if tes|t -f 'di|
|000002d0| 61 72 79 2e 63 27 20 2d | 61 20 22 24 7b 31 7d 22 |ary.c' -|a "${1}"|
|000002e0| 20 21 3d 20 22 2d 63 22 | 20 3b 20 74 68 65 6e 20 | != "-c"| ; then |
|000002f0| 0a 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 57 69 |. echo |shar: Wi|
|00000300| 6c 6c 20 6e 6f 74 20 63 | 6c 6f 62 62 65 72 20 65 |ll not c|lobber e|
|00000310| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 5c 22 27 |xisting |file \"'|
|00000320| 64 69 61 72 79 2e 63 27 | 5c 22 0a 65 6c 73 65 0a |diary.c'|\".else.|
|00000330| 65 63 68 6f 20 73 68 61 | 72 3a 20 45 78 74 72 61 |echo sha|r: Extra|
|00000340| 63 74 69 6e 67 20 5c 22 | 27 64 69 61 72 79 2e 63 |cting \"|'diary.c|
|00000350| 27 5c 22 20 5c 28 31 35 | 34 37 32 20 63 68 61 72 |'\" \(15|472 char|
|00000360| 61 63 74 65 72 73 5c 29 | 0a 73 65 64 20 22 73 2f |acters\)|.sed "s/|
|00000370| 5e 58 2f 2f 22 20 3e 27 | 64 69 61 72 79 2e 63 27 |^X//" >'|diary.c'|
|00000380| 20 3c 3c 27 45 4e 44 5f | 4f 46 5f 46 49 4c 45 27 | <<'END_|OF_FILE'|
|00000390| 0a 58 2f 2a 0a 58 20 2a | 20 41 75 74 68 6f 72 3a |.X/*.X *| Author:|
|000003a0| 20 4a 61 73 6f 6e 20 42 | 61 69 65 74 74 6f 2c 20 | Jason B|aietto, |
|000003b0| 6a 61 73 6f 6e 40 73 73 | 64 2e 63 73 64 2e 68 61 |jason@ss|d.csd.ha|
|000003c0| 72 72 69 73 2e 63 6f 6d | 0a 58 20 2a 20 78 64 69 |rris.com|.X * xdi|
|000003d0| 61 72 79 20 43 6f 70 79 | 72 69 67 68 74 20 31 39 |ary Copy|right 19|
|000003e0| 39 30 20 48 61 72 72 69 | 73 20 43 6f 72 70 6f 72 |90 Harri|s Corpor|
|000003f0| 61 74 69 6f 6e 0a 58 20 | 2a 0a 58 20 2a 20 50 65 |ation.X |*.X * Pe|
|00000400| 72 6d 69 73 73 69 6f 6e | 20 74 6f 20 75 73 65 2c |rmission| to use,|
|00000410| 20 63 6f 70 79 2c 20 6d | 6f 64 69 66 79 2c 20 61 | copy, m|odify, a|
|00000420| 6e 64 20 64 69 73 74 72 | 69 62 75 74 65 2c 20 74 |nd distr|ibute, t|
|00000430| 68 69 73 20 73 6f 66 74 | 77 61 72 65 20 61 6e 64 |his soft|ware and|
|00000440| 20 69 74 73 0a 58 20 2a | 20 64 6f 63 75 6d 65 6e | its.X *| documen|
|00000450| 74 61 74 69 6f 6e 20 66 | 6f 72 20 61 6e 79 20 70 |tation f|or any p|
|00000460| 75 72 70 6f 73 65 20 69 | 73 20 68 65 72 65 62 79 |urpose i|s hereby|
|00000470| 20 67 72 61 6e 74 65 64 | 20 77 69 74 68 6f 75 74 | granted| without|
|00000480| 20 66 65 65 2c 20 70 72 | 6f 76 69 64 65 64 20 74 | fee, pr|ovided t|
|00000490| 68 61 74 0a 58 20 2a 20 | 74 68 65 20 61 62 6f 76 |hat.X * |the abov|
|000004a0| 65 20 63 6f 70 79 72 69 | 67 68 74 20 6e 6f 74 69 |e copyri|ght noti|
|000004b0| 63 65 20 61 70 70 65 61 | 72 20 69 6e 20 61 6c 6c |ce appea|r in all|
|000004c0| 20 63 6f 70 69 65 73 20 | 61 6e 64 20 74 68 61 74 | copies |and that|
|000004d0| 20 62 6f 74 68 20 74 68 | 61 74 0a 58 20 2a 20 63 | both th|at.X * c|
|000004e0| 6f 70 79 72 69 67 68 74 | 20 6e 6f 74 69 63 65 20 |opyright| notice |
|000004f0| 61 6e 64 20 74 68 69 73 | 20 70 65 72 6d 69 73 73 |and this| permiss|
|00000500| 69 6f 6e 20 6e 6f 74 69 | 63 65 20 61 70 70 65 61 |ion noti|ce appea|
|00000510| 72 20 69 6e 20 73 75 70 | 70 6f 72 74 69 6e 67 0a |r in sup|porting.|
|00000520| 58 20 2a 20 64 6f 63 75 | 6d 65 6e 74 61 74 69 6f |X * docu|mentatio|
|00000530| 6e 2c 20 61 6e 64 20 74 | 68 61 74 20 74 68 65 20 |n, and t|hat the |
|00000540| 6e 61 6d 65 20 6f 66 20 | 74 68 65 20 63 6f 70 79 |name of |the copy|
|00000550| 72 69 67 68 74 20 68 6f | 6c 64 65 72 20 62 65 20 |right ho|lder be |
|00000560| 75 73 65 64 20 69 6e 0a | 58 20 2a 20 61 64 76 65 |used in.|X * adve|
|00000570| 72 74 69 73 69 6e 67 20 | 6f 72 20 70 75 62 6c 69 |rtising |or publi|
|00000580| 63 69 74 79 20 70 65 72 | 74 61 69 6e 69 6e 67 20 |city per|taining |
|00000590| 74 6f 20 64 69 73 74 72 | 69 62 75 74 69 6f 6e 20 |to distr|ibution |
|000005a0| 6f 66 20 74 68 65 20 73 | 6f 66 74 77 61 72 65 20 |of the s|oftware |
|000005b0| 77 69 74 68 0a 58 20 2a | 20 73 70 65 63 69 66 69 |with.X *| specifi|
|000005c0| 63 2c 20 77 72 69 74 74 | 65 6e 20 70 72 69 6f 72 |c, writt|en prior|
|000005d0| 20 70 65 72 6d 69 73 73 | 69 6f 6e 2c 20 61 6e 64 | permiss|ion, and|
|000005e0| 20 74 68 61 74 20 6e 6f | 20 66 65 65 20 69 73 20 | that no| fee is |
|000005f0| 63 68 61 72 67 65 64 20 | 66 6f 72 20 66 75 72 74 |charged |for furt|
|00000600| 68 65 72 0a 58 20 2a 20 | 64 69 73 74 72 69 62 75 |her.X * |distribu|
|00000610| 74 69 6f 6e 20 6f 66 20 | 74 68 69 73 20 73 6f 66 |tion of |this sof|
|00000620| 74 77 61 72 65 2c 20 6f | 72 20 61 6e 79 20 6d 6f |tware, o|r any mo|
|00000630| 64 69 66 69 63 61 74 69 | 6f 6e 73 20 74 68 65 72 |dificati|ons ther|
|00000640| 65 6f 66 2e 20 20 54 68 | 65 20 63 6f 70 79 72 69 |eof. Th|e copyri|
|00000650| 67 68 74 0a 58 20 2a 20 | 68 6f 6c 64 65 72 20 6d |ght.X * |holder m|
|00000660| 61 6b 65 73 20 6e 6f 20 | 72 65 70 72 65 73 65 6e |akes no |represen|
|00000670| 74 61 74 69 6f 6e 73 20 | 61 62 6f 75 74 20 74 68 |tations |about th|
|00000680| 65 20 73 75 69 74 61 62 | 69 6c 69 74 79 20 6f 66 |e suitab|ility of|
|00000690| 20 74 68 69 73 20 73 6f | 66 74 77 61 72 65 20 66 | this so|ftware f|
|000006a0| 6f 72 0a 58 20 2a 20 61 | 6e 79 20 70 75 72 70 6f |or.X * a|ny purpo|
|000006b0| 73 65 2e 20 20 49 74 20 | 69 73 20 70 72 6f 76 69 |se. It |is provi|
|000006c0| 64 65 64 20 22 61 73 20 | 69 73 22 20 77 69 74 68 |ded "as |is" with|
|000006d0| 6f 75 74 20 65 78 70 72 | 65 73 73 20 6f 72 20 69 |out expr|ess or i|
|000006e0| 6d 70 6c 69 65 64 20 77 | 61 72 72 61 6e 74 79 2e |mplied w|arranty.|
|000006f0| 0a 58 20 2a 0a 58 20 2a | 20 54 48 45 20 43 4f 50 |.X *.X *| THE COP|
|00000700| 59 52 49 47 48 54 20 48 | 4f 4c 44 45 52 20 44 49 |YRIGHT H|OLDER DI|
|00000710| 53 43 4c 41 49 4d 53 20 | 41 4c 4c 20 57 41 52 52 |SCLAIMS |ALL WARR|
|00000720| 41 4e 54 49 45 53 20 57 | 49 54 48 20 52 45 47 41 |ANTIES W|ITH REGA|
|00000730| 52 44 20 54 4f 20 54 48 | 49 53 20 53 4f 46 54 57 |RD TO TH|IS SOFTW|
|00000740| 41 52 45 2c 0a 58 20 2a | 20 49 4e 43 4c 55 44 49 |ARE,.X *| INCLUDI|
|00000750| 4e 47 20 41 4c 4c 20 49 | 4d 50 4c 49 45 44 20 57 |NG ALL I|MPLIED W|
|00000760| 41 52 52 41 4e 54 49 45 | 53 20 4f 46 20 4d 45 52 |ARRANTIE|S OF MER|
|00000770| 43 48 41 4e 54 41 42 49 | 4c 49 54 59 20 41 4e 44 |CHANTABI|LITY AND|
|00000780| 20 46 49 54 4e 45 53 53 | 2c 20 41 4e 44 20 49 4e | FITNESS|, AND IN|
|00000790| 20 4e 4f 0a 58 20 2a 20 | 45 56 45 4e 54 20 53 48 | NO.X * |EVENT SH|
|000007a0| 41 4c 4c 20 54 48 45 20 | 43 4f 50 59 52 49 47 48 |ALL THE |COPYRIGH|
|000007b0| 54 20 48 4f 4c 44 45 52 | 20 42 45 20 4c 49 41 42 |T HOLDER| BE LIAB|
|000007c0| 4c 45 20 46 4f 52 20 41 | 4e 59 20 53 50 45 43 49 |LE FOR A|NY SPECI|
|000007d0| 41 4c 2c 20 49 4e 44 49 | 52 45 43 54 20 4f 52 0a |AL, INDI|RECT OR.|
|000007e0| 58 20 2a 20 43 4f 4e 53 | 45 51 55 45 4e 54 49 41 |X * CONS|EQUENTIA|
|000007f0| 4c 20 44 41 4d 41 47 45 | 53 20 4f 52 20 41 4e 59 |L DAMAGE|S OR ANY|
|00000800| 20 44 41 4d 41 47 45 53 | 20 57 48 41 54 53 4f 45 | DAMAGES| WHATSOE|
|00000810| 56 45 52 20 52 45 53 55 | 4c 54 49 4e 47 20 46 52 |VER RESU|LTING FR|
|00000820| 4f 4d 20 49 54 53 20 55 | 53 45 2c 0a 58 20 2a 20 |OM ITS U|SE,.X * |
|00000830| 4c 4f 53 53 20 4f 46 20 | 44 41 54 41 2c 20 50 52 |LOSS OF |DATA, PR|
|00000840| 4f 46 49 54 53 2c 20 51 | 50 41 20 4f 52 20 47 50 |OFITS, Q|PA OR GP|
|00000850| 41 2c 20 57 48 45 54 48 | 45 52 20 49 4e 20 41 4e |A, WHETH|ER IN AN|
|00000860| 20 41 43 54 49 4f 4e 20 | 4f 46 20 43 4f 4e 54 52 | ACTION |OF CONTR|
|00000870| 41 43 54 2c 0a 58 20 2a | 20 4e 45 47 4c 49 47 45 |ACT,.X *| NEGLIGE|
|00000880| 4e 43 45 20 4f 52 20 4f | 54 48 45 52 20 54 4f 52 |NCE OR O|THER TOR|
|00000890| 54 49 4f 55 53 20 41 43 | 54 49 4f 4e 2c 20 41 52 |TIOUS AC|TION, AR|
|000008a0| 49 53 49 4e 47 20 4f 55 | 54 20 4f 46 20 4f 52 20 |ISING OU|T OF OR |
|000008b0| 49 4e 20 43 4f 4e 4e 45 | 43 54 49 4f 4e 20 57 49 |IN CONNE|CTION WI|
|000008c0| 54 48 0a 58 20 2a 20 54 | 48 45 20 55 53 45 20 4f |TH.X * T|HE USE O|
|000008d0| 52 20 50 45 52 46 4f 52 | 4d 41 4e 43 45 20 4f 46 |R PERFOR|MANCE OF|
|000008e0| 20 54 48 49 53 20 53 4f | 46 54 57 41 52 45 2e 0a | THIS SO|FTWARE..|
|000008f0| 58 20 2a 2f 0a 58 0a 58 | 2f 2a 0a 58 20 20 20 64 |X */.X.X|/*.X d|
|00000900| 69 61 72 79 2e 63 20 2d | 2d 20 72 6f 75 74 69 6e |iary.c -|- routin|
|00000910| 65 73 20 74 6f 20 72 65 | 61 64 2c 20 6d 61 6e 61 |es to re|ad, mana|
|00000920| 67 65 2c 20 61 6e 64 20 | 73 61 76 65 20 74 68 65 |ge, and |save the|
|00000930| 20 64 69 61 72 79 20 66 | 69 6c 65 2e 0a 58 0a 58 | diary f|ile..X.X|
|00000940| 20 20 20 44 69 61 72 79 | 20 66 6f 72 6d 61 74 3a | Diary| format:|
|00000950| 20 20 6e 65 77 6c 69 6e | 65 20 74 65 72 6d 69 6e | newlin|e termin|
|00000960| 61 74 65 64 20 64 61 74 | 65 20 73 74 72 69 6e 67 |ated dat|e string|
|00000970| 20 66 6f 6c 6c 6f 77 65 | 64 20 62 79 20 61 0a 58 | followe|d by a.X|
|00000980| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000990| 20 20 6e 65 77 6c 69 6e | 65 20 74 65 72 6d 69 6e | newlin|e termin|
|000009a0| 61 74 65 64 20 71 75 6f | 74 65 20 65 6e 63 6c 6f |ated quo|te enclo|
|000009b0| 73 65 64 20 73 74 72 69 | 6e 67 2e 0a 58 20 20 20 |sed stri|ng..X |
|000009c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 54 | | T|
|000009d0| 68 65 20 73 74 72 69 6e | 67 20 6d 61 79 20 63 6f |he strin|g may co|
|000009e0| 6e 74 61 69 6e 20 6e 65 | 77 6c 69 6e 65 73 20 61 |ntain ne|wlines a|
|000009f0| 6e 64 20 71 75 6f 74 65 | 73 2c 20 62 75 74 0a 58 |nd quote|s, but.X|
|00000a00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000a10| 20 20 71 75 6f 74 65 73 | 20 6d 75 73 74 20 62 65 | quotes| must be|
|00000a20| 20 64 6f 75 62 6c 65 64 | 20 28 69 2e 65 2e 20 22 | doubled| (i.e. "|
|00000a30| 22 20 62 65 63 6f 6d 65 | 73 20 22 29 2e 0a 58 0a |" become|s ")..X.|
|00000a40| 58 20 20 20 54 68 65 20 | 64 69 61 72 79 20 66 6f |X The |diary fo|
|00000a50| 72 6d 61 74 20 69 73 20 | 76 65 72 79 20 73 69 6d |rmat is |very sim|
|00000a60| 70 6c 65 20 73 6f 20 74 | 68 61 74 20 69 74 20 63 |ple so t|hat it c|
|00000a70| 61 6e 20 65 61 73 69 6c | 79 20 62 65 20 75 70 64 |an easil|y be upd|
|00000a80| 61 74 65 64 0a 58 20 20 | 20 69 6e 20 61 20 74 65 |ated.X | in a te|
|00000a90| 78 74 20 65 64 69 74 6f | 72 20 66 6f 72 20 70 65 |xt edito|r for pe|
|00000aa0| 6f 70 6c 65 20 77 68 6f | 20 77 61 6e 74 20 74 6f |ople who| want to|
|00000ab0| 20 61 64 64 20 74 65 78 | 74 20 74 6f 20 61 20 64 | add tex|t to a d|
|00000ac0| 61 74 65 20 62 75 74 0a | 58 20 20 20 61 72 65 20 |ate but.|X are |
|00000ad0| 74 6f 6f 20 69 6d 70 61 | 74 69 65 6e 74 20 74 6f |too impa|tient to|
|00000ae0| 20 62 72 69 6e 67 20 75 | 70 20 74 68 65 20 78 64 | bring u|p the xd|
|00000af0| 69 61 72 79 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |iary app|lication|
|00000b00| 2e 0a 58 0a 58 20 20 20 | 41 75 74 68 6f 72 3a 20 |..X.X |Author: |
|00000b10| 4a 61 73 6f 6e 20 42 61 | 69 65 74 74 6f 0a 58 20 |Jason Ba|ietto.X |
|00000b20| 20 20 20 20 44 61 74 65 | 3a 20 4f 63 74 6f 62 65 | Date|: Octobe|
|00000b30| 72 20 31 39 2c 20 31 39 | 39 30 0a 58 2a 2f 0a 58 |r 19, 19|90.X*/.X|
|00000b40| 0a 58 0a 58 2f 2a 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.X.X/*--|--------|
|00000b50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000b60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000b70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000b80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000b90| 2d 2a 2f 0a 58 2f 2a 20 | 20 20 20 20 20 20 20 20 |-*/.X/* | |
|00000ba0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000bb0| 20 20 20 20 20 20 48 65 | 61 64 65 72 20 46 69 6c | He|ader Fil|
|00000bc0| 65 73 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |es | |
|00000bd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000be0| 20 20 2a 2f 0a 58 2f 2a | 2d 2d 2d 2d 2d 2d 2d 2d | */.X/*|--------|
|00000bf0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000c00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000c10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000c20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000c30| 2d 2d 2d 2a 2f 0a 58 23 | 69 6e 63 6c 75 64 65 20 |---*/.X#|include |
|00000c40| 3c 73 74 64 69 6f 2e 68 | 3e 0a 58 23 69 6e 63 6c |<stdio.h|>.X#incl|
|00000c50| 75 64 65 20 3c 63 74 79 | 70 65 2e 68 3e 0a 58 23 |ude <cty|pe.h>.X#|
|00000c60| 69 6e 63 6c 75 64 65 20 | 3c 76 61 6c 75 65 73 2e |include |<values.|
|00000c70| 68 3e 0a 58 23 69 6e 63 | 6c 75 64 65 20 3c 58 31 |h>.X#inc|lude <X1|
|00000c80| 31 2f 49 6e 74 72 69 6e | 73 69 63 2e 68 3e 0a 58 |1/Intrin|sic.h>.X|
|00000c90| 23 69 6e 63 6c 75 64 65 | 20 22 44 61 74 65 2e 68 |#include| "Date.h|
|00000ca0| 22 0a 58 0a 58 0a 58 2f | 2a 2d 2d 2d 2d 2d 2d 2d |".X.X.X/|*-------|
|00000cb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000cc0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000cd0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000ce0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000cf0| 2d 2d 2d 2d 2a 2f 0a 58 | 2f 2a 20 20 20 20 20 20 |----*/.X|/* |
|00000d00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000d10| 20 20 20 20 47 6c 6f 62 | 61 6c 20 54 79 70 65 73 | Glob|al Types|
|00000d20| 20 41 6e 64 20 4d 61 63 | 72 6f 73 20 20 20 20 20 | And Mac|ros |
|00000d30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000d40| 20 20 20 20 20 2a 2f 0a | 58 2f 2a 2d 2d 2d 2d 2d | */.|X/*-----|
|00000d50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000d60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000d70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000d80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000d90| 2d 2d 2d 2d 2d 2d 2a 2f | 0a 58 23 64 65 66 69 6e |------*/|.X#defin|
|00000da0| 65 20 53 54 41 52 54 5f | 4c 45 4e 47 54 48 20 32 |e START_|LENGTH 2|
|00000db0| 30 30 30 30 0a 58 23 64 | 65 66 69 6e 65 20 47 52 |0000.X#d|efine GR|
|00000dc0| 4f 57 5f 4c 45 4e 47 54 | 48 20 31 30 30 30 30 0a |OW_LENGT|H 10000.|
|00000dd0| 58 23 64 65 66 69 6e 65 | 20 49 4e 49 54 5f 59 45 |X#define| INIT_YE|
|00000de0| 41 52 53 20 31 30 0a 58 | 23 64 65 66 69 6e 65 20 |ARS 10.X|#define |
|00000df0| 4e 45 57 4c 49 4e 45 20 | 27 5c 6e 27 0a 58 23 64 |NEWLINE |'\n'.X#d|
|00000e00| 65 66 69 6e 65 20 51 55 | 4f 54 45 20 20 20 27 5c |efine QU|OTE '\|
|00000e10| 22 27 0a 58 23 64 65 66 | 69 6e 65 20 53 54 52 49 |"'.X#def|ine STRI|
|00000e20| 4e 47 20 30 0a 58 23 64 | 65 66 69 6e 65 20 44 41 |NG 0.X#d|efine DA|
|00000e30| 54 45 20 31 0a 58 23 64 | 65 66 69 6e 65 20 45 4d |TE 1.X#d|efine EM|
|00000e40| 50 54 59 53 54 52 49 4e | 47 20 22 22 0a 58 0a 58 |PTYSTRIN|G "".X.X|
|00000e50| 74 79 70 65 64 65 66 20 | 73 74 72 75 63 74 20 64 |typedef |struct d|
|00000e60| 61 79 5f 65 6e 74 72 79 | 5f 74 79 70 65 20 7b 0a |ay_entry|_type {.|
|00000e70| 58 20 20 20 63 68 61 72 | 20 2a 20 74 65 78 74 3b |X char| * text;|
|00000e80| 0a 58 20 20 20 69 6e 74 | 20 20 66 72 65 65 61 62 |.X int| freeab|
|00000e90| 6c 65 3b 0a 58 7d 20 64 | 61 79 5f 65 6e 74 72 79 |le;.X} d|ay_entry|
|00000ea0| 3b 0a 58 0a 58 74 79 70 | 65 64 65 66 20 73 74 72 |;.X.Xtyp|edef str|
|00000eb0| 75 63 74 20 6d 6f 6e 74 | 68 5f 65 6e 74 72 79 5f |uct mont|h_entry_|
|00000ec0| 74 79 70 65 20 7b 0a 58 | 20 20 20 73 74 72 75 63 |type {.X| struc|
|00000ed0| 74 20 64 61 79 5f 65 6e | 74 72 79 5f 74 79 70 65 |t day_en|try_type|
|00000ee0| 20 64 61 79 5b 33 31 5d | 3b 0a 58 7d 20 6d 6f 6e | day[31]|;.X} mon|
|00000ef0| 74 68 5f 65 6e 74 72 79 | 3b 0a 58 0a 58 74 79 70 |th_entry|;.X.Xtyp|
|00000f00| 65 64 65 66 20 73 74 72 | 75 63 74 20 79 65 61 72 |edef str|uct year|
|00000f10| 5f 65 6e 74 72 79 5f 74 | 79 70 65 20 7b 0a 58 20 |_entry_t|ype {.X |
|00000f20| 20 20 69 6e 74 20 79 65 | 61 72 3b 0a 58 20 20 20 | int ye|ar;.X |
|00000f30| 73 74 72 75 63 74 20 6d | 6f 6e 74 68 5f 65 6e 74 |struct m|onth_ent|
|00000f40| 72 79 5f 74 79 70 65 20 | 2a 20 6d 6f 6e 74 68 5b |ry_type |* month[|
|00000f50| 31 32 5d 3b 0a 58 20 20 | 20 73 74 72 75 63 74 20 |12];.X | struct |
|00000f60| 79 65 61 72 5f 65 6e 74 | 72 79 5f 74 79 70 65 20 |year_ent|ry_type |
|00000f70| 2a 20 6e 65 78 74 3b 0a | 58 20 20 20 73 74 72 75 |* next;.|X stru|
|00000f80| 63 74 20 79 65 61 72 5f | 65 6e 74 72 79 5f 74 79 |ct year_|entry_ty|
|00000f90| 70 65 20 2a 20 70 72 65 | 76 3b 0a 58 7d 20 79 65 |pe * pre|v;.X} ye|
|00000fa0| 61 72 5f 65 6e 74 72 79 | 3b 0a 58 0a 58 73 74 61 |ar_entry|;.X.Xsta|
|00000fb0| 74 69 63 20 79 65 61 72 | 5f 65 6e 74 72 79 20 68 |tic year|_entry h|
|00000fc0| 65 61 64 3b 0a 58 73 74 | 61 74 69 63 20 79 65 61 |ead;.Xst|atic yea|
|00000fd0| 72 5f 65 6e 74 72 79 20 | 74 61 69 6c 3b 0a 58 0a |r_entry |tail;.X.|
|00000fe0| 58 2f 2a 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |X/*-----|--------|
|00000ff0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001000| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001010| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001020| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2a 2f |--------|------*/|
|00001030| 0a 58 2f 2a 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X/* | |
|00001040| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001050| 20 20 53 74 61 74 69 63 | 20 52 6f 75 74 69 6e 65 | Static| Routine|
|00001060| 73 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s | |
|00001070| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2a | | *|
|00001080| 2f 0a 58 2f 2a 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/.X/*---|--------|
|00001090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000010a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000010b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000010c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000010d0| 2a 2f 0a 58 73 74 61 74 | 69 63 20 63 68 61 72 20 |*/.Xstat|ic char |
|000010e0| 2a 20 72 65 61 64 5f 64 | 69 61 72 79 28 66 69 6c |* read_d|iary(fil|
|000010f0| 65 5f 6e 61 6d 65 29 0a | 58 63 68 61 72 20 2a 20 |e_name).|Xchar * |
|00001100| 66 69 6c 65 5f 6e 61 6d | 65 3b 0a 58 7b 0a 58 20 |file_nam|e;.X{.X |
|00001110| 20 20 69 6e 74 20 69 20 | 3d 20 30 3b 0a 58 20 20 | int i |= 0;.X |
|00001120| 20 69 6e 74 20 63 20 3d | 20 30 3b 0a 58 20 20 20 | int c =| 0;.X |
|00001130| 63 68 61 72 20 2a 20 63 | 68 61 72 5f 70 74 72 3b |char * c|har_ptr;|
|00001140| 0a 58 20 20 20 6c 6f 6e | 67 20 63 75 72 72 65 6e |.X lon|g curren|
|00001150| 74 5f 6c 65 6e 67 74 68 | 20 3d 20 53 54 41 52 54 |t_length| = START|
|00001160| 5f 4c 45 4e 47 54 48 3b | 0a 58 20 20 20 46 49 4c |_LENGTH;|.X FIL|
|00001170| 45 20 2a 20 66 69 6c 65 | 3b 0a 58 0a 58 20 20 20 |E * file|;.X.X |
|00001180| 63 68 61 72 5f 70 74 72 | 20 3d 20 28 63 68 61 72 |char_ptr| = (char|
|00001190| 20 2a 29 20 58 74 4d 61 | 6c 6c 6f 63 28 63 75 72 | *) XtMa|lloc(cur|
|000011a0| 72 65 6e 74 5f 6c 65 6e | 67 74 68 29 3b 0a 58 0a |rent_len|gth);.X.|
|000011b0| 58 20 20 20 66 69 6c 65 | 20 3d 20 66 6f 70 65 6e |X file| = fopen|
|000011c0| 28 66 69 6c 65 5f 6e 61 | 6d 65 2c 20 22 72 22 29 |(file_na|me, "r")|
|000011d0| 3b 0a 58 20 20 20 69 66 | 20 28 21 66 69 6c 65 29 |;.X if| (!file)|
|000011e0| 20 7b 0a 58 20 20 20 20 | 20 20 72 65 74 75 72 6e | {.X | return|
|000011f0| 20 28 28 63 68 61 72 20 | 2a 29 20 4e 55 4c 4c 29 | ((char |*) NULL)|
|00001200| 3b 0a 58 20 20 20 7d 0a | 58 0a 58 20 20 20 2f 2a |;.X }.|X.X /*|
|00001210| 20 4a 75 73 74 20 72 65 | 61 64 20 74 68 65 20 77 | Just re|ad the w|
|00001220| 68 6f 6c 65 20 74 68 69 | 6e 67 20 69 6e 74 6f 20 |hole thi|ng into |
|00001230| 6d 65 6d 6f 72 79 20 74 | 6f 20 6d 69 6e 69 6d 69 |memory t|o minimi|
|00001240| 7a 65 20 66 69 6c 65 20 | 49 2f 4f 20 74 69 6d 65 |ze file |I/O time|
|00001250| 20 2a 2f 0a 58 20 20 20 | 77 68 69 6c 65 20 28 63 | */.X |while (c|
|00001260| 20 21 3d 20 45 4f 46 29 | 20 7b 0a 58 20 20 20 20 | != EOF)| {.X |
|00001270| 20 20 63 20 3d 20 67 65 | 74 63 28 66 69 6c 65 29 | c = ge|tc(file)|
|00001280| 3b 0a 58 20 20 20 20 20 | 20 63 68 61 72 5f 70 74 |;.X | char_pt|
|00001290| 72 5b 69 2b 2b 5d 20 3d | 20 63 3b 0a 58 0a 58 20 |r[i++] =| c;.X.X |
|000012a0| 20 20 20 20 20 69 66 20 | 28 69 20 3e 3d 20 63 75 | if |(i >= cu|
|000012b0| 72 72 65 6e 74 5f 6c 65 | 6e 67 74 68 29 20 7b 0a |rrent_le|ngth) {.|
|000012c0| 58 20 20 20 20 20 20 20 | 20 20 63 75 72 72 65 6e |X | curren|
|000012d0| 74 5f 6c 65 6e 67 74 68 | 20 2b 3d 20 47 52 4f 57 |t_length| += GROW|
|000012e0| 5f 4c 45 4e 47 54 48 3b | 0a 58 20 20 20 20 20 20 |_LENGTH;|.X |
|000012f0| 20 20 20 63 68 61 72 5f | 70 74 72 20 3d 20 28 63 | char_|ptr = (c|
|00001300| 68 61 72 20 2a 29 20 58 | 74 52 65 61 6c 6c 6f 63 |har *) X|tRealloc|
|00001310| 28 63 68 61 72 5f 70 74 | 72 2c 20 63 75 72 72 65 |(char_pt|r, curre|
|00001320| 6e 74 5f 6c 65 6e 67 74 | 68 29 3b 0a 58 20 20 20 |nt_lengt|h);.X |
|00001330| 20 20 20 7d 0a 58 20 20 | 20 7d 0a 58 0a 58 20 20 | }.X | }.X.X |
|00001340| 20 66 63 6c 6f 73 65 28 | 66 69 6c 65 29 3b 0a 58 | fclose(|file);.X|
|00001350| 20 20 20 72 65 74 75 72 | 6e 28 63 68 61 72 5f 70 | retur|n(char_p|
|00001360| 74 72 29 3b 0a 58 7d 0a | 58 0a 58 0a 58 0a 58 0a |tr);.X}.|X.X.X.X.|
|00001370| 58 2f 2a 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |X/*-----|--------|
|00001380| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001390| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000013a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000013b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2a 2f |--------|------*/|
|000013c0| 0a 58 2f 2a 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X/* | |
|000013d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000013e0| 20 20 47 6c 6f 62 61 6c | 20 52 6f 75 74 69 6e 65 | Global| Routine|
|000013f0| 73 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s | |
|00001400| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2a | | *|
|00001410| 2f 0a 58 2f 2a 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/.X/*---|--------|
|00001420| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001430| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001440| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001450| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001460| 2a 2f 0a 58 76 6f 69 64 | 20 69 6e 73 74 61 6c 6c |*/.Xvoid| install|
|00001470| 28 64 61 74 65 2c 20 73 | 74 72 69 6e 67 2c 20 66 |(date, s|tring, f|
|00001480| 72 65 65 61 62 6c 65 29 | 0a 58 44 61 74 65 20 64 |reeable)|.XDate d|
|00001490| 61 74 65 3b 0a 58 63 68 | 61 72 20 2a 20 73 74 72 |ate;.Xch|ar * str|
|000014a0| 69 6e 67 3b 0a 58 69 6e | 74 20 66 72 65 65 61 62 |ing;.Xin|t freeab|
|000014b0| 6c 65 3b 0a 58 7b 0a 58 | 20 20 20 79 65 61 72 5f |le;.X{.X| year_|
|000014c0| 65 6e 74 72 79 20 20 2a | 20 79 65 61 72 5f 70 74 |entry *| year_pt|
|000014d0| 72 20 3d 20 26 68 65 61 | 64 3b 0a 58 20 20 20 79 |r = &hea|d;.X y|
|000014e0| 65 61 72 5f 65 6e 74 72 | 79 20 20 2a 20 73 61 76 |ear_entr|y * sav|
|000014f0| 65 5f 70 74 72 3b 0a 58 | 20 20 20 79 65 61 72 5f |e_ptr;.X| year_|
|00001500| 65 6e 74 72 79 20 20 2a | 20 6c 61 73 74 5f 70 74 |entry *| last_pt|
|00001510| 72 3b 0a 58 20 20 20 6d | 6f 6e 74 68 5f 65 6e 74 |r;.X m|onth_ent|
|00001520| 72 79 20 2a 20 6d 6f 6e | 74 68 5f 70 74 72 3b 0a |ry * mon|th_ptr;.|
|00001530| 58 20 20 20 64 61 79 5f | 65 6e 74 72 79 20 20 20 |X day_|entry |
|00001540| 2a 20 64 61 79 5f 70 74 | 72 3b 0a 58 0a 58 20 20 |* day_pt|r;.X.X |
|00001550| 20 2f 2a 20 46 69 6e 64 | 20 6f 72 20 63 72 65 61 | /* Find| or crea|
|00001560| 74 65 20 74 68 65 20 79 | 65 61 72 20 65 6e 74 72 |te the y|ear entr|
|00001570| 79 2e 20 2a 2f 0a 58 20 | 20 20 77 68 69 6c 65 20 |y. */.X | while |
|00001580| 28 79 65 61 72 5f 70 74 | 72 29 20 7b 0a 58 20 20 |(year_pt|r) {.X |
|00001590| 20 20 20 20 69 66 20 28 | 79 65 61 72 5f 70 74 72 | if (|year_ptr|
|000015a0| 2d 3e 79 65 61 72 20 3c | 20 64 61 74 65 2e 79 65 |->year <| date.ye|
|000015b0| 61 72 29 20 7b 0a 58 20 | 20 20 20 20 20 20 20 20 |ar) {.X | |
|000015c0| 2f 2a 20 4e 6f 74 20 79 | 65 74 2c 20 74 72 79 20 |/* Not y|et, try |
|000015d0| 74 68 65 20 6e 65 78 74 | 20 79 65 61 72 20 65 6e |the next| year en|
|000015e0| 74 72 79 2e 20 2a 2f 0a | 58 20 20 20 20 20 20 20 |try. */.|X |
|000015f0| 20 20 6c 61 73 74 5f 70 | 74 72 20 3d 20 79 65 61 | last_p|tr = yea|
|00001600| 72 5f 70 74 72 3b 0a 58 | 20 20 20 20 20 20 20 20 |r_ptr;.X| |
|00001610| 20 79 65 61 72 5f 70 74 | 72 20 3d 20 79 65 61 72 | year_pt|r = year|
|00001620| 5f 70 74 72 2d 3e 6e 65 | 78 74 3b 0a 58 20 20 20 |_ptr->ne|xt;.X |
|00001630| 20 20 20 7d 20 65 6c 73 | 65 20 69 66 20 28 79 65 | } els|e if (ye|
|00001640| 61 72 5f 70 74 72 2d 3e | 79 65 61 72 20 3e 20 64 |ar_ptr->|year > d|
|00001650| 61 74 65 2e 79 65 61 72 | 29 20 7b 0a 58 20 20 20 |ate.year|) {.X |
|00001660| 20 20 20 20 20 20 2f 2a | 20 4e 6f 20 79 65 61 72 | /*| No year|
|00001670| 20 65 6e 74 72 79 20 65 | 78 69 73 74 73 2c 20 63 | entry e|xists, c|
|00001680| 72 65 61 74 65 20 6f 6e | 65 2e 20 2a 2f 0a 58 20 |reate on|e. */.X |
|00001690| 20 20 20 20 20 20 20 20 | 73 61 76 65 5f 70 74 72 | |save_ptr|
|000016a0| 20 3d 20 79 65 61 72 5f | 70 74 72 3b 0a 58 20 20 | = year_|ptr;.X |
|000016b0| 20 20 20 20 20 20 20 79 | 65 61 72 5f 70 74 72 20 | y|ear_ptr |
|000016c0| 3d 20 28 79 65 61 72 5f | 65 6e 74 72 79 20 2a 29 |= (year_|entry *)|
|000016d0| 20 58 74 43 61 6c 6c 6f | 63 28 31 2c 20 73 69 7a | XtCallo|c(1, siz|
|000016e0| 65 6f 66 28 79 65 61 72 | 5f 65 6e 74 72 79 29 29 |eof(year|_entry))|
|000016f0| 3b 0a 58 20 20 20 20 20 | 20 20 20 20 6c 61 73 74 |;.X | last|
|00001700| 5f 70 74 72 2d 3e 6e 65 | 78 74 20 3d 20 79 65 61 |_ptr->ne|xt = yea|
|00001710| 72 5f 70 74 72 3b 0a 58 | 20 20 20 20 20 20 20 20 |r_ptr;.X| |
|00001720| 20 79 65 61 72 5f 70 74 | 72 2d 3e 6e 65 78 74 20 | year_pt|r->next |
|00001730| 3d 20 73 61 76 65 5f 70 | 74 72 3b 0a 58 20 20 20 |= save_p|tr;.X |
|00001740| 20 20 20 20 20 20 79 65 | 61 72 5f 70 74 72 2d 3e | ye|ar_ptr->|
|00001750| 70 72 65 76 20 3d 20 6c | 61 73 74 5f 70 74 72 3b |prev = l|ast_ptr;|
|00001760| 0a 58 20 20 20 20 20 20 | 20 20 20 73 61 76 65 5f |.X | save_|
|00001770| 70 74 72 2d 3e 70 72 65 | 76 20 3d 20 79 65 61 72 |ptr->pre|v = year|
|00001780| 5f 70 74 72 3b 0a 58 20 | 20 20 20 20 20 20 20 20 |_ptr;.X | |
|00001790| 79 65 61 72 5f 70 74 72 | 2d 3e 79 65 61 72 20 3d |year_ptr|->year =|
|000017a0| 20 64 61 74 65 2e 79 65 | 61 72 3b 0a 58 20 20 20 | date.ye|ar;.X |
|000017b0| 20 20 20 20 20 20 62 72 | 65 61 6b 3b 0a 58 20 20 | br|eak;.X |
|000017c0| 20 20 20 20 7d 20 65 6c | 73 65 20 7b 0a 58 20 20 | } el|se {.X |
|000017d0| 20 20 20 20 20 20 20 2f | 2a 20 46 6f 75 6e 64 20 | /|* Found |
|000017e0| 69 74 2e 20 2a 2f 0a 58 | 20 20 20 20 20 20 20 20 |it. */.X| |
|000017f0| 20 62 72 65 61 6b 3b 0a | 58 20 20 20 20 20 20 7d | break;.|X }|
|00001800| 0a 58 20 20 20 7d 2f 2a | 77 68 69 6c 65 2a 2f 0a |.X }/*|while*/.|
|00001810| 58 0a 58 20 20 20 2f 2a | 20 46 69 6e 64 20 6f 72 |X.X /*| Find or|
|00001820| 20 63 72 65 61 74 65 20 | 74 68 65 20 63 6f 72 72 | create |the corr|
|00001830| 65 73 70 6f 6e 64 69 6e | 67 20 6d 6f 6e 74 68 20 |espondin|g month |
|00001840| 61 72 72 61 79 2e 20 2a | 2f 0a 58 20 20 20 6d 6f |array. *|/.X mo|
|00001850| 6e 74 68 5f 70 74 72 20 | 3d 20 79 65 61 72 5f 70 |nth_ptr |= year_p|
|00001860| 74 72 2d 3e 6d 6f 6e 74 | 68 5b 64 61 74 65 2e 6d |tr->mont|h[date.m|
|00001870| 6f 6e 74 68 2d 31 5d 3b | 0a 58 20 20 20 69 66 20 |onth-1];|.X if |
|00001880| 28 21 6d 6f 6e 74 68 5f | 70 74 72 29 20 7b 0a 58 |(!month_|ptr) {.X|
|00001890| 20 20 20 20 20 20 6d 6f | 6e 74 68 5f 70 74 72 20 | mo|nth_ptr |
|000018a0| 3d 20 28 6d 6f 6e 74 68 | 5f 65 6e 74 72 79 20 2a |= (month|_entry *|
|000018b0| 29 20 58 74 43 61 6c 6c | 6f 63 28 31 2c 20 73 69 |) XtCall|oc(1, si|
|000018c0| 7a 65 6f 66 28 6d 6f 6e | 74 68 5f 65 6e 74 72 79 |zeof(mon|th_entry|
|000018d0| 29 29 3b 0a 58 20 20 20 | 20 20 20 79 65 61 72 5f |));.X | year_|
|000018e0| 70 74 72 2d 3e 6d 6f 6e | 74 68 5b 64 61 74 65 2e |ptr->mon|th[date.|
|000018f0| 6d 6f 6e 74 68 2d 31 5d | 20 3d 20 6d 6f 6e 74 68 |month-1]| = month|
|00001900| 5f 70 74 72 3b 0a 58 20 | 20 20 7d 0a 58 0a 58 20 |_ptr;.X | }.X.X |
|00001910| 20 20 64 61 79 5f 70 74 | 72 20 3d 20 26 6d 6f 6e | day_pt|r = &mon|
|00001920| 74 68 5f 70 74 72 2d 3e | 64 61 79 5b 64 61 74 65 |th_ptr->|day[date|
|00001930| 2e 64 61 79 2d 31 5d 3b | 0a 58 20 20 20 69 66 20 |.day-1];|.X if |
|00001940| 28 21 64 61 79 5f 70 74 | 72 2d 3e 74 65 78 74 29 |(!day_pt|r->text)|
|00001950| 20 7b 0a 58 20 20 20 20 | 20 20 2f 2a 20 4e 6f 20 | {.X | /* No |
|00001960| 6f 6c 64 20 74 65 78 74 | 20 65 78 69 73 74 73 2e |old text| exists.|
|00001970| 20 2a 2f 0a 58 20 20 20 | 20 20 20 64 61 79 5f 70 | */.X | day_p|
|00001980| 74 72 2d 3e 74 65 78 74 | 20 3d 20 73 74 72 69 6e |tr->text| = strin|
|00001990| 67 3b 0a 58 20 20 20 20 | 20 20 64 61 79 5f 70 74 |g;.X | day_pt|
|000019a0| 72 2d 3e 66 72 65 65 61 | 62 6c 65 20 3d 20 66 72 |r->freea|ble = fr|
|000019b0| 65 65 61 62 6c 65 3b 0a | 58 20 20 20 7d 20 65 6c |eeable;.|X } el|
|000019c0| 73 65 20 7b 0a 58 20 20 | 20 20 20 20 69 66 20 28 |se {.X | if (|
|000019d0| 64 61 79 5f 70 74 72 2d | 3e 66 72 65 65 61 62 6c |day_ptr-|>freeabl|
|000019e0| 65 29 20 7b 0a 58 20 20 | 20 20 20 20 20 20 20 58 |e) {.X | X|
|000019f0| 74 46 72 65 65 28 64 61 | 79 5f 70 74 72 2d 3e 74 |tFree(da|y_ptr->t|
|00001a00| 65 78 74 29 3b 0a 58 20 | 20 20 20 20 20 7d 0a 58 |ext);.X | }.X|
|00001a10| 20 20 20 20 20 20 64 61 | 79 5f 70 74 72 2d 3e 74 | da|y_ptr->t|
|00001a20| 65 78 74 20 3d 20 73 74 | 72 69 6e 67 3b 0a 58 20 |ext = st|ring;.X |
|00001a30| 20 20 20 20 20 64 61 79 | 5f 70 74 72 2d 3e 66 72 | day|_ptr->fr|
|00001a40| 65 65 61 62 6c 65 20 3d | 20 66 72 65 65 61 62 6c |eeable =| freeabl|
|00001a50| 65 3b 0a 58 20 20 20 7d | 0a 58 7d 0a 58 0a 58 0a |e;.X }|.X}.X.X.|
|00001a60| 58 0a 58 0a 58 0a 58 63 | 68 61 72 20 2a 20 72 65 |X.X.X.Xc|har * re|
|00001a70| 74 72 69 65 76 65 28 64 | 61 74 65 29 0a 58 44 61 |trieve(d|ate).XDa|
|00001a80| 74 65 20 64 61 74 65 3b | 0a 58 7b 0a 58 20 20 20 |te date;|.X{.X |
|00001a90| 79 65 61 72 5f 65 6e 74 | 72 79 20 2a 20 79 65 61 |year_ent|ry * yea|
|00001aa0| 72 5f 70 74 72 20 3d 20 | 26 68 65 61 64 3b 0a 58 |r_ptr = |&head;.X|
|00001ab0| 20 20 20 6d 6f 6e 74 68 | 5f 65 6e 74 72 79 20 2a | month|_entry *|
|00001ac0| 20 6d 6f 6e 74 68 5f 70 | 74 72 3b 0a 58 20 20 20 | month_p|tr;.X |
|00001ad0| 63 68 61 72 20 2a 20 74 | 65 78 74 5f 70 74 72 3b |char * t|ext_ptr;|
|00001ae0| 0a 58 0a 58 20 20 20 77 | 68 69 6c 65 20 28 79 65 |.X.X w|hile (ye|
|00001af0| 61 72 5f 70 74 72 29 20 | 7b 0a 58 20 20 20 20 20 |ar_ptr) |{.X |
|00001b00| 20 69 66 20 28 79 65 61 | 72 5f 70 74 72 2d 3e 79 | if (yea|r_ptr->y|
|00001b10| 65 61 72 20 3d 3d 20 64 | 61 74 65 2e 79 65 61 72 |ear == d|ate.year|
|00001b20| 29 20 7b 0a 58 20 20 20 | 20 20 20 20 20 20 6d 6f |) {.X | mo|
|00001b30| 6e 74 68 5f 70 74 72 20 | 3d 20 79 65 61 72 5f 70 |nth_ptr |= year_p|
|00001b40| 74 72 2d 3e 6d 6f 6e 74 | 68 5b 64 61 74 65 2e 6d |tr->mont|h[date.m|
|00001b50| 6f 6e 74 68 2d 31 5d 3b | 0a 58 20 20 20 20 20 20 |onth-1];|.X |
|00001b60| 20 20 20 69 66 20 28 6d | 6f 6e 74 68 5f 70 74 72 | if (m|onth_ptr|
|00001b70| 29 20 7b 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |) {.X | |
|00001b80| 20 74 65 78 74 5f 70 74 | 72 20 3d 20 6d 6f 6e 74 | text_pt|r = mont|
|00001b90| 68 5f 70 74 72 2d 3e 64 | 61 79 5b 64 61 74 65 2e |h_ptr->d|ay[date.|
|00001ba0| 64 61 79 2d 31 5d 2e 74 | 65 78 74 3b 0a 58 20 20 |day-1].t|ext;.X |
|00001bb0| 20 20 20 20 20 20 20 20 | 20 20 69 66 20 28 74 65 | | if (te|
|00001bc0| 78 74 5f 70 74 72 29 20 | 7b 0a 58 20 20 20 20 20 |xt_ptr) |{.X |
|00001bd0| 20 20 20 20 20 20 20 20 | 20 20 72 65 74 75 72 6e | | return|
|00001be0| 20 28 74 65 78 74 5f 70 | 74 72 29 3b 0a 58 20 20 | (text_p|tr);.X |
|00001bf0| 20 20 20 20 20 20 20 20 | 20 20 7d 0a 58 20 20 20 | | }.X |
|00001c00| 20 20 20 20 20 20 20 20 | 20 62 72 65 61 6b 3b 0a | | break;.|
|00001c10| 58 20 20 20 20 20 20 20 | 20 20 7d 0a 58 20 20 20 |X | }.X |
|00001c20| 20 20 20 20 20 20 62 72 | 65 61 6b 3b 0a 58 20 20 | br|eak;.X |
|00001c30| 20 20 20 20 7d 20 65 6c | 73 65 20 69 66 20 28 79 | } el|se if (y|
|00001c40| 65 61 72 5f 70 74 72 2d | 3e 79 65 61 72 20 3e 20 |ear_ptr-|>year > |
|00001c50| 64 61 74 65 2e 79 65 61 | 72 29 20 7b 0a 58 20 20 |date.yea|r) {.X |
|00001c60| 20 20 20 20 20 20 20 62 | 72 65 61 6b 3b 0a 58 20 | b|reak;.X |
|00001c70| 20 20 20 20 20 7d 0a 58 | 20 20 20 20 20 20 79 65 | }.X| ye|
|00001c80| 61 72 5f 70 74 72 20 3d | 20 79 65 61 72 5f 70 74 |ar_ptr =| year_pt|
|00001c90| 72 2d 3e 6e 65 78 74 3b | 0a 58 20 20 20 7d 0a 58 |r->next;|.X }.X|
|00001ca0| 20 20 20 72 65 74 75 72 | 6e 20 45 4d 50 54 59 53 | retur|n EMPTYS|
|00001cb0| 54 52 49 4e 47 3b 0a 58 | 7d 0a 58 0a 58 0a 58 0a |TRING;.X|}.X.X.X.|
|00001cc0| 58 0a 58 69 6e 74 20 6e | 6f 74 5f 65 6d 70 74 79 |X.Xint n|ot_empty|
|00001cd0| 28 73 74 72 69 6e 67 29 | 0a 58 63 68 61 72 20 2a |(string)|.Xchar *|
|00001ce0| 20 73 74 72 69 6e 67 3b | 0a 58 7b 0a 58 20 20 20 | string;|.X{.X |
|00001cf0| 2f 2a 20 43 61 74 63 68 | 20 74 68 65 20 6e 75 6c |/* Catch| the nul|
|00001d00| 6c 20 73 74 72 69 6e 67 | 2e 20 2a 2f 0a 58 20 20 |l string|. */.X |
|00001d10| 20 69 66 20 28 2a 73 74 | 72 69 6e 67 20 3d 3d 20 | if (*st|ring == |
|00001d20| 4e 55 4c 4c 29 20 7b 0a | 58 20 20 20 20 20 20 72 |NULL) {.|X r|
|00001d30| 65 74 75 72 6e 20 46 41 | 4c 53 45 3b 0a 58 20 20 |eturn FA|LSE;.X |
|00001d40| 20 7d 0a 58 0a 58 20 20 | 20 77 68 69 6c 65 20 28 | }.X.X | while (|
|00001d50| 2a 73 74 72 69 6e 67 29 | 20 7b 0a 58 20 20 20 20 |*string)| {.X |
|00001d60| 20 20 69 66 20 28 21 69 | 73 73 70 61 63 65 28 2a | if (!i|sspace(*|
|00001d70| 73 74 72 69 6e 67 29 29 | 20 7b 0a 58 20 20 20 20 |string))| {.X |
|00001d80| 20 20 20 20 20 72 65 74 | 75 72 6e 20 54 52 55 45 | ret|urn TRUE|
|00001d90| 3b 0a 58 20 20 20 20 20 | 20 7d 0a 58 20 20 20 20 |;.X | }.X |
|00001da0| 20 20 73 74 72 69 6e 67 | 2b 2b 3b 0a 58 20 20 20 | string|++;.X |
|00001db0| 7d 0a 58 20 20 20 72 65 | 74 75 72 6e 20 46 41 4c |}.X re|turn FAL|
|00001dc0| 53 45 3b 0a 58 7d 0a 58 | 0a 58 0a 58 0a 58 0a 58 |SE;.X}.X|.X.X.X.X|
|00001dd0| 2f 2a 20 54 68 69 73 20 | 69 73 20 75 67 6c 79 2e |/* This |is ugly.|
|00001de0| 20 20 4f 68 20 77 65 6c | 6c 2e 20 2a 2f 0a 58 44 | Oh wel|l. */.XD|
|00001df0| 61 74 65 20 6e 65 78 74 | 5f 65 6e 74 72 79 28 64 |ate next|_entry(d|
|00001e00| 61 74 65 29 0a 58 44 61 | 74 65 20 64 61 74 65 3b |ate).XDa|te date;|
|00001e10| 0a 58 7b 0a 58 20 20 20 | 79 65 61 72 5f 65 6e 74 |.X{.X |year_ent|
|00001e20| 72 79 20 2a 20 79 65 61 | 72 5f 70 74 72 20 3d 20 |ry * yea|r_ptr = |
|00001e30| 26 68 65 61 64 3b 0a 58 | 20 20 20 6d 6f 6e 74 68 |&head;.X| month|
|00001e40| 5f 65 6e 74 72 79 20 2a | 20 6d 6f 6e 74 68 5f 70 |_entry *| month_p|
|00001e50| 74 72 3b 0a 58 20 20 20 | 63 68 61 72 20 2a 20 74 |tr;.X |char * t|
|00001e60| 65 78 74 5f 70 74 72 3b | 0a 58 20 20 20 44 61 74 |ext_ptr;|.X Dat|
|00001e70| 65 20 72 65 74 75 72 6e | 5f 64 61 74 65 3b 0a 58 |e return|_date;.X|
|00001e80| 20 20 20 69 6e 74 20 6d | 6f 6e 74 68 3b 0a 58 20 | int m|onth;.X |
|00001e90| 20 20 69 6e 74 20 64 61 | 79 3b 0a 58 0a 58 20 20 | int da|y;.X.X |
|00001ea0| 20 77 68 69 6c 65 20 28 | 79 65 61 72 5f 70 74 72 | while (|year_ptr|
|00001eb0| 29 20 7b 0a 58 20 20 20 | 20 20 20 69 66 20 28 79 |) {.X | if (y|
|00001ec0| 65 61 72 5f 70 74 72 2d | 3e 79 65 61 72 20 3d 3d |ear_ptr-|>year ==|
|00001ed0| 20 64 61 74 65 2e 79 65 | 61 72 29 20 7b 0a 58 20 | date.ye|ar) {.X |
|00001ee0| 20 20 20 20 20 20 20 20 | 2f 2a 20 53 61 6d 65 20 | |/* Same |
|00001ef0| 79 65 61 72 20 61 73 20 | 64 61 74 65 20 73 70 65 |year as |date spe|
|00001f00| 63 69 66 69 65 64 2e 20 | 2a 2f 0a 58 20 20 20 20 |cified. |*/.X |
|00001f10| 20 20 20 20 20 66 6f 72 | 20 28 6d 6f 6e 74 68 3d | for| (month=|
|00001f20| 64 61 74 65 2e 6d 6f 6e | 74 68 2d 31 3b 20 6d 6f |date.mon|th-1; mo|
|00001f30| 6e 74 68 20 3c 20 31 32 | 3b 20 6d 6f 6e 74 68 2b |nth < 12|; month+|
|00001f40| 2b 29 20 7b 0a 58 20 20 | 20 20 20 20 20 20 20 20 |+) {.X | |
|00001f50| 20 20 6d 6f 6e 74 68 5f | 70 74 72 20 3d 20 79 65 | month_|ptr = ye|
|00001f60| 61 72 5f 70 74 72 2d 3e | 6d 6f 6e 74 68 5b 6d 6f |ar_ptr->|month[mo|
|00001f70| 6e 74 68 5d 3b 0a 58 20 | 20 20 20 20 20 20 20 20 |nth];.X | |
|00001f80| 20 20 20 69 66 20 28 6d | 6f 6e 74 68 5f 70 74 72 | if (m|onth_ptr|
|00001f90| 29 20 7b 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |) {.X | |
|00001fa0| 20 20 20 20 69 66 20 28 | 6d 6f 6e 74 68 20 3d 3d | if (|month ==|
|00001fb0| 20 64 61 74 65 2e 6d 6f | 6e 74 68 2d 31 29 20 7b | date.mo|nth-1) {|
|00001fc0| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X | |
|00001fd0| 20 20 20 20 2f 2a 20 53 | 61 6d 65 20 6d 6f 6e 74 | /* S|ame mont|
|00001fe0| 68 20 61 73 20 64 61 74 | 65 20 73 70 65 63 69 66 |h as dat|e specif|
|00001ff0| 69 65 64 2e 20 2a 2f 0a | 58 20 20 20 20 20 20 20 |ied. */.|X |
|00002000| 20 20 20 20 20 20 20 20 | 20 20 20 64 61 79 20 3d | | day =|
|00002010| 20 64 61 74 65 2e 64 61 | 79 3b 0a 58 20 20 20 20 | date.da|y;.X |
|00002020| 20 20 20 20 20 20 20 20 | 20 20 20 7d 20 65 6c 73 | | } els|
|00002030| 65 20 7b 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |e {.X | |
|00002040| 20 20 20 20 20 20 20 64 | 61 79 20 3d 20 30 3b 0a | d|ay = 0;.|
|00002050| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |X | |
|00002060| 7d 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |}.X | |
|00002070| 20 20 66 6f 72 20 28 3b | 20 64 61 79 20 3c 20 33 | for (;| day < 3|
|00002080| 31 3b 20 64 61 79 2b 2b | 29 20 7b 0a 58 20 20 20 |1; day++|) {.X |
|00002090| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 74 | | t|
|000020a0| 65 78 74 5f 70 74 72 20 | 3d 20 6d 6f 6e 74 68 5f |ext_ptr |= month_|
|000020b0| 70 74 72 2d 3e 64 61 79 | 5b 64 61 79 5d 2e 74 65 |ptr->day|[day].te|
|000020c0| 78 74 3b 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |xt;.X | |
|000020d0| 20 20 20 20 20 20 20 69 | 66 20 28 74 65 78 74 5f | i|f (text_|
|000020e0| 70 74 72 20 26 26 20 6e | 6f 74 5f 65 6d 70 74 79 |ptr && n|ot_empty|
|000020f0| 28 74 65 78 74 5f 70 74 | 72 29 29 20 7b 0a 58 20 |(text_pt|r)) {.X |
|00002100| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002110| 20 20 20 20 72 65 74 75 | 72 6e 5f 64 61 74 65 2e | retu|rn_date.|
|00002120| 79 65 61 72 20 20 3d 20 | 79 65 61 72 5f 70 74 72 |year = |year_ptr|
|00002130| 2d 3e 79 65 61 72 3b 0a | 58 20 20 20 20 20 20 20 |->year;.|X |
|00002140| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 72 65 | | re|
|00002150| 74 75 72 6e 5f 64 61 74 | 65 2e 6d 6f 6e 74 68 20 |turn_dat|e.month |
|00002160| 3d 20 6d 6f 6e 74 68 2b | 31 3b 0a 58 20 20 20 20 |= month+|1;.X |
|00002170| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002180| 20 72 65 74 75 72 6e 5f | 64 61 74 65 2e 64 61 79 | return_|date.day|
|00002190| 20 20 20 3d 20 64 61 79 | 2b 31 3b 0a 58 20 20 20 | = day|+1;.X |
|000021a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000021b0| 20 20 72 65 74 75 72 6e | 28 72 65 74 75 72 6e 5f | return|(return_|
|000021c0| 64 61 74 65 29 3b 0a 58 | 20 20 20 20 20 20 20 20 |date);.X| |
|000021d0| 20 20 20 20 20 20 20 20 | 20 20 7d 0a 58 20 20 20 | | }.X |
|000021e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 7d 0a 58 20 | | }.X |
|000021f0| 20 20 20 20 20 20 20 20 | 20 20 20 7d 0a 58 20 20 | | }.X |
|00002200| 20 20 20 20 20 20 20 7d | 0a 58 20 20 20 20 20 20 | }|.X |
|00002210| 7d 20 65 6c 73 65 20 69 | 66 20 28 79 65 61 72 5f |} else i|f (year_|
|00002220| 70 74 72 2d 3e 79 65 61 | 72 20 3e 20 64 61 74 65 |ptr->yea|r > date|
|00002230| 2e 79 65 61 72 29 20 7b | 0a 58 20 20 20 20 20 20 |.year) {|.X |
|00002240| 20 20 20 66 6f 72 20 28 | 6d 6f 6e 74 68 3d 30 3b | for (|month=0;|
|00002250| 20 6d 6f 6e 74 68 20 3c | 20 31 32 3b 20 6d 6f 6e | month <| 12; mon|
|00002260| 74 68 2b 2b 29 20 7b 0a | 58 20 20 20 20 20 20 20 |th++) {.|X |
|00002270| 20 20 20 20 20 6d 6f 6e | 74 68 5f 70 74 72 20 3d | mon|th_ptr =|
|00002280| 20 79 65 61 72 5f 70 74 | 72 2d 3e 6d 6f 6e 74 68 | year_pt|r->month|
|00002290| 5b 6d 6f 6e 74 68 5d 3b | 0a 58 20 20 20 20 20 20 |[month];|.X |
|000022a0| 20 20 20 20 20 20 69 66 | 20 28 6d 6f 6e 74 68 5f | if| (month_|
|000022b0| 70 74 72 29 20 7b 0a 58 | 20 20 20 20 20 20 20 20 |ptr) {.X| |
|000022c0| 20 20 20 20 20 20 20 66 | 6f 72 20 28 64 61 79 3d | f|or (day=|
|000022d0| 30 3b 20 64 61 79 20 3c | 20 33 31 3b 20 64 61 79 |0; day <| 31; day|
|000022e0| 2b 2b 29 20 7b 0a 58 20 | 20 20 20 20 20 20 20 20 |++) {.X | |
|000022f0| 20 20 20 20 20 20 20 20 | 20 74 65 78 74 5f 70 74 | | text_pt|
|00002300| 72 20 3d 20 6d 6f 6e 74 | 68 5f 70 74 72 2d 3e 64 |r = mont|h_ptr->d|
|00002310| 61 79 5b 64 61 79 5d 2e | 74 65 78 74 3b 0a 58 20 |ay[day].|text;.X |
|00002320| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002330| 20 69 66 20 28 74 65 78 | 74 5f 70 74 72 20 26 26 | if (tex|t_ptr &&|
|00002340| 20 6e 6f 74 5f 65 6d 70 | 74 79 28 74 65 78 74 5f | not_emp|ty(text_|
|00002350| 70 74 72 29 29 20 7b 0a | 58 20 20 20 20 20 20 20 |ptr)) {.|X |
|00002360| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 72 65 | | re|
|00002370| 74 75 72 6e 5f 64 61 74 | 65 2e 79 65 61 72 20 20 |turn_dat|e.year |
|00002380| 3d 20 79 65 61 72 5f 70 | 74 72 2d 3e 79 65 61 72 |= year_p|tr->year|
|00002390| 3b 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;.X | |
|000023a0| 20 20 20 20 20 20 20 20 | 72 65 74 75 72 6e 5f 64 | |return_d|
|000023b0| 61 74 65 2e 6d 6f 6e 74 | 68 20 3d 20 6d 6f 6e 74 |ate.mont|h = mont|
|000023c0| 68 2b 31 3b 0a 58 20 20 | 20 20 20 20 20 20 20 20 |h+1;.X | |
|000023d0| 20 20 20 20 20 20 20 20 | 20 20 20 72 65 74 75 72 | | retur|
|000023e0| 6e 5f 64 61 74 65 2e 64 | 61 79 20 20 20 3d 20 64 |n_date.d|ay = d|
|000023f0| 61 79 2b 31 3b 0a 58 20 | 20 20 20 20 20 20 20 20 |ay+1;.X | |
|00002400| 20 20 20 20 20 20 20 20 | 20 20 20 20 72 65 74 75 | | retu|
|00002410| 72 6e 28 72 65 74 75 72 | 6e 5f 64 61 74 65 29 3b |rn(retur|n_date);|
|00002420| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X | |
|00002430| 20 20 20 20 7d 0a 58 20 | 20 20 20 20 20 20 20 20 | }.X | |
|00002440| 20 20 20 20 20 20 7d 0a | 58 20 20 20 20 20 20 20 | }.|X |
|00002450| 20 20 20 20 20 7d 0a 58 | 20 20 20 20 20 20 20 20 | }.X| |
|00002460| 20 7d 0a 58 20 20 20 20 | 20 20 7d 0a 58 20 20 20 | }.X | }.X |
|00002470| 20 20 20 79 65 61 72 5f | 70 74 72 20 3d 20 79 65 | year_|ptr = ye|
|00002480| 61 72 5f 70 74 72 2d 3e | 6e 65 78 74 3b 0a 58 20 |ar_ptr->|next;.X |
|00002490| 20 20 7d 2f 2a 77 68 69 | 6c 65 2a 2f 0a 58 0a 58 | }/*whi|le*/.X.X|
|000024a0| 20 20 20 2f 2a 20 4e 6f | 20 65 6e 74 72 79 20 66 | /* No| entry f|
|000024b0| 6f 6c 6c 6f 77 69 6e 67 | 20 74 68 65 20 73 70 65 |ollowing| the spe|
|000024c0| 63 69 66 69 65 64 20 64 | 61 74 65 20 77 61 73 20 |cified d|ate was |
|000024d0| 66 6f 75 6e 64 2e 20 2a | 2f 0a 58 20 20 20 72 65 |found. *|/.X re|
|000024e0| 74 75 72 6e 5f 64 61 74 | 65 2e 79 65 61 72 20 20 |turn_dat|e.year |
|000024f0| 3d 20 30 3b 0a 58 20 20 | 20 72 65 74 75 72 6e 5f |= 0;.X | return_|
|00002500| 64 61 74 65 2e 6d 6f 6e | 74 68 20 3d 20 30 3b 0a |date.mon|th = 0;.|
|00002510| 58 20 20 20 72 65 74 75 | 72 6e 5f 64 61 74 65 2e |X retu|rn_date.|
|00002520| 64 61 79 20 20 20 3d 20 | 30 3b 0a 58 20 20 20 72 |day = |0;.X r|
|00002530| 65 74 75 72 6e 20 72 65 | 74 75 72 6e 5f 64 61 74 |eturn re|turn_dat|
|00002540| 65 3b 0a 58 7d 0a 58 0a | 58 0a 58 0a 58 2f 2a 20 |e;.X}.X.|X.X.X/* |
|00002550| 54 68 69 73 20 69 73 20 | 75 67 6c 79 2e 20 20 4f |This is |ugly. O|
|00002560| 68 20 77 65 6c 6c 2e 20 | 2a 2f 0a 58 44 61 74 65 |h well. |*/.XDate|
|00002570| 20 70 72 65 76 5f 65 6e | 74 72 79 28 64 61 74 65 | prev_en|try(date|
|00002580| 29 0a 58 44 61 74 65 20 | 64 61 74 65 3b 0a 58 7b |).XDate |date;.X{|
|00002590| 0a 58 20 20 20 79 65 61 | 72 5f 65 6e 74 72 79 20 |.X yea|r_entry |
|000025a0| 2a 20 79 65 61 72 5f 70 | 74 72 20 3d 20 26 74 61 |* year_p|tr = &ta|
|000025b0| 69 6c 3b 0a 58 20 20 20 | 6d 6f 6e 74 68 5f 65 6e |il;.X |month_en|
|000025c0| 74 72 79 20 2a 20 6d 6f | 6e 74 68 5f 70 74 72 3b |try * mo|nth_ptr;|
|000025d0| 0a 58 20 20 20 63 68 61 | 72 20 2a 20 74 65 78 74 |.X cha|r * text|
|000025e0| 5f 70 74 72 3b 0a 58 20 | 20 20 44 61 74 65 20 72 |_ptr;.X | Date r|
|000025f0| 65 74 75 72 6e 5f 64 61 | 74 65 3b 0a 58 20 20 20 |eturn_da|te;.X |
|00002600| 69 6e 74 20 6d 6f 6e 74 | 68 3b 0a 58 20 20 20 69 |int mont|h;.X i|
|00002610| 6e 74 20 64 61 79 3b 0a | 58 0a 58 20 20 20 77 68 |nt day;.|X.X wh|
|00002620| 69 6c 65 20 28 79 65 61 | 72 5f 70 74 72 29 20 7b |ile (yea|r_ptr) {|
|00002630| 0a 58 20 20 20 20 20 20 | 69 66 20 28 79 65 61 72 |.X |if (year|
|00002640| 5f 70 74 72 2d 3e 79 65 | 61 72 20 3d 3d 20 64 61 |_ptr->ye|ar == da|
|00002650| 74 65 2e 79 65 61 72 29 | 20 7b 0a 58 20 20 20 20 |te.year)| {.X |
|00002660| 20 20 20 20 20 2f 2a 20 | 53 61 6d 65 20 79 65 61 | /* |Same yea|
|00002670| 72 20 61 73 20 64 61 74 | 65 20 73 70 65 63 69 66 |r as dat|e specif|
|00002680| 69 65 64 2e 20 2a 2f 0a | 58 20 20 20 20 20 20 20 |ied. */.|X |
|00002690| 20 20 66 6f 72 20 28 6d | 6f 6e 74 68 3d 64 61 74 | for (m|onth=dat|
|000026a0| 65 2e 6d 6f 6e 74 68 2d | 31 3b 20 6d 6f 6e 74 68 |e.month-|1; month|
|000026b0| 20 3e 3d 20 30 3b 20 6d | 6f 6e 74 68 2d 2d 29 20 | >= 0; m|onth--) |
|000026c0| 7b 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 6d |{.X | m|
|000026d0| 6f 6e 74 68 5f 70 74 72 | 20 3d 20 79 65 61 72 5f |onth_ptr| = year_|
|000026e0| 70 74 72 2d 3e 6d 6f 6e | 74 68 5b 6d 6f 6e 74 68 |ptr->mon|th[month|
|000026f0| 5d 3b 0a 58 20 20 20 20 | 20 20 20 20 20 20 20 20 |];.X | |
|00002700| 69 66 20 28 6d 6f 6e 74 | 68 5f 70 74 72 29 20 7b |if (mont|h_ptr) {|
|00002710| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X | |
|00002720| 20 69 66 20 28 6d 6f 6e | 74 68 20 3d 3d 20 64 61 | if (mon|th == da|
|00002730| 74 65 2e 6d 6f 6e 74 68 | 2d 31 29 20 7b 0a 58 20 |te.month|-1) {.X |
|00002740| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002750| 20 2f 2a 20 53 61 6d 65 | 20 6d 6f 6e 74 68 20 61 | /* Same| month a|
|00002760| 73 20 64 61 74 65 20 73 | 70 65 63 69 66 69 65 64 |s date s|pecified|
|00002770| 2e 20 2a 2f 0a 58 20 20 | 20 20 20 20 20 20 20 20 |. */.X | |
|00002780| 20 20 20 20 20 20 20 20 | 64 61 79 20 3d 20 64 61 | |day = da|
|00002790| 74 65 2e 64 61 79 2d 32 | 3b 0a 58 20 20 20 20 20 |te.day-2|;.X |
|000027a0| 20 20 20 20 20 20 20 20 | 20 20 7d 20 65 6c 73 65 | | } else|
|000027b0| 20 7b 0a 58 20 20 20 20 | 20 20 20 20 20 20 20 20 | {.X | |
|000027c0| 20 20 20 20 20 20 64 61 | 79 20 3d 20 33 30 3b 0a | da|y = 30;.|
|000027d0| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |X | |
|000027e0| 7d 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |}.X | |
|000027f0| 20 20 66 6f 72 20 28 3b | 20 64 61 79 20 3e 3d 20 | for (;| day >= |
|00002800| 30 3b 20 64 61 79 2d 2d | 29 20 7b 0a 58 20 20 20 |0; day--|) {.X |
|00002810| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 74 | | t|
|00002820| 65 78 74 5f 70 74 72 20 | 3d 20 6d 6f 6e 74 68 5f |ext_ptr |= month_|
|00002830| 70 74 72 2d 3e 64 61 79 | 5b 64 61 79 5d 2e 74 65 |ptr->day|[day].te|
|00002840| 78 74 3b 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |xt;.X | |
|00002850| 20 20 20 20 20 20 20 69 | 66 20 28 74 65 78 74 5f | i|f (text_|
|00002860| 70 74 72 20 26 26 20 6e | 6f 74 5f 65 6d 70 74 79 |ptr && n|ot_empty|
|00002870| 28 74 65 78 74 5f 70 74 | 72 29 29 20 7b 0a 58 20 |(text_pt|r)) {.X |
|00002880| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002890| 20 20 20 20 72 65 74 75 | 72 6e 5f 64 61 74 65 2e | retu|rn_date.|
|000028a0| 79 65 61 72 20 20 3d 20 | 79 65 61 72 5f 70 74 72 |year = |year_ptr|
|000028b0| 2d 3e 79 65 61 72 3b 0a | 58 20 20 20 20 20 20 20 |->year;.|X |
|000028c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 72 65 | | re|
|000028d0| 74 75 72 6e 5f 64 61 74 | 65 2e 6d 6f 6e 74 68 20 |turn_dat|e.month |
|000028e0| 3d 20 6d 6f 6e 74 68 2b | 31 3b 0a 58 20 20 20 20 |= month+|1;.X |
|000028f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002900| 20 72 65 74 75 72 6e 5f | 64 61 74 65 2e 64 61 79 | return_|date.day|
|00002910| 20 20 20 3d 20 64 61 79 | 2b 31 3b 0a 58 20 20 20 | = day|+1;.X |
|00002920| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002930| 20 20 72 65 74 75 72 6e | 28 72 65 74 75 72 6e 5f | return|(return_|
|00002940| 64 61 74 65 29 3b 0a 58 | 20 20 20 20 20 20 20 20 |date);.X| |
|00002950| 20 20 20 20 20 20 20 20 | 20 20 7d 0a 58 20 20 20 | | }.X |
|00002960| 20 20 20 20 20 20 20 20 | 20 20 20 20 7d 0a 58 20 | | }.X |
|00002970| 20 20 20 20 20 20 20 20 | 20 20 20 7d 0a 58 20 20 | | }.X |
|00002980| 20 20 20 20 20 20 20 7d | 0a 58 20 20 20 20 20 20 | }|.X |
|00002990| 7d 20 65 6c 73 65 20 69 | 66 20 28 79 65 61 72 5f |} else i|f (year_|
|000029a0| 70 74 72 2d 3e 79 65 61 | 72 20 3c 20 64 61 74 65 |ptr->yea|r < date|
|000029b0| 2e 79 65 61 72 29 20 7b | 0a 58 20 20 20 20 20 20 |.year) {|.X |
|000029c0| 20 20 20 66 6f 72 20 28 | 6d 6f 6e 74 68 3d 31 31 | for (|month=11|
|000029d0| 3b 20 6d 6f 6e 74 68 20 | 3e 3d 20 30 3b 20 6d 6f |; month |>= 0; mo|
|000029e0| 6e 74 68 2d 2d 29 20 7b | 0a 58 20 20 20 20 20 20 |nth--) {|.X |
|000029f0| 20 20 20 20 20 20 6d 6f | 6e 74 68 5f 70 74 72 20 | mo|nth_ptr |
|00002a00| 3d 20 79 65 61 72 5f 70 | 74 72 2d 3e 6d 6f 6e 74 |= year_p|tr->mont|
|00002a10| 68 5b 6d 6f 6e 74 68 5d | 3b 0a 58 20 20 20 20 20 |h[month]|;.X |
|00002a20| 20 20 20 20 20 20 20 69 | 66 20 28 6d 6f 6e 74 68 | i|f (month|
|00002a30| 5f 70 74 72 29 20 7b 0a | 58 20 20 20 20 20 20 20 |_ptr) {.|X |
|00002a40| 20 20 20 20 20 20 20 20 | 66 6f 72 20 28 64 61 79 | |for (day|
|00002a50| 3d 33 30 3b 20 64 61 79 | 20 3e 3d 20 30 3b 20 64 |=30; day| >= 0; d|
|00002a60| 61 79 2d 2d 29 20 7b 0a | 58 20 20 20 20 20 20 20 |ay--) {.|X |
|00002a70| 20 20 20 20 20 20 20 20 | 20 20 20 74 65 78 74 5f | | text_|
|00002a80| 70 74 72 20 3d 20 6d 6f | 6e 74 68 5f 70 74 72 2d |ptr = mo|nth_ptr-|
|00002a90| 3e 64 61 79 5b 64 61 79 | 5d 2e 74 65 78 74 3b 0a |>day[day|].text;.|
|00002aa0| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |X | |
|00002ab0| 20 20 20 69 66 20 28 74 | 65 78 74 5f 70 74 72 20 | if (t|ext_ptr |
|00002ac0| 26 26 20 6e 6f 74 5f 65 | 6d 70 74 79 28 74 65 78 |&& not_e|mpty(tex|
|00002ad0| 74 5f 70 74 72 29 29 20 | 7b 0a 58 20 20 20 20 20 |t_ptr)) |{.X |
|00002ae0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002af0| 72 65 74 75 72 6e 5f 64 | 61 74 65 2e 79 65 61 72 |return_d|ate.year|
|00002b00| 20 20 3d 20 79 65 61 72 | 5f 70 74 72 2d 3e 79 65 | = year|_ptr->ye|
|00002b10| 61 72 3b 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |ar;.X | |
|00002b20| 20 20 20 20 20 20 20 20 | 20 20 72 65 74 75 72 6e | | return|
|00002b30| 5f 64 61 74 65 2e 6d 6f | 6e 74 68 20 3d 20 6d 6f |_date.mo|nth = mo|
|00002b40| 6e 74 68 2b 31 3b 0a 58 | 20 20 20 20 20 20 20 20 |nth+1;.X| |
|00002b50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 72 65 74 | | ret|
|00002b60| 75 72 6e 5f 64 61 74 65 | 2e 64 61 79 20 20 20 3d |urn_date|.day =|
|00002b70| 20 64 61 79 2b 31 3b 0a | 58 20 20 20 20 20 20 20 | day+1;.|X |
|00002b80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 72 65 | | re|
|00002b90| 74 75 72 6e 28 72 65 74 | 75 72 6e 5f 64 61 74 65 |turn(ret|urn_date|
|00002ba0| 29 3b 0a 58 20 20 20 20 | 20 20 20 20 20 20 20 20 |);.X | |
|00002bb0| 20 20 20 20 20 20 7d 0a | 58 20 20 20 20 20 20 20 | }.|X |
|00002bc0| 20 20 20 20 20 20 20 20 | 7d 0a 58 20 20 20 20 20 | |}.X |
|00002bd0| 20 20 20 20 20 20 20 7d | 0a 58 20 20 20 20 20 20 | }|.X |
|00002be0| 20 20 20 7d 0a 58 20 20 | 20 20 20 20 7d 0a 58 20 | }.X | }.X |
|00002bf0| 20 20 20 20 20 79 65 61 | 72 5f 70 74 72 20 3d 20 | yea|r_ptr = |
|00002c00| 79 65 61 72 5f 70 74 72 | 2d 3e 70 72 65 76 3b 0a |year_ptr|->prev;.|
|00002c10| 58 20 20 20 7d 2f 2a 77 | 68 69 6c 65 2a 2f 0a 58 |X }/*w|hile*/.X|
|00002c20| 0a 58 20 20 20 2f 2a 20 | 4e 6f 20 65 6e 74 72 79 |.X /* |No entry|
|00002c30| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 74 68 65 20 73 | followi|ng the s|
|00002c40| 70 65 63 69 66 69 65 64 | 20 64 61 74 65 20 77 61 |pecified| date wa|
|00002c50| 73 20 66 6f 75 6e 64 2e | 20 2a 2f 0a 58 20 20 20 |s found.| */.X |
|00002c60| 72 65 74 75 72 6e 5f 64 | 61 74 65 2e 79 65 61 72 |return_d|ate.year|
|00002c70| 20 20 3d 20 30 3b 0a 58 | 20 20 20 72 65 74 75 72 | = 0;.X| retur|
|00002c80| 6e 5f 64 61 74 65 2e 6d | 6f 6e 74 68 20 3d 20 30 |n_date.m|onth = 0|
|00002c90| 3b 0a 58 20 20 20 72 65 | 74 75 72 6e 5f 64 61 74 |;.X re|turn_dat|
|00002ca0| 65 2e 64 61 79 20 20 20 | 3d 20 30 3b 0a 58 20 20 |e.day |= 0;.X |
|00002cb0| 20 72 65 74 75 72 6e 20 | 72 65 74 75 72 6e 5f 64 | return |return_d|
|00002cc0| 61 74 65 3b 0a 58 7d 0a | 58 0a 58 0a 58 0a 58 0a |ate;.X}.|X.X.X.X.|
|00002cd0| 58 76 6f 69 64 20 73 61 | 76 65 5f 64 69 61 72 79 |Xvoid sa|ve_diary|
|00002ce0| 28 66 69 6c 65 5f 6e 61 | 6d 65 29 0a 58 63 68 61 |(file_na|me).Xcha|
|00002cf0| 72 20 2a 20 66 69 6c 65 | 5f 6e 61 6d 65 3b 0a 58 |r * file|_name;.X|
|00002d00| 7b 0a 58 20 20 20 79 65 | 61 72 5f 65 6e 74 72 79 |{.X ye|ar_entry|
|00002d10| 20 2a 20 79 65 61 72 5f | 70 74 72 20 3d 20 26 68 | * year_|ptr = &h|
|00002d20| 65 61 64 3b 0a 58 20 20 | 20 6d 6f 6e 74 68 5f 65 |ead;.X | month_e|
|00002d30| 6e 74 72 79 20 2a 20 6d | 6f 6e 74 68 5f 70 74 72 |ntry * m|onth_ptr|
|00002d40| 3b 0a 58 20 20 20 63 68 | 61 72 20 2a 20 74 65 78 |;.X ch|ar * tex|
|00002d50| 74 5f 70 74 72 3b 0a 58 | 20 20 20 46 49 4c 45 20 |t_ptr;.X| FILE |
|00002d60| 2a 20 66 69 6c 65 3b 0a | 58 20 20 20 69 6e 74 20 |* file;.|X int |
|00002d70| 6d 6f 6e 74 68 3b 0a 58 | 20 20 20 69 6e 74 20 64 |month;.X| int d|
|00002d80| 61 79 3b 0a 58 0a 58 20 | 20 20 66 69 6c 65 20 3d |ay;.X.X | file =|
|00002d90| 20 66 6f 70 65 6e 28 66 | 69 6c 65 5f 6e 61 6d 65 | fopen(f|ile_name|
|00002da0| 2c 20 22 77 22 29 3b 0a | 58 20 20 20 69 66 20 28 |, "w");.|X if (|
|00002db0| 21 66 69 6c 65 29 20 7b | 0a 58 20 20 20 20 20 20 |!file) {|.X |
|00002dc0| 2f 2a 56 41 52 41 52 47 | 53 2a 2f 0a 58 20 20 20 |/*VARARG|S*/.X |
|00002dd0| 20 20 20 66 70 72 69 6e | 74 66 28 73 74 64 65 72 | fprin|tf(stder|
|00002de0| 72 2c 20 22 78 64 69 61 | 72 79 3a 20 66 6f 70 65 |r, "xdia|ry: fope|
|00002df0| 6e 20 6f 66 20 66 69 6c | 65 20 5c 22 25 73 5c 22 |n of fil|e \"%s\"|
|00002e00| 20 66 61 69 6c 65 64 5c | 6e 22 2c 20 66 69 6c 65 | failed\|n", file|
|00002e10| 5f 6e 61 6d 65 29 3b 0a | 58 20 20 20 20 20 20 72 |_name);.|X r|
|00002e20| 65 74 75 72 6e 3b 0a 58 | 20 20 20 7d 0a 58 0a 58 |eturn;.X| }.X.X|
|00002e30| 20 20 20 77 68 69 6c 65 | 28 79 65 61 72 5f 70 74 | while|(year_pt|
|00002e40| 72 29 20 7b 0a 58 20 20 | 20 20 20 20 66 6f 72 20 |r) {.X | for |
|00002e50| 28 6d 6f 6e 74 68 3d 30 | 3b 20 6d 6f 6e 74 68 20 |(month=0|; month |
|00002e60| 3c 20 31 32 3b 20 6d 6f | 6e 74 68 2b 2b 29 20 7b |< 12; mo|nth++) {|
|00002e70| 0a 58 20 20 20 20 20 20 | 20 20 20 6d 6f 6e 74 68 |.X | month|
|00002e80| 5f 70 74 72 20 3d 20 79 | 65 61 72 5f 70 74 72 2d |_ptr = y|ear_ptr-|
|00002e90| 3e 6d 6f 6e 74 68 5b 6d | 6f 6e 74 68 5d 3b 0a 58 |>month[m|onth];.X|
|00002ea0| 20 20 20 20 20 20 20 20 | 20 69 66 20 28 6d 6f 6e | | if (mon|
|00002eb0| 74 68 5f 70 74 72 29 20 | 7b 0a 58 20 20 20 20 20 |th_ptr) |{.X |
|00002ec0| 20 20 20 20 20 20 20 66 | 6f 72 20 28 64 61 79 3d | f|or (day=|
|00002ed0| 30 3b 20 64 61 79 20 3c | 20 33 31 3b 20 64 61 79 |0; day <| 31; day|
|00002ee0| 2b 2b 29 20 7b 0a 58 20 | 20 20 20 20 20 20 20 20 |++) {.X | |
|00002ef0| 20 20 20 20 20 20 74 65 | 78 74 5f 70 74 72 20 3d | te|xt_ptr =|
|00002f00| 20 6d 6f 6e 74 68 5f 70 | 74 72 2d 3e 64 61 79 5b | month_p|tr->day[|
|00002f10| 64 61 79 5d 2e 74 65 78 | 74 3b 0a 58 20 20 20 20 |day].tex|t;.X |
|00002f20| 20 20 20 20 20 20 20 20 | 20 20 20 69 66 20 28 74 | | if (t|
|00002f30| 65 78 74 5f 70 74 72 20 | 26 26 20 6e 6f 74 5f 65 |ext_ptr |&& not_e|
|00002f40| 6d 70 74 79 28 74 65 78 | 74 5f 70 74 72 29 29 20 |mpty(tex|t_ptr)) |
|00002f50| 7b 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |{.X | |
|00002f60| 20 20 20 20 20 2f 2a 56 | 41 52 41 52 47 53 2a 2f | /*V|ARARGS*/|
|00002f70| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X | |
|00002f80| 20 20 20 20 66 70 72 69 | 6e 74 66 28 0a 58 20 20 | fpri|ntf(.X |
|00002f90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002fa0| 20 20 20 66 69 6c 65 2c | 0a 58 20 20 20 20 20 20 | file,|.X |
|00002fb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 22 | | "|
|00002fc0| 25 64 2f 25 64 2f 25 64 | 5c 6e 22 2c 0a 58 20 20 |%d/%d/%d|\n",.X |
|00002fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002fe0| 20 20 20 6d 6f 6e 74 68 | 2b 31 2c 20 64 61 79 2b | month|+1, day+|
|00002ff0| 31 2c 20 79 65 61 72 5f | 70 74 72 2d 3e 79 65 61 |1, year_|ptr->yea|
|00003000| 72 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |r.X | |
|00003010| 20 20 20 20 20 29 3b 0a | 58 20 20 20 20 20 20 20 | );.|X |
|00003020| 20 20 20 20 20 20 20 20 | 20 20 20 70 75 74 63 28 | | putc(|
|00003030| 51 55 4f 54 45 2c 20 66 | 69 6c 65 29 3b 0a 58 20 |QUOTE, f|ile);.X |
|00003040| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003050| 20 77 68 69 6c 65 20 28 | 2a 74 65 78 74 5f 70 74 | while (|*text_pt|
|00003060| 72 29 20 7b 0a 58 20 20 | 20 20 20 20 20 20 20 20 |r) {.X | |
|00003070| 20 20 20 20 20 20 20 20 | 20 20 20 70 75 74 63 28 | | putc(|
|00003080| 2a 74 65 78 74 5f 70 74 | 72 2c 20 66 69 6c 65 29 |*text_pt|r, file)|
|00003090| 3b 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;.X | |
|000030a0| 20 20 20 20 20 20 20 20 | 69 66 20 28 2a 74 65 78 | |if (*tex|
|000030b0| 74 5f 70 74 72 20 3d 3d | 20 51 55 4f 54 45 29 20 |t_ptr ==| QUOTE) |
|000030c0| 7b 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |{.X | |
|000030d0| 20 20 20 20 20 20 20 20 | 20 20 20 70 75 74 63 28 | | putc(|
|000030e0| 51 55 4f 54 45 2c 20 66 | 69 6c 65 29 3b 0a 58 20 |QUOTE, f|ile);.X |
|000030f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003100| 20 20 20 20 7d 0a 58 20 | 20 20 20 20 20 20 20 20 | }.X | |
|00003110| 20 20 20 20 20 20 20 20 | 20 20 20 20 74 65 78 74 | | text|
|00003120| 5f 70 74 72 2b 2b 3b 0a | 58 20 20 20 20 20 20 20 |_ptr++;.|X |
|00003130| 20 20 20 20 20 20 20 20 | 20 20 20 7d 0a 58 20 20 | | }.X |
|00003140| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003150| 70 75 74 63 28 51 55 4f | 54 45 2c 20 66 69 6c 65 |putc(QUO|TE, file|
|00003160| 29 3b 0a 58 20 20 20 20 | 20 20 20 20 20 20 20 20 |);.X | |
|00003170| 20 20 20 20 20 20 70 75 | 74 63 28 4e 45 57 4c 49 | pu|tc(NEWLI|
|00003180| 4e 45 2c 20 66 69 6c 65 | 29 3b 0a 58 20 20 20 20 |NE, file|);.X |
|00003190| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 70 75 | | pu|
|000031a0| 74 63 28 4e 45 57 4c 49 | 4e 45 2c 20 66 69 6c 65 |tc(NEWLI|NE, file|
|000031b0| 29 3b 0a 58 20 20 20 20 | 20 20 20 20 20 20 20 20 |);.X | |
|000031c0| 20 20 20 7d 0a 58 20 20 | 20 20 20 20 20 20 20 20 | }.X | |
|000031d0| 20 20 7d 0a 58 20 20 20 | 20 20 20 20 20 20 7d 0a | }.X | }.|
|000031e0| 58 20 20 20 20 20 20 7d | 0a 58 20 20 20 20 20 20 |X }|.X |
|000031f0| 79 65 61 72 5f 70 74 72 | 20 3d 20 79 65 61 72 5f |year_ptr| = year_|
|00003200| 70 74 72 2d 3e 6e 65 78 | 74 3b 0a 58 20 20 20 7d |ptr->nex|t;.X }|
|00003210| 2f 2a 77 68 69 6c 65 2a | 2f 0a 58 0a 58 20 20 20 |/*while*|/.X.X |
|00003220| 66 63 6c 6f 73 65 28 66 | 69 6c 65 29 3b 0a 58 7d |fclose(f|ile);.X}|
|00003230| 0a 58 0a 58 0a 58 0a 58 | 0a 58 0a 58 23 64 65 66 |.X.X.X.X|.X.X#def|
|00003240| 69 6e 65 20 70 61 72 73 | 65 5f 65 72 72 6f 72 28 |ine pars|e_error(|
|00003250| 73 74 72 29 20 5c 0a 58 | 20 20 20 28 2f 2a 56 41 |str) \.X| (/*VA|
|00003260| 52 41 52 47 53 2a 2f 66 | 70 72 69 6e 74 66 28 20 |RARGS*/f|printf( |
|00003270| 5c 0a 58 20 20 20 20 20 | 20 73 74 64 65 72 72 2c |\.X | stderr,|
|00003280| 20 5c 0a 58 20 20 20 20 | 20 20 22 78 64 69 61 72 | \.X | "xdiar|
|00003290| 79 3a 20 66 69 6c 65 20 | 5c 22 25 73 5c 22 2c 20 |y: file |\"%s\", |
|000032a0| 6c 69 6e 65 20 25 64 3a | 20 25 73 5c 6e 22 2c 20 |line %d:| %s\n", |
|000032b0| 5c 0a 58 20 20 20 20 20 | 20 66 69 6c 65 5f 6e 61 |\.X | file_na|
|000032c0| 6d 65 2c 20 5c 0a 58 20 | 20 20 20 20 20 63 75 72 |me, \.X | cur|
|000032d0| 72 65 6e 74 5f 6c 69 6e | 65 2c 20 5c 0a 58 20 20 |rent_lin|e, \.X |
|000032e0| 20 20 20 20 28 73 74 72 | 29 20 5c 0a 58 20 20 20 | (str|) \.X |
|000032f0| 29 29 0a 58 0a 58 69 6e | 74 20 69 6e 69 74 5f 64 |)).X.Xin|t init_d|
|00003300| 69 61 72 79 28 66 69 6c | 65 5f 6e 61 6d 65 29 0a |iary(fil|e_name).|
|00003310| 58 63 68 61 72 20 2a 20 | 66 69 6c 65 5f 6e 61 6d |Xchar * |file_nam|
|00003320| 65 3b 0a 58 7b 0a 58 20 | 20 20 63 68 61 72 20 2a |e;.X{.X | char *|
|00003330| 20 66 69 6c 65 20 3d 20 | 72 65 61 64 5f 64 69 61 | file = |read_dia|
|00003340| 72 79 28 66 69 6c 65 5f | 6e 61 6d 65 29 3b 0a 58 |ry(file_|name);.X|
|00003350| 20 20 20 63 68 61 72 20 | 2a 20 66 69 6c 65 70 74 | char |* filept|
|00003360| 72 20 3d 20 26 66 69 6c | 65 5b 30 5d 3b 0a 58 20 |r = &fil|e[0];.X |
|00003370| 20 20 63 68 61 72 20 2a | 20 73 74 61 72 74 5f 6f | char *| start_o|
|00003380| 66 5f 73 74 72 69 6e 67 | 20 3d 20 66 69 6c 65 70 |f_string| = filep|
|00003390| 74 72 3b 0a 58 20 20 20 | 63 68 61 72 20 2a 20 65 |tr;.X |char * e|
|000033a0| 6e 64 5f 6f 66 5f 73 74 | 72 69 6e 67 20 3d 20 66 |nd_of_st|ring = f|
|000033b0| 69 6c 65 70 74 72 3b 0a | 58 20 20 20 69 6e 74 20 |ileptr;.|X int |
|000033c0| 70 61 72 73 69 6e 67 5f | 64 61 74 65 20 3d 20 46 |parsing_|date = F|
|000033d0| 41 4c 53 45 3b 0a 58 20 | 20 20 69 6e 74 20 70 61 |ALSE;.X | int pa|
|000033e0| 72 73 69 6e 67 5f 73 74 | 72 69 6e 67 20 3d 20 46 |rsing_st|ring = F|
|000033f0| 41 4c 53 45 3b 0a 58 20 | 20 20 69 6e 74 20 63 75 |ALSE;.X | int cu|
|00003400| 72 72 65 6e 74 5f 6c 69 | 6e 65 20 3d 20 31 3b 0a |rrent_li|ne = 1;.|
|00003410| 58 20 20 20 69 6e 74 20 | 74 6f 6b 65 6e 5f 6c 61 |X int |token_la|
|00003420| 73 74 5f 73 65 65 6e 20 | 3d 20 53 54 52 49 4e 47 |st_seen |= STRING|
|00003430| 3b 0a 58 20 20 20 44 61 | 74 65 20 64 61 74 65 3b |;.X Da|te date;|
|00003440| 0a 58 0a 58 20 20 20 2f | 2a 20 49 6e 69 74 69 61 |.X.X /|* Initia|
|00003450| 6c 69 7a 65 20 74 68 65 | 20 68 65 61 64 20 61 6e |lize the| head an|
|00003460| 64 20 74 61 69 6c 20 74 | 6f 20 73 69 6d 70 6c 69 |d tail t|o simpli|
|00003470| 66 79 20 65 76 65 72 79 | 74 68 69 6e 67 2e 20 2a |fy every|thing. *|
|00003480| 2f 0a 58 20 20 20 74 61 | 69 6c 2e 79 65 61 72 20 |/.X ta|il.year |
|00003490| 3d 20 4d 41 58 49 4e 54 | 3b 0a 58 20 20 20 74 61 |= MAXINT|;.X ta|
|000034a0| 69 6c 2e 6e 65 78 74 20 | 3d 20 4e 55 4c 4c 3b 0a |il.next |= NULL;.|
|000034b0| 58 20 20 20 74 61 69 6c | 2e 70 72 65 76 20 3d 20 |X tail|.prev = |
|000034c0| 26 68 65 61 64 3b 0a 58 | 0a 58 20 20 20 68 65 61 |&head;.X|.X hea|
|000034d0| 64 2e 79 65 61 72 20 3d | 20 30 3b 0a 58 20 20 20 |d.year =| 0;.X |
|000034e0| 68 65 61 64 2e 6e 65 78 | 74 20 3d 20 26 74 61 69 |head.nex|t = &tai|
|000034f0| 6c 3b 0a 58 20 20 20 68 | 65 61 64 2e 70 72 65 76 |l;.X h|ead.prev|
|00003500| 20 3d 20 4e 55 4c 4c 3b | 0a 58 20 20 20 0a 58 20 | = NULL;|.X .X |
|00003510| 20 20 69 66 20 28 21 66 | 69 6c 65 29 20 7b 0a 58 | if (!f|ile) {.X|
|00003520| 20 20 20 20 20 20 2f 2a | 56 41 52 41 52 47 53 2a | /*|VARARGS*|
|00003530| 2f 0a 58 20 20 20 20 20 | 20 66 70 72 69 6e 74 66 |/.X | fprintf|
|00003540| 28 73 74 64 65 72 72 2c | 20 22 78 64 69 61 72 79 |(stderr,| "xdiary|
|00003550| 3a 20 66 69 6c 65 20 5c | 22 25 73 5c 22 20 77 69 |: file \|"%s\" wi|
|00003560| 6c 6c 20 62 65 20 63 72 | 65 61 74 65 64 5c 6e 22 |ll be cr|eated\n"|
|00003570| 2c 20 66 69 6c 65 5f 6e | 61 6d 65 29 3b 0a 58 20 |, file_n|ame);.X |
|00003580| 20 20 20 20 20 72 65 74 | 75 72 6e 20 46 41 4c 53 | ret|urn FALS|
|00003590| 45 3b 0a 58 20 20 20 7d | 0a 58 0a 58 20 20 20 77 |E;.X }|.X.X w|
|000035a0| 68 69 6c 65 20 28 28 69 | 6e 74 29 2a 66 69 6c 65 |hile ((i|nt)*file|
|000035b0| 70 74 72 20 21 3d 20 45 | 4f 46 29 20 7b 0a 58 20 |ptr != E|OF) {.X |
|000035c0| 20 20 20 20 20 73 77 69 | 74 63 68 20 28 2a 66 69 | swi|tch (*fi|
|000035d0| 6c 65 70 74 72 29 20 7b | 0a 58 20 20 20 20 20 20 |leptr) {|.X |
|000035e0| 20 20 20 63 61 73 65 20 | 51 55 4f 54 45 3a 0a 58 | case |QUOTE:.X|
|000035f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 69 66 20 28 | | if (|
|00003600| 70 61 72 73 69 6e 67 5f | 73 74 72 69 6e 67 29 20 |parsing_|string) |
|00003610| 7b 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |{.X | |
|00003620| 20 20 69 66 20 28 66 69 | 6c 65 70 74 72 5b 31 5d | if (fi|leptr[1]|
|00003630| 20 3d 3d 20 51 55 4f 54 | 45 29 20 7b 0a 58 20 20 | == QUOT|E) {.X |
|00003640| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003650| 2f 2a 20 43 68 61 6e 67 | 65 20 74 77 6f 20 71 75 |/* Chang|e two qu|
|00003660| 6f 74 65 73 20 74 6f 20 | 6f 6e 65 2e 20 2a 2f 0a |otes to |one. */.|
|00003670| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |X | |
|00003680| 20 20 20 2a 65 6e 64 5f | 6f 66 5f 73 74 72 69 6e | *end_|of_strin|
|00003690| 67 20 3d 20 51 55 4f 54 | 45 3b 0a 58 20 20 20 20 |g = QUOT|E;.X |
|000036a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 65 6e | | en|
|000036b0| 64 5f 6f 66 5f 73 74 72 | 69 6e 67 2b 2b 3b 0a 58 |d_of_str|ing++;.X|
|000036c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000036d0| 20 20 66 69 6c 65 70 74 | 72 2b 2b 3b 0a 58 20 20 | filept|r++;.X |
|000036e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 7d 20 65 | | } e|
|000036f0| 6c 73 65 20 7b 0a 58 20 | 20 20 20 20 20 20 20 20 |lse {.X | |
|00003700| 20 20 20 20 20 20 20 20 | 20 2f 2a 20 45 6e 64 20 | | /* End |
|00003710| 6f 66 20 73 74 72 69 6e | 67 2e 20 2a 2f 0a 58 20 |of strin|g. */.X |
|00003720| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003730| 20 2a 65 6e 64 5f 6f 66 | 5f 73 74 72 69 6e 67 20 | *end_of|_string |
|00003740| 3d 20 30 3b 0a 58 20 20 | 20 20 20 20 20 20 20 20 |= 0;.X | |
|00003750| 20 20 20 20 20 20 20 20 | 70 61 72 73 69 6e 67 5f | |parsing_|
|00003760| 73 74 72 69 6e 67 20 3d | 20 46 41 4c 53 45 3b 0a |string =| FALSE;.|
|00003770| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |X | |
|00003780| 20 20 20 69 66 20 28 74 | 6f 6b 65 6e 5f 6c 61 73 | if (t|oken_las|
|00003790| 74 5f 73 65 65 6e 20 3d | 3d 20 53 54 52 49 4e 47 |t_seen =|= STRING|
|000037a0| 29 20 7b 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |) {.X | |
|000037b0| 20 20 20 20 20 20 20 20 | 20 20 70 61 72 73 65 5f | | parse_|
|000037c0| 65 72 72 6f 72 28 22 64 | 61 74 65 20 6d 69 73 73 |error("d|ate miss|
|000037d0| 69 6e 67 22 29 3b 0a 58 | 20 20 20 20 20 20 20 20 |ing");.X| |
|000037e0| 20 20 20 20 20 20 20 20 | 20 20 7d 20 65 6c 73 65 | | } else|
|000037f0| 20 7b 0a 58 20 20 20 20 | 20 20 20 20 20 20 20 20 | {.X | |
|00003800| 20 20 20 20 20 20 20 20 | 20 69 6e 73 74 61 6c 6c | | install|
|00003810| 28 64 61 74 65 2c 20 73 | 74 61 72 74 5f 6f 66 5f |(date, s|tart_of_|
|00003820| 73 74 72 69 6e 67 2c 20 | 46 41 4c 53 45 29 3b 0a |string, |FALSE);.|
|00003830| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |X | |
|00003840| 20 20 20 7d 0a 58 20 20 | 20 20 20 20 20 20 20 20 | }.X | |
|00003850| 20 20 20 20 20 20 20 20 | 74 6f 6b 65 6e 5f 6c 61 | |token_la|
|00003860| 73 74 5f 73 65 65 6e 20 | 3d 20 53 54 52 49 4e 47 |st_seen |= STRING|
|00003870| 3b 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;.X | |
|00003880| 20 20 20 20 20 73 74 61 | 72 74 5f 6f 66 5f 73 74 | sta|rt_of_st|
|00003890| 72 69 6e 67 20 3d 20 65 | 6e 64 5f 6f 66 5f 73 74 |ring = e|nd_of_st|
|000038a0| 72 69 6e 67 20 3d 20 66 | 69 6c 65 70 74 72 20 2b |ring = f|ileptr +|
|000038b0| 20 31 3b 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 | 1;.X | |
|000038c0| 20 20 20 20 7d 0a 58 20 | 20 20 20 20 20 20 20 20 | }.X | |
|000038d0| 20 20 20 7d 20 65 6c 73 | 65 20 7b 0a 58 20 20 20 | } els|e {.X |
|000038e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 2f 2a 20 4d | | /* M|
|000038f0| 75 73 74 20 62 65 20 74 | 68 65 20 73 74 61 72 74 |ust be t|he start|
|00003900| 20 6f 66 20 61 20 6e 65 | 77 20 73 74 72 69 6e 67 | of a ne|w string|
|00003910| 2e 20 2a 2f 0a 58 20 20 | 20 20 20 20 20 20 20 20 |. */.X | |
|00003920| 20 20 20 20 20 70 61 72 | 73 69 6e 67 5f 73 74 72 | par|sing_str|
|00003930| 69 6e 67 20 3d 20 54 52 | 55 45 3b 0a 58 20 20 20 |ing = TR|UE;.X |
|00003940| 20 20 20 20 20 20 20 20 | 20 20 20 20 73 74 61 72 | | star|
|00003950| 74 5f 6f 66 5f 73 74 72 | 69 6e 67 20 3d 20 65 6e |t_of_str|ing = en|
|00003960| 64 5f 6f 66 5f 73 74 72 | 69 6e 67 20 3d 20 66 69 |d_of_str|ing = fi|
|00003970| 6c 65 70 74 72 20 2b 20 | 31 3b 0a 58 20 20 20 20 |leptr + |1;.X |
|00003980| 20 20 20 20 20 20 20 20 | 7d 0a 58 20 20 20 20 20 | |}.X |
|00003990| 20 20 20 20 20 20 20 62 | 72 65 61 6b 3b 0a 58 20 | b|reak;.X |
|000039a0| 20 20 20 20 20 20 20 20 | 63 61 73 65 20 4e 45 57 | |case NEW|
|000039b0| 4c 49 4e 45 3a 0a 58 20 | 20 20 20 20 20 20 20 20 |LINE:.X | |
|000039c0| 20 20 20 69 66 20 28 70 | 61 72 73 69 6e 67 5f 64 | if (p|arsing_d|
|000039d0| 61 74 65 29 20 7b 0a 58 | 20 20 20 20 20 20 20 20 |ate) {.X| |
|000039e0| 20 20 20 20 20 20 20 2f | 2a 20 46 69 6e 69 73 68 | /|* Finish|
|000039f0| 65 64 20 70 61 72 73 69 | 6e 67 20 61 20 64 61 74 |ed parsi|ng a dat|
|00003a00| 65 2e 20 2a 2f 0a 58 20 | 20 20 20 20 20 20 20 20 |e. */.X | |
|00003a10| 20 20 20 20 20 20 70 61 | 72 73 69 6e 67 5f 64 61 | pa|rsing_da|
|00003a20| 74 65 20 3d 20 46 41 4c | 53 45 3b 0a 58 20 20 20 |te = FAL|SE;.X |
|00003a30| 20 20 20 20 20 20 20 20 | 20 20 20 20 2a 65 6e 64 | | *end|
|00003a40| 5f 6f 66 5f 73 74 72 69 | 6e 67 20 3d 20 30 3b 0a |_of_stri|ng = 0;.|
|00003a50| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |X | |
|00003a60| 69 66 20 28 74 6f 6b 65 | 6e 5f 6c 61 73 74 5f 73 |if (toke|n_last_s|
|00003a70| 65 65 6e 20 3d 3d 20 44 | 41 54 45 29 20 7b 0a 58 |een == D|ATE) {.X|
|00003a80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003a90| 20 20 70 61 72 73 65 5f | 65 72 72 6f 72 28 22 74 | parse_|error("t|
|00003aa0| 65 78 74 20 6d 69 73 73 | 69 6e 67 22 29 3b 0a 58 |ext miss|ing");.X|
|00003ab0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7d | | }|
|00003ac0| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X | |
|00003ad0| 20 74 6f 6b 65 6e 5f 6c | 61 73 74 5f 73 65 65 6e | token_l|ast_seen|
|00003ae0| 20 3d 20 44 41 54 45 3b | 0a 58 20 20 20 20 20 20 | = DATE;|.X |
|00003af0| 20 20 20 20 20 20 20 20 | 20 64 61 74 65 20 3d 20 | | date = |
|00003b00| 63 6f 6e 76 65 72 74 5f | 73 74 72 69 6e 67 5f 74 |convert_|string_t|
|00003b10| 6f 5f 64 61 74 65 28 0a | 58 20 20 20 20 20 20 20 |o_date(.|X |
|00003b20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003b30| 20 20 64 65 66 61 75 6c | 74 5f 6d 6f 6e 74 68 5f | defaul|t_month_|
|00003b40| 6e 61 6d 65 73 2c 0a 58 | 20 20 20 20 20 20 20 20 |names,.X| |
|00003b50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003b60| 20 73 74 61 72 74 5f 6f | 66 5f 73 74 72 69 6e 67 | start_o|f_string|
|00003b70| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X | |
|00003b80| 20 20 20 20 20 20 20 20 | 29 3b 0a 58 20 20 20 20 | |);.X |
|00003b90| 20 20 20 20 20 20 20 20 | 20 20 20 69 66 20 28 64 | | if (d|
|00003ba0| 61 74 65 2e 79 65 61 72 | 20 3d 3d 20 30 29 20 7b |ate.year| == 0) {|
|00003bb0| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X | |
|00003bc0| 20 20 20 20 70 61 72 73 | 65 5f 65 72 72 6f 72 28 | pars|e_error(|
|00003bd0| 22 62 61 64 20 64 61 74 | 65 22 29 3b 0a 58 20 20 |"bad dat|e");.X |
|00003be0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003bf0| 74 6f 6b 65 6e 5f 6c 61 | 73 74 5f 73 65 65 6e 20 |token_la|st_seen |
|00003c00| 3d 20 53 54 52 49 4e 47 | 3b 0a 58 20 20 20 20 20 |= STRING|;.X |
|00003c10| 20 20 20 20 20 20 20 20 | 20 20 7d 0a 58 20 20 20 | | }.X |
|00003c20| 20 20 20 20 20 20 20 20 | 20 7d 20 65 6c 73 65 20 | | } else |
|00003c30| 69 66 20 28 70 61 72 73 | 69 6e 67 5f 73 74 72 69 |if (pars|ing_stri|
|00003c40| 6e 67 29 20 7b 0a 58 20 | 20 20 20 20 20 20 20 20 |ng) {.X | |
|00003c50| 20 20 20 20 20 20 2f 2a | 20 4e 65 77 6c 69 6e 65 | /*| Newline|
|00003c60| 20 69 73 20 70 61 72 74 | 20 6f 66 20 61 20 73 74 | is part| of a st|
|00003c70| 72 69 6e 67 2e 20 2a 2f | 0a 58 20 20 20 20 20 20 |ring. */|.X |
|00003c80| 20 20 20 20 20 20 20 20 | 20 2a 65 6e 64 5f 6f 66 | | *end_of|
|00003c90| 5f 73 74 72 69 6e 67 20 | 3d 20 2a 66 69 6c 65 70 |_string |= *filep|
|00003ca0| 74 72 3b 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |tr;.X | |
|00003cb0| 20 20 20 20 65 6e 64 5f | 6f 66 5f 73 74 72 69 6e | end_|of_strin|
|00003cc0| 67 2b 2b 3b 0a 58 20 20 | 20 20 20 20 20 20 20 20 |g++;.X | |
|00003cd0| 20 20 7d 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 | }.X | |
|00003ce0| 20 63 75 72 72 65 6e 74 | 5f 6c 69 6e 65 2b 2b 3b | current|_line++;|
|00003cf0| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 62 72 |.X | br|
|00003d00| 65 61 6b 3b 0a 58 20 20 | 20 20 20 20 20 20 20 64 |eak;.X | d|
|00003d10| 65 66 61 75 6c 74 3a 0a | 58 20 20 20 20 20 20 20 |efault:.|X |
|00003d20| 20 20 20 20 20 69 66 20 | 28 70 61 72 73 69 6e 67 | if |(parsing|
|00003d30| 5f 64 61 74 65 20 7c 7c | 20 70 61 72 73 69 6e 67 |_date ||| parsing|
|00003d40| 5f 73 74 72 69 6e 67 29 | 20 7b 0a 58 20 20 20 20 |_string)| {.X |
|00003d50| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2a 20 50 61 | | /* Pa|
|00003d60| 72 74 20 6f 66 20 73 74 | 72 69 6e 67 2e 20 2a 2f |rt of st|ring. */|
|00003d70| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X | |
|00003d80| 20 2a 65 6e 64 5f 6f 66 | 5f 73 74 72 69 6e 67 20 | *end_of|_string |
|00003d90| 3d 20 2a 66 69 6c 65 70 | 74 72 3b 0a 58 20 20 20 |= *filep|tr;.X |
|00003da0| 20 20 20 20 20 20 20 20 | 20 20 20 20 65 6e 64 5f | | end_|
|00003db0| 6f 66 5f 73 74 72 69 6e | 67 2b 2b 3b 0a 58 20 20 |of_strin|g++;.X |
|00003dc0| 20 20 20 20 20 20 20 20 | 20 20 7d 20 65 6c 73 65 | | } else|
|00003dd0| 20 7b 0a 58 20 20 20 20 | 20 20 20 20 20 20 20 20 | {.X | |
|00003de0| 20 20 20 2f 2a 20 49 66 | 20 63 68 61 72 61 63 74 | /* If| charact|
|00003df0| 65 72 20 69 73 20 73 69 | 67 6e 69 67 69 63 61 6e |er is si|gnigican|
|00003e00| 74 2c 20 73 74 61 72 74 | 20 70 61 72 73 69 6e 67 |t, start| parsing|
|00003e10| 20 64 61 74 65 2e 20 2a | 2f 0a 58 20 20 20 20 20 | date. *|/.X |
|00003e20| 20 20 20 20 20 20 20 20 | 20 20 69 66 20 28 21 69 | | if (!i|
|00003e30| 73 73 70 61 63 65 28 2a | 66 69 6c 65 70 74 72 29 |sspace(*|fileptr)|
|00003e40| 29 20 7b 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |) {.X | |
|00003e50| 20 20 20 20 20 20 20 70 | 61 72 73 69 6e 67 5f 64 | p|arsing_d|
|00003e60| 61 74 65 20 3d 20 54 52 | 55 45 3b 0a 58 20 20 20 |ate = TR|UE;.X |
|00003e70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 65 | | e|
|00003e80| 6e 64 5f 6f 66 5f 73 74 | 72 69 6e 67 20 3d 20 73 |nd_of_st|ring = s|
|00003e90| 74 61 72 74 5f 6f 66 5f | 73 74 72 69 6e 67 20 3d |tart_of_|string =|
|00003ea0| 20 66 69 6c 65 70 74 72 | 3b 0a 58 20 20 20 20 20 | fileptr|;.X |
|00003eb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 65 6e 64 | | end|
|00003ec0| 5f 6f 66 5f 73 74 72 69 | 6e 67 2b 2b 3b 0a 58 20 |_of_stri|ng++;.X |
|00003ed0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7d 0a | | }.|
|00003ee0| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 7d 0a 58 |X | }.X|
|00003ef0| 20 20 20 20 20 20 7d 2f | 2a 73 77 69 74 63 68 2a | }/|*switch*|
|00003f00| 2f 0a 58 20 20 20 20 20 | 20 66 69 6c 65 70 74 72 |/.X | fileptr|
|00003f10| 2b 2b 3b 0a 58 20 20 20 | 7d 0a 58 20 20 20 72 65 |++;.X |}.X re|
|00003f20| 74 75 72 6e 20 54 52 55 | 45 3b 0a 58 7d 0a 58 0a |turn TRU|E;.X}.X.|
|00003f30| 58 0a 58 0a 58 0a 58 0a | 58 23 69 66 64 65 66 20 |X.X.X.X.|X#ifdef |
|00003f40| 44 45 42 55 47 0a 58 76 | 6f 69 64 20 64 75 6d 70 |DEBUG.Xv|oid dump|
|00003f50| 5f 64 61 69 72 79 28 29 | 0a 58 7b 0a 58 20 20 20 |_dairy()|.X{.X |
|00003f60| 79 65 61 72 5f 65 6e 74 | 72 79 20 2a 20 79 65 61 |year_ent|ry * yea|
|00003f70| 72 5f 70 74 72 20 3d 20 | 26 68 65 61 64 3b 0a 58 |r_ptr = |&head;.X|
|00003f80| 20 20 20 69 6e 74 20 6d | 6f 6e 74 68 3b 0a 58 20 | int m|onth;.X |
|00003f90| 20 20 69 6e 74 20 64 61 | 79 3b 0a 58 0a 58 20 20 | int da|y;.X.X |
|00003fa0| 20 77 68 69 6c 65 28 79 | 65 61 72 5f 70 74 72 29 | while(y|ear_ptr)|
|00003fb0| 20 7b 0a 58 20 20 20 20 | 20 20 66 6f 72 20 28 6d | {.X | for (m|
|00003fc0| 6f 6e 74 68 3d 30 3b 20 | 6d 6f 6e 74 68 20 3c 20 |onth=0; |month < |
|00003fd0| 31 32 3b 20 6d 6f 6e 74 | 68 2b 2b 29 20 7b 0a 58 |12; mont|h++) {.X|
|00003fe0| 20 20 20 20 20 20 20 20 | 20 69 66 20 28 79 65 61 | | if (yea|
|00003ff0| 72 5f 70 74 72 2d 3e 6d | 6f 6e 74 68 5b 6d 6f 6e |r_ptr->m|onth[mon|
|00004000| 74 68 5d 29 20 7b 0a 58 | 20 20 20 20 20 20 20 20 |th]) {.X| |
|00004010| 20 20 20 20 66 6f 72 20 | 28 64 61 79 3d 30 3b 20 | for |(day=0; |
|00004020| 64 61 79 20 3c 20 33 31 | 3b 20 64 61 79 2b 2b 29 |day < 31|; day++)|
|00004030| 20 7b 0a 58 20 20 20 20 | 20 20 20 20 20 20 20 20 | {.X | |
|00004040| 20 20 20 69 66 20 28 79 | 65 61 72 5f 70 74 72 2d | if (y|ear_ptr-|
|00004050| 3e 6d 6f 6e 74 68 5b 6d | 6f 6e 74 68 5d 2d 3e 64 |>month[m|onth]->d|
|00004060| 61 79 5b 64 61 79 5d 2e | 74 65 78 74 29 20 7b 0a |ay[day].|text) {.|
|00004070| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |X | |
|00004080| 20 20 20 2f 2a 56 41 52 | 41 52 47 53 2a 2f 0a 58 | /*VAR|ARGS*/.X|
|00004090| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000040a0| 20 20 70 72 69 6e 74 66 | 28 0a 58 20 20 20 20 20 | printf|(.X |
|000040b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000040c0| 22 64 61 74 65 3d 25 64 | 2f 25 64 2f 25 64 5c 6e |"date=%d|/%d/%d\n|
|000040d0| 66 72 65 65 61 62 6c 65 | 3d 25 64 5c 6e 74 65 78 |freeable|=%d\ntex|
|000040e0| 74 3d 5c 22 25 73 5c 22 | 5c 6e 22 2c 0a 58 20 20 |t=\"%s\"|\n",.X |
|000040f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004100| 20 20 20 79 65 61 72 5f | 70 74 72 2d 3e 79 65 61 | year_|ptr->yea|
|00004110| 72 2c 20 6d 6f 6e 74 68 | 2c 20 64 61 79 2c 0a 58 |r, month|, day,.X|
|00004120| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004130| 20 20 20 20 20 79 65 61 | 72 5f 70 74 72 2d 3e 6d | yea|r_ptr->m|
|00004140| 6f 6e 74 68 5b 6d 6f 6e | 74 68 5d 2d 3e 64 61 79 |onth[mon|th]->day|
|00004150| 5b 64 61 79 5d 2e 66 72 | 65 65 61 62 6c 65 2c 0a |[day].fr|eeable,.|
|00004160| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |X | |
|00004170| 20 20 20 20 20 20 79 65 | 61 72 5f 70 74 72 2d 3e | ye|ar_ptr->|
|00004180| 6d 6f 6e 74 68 5b 6d 6f | 6e 74 68 5d 2d 3e 64 61 |month[mo|nth]->da|
|00004190| 79 5b 64 61 79 5d 2e 74 | 65 78 74 0a 58 20 20 20 |y[day].t|ext.X |
|000041a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 29 | | )|
|000041b0| 3b 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;.X | |
|000041c0| 20 20 7d 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 | }.X | |
|000041d0| 20 7d 0a 58 20 20 20 20 | 20 20 20 20 20 7d 0a 58 | }.X | }.X|
|000041e0| 20 20 20 20 20 20 7d 0a | 58 20 20 20 20 20 20 79 | }.|X y|
|000041f0| 65 61 72 5f 70 74 72 20 | 3d 20 79 65 61 72 5f 70 |ear_ptr |= year_p|
|00004200| 74 72 2d 3e 6e 65 78 74 | 3b 0a 58 20 20 20 7d 2f |tr->next|;.X }/|
|00004210| 2a 77 68 69 6c 65 2a 2f | 0a 58 7d 0a 58 23 65 6e |*while*/|.X}.X#en|
|00004220| 64 69 66 0a 45 4e 44 5f | 4f 46 5f 46 49 4c 45 0a |dif.END_|OF_FILE.|
|00004230| 69 66 20 74 65 73 74 20 | 31 35 34 37 32 20 2d 6e |if test |15472 -n|
|00004240| 65 20 60 77 63 20 2d 63 | 20 3c 27 64 69 61 72 79 |e `wc -c| <'diary|
|00004250| 2e 63 27 60 3b 20 74 68 | 65 6e 0a 20 20 20 20 65 |.c'`; th|en. e|
|00004260| 63 68 6f 20 73 68 61 72 | 3a 20 5c 22 27 64 69 61 |cho shar|: \"'dia|
|00004270| 72 79 2e 63 27 5c 22 20 | 75 6e 70 61 63 6b 65 64 |ry.c'\" |unpacked|
|00004280| 20 77 69 74 68 20 77 72 | 6f 6e 67 20 73 69 7a 65 | with wr|ong size|
|00004290| 21 0a 66 69 0a 23 20 65 | 6e 64 20 6f 66 20 27 64 |!.fi.# e|nd of 'd|
|000042a0| 69 61 72 79 2e 63 27 0a | 66 69 0a 69 66 20 74 65 |iary.c'.|fi.if te|
|000042b0| 73 74 20 2d 66 20 27 78 | 64 69 61 72 79 2e 6d 61 |st -f 'x|diary.ma|
|000042c0| 6e 27 20 2d 61 20 22 24 | 7b 31 7d 22 20 21 3d 20 |n' -a "$|{1}" != |
|000042d0| 22 2d 63 22 20 3b 20 74 | 68 65 6e 20 0a 20 20 65 |"-c" ; t|hen . e|
|000042e0| 63 68 6f 20 73 68 61 72 | 3a 20 57 69 6c 6c 20 6e |cho shar|: Will n|
|000042f0| 6f 74 20 63 6c 6f 62 62 | 65 72 20 65 78 69 73 74 |ot clobb|er exist|
|00004300| 69 6e 67 20 66 69 6c 65 | 20 5c 22 27 78 64 69 61 |ing file| \"'xdia|
|00004310| 72 79 2e 6d 61 6e 27 5c | 22 0a 65 6c 73 65 0a 65 |ry.man'\|".else.e|
|00004320| 63 68 6f 20 73 68 61 72 | 3a 20 45 78 74 72 61 63 |cho shar|: Extrac|
|00004330| 74 69 6e 67 20 5c 22 27 | 78 64 69 61 72 79 2e 6d |ting \"'|xdiary.m|
|00004340| 61 6e 27 5c 22 20 5c 28 | 31 36 33 32 36 20 63 68 |an'\" \(|16326 ch|
|00004350| 61 72 61 63 74 65 72 73 | 5c 29 0a 73 65 64 20 22 |aracters|\).sed "|
|00004360| 73 2f 5e 58 2f 2f 22 20 | 3e 27 78 64 69 61 72 79 |s/^X//" |>'xdiary|
|00004370| 2e 6d 61 6e 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |.man' <<|'END_OF_|
|00004380| 46 49 4c 45 27 0a 58 2e | 54 48 20 78 64 69 61 72 |FILE'.X.|TH xdiar|
|00004390| 79 20 31 20 22 52 65 6c | 65 61 73 65 20 34 22 20 |y 1 "Rel|ease 4" |
|000043a0| 22 58 20 56 65 72 73 69 | 6f 6e 20 31 31 22 0a 58 |"X Versi|on 11".X|
|000043b0| 2e 53 48 20 4e 41 4d 45 | 0a 58 5c 66 49 78 64 69 |.SH NAME|.X\fIxdi|
|000043c0| 61 72 79 5c 66 50 20 5c | 2d 20 69 6e 74 65 72 61 |ary\fP \|- intera|
|000043d0| 63 74 69 76 65 20 64 69 | 61 72 79 20 61 6e 64 20 |ctive di|ary and |
|000043e0| 63 61 6c 65 6e 64 61 72 | 20 66 6f 72 20 58 31 31 |calendar| for X11|
|000043f0| 20 52 34 0a 58 2e 53 48 | 20 53 59 4e 54 41 58 0a | R4.X.SH| SYNTAX.|
|00004400| 58 5c 66 49 78 64 69 61 | 72 79 5c 66 50 20 5b 6f |X\fIxdia|ry\fP [o|
|00004410| 70 74 69 6f 6e 73 5d 0a | 58 2e 53 48 20 44 45 53 |ptions].|X.SH DES|
|00004420| 43 52 49 50 54 49 4f 4e | 0a 58 5c 66 49 78 64 69 |CRIPTION|.X\fIxdi|
|00004430| 61 72 79 5c 66 50 20 69 | 73 20 61 6e 20 58 20 61 |ary\fP i|s an X a|
|00004440| 70 70 6c 69 63 61 74 69 | 6f 6e 20 74 68 61 74 20 |pplicati|on that |
|00004450| 64 69 73 70 6c 61 79 73 | 20 61 20 63 61 6c 65 6e |displays| a calen|
|00004460| 64 61 72 20 69 6e 20 6f | 6e 65 20 6f 66 20 74 77 |dar in o|ne of tw|
|00004470| 6f 0a 58 66 6f 72 6d 61 | 74 73 20 61 6e 64 2f 6f |o.Xforma|ts and/o|
|00004480| 72 20 61 6e 20 69 6e 74 | 65 72 61 63 74 69 76 65 |r an int|eractive|
|00004490| 20 64 61 69 6c 79 20 64 | 69 61 72 79 2e 0a 58 2e | daily d|iary..X.|
|000044a0| 53 48 20 4f 50 54 49 4f | 4e 53 0a 58 5c 66 49 78 |SH OPTIO|NS.X\fIx|
|000044b0| 64 69 61 72 79 5c 66 50 | 20 61 63 63 65 70 74 73 |diary\fP| accepts|
|000044c0| 20 61 6c 6c 20 6f 66 20 | 74 68 65 20 73 74 61 6e | all of |the stan|
|000044d0| 64 61 72 64 20 74 6f 6f | 6c 6b 69 74 20 63 6f 6d |dard too|lkit com|
|000044e0| 6d 61 6e 64 20 6c 69 6e | 65 20 6f 70 74 69 6f 6e |mand lin|e option|
|000044f0| 73 20 61 6c 6f 6e 67 0a | 58 77 69 74 68 20 74 68 |s along.|Xwith th|
|00004500| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 3a 0a 58 2e 49 |e follow|ing:.X.I|
|00004510| 50 20 22 5c 66 42 2d 6c | 69 6e 65 77 69 64 74 68 |P "\fB-l|inewidth|
|00004520| 5c 66 50 20 5c 66 49 70 | 69 78 65 6c 73 5c 66 50 |\fP \fIp|ixels\fP|
|00004530| 22 20 31 32 0a 58 54 68 | 69 73 20 6f 70 74 69 6f |" 12.XTh|is optio|
|00004540| 6e 20 69 6e 64 69 63 61 | 74 65 73 20 68 6f 77 20 |n indica|tes how |
|00004550| 6d 61 6e 79 20 70 69 78 | 65 6c 73 20 77 69 64 65 |many pix|els wide|
|00004560| 20 74 68 65 20 6c 69 6e | 65 73 20 63 6f 6d 70 6f | the lin|es compo|
|00004570| 73 69 6e 67 20 74 68 65 | 0a 58 63 61 6c 65 6e 64 |sing the|.Xcalend|
|00004580| 61 72 20 67 72 69 64 20 | 73 68 6f 75 6c 64 20 62 |ar grid |should b|
|00004590| 65 2e 20 20 42 79 20 64 | 65 66 61 75 6c 74 2c 20 |e. By d|efault, |
|000045a0| 74 68 65 20 67 72 69 64 | 20 6c 69 6e 65 73 20 61 |the grid| lines a|
|000045b0| 72 65 20 6f 6e 65 20 70 | 69 78 65 6c 20 77 69 64 |re one p|ixel wid|
|000045c0| 65 2e 0a 58 2e 49 50 20 | 22 5c 66 42 2d 66 75 6c |e..X.IP |"\fB-ful|
|000045d0| 6c 67 65 6f 6d 65 74 72 | 79 5c 66 50 20 5c 66 49 |lgeometr|y\fP \fI|
|000045e0| 67 65 6f 6d 65 74 72 79 | 5c 66 50 22 20 31 32 0a |geometry|\fP" 12.|
|000045f0| 58 54 68 69 73 20 6f 70 | 74 69 6f 6e 20 69 6e 64 |XThis op|tion ind|
|00004600| 69 63 61 74 65 73 20 74 | 68 65 20 67 65 6f 6d 65 |icates t|he geome|
|00004610| 74 72 79 20 74 6f 20 62 | 65 20 75 73 65 64 20 77 |try to b|e used w|
|00004620| 68 65 6e 20 64 65 74 65 | 72 6d 69 6e 69 6e 67 20 |hen dete|rmining |
|00004630| 74 68 65 0a 58 73 69 7a | 65 20 61 6e 64 20 70 6f |the.Xsiz|e and po|
|00004640| 73 69 74 69 6f 6e 20 6f | 66 20 74 68 65 20 66 75 |sition o|f the fu|
|00004650| 6c 6c 20 79 65 61 72 20 | 63 61 6c 65 6e 64 61 72 |ll year |calendar|
|00004660| 2e 20 20 54 68 65 20 66 | 75 6c 6c 20 79 65 61 72 |. The f|ull year|
|00004670| 0a 58 63 61 6c 65 6e 64 | 61 72 20 77 69 6c 6c 20 |.Xcalend|ar will |
|00004680| 64 65 66 61 75 6c 74 20 | 74 6f 20 74 68 65 20 6d |default |to the m|
|00004690| 69 6e 69 6d 75 6d 20 73 | 69 7a 65 20 6e 65 65 64 |inimum s|ize need|
|000046a0| 65 64 20 74 6f 20 68 6f | 6c 64 20 63 61 6c 65 6e |ed to ho|ld calen|
|000046b0| 64 61 72 73 0a 58 66 6f | 72 20 61 6c 6c 20 74 77 |dars.Xfo|r all tw|
|000046c0| 65 6c 76 65 20 6d 6f 6e | 74 68 73 20 62 61 73 65 |elve mon|ths base|
|000046d0| 64 20 6f 6e 20 74 68 65 | 20 73 70 65 63 69 66 69 |d on the| specifi|
|000046e0| 65 64 20 66 6f 6e 74 2c | 0a 58 61 62 62 72 65 76 |ed font,|.Xabbrev|
|000046f0| 69 61 74 69 6f 6e 2c 20 | 61 6e 64 20 6c 61 6e 67 |iation, |and lang|
|00004700| 75 61 67 65 20 6f 70 74 | 69 6f 6e 73 2e 0a 58 2e |uage opt|ions..X.|
|00004710| 49 50 20 22 5c 66 42 2d | 73 69 6e 67 6c 65 67 65 |IP "\fB-|singlege|
|00004720| 6f 6d 65 74 72 79 5c 66 | 50 20 5c 66 49 67 65 6f |ometry\f|P \fIgeo|
|00004730| 6d 65 74 72 79 5c 66 50 | 22 20 31 32 0a 58 54 68 |metry\fP|" 12.XTh|
|00004740| 69 73 20 6f 70 74 69 6f | 6e 20 69 6e 64 69 63 61 |is optio|n indica|
|00004750| 74 65 73 20 74 68 65 20 | 67 65 6f 6d 65 74 72 79 |tes the |geometry|
|00004760| 20 74 6f 20 62 65 20 75 | 73 65 64 20 77 68 65 6e | to be u|sed when|
|00004770| 20 64 65 74 65 72 6d 69 | 6e 69 6e 67 20 74 68 65 | determi|ning the|
|00004780| 0a 58 73 69 7a 65 20 61 | 6e 64 20 70 6f 73 69 74 |.Xsize a|nd posit|
|00004790| 69 6f 6e 20 6f 66 20 74 | 68 65 20 73 69 6e 67 6c |ion of t|he singl|
|000047a0| 65 20 6d 6f 6e 74 68 20 | 63 61 6c 65 6e 64 61 72 |e month |calendar|
|000047b0| 2e 20 20 54 68 65 20 73 | 69 6e 67 6c 65 20 6d 6f |. The s|ingle mo|
|000047c0| 6e 74 68 0a 58 63 61 6c | 65 6e 64 61 72 20 77 69 |nth.Xcal|endar wi|
|000047d0| 6c 6c 20 64 65 66 61 75 | 6c 74 20 74 6f 20 74 68 |ll defau|lt to th|
|000047e0| 65 20 6d 69 6e 69 6d 75 | 6d 20 73 69 7a 65 20 6e |e minimu|m size n|
|000047f0| 65 65 64 65 64 20 74 6f | 20 68 6f 6c 64 20 61 20 |eeded to| hold a |
|00004800| 63 61 6c 65 6e 64 61 72 | 0a 58 66 6f 72 20 61 20 |calendar|.Xfor a |
|00004810| 73 69 6e 67 6c 65 20 6d | 6f 6e 74 68 20 62 61 73 |single m|onth bas|
|00004820| 65 64 20 6f 6e 20 74 68 | 65 20 73 70 65 63 69 66 |ed on th|e specif|
|00004830| 69 65 64 20 66 6f 6e 74 | 2c 20 61 62 62 72 65 76 |ied font|, abbrev|
|00004840| 69 61 74 69 6f 6e 2c 0a | 58 61 6e 64 20 6c 61 6e |iation,.|Xand lan|
|00004850| 67 75 61 67 65 20 6f 70 | 74 69 6f 6e 73 2e 0a 58 |guage op|tions..X|
|00004860| 2e 49 50 20 22 5c 66 42 | 2d 64 69 61 72 79 67 65 |.IP "\fB|-diaryge|
|00004870| 6f 6d 65 74 72 79 5c 66 | 50 20 5c 66 49 67 65 6f |ometry\f|P \fIgeo|
|00004880| 6d 65 74 72 79 5c 66 50 | 22 20 31 32 0a 58 54 68 |metry\fP|" 12.XTh|
|00004890| 69 73 20 6f 70 74 69 6f | 6e 20 69 6e 64 69 63 61 |is optio|n indica|
|000048a0| 74 65 73 20 74 68 65 20 | 67 65 6f 6d 65 74 72 79 |tes the |geometry|
|000048b0| 20 74 6f 20 62 65 20 75 | 73 65 64 20 77 68 65 6e | to be u|sed when|
|000048c0| 20 64 65 74 65 72 6d 69 | 6e 69 6e 67 20 74 68 65 | determi|ning the|
|000048d0| 0a 58 73 69 7a 65 20 61 | 6e 64 20 70 6f 73 69 74 |.Xsize a|nd posit|
|000048e0| 69 6f 6e 20 6f 66 20 74 | 68 65 20 64 69 61 72 79 |ion of t|he diary|
|000048f0| 2e 0a 58 2e 49 50 20 22 | 5c 66 42 2d 64 69 67 69 |..X.IP "|\fB-digi|
|00004900| 74 66 6f 6e 74 5c 66 50 | 20 5c 66 49 66 6f 6e 74 |tfont\fP| \fIfont|
|00004910| 2d 6e 61 6d 65 5c 66 50 | 22 20 31 32 0a 58 54 68 |-name\fP|" 12.XTh|
|00004920| 69 73 20 6f 70 74 69 6f | 6e 20 69 6e 64 69 63 61 |is optio|n indica|
|00004930| 74 65 73 20 74 68 65 20 | 66 6f 6e 74 20 74 6f 20 |tes the |font to |
|00004940| 62 65 20 75 73 65 64 20 | 66 6f 72 20 74 68 65 20 |be used |for the |
|00004950| 64 69 67 69 74 73 20 74 | 68 61 74 20 77 69 6c 6c |digits t|hat will|
|00004960| 0a 58 61 70 70 65 61 72 | 20 69 6e 20 74 68 65 20 |.Xappear| in the |
|00004970| 63 61 6c 65 6e 64 61 72 | 20 63 65 6c 6c 73 2e 0a |calendar| cells..|
|00004980| 58 2e 49 50 20 22 5c 66 | 42 2d 77 65 65 6b 64 61 |X.IP "\f|B-weekda|
|00004990| 79 66 6f 6e 74 5c 66 50 | 20 5c 66 49 66 6f 6e 74 |yfont\fP| \fIfont|
|000049a0| 2d 6e 61 6d 65 5c 66 50 | 22 20 31 32 0a 58 54 68 |-name\fP|" 12.XTh|
|000049b0| 69 73 20 6f 70 74 69 6f | 6e 20 69 6e 64 69 63 61 |is optio|n indica|
|000049c0| 74 65 73 20 74 68 65 20 | 66 6f 6e 74 20 74 6f 20 |tes the |font to |
|000049d0| 62 65 20 75 73 65 64 20 | 66 6f 72 20 74 68 65 20 |be used |for the |
|000049e0| 77 65 65 6b 64 61 79 20 | 6e 61 6d 65 73 0a 58 74 |weekday |names.Xt|
|000049f0| 68 61 74 20 77 69 6c 6c | 20 61 70 70 65 61 72 20 |hat will| appear |
|00004a00| 61 62 6f 76 65 20 65 61 | 63 68 20 63 6f 6c 75 6d |above ea|ch colum|
|00004a10| 6e 20 6f 66 20 63 65 6c | 6c 73 20 69 6e 20 74 68 |n of cel|ls in th|
|00004a20| 65 20 63 61 6c 65 6e 64 | 61 72 2e 0a 58 2e 49 50 |e calend|ar..X.IP|
|00004a30| 20 22 5c 66 42 2d 74 69 | 74 6c 65 66 6f 6e 74 5c | "\fB-ti|tlefont\|
|00004a40| 66 50 20 5c 66 49 66 6f | 6e 74 2d 6e 61 6d 65 5c |fP \fIfo|nt-name\|
|00004a50| 66 50 22 20 31 32 0a 58 | 54 68 69 73 20 6f 70 74 |fP" 12.X|This opt|
|00004a60| 69 6f 6e 20 69 6e 64 69 | 63 61 74 65 73 20 74 68 |ion indi|cates th|
|00004a70| 65 20 66 6f 6e 74 20 74 | 6f 20 62 65 20 75 73 65 |e font t|o be use|
|00004a80| 64 20 66 6f 72 20 74 68 | 65 20 63 61 6c 65 6e 64 |d for th|e calend|
|00004a90| 61 72 0a 58 74 69 74 6c | 65 28 73 29 20 74 68 61 |ar.Xtitl|e(s) tha|
|00004aa0| 74 20 77 69 6c 6c 20 61 | 70 70 65 61 72 20 61 62 |t will a|ppear ab|
|00004ab0| 6f 76 65 20 65 61 63 68 | 20 63 61 6c 65 6e 64 61 |ove each| calenda|
|00004ac0| 72 20 73 70 65 63 69 66 | 79 69 6e 67 20 74 68 65 |r specif|ying the|
|00004ad0| 0a 58 63 61 6c 65 6e 64 | 61 72 27 73 20 6d 6f 6e |.Xcalend|ar's mon|
|00004ae0| 74 68 20 61 6e 64 20 79 | 65 61 72 2e 0a 58 2e 49 |th and y|ear..X.I|
|00004af0| 50 20 22 5c 66 42 2d 64 | 69 67 69 74 67 72 61 76 |P "\fB-d|igitgrav|
|00004b00| 69 74 79 5c 66 50 20 5c | 66 49 67 72 61 76 69 74 |ity\fP \|fIgravit|
|00004b10| 79 5c 66 50 22 20 31 32 | 0a 58 54 68 69 73 20 6f |y\fP" 12|.XThis o|
|00004b20| 70 74 69 6f 6e 20 69 6e | 64 69 63 61 74 65 73 20 |ption in|dicates |
|00004b30| 74 68 65 20 70 6c 61 63 | 65 6d 65 6e 74 20 6f 66 |the plac|ement of|
|00004b40| 20 74 68 65 20 64 69 67 | 69 74 73 20 77 69 74 68 | the dig|its with|
|00004b50| 69 6e 20 74 68 65 20 63 | 65 6c 6c 73 0a 58 6f 66 |in the c|ells.Xof|
|00004b60| 20 74 68 65 20 63 61 6c | 65 6e 64 61 72 73 2c 20 | the cal|endars, |
|00004b70| 77 68 65 72 65 20 5c 66 | 49 67 72 61 76 69 74 79 |where \f|Igravity|
|00004b80| 5c 66 50 20 69 73 20 6f | 6e 65 20 6f 66 20 74 68 |\fP is o|ne of th|
|00004b90| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 3a 0a 58 2e 49 |e follow|ing:.X.I|
|00004ba0| 50 0a 58 4e 6f 72 74 68 | 57 65 73 74 2c 20 4e 6f |P.XNorth|West, No|
|00004bb0| 72 74 68 2c 20 4e 6f 72 | 74 68 45 61 73 74 2c 20 |rth, Nor|thEast, |
|00004bc0| 57 65 73 74 2c 20 43 65 | 6e 74 65 72 2c 20 45 61 |West, Ce|nter, Ea|
|00004bd0| 73 74 2c 20 53 6f 75 74 | 68 57 65 73 74 2c 20 53 |st, Sout|hWest, S|
|00004be0| 6f 75 74 68 2c 20 53 6f | 75 74 68 45 61 73 74 0a |outh, So|uthEast.|
|00004bf0| 58 2e 49 50 20 22 5c 66 | 42 2d 73 74 61 72 74 69 |X.IP "\f|B-starti|
|00004c00| 6e 67 77 65 65 6b 64 61 | 79 5c 66 50 20 5c 66 49 |ngweekda|y\fP \fI|
|00004c10| 64 61 79 2d 6e 61 6d 65 | 5c 66 50 22 20 31 32 0a |day-name|\fP" 12.|
|00004c20| 58 54 68 69 73 20 6f 70 | 74 69 6f 6e 20 69 6e 64 |XThis op|tion ind|
|00004c30| 69 63 61 74 65 73 20 77 | 68 69 63 68 20 64 61 79 |icates w|hich day|
|00004c40| 20 6f 66 20 74 68 65 20 | 77 65 65 6b 20 73 68 6f | of the |week sho|
|00004c50| 75 6c 64 20 63 6f 72 72 | 65 73 70 6f 6e 64 20 74 |uld corr|espond t|
|00004c60| 6f 0a 58 74 68 65 20 64 | 61 79 73 20 69 6e 20 74 |o.Xthe d|ays in t|
|00004c70| 68 65 20 6c 65 66 74 2d | 6d 6f 73 74 20 63 6f 6c |he left-|most col|
|00004c80| 75 6d 6e 20 6f 66 20 74 | 68 65 20 63 61 6c 65 6e |umn of t|he calen|
|00004c90| 64 61 72 2e 20 20 53 75 | 6e 64 61 79 20 69 73 20 |dar. Su|nday is |
|00004ca0| 74 68 65 0a 58 64 65 66 | 61 75 6c 74 2e 0a 58 2e |the.Xdef|ault..X.|
|00004cb0| 49 50 20 22 5c 66 42 2d | 6c 61 6e 67 75 61 67 65 |IP "\fB-|language|
|00004cc0| 5c 66 50 20 5c 66 49 6c | 61 6e 67 75 61 67 65 2d |\fP \fIl|anguage-|
|00004cd0| 6e 61 6d 65 5c 66 50 22 | 20 31 32 0a 58 54 68 69 |name\fP"| 12.XThi|
|00004ce0| 73 20 6f 70 74 69 6f 6e | 20 69 6e 64 69 63 61 74 |s option| indicat|
|00004cf0| 65 73 20 77 68 61 74 20 | 6c 61 6e 67 75 61 67 65 |es what |language|
|00004d00| 20 74 68 65 20 63 61 6c | 65 6e 64 61 72 20 73 68 | the cal|endar sh|
|00004d10| 6f 75 6c 64 20 64 69 73 | 70 6c 61 79 0a 58 61 6c |ould dis|play.Xal|
|00004d20| 6c 20 6f 66 20 69 74 73 | 20 74 65 78 74 20 69 6e |l of its| text in|
|00004d30| 2e 20 20 43 75 72 72 65 | 6e 74 6c 79 20 20 45 6e |. Curre|ntly En|
|00004d40| 67 6c 69 73 68 2c 20 53 | 70 61 6e 69 73 68 2c 20 |glish, S|panish, |
|00004d50| 46 72 65 6e 63 68 2c 20 | 61 6e 64 0a 58 47 65 72 |French, |and.XGer|
|00004d60| 6d 61 6e 20 61 72 65 20 | 61 76 61 69 6c 61 62 6c |man are |availabl|
|00004d70| 65 2e 20 20 42 65 20 73 | 75 72 65 20 74 6f 20 73 |e. Be s|ure to s|
|00004d80| 70 65 63 69 66 79 20 66 | 6f 6e 74 73 20 77 69 74 |pecify f|onts wit|
|00004d90| 68 20 63 6f 6d 70 6c 65 | 74 65 0a 58 4c 61 74 69 |h comple|te.XLati|
|00004da0| 6e 2d 31 20 63 68 61 72 | 61 63 74 65 72 20 73 70 |n-1 char|acter sp|
|00004db0| 65 63 69 66 69 63 61 74 | 69 6f 6e 73 20 77 68 65 |ecificat|ions whe|
|00004dc0| 6e 20 73 70 65 63 69 66 | 79 69 6e 67 20 66 6f 72 |n specif|ying for|
|00004dd0| 65 69 67 6e 20 6c 61 6e | 67 75 61 67 65 73 2e 0a |eign lan|guages..|
|00004de0| 58 2e 49 50 20 22 5c 66 | 42 2d 64 69 61 72 79 66 |X.IP "\f|B-diaryf|
|00004df0| 69 6c 65 5c 66 50 20 5c | 66 49 64 69 61 72 79 2d |ile\fP \|fIdiary-|
|00004e00| 66 69 6c 65 6e 61 6d 65 | 5c 66 50 22 20 31 32 0a |filename|\fP" 12.|
|00004e10| 58 54 68 69 73 20 6f 70 | 74 69 6f 6e 20 69 6e 64 |XThis op|tion ind|
|00004e20| 69 63 61 74 65 73 20 74 | 68 65 20 66 69 6c 65 6e |icates t|he filen|
|00004e30| 61 6d 65 20 74 68 61 74 | 20 77 69 6c 6c 20 62 65 |ame that| will be|
|00004e40| 20 75 73 65 64 20 74 6f | 20 72 65 61 64 20 74 68 | used to| read th|
|00004e50| 65 0a 58 64 69 61 72 79 | 20 64 61 69 6c 79 20 69 |e.Xdiary| daily i|
|00004e60| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 66 72 6f 6d 2e |nformati|on from.|
|00004e70| 20 20 41 6e 79 20 63 68 | 61 6e 67 65 73 20 74 6f | Any ch|anges to|
|00004e80| 20 74 68 65 20 64 69 61 | 72 79 20 77 69 6c 6c 20 | the dia|ry will |
|00004e90| 62 65 0a 58 73 61 76 65 | 64 20 74 6f 20 74 68 69 |be.Xsave|d to thi|
|00004ea0| 73 20 66 69 6c 65 20 77 | 68 65 6e 20 74 68 65 20 |s file w|hen the |
|00004eb0| 73 61 76 65 20 6f 72 20 | 71 75 69 74 20 6d 65 6e |save or |quit men|
|00004ec0| 75 20 6f 70 74 69 6f 6e | 20 69 73 20 73 65 6c 65 |u option| is sele|
|00004ed0| 63 74 65 64 2e 0a 58 42 | 79 20 64 65 66 61 75 6c |cted..XB|y defaul|
|00004ee0| 74 2c 20 74 68 65 20 66 | 69 6c 65 20 7e 2f 2e 78 |t, the f|ile ~/.x|
|00004ef0| 64 69 61 72 79 20 77 69 | 6c 6c 20 62 65 20 75 73 |diary wi|ll be us|
|00004f00| 65 64 2e 0a 58 2e 49 50 | 20 22 5c 66 42 2d 74 65 |ed..X.IP| "\fB-te|
|00004f10| 6d 70 6c 61 74 65 66 69 | 6c 65 5c 66 50 20 5c 66 |mplatefi|le\fP \f|
|00004f20| 49 74 65 6d 70 6c 61 74 | 65 2d 66 69 6c 65 6e 61 |Itemplat|e-filena|
|00004f30| 6d 65 5c 66 50 22 20 31 | 32 0a 58 54 68 69 73 20 |me\fP" 1|2.XThis |
|00004f40| 6f 70 74 69 6f 6e 20 69 | 6e 64 69 63 61 74 65 73 |option i|ndicates|
|00004f50| 20 74 68 65 20 66 69 6c | 65 6e 61 6d 65 20 74 68 | the fil|ename th|
|00004f60| 61 74 20 77 69 6c 6c 20 | 62 65 20 75 73 65 64 20 |at will |be used |
|00004f70| 74 6f 20 72 65 61 64 20 | 74 68 65 20 64 69 61 72 |to read |the diar|
|00004f80| 79 20 65 6e 74 72 79 0a | 58 74 65 6d 70 6c 61 74 |y entry.|Xtemplat|
|00004f90| 65 20 66 72 6f 6d 2e 20 | 20 42 79 20 64 65 66 61 |e from. | By defa|
|00004fa0| 75 6c 74 2c 20 74 68 65 | 20 66 69 6c 65 20 7e 2f |ult, the| file ~/|
|00004fb0| 2e 78 64 69 61 72 79 2d | 74 65 6d 70 6c 61 74 65 |.xdiary-|template|
|00004fc0| 20 77 69 6c 6c 20 62 65 | 20 75 73 65 64 2e 0a 58 | will be| used..X|
|00004fd0| 49 66 20 74 68 61 74 20 | 66 69 6c 65 20 64 6f 65 |If that |file doe|
|00004fe0| 73 20 6e 6f 74 20 65 78 | 69 73 74 20 61 6e 64 20 |s not ex|ist and |
|00004ff0| 69 66 20 74 68 69 73 20 | 6f 70 74 69 6f 6e 20 69 |if this |option i|
|00005000| 73 20 6e 6f 74 20 73 70 | 65 63 69 66 69 65 64 2c |s not sp|ecified,|
|00005010| 20 74 68 65 6e 20 6e 6f | 20 64 69 61 72 79 0a 58 | then no| diary.X|
|00005020| 65 6e 74 72 79 20 74 65 | 6d 70 6c 61 74 65 20 77 |entry te|mplate w|
|00005030| 69 6c 6c 20 62 65 20 75 | 73 65 64 2e 0a 58 2e 49 |ill be u|sed..X.I|
|00005040| 50 20 5c 66 42 2d 6e 6f | 63 61 6c 65 6e 64 61 72 |P \fB-no|calendar|
|00005050| 5c 66 50 20 31 32 0a 58 | 54 68 69 73 20 6f 70 74 |\fP 12.X|This opt|
|00005060| 69 6f 6e 20 69 6e 64 69 | 63 61 74 65 73 20 74 68 |ion indi|cates th|
|00005070| 61 74 20 75 70 6f 6e 20 | 73 74 61 72 74 75 70 20 |at upon |startup |
|00005080| 6e 6f 20 63 61 6c 65 6e | 64 61 72 20 69 73 20 74 |no calen|dar is t|
|00005090| 6f 20 62 65 0a 58 64 69 | 73 70 6c 61 79 65 64 20 |o be.Xdi|splayed |
|000050a0| 61 6c 6f 6e 67 20 77 69 | 74 68 20 74 68 65 20 64 |along wi|th the d|
|000050b0| 69 61 72 79 2e 20 20 42 | 79 20 64 65 66 61 75 6c |iary. B|y defaul|
|000050c0| 74 2c 20 61 20 63 61 6c | 65 6e 64 61 72 20 77 69 |t, a cal|endar wi|
|000050d0| 6c 6c 20 62 65 20 64 69 | 73 70 6c 61 79 65 64 2e |ll be di|splayed.|
|000050e0| 0a 58 2e 49 50 20 5c 66 | 42 2d 6e 6f 64 69 61 72 |.X.IP \f|B-nodiar|
|000050f0| 79 5c 66 50 20 31 32 0a | 58 54 68 69 73 20 6f 70 |y\fP 12.|XThis op|
|00005100| 74 69 6f 6e 20 69 6e 64 | 69 63 61 74 65 73 20 74 |tion ind|icates t|
|00005110| 68 61 74 20 75 70 6f 6e | 20 73 74 61 72 74 75 70 |hat upon| startup|
|00005120| 20 6e 6f 20 64 69 61 72 | 79 20 69 73 20 74 6f 20 | no diar|y is to |
|00005130| 62 65 0a 58 64 69 73 70 | 6c 61 79 65 64 20 61 6c |be.Xdisp|layed al|
|00005140| 6f 6e 67 20 77 69 74 68 | 20 74 68 65 20 63 61 6c |ong with| the cal|
|00005150| 65 6e 64 61 72 2e 20 20 | 42 79 20 64 65 66 61 75 |endar. |By defau|
|00005160| 6c 74 2c 20 61 20 64 69 | 61 72 79 20 77 69 6c 6c |lt, a di|ary will|
|00005170| 20 62 65 20 64 69 73 70 | 6c 61 79 65 64 2e 0a 58 | be disp|layed..X|
|00005180| 2e 49 50 20 22 5c 66 42 | 2d 61 62 62 72 65 76 5c |.IP "\fB|-abbrev\|
|00005190| 66 50 20 5c 66 49 63 6f | 75 6e 74 5c 66 50 22 20 |fP \fIco|unt\fP" |
|000051a0| 31 32 0a 58 54 68 69 73 | 20 6f 70 74 69 6f 6e 20 |12.XThis| option |
|000051b0| 69 6e 64 69 63 61 74 65 | 73 20 74 68 61 74 20 74 |indicate|s that t|
|000051c0| 68 65 20 77 65 65 6b 64 | 61 79 20 6e 61 6d 65 73 |he weekd|ay names|
|000051d0| 20 74 68 61 74 20 77 69 | 6c 6c 20 61 70 70 65 61 | that wi|ll appea|
|000051e0| 72 0a 58 61 62 6f 76 65 | 20 65 61 63 68 20 63 6f |r.Xabove| each co|
|000051f0| 6c 75 6d 6e 20 69 6e 20 | 74 68 65 20 63 61 6c 65 |lumn in |the cale|
|00005200| 6e 64 61 72 28 73 29 20 | 73 68 6f 75 6c 64 20 62 |ndar(s) |should b|
|00005210| 65 20 61 62 62 72 65 76 | 69 61 74 65 64 20 74 6f |e abbrev|iated to|
|00005220| 20 5c 66 49 63 6f 75 6e | 74 5c 66 50 0a 58 63 68 | \fIcoun|t\fP.Xch|
|00005230| 61 72 61 63 74 65 72 73 | 2e 20 20 42 79 20 64 65 |aracters|. By de|
|00005240| 66 61 75 6c 74 2c 20 77 | 65 65 6b 64 61 79 20 6e |fault, w|eekday n|
|00005250| 61 6d 65 73 20 77 69 6c | 6c 20 62 65 20 61 62 62 |ames wil|l be abb|
|00005260| 72 65 76 69 61 74 65 64 | 20 74 6f 20 74 68 72 65 |reviated| to thre|
|00005270| 65 20 63 68 61 72 61 63 | 74 65 72 73 2e 0a 58 2e |e charac|ters..X.|
|00005280| 49 50 20 5c 66 42 2d 6c | 6f 6e 67 5c 66 50 20 31 |IP \fB-l|ong\fP 1|
|00005290| 32 0a 58 54 68 69 73 20 | 6f 70 74 69 6f 6e 20 69 |2.XThis |option i|
|000052a0| 6e 64 69 63 61 74 65 73 | 20 74 68 61 74 20 74 68 |ndicates| that th|
|000052b0| 65 20 77 65 65 6b 64 61 | 79 20 6e 61 6d 65 73 20 |e weekda|y names |
|000052c0| 74 68 61 74 20 77 69 6c | 6c 20 61 70 70 65 61 72 |that wil|l appear|
|000052d0| 0a 58 61 62 6f 76 65 20 | 65 61 63 68 20 63 6f 6c |.Xabove |each col|
|000052e0| 75 6d 6e 20 69 6e 20 74 | 68 65 20 63 61 6c 65 6e |umn in t|he calen|
|000052f0| 64 61 72 28 73 29 20 73 | 68 6f 75 6c 64 20 6e 6f |dar(s) s|hould no|
|00005300| 74 20 62 65 20 61 62 62 | 72 65 76 69 61 74 65 64 |t be abb|reviated|
|00005310| 2e 0a 58 2e 49 50 20 5c | 66 42 2d 66 75 6c 6c 79 |..X.IP \|fB-fully|
|00005320| 65 61 72 5c 66 50 20 31 | 32 0a 58 54 68 69 73 20 |ear\fP 1|2.XThis |
|00005330| 6f 70 74 69 6f 6e 20 69 | 6e 64 69 63 61 74 65 73 |option i|ndicates|
|00005340| 20 74 68 61 74 20 61 20 | 66 75 6c 6c 20 79 65 61 | that a |full yea|
|00005350| 72 20 63 61 6c 65 6e 64 | 61 72 20 69 73 20 74 6f |r calend|ar is to|
|00005360| 20 62 65 0a 58 64 69 73 | 70 6c 61 79 65 64 2e 0a | be.Xdis|played..|
|00005370| 58 2e 49 50 20 5c 66 42 | 2d 73 69 6e 67 6c 65 6d |X.IP \fB|-singlem|
|00005380| 6f 6e 74 68 5c 66 50 20 | 31 32 0a 58 54 68 69 73 |onth\fP |12.XThis|
|00005390| 20 6f 70 74 69 6f 6e 20 | 69 6e 64 69 63 61 74 65 | option |indicate|
|000053a0| 73 20 74 68 61 74 20 6f | 6e 6c 79 20 61 20 73 69 |s that o|nly a si|
|000053b0| 6e 67 6c 65 20 6d 6f 6e | 74 68 20 63 61 6c 65 6e |ngle mon|th calen|
|000053c0| 64 61 72 20 69 73 20 74 | 6f 20 62 65 0a 58 64 69 |dar is t|o be.Xdi|
|000053d0| 73 70 6c 61 79 65 64 2e | 20 20 54 68 69 73 20 69 |splayed.| This i|
|000053e0| 73 20 74 72 75 65 20 62 | 79 20 64 65 66 61 75 6c |s true b|y defaul|
|000053f0| 74 2e 0a 58 2e 49 50 20 | 5c 66 49 64 61 74 65 2d |t..X.IP |\fIdate-|
|00005400| 73 74 72 69 6e 67 5c 66 | 50 20 31 32 0a 58 41 20 |string\f|P 12.XA |
|00005410| 73 74 72 69 6e 67 20 73 | 70 65 63 69 66 79 69 6e |string s|pecifyin|
|00005420| 67 20 74 68 65 20 64 61 | 74 65 20 66 6f 72 20 74 |g the da|te for t|
|00005430| 68 65 20 63 61 6c 65 6e | 64 61 72 20 61 6e 64 20 |he calen|dar and |
|00005440| 64 69 61 72 79 20 74 6f | 20 64 69 73 70 6c 61 79 |diary to| display|
|00005450| 0a 58 75 70 6f 6e 20 73 | 74 61 72 74 75 70 2e 20 |.Xupon s|tartup. |
|00005460| 20 49 66 20 6e 6f 20 73 | 74 72 69 6e 67 20 69 73 | If no s|tring is|
|00005470| 20 73 70 65 63 69 66 69 | 65 64 2c 20 74 68 65 20 | specifi|ed, the |
|00005480| 63 75 72 72 65 6e 74 20 | 64 61 74 65 20 69 73 0a |current |date is.|
|00005490| 58 75 73 65 64 2e 20 20 | 54 68 65 20 73 74 72 69 |Xused. |The stri|
|000054a0| 6e 67 20 6d 61 79 20 62 | 65 20 63 6f 6d 70 6c 65 |ng may b|e comple|
|000054b0| 74 65 6c 79 20 6e 75 6d | 65 72 69 63 20 6f 72 20 |tely num|eric or |
|000054c0| 69 74 20 6d 61 79 20 63 | 6f 6e 74 61 69 6e 20 61 |it may c|ontain a|
|000054d0| 0a 58 6d 6f 6e 74 68 20 | 6e 61 6d 65 2e 20 20 48 |.Xmonth |name. H|
|000054e0| 6f 77 65 76 65 72 2c 20 | 69 66 20 61 20 6c 61 6e |owever, |if a lan|
|000054f0| 67 75 61 67 65 20 6f 70 | 74 69 6f 6e 20 69 73 20 |guage op|tion is |
|00005500| 73 70 65 63 69 66 69 65 | 64 2c 20 74 68 65 20 6d |specifie|d, the m|
|00005510| 6f 6e 74 68 0a 58 6e 61 | 6d 65 20 6d 75 73 74 20 |onth.Xna|me must |
|00005520| 62 65 20 69 6e 20 74 68 | 65 20 73 70 65 63 69 66 |be in th|e specif|
|00005530| 69 65 64 20 6c 61 6e 67 | 75 61 67 65 2e 0a 58 2e |ied lang|uage..X.|
|00005540| 49 50 0a 58 53 65 76 65 | 72 61 6c 20 66 6f 72 6d |IP.XSeve|ral form|
|00005550| 61 74 73 20 61 72 65 20 | 61 63 63 65 70 74 65 64 |ats are |accepted|
|00005560| 2c 20 61 73 20 77 65 6c | 6c 20 61 73 20 69 6e 63 |, as wel|l as inc|
|00005570| 6f 6d 70 6c 65 74 65 20 | 64 61 74 65 73 3a 0a 58 |omplete |dates:.X|
|00005580| 2e 6e 66 0a 58 2e 49 50 | 0a 58 09 39 2f 31 37 2f |.nf.X.IP|.X.9/17/|
|00005590| 36 36 0a 58 09 31 37 2e | 39 2e 36 36 0a 58 09 53 |66.X.17.|9.66.X.S|
|000055a0| 65 70 20 31 37 2c 20 31 | 39 36 36 0a 58 09 31 37 |ep 17, 1|966.X.17|
|000055b0| 20 73 65 70 74 65 6d 62 | 65 72 20 36 36 0a 58 09 | septemb|er 66.X.|
|000055c0| 53 65 70 74 20 36 36 0a | 58 09 31 39 36 36 0a 58 |Sept 66.|X.1966.X|
|000055d0| 2e 66 69 0a 58 2e 50 50 | 0a 58 43 61 73 65 20 69 |.fi.X.PP|.XCase i|
|000055e0| 73 20 69 67 6e 6f 72 65 | 64 20 61 6e 64 20 6e 6f |s ignore|d and no|
|000055f0| 6e 2d 61 6d 62 69 67 75 | 6f 75 73 20 61 62 62 72 |n-ambigu|ous abbr|
|00005600| 65 76 69 61 74 69 6f 6e | 73 20 66 6f 72 20 74 68 |eviation|s for th|
|00005610| 65 20 6f 70 74 69 6f 6e | 73 20 61 6e 64 0a 58 61 |e option|s and.Xa|
|00005620| 72 67 75 6d 65 6e 74 73 | 20 61 72 65 20 61 63 63 |rguments| are acc|
|00005630| 65 70 74 65 64 2e 0a 58 | 2e 53 48 20 4f 50 45 52 |epted..X|.SH OPER|
|00005640| 41 54 49 4f 4e 0a 58 54 | 68 65 20 64 69 61 72 79 |ATION.XT|he diary|
|00005650| 20 61 6e 64 20 63 61 6c | 65 6e 64 61 72 20 61 72 | and cal|endar ar|
|00005660| 65 20 69 6e 74 65 6e 64 | 65 64 20 74 6f 20 62 65 |e intend|ed to be|
|00005670| 20 61 73 20 69 6e 74 75 | 69 74 69 76 65 20 74 6f | as intu|itive to|
|00005680| 20 75 73 65 20 61 73 0a | 58 70 6f 73 73 69 62 6c | use as.|Xpossibl|
|00005690| 65 2e 20 20 0a 58 2e 50 | 50 0a 58 54 68 65 20 5c |e. .X.P|P.XThe \|
|000056a0| 66 42 64 61 79 5c 66 50 | 20 62 61 63 6b 77 61 72 |fBday\fP| backwar|
|000056b0| 64 20 61 6e 64 20 66 6f | 72 77 61 72 64 20 61 72 |d and fo|rward ar|
|000056c0| 72 6f 77 73 20 6d 61 6b | 65 20 74 68 65 20 63 61 |rows mak|e the ca|
|000056d0| 6c 65 6e 64 61 72 20 61 | 6e 64 20 64 69 61 72 79 |lendar a|nd diary|
|000056e0| 0a 58 64 69 73 70 6c 61 | 79 20 74 68 65 20 70 72 |.Xdispla|y the pr|
|000056f0| 65 76 69 6f 75 73 20 64 | 61 79 20 61 6e 64 20 6e |evious d|ay and n|
|00005700| 65 78 74 20 64 61 79 20 | 72 65 73 70 65 63 74 69 |ext day |respecti|
|00005710| 76 65 6c 79 2e 0a 58 2e | 50 50 0a 58 54 68 65 20 |vely..X.|PP.XThe |
|00005720| 5c 66 42 6d 6f 6e 74 68 | 5c 66 50 20 62 61 63 6b |\fBmonth|\fP back|
|00005730| 77 61 72 64 20 61 6e 64 | 20 66 6f 72 77 61 72 64 |ward and| forward|
|00005740| 20 61 72 72 6f 77 73 20 | 6d 61 6b 65 20 74 68 65 | arrows |make the|
|00005750| 20 63 61 6c 65 6e 64 61 | 72 20 64 69 73 70 6c 61 | calenda|r displa|
|00005760| 79 20 74 68 65 0a 58 70 | 72 65 76 69 6f 75 73 20 |y the.Xp|revious |
|00005770| 6d 6f 6e 74 68 20 61 6e | 64 20 6e 65 78 74 20 6d |month an|d next m|
|00005780| 6f 6e 74 68 20 72 65 73 | 70 65 63 74 69 76 65 6c |onth res|pectivel|
|00005790| 79 2e 20 20 48 6f 77 65 | 76 65 72 2c 20 74 68 65 |y. Howe|ver, the|
|000057a0| 20 64 69 61 72 79 0a 58 | 72 65 6d 61 69 6e 73 20 | diary.X|remains |
|000057b0| 75 6e 63 68 61 6e 67 65 | 64 2e 0a 58 2e 50 50 0a |unchange|d..X.PP.|
|000057c0| 58 54 68 65 20 5c 66 42 | 79 65 61 72 5c 66 50 20 |XThe \fB|year\fP |
|000057d0| 62 61 63 6b 77 61 72 64 | 20 61 6e 64 20 66 6f 72 |backward| and for|
|000057e0| 77 61 72 64 20 61 72 72 | 6f 77 73 20 6d 61 6b 65 |ward arr|ows make|
|000057f0| 20 74 68 65 20 63 61 6c | 65 6e 64 61 72 20 64 69 | the cal|endar di|
|00005800| 73 70 6c 61 79 20 74 68 | 65 0a 58 70 72 65 76 69 |splay th|e.Xprevi|
|00005810| 6f 75 73 20 79 65 61 72 | 20 61 6e 64 20 6e 65 78 |ous year| and nex|
|00005820| 74 20 79 65 61 72 20 72 | 65 73 70 65 63 74 69 76 |t year r|espectiv|
|00005830| 65 6c 79 2e 20 20 48 6f | 77 65 76 65 72 2c 20 74 |ely. Ho|wever, t|
|00005840| 68 65 20 64 69 61 72 79 | 20 72 65 6d 61 69 6e 73 |he diary| remains|
|00005850| 0a 58 75 6e 63 68 61 6e | 67 65 64 2e 0a 58 2e 50 |.Xunchan|ged..X.P|
|00005860| 50 0a 58 54 68 65 20 5c | 66 42 65 6e 74 72 79 5c |P.XThe \|fBentry\|
|00005870| 66 50 20 62 61 63 6b 77 | 61 72 64 20 61 6e 64 20 |fP backw|ard and |
|00005880| 66 6f 72 77 61 72 64 20 | 61 72 72 6f 77 73 20 6d |forward |arrows m|
|00005890| 61 6b 65 20 74 68 65 20 | 64 69 61 72 79 20 64 69 |ake the |diary di|
|000058a0| 73 70 6c 61 79 20 74 68 | 65 0a 58 70 72 65 76 69 |splay th|e.Xprevi|
|000058b0| 6f 75 73 20 65 6e 74 72 | 79 20 61 6e 64 20 6e 65 |ous entr|y and ne|
|000058c0| 78 74 20 65 6e 74 72 79 | 20 72 65 73 70 65 63 74 |xt entry| respect|
|000058d0| 69 76 65 6c 79 2e 20 20 | 54 68 65 20 63 61 6c 65 |ively. |The cale|
|000058e0| 6e 64 61 72 20 69 73 20 | 6b 65 70 74 20 69 6e 0a |ndar is |kept in.|
|000058f0| 58 73 79 6e 63 20 77 69 | 74 68 20 74 68 65 20 63 |Xsync wi|th the c|
|00005900| 75 72 72 65 6e 74 20 64 | 69 61 72 79 20 65 6e 74 |urrent d|iary ent|
|00005910| 72 79 2e 0a 58 2e 50 50 | 0a 58 54 68 65 20 70 6f |ry..X.PP|.XThe po|
|00005920| 69 6e 74 65 72 20 6d 61 | 79 20 62 65 20 75 73 65 |inter ma|y be use|
|00005930| 64 20 74 6f 20 73 65 6c | 65 63 74 20 61 6e 79 20 |d to sel|ect any |
|00005940| 64 61 74 65 20 6f 6e 20 | 74 68 65 20 63 61 6c 65 |date on |the cale|
|00005950| 6e 64 61 72 20 74 68 61 | 74 20 69 73 0a 58 63 75 |ndar tha|t is.Xcu|
|00005960| 72 72 65 6e 74 6c 79 20 | 76 69 73 69 62 6c 65 2e |rrently |visible.|
|00005970| 20 20 54 68 65 20 64 69 | 61 72 79 20 77 69 6c 6c | The di|ary will|
|00005980| 20 74 68 65 6e 20 64 69 | 73 70 6c 61 79 20 74 68 | then di|splay th|
|00005990| 65 20 65 6e 74 72 79 20 | 28 69 66 20 61 6e 79 29 |e entry |(if any)|
|000059a0| 0a 58 66 6f 72 20 74 68 | 65 20 73 65 6c 65 63 74 |.Xfor th|e select|
|000059b0| 65 64 20 64 61 74 65 2e | 0a 58 2e 50 50 0a 58 57 |ed date.|.X.PP.XW|
|000059c0| 68 65 6e 20 74 68 65 20 | 70 6f 69 6e 74 65 72 20 |hen the |pointer |
|000059d0| 69 73 20 69 6e 20 74 68 | 65 20 64 69 61 72 79 20 |is in th|e diary |
|000059e0| 74 65 78 74 20 77 69 6e | 64 6f 77 2c 20 61 6e 79 |text win|dow, any|
|000059f0| 20 74 65 78 74 20 74 79 | 70 65 64 20 77 69 6c 6c | text ty|ped will|
|00005a00| 0a 58 62 65 63 6f 6d 65 | 20 70 61 72 74 20 6f 66 |.Xbecome| part of|
|00005a10| 20 74 68 65 20 64 69 61 | 72 79 20 65 6e 74 72 79 | the dia|ry entry|
|00005a20| 20 66 6f 72 20 74 68 65 | 20 63 75 72 72 65 6e 74 | for the| current|
|00005a30| 6c 79 20 64 69 73 70 6c | 61 79 65 64 20 64 61 74 |ly displ|ayed dat|
|00005a40| 65 2e 0a 58 2e 50 50 0a | 58 43 6c 69 63 6b 69 6e |e..X.PP.|XClickin|
|00005a50| 67 20 6f 6e 20 74 68 65 | 20 5c 66 42 6f 70 74 69 |g on the| \fBopti|
|00005a60| 6f 6e 5c 66 50 20 62 75 | 74 74 6f 6e 20 77 69 6c |on\fP bu|tton wil|
|00005a70| 6c 20 70 75 6c 6c 20 64 | 6f 77 6e 20 61 20 6d 65 |l pull d|own a me|
|00005a80| 6e 75 20 77 69 74 68 20 | 74 68 65 0a 58 66 6f 6c |nu with |the.Xfol|
|00005a90| 6c 6f 77 69 6e 67 20 73 | 65 6c 65 63 74 69 6f 6e |lowing s|election|
|00005aa0| 73 3a 0a 58 2e 49 50 20 | 5c 66 42 54 6f 64 61 79 |s:.X.IP |\fBToday|
|00005ab0| 5c 66 50 20 31 32 0a 58 | 4d 61 6b 65 20 74 68 65 |\fP 12.X|Make the|
|00005ac0| 20 63 61 6c 65 6e 64 61 | 72 20 64 69 73 70 6c 61 | calenda|r displa|
|00005ad0| 79 20 74 6f 64 61 79 27 | 73 20 64 61 74 65 20 61 |y today'|s date a|
|00005ae0| 6e 64 20 6d 61 6b 65 20 | 74 68 65 20 64 69 61 72 |nd make |the diar|
|00005af0| 79 20 64 69 73 70 6c 61 | 79 0a 58 74 68 65 20 63 |y displa|y.Xthe c|
|00005b00| 6f 72 72 65 73 70 6f 6e | 64 69 6e 67 20 64 69 61 |orrespon|ding dia|
|00005b10| 72 79 20 65 6e 74 72 79 | 2e 0a 58 2e 49 50 20 5c |ry entry|..X.IP \|
|00005b20| 66 42 57 61 72 70 5c 66 | 50 20 31 32 0a 58 50 6f |fBWarp\f|P 12.XPo|
|00005b30| 70 73 20 75 70 20 61 20 | 64 69 61 6c 6f 67 20 62 |ps up a |dialog b|
|00005b40| 6f 78 20 61 6e 64 20 65 | 6e 61 62 6c 65 73 20 74 |ox and e|nables t|
|00005b50| 68 65 20 75 73 65 72 20 | 74 6f 20 74 79 70 65 20 |he user |to type |
|00005b60| 69 6e 20 61 20 64 61 74 | 65 20 66 6f 72 0a 58 74 |in a dat|e for.Xt|
|00005b70| 68 65 20 63 61 6c 65 6e | 64 61 72 20 61 6e 64 20 |he calen|dar and |
|00005b80| 64 69 61 72 79 20 74 6f | 20 64 69 73 70 6c 61 79 |diary to| display|
|00005b90| 2e 20 20 54 68 65 20 66 | 6f 72 6d 61 74 20 6f 66 |. The f|ormat of|
|00005ba0| 20 74 68 69 73 20 64 61 | 74 65 20 69 73 0a 58 69 | this da|te is.Xi|
|00005bb0| 64 65 6e 74 69 63 61 6c | 20 74 6f 20 74 68 61 74 |dentical| to that|
|00005bc0| 20 6f 66 20 74 68 65 20 | 5c 66 49 64 61 74 65 2d | of the |\fIdate-|
|00005bd0| 73 74 72 69 6e 67 5c 66 | 50 20 64 65 73 63 72 69 |string\f|P descri|
|00005be0| 62 65 64 20 61 62 6f 76 | 65 2e 20 20 41 6e 79 20 |bed abov|e. Any |
|00005bf0| 6d 6f 6e 74 68 0a 58 73 | 74 72 69 6e 67 73 20 6d |month.Xs|trings m|
|00005c00| 75 73 74 20 62 65 20 69 | 6e 20 74 68 65 20 6c 61 |ust be i|n the la|
|00005c10| 6e 67 75 61 67 65 20 73 | 70 65 63 69 66 69 65 64 |nguage s|pecified|
|00005c20| 2e 20 20 50 72 65 73 73 | 69 6e 67 20 74 68 65 20 |. Press|ing the |
|00005c30| 72 65 74 75 72 6e 0a 58 | 6b 65 79 20 74 65 72 6d |return.X|key term|
|00005c40| 69 6e 61 74 65 73 20 69 | 6e 70 75 74 2e 20 20 42 |inates i|nput. B|
|00005c50| 6f 67 75 73 20 64 61 74 | 65 73 20 77 69 6c 6c 20 |ogus dat|es will |
|00005c60| 62 65 20 71 75 69 65 74 | 6c 79 20 69 67 6e 6f 72 |be quiet|ly ignor|
|00005c70| 65 64 2e 0a 58 2e 49 50 | 20 5c 66 42 44 69 61 72 |ed..X.IP| \fBDiar|
|00005c80| 79 5c 66 50 20 31 32 0a | 58 48 69 64 65 73 20 74 |y\fP 12.|XHides t|
|00005c90| 68 65 20 64 69 61 72 79 | 2e 20 20 49 66 20 74 68 |he diary|. If th|
|00005ca0| 65 20 5c 66 42 2d 6e 6f | 64 69 61 72 79 5c 66 50 |e \fB-no|diary\fP|
|00005cb0| 20 63 6f 6d 6d 61 6e 64 | 20 6c 69 6e 65 20 6f 70 | command| line op|
|00005cc0| 74 69 6f 6e 20 77 61 73 | 0a 58 73 70 65 63 69 66 |tion was|.Xspecif|
|00005cd0| 69 65 64 2c 20 6f 72 20 | 69 66 20 74 68 65 20 64 |ied, or |if the d|
|00005ce0| 69 61 72 79 20 68 61 73 | 20 61 6c 72 65 61 64 79 |iary has| already|
|00005cf0| 20 62 65 65 6e 20 68 69 | 64 64 65 6e 2c 20 74 68 | been hi|dden, th|
|00005d00| 69 73 20 6f 70 74 69 6f | 6e 0a 58 62 72 69 6e 67 |is optio|n.Xbring|
|00005d10| 73 20 74 68 65 20 64 69 | 61 72 79 20 62 61 63 6b |s the di|ary back|
|00005d20| 20 69 6e 74 6f 20 76 69 | 65 77 2e 0a 58 2e 49 50 | into vi|ew..X.IP|
|00005d30| 20 5c 66 42 46 75 6c 6c | 5c 66 50 20 31 32 0a 58 | \fBFull|\fP 12.X|
|00005d40| 43 68 61 6e 67 65 20 74 | 68 65 20 63 61 6c 65 6e |Change t|he calen|
|00005d50| 64 61 72 20 74 6f 20 61 | 20 66 75 6c 6c 20 79 65 |dar to a| full ye|
|00005d60| 61 72 20 63 61 6c 65 6e | 64 61 72 2e 20 20 49 66 |ar calen|dar. If|
|00005d70| 20 74 68 65 20 66 75 6c | 6c 20 79 65 61 72 0a 58 | the ful|l year.X|
|00005d80| 63 61 6c 65 6e 64 61 72 | 20 69 73 20 63 75 72 72 |calendar| is curr|
|00005d90| 65 6e 74 6c 79 20 62 65 | 69 6e 67 20 64 69 73 70 |ently be|ing disp|
|00005da0| 6c 61 79 65 64 2c 20 74 | 68 69 73 20 6f 70 74 69 |layed, t|his opti|
|00005db0| 6f 6e 20 68 69 64 65 73 | 20 74 68 65 20 66 75 6c |on hides| the ful|
|00005dc0| 6c 0a 58 79 65 61 72 20 | 63 61 6c 65 6e 64 61 72 |l.Xyear |calendar|
|00005dd0| 20 73 6f 20 74 68 61 74 | 20 6f 6e 6c 79 20 74 68 | so that| only th|
|00005de0| 65 20 64 69 61 72 79 20 | 69 73 20 76 69 73 69 62 |e diary |is visib|
|00005df0| 6c 65 2e 20 20 49 66 20 | 74 68 65 20 5c 66 42 2d |le. If |the \fB-|
|00005e00| 6e 6f 63 61 6c 65 6e 64 | 61 72 5c 66 50 0a 58 6f |nocalend|ar\fP.Xo|
|00005e10| 70 74 69 6f 6e 20 77 61 | 73 20 73 70 65 63 69 66 |ption wa|s specif|
|00005e20| 69 65 64 2c 20 6f 72 20 | 69 66 20 74 68 65 20 66 |ied, or |if the f|
|00005e30| 75 6c 6c 20 79 65 61 72 | 20 63 61 6c 65 6e 64 61 |ull year| calenda|
|00005e40| 72 20 69 73 20 63 75 72 | 72 65 6e 74 6c 79 20 68 |r is cur|rently h|
|00005e50| 69 64 64 65 6e 2c 20 74 | 68 65 6e 0a 58 74 68 65 |idden, t|hen.Xthe|
|00005e60| 20 66 75 6c 6c 20 79 65 | 61 72 20 63 61 6c 65 6e | full ye|ar calen|
|00005e70| 64 61 72 20 6d 61 79 20 | 62 65 20 62 72 6f 75 67 |dar may |be broug|
|00005e80| 68 74 20 69 6e 74 6f 20 | 76 69 65 77 20 62 79 20 |ht into |view by |
|00005e90| 73 65 6c 65 63 74 69 6e | 67 20 74 68 69 73 20 6d |selectin|g this m|
|00005ea0| 65 6e 75 0a 58 69 74 65 | 6d 2e 0a 58 2e 49 50 20 |enu.Xite|m..X.IP |
|00005eb0| 5c 66 42 53 69 6e 67 6c | 65 5c 66 50 20 31 32 0a |\fBSingl|e\fP 12.|
|00005ec0| 58 43 68 61 6e 67 65 20 | 74 68 65 20 63 61 6c 65 |XChange |the cale|
|00005ed0| 6e 64 61 72 20 74 6f 20 | 61 20 73 69 6e 67 6c 65 |ndar to |a single|
|00005ee0| 20 6d 6f 6e 74 68 20 63 | 61 6c 65 6e 64 61 72 2e | month c|alendar.|
|00005ef0| 20 20 49 66 20 74 68 65 | 20 73 69 6e 67 6c 65 0a | If the| single.|
|00005f00| 58 6d 6f 6e 74 68 20 63 | 61 6c 65 6e 64 61 72 20 |Xmonth c|alendar |
|00005f10| 69 73 20 63 75 72 72 65 | 6e 74 6c 79 20 62 65 69 |is curre|ntly bei|
|00005f20| 6e 67 20 64 69 73 70 6c | 61 79 65 64 2c 20 74 68 |ng displ|ayed, th|
|00005f30| 69 73 20 6f 70 74 69 6f | 6e 20 68 69 64 65 73 20 |is optio|n hides |
|00005f40| 74 68 65 0a 58 73 69 6e | 67 6c 65 20 6d 6f 6e 74 |the.Xsin|gle mont|
|00005f50| 68 20 63 61 6c 65 6e 64 | 61 72 20 73 6f 20 74 68 |h calend|ar so th|
|00005f60| 61 74 20 6f 6e 6c 79 20 | 74 68 65 20 64 69 61 72 |at only |the diar|
|00005f70| 79 20 69 73 20 76 69 73 | 69 62 6c 65 2e 20 20 49 |y is vis|ible. I|
|00005f80| 66 20 74 68 65 20 5c 66 | 42 2d 6e 6f 63 61 6c 65 |f the \f|B-nocale|
|00005f90| 6e 64 61 72 5c 66 50 0a | 58 6f 70 74 69 6f 6e 20 |ndar\fP.|Xoption |
|00005fa0| 77 61 73 20 73 70 65 63 | 69 66 69 65 64 2c 20 6f |was spec|ified, o|
|00005fb0| 72 20 69 66 20 74 68 65 | 20 73 69 6e 67 6c 65 20 |r if the| single |
|00005fc0| 6d 6f 6e 74 68 20 63 61 | 6c 65 6e 64 61 72 20 69 |month ca|lendar i|
|00005fd0| 73 20 63 75 72 72 65 6e | 74 6c 79 20 68 69 64 64 |s curren|tly hidd|
|00005fe0| 65 6e 2c 20 74 68 65 6e | 0a 58 74 68 65 20 73 69 |en, then|.Xthe si|
|00005ff0| 6e 67 6c 65 20 6d 6f 6e | 74 68 20 63 61 6c 65 6e |ngle mon|th calen|
|00006000| 64 61 72 20 6d 61 79 20 | 62 65 20 62 72 6f 75 67 |dar may |be broug|
|00006010| 68 74 20 69 6e 74 6f 20 | 76 69 65 77 20 62 79 20 |ht into |view by |
|00006020| 73 65 6c 65 63 74 69 6e | 67 20 74 68 69 73 20 6d |selectin|g this m|
|00006030| 65 6e 75 0a 58 69 74 65 | 6d 2e 0a 58 2e 49 50 20 |enu.Xite|m..X.IP |
|00006040| 5c 66 42 53 61 76 65 5c | 66 50 20 31 32 0a 58 53 |\fBSave\|fP 12.XS|
|00006050| 61 76 65 20 74 68 65 20 | 64 69 61 72 79 20 63 68 |ave the |diary ch|
|00006060| 61 6e 67 65 73 20 6d 61 | 64 65 20 64 75 72 69 6e |anges ma|de durin|
|00006070| 67 20 74 68 69 73 20 73 | 65 73 73 69 6f 6e 20 28 |g this s|ession (|
|00006080| 69 66 20 61 6e 79 29 20 | 69 6e 20 74 68 65 0a 58 |if any) |in the.X|
|00006090| 64 69 61 72 79 20 66 69 | 6c 65 2e 0a 58 2e 49 50 |diary fi|le..X.IP|
|000060a0| 20 5c 66 42 51 75 69 74 | 5c 66 50 20 31 32 0a 58 | \fBQuit|\fP 12.X|
|000060b0| 45 78 69 74 20 74 68 65 | 20 5c 66 49 78 64 69 61 |Exit the| \fIxdia|
|000060c0| 72 79 5c 66 50 20 61 70 | 70 6c 69 63 61 74 69 6f |ry\fP ap|plicatio|
|000060d0| 6e 2e 20 20 49 66 20 74 | 68 65 20 63 6f 6e 74 65 |n. If t|he conte|
|000060e0| 6e 74 73 20 6f 66 20 74 | 68 65 20 64 69 61 72 79 |nts of t|he diary|
|000060f0| 20 68 61 76 65 0a 58 6e | 6f 74 20 62 65 65 6e 20 | have.Xn|ot been |
|00006100| 73 61 76 65 64 2c 20 74 | 68 65 79 20 77 69 6c 6c |saved, t|hey will|
|00006110| 20 62 65 20 73 61 76 65 | 64 20 62 65 66 6f 72 65 | be save|d before|
|00006120| 20 74 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | the app|lication|
|00006130| 20 65 78 69 74 73 2e 0a | 58 2e 53 48 20 54 45 4d | exits..|X.SH TEM|
|00006140| 50 4c 41 54 45 53 0a 58 | 41 20 74 65 6d 70 6c 61 |PLATES.X|A templa|
|00006150| 74 65 20 69 73 20 61 6e | 20 61 73 63 69 69 20 66 |te is an| ascii f|
|00006160| 69 6c 65 20 77 68 6f 73 | 65 20 63 6f 6e 74 65 6e |ile whos|e conten|
|00006170| 74 73 20 77 69 6c 6c 20 | 62 65 20 75 73 65 64 20 |ts will |be used |
|00006180| 66 6f 72 20 61 6e 79 20 | 64 69 61 72 79 20 65 6e |for any |diary en|
|00006190| 74 72 79 0a 58 74 68 61 | 74 20 64 69 64 20 6e 6f |try.Xtha|t did no|
|000061a0| 74 20 65 78 69 73 74 20 | 70 72 69 6f 72 20 74 6f |t exist |prior to|
|000061b0| 20 74 68 65 20 69 6e 76 | 6f 63 61 74 69 6f 6e 20 | the inv|ocation |
|000061c0| 6f 66 20 74 68 65 20 5c | 66 49 78 64 69 61 72 79 |of the \|fIxdiary|
|000061d0| 5c 66 50 20 61 70 70 6c | 69 63 61 74 69 6f 6e 2e |\fP appl|ication.|
|000061e0| 0a 58 2e 50 50 0a 58 54 | 65 6d 70 6c 61 74 65 73 |.X.PP.XT|emplates|
|000061f0| 20 61 6c 6c 6f 77 20 79 | 6f 75 20 74 6f 20 63 75 | allow y|ou to cu|
|00006200| 73 74 6f 6d 69 7a 65 20 | 74 68 65 20 66 6f 72 6d |stomize |the form|
|00006210| 61 74 20 6f 66 20 74 68 | 65 20 64 69 61 72 79 20 |at of th|e diary |
|00006220| 65 6e 74 72 69 65 73 2e | 20 20 46 6f 72 0a 58 65 |entries.| For.Xe|
|00006230| 78 61 6d 70 6c 65 2c 20 | 61 20 74 65 6d 70 6c 61 |xample, |a templa|
|00006240| 74 65 20 66 69 6c 65 20 | 63 6f 75 6c 64 20 62 65 |te file |could be|
|00006250| 20 63 72 65 61 74 65 64 | 20 77 69 74 68 20 74 68 | created| with th|
|00006260| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 63 6f 6e 74 |e follow|ing cont|
|00006270| 65 6e 74 73 3a 0a 58 2e | 50 50 0a 58 2e 6e 66 0a |ents:.X.|PP.X.nf.|
|00006280| 58 5c 66 4c 09 20 37 3a | 30 30 0a 58 09 20 38 3a |X\fL. 7:|00.X. 8:|
|00006290| 30 30 0a 58 09 20 39 3a | 30 30 0a 58 09 31 30 3a |00.X. 9:|00.X.10:|
|000062a0| 30 30 0a 58 09 31 31 3a | 30 30 0a 58 09 20 6e 6f |00.X.11:|00.X. no|
|000062b0| 6f 6e 0a 58 09 20 31 3a | 30 30 0a 58 09 20 32 3a |on.X. 1:|00.X. 2:|
|000062c0| 30 30 0a 58 09 20 33 3a | 30 30 0a 58 09 20 34 3a |00.X. 3:|00.X. 4:|
|000062d0| 30 30 0a 58 09 20 35 3a | 30 30 5c 66 50 0a 58 2e |00.X. 5:|00\fP.X.|
|000062e0| 66 69 0a 58 2e 50 50 0a | 58 54 68 65 20 61 62 6f |fi.X.PP.|XThe abo|
|000062f0| 76 65 20 74 65 6d 70 6c | 61 74 65 20 77 6f 75 6c |ve templ|ate woul|
|00006300| 64 20 62 65 20 75 73 65 | 66 75 6c 20 66 6f 72 20 |d be use|ful for |
|00006310| 61 70 70 6f 69 6e 74 6d | 65 6e 74 20 73 63 68 65 |appointm|ent sche|
|00006320| 64 75 6c 69 6e 67 20 61 | 6e 64 20 74 69 6d 65 0a |duling a|nd time.|
|00006330| 58 6d 61 6e 61 67 65 6d | 65 6e 74 20 77 68 65 72 |Xmanagem|ent wher|
|00006340| 65 61 73 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |eas the |followin|
|00006350| 67 20 74 65 6d 70 6c 61 | 74 65 20 77 6f 75 6c 64 |g templa|te would|
|00006360| 20 62 65 20 75 73 65 66 | 75 6c 20 66 6f 72 20 6c | be usef|ul for l|
|00006370| 6f 67 67 69 6e 67 20 77 | 6f 72 6b 3a 0a 58 2e 50 |ogging w|ork:.X.P|
|00006380| 50 0a 58 2e 6e 66 0a 58 | 5c 66 4c 09 54 68 69 6e |P.X.nf.X|\fL.Thin|
|00006390| 67 73 20 74 6f 20 64 6f | 20 74 6f 64 61 79 3a 0a |gs to do| today:.|
|000063a0| 58 09 31 2e 0a 58 09 32 | 2e 0a 58 09 33 2e 0a 58 |X.1..X.2|..X.3..X|
|000063b0| 0a 58 09 54 68 69 6e 67 | 73 20 64 6f 6e 65 20 74 |.X.Thing|s done t|
|000063c0| 6f 64 61 79 3a 0a 58 09 | 31 2e 0a 58 09 32 2e 0a |oday:.X.|1..X.2..|
|000063d0| 58 09 33 2e 5c 66 50 0a | 58 2e 66 69 0a 58 2e 50 |X.3.\fP.|X.fi.X.P|
|000063e0| 50 0a 58 4f 6e 63 65 20 | 74 65 78 74 20 69 73 20 |P.XOnce |text is |
|000063f0| 61 64 64 65 64 20 74 6f | 20 74 68 65 20 74 65 6d |added to| the tem|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.