home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / compsrcs / unix / volume04 / settz < prev    next >
SHell self-extracting ARchive  |  1988-09-11  |  59.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: settz

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file C source text default
99% file makefile script text default
98% file C source, ASCII text 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| 53 75 62 6a 65 63 74 3a | 20 74 69 6d 65 20 63 6f |Subject:| time co|
|00000010| 6e 76 65 72 73 69 6f 6e | 20 2f 20 74 69 6d 65 20 |nversion| / time |
|00000020| 7a 6f 6e 65 20 73 79 73 | 74 65 6d 0a 4e 65 77 73 |zone sys|tem.News|
|00000030| 67 72 6f 75 70 73 3a 20 | 6d 6f 64 2e 73 6f 75 72 |groups: |mod.sour|
|00000040| 63 65 73 0a 41 70 70 72 | 6f 76 65 64 3a 20 6a 70 |ces.Appr|oved: jp|
|00000050| 6e 40 70 61 6e 64 61 2e | 55 55 43 50 0a 0a 4d 6f |n@panda.|UUCP..Mo|
|00000060| 64 2e 73 6f 75 72 63 65 | 73 3a 20 20 56 6f 6c 75 |d.source|s: Volu|
|00000070| 6d 65 20 34 2c 20 49 73 | 73 75 65 20 31 34 0a 53 |me 4, Is|sue 14.S|
|00000080| 75 62 6d 69 74 74 65 64 | 20 62 79 3a 20 74 61 6c |ubmitted| by: tal|
|00000090| 63 6f 74 74 21 73 65 69 | 73 6d 6f 21 65 6c 73 69 |cott!sei|smo!elsi|
|000000a0| 65 21 61 64 6f 0a 0a 23 | 21 20 2f 62 69 6e 2f 73 |e!ado..#|! /bin/s|
|000000b0| 68 0a 23 20 54 68 69 73 | 20 69 73 20 61 20 73 68 |h.# This| is a sh|
|000000c0| 65 6c 6c 20 61 72 63 68 | 69 76 65 2c 20 6d 65 61 |ell arch|ive, mea|
|000000d0| 6e 69 6e 67 3a 0a 23 20 | 31 2e 20 52 65 6d 6f 76 |ning:.# |1. Remov|
|000000e0| 65 20 65 76 65 72 79 74 | 68 69 6e 67 20 61 62 6f |e everyt|hing abo|
|000000f0| 76 65 20 74 68 65 20 23 | 21 20 2f 62 69 6e 2f 73 |ve the #|! /bin/s|
|00000100| 68 20 6c 69 6e 65 2e 0a | 23 20 32 2e 20 53 61 76 |h line..|# 2. Sav|
|00000110| 65 20 74 68 65 20 72 65 | 73 75 6c 74 69 6e 67 20 |e the re|sulting |
|00000120| 74 65 78 74 20 69 6e 20 | 61 20 66 69 6c 65 2e 0a |text in |a file..|
|00000130| 23 20 33 2e 20 45 78 65 | 63 75 74 65 20 74 68 65 |# 3. Exe|cute the|
|00000140| 20 66 69 6c 65 20 77 69 | 74 68 20 2f 62 69 6e 2f | file wi|th /bin/|
|00000150| 73 68 20 28 6e 6f 74 20 | 63 73 68 29 20 74 6f 20 |sh (not |csh) to |
|00000160| 63 72 65 61 74 65 20 74 | 68 65 20 66 69 6c 65 73 |create t|he files|
|00000170| 3a 0a 23 09 52 45 41 44 | 4d 45 0a 23 09 4d 61 6b |:.#.READ|ME.#.Mak|
|00000180| 65 66 69 6c 65 0a 23 09 | 73 65 74 74 7a 2e 33 0a |efile.#.|settz.3.|
|00000190| 23 09 74 7a 66 69 6c 65 | 2e 35 0a 23 09 74 7a 63 |#.tzfile|.5.#.tzc|
|000001a0| 6f 6d 70 2e 38 0a 23 09 | 74 7a 66 69 6c 65 2e 68 |omp.8.#.|tzfile.h|
|000001b0| 0a 23 09 74 7a 63 6f 6d | 70 2e 63 0a 23 09 73 63 |.#.tzcom|p.c.#.sc|
|000001c0| 68 65 63 6b 2e 63 0a 23 | 09 73 74 72 63 68 72 2e |heck.c.#|.strchr.|
|000001d0| 63 0a 23 09 6d 6b 64 69 | 72 2e 63 0a 23 09 74 7a |c.#.mkdi|r.c.#.tz|
|000001e0| 64 75 6d 70 2e 63 0a 23 | 09 73 65 74 74 7a 2e 63 |dump.c.#|.settz.c|
|000001f0| 0a 23 09 79 65 61 72 73 | 2e 73 68 0a 23 09 61 73 |.#.years|.sh.#.as|
|00000200| 69 61 0a 23 09 61 75 73 | 74 72 61 6c 61 73 69 61 |ia.#.aus|tralasia|
|00000210| 0a 23 09 65 75 72 6f 70 | 65 0a 23 09 65 74 63 65 |.#.europ|e.#.etce|
|00000220| 74 65 72 61 0a 23 09 6e | 6f 72 74 68 61 6d 65 72 |tera.#.n|orthamer|
|00000230| 69 63 61 0a 23 09 70 61 | 63 69 66 69 63 6e 65 77 |ica.#.pa|cificnew|
|00000240| 0a 23 20 54 68 69 73 20 | 61 72 63 68 69 76 65 20 |.# This |archive |
|00000250| 63 72 65 61 74 65 64 3a | 20 46 72 69 20 4d 61 72 |created:| Fri Mar|
|00000260| 20 20 37 20 31 37 3a 30 | 32 3a 32 34 20 31 39 38 | 7 17:0|2:24 198|
|00000270| 36 0a 65 78 70 6f 72 74 | 20 50 41 54 48 3b 20 50 |6.export| PATH; P|
|00000280| 41 54 48 3d 2f 62 69 6e | 3a 24 50 41 54 48 0a 65 |ATH=/bin|:$PATH.e|
|00000290| 63 68 6f 20 73 68 61 72 | 3a 20 65 78 74 72 61 63 |cho shar|: extrac|
|000002a0| 74 69 6e 67 20 22 27 52 | 45 41 44 4d 45 27 22 20 |ting "'R|EADME'" |
|000002b0| 27 28 36 32 30 20 63 68 | 61 72 61 63 74 65 72 73 |'(620 ch|aracters|
|000002c0| 29 27 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 52 |)'.if te|st -f 'R|
|000002d0| 45 41 44 4d 45 27 0a 74 | 68 65 6e 0a 09 65 63 68 |EADME'.t|hen..ech|
|000002e0| 6f 20 73 68 61 72 3a 20 | 77 69 6c 6c 20 6e 6f 74 |o shar: |will not|
|000002f0| 20 6f 76 65 72 2d 77 72 | 69 74 65 20 65 78 69 73 | over-wr|ite exis|
|00000300| 74 69 6e 67 20 66 69 6c | 65 20 22 27 52 45 41 44 |ting fil|e "'READ|
|00000310| 4d 45 27 22 0a 65 6c 73 | 65 0a 63 61 74 20 3c 3c |ME'".els|e.cat <<|
|00000320| 20 5c 53 48 41 52 5f 45 | 4f 46 20 3e 20 27 52 45 | \SHAR_E|OF > 'RE|
|00000330| 41 44 4d 45 27 0a 40 28 | 23 29 52 45 41 44 4d 45 |ADME'.@(|#)README|
|00000340| 09 32 2e 31 0a 0a 50 6c | 65 61 73 65 20 73 65 6e |.2.1..Pl|ease sen|
|00000350| 64 20 63 6f 6d 6d 65 6e | 74 73 20 6f 72 20 69 6e |d commen|ts or in|
|00000360| 66 6f 72 6d 61 74 69 6f | 6e 20 74 6f 20 73 65 69 |formatio|n to sei|
|00000370| 73 6d 6f 21 65 6c 73 69 | 65 21 61 64 6f 20 28 77 |smo!elsi|e!ado (w|
|00000380| 69 74 68 2c 20 70 65 72 | 68 61 70 73 2c 0a 63 61 |ith, per|haps,.ca|
|00000390| 72 62 6f 6e 20 63 6f 70 | 65 73 20 74 6f 20 63 62 |rbon cop|es to cb|
|000003a0| 6f 73 67 64 21 6d 61 72 | 6b 2c 20 73 65 69 73 6d |osgd!mar|k, seism|
|000003b0| 6f 21 6c 69 6e 75 73 21 | 65 6e 63 6f 72 65 21 6e |o!linus!|encore!n|
|000003c0| 65 63 69 73 21 67 65 6f | 2c 20 61 6e 64 0a 73 65 |ecis!geo|, and.se|
|000003d0| 69 73 6d 6f 21 6d 75 6e | 6e 61 72 69 21 6b 72 65 |ismo!mun|nari!kre|
|000003e0| 2c 20 77 68 6f 20 61 72 | 65 20 72 65 73 70 6f 6e |, who ar|e respon|
|000003f0| 73 69 62 6c 65 20 66 6f | 72 20 61 6e 79 20 67 6f |sible fo|r any go|
|00000400| 6f 64 20 69 64 65 61 73 | 20 74 68 61 74 20 73 68 |od ideas| that sh|
|00000410| 6f 77 20 75 70 20 68 65 | 72 65 29 2e 0a 0a 48 69 |ow up he|re)...Hi|
|00000420| 73 74 6f 72 69 63 61 6c | 20 6c 6f 63 61 6c 20 74 |storical| local t|
|00000430| 69 6d 65 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |ime info|rmation |
|00000440| 68 61 73 20 62 65 65 6e | 20 69 6e 63 6c 75 64 65 |has been| include|
|00000450| 64 20 68 65 72 65 20 6e | 6f 74 20 62 65 63 61 75 |d here n|ot becau|
|00000460| 73 65 20 69 74 20 73 68 | 6f 75 6c 64 0a 62 65 20 |se it sh|ould.be |
|00000470| 70 61 72 74 20 6f 66 20 | 74 68 65 20 73 74 61 6e |part of |the stan|
|00000480| 64 61 72 64 20 28 6f 72 | 2c 20 69 6e 64 65 65 64 |dard (or|, indeed|
|00000490| 2c 20 61 6e 79 6f 6e 65 | 27 73 20 70 72 6f 64 75 |, anyone|'s produ|
|000004a0| 63 74 29 2c 20 62 75 74 | 20 72 61 74 68 65 72 20 |ct), but| rather |
|000004b0| 74 6f 3a 0a 0a 2a 09 67 | 69 76 65 20 70 65 6f 70 |to:..*.g|ive peop|
|000004c0| 6c 65 20 61 6e 20 69 64 | 65 61 20 6f 66 20 74 68 |le an id|ea of th|
|000004d0| 65 20 76 61 72 69 65 74 | 79 20 6f 66 20 6c 6f 63 |e variet|y of loc|
|000004e0| 61 6c 20 74 69 6d 65 20 | 72 75 6c 65 73 20 74 68 |al time |rules th|
|000004f0| 61 74 20 68 61 76 65 0a | 09 65 78 69 73 74 65 64 |at have.|.existed|
|00000500| 20 69 6e 20 74 68 65 20 | 70 61 73 74 20 61 6e 64 | in the |past and|
|00000510| 20 74 68 75 73 20 61 6e | 20 69 64 65 61 20 6f 66 | thus an| idea of|
|00000520| 20 74 68 65 20 76 61 72 | 69 65 74 79 20 74 68 61 | the var|iety tha|
|00000530| 74 20 6d 61 79 20 62 65 | 0a 09 65 78 70 65 63 74 |t may be|..expect|
|00000540| 65 64 20 69 6e 20 74 68 | 65 20 66 75 74 75 72 65 |ed in th|e future|
|00000550| 3b 0a 0a 2a 09 70 72 6f | 76 69 64 65 20 61 20 74 |;..*.pro|vide a t|
|00000560| 65 73 74 20 6f 66 20 74 | 68 65 20 67 65 6e 65 72 |est of t|he gener|
|00000570| 61 6c 69 74 79 20 6f 66 | 20 74 68 65 20 6c 6f 63 |ality of| the loc|
|00000580| 61 6c 20 74 69 6d 65 20 | 72 75 6c 65 20 64 65 73 |al time |rule des|
|00000590| 63 72 69 70 74 69 6f 6e | 0a 09 73 79 73 74 65 6d |cription|..system|
|000005a0| 2e 0a 53 48 41 52 5f 45 | 4f 46 0a 69 66 20 74 65 |..SHAR_E|OF.if te|
|000005b0| 73 74 20 36 32 30 20 2d | 6e 65 20 22 60 77 63 20 |st 620 -|ne "`wc |
|000005c0| 2d 63 20 3c 20 27 52 45 | 41 44 4d 45 27 60 22 0a |-c < 'RE|ADME'`".|
|000005d0| 74 68 65 6e 0a 09 65 63 | 68 6f 20 73 68 61 72 3a |then..ec|ho shar:|
|000005e0| 20 65 72 72 6f 72 20 74 | 72 61 6e 73 6d 69 74 74 | error t|ransmitt|
|000005f0| 69 6e 67 20 22 27 52 45 | 41 44 4d 45 27 22 20 27 |ing "'RE|ADME'" '|
|00000600| 28 73 68 6f 75 6c 64 20 | 68 61 76 65 20 62 65 65 |(should |have bee|
|00000610| 6e 20 36 32 30 20 63 68 | 61 72 61 63 74 65 72 73 |n 620 ch|aracters|
|00000620| 29 27 0a 66 69 0a 66 69 | 0a 65 63 68 6f 20 73 68 |)'.fi.fi|.echo sh|
|00000630| 61 72 3a 20 65 78 74 72 | 61 63 74 69 6e 67 20 22 |ar: extr|acting "|
|00000640| 27 4d 61 6b 65 66 69 6c | 65 27 22 20 27 28 31 37 |'Makefil|e'" '(17|
|00000650| 31 33 20 63 68 61 72 61 | 63 74 65 72 73 29 27 0a |13 chara|cters)'.|
|00000660| 69 66 20 74 65 73 74 20 | 2d 66 20 27 4d 61 6b 65 |if test |-f 'Make|
|00000670| 66 69 6c 65 27 0a 74 68 | 65 6e 0a 09 65 63 68 6f |file'.th|en..echo|
|00000680| 20 73 68 61 72 3a 20 77 | 69 6c 6c 20 6e 6f 74 20 | shar: w|ill not |
|00000690| 6f 76 65 72 2d 77 72 69 | 74 65 20 65 78 69 73 74 |over-wri|te exist|
|000006a0| 69 6e 67 20 66 69 6c 65 | 20 22 27 4d 61 6b 65 66 |ing file| "'Makef|
|000006b0| 69 6c 65 27 22 0a 65 6c | 73 65 0a 63 61 74 20 3c |ile'".el|se.cat <|
|000006c0| 3c 20 5c 53 48 41 52 5f | 45 4f 46 20 3e 20 27 4d |< \SHAR_|EOF > 'M|
|000006d0| 61 6b 65 66 69 6c 65 27 | 0a 23 20 40 28 23 29 4d |akefile'|.# @(#)M|
|000006e0| 61 6b 65 66 69 6c 65 09 | 32 2e 31 0a 0a 23 20 49 |akefile.|2.1..# I|
|000006f0| 66 20 79 6f 75 20 77 61 | 6e 74 20 73 6f 6d 65 74 |f you wa|nt somet|
|00000700| 68 69 6e 67 20 6f 74 68 | 65 72 20 74 68 61 6e 20 |hing oth|er than |
|00000710| 45 61 73 74 65 72 6e 20 | 55 6e 69 74 65 64 20 53 |Eastern |United S|
|00000720| 74 61 74 65 73 20 74 69 | 6d 65 20 75 73 65 64 20 |tates ti|me used |
|00000730| 6f 6e 20 79 6f 75 72 0a | 23 20 73 79 73 74 65 6d |on your.|# system|
|00000740| 2c 20 63 68 61 6e 67 65 | 20 74 68 65 20 6c 69 6e |, change| the lin|
|00000750| 65 20 62 65 6c 6f 77 20 | 28 61 66 74 65 72 20 66 |e below |(after f|
|00000760| 69 6e 64 69 6e 67 20 74 | 68 65 20 7a 6f 6e 65 20 |inding t|he zone |
|00000770| 79 6f 75 20 77 61 6e 74 | 20 69 6e 20 74 68 65 0a |you want| in the.|
|00000780| 23 20 74 69 6d 65 20 7a | 6f 6e 65 20 66 69 6c 65 |# time z|one file|
|00000790| 73 2c 20 6f 72 20 61 64 | 64 69 6e 67 20 69 74 20 |s, or ad|ding it |
|000007a0| 74 6f 20 61 20 74 69 6d | 65 20 7a 6f 6e 65 20 66 |to a tim|e zone f|
|000007b0| 69 6c 65 29 2e 0a 23 20 | 41 6c 74 65 72 6e 61 74 |ile)..# |Alternat|
|000007c0| 65 6c 79 2c 20 69 66 20 | 79 6f 75 20 64 69 73 63 |ely, if |you disc|
|000007d0| 6f 76 65 72 20 79 6f 75 | 27 76 65 20 67 6f 74 20 |over you|'ve got |
|000007e0| 74 68 65 20 77 72 6f 6e | 67 20 74 69 6d 65 20 7a |the wron|g time z|
|000007f0| 6f 6e 65 2c 20 79 6f 75 | 20 63 61 6e 20 6a 75 73 |one, you| can jus|
|00000800| 74 0a 23 09 74 7a 63 6f | 6d 70 20 2d 6c 20 72 69 |t.#.tzco|mp -l ri|
|00000810| 67 68 74 7a 6f 6e 65 0a | 0a 4c 4f 43 41 4c 54 49 |ghtzone.|.LOCALTI|
|00000820| 4d 45 3d 09 45 61 73 74 | 65 72 6e 0a 0a 23 20 55 |ME=.East|ern..# U|
|00000830| 73 65 20 61 6e 20 61 62 | 73 6f 6c 75 74 65 20 70 |se an ab|solute p|
|00000840| 61 74 68 20 6e 61 6d 65 | 20 66 6f 72 20 54 5a 44 |ath name| for TZD|
|00000850| 49 52 20 75 6e 6c 65 73 | 73 20 79 6f 75 27 72 65 |IR unles|s you're|
|00000860| 20 6a 75 73 74 20 74 65 | 73 74 69 6e 67 20 74 68 | just te|sting th|
|00000870| 65 20 73 6f 66 74 77 61 | 72 65 2e 0a 0a 54 5a 44 |e softwa|re...TZD|
|00000880| 49 52 3d 09 09 2f 65 74 | 63 2f 74 7a 64 69 72 0a |IR=../et|c/tzdir.|
|00000890| 0a 23 20 4c 49 4e 54 46 | 4c 41 47 53 20 69 73 20 |.# LINTF|LAGS is |
|000008a0| 73 65 74 20 66 6f 72 20 | 34 2e 31 62 73 64 20 73 |set for |4.1bsd s|
|000008b0| 79 73 74 65 6d 73 2e 20 | 20 49 66 20 79 6f 75 27 |ystems. | If you'|
|000008c0| 72 65 20 75 73 69 6e 67 | 20 53 79 73 74 65 6d 20 |re using| System |
|000008d0| 56 2c 20 79 6f 75 27 6c | 6c 20 77 61 6e 74 0a 23 |V, you'l|l want.#|
|000008e0| 20 74 6f 20 63 6f 6d 6d | 65 6e 74 20 6f 75 74 20 | to comm|ent out |
|000008f0| 74 68 65 20 22 4c 49 4e | 54 46 4c 41 47 53 3d 22 |the "LIN|TFLAGS="|
|00000900| 20 6c 69 6e 65 2e 0a 0a | 4c 49 4e 54 46 4c 41 47 | line...|LINTFLAG|
|00000910| 53 3d 09 2d 70 68 62 61 | 61 78 63 0a 0a 44 45 42 |S=.-phba|axc..DEB|
|00000920| 55 47 3d 0a 4c 46 4c 41 | 47 53 3d 0a 43 46 4c 41 |UG=.LFLA|GS=.CFLA|
|00000930| 47 53 3d 09 09 24 28 44 | 45 42 55 47 29 20 2d 4f |GS=..$(D|EBUG) -O|
|00000940| 20 2d 44 4f 42 4a 45 43 | 54 49 44 20 2d 44 54 5a | -DOBJEC|TID -DTZ|
|00000950| 44 49 52 3d 5c 22 24 28 | 54 5a 44 49 52 29 5c 22 |DIR=\"$(|TZDIR)\"|
|00000960| 0a 0a 54 5a 43 53 52 43 | 53 3d 09 74 7a 63 6f 6d |..TZCSRC|S=.tzcom|
|00000970| 70 2e 63 20 73 63 68 65 | 63 6b 2e 63 20 73 74 72 |p.c sche|ck.c str|
|00000980| 63 68 72 2e 63 20 6d 6b | 64 69 72 2e 63 0a 54 5a |chr.c mk|dir.c.TZ|
|00000990| 43 4f 42 4a 53 3d 09 74 | 7a 63 6f 6d 70 2e 6f 20 |COBJS=.t|zcomp.o |
|000009a0| 73 63 68 65 63 6b 2e 6f | 20 73 74 72 63 68 72 2e |scheck.o| strchr.|
|000009b0| 6f 20 6d 6b 64 69 72 2e | 6f 0a 54 5a 44 53 52 43 |o mkdir.|o.TZDSRC|
|000009c0| 53 3d 09 74 7a 64 75 6d | 70 2e 63 20 73 65 74 74 |S=.tzdum|p.c sett|
|000009d0| 7a 2e 63 0a 54 5a 44 4f | 42 4a 53 3d 09 74 7a 64 |z.c.TZDO|BJS=.tzd|
|000009e0| 75 6d 70 2e 6f 20 73 65 | 74 74 7a 2e 6f 0a 44 4f |ump.o se|ttz.o.DO|
|000009f0| 43 53 3d 09 09 52 45 41 | 44 4d 45 20 4d 61 6b 65 |CS=..REA|DME Make|
|00000a00| 66 69 6c 65 20 73 65 74 | 74 7a 2e 33 20 74 7a 66 |file set|tz.3 tzf|
|00000a10| 69 6c 65 2e 35 20 74 7a | 63 6f 6d 70 2e 38 0a 53 |ile.5 tz|comp.8.S|
|00000a20| 4f 55 52 43 45 53 3d 09 | 74 7a 66 69 6c 65 2e 68 |OURCES=.|tzfile.h|
|00000a30| 20 24 28 54 5a 43 53 52 | 43 53 29 20 24 28 54 5a | $(TZCSR|CS) $(TZ|
|00000a40| 44 53 52 43 53 29 20 79 | 65 61 72 73 2e 73 68 0a |DSRCS) y|ears.sh.|
|00000a50| 44 41 54 41 3d 09 09 61 | 73 69 61 20 61 75 73 74 |DATA=..a|sia aust|
|00000a60| 72 61 6c 61 73 69 61 20 | 65 75 72 6f 70 65 20 65 |ralasia |europe e|
|00000a70| 74 63 65 74 65 72 61 20 | 6e 6f 72 74 68 61 6d 65 |tcetera |northame|
|00000a80| 72 69 63 61 20 70 61 63 | 69 66 69 63 6e 65 77 0a |rica pac|ificnew.|
|00000a90| 45 4e 43 48 49 4c 41 44 | 41 3d 09 24 28 44 4f 43 |ENCHILAD|A=.$(DOC|
|00000aa0| 53 29 20 24 28 53 4f 55 | 52 43 45 53 29 20 24 28 |S) $(SOU|RCES) $(|
|00000ab0| 44 41 54 41 29 0a 0a 61 | 6c 6c 3a 09 52 45 44 49 |DATA)..a|ll:.REDI|
|00000ac0| 44 5f 42 49 4e 41 52 49 | 45 53 20 74 7a 64 75 6d |D_BINARI|ES tzdum|
|00000ad0| 70 0a 0a 52 45 44 49 44 | 5f 42 49 4e 41 52 49 45 |p..REDID|_BINARIE|
|00000ae0| 53 3a 09 24 28 54 5a 44 | 49 52 29 20 74 7a 63 6f |S:.$(TZD|IR) tzco|
|00000af0| 6d 70 20 24 28 44 41 54 | 41 29 20 79 65 61 72 73 |mp $(DAT|A) years|
|00000b00| 0a 09 74 7a 63 6f 6d 70 | 20 2d 6c 20 24 28 4c 4f |..tzcomp| -l $(LO|
|00000b10| 43 41 4c 54 49 4d 45 29 | 20 2d 64 20 24 28 54 5a |CALTIME)| -d $(TZ|
|00000b20| 44 49 52 29 20 24 28 44 | 41 54 41 29 0a 09 63 70 |DIR) $(D|ATA)..cp|
|00000b30| 20 2f 64 65 76 2f 6e 75 | 6c 6c 20 24 40 0a 0a 74 | /dev/nu|ll $@..t|
|00000b40| 7a 64 75 6d 70 3a 09 24 | 28 54 5a 44 4f 42 4a 53 |zdump:.$|(TZDOBJS|
|00000b50| 29 0a 09 24 28 43 43 29 | 20 24 28 4c 46 4c 41 47 |)..$(CC)| $(LFLAG|
|00000b60| 53 29 20 24 28 54 5a 44 | 4f 42 4a 53 29 20 2d 6f |S) $(TZD|OBJS) -o|
|00000b70| 20 24 40 0a 0a 74 7a 63 | 6f 6d 70 3a 09 24 28 54 | $@..tzc|omp:.$(T|
|00000b80| 5a 43 4f 42 4a 53 29 0a | 09 24 28 43 43 29 20 24 |ZCOBJS).|.$(CC) $|
|00000b90| 28 4c 46 4c 41 47 53 29 | 20 24 28 54 5a 43 4f 42 |(LFLAGS)| $(TZCOB|
|00000ba0| 4a 53 29 20 2d 6f 20 24 | 40 0a 0a 24 28 54 5a 44 |JS) -o $|@..$(TZD|
|00000bb0| 49 52 29 3a 0a 09 6d 6b | 64 69 72 20 24 40 0a 0a |IR):..mk|dir $@..|
|00000bc0| 79 65 61 72 73 3a 09 79 | 65 61 72 73 2e 73 68 0a |years:.y|ears.sh.|
|00000bd0| 09 72 6d 20 2d 66 20 24 | 40 0a 09 63 70 20 24 3f |.rm -f $|@..cp $?|
|00000be0| 20 24 40 0a 09 63 68 6d | 6f 64 20 35 35 35 20 24 | $@..chm|od 555 $|
|00000bf0| 40 0a 0a 42 55 4e 44 4c | 45 31 3a 09 24 28 44 4f |@..BUNDL|E1:.$(DO|
|00000c00| 43 53 29 0a 09 62 75 6e | 64 6c 65 20 24 28 44 4f |CS)..bun|dle $(DO|
|00000c10| 43 53 29 20 3e 20 42 55 | 4e 44 4c 45 31 0a 0a 42 |CS) > BU|NDLE1..B|
|00000c20| 55 4e 44 4c 45 32 3a 09 | 24 28 53 4f 55 52 43 45 |UNDLE2:.|$(SOURCE|
|00000c30| 53 29 0a 09 62 75 6e 64 | 6c 65 20 24 28 53 4f 55 |S)..bund|le $(SOU|
|00000c40| 52 43 45 53 29 20 3e 20 | 42 55 4e 44 4c 45 32 0a |RCES) > |BUNDLE2.|
|00000c50| 0a 42 55 4e 44 4c 45 33 | 3a 09 24 28 44 41 54 41 |.BUNDLE3|:.$(DATA|
|00000c60| 29 0a 09 62 75 6e 64 6c | 65 20 24 28 44 41 54 41 |)..bundl|e $(DATA|
|00000c70| 29 20 3e 20 42 55 4e 44 | 4c 45 33 0a 0a 24 28 45 |) > BUND|LE3..$(E|
|00000c80| 4e 43 48 49 4c 41 44 41 | 29 3a 0a 09 73 63 63 73 |NCHILADA|):..sccs|
|00000c90| 20 67 65 74 20 24 28 52 | 45 4c 29 20 24 28 52 45 | get $(R|EL) $(RE|
|00000ca0| 56 29 20 24 40 0a 0a 73 | 75 72 65 3a 09 24 28 54 |V) $@..s|ure:.$(T|
|00000cb0| 5a 43 53 52 43 53 29 20 | 24 28 54 5a 44 53 52 43 |ZCSRCS) |$(TZDSRC|
|00000cc0| 53 29 0a 09 6c 69 6e 74 | 20 24 28 4c 49 4e 54 46 |S)..lint| $(LINTF|
|00000cd0| 4c 41 47 53 29 20 24 28 | 54 5a 43 53 52 43 53 29 |LAGS) $(|TZCSRCS)|
|00000ce0| 0a 09 6c 69 6e 74 20 24 | 28 4c 49 4e 54 46 4c 41 |..lint $|(LINTFLA|
|00000cf0| 47 53 29 20 24 28 54 5a | 44 53 52 43 53 29 0a 0a |GS) $(TZ|DSRCS)..|
|00000d00| 63 6c 65 61 6e 3a 0a 09 | 72 6d 20 2d 66 20 63 6f |clean:..|rm -f co|
|00000d10| 72 65 20 2a 2e 6f 20 2a | 2e 6f 75 74 20 52 45 44 |re *.o *|.out RED|
|00000d20| 49 44 5f 42 49 4e 41 52 | 49 45 53 20 79 65 61 72 |ID_BINAR|IES year|
|00000d30| 73 20 74 7a 64 75 6d 70 | 20 74 7a 63 6f 6d 70 20 |s tzdump| tzcomp |
|00000d40| 42 55 4e 44 4c 45 20 5c | 23 2a 0a 0a 43 4c 45 41 |BUNDLE \|#*..CLEA|
|00000d50| 4e 3a 09 63 6c 65 61 6e | 0a 09 73 63 63 73 20 63 |N:.clean|..sccs c|
|00000d60| 6c 65 61 6e 0a 0a 74 7a | 64 75 6d 70 2e 6f 20 74 |lean..tz|dump.o t|
|00000d70| 7a 63 6f 6d 70 2e 6f 20 | 73 65 74 74 7a 2e 6f 3a |zcomp.o |settz.o:|
|00000d80| 09 74 7a 66 69 6c 65 2e | 68 0a 53 48 41 52 5f 45 |.tzfile.|h.SHAR_E|
|00000d90| 4f 46 0a 69 66 20 74 65 | 73 74 20 31 37 31 33 20 |OF.if te|st 1713 |
|00000da0| 2d 6e 65 20 22 60 77 63 | 20 2d 63 20 3c 20 27 4d |-ne "`wc| -c < 'M|
|00000db0| 61 6b 65 66 69 6c 65 27 | 60 22 0a 74 68 65 6e 0a |akefile'|`".then.|
|00000dc0| 09 65 63 68 6f 20 73 68 | 61 72 3a 20 65 72 72 6f |.echo sh|ar: erro|
|00000dd0| 72 20 74 72 61 6e 73 6d | 69 74 74 69 6e 67 20 22 |r transm|itting "|
|00000de0| 27 4d 61 6b 65 66 69 6c | 65 27 22 20 27 28 73 68 |'Makefil|e'" '(sh|
|00000df0| 6f 75 6c 64 20 68 61 76 | 65 20 62 65 65 6e 20 31 |ould hav|e been 1|
|00000e00| 37 31 33 20 63 68 61 72 | 61 63 74 65 72 73 29 27 |713 char|acters)'|
|00000e10| 0a 66 69 0a 66 69 0a 65 | 63 68 6f 20 73 68 61 72 |.fi.fi.e|cho shar|
|00000e20| 3a 20 65 78 74 72 61 63 | 74 69 6e 67 20 22 27 73 |: extrac|ting "'s|
|00000e30| 65 74 74 7a 2e 33 27 22 | 20 27 28 31 36 30 36 20 |ettz.3'"| '(1606 |
|00000e40| 63 68 61 72 61 63 74 65 | 72 73 29 27 0a 69 66 20 |characte|rs)'.if |
|00000e50| 74 65 73 74 20 2d 66 20 | 27 73 65 74 74 7a 2e 33 |test -f |'settz.3|
|00000e60| 27 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |'.then..|echo sha|
|00000e70| 72 3a 20 77 69 6c 6c 20 | 6e 6f 74 20 6f 76 65 72 |r: will |not over|
|00000e80| 2d 77 72 69 74 65 20 65 | 78 69 73 74 69 6e 67 20 |-write e|xisting |
|00000e90| 66 69 6c 65 20 22 27 73 | 65 74 74 7a 2e 33 27 22 |file "'s|ettz.3'"|
|00000ea0| 0a 65 6c 73 65 0a 63 61 | 74 20 3c 3c 20 5c 53 48 |.else.ca|t << \SH|
|00000eb0| 41 52 5f 45 4f 46 20 3e | 20 27 73 65 74 74 7a 2e |AR_EOF >| 'settz.|
|00000ec0| 33 27 0a 2e 54 48 20 53 | 45 54 54 5a 20 33 20 0a |3'..TH S|ETTZ 3 .|
|00000ed0| 2e 53 48 20 4e 41 4d 45 | 0a 73 65 74 74 7a 2c 20 |.SH NAME|.settz, |
|00000ee0| 6e 65 77 63 74 69 6d 65 | 2c 20 6e 65 77 6c 6f 63 |newctime|, newloc|
|00000ef0| 61 6c 74 69 6d 65 20 5c | 2d 20 63 6f 6e 76 65 72 |altime \|- conver|
|00000f00| 74 20 64 61 74 65 20 61 | 6e 64 20 74 69 6d 65 20 |t date a|nd time |
|00000f10| 74 6f 20 41 53 43 49 49 | 0a 2e 53 48 20 53 59 4e |to ASCII|..SH SYN|
|00000f20| 4f 50 53 49 53 0a 2e 6e | 66 0a 2e 42 20 73 65 74 |OPSIS..n|f..B set|
|00000f30| 74 7a 28 7a 6f 6e 65 6e | 61 6d 65 29 0a 2e 42 20 |tz(zonen|ame)..B |
|00000f40| 63 68 61 72 20 2a 7a 6f | 6e 65 6e 61 6d 65 3b 0a |char *zo|nename;.|
|00000f50| 2e 50 50 0a 2e 42 20 63 | 68 61 72 20 2a 6e 65 77 |.PP..B c|har *new|
|00000f60| 63 74 69 6d 65 28 63 6c | 6f 63 6b 29 0a 2e 42 20 |ctime(cl|ock)..B |
|00000f70| 6c 6f 6e 67 20 2a 63 6c | 6f 63 6b 3b 0a 2e 50 50 |long *cl|ock;..PP|
|00000f80| 0a 2e 42 0a 23 69 6e 63 | 6c 75 64 65 20 22 74 69 |..B.#inc|lude "ti|
|00000f90| 6d 65 2e 68 22 0a 2e 50 | 50 0a 2e 42 20 73 74 72 |me.h"..P|P..B str|
|00000fa0| 75 63 74 20 74 6d 20 2a | 6e 65 77 6c 6f 63 61 6c |uct tm *|newlocal|
|00000fb0| 74 69 6d 65 28 63 6c 6f | 63 6b 29 0a 2e 42 20 6c |time(clo|ck)..B l|
|00000fc0| 6f 6e 67 20 2a 63 6c 6f | 63 6b 3b 0a 2e 50 50 0a |ong *clo|ck;..PP.|
|00000fd0| 2e 42 20 63 68 61 72 20 | 2a 74 7a 5f 61 62 62 72 |.B char |*tz_abbr|
|00000fe0| 3b 0a 2e 53 48 20 44 45 | 53 43 52 49 50 54 49 4f |;..SH DE|SCRIPTIO|
|00000ff0| 4e 0a 2e 49 20 53 65 74 | 74 7a 0a 73 65 74 73 20 |N..I Set|tz.sets |
|00001000| 74 69 6d 65 20 63 6f 6e | 76 65 72 73 69 6f 6e 20 |time con|version |
|00001010| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 75 73 65 64 |informat|ion used|
|00001020| 20 62 79 0a 2e 49 52 20 | 6e 65 77 6c 6f 63 61 6c | by..IR |newlocal|
|00001030| 74 69 6d 65 20 2e 0a 49 | 66 0a 2e 49 20 7a 6f 6e |time ..I|f..I zon|
|00001040| 65 6e 61 6d 65 0a 62 65 | 67 69 6e 73 20 77 69 74 |ename.be|gins wit|
|00001050| 68 20 61 20 73 6c 61 73 | 68 2c 0a 69 74 20 69 73 |h a slas|h,.it is|
|00001060| 20 75 73 65 64 20 61 73 | 20 74 68 65 20 61 62 73 | used as| the abs|
|00001070| 6f 6c 75 74 65 20 70 61 | 74 68 6e 61 6d 65 20 6f |olute pa|thname o|
|00001080| 66 20 74 68 65 0a 2e 49 | 52 20 74 7a 66 69 6c 65 |f the..I|R tzfile|
|00001090| 20 28 35 29 2d 66 6f 72 | 6d 61 74 0a 66 69 6c 65 | (5)-for|mat.file|
|000010a0| 20 66 72 6f 6d 20 77 68 | 69 63 68 20 74 6f 20 72 | from wh|ich to r|
|000010b0| 65 61 64 20 74 68 65 20 | 74 69 6d 65 20 63 6f 6e |ead the |time con|
|000010c0| 76 65 72 73 69 6f 6e 20 | 69 6e 66 6f 72 6d 61 74 |version |informat|
|000010d0| 69 6f 6e 3b 0a 69 66 0a | 2e 49 20 7a 6f 6e 65 6e |ion;.if.|.I zonen|
|000010e0| 61 6d 65 0a 62 65 67 69 | 6e 73 20 77 69 74 68 20 |ame.begi|ns with |
|000010f0| 73 6f 6d 65 20 6f 74 68 | 65 72 20 63 68 61 72 61 |some oth|er chara|
|00001100| 63 74 65 72 2c 0a 69 74 | 20 69 73 20 75 73 65 64 |cter,.it| is used|
|00001110| 20 61 73 20 61 20 70 61 | 74 68 6e 61 6d 65 20 72 | as a pa|thname r|
|00001120| 65 6c 61 74 69 76 65 20 | 74 6f 20 74 68 65 20 73 |elative |to the s|
|00001130| 74 61 6e 64 61 72 64 20 | 74 69 6d 65 20 63 6f 6e |tandard |time con|
|00001140| 76 65 72 73 69 6f 6e 20 | 69 6e 66 6f 72 6d 61 74 |version |informat|
|00001150| 69 6f 6e 0a 64 69 72 65 | 63 74 6f 72 79 2e 20 20 |ion.dire|ctory. |
|00001160| 41 20 63 61 6c 6c 20 6f | 66 20 74 68 65 20 66 6f |A call o|f the fo|
|00001170| 72 6d 0a 2e 74 69 20 2b | 2e 35 69 0a 2e 42 0a 73 |rm..ti +|.5i..B.s|
|00001180| 65 74 74 7a 28 22 22 29 | 0a 2e 62 72 0a 63 61 75 |ettz("")|..br.cau|
|00001190| 73 65 73 20 62 75 69 6c | 74 2d 69 6e 20 69 6e 66 |ses buil|t-in inf|
|000011a0| 6f 72 6d 61 74 69 6f 6e | 20 61 62 6f 75 74 20 47 |ormation| about G|
|000011b0| 4d 54 20 74 6f 20 62 65 | 20 75 73 65 64 3b 20 61 |MT to be| used; a|
|000011c0| 20 63 61 6c 6c 20 6f 66 | 20 74 68 65 20 66 6f 72 | call of| the for|
|000011d0| 6d 0a 2e 74 69 20 2b 2e | 35 69 0a 2e 42 0a 73 65 |m..ti +.|5i..B.se|
|000011e0| 74 74 7a 28 28 63 68 61 | 72 20 2a 29 20 30 29 0a |ttz((cha|r *) 0).|
|000011f0| 2e 62 72 0a 69 73 20 74 | 72 65 61 74 65 64 20 61 |.br.is t|reated a|
|00001200| 73 20 69 66 20 69 74 20 | 77 65 72 65 20 61 20 63 |s if it |were a c|
|00001210| 61 6c 6c 20 6f 66 20 74 | 68 65 20 66 6f 72 6d 0a |all of t|he form.|
|00001220| 2e 74 69 20 2b 2e 35 69 | 0a 2e 42 0a 73 65 74 74 |.ti +.5i|..B.sett|
|00001230| 7a 28 22 6c 6f 63 61 6c | 74 69 6d 65 22 29 0a 2e |z("local|time")..|
|00001240| 50 50 0a 2e 49 20 4e 65 | 77 6c 6f 63 61 6c 74 69 |PP..I Ne|wlocalti|
|00001250| 6d 65 0a 68 61 73 20 74 | 68 65 20 73 61 6d 65 20 |me.has t|he same |
|00001260| 61 72 67 75 6d 65 6e 74 | 20 61 6e 64 20 72 65 74 |argument| and ret|
|00001270| 75 72 6e 20 76 61 6c 75 | 65 20 61 73 0a 2e 49 52 |urn valu|e as..IR|
|00001280| 20 6c 6f 63 61 6c 74 69 | 6d 65 20 2e 0a 49 66 0a | localti|me ..If.|
|00001290| 2e 49 20 6e 65 77 6c 6f | 63 61 6c 74 69 6d 65 0a |.I newlo|caltime.|
|000012a0| 69 73 20 63 61 6c 6c 65 | 64 20 62 65 66 6f 72 65 |is calle|d before|
|000012b0| 0a 2e 49 20 73 65 74 74 | 7a 0a 69 73 20 63 61 6c |..I sett|z.is cal|
|000012c0| 6c 65 64 2c 0a 2e 49 20 | 6e 65 77 6c 6f 63 61 6c |led,..I |newlocal|
|000012d0| 74 69 6d 65 0a 63 61 6c | 6c 73 0a 2e 49 20 73 65 |time.cal|ls..I se|
|000012e0| 74 74 7a 0a 77 69 74 68 | 20 74 68 65 20 76 61 6c |ttz.with| the val|
|000012f0| 75 65 20 72 65 74 75 72 | 6e 65 64 20 62 79 0a 2e |ue retur|ned by..|
|00001300| 42 0a 67 65 74 65 6e 76 | 28 22 54 5a 22 29 2e 0a |B.getenv|("TZ")..|
|00001310| 2e 49 20 4e 65 77 6c 6f | 63 61 6c 74 69 6d 65 0a |.I Newlo|caltime.|
|00001320| 73 65 74 73 0a 74 7a 5f | 61 62 62 72 0a 74 6f 20 |sets.tz_|abbr.to |
|00001330| 61 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 61 6e 20 |a pointe|r to an |
|00001340| 0a 41 53 43 49 49 20 73 | 74 72 69 6e 67 20 74 68 |.ASCII s|tring th|
|00001350| 61 74 27 73 20 74 68 65 | 20 74 69 6d 65 20 7a 6f |at's the| time zo|
|00001360| 6e 65 20 61 62 62 72 65 | 76 69 61 74 69 6f 6e 20 |ne abbre|viation |
|00001370| 74 6f 20 62 65 20 75 73 | 65 64 20 77 69 74 68 0a |to be us|ed with.|
|00001380| 2e 49 52 20 6e 65 77 6c | 6f 63 61 6c 74 69 6d 65 |.IR newl|ocaltime|
|00001390| 20 27 73 0a 72 65 74 75 | 72 6e 20 76 61 6c 75 65 | 's.retu|rn value|
|000013a0| 2e 0a 2e 50 50 0a 2e 49 | 20 4e 65 77 63 74 69 6d |...PP..I| Newctim|
|000013b0| 65 0a 72 65 74 75 72 6e | 73 0a 2e 49 52 20 22 61 |e.return|s..IR "a|
|000013c0| 73 63 74 69 6d 65 28 6e | 65 77 6c 6f 63 61 6c 74 |sctime(n|ewlocalt|
|000013d0| 69 6d 65 28 2a 63 6c 6f | 63 6b 29 29 22 20 2e 0a |ime(*clo|ck))" ..|
|000013e0| 2e 53 48 20 44 49 41 47 | 4e 4f 53 54 49 43 53 0a |.SH DIAG|NOSTICS.|
|000013f0| 2e 49 20 53 65 74 74 7a | 0a 72 65 74 75 72 6e 73 |.I Settz|.returns|
|00001400| 20 7a 65 72 6f 20 69 66 | 20 61 6c 6c 20 73 65 65 | zero if| all see|
|00001410| 6d 73 20 77 65 6c 6c 3b | 20 69 74 20 72 65 74 75 |ms well;| it retu|
|00001420| 72 6e 73 20 6e 65 67 61 | 74 69 76 65 20 6f 6e 65 |rns nega|tive one|
|00001430| 20 6f 74 68 65 72 77 69 | 73 65 0a 28 61 6e 64 20 | otherwi|se.(and |
|00001440| 73 65 74 73 20 74 68 69 | 6e 67 73 20 75 70 20 73 |sets thi|ngs up s|
|00001450| 6f 20 74 68 61 74 20 69 | 74 73 20 62 75 69 6c 74 |o that i|ts built|
|00001460| 2d 69 6e 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |-in info|rmation |
|00001470| 61 62 6f 75 74 20 47 4d | 54 20 69 73 20 75 73 65 |about GM|T is use|
|00001480| 64 29 2e 0a 2e 53 48 20 | 46 49 4c 45 53 0a 2f 65 |d)...SH |FILES./e|
|00001490| 74 63 2f 74 7a 64 69 72 | 09 73 74 61 6e 64 61 72 |tc/tzdir|.standar|
|000014a0| 64 20 74 69 6d 65 20 63 | 6f 6e 76 65 72 73 69 6f |d time c|onversio|
|000014b0| 6e 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 64 69 |n inform|ation di|
|000014c0| 72 65 63 74 6f 72 79 0a | 2e 53 48 20 22 53 45 45 |rectory.|.SH "SEE|
|000014d0| 20 41 4c 53 4f 22 0a 63 | 74 69 6d 65 28 33 29 2c | ALSO".c|time(3),|
|000014e0| 20 67 65 74 65 6e 76 28 | 33 29 2c 20 74 7a 66 69 | getenv(|3), tzfi|
|000014f0| 6c 65 28 35 29 0a 2e 2e | 20 40 28 23 29 73 65 74 |le(5)...| @(#)set|
|00001500| 74 7a 2e 33 09 32 2e 31 | 0a 53 48 41 52 5f 45 4f |tz.3.2.1|.SHAR_EO|
|00001510| 46 0a 69 66 20 74 65 73 | 74 20 31 36 30 36 20 2d |F.if tes|t 1606 -|
|00001520| 6e 65 20 22 60 77 63 20 | 2d 63 20 3c 20 27 73 65 |ne "`wc |-c < 'se|
|00001530| 74 74 7a 2e 33 27 60 22 | 0a 74 68 65 6e 0a 09 65 |ttz.3'`"|.then..e|
|00001540| 63 68 6f 20 73 68 61 72 | 3a 20 65 72 72 6f 72 20 |cho shar|: error |
|00001550| 74 72 61 6e 73 6d 69 74 | 74 69 6e 67 20 22 27 73 |transmit|ting "'s|
|00001560| 65 74 74 7a 2e 33 27 22 | 20 27 28 73 68 6f 75 6c |ettz.3'"| '(shoul|
|00001570| 64 20 68 61 76 65 20 62 | 65 65 6e 20 31 36 30 36 |d have b|een 1606|
|00001580| 20 63 68 61 72 61 63 74 | 65 72 73 29 27 0a 66 69 | charact|ers)'.fi|
|00001590| 0a 66 69 0a 65 63 68 6f | 20 73 68 61 72 3a 20 65 |.fi.echo| shar: e|
|000015a0| 78 74 72 61 63 74 69 6e | 67 20 22 27 74 7a 66 69 |xtractin|g "'tzfi|
|000015b0| 6c 65 2e 35 27 22 20 27 | 28 32 31 30 30 20 63 68 |le.5'" '|(2100 ch|
|000015c0| 61 72 61 63 74 65 72 73 | 29 27 0a 69 66 20 74 65 |aracters|)'.if te|
|000015d0| 73 74 20 2d 66 20 27 74 | 7a 66 69 6c 65 2e 35 27 |st -f 't|zfile.5'|
|000015e0| 0a 74 68 65 6e 0a 09 65 | 63 68 6f 20 73 68 61 72 |.then..e|cho shar|
|000015f0| 3a 20 77 69 6c 6c 20 6e | 6f 74 20 6f 76 65 72 2d |: will n|ot over-|
|00001600| 77 72 69 74 65 20 65 78 | 69 73 74 69 6e 67 20 66 |write ex|isting f|
|00001610| 69 6c 65 20 22 27 74 7a | 66 69 6c 65 2e 35 27 22 |ile "'tz|file.5'"|
|00001620| 0a 65 6c 73 65 0a 63 61 | 74 20 3c 3c 20 5c 53 48 |.else.ca|t << \SH|
|00001630| 41 52 5f 45 4f 46 20 3e | 20 27 74 7a 66 69 6c 65 |AR_EOF >| 'tzfile|
|00001640| 2e 35 27 0a 2e 54 48 20 | 54 5a 46 49 4c 45 20 35 |.5'..TH |TZFILE 5|
|00001650| 0a 2e 53 48 20 4e 41 4d | 45 0a 74 7a 66 69 6c 65 |..SH NAM|E.tzfile|
|00001660| 20 5c 2d 20 74 69 6d 65 | 20 7a 6f 6e 65 20 69 6e | \- time| zone in|
|00001670| 66 6f 72 6d 61 74 69 6f | 6e 0a 2e 53 48 20 53 59 |formatio|n..SH SY|
|00001680| 4e 4f 50 53 49 53 0a 2e | 42 0a 23 69 6e 63 6c 75 |NOPSIS..|B.#inclu|
|00001690| 64 65 20 22 74 7a 66 69 | 6c 65 2e 68 22 0a 2e 53 |de "tzfi|le.h"..S|
|000016a0| 48 20 44 45 53 43 52 49 | 50 54 49 4f 4e 0a 54 68 |H DESCRI|PTION.Th|
|000016b0| 65 20 74 69 6d 65 20 7a | 6f 6e 65 20 69 6e 66 6f |e time z|one info|
|000016c0| 72 6d 61 74 69 6f 6e 20 | 66 69 6c 65 73 20 75 73 |rmation |files us|
|000016d0| 65 64 20 62 79 0a 2e 49 | 52 20 73 65 74 74 7a 20 |ed by..I|R settz |
|000016e0| 28 33 29 0a 61 6e 64 0a | 2e 49 52 20 6e 65 77 6c |(3).and.|.IR newl|
|000016f0| 6f 63 61 6c 74 69 6d 65 | 20 28 33 29 0a 62 65 67 |ocaltime| (3).beg|
|00001700| 69 6e 20 77 69 74 68 20 | 61 0a 2e 49 20 74 7a 69 |in with |a..I tzi|
|00001710| 6e 66 6f 0a 73 74 72 75 | 63 74 75 72 65 20 28 61 |nfo.stru|cture (a|
|00001720| 73 20 64 65 66 69 6e 65 | 64 20 69 6e 20 74 68 65 |s define|d in the|
|00001730| 20 69 6e 63 6c 75 64 65 | 20 66 69 6c 65 0a 2e 42 | include| file..B|
|00001740| 20 0a 22 74 7a 66 69 6c | 65 2e 68 22 5c 63 0a 29 | ."tzfil|e.h"\c.)|
|00001750| 3a 0a 2e 73 70 0a 2e 6e | 66 0a 2e 69 6e 20 2b 2e |:..sp..n|f..in +.|
|00001760| 35 69 0a 2e 74 61 20 2e | 35 69 20 2b 5c 77 27 75 |5i..ta .|5i +\w'u|
|00001770| 6e 73 69 67 6e 65 64 20 | 73 68 6f 72 74 20 20 27 |nsigned |short '|
|00001780| 75 0a 73 74 72 75 63 74 | 20 74 7a 68 65 61 64 20 |u.struct| tzhead |
|00001790| 7b 0a 09 63 68 61 72 09 | 74 7a 68 5f 72 65 73 65 |{..char.|tzh_rese|
|000017a0| 72 76 65 64 5b 31 34 5d | 3b 0a 09 75 6e 73 69 67 |rved[14]|;..unsig|
|000017b0| 6e 65 64 20 73 68 6f 72 | 74 09 74 7a 68 5f 74 69 |ned shor|t.tzh_ti|
|000017c0| 6d 65 63 6e 74 3b 0a 09 | 75 6e 73 69 67 6e 65 64 |mecnt;..|unsigned|
|000017d0| 20 73 68 6f 72 74 09 74 | 7a 68 5f 74 79 70 65 63 | short.t|zh_typec|
|000017e0| 6e 74 3b 0a 09 75 6e 73 | 69 67 6e 65 64 20 73 68 |nt;..uns|igned sh|
|000017f0| 6f 72 74 09 74 7a 68 5f | 63 68 61 72 63 6e 74 3b |ort.tzh_|charcnt;|
|00001800| 0a 7d 3b 0a 2e 69 6e 20 | 2d 2e 35 69 0a 2e 66 69 |.};..in |-.5i..fi|
|00001810| 0a 2e 50 50 0a 54 68 65 | 0a 2e 42 20 74 7a 68 5f |..PP.The|..B tzh_|
|00001820| 72 65 73 65 72 76 65 64 | 0a 65 6c 65 6d 65 6e 74 |reserved|.element|
|00001830| 20 69 73 20 63 75 72 72 | 65 6e 74 6c 79 20 75 6e | is curr|ently un|
|00001840| 75 73 65 64 2e 0a 54 68 | 65 0a 2e 42 20 74 7a 68 |used..Th|e..B tzh|
|00001850| 5f 74 69 6d 65 63 6e 74 | 0a 65 6c 65 6d 65 6e 74 |_timecnt|.element|
|00001860| 20 67 69 76 65 73 20 74 | 68 65 20 6e 75 6d 62 65 | gives t|he numbe|
|00001870| 72 20 6f 66 20 22 74 72 | 61 6e 73 69 74 69 6f 6e |r of "tr|ansition|
|00001880| 20 74 69 6d 65 73 22 20 | 66 6f 72 20 77 68 69 63 | times" |for whic|
|00001890| 68 20 64 61 74 61 20 69 | 73 20 73 74 6f 72 65 64 |h data i|s stored|
|000018a0| 0a 69 6e 20 74 68 65 20 | 66 69 6c 65 3b 0a 74 68 |.in the |file;.th|
|000018b0| 65 0a 2e 42 20 74 7a 68 | 5f 74 79 70 65 63 6e 74 |e..B tzh|_typecnt|
|000018c0| 0a 28 77 68 69 63 68 20 | 6d 75 73 74 20 6e 6f 74 |.(which |must not|
|000018d0| 20 62 65 20 7a 65 72 6f | 29 0a 65 6c 65 6d 65 6e | be zero|).elemen|
|000018e0| 74 20 67 69 76 65 73 20 | 74 68 65 20 6e 75 6d 62 |t gives |the numb|
|000018f0| 65 72 20 6f 66 20 22 6c | 6f 63 61 6c 20 74 69 6d |er of "l|ocal tim|
|00001900| 65 20 74 79 70 65 73 22 | 20 66 6f 72 20 77 68 69 |e types"| for whi|
|00001910| 63 68 20 64 61 74 61 20 | 69 73 20 73 74 6f 72 65 |ch data |is store|
|00001920| 64 0a 69 6e 20 74 68 65 | 20 66 69 6c 65 3b 0a 61 |d.in the| file;.a|
|00001930| 6e 64 20 74 68 65 0a 2e | 42 20 74 7a 68 5f 63 68 |nd the..|B tzh_ch|
|00001940| 61 72 63 6e 74 0a 65 6c | 65 6d 65 6e 74 20 67 69 |arcnt.el|ement gi|
|00001950| 76 65 73 20 74 68 65 20 | 6e 75 6d 62 65 72 20 6f |ves the |number o|
|00001960| 66 20 63 68 61 72 61 63 | 74 65 72 73 20 6f 66 20 |f charac|ters of |
|00001970| 22 74 69 6d 65 20 7a 6f | 6e 65 20 61 62 62 72 65 |"time zo|ne abbre|
|00001980| 76 69 61 74 69 6f 6e 20 | 73 74 72 69 6e 67 73 22 |viation |strings"|
|00001990| 0a 73 74 6f 72 65 64 20 | 69 6e 20 74 68 65 20 66 |.stored |in the f|
|000019a0| 69 6c 65 2e 0a 2e 50 50 | 0a 54 68 65 20 61 62 6f |ile...PP|.The abo|
|000019b0| 76 65 20 68 65 61 64 65 | 72 20 69 73 20 66 6f 6c |ve heade|r is fol|
|000019c0| 6c 6f 77 65 64 20 62 79 | 0a 2e 42 20 74 7a 68 5f |lowed by|..B tzh_|
|000019d0| 74 69 6d 65 63 6e 74 0a | 76 61 6c 75 65 73 20 6f |timecnt.|values o|
|000019e0| 66 20 74 79 70 65 0a 2e | 42 52 20 6c 6f 6e 67 20 |f type..|BR long |
|000019f0| 2c 0a 73 6f 72 74 65 64 | 20 69 6e 20 61 73 63 65 |,.sorted| in asce|
|00001a00| 6e 64 69 6e 67 20 6f 72 | 64 65 72 3b 0a 65 61 63 |nding or|der;.eac|
|00001a10| 68 20 69 73 20 75 73 65 | 64 20 61 73 20 61 20 74 |h is use|d as a t|
|00001a20| 72 61 6e 73 69 74 69 6f | 6e 20 74 69 6d 65 20 28 |ransitio|n time (|
|00001a30| 61 73 20 72 65 74 75 72 | 6e 65 64 20 62 79 0a 2e |as retur|ned by..|
|00001a40| 49 52 20 74 69 6d 65 20 | 28 32 29 29 0a 61 74 20 |IR time |(2)).at |
|00001a50| 77 68 69 63 68 20 74 68 | 65 20 72 75 6c 65 73 20 |which th|e rules |
|00001a60| 66 6f 72 20 63 6f 6d 70 | 75 74 69 6e 67 20 6c 6f |for comp|uting lo|
|00001a70| 63 61 6c 20 74 69 6d 65 | 20 63 68 61 6e 67 65 2e |cal time| change.|
|00001a80| 0a 4e 65 78 74 20 63 6f | 6d 65 0a 2e 42 20 74 7a |.Next co|me..B tz|
|00001a90| 68 5f 74 69 6d 65 63 6e | 74 0a 76 61 6c 75 65 73 |h_timecn|t.values|
|00001aa0| 20 6f 66 20 74 79 70 65 | 0a 2e 42 52 20 22 75 6e | of type|..BR "un|
|00001ab0| 73 69 67 6e 65 64 20 63 | 68 61 72 22 20 3b 0a 65 |signed c|har" ;.e|
|00001ac0| 61 63 68 20 6f 6e 65 20 | 74 65 6c 6c 73 20 77 68 |ach one |tells wh|
|00001ad0| 69 63 68 20 6f 66 20 74 | 68 65 20 64 69 66 66 65 |ich of t|he diffe|
|00001ae0| 72 65 6e 74 20 74 79 70 | 65 73 20 6f 66 20 22 6c |rent typ|es of "l|
|00001af0| 6f 63 61 6c 20 74 69 6d | 65 22 20 64 65 73 63 72 |ocal tim|e" descr|
|00001b00| 69 62 65 64 20 69 6e 20 | 74 68 65 0a 66 69 6c 65 |ibed in |the.file|
|00001b10| 20 69 73 20 61 73 73 6f | 63 69 61 74 65 64 20 77 | is asso|ciated w|
|00001b20| 69 74 68 20 74 68 65 20 | 73 61 6d 65 2d 69 6e 64 |ith the |same-ind|
|00001b30| 65 78 65 64 20 74 72 61 | 6e 73 69 74 69 6f 6e 20 |exed tra|nsition |
|00001b40| 74 69 6d 65 2e 0a 54 68 | 65 73 65 20 76 61 6c 75 |time..Th|ese valu|
|00001b50| 65 73 20 73 65 72 76 65 | 20 61 73 20 69 6e 64 69 |es serve| as indi|
|00001b60| 63 65 73 20 69 6e 74 6f | 20 61 6e 20 61 72 72 61 |ces into| an arra|
|00001b70| 79 20 6f 66 0a 2e 42 20 | 74 74 69 6e 66 6f 0a 73 |y of..B |ttinfo.s|
|00001b80| 74 72 75 63 74 75 72 65 | 73 20 74 68 61 74 20 61 |tructure|s that a|
|00001b90| 70 70 65 61 72 73 20 6e | 65 78 74 20 69 6e 20 74 |ppears n|ext in t|
|00001ba0| 68 65 20 66 69 6c 65 3b | 20 0a 74 68 65 73 65 20 |he file;| .these |
|00001bb0| 73 74 72 75 63 74 75 72 | 65 73 20 61 72 65 20 64 |structur|es are d|
|00001bc0| 65 66 69 6e 65 64 20 61 | 73 20 66 6f 6c 6c 6f 77 |efined a|s follow|
|00001bd0| 73 3a 0a 2e 69 6e 20 2b | 2e 35 69 0a 2e 73 70 0a |s:..in +|.5i..sp.|
|00001be0| 2e 6e 66 0a 2e 74 61 20 | 2e 35 69 20 2b 5c 77 27 |.nf..ta |.5i +\w'|
|00001bf0| 75 6e 73 69 67 6e 65 64 | 20 73 68 6f 72 74 20 20 |unsigned| short |
|00001c00| 27 75 0a 73 74 72 75 63 | 74 20 74 74 69 6e 66 6f |'u.struc|t ttinfo|
|00001c10| 20 7b 09 0a 09 6c 6f 6e | 67 09 74 74 5f 67 6d 74 | {...lon|g.tt_gmt|
|00001c20| 6f 66 66 3b 0a 09 69 6e | 74 09 74 74 5f 69 73 64 |off;..in|t.tt_isd|
|00001c30| 73 74 3b 0a 09 75 6e 73 | 69 67 6e 65 64 20 69 6e |st;..uns|igned in|
|00001c40| 74 09 74 74 5f 61 62 62 | 72 69 6e 64 3b 0a 7d 3b |t.tt_abb|rind;.};|
|00001c50| 0a 2e 69 6e 20 2d 2e 35 | 69 0a 2e 66 69 0a 2e 73 |..in -.5|i..fi..s|
|00001c60| 70 0a 49 6e 20 65 61 63 | 68 20 73 74 72 75 63 74 |p.In eac|h struct|
|00001c70| 75 72 65 2c 0a 2e 42 20 | 74 74 5f 67 6d 74 6f 66 |ure,..B |tt_gmtof|
|00001c80| 66 0a 67 69 76 65 73 20 | 74 68 65 20 6e 75 6d 62 |f.gives |the numb|
|00001c90| 65 72 20 6f 66 20 73 65 | 63 6f 6e 64 73 20 74 6f |er of se|conds to|
|00001ca0| 20 62 65 20 61 64 64 65 | 64 20 74 6f 20 47 4d 54 | be adde|d to GMT|
|00001cb0| 2c 0a 2e 42 0a 74 74 5f | 69 73 64 73 74 0a 74 65 |,..B.tt_|isdst.te|
|00001cc0| 6c 6c 73 20 77 68 65 74 | 68 65 72 0a 2e 42 0a 74 |lls whet|her..B.t|
|00001cd0| 6d 5f 69 73 64 73 74 0a | 73 68 6f 75 6c 64 20 62 |m_isdst.|should b|
|00001ce0| 65 20 73 65 74 20 62 79 | 0a 2e 49 52 20 6e 65 77 |e set by|..IR new|
|00001cf0| 6c 6f 63 61 6c 74 69 6d | 65 20 28 33 29 2c 0a 61 |localtim|e (3),.a|
|00001d00| 6e 64 0a 2e 42 20 74 74 | 5f 61 62 62 72 69 6e 64 |nd..B tt|_abbrind|
|00001d10| 0a 73 65 72 76 65 73 20 | 61 73 20 61 6e 20 69 6e |.serves |as an in|
|00001d20| 64 65 78 20 69 6e 74 6f | 20 74 68 65 20 61 72 72 |dex into| the arr|
|00001d30| 61 79 20 6f 66 20 74 69 | 6d 65 20 7a 6f 6e 65 20 |ay of ti|me zone |
|00001d40| 61 62 62 72 65 76 69 61 | 74 69 6f 6e 20 63 68 61 |abbrevia|tion cha|
|00001d50| 61 72 61 63 74 65 72 73 | 0a 74 68 61 74 20 66 6f |aracters|.that fo|
|00001d60| 6c 6c 6f 77 20 74 68 65 | 0a 2e 42 20 74 74 69 6e |llow the|..B ttin|
|00001d70| 66 6f 0a 73 74 72 75 63 | 74 75 72 65 28 73 29 20 |fo.struc|ture(s) |
|00001d80| 69 6e 20 74 68 65 20 66 | 69 6c 65 2e 0a 2e 50 50 |in the f|ile...PP|
|00001d90| 0a 2e 49 20 4e 65 77 6c | 6f 63 61 6c 74 69 6d 65 |..I Newl|ocaltime|
|00001da0| 0a 75 73 65 73 20 74 68 | 65 20 66 69 72 73 74 0a |.uses th|e first.|
|00001db0| 2e 42 20 74 74 69 6e 66 | 6f 0a 73 74 72 75 63 74 |.B ttinf|o.struct|
|00001dc0| 75 72 65 20 69 6e 20 74 | 68 65 20 66 69 6c 65 0a |ure in t|he file.|
|00001dd0| 69 66 20 65 69 74 68 65 | 72 0a 2e 42 20 74 7a 68 |if eithe|r..B tzh|
|00001de0| 5f 74 69 6d 65 63 6e 74 | 0a 69 73 20 7a 65 72 6f |_timecnt|.is zero|
|00001df0| 20 6f 72 0a 2e 49 52 20 | 6e 65 77 6c 6f 63 61 6c | or..IR |newlocal|
|00001e00| 74 69 6d 65 20 27 73 0a | 61 72 67 75 6d 65 6e 74 |time 's.|argument|
|00001e10| 20 69 73 20 6c 65 73 73 | 20 74 68 61 6e 0a 74 68 | is less| than.th|
|00001e20| 65 20 66 69 72 73 74 20 | 74 72 61 6e 73 69 74 69 |e first |transiti|
|00001e30| 6f 6e 20 74 69 6d 65 20 | 72 65 63 6f 72 64 65 64 |on time |recorded|
|00001e40| 20 69 6e 20 74 68 65 20 | 66 69 6c 65 2e 0a 2e 53 | in the |file...S|
|00001e50| 48 20 53 45 45 20 41 4c | 53 4f 0a 73 65 74 74 7a |H SEE AL|SO.settz|
|00001e60| 28 33 29 0a 2e 2e 20 40 | 28 23 29 74 7a 66 69 6c |(3)... @|(#)tzfil|
|00001e70| 65 2e 35 09 32 2e 31 0a | 53 48 41 52 5f 45 4f 46 |e.5.2.1.|SHAR_EOF|
|00001e80| 0a 69 66 20 74 65 73 74 | 20 32 31 30 30 20 2d 6e |.if test| 2100 -n|
|00001e90| 65 20 22 60 77 63 20 2d | 63 20 3c 20 27 74 7a 66 |e "`wc -|c < 'tzf|
|00001ea0| 69 6c 65 2e 35 27 60 22 | 0a 74 68 65 6e 0a 09 65 |ile.5'`"|.then..e|
|00001eb0| 63 68 6f 20 73 68 61 72 | 3a 20 65 72 72 6f 72 20 |cho shar|: error |
|00001ec0| 74 72 61 6e 73 6d 69 74 | 74 69 6e 67 20 22 27 74 |transmit|ting "'t|
|00001ed0| 7a 66 69 6c 65 2e 35 27 | 22 20 27 28 73 68 6f 75 |zfile.5'|" '(shou|
|00001ee0| 6c 64 20 68 61 76 65 20 | 62 65 65 6e 20 32 31 30 |ld have |been 210|
|00001ef0| 30 20 63 68 61 72 61 63 | 74 65 72 73 29 27 0a 66 |0 charac|ters)'.f|
|00001f00| 69 0a 66 69 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |i.fi.ech|o shar: |
|00001f10| 65 78 74 72 61 63 74 69 | 6e 67 20 22 27 74 7a 63 |extracti|ng "'tzc|
|00001f20| 6f 6d 70 2e 38 27 22 20 | 27 28 35 34 37 39 20 63 |omp.8'" |'(5479 c|
|00001f30| 68 61 72 61 63 74 65 72 | 73 29 27 0a 69 66 20 74 |haracter|s)'.if t|
|00001f40| 65 73 74 20 2d 66 20 27 | 74 7a 63 6f 6d 70 2e 38 |est -f '|tzcomp.8|
|00001f50| 27 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |'.then..|echo sha|
|00001f60| 72 3a 20 77 69 6c 6c 20 | 6e 6f 74 20 6f 76 65 72 |r: will |not over|
|00001f70| 2d 77 72 69 74 65 20 65 | 78 69 73 74 69 6e 67 20 |-write e|xisting |
|00001f80| 66 69 6c 65 20 22 27 74 | 7a 63 6f 6d 70 2e 38 27 |file "'t|zcomp.8'|
|00001f90| 22 0a 65 6c 73 65 0a 63 | 61 74 20 3c 3c 20 5c 53 |".else.c|at << \S|
|00001fa0| 48 41 52 5f 45 4f 46 20 | 3e 20 27 74 7a 63 6f 6d |HAR_EOF |> 'tzcom|
|00001fb0| 70 2e 38 27 0a 2e 54 48 | 20 54 5a 43 4f 4d 50 20 |p.8'..TH| TZCOMP |
|00001fc0| 38 0a 2e 53 48 20 4e 41 | 4d 45 0a 74 7a 63 6f 6d |8..SH NA|ME.tzcom|
|00001fd0| 70 20 5c 2d 20 74 69 6d | 65 20 7a 6f 6e 65 20 63 |p \- tim|e zone c|
|00001fe0| 6f 6d 70 69 6c 65 72 0a | 2e 53 48 20 53 59 4e 4f |ompiler.|.SH SYNO|
|00001ff0| 50 53 49 53 0a 2e 42 20 | 74 7a 63 6f 6d 70 0a 5b |PSIS..B |tzcomp.[|
|00002000| 0a 2e 42 20 5c 2d 64 0a | 64 69 72 65 63 74 6f 72 |..B \-d.|director|
|00002010| 79 20 5d 20 5b 0a 2e 42 | 20 5c 2d 6c 0a 6c 6f 63 |y ] [..B| \-l.loc|
|00002020| 61 6c 74 69 6d 65 20 5d | 20 5b 20 66 69 6c 65 6e |altime ]| [ filen|
|00002030| 61 6d 65 20 2e 2e 2e 20 | 5d 0a 2e 53 48 20 44 45 |ame ... |]..SH DE|
|00002040| 53 43 52 49 50 54 49 4f | 4e 0a 2e 49 20 54 7a 63 |SCRIPTIO|N..I Tzc|
|00002050| 6f 6d 70 0a 72 65 61 64 | 73 20 74 65 78 74 20 66 |omp.read|s text f|
|00002060| 72 6f 6d 20 74 68 65 20 | 66 69 6c 65 28 73 29 20 |rom the |file(s) |
|00002070| 6e 61 6d 65 64 20 6f 6e | 20 74 68 65 20 63 6f 6d |named on| the com|
|00002080| 6d 61 6e 64 20 6c 69 6e | 65 0a 61 6e 64 20 63 72 |mand lin|e.and cr|
|00002090| 65 61 74 65 73 20 74 68 | 65 20 74 69 6d 65 20 63 |eates th|e time c|
|000020a0| 6f 6e 76 65 72 73 69 6f | 6e 20 69 6e 66 6f 72 6d |onversio|n inform|
|000020b0| 61 74 69 6f 6e 20 66 69 | 6c 65 73 20 73 70 65 63 |ation fi|les spec|
|000020c0| 69 66 69 65 64 20 69 6e | 20 74 68 69 73 20 69 6e |ified in| this in|
|000020d0| 70 75 74 2e 0a 49 66 20 | 61 0a 2e 49 20 66 69 6c |put..If |a..I fil|
|000020e0| 65 6e 61 6d 65 0a 69 73 | 0a 2e 42 52 20 60 20 2d |ename.is|..BR ` -|
|000020f0| 20 27 2c 0a 74 68 65 20 | 73 74 61 6e 64 61 72 64 | ',.the |standard|
|00002100| 20 69 6e 70 75 74 20 69 | 73 20 72 65 61 64 2e 0a | input i|s read..|
|00002110| 2e 50 50 0a 54 68 65 73 | 65 20 6f 70 74 69 6f 6e |.PP.Thes|e option|
|00002120| 73 20 61 72 65 20 61 76 | 61 69 6c 61 62 6c 65 3a |s are av|ailable:|
|00002130| 0a 2e 54 50 0a 2e 42 49 | 20 22 5c 2d 64 20 22 20 |..TP..BI| "\-d " |
|00002140| 64 69 72 65 63 74 6f 72 | 79 0a 43 72 65 61 74 65 |director|y.Create|
|00002150| 20 74 69 6d 65 20 63 6f | 6e 76 65 72 73 69 6f 6e | time co|nversion|
|00002160| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 66 69 6c | informa|tion fil|
|00002170| 65 73 20 69 6e 20 74 68 | 65 20 6e 61 6d 65 64 20 |es in th|e named |
|00002180| 64 69 72 65 63 74 6f 72 | 79 20 72 61 74 68 65 72 |director|y rather|
|00002190| 20 74 68 61 6e 0a 69 6e | 20 74 68 65 20 73 74 61 | than.in| the sta|
|000021a0| 6e 64 61 72 64 20 64 69 | 72 65 63 74 6f 72 79 20 |ndard di|rectory |
|000021b0| 6e 61 6d 65 64 20 62 65 | 6c 6f 77 2e 0a 2e 54 50 |named be|low...TP|
|000021c0| 0a 2e 42 49 20 22 5c 2d | 6c 20 22 20 6c 6f 63 61 |..BI "\-|l " loca|
|000021d0| 6c 74 69 6d 65 0a 55 73 | 65 20 74 68 65 20 67 69 |ltime.Us|e the gi|
|000021e0| 76 65 6e 20 74 69 6d 65 | 20 7a 6f 6e 65 20 61 73 |ven time| zone as|
|000021f0| 20 6c 6f 63 61 6c 20 74 | 69 6d 65 2e 0a 2e 50 50 | local t|ime...PP|
|00002200| 0a 49 6e 70 75 74 20 6c | 69 6e 65 73 20 61 72 65 |.Input l|ines are|
|00002210| 20 6d 61 64 65 20 75 70 | 20 6f 66 20 66 69 65 6c | made up| of fiel|
|00002220| 64 73 2e 0a 46 69 65 6c | 64 73 20 61 72 65 20 73 |ds..Fiel|ds are s|
|00002230| 65 70 61 72 61 74 65 64 | 20 66 72 6f 6d 20 6f 6e |eparated| from on|
|00002240| 65 20 61 6e 6f 74 68 65 | 72 20 62 79 20 61 6e 79 |e anothe|r by any|
|00002250| 20 6e 75 6d 62 65 72 20 | 6f 66 20 77 68 69 74 65 | number |of white|
|00002260| 20 73 70 61 63 65 20 63 | 68 61 72 61 63 74 65 72 | space c|haracter|
|00002270| 73 2e 0a 4c 65 61 64 69 | 6e 67 20 61 6e 64 20 74 |s..Leadi|ng and t|
|00002280| 72 61 69 6c 69 6e 67 20 | 77 68 69 74 65 20 73 70 |railing |white sp|
|00002290| 61 63 65 20 6f 6e 20 69 | 6e 70 75 74 20 6c 69 6e |ace on i|nput lin|
|000022a0| 65 73 20 69 73 20 69 67 | 6e 6f 72 65 64 2e 0a 41 |es is ig|nored..A|
|000022b0| 6e 20 75 6e 71 75 6f 74 | 65 64 20 73 68 61 72 70 |n unquot|ed sharp|
|000022c0| 20 63 68 61 72 61 63 74 | 65 72 20 28 23 29 20 69 | charact|er (#) i|
|000022d0| 6e 20 74 68 65 20 69 6e | 70 75 74 20 69 6e 74 72 |n the in|put intr|
|000022e0| 6f 64 75 63 65 73 20 61 | 20 63 6f 6d 6d 65 6e 74 |oduces a| comment|
|000022f0| 20 77 68 69 63 68 20 65 | 78 74 65 6e 64 73 0a 74 | which e|xtends.t|
|00002300| 6f 20 74 68 65 20 65 6e | 64 20 6f 66 20 74 68 65 |o the en|d of the|
|00002310| 20 6c 69 6e 65 20 74 68 | 65 20 73 68 61 72 70 20 | line th|e sharp |
|00002320| 63 68 61 72 61 63 74 65 | 72 20 61 70 70 65 61 72 |characte|r appear|
|00002330| 73 20 6f 6e 2e 0a 57 68 | 69 74 65 20 73 70 61 63 |s on..Wh|ite spac|
|00002340| 65 20 63 68 61 72 61 63 | 74 65 72 73 20 61 6e 64 |e charac|ters and|
|00002350| 20 73 68 61 72 70 20 63 | 68 61 72 61 63 74 65 72 | sharp c|haracter|
|00002360| 73 20 6d 61 79 20 62 65 | 20 65 6e 63 6c 6f 73 65 |s may be| enclose|
|00002370| 64 20 69 6e 20 64 6f 75 | 62 6c 65 20 71 75 6f 74 |d in dou|ble quot|
|00002380| 65 73 0a 28 22 29 20 69 | 66 20 74 68 65 79 27 72 |es.(") i|f they'r|
|00002390| 65 20 74 6f 20 62 65 20 | 75 73 65 64 20 61 73 20 |e to be |used as |
|000023a0| 70 61 72 74 20 6f 66 20 | 61 20 66 69 65 6c 64 2e |part of |a field.|
|000023b0| 0a 41 6e 79 20 6c 69 6e | 65 20 77 68 69 63 68 20 |.Any lin|e which |
|000023c0| 69 73 20 62 6c 61 6e 6b | 20 28 61 66 74 65 72 20 |is blank| (after |
|000023d0| 63 6f 6d 6d 65 6e 74 20 | 73 74 72 69 70 70 69 6e |comment |strippin|
|000023e0| 67 29 20 69 73 20 69 67 | 6e 6f 72 65 64 2e 0a 4e |g) is ig|nored..N|
|000023f0| 6f 6e 2d 62 6c 61 6e 6b | 20 6c 69 6e 65 73 20 61 |on-blank| lines a|
|00002400| 72 65 20 65 78 70 65 63 | 74 65 64 20 74 6f 20 62 |re expec|ted to b|
|00002410| 65 20 6f 66 20 6f 6e 65 | 20 6f 66 20 74 68 72 65 |e of one| of thre|
|00002420| 65 0a 74 79 70 65 73 3a | 20 20 72 75 6c 65 20 6c |e.types:| rule l|
|00002430| 69 6e 65 73 2c 20 7a 6f | 6e 65 20 6c 69 6e 65 73 |ines, zo|ne lines|
|00002440| 2c 20 61 6e 64 20 6c 69 | 6e 6b 20 6c 69 6e 65 73 |, and li|nk lines|
|00002450| 2e 0a 2e 50 50 0a 41 20 | 72 75 6c 65 20 6c 69 6e |...PP.A |rule lin|
|00002460| 65 20 68 61 73 20 74 68 | 65 20 66 6f 72 6d 0a 2e |e has th|e form..|
|00002470| 6e 66 0a 2e 42 0a 2e 74 | 69 20 2b 2e 35 69 0a 2e |nf..B..t|i +.5i..|
|00002480| 74 61 20 5c 77 27 52 75 | 6c 65 20 27 75 20 2b 5c |ta \w'Ru|le 'u +\|
|00002490| 77 27 4d 6f 73 74 4e 41 | 20 27 75 20 2b 5c 77 27 |w'MostNA| 'u +\w'|
|000024a0| 46 52 4f 4d 20 27 75 20 | 2b 5c 77 27 31 39 37 33 |FROM 'u |+\w'1973|
|000024b0| 20 27 75 20 2b 5c 77 27 | 54 59 50 45 20 27 75 20 | 'u +\w'|TYPE 'u |
|000024c0| 2b 5c 77 27 41 70 72 20 | 27 75 20 2b 5c 77 27 6c |+\w'Apr |'u +\w'l|
|000024d0| 61 73 74 53 75 6e 20 27 | 75 20 2b 5c 77 27 32 3a |astSun '|u +\w'2:|
|000024e0| 30 30 20 27 75 20 2b 5c | 77 27 53 41 56 45 20 27 |00 'u +\|w'SAVE '|
|000024f0| 75 0a 2e 73 70 0a 52 75 | 6c 65 09 4e 41 4d 45 09 |u..sp.Ru|le.NAME.|
|00002500| 46 52 4f 4d 09 54 4f 09 | 54 59 50 45 09 49 4e 09 |FROM.TO.|TYPE.IN.|
|00002510| 4f 4e 09 41 54 09 53 41 | 56 45 09 4c 45 54 54 45 |ON.AT.SA|VE.LETTE|
|00002520| 52 2f 53 0a 2e 73 70 0a | 46 6f 72 20 65 78 61 6d |R/S..sp.|For exam|
|00002530| 70 6c 65 3a 0a 2e 74 69 | 20 2b 2e 35 69 0a 2e 73 |ple:..ti| +.5i..s|
|00002540| 70 0a 52 75 6c 65 09 4d | 6f 73 74 4e 41 09 31 39 |p.Rule.M|ostNA.19|
|00002550| 36 39 09 31 39 37 33 09 | 2d 09 41 70 72 09 6c 61 |69.1973.|-.Apr.la|
|00002560| 73 74 53 75 6e 09 32 3a | 30 30 09 31 3a 30 30 09 |stSun.2:|00.1:00.|
|00002570| 44 0a 2e 73 70 0a 2e 66 | 69 0a 54 68 65 20 66 69 |D..sp..f|i.The fi|
|00002580| 65 6c 64 73 20 74 68 61 | 74 20 6d 61 6b 65 20 75 |elds tha|t make u|
|00002590| 70 20 61 20 72 75 6c 65 | 20 6c 69 6e 65 20 61 72 |p a rule| line ar|
|000025a0| 65 3a 0a 2e 54 50 0a 2e | 42 20 4e 41 4d 45 0a 47 |e:..TP..|B NAME.G|
|000025b0| 69 76 65 73 20 74 68 65 | 20 28 61 72 62 69 74 72 |ives the| (arbitr|
|000025c0| 61 72 79 29 20 6e 61 6d | 65 20 6f 66 20 74 68 65 |ary) nam|e of the|
|000025d0| 20 73 65 74 20 6f 66 20 | 72 75 6c 65 73 20 74 68 | set of |rules th|
|000025e0| 69 73 20 72 75 6c 65 20 | 69 73 20 70 61 72 74 20 |is rule |is part |
|000025f0| 6f 66 2e 0a 2e 54 50 0a | 2e 42 20 46 52 4f 4d 0a |of...TP.|.B FROM.|
|00002600| 47 69 76 65 73 20 74 68 | 65 20 66 69 72 73 74 20 |Gives th|e first |
|00002610| 79 65 61 72 20 69 6e 20 | 77 68 69 63 68 20 74 68 |year in |which th|
|00002620| 65 20 72 75 6c 65 20 61 | 70 70 6c 69 65 73 2e 0a |e rule a|pplies..|
|00002630| 2e 54 50 0a 2e 42 20 54 | 4f 0a 47 69 76 65 73 20 |.TP..B T|O.Gives |
|00002640| 74 68 65 20 6c 61 73 74 | 20 79 65 61 72 20 69 6e |the last| year in|
|00002650| 20 77 68 69 63 68 20 74 | 68 65 20 72 75 6c 65 20 | which t|he rule |
|00002660| 61 70 70 6c 69 65 73 2e | 0a 54 68 65 20 77 6f 72 |applies.|.The wor|
|00002670| 64 0a 2e 52 42 20 60 20 | 6f 6e 6c 79 20 27 0a 6d |d..RB ` |only '.m|
|00002680| 61 79 20 62 65 20 75 73 | 65 64 20 74 6f 20 72 65 |ay be us|ed to re|
|00002690| 70 65 61 74 20 74 68 65 | 20 76 61 6c 75 65 20 6f |peat the| value o|
|000026a0| 66 20 74 68 65 0a 2e 42 | 0a 46 52 4f 4d 0a 66 69 |f the..B|.FROM.fi|
|000026b0| 65 6c 64 2e 0a 2e 54 50 | 0a 2e 42 20 54 59 50 45 |eld...TP|..B TYPE|
|000026c0| 0a 47 69 76 65 73 20 74 | 68 65 20 74 79 70 65 20 |.Gives t|he type |
|000026d0| 6f 66 20 79 65 61 72 20 | 69 6e 20 77 68 69 63 68 |of year |in which|
|000026e0| 20 74 68 65 20 79 65 61 | 72 20 61 70 70 6c 69 65 | the yea|r applie|
|000026f0| 73 2e 20 20 49 66 0a 2e | 42 20 54 59 50 45 0a 69 |s. If..|B TYPE.i|
|00002700| 73 0a 2e 42 0a 22 2d 22 | 0a 74 68 65 6e 20 74 68 |s..B."-"|.then th|
|00002710| 65 20 72 75 6c 65 20 61 | 70 70 6c 69 65 73 20 69 |e rule a|pplies i|
|00002720| 6e 20 61 6c 6c 20 79 65 | 61 72 73 20 62 65 74 77 |n all ye|ars betw|
|00002730| 65 65 6e 0a 2e 42 20 46 | 52 4f 4d 0a 61 6e 64 0a |een..B F|ROM.and.|
|00002740| 2e 42 20 54 4f 0a 69 6e | 63 6c 75 73 69 76 65 2e |.B TO.in|clusive.|
|00002750| 0a 49 66 0a 2e 42 20 54 | 59 50 45 0a 69 73 20 73 |.If..B T|YPE.is s|
|00002760| 6f 6d 65 74 68 69 6e 67 | 20 65 6c 73 65 2c 20 74 |omething| else, t|
|00002770| 68 65 6e 20 74 68 65 20 | 63 6f 6d 6d 61 6e 64 0a |hen the |command.|
|00002780| 2e 42 0a 2e 74 69 20 2b | 2e 35 69 0a 79 65 61 72 |.B..ti +|.5i.year|
|00002790| 73 20 66 72 6f 6d 20 74 | 6f 20 74 79 70 65 0a 2e |s from t|o type..|
|000027a0| 62 72 0a 69 73 20 65 78 | 65 63 75 74 65 64 20 77 |br.is ex|ecuted w|
|000027b0| 69 74 68 20 61 72 67 75 | 6d 65 6e 74 73 0a 2e 49 |ith argu|ments..I|
|000027c0| 52 20 66 72 6f 6d 20 2c | 0a 2e 49 52 20 74 6f 20 |R from ,|..IR to |
|000027d0| 2c 0a 61 6e 64 0a 2e 49 | 20 74 79 70 65 0a 74 61 |,.and..I| type.ta|
|000027e0| 6b 65 6e 20 66 72 6f 6d | 20 74 68 65 20 72 75 6c |ken from| the rul|
|000027f0| 65 20 6c 69 6e 65 3b 20 | 74 68 65 20 72 75 6c 65 |e line; |the rule|
|00002800| 20 61 70 70 6c 69 65 73 | 20 6f 6e 6c 79 20 69 6e | applies| only in|
|00002810| 20 74 68 6f 73 65 20 79 | 65 61 72 73 0a 70 72 69 | those y|ears.pri|
|00002820| 6e 74 65 64 20 62 79 20 | 74 68 65 0a 2e 49 20 79 |nted by |the..I y|
|00002830| 65 61 72 73 0a 63 6f 6d | 6d 61 6e 64 2e 0a 0a 54 |ears.com|mand...T|
|00002840| 68 65 20 64 69 73 74 72 | 69 62 75 74 65 64 0a 2e |he distr|ibuted..|
|00002850| 49 20 79 65 61 72 73 0a | 63 6f 6d 6d 61 6e 64 20 |I years.|command |
|00002860| 69 73 20 61 20 73 68 65 | 6c 6c 20 73 63 72 69 70 |is a she|ll scrip|
|00002870| 74 20 74 68 61 74 20 68 | 61 6e 64 6c 65 73 20 79 |t that h|andles y|
|00002880| 65 61 72 20 74 79 70 65 | 73 0a 2e 42 20 75 73 70 |ear type|s..B usp|
|00002890| 72 65 73 0a 28 55 6e 69 | 74 65 64 20 53 74 61 74 |res.(Uni|ted Stat|
|000028a0| 65 73 20 70 72 65 73 69 | 64 65 6e 74 69 61 6c 20 |es presi|dential |
|000028b0| 65 6c 65 63 74 69 6f 6e | 20 79 65 61 72 73 29 0a |election| years).|
|000028c0| 61 6e 64 0a 2e 42 20 6e | 6f 6e 70 72 65 73 0a 28 |and..B n|onpres.(|
|000028d0| 61 6c 6c 20 6f 74 68 65 | 72 20 79 65 61 72 73 29 |all othe|r years)|
|000028e0| 3b 0a 6f 74 68 65 72 20 | 79 65 61 72 20 74 79 70 |;.other |year typ|
|000028f0| 65 73 20 6d 61 79 20 62 | 65 20 61 64 64 65 64 20 |es may b|e added |
|00002900| 62 79 20 63 68 61 6e 67 | 69 6e 67 20 74 68 65 20 |by chang|ing the |
|00002910| 73 63 72 69 70 74 2e 0a | 2e 54 50 0a 2e 42 20 49 |script..|.TP..B I|
|00002920| 4e 0a 4e 61 6d 65 73 20 | 74 68 65 20 6d 6f 6e 74 |N.Names |the mont|
|00002930| 68 20 69 6e 20 77 68 69 | 63 68 20 74 68 65 20 72 |h in whi|ch the r|
|00002940| 75 6c 65 20 74 61 6b 65 | 73 20 65 66 66 65 63 74 |ule take|s effect|
|00002950| 2e 20 20 4d 6f 6e 74 68 | 20 6e 61 6d 65 73 20 6d |. Month| names m|
|00002960| 61 79 20 62 65 0a 61 62 | 62 72 65 76 69 61 74 65 |ay be.ab|breviate|
|00002970| 64 2e 0a 2e 54 50 0a 2e | 42 20 4f 4e 0a 47 69 76 |d...TP..|B ON.Giv|
|00002980| 65 73 20 74 68 65 20 64 | 61 79 20 6f 6e 20 77 68 |es the d|ay on wh|
|00002990| 69 63 68 20 74 68 65 20 | 72 75 6c 65 20 74 61 6b |ich the |rule tak|
|000029a0| 65 73 20 65 66 66 65 63 | 74 2e 0a 52 65 63 6f 67 |es effec|t..Recog|
|000029b0| 6e 69 7a 65 64 20 66 6f | 72 6d 73 20 69 6e 63 6c |nized fo|rms incl|
|000029c0| 75 64 65 3a 0a 2e 6e 66 | 0a 2e 69 6e 20 2b 2e 35 |ude:..nf|..in +.5|
|000029d0| 69 0a 2e 73 70 0a 2e 74 | 61 20 5c 77 27 6c 61 73 |i..sp..t|a \w'las|
|000029e0| 74 53 75 6e 20 20 27 75 | 0a 35 09 74 68 65 20 66 |tSun 'u|.5.the f|
|000029f0| 69 66 74 68 20 6f 66 20 | 74 68 65 20 6d 6f 6e 74 |ifth of |the mont|
|00002a00| 68 0a 6c 61 73 74 53 75 | 6e 09 74 68 65 20 6c 61 |h.lastSu|n.the la|
|00002a10| 73 74 20 53 75 6e 64 61 | 79 20 69 6e 20 74 68 65 |st Sunda|y in the|
|00002a20| 20 6d 6f 6e 74 68 0a 6c | 61 73 74 4d 6f 6e 09 74 | month.l|astMon.t|
|00002a30| 68 65 20 6c 61 73 74 20 | 4d 6f 6e 64 61 79 20 69 |he last |Monday i|
|00002a40| 6e 20 74 68 65 20 6d 6f | 6e 74 68 0a 53 75 6e 3e |n the mo|nth.Sun>|
|00002a50| 3d 38 09 66 69 72 73 74 | 20 53 75 6e 64 61 79 20 |=8.first| Sunday |
|00002a60| 6f 6e 20 6f 72 20 61 66 | 74 65 72 20 74 68 65 20 |on or af|ter the |
|00002a70| 65 69 67 68 74 68 0a 53 | 75 6e 3c 3d 32 35 09 6c |eighth.S|un<=25.l|
|00002a80| 61 73 74 20 53 75 6e 64 | 61 79 20 6f 6e 20 6f 72 |ast Sund|ay on or|
|00002a90| 20 62 65 66 6f 72 65 20 | 74 68 65 20 32 35 74 68 | before |the 25th|
|00002aa0| 0a 2e 66 69 0a 2e 69 6e | 20 2d 2e 35 69 0a 2e 73 |..fi..in| -.5i..s|
|00002ab0| 70 0a 4e 61 6d 65 73 20 | 6f 66 20 64 61 79 73 20 |p.Names |of days |
|00002ac0| 6f 66 20 74 68 65 20 77 | 65 65 6b 20 6d 61 79 20 |of the w|eek may |
|00002ad0| 62 65 20 61 62 62 72 65 | 76 69 61 74 65 64 20 6f |be abbre|viated o|
|00002ae0| 72 20 73 70 65 6c 6c 65 | 64 20 6f 75 74 20 69 6e |r spelle|d out in|
|00002af0| 20 66 75 6c 6c 2e 0a 4e | 6f 74 65 20 74 68 61 74 | full..N|ote that|
|00002b00| 20 74 68 65 72 65 20 6d | 75 73 74 20 62 65 20 6e | there m|ust be n|
|00002b10| 6f 20 73 70 61 63 65 73 | 20 77 69 74 68 69 6e 20 |o spaces| within |
|00002b20| 74 68 65 0a 2e 42 20 4f | 4e 0a 66 69 65 6c 64 2e |the..B O|N.field.|
|00002b30| 0a 2e 54 50 0a 2e 42 20 | 41 54 0a 47 69 76 65 73 |..TP..B |AT.Gives|
|00002b40| 20 74 68 65 20 74 69 6d | 65 20 6f 66 20 64 61 79 | the tim|e of day|
|00002b50| 20 61 74 20 77 68 69 63 | 68 20 74 68 65 20 72 75 | at whic|h the ru|
|00002b60| 6c 65 20 74 61 6b 65 73 | 20 61 66 66 65 63 74 2e |le takes| affect.|
|00002b70| 0a 52 65 63 6f 67 6e 69 | 7a 65 64 20 66 6f 72 6d |.Recogni|zed form|
|00002b80| 73 20 69 6e 63 6c 75 64 | 65 3a 0a 2e 6e 66 0a 2e |s includ|e:..nf..|
|00002b90| 69 6e 20 2b 2e 35 69 0a | 2e 73 70 0a 2e 74 61 20 |in +.5i.|.sp..ta |
|00002ba0| 5c 77 27 31 3a 32 38 3a | 31 33 20 20 27 75 0a 32 |\w'1:28:|13 'u.2|
|00002bb0| 09 74 69 6d 65 20 69 6e | 20 68 6f 75 72 73 0a 32 |.time in| hours.2|
|00002bc0| 3a 30 30 09 74 69 6d 65 | 20 69 6e 20 68 6f 75 72 |:00.time| in hour|
|00002bd0| 73 20 61 6e 64 20 6d 69 | 6e 75 74 65 73 0a 31 35 |s and mi|nutes.15|
|00002be0| 3a 30 30 09 32 34 2d 68 | 6f 75 72 20 66 6f 72 6d |:00.24-h|our form|
|00002bf0| 61 74 20 74 69 6d 65 20 | 28 66 6f 72 20 74 69 6d |at time |(for tim|
|00002c00| 65 73 20 61 66 74 65 72 | 20 6e 6f 6f 6e 29 0a 31 |es after| noon).1|
|00002c10| 3a 32 38 3a 31 34 09 74 | 69 6d 65 20 69 6e 20 68 |:28:14.t|ime in h|
|00002c20| 6f 75 72 73 2c 20 6d 69 | 6e 75 74 65 73 2c 20 61 |ours, mi|nutes, a|
|00002c30| 6e 64 20 73 65 63 6f 6e | 64 73 0a 2e 66 69 0a 2e |nd secon|ds..fi..|
|00002c40| 69 6e 20 2d 2e 35 69 0a | 2e 73 70 0a 41 6e 79 20 |in -.5i.|.sp.Any |
|00002c50| 6f 66 20 74 68 65 73 65 | 20 66 6f 72 6d 73 20 6d |of these| forms m|
|00002c60| 61 79 20 62 65 20 66 6f | 6c 6c 6f 77 65 64 20 62 |ay be fo|llowed b|
|00002c70| 79 20 74 68 65 20 6c 65 | 74 74 65 72 20 27 77 27 |y the le|tter 'w'|
|00002c80| 20 69 66 20 74 68 65 20 | 67 69 76 65 6e 20 74 69 | if the |given ti|
|00002c90| 6d 65 20 69 73 0a 6c 6f | 63 61 6c 20 22 77 61 6c |me is.lo|cal "wal|
|00002ca0| 6c 20 63 6c 6f 63 6b 22 | 20 74 69 6d 65 20 6f 72 |l clock"| time or|
|00002cb0| 20 27 73 27 20 69 66 20 | 74 68 65 20 67 69 76 65 | 's' if |the give|
|00002cc0| 6e 20 74 69 6d 65 20 69 | 73 20 6c 6f 63 61 6c 20 |n time i|s local |
|00002cd0| 22 73 74 61 6e 64 61 72 | 64 22 20 74 69 6d 65 3b |"standar|d" time;|
|00002ce0| 0a 69 6e 20 74 68 65 20 | 61 62 73 65 6e 63 65 20 |.in the |absence |
|00002cf0| 6f 66 20 27 77 27 20 6f | 72 20 27 73 27 2c 20 77 |of 'w' o|r 's', w|
|00002d00| 61 6c 6c 20 63 6c 6f 63 | 6b 20 74 69 6d 65 20 69 |all cloc|k time i|
|00002d10| 73 20 61 73 73 75 6d 65 | 64 2e 0a 2e 54 50 0a 2e |s assume|d...TP..|
|00002d20| 42 20 53 41 56 45 0a 47 | 69 76 65 73 20 74 68 65 |B SAVE.G|ives the|
|00002d30| 20 61 6d 6f 75 6e 74 20 | 6f 66 20 74 69 6d 65 20 | amount |of time |
|00002d40| 74 6f 20 62 65 20 61 64 | 64 65 64 20 74 6f 20 6c |to be ad|ded to l|
|00002d50| 6f 63 61 6c 20 73 74 61 | 6e 64 61 72 64 20 74 69 |ocal sta|ndard ti|
|00002d60| 6d 65 20 77 68 65 6e 20 | 74 68 65 20 72 75 6c 65 |me when |the rule|
|00002d70| 20 69 73 20 69 6e 0a 65 | 66 66 65 63 74 20 28 61 | is in.e|ffect (a|
|00002d80| 6c 74 68 6f 75 67 68 2c | 20 6f 66 20 63 6f 75 72 |lthough,| of cour|
|00002d90| 73 65 2c 20 74 68 65 20 | 27 77 27 20 61 6e 64 20 |se, the |'w' and |
|00002da0| 27 73 27 20 73 75 66 66 | 69 78 65 73 20 61 72 65 |'s' suff|ixes are|
|00002db0| 20 6e 6f 74 20 75 73 65 | 64 29 2e 0a 54 68 69 73 | not use|d)..This|
|00002dc0| 20 66 69 65 6c 64 20 68 | 61 73 20 74 68 65 20 73 | field h|as the s|
|00002dd0| 61 6d 65 20 66 6f 72 6d | 61 74 20 61 73 20 74 68 |ame form|at as th|
|00002de0| 65 0a 2e 42 20 41 54 0a | 66 69 65 6c 64 2e 0a 2e |e..B AT.|field...|
|00002df0| 54 50 0a 2e 42 20 4c 45 | 54 54 45 52 2f 53 0a 47 |TP..B LE|TTER/S.G|
|00002e00| 69 76 65 73 20 74 68 65 | 20 22 76 61 72 69 61 62 |ives the| "variab|
|00002e10| 6c 65 20 70 61 72 74 22 | 20 28 66 6f 72 20 65 78 |le part"| (for ex|
|00002e20| 61 6d 70 6c 65 2c 20 74 | 68 65 20 27 53 27 20 6f |ample, t|he 'S' o|
|00002e30| 72 20 27 44 27 20 69 6e | 20 22 45 53 54 22 20 6f |r 'D' in| "EST" o|
|00002e40| 72 20 22 45 44 54 22 29 | 0a 6f 66 20 74 69 6d 65 |r "EDT")|.of time|
|00002e50| 20 7a 6f 6e 65 20 61 62 | 62 72 65 76 69 61 74 69 | zone ab|breviati|
|00002e60| 6f 6e 73 20 74 6f 20 62 | 65 20 75 73 65 64 20 77 |ons to b|e used w|
|00002e70| 68 65 6e 20 74 68 69 73 | 20 72 75 6c 65 20 69 73 |hen this| rule is|
|00002e80| 20 69 6e 20 65 66 66 65 | 63 74 2e 0a 49 66 20 74 | in effe|ct..If t|
|00002e90| 68 69 73 20 66 69 65 6c | 64 20 69 73 0a 2e 42 0a |his fiel|d is..B.|
|00002ea0| 22 2d 22 2c 0a 74 68 65 | 20 76 61 72 69 61 62 6c |"-",.the| variabl|
|00002eb0| 65 20 70 61 72 74 20 69 | 73 20 6e 75 6c 6c 2e 0a |e part i|s null..|
|00002ec0| 2e 50 50 0a 41 20 7a 6f | 6e 65 20 6c 69 6e 65 20 |.PP.A zo|ne line |
|00002ed0| 68 61 73 20 74 68 65 20 | 66 6f 72 6d 0a 2e 73 70 |has the |form..sp|
|00002ee0| 0a 2e 6e 66 0a 2e 74 69 | 20 2b 2e 35 69 0a 2e 74 |..nf..ti| +.5i..t|
|00002ef0| 61 20 5c 77 27 5a 6f 6e | 65 20 27 75 20 2b 5c 77 |a \w'Zon|e 'u +\w|
|00002f00| 27 45 61 73 74 65 72 6e | 20 27 75 20 2b 5c 77 27 |'Eastern| 'u +\w'|
|00002f10| 47 4d 54 4f 46 46 20 27 | 75 20 2b 5c 77 27 4d 6f |GMTOFF '|u +\w'Mo|
|00002f20| 73 74 4e 41 20 27 75 0a | 5a 6f 6e 65 09 4e 41 4d |stNA 'u.|Zone.NAM|
|00002f30| 45 09 47 4d 54 4f 46 46 | 09 52 55 4c 45 53 09 46 |E.GMTOFF|.RULES.F|
|00002f40| 4f 52 4d 41 54 0a 2e 73 | 70 0a 46 6f 72 20 65 78 |ORMAT..s|p.For ex|
|00002f50| 61 6d 70 6c 65 3a 0a 2e | 73 70 0a 2e 74 69 20 2b |ample:..|sp..ti +|
|00002f60| 2e 35 69 0a 5a 6f 6e 65 | 09 45 61 73 74 65 72 6e |.5i.Zone|.Eastern|
|00002f70| 09 2d 35 3a 30 30 09 4d | 6f 73 74 4e 41 09 45 25 |.-5:00.M|ostNA.E%|
|00002f80| 73 54 0a 2e 73 70 0a 2e | 66 69 0a 54 68 65 20 66 |sT..sp..|fi.The f|
|00002f90| 69 65 6c 64 73 20 74 68 | 61 74 20 6d 61 6b 65 20 |ields th|at make |
|00002fa0| 75 70 20 61 20 7a 6f 6e | 65 20 6c 69 6e 65 20 61 |up a zon|e line a|
|00002fb0| 72 65 3a 0a 2e 54 50 0a | 2e 42 20 4e 41 4d 45 0a |re:..TP.|.B NAME.|
|00002fc0| 54 68 65 20 6e 61 6d 65 | 20 6f 66 20 74 68 65 20 |The name| of the |
|00002fd0| 74 69 6d 65 20 7a 6f 6e | 65 2e 0a 54 68 69 73 20 |time zon|e..This |
|00002fe0| 69 73 20 74 68 65 20 6e | 61 6d 65 20 75 73 65 64 |is the n|ame used|
|00002ff0| 20 69 6e 20 63 72 65 61 | 74 69 6e 67 20 74 68 65 | in crea|ting the|
|00003000| 20 74 69 6d 65 20 63 6f | 6e 76 65 72 73 69 6f 6e | time co|nversion|
|00003010| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 66 69 6c | informa|tion fil|
|00003020| 65 20 66 6f 72 20 74 68 | 65 0a 7a 6f 6e 65 2e 0a |e for th|e.zone..|
|00003030| 2e 54 50 0a 2e 42 20 47 | 4d 54 4f 46 46 0a 54 68 |.TP..B G|MTOFF.Th|
|00003040| 65 20 61 6d 6f 75 6e 74 | 20 6f 66 20 74 69 6d 65 |e amount| of time|
|00003050| 20 74 6f 20 61 64 64 20 | 74 6f 20 47 4d 54 20 74 | to add |to GMT t|
|00003060| 6f 20 67 65 74 20 73 74 | 61 6e 64 61 72 64 20 74 |o get st|andard t|
|00003070| 69 6d 65 20 69 6e 20 74 | 68 69 73 20 7a 6f 6e 65 |ime in t|his zone|
|00003080| 2e 0a 54 68 69 73 20 66 | 69 65 6c 64 20 68 61 73 |..This f|ield has|
|00003090| 20 74 68 65 20 73 61 6d | 65 20 66 6f 72 6d 61 74 | the sam|e format|
|000030a0| 20 61 73 20 74 68 65 0a | 2e 42 20 41 54 0a 61 6e | as the.|.B AT.an|
|000030b0| 64 0a 2e 42 20 53 41 56 | 45 0a 66 69 65 6c 64 73 |d..B SAV|E.fields|
|000030c0| 20 6f 66 20 72 75 6c 65 | 20 6c 69 6e 65 73 3b 0a | of rule| lines;.|
|000030d0| 62 65 67 69 6e 20 74 68 | 65 20 66 69 65 6c 64 20 |begin th|e field |
|000030e0| 77 69 74 68 20 61 20 6d | 69 6e 75 73 20 73 69 67 |with a m|inus sig|
|000030f0| 6e 20 69 66 20 74 69 6d | 65 20 6d 75 73 74 20 62 |n if tim|e must b|
|00003100| 65 20 73 75 62 74 72 61 | 63 74 65 64 20 66 72 6f |e subtra|cted fro|
|00003110| 6d 20 47 4d 54 2e 0a 2e | 54 50 0a 2e 42 20 52 55 |m GMT...|TP..B RU|
|00003120| 4c 45 53 0a 54 68 65 20 | 6e 61 6d 65 20 6f 66 20 |LES.The |name of |
|00003130| 74 68 65 20 72 75 6c 65 | 28 73 29 20 74 68 61 74 |the rule|(s) that|
|00003140| 20 61 70 70 6c 79 20 69 | 6e 20 74 68 65 20 74 69 | apply i|n the ti|
|00003150| 6d 65 20 7a 6f 6e 65 2e | 0a 49 66 20 74 68 69 73 |me zone.|.If this|
|00003160| 20 66 69 65 6c 64 20 69 | 73 0a 2e 42 0a 22 2d 22 | field i|s..B."-"|
|00003170| 0a 74 68 65 6e 20 73 74 | 61 6e 64 61 72 64 20 74 |.then st|andard t|
|00003180| 69 6d 65 20 61 6c 77 61 | 79 73 20 61 70 70 6c 69 |ime alwa|ys appli|
|00003190| 65 73 20 69 6e 20 74 68 | 65 20 74 69 6d 65 20 7a |es in th|e time z|
|000031a0| 6f 6e 65 2e 0a 2e 54 50 | 0a 2e 42 20 46 4f 52 4d |one...TP|..B FORM|
|000031b0| 41 54 0a 54 68 65 20 66 | 6f 72 6d 61 74 20 66 6f |AT.The f|ormat fo|
|000031c0| 72 20 74 69 6d 65 20 7a | 6f 6e 65 20 61 62 62 72 |r time z|one abbr|
|000031d0| 65 76 69 61 74 69 6f 6e | 73 20 69 6e 20 74 68 69 |eviation|s in thi|
|000031e0| 73 20 74 69 6d 65 20 7a | 6f 6e 65 2e 0a 54 68 65 |s time z|one..The|
|000031f0| 20 70 61 69 72 20 6f 66 | 20 63 68 61 72 61 63 74 | pair of| charact|
|00003200| 65 72 73 0a 2e 42 0a 22 | 25 73 22 0a 69 73 20 75 |ers..B."|%s".is u|
|00003210| 73 65 64 20 74 6f 20 73 | 68 6f 77 20 77 68 65 72 |sed to s|how wher|
|00003220| 65 20 74 68 65 20 22 76 | 61 72 69 61 62 6c 65 20 |e the "v|ariable |
|00003230| 70 61 72 74 22 20 6f 66 | 20 74 68 65 20 74 69 6d |part" of| the tim|
|00003240| 65 20 7a 6f 6e 65 20 61 | 62 62 72 65 76 69 61 74 |e zone a|bbreviat|
|00003250| 69 6f 6e 20 67 6f 65 73 | 2e 0a 2e 50 50 0a 41 20 |ion goes|...PP.A |
|00003260| 6c 69 6e 6b 20 6c 69 6e | 65 20 68 61 73 20 74 68 |link lin|e has th|
|00003270| 65 20 66 6f 72 6d 0a 2e | 73 70 0a 2e 6e 66 0a 2e |e form..|sp..nf..|
|00003280| 74 69 20 2b 2e 35 69 0a | 2e 74 61 20 5c 77 27 4c |ti +.5i.|.ta \w'L|
|00003290| 69 6e 6b 20 27 75 20 2b | 5c 77 27 4c 49 4e 4b 2d |ink 'u +|\w'LINK-|
|000032a0| 46 52 4f 4d 20 27 75 0a | 4c 69 6e 6b 09 4c 49 4e |FROM 'u.|Link.LIN|
|000032b0| 4b 2d 46 52 4f 4d 09 4c | 49 4e 4b 2d 54 4f 0a 2e |K-FROM.L|INK-TO..|
|000032c0| 73 70 0a 46 6f 72 20 65 | 78 61 6d 70 6c 65 3a 0a |sp.For e|xample:.|
|000032d0| 2e 73 70 0a 2e 74 69 20 | 2b 2e 35 69 0a 4c 69 6e |.sp..ti |+.5i.Lin|
|000032e0| 6b 09 45 61 73 74 65 72 | 6e 09 09 45 53 54 35 45 |k.Easter|n..EST5E|
|000032f0| 44 54 0a 2e 73 70 0a 2e | 66 69 0a 54 68 65 0a 2e |DT..sp..|fi.The..|
|00003300| 42 20 4c 49 4e 4b 2d 46 | 52 4f 4d 0a 66 69 65 6c |B LINK-F|ROM.fiel|
|00003310| 64 20 73 68 6f 75 6c 64 | 20 61 70 70 65 61 72 20 |d should| appear |
|00003320| 61 73 20 74 68 65 0a 2e | 42 20 4e 41 4d 45 0a 66 |as the..|B NAME.f|
|00003330| 69 65 6c 64 20 69 6e 20 | 73 6f 6d 65 20 7a 6f 6e |ield in |some zon|
|00003340| 65 20 6c 69 6e 65 3b 0a | 74 68 65 0a 2e 42 20 4c |e line;.|the..B L|
|00003350| 49 4e 4b 2d 54 4f 0a 66 | 69 65 6c 64 20 69 73 20 |INK-TO.f|ield is |
|00003360| 75 73 65 64 20 61 73 20 | 61 6e 20 61 6c 74 65 72 |used as |an alter|
|00003370| 6e 61 74 65 20 6e 61 6d | 65 20 66 6f 72 20 74 68 |nate nam|e for th|
|00003380| 61 74 20 7a 6f 6e 65 2e | 0a 2e 50 50 0a 4c 69 6e |at zone.|..PP.Lin|
|00003390| 65 73 20 6d 61 79 20 61 | 70 70 65 61 72 20 69 6e |es may a|ppear in|
|000033a0| 20 61 6e 79 20 6f 72 64 | 65 72 20 69 6e 20 74 68 | any ord|er in th|
|000033b0| 65 20 69 6e 70 75 74 2e | 0a 2e 53 48 20 4e 4f 54 |e input.|..SH NOT|
|000033c0| 45 0a 46 6f 72 20 61 72 | 65 61 73 20 77 69 74 68 |E.For ar|eas with|
|000033d0| 20 6d 6f 72 65 20 74 68 | 61 6e 20 74 77 6f 20 74 | more th|an two t|
|000033e0| 79 70 65 73 20 6f 66 20 | 6c 6f 63 61 6c 20 74 69 |ypes of |local ti|
|000033f0| 6d 65 2c 0a 79 6f 75 20 | 6d 61 79 20 67 65 74 20 |me,.you |may get |
|00003400| 74 6f 20 75 73 65 20 6c | 6f 63 61 6c 20 73 74 61 |to use l|ocal sta|
|00003410| 6e 64 61 72 64 20 74 69 | 6d 65 20 69 6e 20 22 41 |ndard ti|me in "A|
|00003420| 54 22 20 66 69 65 6c 64 | 20 6f 66 20 74 68 65 20 |T" field| of the |
|00003430| 65 61 72 6c 69 65 73 74 | 0a 74 72 61 6e 73 69 74 |earliest|.transit|
|00003440| 69 6f 6e 20 74 69 6d 65 | 27 73 20 72 75 6c 65 20 |ion time|'s rule |
|00003450| 74 6f 20 65 6e 73 75 72 | 65 20 74 68 61 74 0a 74 |to ensur|e that.t|
|00003460| 68 65 20 65 61 72 6c 69 | 65 73 74 20 74 72 61 6e |he earli|est tran|
|00003470| 73 69 74 69 6f 6e 20 74 | 69 6d 65 20 72 65 63 6f |sition t|ime reco|
|00003480| 72 64 65 64 20 69 6e 20 | 74 68 65 20 63 6f 6d 70 |rded in |the comp|
|00003490| 69 6c 65 64 20 66 69 6c | 65 20 69 73 20 63 6f 72 |iled fil|e is cor|
|000034a0| 72 65 63 74 2e 0a 2e 53 | 48 20 46 49 4c 45 53 0a |rect...S|H FILES.|
|000034b0| 2f 65 74 63 2f 74 7a 64 | 69 72 09 73 74 61 6e 64 |/etc/tzd|ir.stand|
|000034c0| 61 72 64 20 64 69 72 65 | 63 74 6f 72 79 20 75 73 |ard dire|ctory us|
|000034d0| 65 64 20 66 6f 72 20 63 | 72 65 61 74 65 64 20 66 |ed for c|reated f|
|000034e0| 69 6c 65 73 0a 2e 53 48 | 20 22 53 45 45 20 41 4c |iles..SH| "SEE AL|
|000034f0| 53 4f 22 0a 73 65 74 74 | 7a 28 33 29 2c 20 74 7a |SO".sett|z(3), tz|
|00003500| 66 69 6c 65 28 35 29 0a | 2e 2e 20 40 28 23 29 74 |file(5).|.. @(#)t|
|00003510| 7a 63 6f 6d 70 2e 38 09 | 32 2e 31 0a 53 48 41 52 |zcomp.8.|2.1.SHAR|
|00003520| 5f 45 4f 46 0a 69 66 20 | 74 65 73 74 20 35 34 37 |_EOF.if |test 547|
|00003530| 39 20 2d 6e 65 20 22 60 | 77 63 20 2d 63 20 3c 20 |9 -ne "`|wc -c < |
|00003540| 27 74 7a 63 6f 6d 70 2e | 38 27 60 22 0a 74 68 65 |'tzcomp.|8'`".the|
|00003550| 6e 0a 09 65 63 68 6f 20 | 73 68 61 72 3a 20 65 72 |n..echo |shar: er|
|00003560| 72 6f 72 20 74 72 61 6e | 73 6d 69 74 74 69 6e 67 |ror tran|smitting|
|00003570| 20 22 27 74 7a 63 6f 6d | 70 2e 38 27 22 20 27 28 | "'tzcom|p.8'" '(|
|00003580| 73 68 6f 75 6c 64 20 68 | 61 76 65 20 62 65 65 6e |should h|ave been|
|00003590| 20 35 34 37 39 20 63 68 | 61 72 61 63 74 65 72 73 | 5479 ch|aracters|
|000035a0| 29 27 0a 66 69 0a 66 69 | 0a 65 63 68 6f 20 73 68 |)'.fi.fi|.echo sh|
|000035b0| 61 72 3a 20 65 78 74 72 | 61 63 74 69 6e 67 20 22 |ar: extr|acting "|
|000035c0| 27 74 7a 66 69 6c 65 2e | 68 27 22 20 27 28 31 34 |'tzfile.|h'" '(14|
|000035d0| 30 39 20 63 68 61 72 61 | 63 74 65 72 73 29 27 0a |09 chara|cters)'.|
|000035e0| 69 66 20 74 65 73 74 20 | 2d 66 20 27 74 7a 66 69 |if test |-f 'tzfi|
|000035f0| 6c 65 2e 68 27 0a 74 68 | 65 6e 0a 09 65 63 68 6f |le.h'.th|en..echo|
|00003600| 20 73 68 61 72 3a 20 77 | 69 6c 6c 20 6e 6f 74 20 | shar: w|ill not |
|00003610| 6f 76 65 72 2d 77 72 69 | 74 65 20 65 78 69 73 74 |over-wri|te exist|
|00003620| 69 6e 67 20 66 69 6c 65 | 20 22 27 74 7a 66 69 6c |ing file| "'tzfil|
|00003630| 65 2e 68 27 22 0a 65 6c | 73 65 0a 63 61 74 20 3c |e.h'".el|se.cat <|
|00003640| 3c 20 5c 53 48 41 52 5f | 45 4f 46 20 3e 20 27 74 |< \SHAR_|EOF > 't|
|00003650| 7a 66 69 6c 65 2e 68 27 | 0a 2f 2a 20 40 28 23 29 |zfile.h'|./* @(#)|
|00003660| 74 7a 66 69 6c 65 2e 68 | 09 32 2e 31 20 2a 2f 0a |tzfile.h|.2.1 */.|
|00003670| 0a 2f 2a 0a 2a 2a 20 49 | 6e 66 6f 72 6d 61 74 69 |./*.** I|nformati|
|00003680| 6f 6e 20 61 62 6f 75 74 | 20 74 69 6d 65 20 7a 6f |on about| time zo|
|00003690| 6e 65 20 66 69 6c 65 73 | 2e 0a 2a 2f 0a 0a 23 69 |ne files|..*/..#i|
|000036a0| 66 6e 64 65 66 20 54 5a | 44 49 52 0a 23 64 65 66 |fndef TZ|DIR.#def|
|000036b0| 69 6e 65 20 54 5a 44 49 | 52 09 09 22 2f 65 74 63 |ine TZDI|R.."/etc|
|000036c0| 2f 74 7a 64 69 72 22 09 | 2f 2a 20 54 69 6d 65 20 |/tzdir".|/* Time |
|000036d0| 7a 6f 6e 65 20 6f 62 6a | 65 63 74 20 66 69 6c 65 |zone obj|ect file|
|000036e0| 20 64 69 72 65 63 74 6f | 72 79 20 2a 2f 0a 23 65 | directo|ry */.#e|
|000036f0| 6e 64 69 66 0a 0a 23 69 | 66 6e 64 65 66 20 54 5a |ndif..#i|fndef TZ|
|00003700| 44 45 46 41 55 4c 54 0a | 23 64 65 66 69 6e 65 20 |DEFAULT.|#define |
|00003710| 54 5a 44 45 46 41 55 4c | 54 09 22 6c 6f 63 61 6c |TZDEFAUL|T."local|
|00003720| 74 69 6d 65 22 0a 23 65 | 6e 64 69 66 0a 0a 73 74 |time".#e|ndif..st|
|00003730| 72 75 63 74 20 74 74 69 | 6e 66 6f 20 7b 09 09 09 |ruct tti|nfo {...|
|00003740| 09 2f 2a 20 74 69 6d 65 | 20 74 79 70 65 20 69 6e |./* time| type in|
|00003750| 66 6f 72 6d 61 74 69 6f | 6e 20 2a 2f 0a 09 6c 6f |formatio|n */..lo|
|00003760| 6e 67 09 09 74 74 5f 67 | 6d 74 6f 66 66 3b 09 2f |ng..tt_g|mtoff;./|
|00003770| 2a 20 47 4d 54 20 6f 66 | 66 73 65 74 20 69 6e 20 |* GMT of|fset in |
|00003780| 73 65 63 6f 6e 64 73 20 | 2a 2f 0a 09 69 6e 74 09 |seconds |*/..int.|
|00003790| 09 74 74 5f 69 73 64 73 | 74 3b 09 2f 2a 20 75 73 |.tt_isds|t;./* us|
|000037a0| 65 64 20 74 6f 20 73 65 | 74 20 74 6d 5f 69 73 64 |ed to se|t tm_isd|
|000037b0| 73 74 20 2a 2f 0a 09 75 | 6e 73 69 67 6e 65 64 20 |st */..u|nsigned |
|000037c0| 69 6e 74 09 74 74 5f 61 | 62 62 72 69 6e 64 3b 09 |int.tt_a|bbrind;.|
|000037d0| 2f 2a 20 61 62 62 72 65 | 76 69 61 74 69 6f 6e 20 |/* abbre|viation |
|000037e0| 6c 69 73 74 20 69 6e 64 | 65 78 20 2a 2f 0a 7d 3b |list ind|ex */.};|
|000037f0| 0a 0a 2f 2a 0a 2a 2a 20 | 45 61 63 68 20 66 69 6c |../*.** |Each fil|
|00003800| 65 20 62 65 67 69 6e 73 | 20 77 69 74 68 2e 20 2e |e begins| with. .|
|00003810| 20 2e 0a 2a 2f 0a 0a 73 | 74 72 75 63 74 20 74 7a | ..*/..s|truct tz|
|00003820| 68 65 61 64 20 7b 0a 09 | 63 68 61 72 09 09 74 7a |head {..|char..tz|
|00003830| 68 5f 72 65 73 65 72 76 | 65 64 5b 31 34 5d 3b 09 |h_reserv|ed[14];.|
|00003840| 2f 2a 20 72 65 73 65 72 | 76 65 64 20 66 6f 72 20 |/* reser|ved for |
|00003850| 66 75 74 75 72 65 20 75 | 73 65 20 2a 2f 0a 09 75 |future u|se */..u|
|00003860| 6e 73 69 67 6e 65 64 20 | 73 68 6f 72 74 09 74 7a |nsigned |short.tz|
|00003870| 68 5f 74 69 6d 65 63 6e | 74 3b 09 09 2f 2a 20 6e |h_timecn|t;../* n|
|00003880| 75 6d 62 65 72 20 6f 66 | 20 74 72 61 6e 73 69 74 |umber of| transit|
|00003890| 69 6f 6e 20 74 69 6d 65 | 73 20 2a 2f 0a 09 75 6e |ion time|s */..un|
|000038a0| 73 69 67 6e 65 64 20 73 | 68 6f 72 74 09 74 7a 68 |signed s|hort.tzh|
|000038b0| 5f 74 79 70 65 63 6e 74 | 3b 09 09 2f 2a 20 6e 75 |_typecnt|;../* nu|
|000038c0| 6d 62 65 72 20 6f 66 20 | 6c 6f 63 61 6c 20 74 69 |mber of |local ti|
|000038d0| 6d 65 20 74 79 70 65 73 | 20 2a 2f 0a 09 75 6e 73 |me types| */..uns|
|000038e0| 69 67 6e 65 64 20 73 68 | 6f 72 74 09 74 7a 68 5f |igned sh|ort.tzh_|
|000038f0| 63 68 61 72 63 6e 74 3b | 09 09 2f 2a 20 6e 75 6d |charcnt;|../* num|
|00003900| 62 65 72 20 6f 66 20 61 | 62 62 72 2e 20 63 68 61 |ber of a|bbr. cha|
|00003910| 72 73 20 2a 2f 0a 7d 3b | 0a 0a 2f 2a 0a 2a 2a 20 |rs */.};|../*.** |
|00003920| 2e 20 2e 20 2e 66 6f 6c | 6c 6f 77 65 64 20 62 79 |. . .fol|lowed by|
|00003930| 2e 20 2e 20 2e 0a 2a 2a | 0a 2a 2a 09 74 7a 68 5f |. . ..**|.**.tzh_|
|00003940| 74 69 6d 65 63 6e 74 20 | 28 6c 6f 6e 67 29 73 09 |timecnt |(long)s.|
|00003950| 09 74 72 61 6e 73 69 74 | 69 6f 6e 20 74 69 6d 65 |.transit|ion time|
|00003960| 73 20 61 73 20 72 65 74 | 75 72 6e 65 64 20 62 79 |s as ret|urned by|
|00003970| 20 74 69 6d 65 28 32 29 | 0a 2a 2a 09 74 7a 68 5f | time(2)|.**.tzh_|
|00003980| 74 69 6d 65 63 6e 74 20 | 28 75 6e 73 69 67 6e 65 |timecnt |(unsigne|
|00003990| 64 20 63 68 61 72 29 73 | 09 74 79 70 65 73 20 6f |d char)s|.types o|
|000039a0| 66 20 6c 6f 63 61 6c 20 | 74 69 6d 65 20 73 74 61 |f local |time sta|
|000039b0| 72 74 69 6e 67 20 61 74 | 20 61 62 6f 76 65 0a 2a |rting at| above.*|
|000039c0| 2a 09 74 7a 68 5f 74 79 | 70 65 63 6e 74 20 28 73 |*.tzh_ty|pecnt (s|
|000039d0| 74 72 75 63 74 20 74 74 | 69 6e 66 6f 29 73 09 69 |truct tt|info)s.i|
|000039e0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 66 6f 72 20 65 |nformati|on for e|
|000039f0| 61 63 68 20 74 69 6d 65 | 20 74 79 70 65 0a 2a 2a |ach time| type.**|
|00003a00| 09 74 7a 68 5f 63 68 61 | 72 63 6e 74 20 28 63 68 |.tzh_cha|rcnt (ch|
|00003a10| 61 72 29 73 09 09 27 5c | 30 27 2d 74 65 72 6d 69 |ar)s..'\|0'-termi|
|00003a20| 6e 61 74 65 64 20 7a 6f | 6e 65 20 61 62 62 72 65 |nated zo|ne abbre|
|00003a30| 76 69 61 74 6f 6e 20 73 | 74 72 69 6e 67 73 0a 2a |viaton s|trings.*|
|00003a40| 2f 0a 0a 2f 2a 0a 2a 2a | 20 49 6e 20 74 68 65 20 |/../*.**| In the |
|00003a50| 63 75 72 72 65 6e 74 20 | 69 6d 70 6c 65 6d 65 6e |current |implemen|
|00003a60| 74 61 74 69 6f 6e 2c 20 | 22 73 65 74 74 7a 28 29 |tation, |"settz()|
|00003a70| 22 20 72 65 66 75 73 65 | 73 20 74 6f 20 64 65 61 |" refuse|s to dea|
|00003a80| 6c 20 77 69 74 68 20 66 | 69 6c 65 73 20 74 68 61 |l with f|iles tha|
|00003a90| 74 0a 2a 2a 20 65 78 63 | 65 65 64 20 61 6e 79 20 |t.** exc|eed any |
|00003aa0| 6f 66 20 74 68 65 20 6c | 69 6d 69 74 73 20 62 65 |of the l|imits be|
|00003ab0| 6c 6f 77 2e 0a 2a 2f 0a | 0a 23 69 66 6e 64 65 66 |low..*/.|.#ifndef|
|00003ac0| 20 54 5a 5f 4d 41 58 5f | 54 49 4d 45 53 0a 23 64 | TZ_MAX_|TIMES.#d|
|00003ad0| 65 66 69 6e 65 20 54 5a | 5f 4d 41 58 5f 54 49 4d |efine TZ|_MAX_TIM|
|00003ae0| 45 53 09 31 37 30 09 2f | 2a 20 4d 61 78 69 6d 75 |ES.170./|* Maximu|
|00003af0| 6d 20 6e 75 6d 62 65 72 | 20 6f 66 20 74 72 61 6e |m number| of tran|
|00003b00| 73 69 74 69 6f 6e 20 74 | 69 6d 65 73 20 2a 2f 0a |sition t|imes */.|
|00003b10| 23 65 6e 64 69 66 0a 0a | 23 69 66 6e 64 65 66 20 |#endif..|#ifndef |
|00003b20| 54 5a 5f 4d 41 58 5f 54 | 59 50 45 53 0a 23 64 65 |TZ_MAX_T|YPES.#de|
|00003b30| 66 69 6e 65 20 54 5a 5f | 4d 41 58 5f 54 59 50 45 |fine TZ_|MAX_TYPE|
|00003b40| 53 09 31 30 09 2f 2a 20 | 4d 61 78 69 6d 75 6d 20 |S.10./* |Maximum |
|00003b50| 6e 75 6d 62 65 72 20 6f | 66 20 6c 6f 63 61 6c 20 |number o|f local |
|00003b60| 74 69 6d 65 20 74 79 70 | 65 73 20 2a 2f 0a 23 65 |time typ|es */.#e|
|00003b70| 6e 64 69 66 0a 0a 23 69 | 66 6e 64 65 66 20 54 5a |ndif..#i|fndef TZ|
|00003b80| 5f 4d 41 58 5f 43 48 41 | 52 53 0a 23 64 65 66 69 |_MAX_CHA|RS.#defi|
|00003b90| 6e 65 20 54 5a 5f 4d 41 | 58 5f 43 48 41 52 53 09 |ne TZ_MA|X_CHARS.|
|00003ba0| 35 30 09 2f 2a 20 4d 61 | 78 69 6d 75 6d 20 6e 75 |50./* Ma|ximum nu|
|00003bb0| 6d 62 65 72 20 6f 66 20 | 61 62 62 72 65 76 69 61 |mber of |abbrevia|
|00003bc0| 74 69 6f 6e 20 63 68 61 | 72 61 63 74 65 72 73 20 |tion cha|racters |
|00003bd0| 2a 2f 0a 23 65 6e 64 69 | 66 0a 53 48 41 52 5f 45 |*/.#endi|f.SHAR_E|
|00003be0| 4f 46 0a 69 66 20 74 65 | 73 74 20 31 34 30 39 20 |OF.if te|st 1409 |
|00003bf0| 2d 6e 65 20 22 60 77 63 | 20 2d 63 20 3c 20 27 74 |-ne "`wc| -c < 't|
|00003c00| 7a 66 69 6c 65 2e 68 27 | 60 22 0a 74 68 65 6e 0a |zfile.h'|`".then.|
|00003c10| 09 65 63 68 6f 20 73 68 | 61 72 3a 20 65 72 72 6f |.echo sh|ar: erro|
|00003c20| 72 20 74 72 61 6e 73 6d | 69 74 74 69 6e 67 20 22 |r transm|itting "|
|00003c30| 27 74 7a 66 69 6c 65 2e | 68 27 22 20 27 28 73 68 |'tzfile.|h'" '(sh|
|00003c40| 6f 75 6c 64 20 68 61 76 | 65 20 62 65 65 6e 20 31 |ould hav|e been 1|
|00003c50| 34 30 39 20 63 68 61 72 | 61 63 74 65 72 73 29 27 |409 char|acters)'|
|00003c60| 0a 66 69 0a 66 69 0a 65 | 63 68 6f 20 73 68 61 72 |.fi.fi.e|cho shar|
|00003c70| 3a 20 65 78 74 72 61 63 | 74 69 6e 67 20 22 27 74 |: extrac|ting "'t|
|00003c80| 7a 63 6f 6d 70 2e 63 27 | 22 20 27 28 32 34 35 35 |zcomp.c'|" '(2455|
|00003c90| 38 20 63 68 61 72 61 63 | 74 65 72 73 29 27 0a 69 |8 charac|ters)'.i|
|00003ca0| 66 20 74 65 73 74 20 2d | 66 20 27 74 7a 63 6f 6d |f test -|f 'tzcom|
|00003cb0| 70 2e 63 27 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 |p.c'.the|n..echo |
|00003cc0| 73 68 61 72 3a 20 77 69 | 6c 6c 20 6e 6f 74 20 6f |shar: wi|ll not o|
|00003cd0| 76 65 72 2d 77 72 69 74 | 65 20 65 78 69 73 74 69 |ver-writ|e existi|
|00003ce0| 6e 67 20 66 69 6c 65 20 | 22 27 74 7a 63 6f 6d 70 |ng file |"'tzcomp|
|00003cf0| 2e 63 27 22 0a 65 6c 73 | 65 0a 63 61 74 20 3c 3c |.c'".els|e.cat <<|
|00003d00| 20 5c 53 48 41 52 5f 45 | 4f 46 20 3e 20 27 74 7a | \SHAR_E|OF > 'tz|
|00003d10| 63 6f 6d 70 2e 63 27 0a | 23 0a 0a 23 69 6e 63 6c |comp.c'.|#..#incl|
|00003d20| 75 64 65 20 22 73 74 64 | 69 6f 2e 68 22 0a 0a 23 |ude "std|io.h"..#|
|00003d30| 69 66 64 65 66 20 4f 42 | 4a 45 43 54 49 44 0a 73 |ifdef OB|JECTID.s|
|00003d40| 74 61 74 69 63 20 63 68 | 61 72 09 73 63 63 73 69 |tatic ch|ar.sccsi|
|00003d50| 64 5b 5d 20 3d 20 22 40 | 28 23 29 74 7a 63 6f 6d |d[] = "@|(#)tzcom|
|00003d60| 70 2e 63 09 32 2e 31 22 | 3b 0a 23 65 6e 64 69 66 |p.c.2.1"|;.#endif|
|00003d70| 0a 0a 23 69 6e 63 6c 75 | 64 65 20 22 74 7a 66 69 |..#inclu|de "tzfi|
|00003d80| 6c 65 2e 68 22 0a 23 69 | 6e 63 6c 75 64 65 20 22 |le.h".#i|nclude "|
|00003d90| 63 74 79 70 65 2e 68 22 | 0a 0a 23 69 66 6e 64 65 |ctype.h"|..#ifnde|
|00003da0| 66 20 61 6c 6c 6f 63 5f | 74 0a 23 64 65 66 69 6e |f alloc_|t.#defin|
|00003db0| 65 20 61 6c 6c 6f 63 5f | 74 09 75 6e 73 69 67 6e |e alloc_|t.unsign|
|00003dc0| 65 64 0a 23 65 6e 64 69 | 66 0a 0a 23 69 66 6e 64 |ed.#endi|f..#ifnd|
|00003dd0| 65 66 20 4d 41 4c 0a 23 | 64 65 66 69 6e 65 20 4d |ef MAL.#|define M|
|00003de0| 41 4c 09 4e 55 4c 4c 0a | 23 65 6e 64 69 66 0a 0a |AL.NULL.|#endif..|
|00003df0| 23 69 66 6e 64 65 66 20 | 42 55 46 53 49 5a 0a 23 |#ifndef |BUFSIZ.#|
|00003e00| 64 65 66 69 6e 65 20 42 | 55 46 53 49 5a 09 31 30 |define B|UFSIZ.10|
|00003e10| 32 34 0a 23 65 6e 64 69 | 66 0a 0a 23 69 66 6e 64 |24.#endi|f..#ifnd|
|00003e20| 65 66 20 54 52 55 45 0a | 23 64 65 66 69 6e 65 20 |ef TRUE.|#define |
|00003e30| 54 52 55 45 09 31 0a 23 | 64 65 66 69 6e 65 20 46 |TRUE.1.#|define F|
|00003e40| 41 4c 53 45 09 30 0a 23 | 65 6e 64 69 66 0a 0a 23 |ALSE.0.#|endif..#|
|00003e50| 69 66 64 65 66 20 6c 69 | 6e 74 0a 23 64 65 66 69 |ifdef li|nt.#defi|
|00003e60| 6e 65 20 73 63 68 65 63 | 6b 28 73 74 72 69 6e 67 |ne schec|k(string|
|00003e70| 2c 20 66 6f 72 6d 61 74 | 29 09 28 66 6f 72 6d 61 |, format|).(forma|
|00003e80| 74 29 0a 23 65 6e 64 69 | 66 0a 23 69 66 6e 64 65 |t).#endi|f.#ifnde|
|00003e90| 66 20 6c 69 6e 74 0a 65 | 78 74 65 72 6e 20 63 68 |f lint.e|xtern ch|
|00003ea0| 61 72 20 2a 09 73 63 68 | 65 63 6b 28 29 3b 0a 23 |ar *.sch|eck();.#|
|00003eb0| 65 6e 64 69 66 0a 0a 65 | 78 74 65 72 6e 20 63 68 |endif..e|xtern ch|
|00003ec0| 61 72 20 2a 09 63 61 6c | 6c 6f 63 28 29 3b 0a 65 |ar *.cal|loc();.e|
|00003ed0| 78 74 65 72 6e 20 63 68 | 61 72 20 2a 09 6d 61 6c |xtern ch|ar *.mal|
|00003ee0| 6c 6f 63 28 29 3b 0a 65 | 78 74 65 72 6e 20 63 68 |loc();.e|xtern ch|
|00003ef0| 61 72 20 2a 09 6f 70 74 | 61 72 67 3b 0a 65 78 74 |ar *.opt|arg;.ext|
|00003f00| 65 72 6e 20 69 6e 74 09 | 6f 70 74 69 6e 64 3b 0a |ern int.|optind;.|
|00003f10| 65 78 74 65 72 6e 20 46 | 49 4c 45 20 2a 09 70 6f |extern F|ILE *.po|
|00003f20| 70 65 6e 28 29 3b 0a 65 | 78 74 65 72 6e 20 63 68 |pen();.e|xtern ch|
|00003f30| 61 72 20 2a 09 72 65 61 | 6c 6c 6f 63 28 29 3b 0a |ar *.rea|lloc();.|
|00003f40| 65 78 74 65 72 6e 20 63 | 68 61 72 20 2a 09 73 70 |extern c|har *.sp|
|00003f50| 72 69 6e 74 66 28 29 3b | 0a 65 78 74 65 72 6e 20 |rintf();|.extern |
|00003f60| 63 68 61 72 20 2a 09 73 | 74 72 63 61 74 28 29 3b |char *.s|trcat();|
|00003f70| 0a 65 78 74 65 72 6e 20 | 63 68 61 72 20 2a 09 73 |.extern |char *.s|
|00003f80| 74 72 63 68 72 28 29 3b | 0a 65 78 74 65 72 6e 20 |trchr();|.extern |
|00003f90| 63 68 61 72 20 2a 09 73 | 74 72 63 70 79 28 29 3b |char *.s|trcpy();|
|00003fa0| 0a 0a 73 74 61 74 69 63 | 20 69 6e 74 09 65 72 72 |..static| int.err|
|00003fb0| 6f 72 73 3b 0a 73 74 61 | 74 69 63 20 63 68 61 72 |ors;.sta|tic char|
|00003fc0| 20 2a 09 66 69 6c 65 6e | 61 6d 65 3b 0a 73 74 61 | *.filen|ame;.sta|
|00003fd0| 74 69 63 20 63 68 61 72 | 20 2a 2a 09 67 65 74 66 |tic char| **.getf|
|00003fe0| 69 65 6c 64 73 28 29 3b | 0a 73 74 61 74 69 63 20 |ields();|.static |
|00003ff0| 69 6e 74 09 6c 69 6e 65 | 6e 75 6d 3b 0a 73 74 61 |int.line|num;.sta|
|00004000| 74 69 63 20 63 68 61 72 | 20 2a 09 70 72 6f 67 6e |tic char| *.progn|
|00004010| 61 6d 65 3b 0a 73 74 61 | 74 69 63 20 6c 6f 6e 67 |ame;.sta|tic long|
|00004020| 09 72 70 79 74 69 6d 65 | 28 29 3b 0a 73 74 61 74 |.rpytime|();.stat|
|00004030| 69 63 20 6c 6f 6e 67 09 | 74 61 64 64 28 29 3b 0a |ic long.|tadd();.|
|00004040| 0a 23 64 65 66 69 6e 65 | 09 53 45 43 53 5f 50 45 |.#define|.SECS_PE|
|00004050| 52 5f 4d 49 4e 09 36 30 | 4c 0a 23 64 65 66 69 6e |R_MIN.60|L.#defin|
|00004060| 65 20 4d 49 4e 53 5f 50 | 45 52 5f 48 4f 55 52 09 |e MINS_P|ER_HOUR.|
|00004070| 36 30 4c 0a 23 64 65 66 | 69 6e 65 20 48 4f 55 52 |60L.#def|ine HOUR|
|00004080| 53 5f 50 45 52 5f 44 41 | 59 09 32 34 4c 0a 23 64 |S_PER_DA|Y.24L.#d|
|00004090| 65 66 69 6e 65 20 44 41 | 59 53 5f 50 45 52 5f 59 |efine DA|YS_PER_Y|
|000040a0| 45 41 52 09 33 36 35 4c | 09 2f 2a 20 45 78 63 65 |EAR.365L|./* Exce|
|000040b0| 70 74 20 69 6e 20 6c 65 | 61 70 20 79 65 61 72 73 |pt in le|ap years|
|000040c0| 20 2a 2f 0a 23 64 65 66 | 69 6e 65 09 53 45 43 53 | */.#def|ine.SECS|
|000040d0| 5f 50 45 52 5f 48 4f 55 | 52 09 28 53 45 43 53 5f |_PER_HOU|R.(SECS_|
|000040e0| 50 45 52 5f 4d 49 4e 20 | 2a 20 4d 49 4e 53 5f 50 |PER_MIN |* MINS_P|
|000040f0| 45 52 5f 48 4f 55 52 29 | 0a 23 64 65 66 69 6e 65 |ER_HOUR)|.#define|
|00004100| 20 53 45 43 53 5f 50 45 | 52 5f 44 41 59 09 28 53 | SECS_PE|R_DAY.(S|
|00004110| 45 43 53 5f 50 45 52 5f | 48 4f 55 52 20 2a 20 48 |ECS_PER_|HOUR * H|
|00004120| 4f 55 52 53 5f 50 45 52 | 5f 44 41 59 29 0a 23 64 |OURS_PER|_DAY).#d|
|00004130| 65 66 69 6e 65 20 53 45 | 43 53 5f 50 45 52 5f 59 |efine SE|CS_PER_Y|
|00004140| 45 41 52 09 28 53 45 43 | 53 5f 50 45 52 5f 44 41 |EAR.(SEC|S_PER_DA|
|00004150| 59 20 2a 20 44 41 59 53 | 5f 50 45 52 5f 59 45 41 |Y * DAYS|_PER_YEA|
|00004160| 52 29 0a 0a 23 64 65 66 | 69 6e 65 20 45 50 4f 43 |R)..#def|ine EPOC|
|00004170| 48 5f 59 45 41 52 09 31 | 39 37 30 0a 23 64 65 66 |H_YEAR.1|970.#def|
|00004180| 69 6e 65 20 45 50 4f 43 | 48 5f 57 44 41 59 09 54 |ine EPOC|H_WDAY.T|
|00004190| 4d 5f 54 48 55 52 53 44 | 41 59 0a 0a 2f 2a 0a 2a |M_THURSD|AY../*.*|
|000041a0| 2a 20 56 61 6c 75 65 73 | 20 61 20 6c 61 20 6c 6f |* Values| a la lo|
|000041b0| 63 61 6c 74 69 6d 65 28 | 33 29 0a 2a 2f 0a 0a 23 |caltime(|3).*/..#|
|000041c0| 64 65 66 69 6e 65 20 54 | 4d 5f 4a 41 4e 55 41 52 |define T|M_JANUAR|
|000041d0| 59 09 30 0a 23 64 65 66 | 69 6e 65 20 54 4d 5f 46 |Y.0.#def|ine TM_F|
|000041e0| 45 42 52 55 41 52 59 09 | 31 0a 23 64 65 66 69 6e |EBRUARY.|1.#defin|
|000041f0| 65 20 54 4d 5f 4d 41 52 | 43 48 09 32 0a 23 64 65 |e TM_MAR|CH.2.#de|
|00004200| 66 69 6e 65 20 54 4d 5f | 41 50 52 49 4c 09 33 0a |fine TM_|APRIL.3.|
|00004210| 23 64 65 66 69 6e 65 20 | 54 4d 5f 4d 41 59 09 09 |#define |TM_MAY..|
|00004220| 34 0a 23 64 65 66 69 6e | 65 20 54 4d 5f 4a 55 4e |4.#defin|e TM_JUN|
|00004230| 45 09 09 35 0a 23 64 65 | 66 69 6e 65 20 54 4d 5f |E..5.#de|fine TM_|
|00004240| 4a 55 4c 59 09 09 36 0a | 23 64 65 66 69 6e 65 20 |JULY..6.|#define |
|00004250| 54 4d 5f 41 55 47 55 53 | 54 09 37 0a 23 64 65 66 |TM_AUGUS|T.7.#def|
|00004260| 69 6e 65 20 54 4d 5f 53 | 45 50 54 45 4d 42 45 52 |ine TM_S|EPTEMBER|
|00004270| 09 38 0a 23 64 65 66 69 | 6e 65 20 54 4d 5f 4f 43 |.8.#defi|ne TM_OC|
|00004280| 54 4f 42 45 52 09 39 0a | 23 64 65 66 69 6e 65 20 |TOBER.9.|#define |
|00004290| 54 4d 5f 4e 4f 56 45 4d | 42 45 52 09 31 30 0a 23 |TM_NOVEM|BER.10.#|
|000042a0| 64 65 66 69 6e 65 20 54 | 4d 5f 44 45 43 45 4d 42 |define T|M_DECEMB|
|000042b0| 45 52 09 31 31 0a 0a 23 | 64 65 66 69 6e 65 20 54 |ER.11..#|define T|
|000042c0| 4d 5f 53 55 4e 44 41 59 | 09 30 0a 23 64 65 66 69 |M_SUNDAY|.0.#defi|
|000042d0| 6e 65 20 54 4d 5f 4d 4f | 4e 44 41 59 09 31 0a 23 |ne TM_MO|NDAY.1.#|
|000042e0| 64 65 66 69 6e 65 20 54 | 4d 5f 54 55 45 53 44 41 |define T|M_TUESDA|
|000042f0| 59 09 32 0a 23 64 65 66 | 69 6e 65 20 54 4d 5f 57 |Y.2.#def|ine TM_W|
|00004300| 45 44 4e 45 53 44 41 59 | 09 33 0a 23 64 65 66 69 |EDNESDAY|.3.#defi|
|00004310| 6e 65 20 54 4d 5f 54 48 | 55 52 53 44 41 59 09 34 |ne TM_TH|URSDAY.4|
|00004320| 0a 23 64 65 66 69 6e 65 | 20 54 4d 5f 46 52 49 44 |.#define| TM_FRID|
|00004330| 41 59 09 35 0a 23 64 65 | 66 69 6e 65 20 54 4d 5f |AY.5.#de|fine TM_|
|00004340| 53 41 54 55 52 44 41 59 | 09 36 0a 0a 2f 2a 0a 2a |SATURDAY|.6../*.*|
|00004350| 2a 20 4c 69 6e 65 20 63 | 6f 64 65 73 2e 0a 2a 2f |* Line c|odes..*/|
|00004360| 0a 0a 23 64 65 66 69 6e | 65 20 4c 43 5f 52 55 4c |..#defin|e LC_RUL|
|00004370| 45 09 09 30 0a 23 64 65 | 66 69 6e 65 20 4c 43 5f |E..0.#de|fine LC_|
|00004380| 5a 4f 4e 45 09 09 31 0a | 23 64 65 66 69 6e 65 20 |ZONE..1.|#define |
|00004390| 4c 43 5f 4c 49 4e 4b 09 | 09 32 0a 0a 2f 2a 0a 2a |LC_LINK.|.2../*.*|
|000043a0| 2a 20 57 68 69 63 68 20 | 66 69 65 6c 64 73 20 61 |* Which |fields a|
|000043b0| 72 65 20 77 68 69 63 68 | 20 6f 6e 20 61 20 5a 6f |re which| on a Zo|
|000043c0| 6e 65 20 6c 69 6e 65 2e | 0a 2a 2f 0a 0a 23 64 65 |ne line.|.*/..#de|
|000043d0| 66 69 6e 65 20 5a 46 5f | 4e 41 4d 45 09 09 31 0a |fine ZF_|NAME..1.|
|000043e0| 23 64 65 66 69 6e 65 20 | 5a 46 5f 47 4d 54 4f 46 |#define |ZF_GMTOF|
|000043f0| 46 09 32 0a 23 64 65 66 | 69 6e 65 20 5a 46 5f 52 |F.2.#def|ine ZF_R|
|00004400| 55 4c 45 09 09 33 0a 23 | 64 65 66 69 6e 65 20 5a |ULE..3.#|define Z|
|00004410| 46 5f 46 4f 52 4d 41 54 | 09 34 0a 23 64 65 66 69 |F_FORMAT|.4.#defi|
|00004420| 6e 65 20 5a 4f 4e 45 5f | 46 49 45 4c 44 53 09 35 |ne ZONE_|FIELDS.5|
|00004430| 0a 0a 2f 2a 0a 2a 2a 20 | 57 68 69 63 68 20 66 69 |../*.** |Which fi|
|00004440| 6c 65 73 20 61 72 65 20 | 77 68 69 63 68 20 6f 6e |les are |which on|
|00004450| 20 61 20 52 75 6c 65 20 | 6c 69 6e 65 2e 0a 2a 2f | a Rule |line..*/|
|00004460| 0a 0a 23 64 65 66 69 6e | 65 09 52 46 5f 4e 41 4d |..#defin|e.RF_NAM|
|00004470| 45 09 09 31 0a 23 64 65 | 66 69 6e 65 20 52 46 5f |E..1.#de|fine RF_|
|00004480| 4c 4f 59 45 41 52 09 32 | 0a 23 64 65 66 69 6e 65 |LOYEAR.2|.#define|
|00004490| 20 52 46 5f 48 49 59 45 | 41 52 09 33 0a 23 64 65 | RF_HIYE|AR.3.#de|
|000044a0| 66 69 6e 65 20 52 46 5f | 43 4f 4d 4d 41 4e 44 09 |fine RF_|COMMAND.|
|000044b0| 34 0a 23 64 65 66 69 6e | 65 20 52 46 5f 4d 4f 4e |4.#defin|e RF_MON|
|000044c0| 54 48 09 35 0a 23 64 65 | 66 69 6e 65 20 52 46 5f |TH.5.#de|fine RF_|
|000044d0| 44 41 59 09 09 36 0a 23 | 64 65 66 69 6e 65 20 52 |DAY..6.#|define R|
|000044e0| 46 5f 54 4f 44 09 09 37 | 0a 23 64 65 66 69 6e 65 |F_TOD..7|.#define|
|000044f0| 20 52 46 5f 53 54 44 4f | 46 46 09 38 0a 23 64 65 | RF_STDO|FF.8.#de|
|00004500| 66 69 6e 65 20 52 46 5f | 41 42 42 52 56 41 52 09 |fine RF_|ABBRVAR.|
|00004510| 39 0a 23 64 65 66 69 6e | 65 20 52 55 4c 45 5f 46 |9.#defin|e RULE_F|
|00004520| 49 45 4c 44 53 09 31 30 | 0a 0a 2f 2a 0a 2a 2a 20 |IELDS.10|../*.** |
|00004530| 57 68 69 63 68 20 66 69 | 65 6c 64 73 20 61 72 65 |Which fi|elds are|
|00004540| 20 77 68 69 63 68 20 6f | 6e 20 61 20 4c 69 6e 6b | which o|n a Link|
|00004550| 20 6c 69 6e 65 2e 0a 2a | 2f 0a 0a 23 64 65 66 69 | line..*|/..#defi|
|00004560| 6e 65 20 4c 46 5f 46 52 | 4f 4d 09 09 31 0a 23 64 |ne LF_FR|OM..1.#d|
|00004570| 65 66 69 6e 65 20 4c 46 | 5f 54 4f 09 09 32 0a 23 |efine LF|_TO..2.#|
|00004580| 64 65 66 69 6e 65 20 4c | 49 4e 4b 5f 46 49 45 4c |define L|INK_FIEL|
|00004590| 44 53 09 33 0a 0a 73 74 | 72 75 63 74 20 72 75 6c |DS.3..st|ruct rul|
|000045a0| 65 20 7b 0a 09 63 68 61 | 72 20 2a 09 72 5f 66 69 |e {..cha|r *.r_fi|
|000045b0| 6c 65 6e 61 6d 65 3b 0a | 09 69 6e 74 09 72 5f 6c |lename;.|.int.r_l|
|000045c0| 69 6e 65 6e 75 6d 3b 0a | 09 63 68 61 72 20 2a 09 |inenum;.|.char *.|
|000045d0| 72 5f 6e 61 6d 65 3b 0a | 0a 09 6c 6f 6e 67 09 72 |r_name;.|..long.r|
|000045e0| 5f 6c 6f 79 65 61 72 3b | 09 2f 2a 20 66 6f 72 20 |_loyear;|./* for |
|000045f0| 65 78 61 6d 70 6c 65 2c | 20 31 39 38 36 20 2a 2f |example,| 1986 */|
|00004600| 0a 09 6c 6f 6e 67 09 72 | 5f 68 69 79 65 61 72 3b |..long.r|_hiyear;|
|00004610| 09 2f 2a 20 66 6f 72 20 | 65 78 61 6d 70 6c 65 2c |./* for |example,|
|00004620| 20 31 39 38 36 20 2a 2f | 0a 09 63 68 61 72 20 2a | 1986 */|..char *|
|00004630| 09 72 5f 79 72 74 79 70 | 65 3b 0a 0a 09 6c 6f 6e |.r_yrtyp|e;...lon|
|00004640| 67 09 72 5f 6d 6f 6e 74 | 68 3b 09 2f 2a 20 30 2e |g.r_mont|h;./* 0.|
|00004650| 2e 31 31 20 2a 2f 0a 0a | 09 69 6e 74 09 72 5f 64 |.11 */..|.int.r_d|
|00004660| 79 63 6f 64 65 3b 09 2f | 2a 20 73 65 65 20 62 65 |ycode;./|* see be|
|00004670| 6c 6f 77 20 2a 2f 0a 09 | 6c 6f 6e 67 09 72 5f 64 |low */..|long.r_d|
|00004680| 61 79 6f 66 6d 6f 6e 74 | 68 3b 0a 09 6c 6f 6e 67 |ayofmont|h;..long|
|00004690| 09 72 5f 77 64 61 79 3b | 0a 0a 09 6c 6f 6e 67 09 |.r_wday;|...long.|
|000046a0| 72 5f 74 6f 64 3b 09 09 | 2f 2a 20 74 69 6d 65 20 |r_tod;..|/* time |
|000046b0| 66 72 6f 6d 20 6d 69 64 | 6e 69 67 68 74 20 2a 2f |from mid|night */|
|000046c0| 0a 09 69 6e 74 09 72 5f | 74 6f 64 69 73 73 74 64 |..int.r_|todisstd|
|000046d0| 3b 09 2f 2a 20 61 62 6f | 76 65 20 69 73 20 73 74 |;./* abo|ve is st|
|000046e0| 61 6e 64 61 72 64 20 74 | 69 6d 65 20 69 66 20 54 |andard t|ime if T|
|000046f0| 52 55 45 20 2a 2f 0a 09 | 09 09 09 2f 2a 20 61 62 |RUE */..|.../* ab|
|00004700| 6f 76 65 20 69 73 20 77 | 61 6c 6c 20 63 6c 6f 63 |ove is w|all cloc|
|00004710| 6b 20 74 69 6d 65 20 69 | 66 20 46 41 4c 53 45 20 |k time i|f FALSE |
|00004720| 2a 2f 0a 09 6c 6f 6e 67 | 09 72 5f 73 74 64 6f 66 |*/..long|.r_stdof|
|00004730| 66 3b 09 2f 2a 20 6f 66 | 66 73 65 74 20 66 72 6f |f;./* of|fset fro|
|00004740| 6d 20 73 74 61 6e 64 61 | 72 64 20 74 69 6d 65 20 |m standa|rd time |
|00004750| 2a 2f 0a 09 63 68 61 72 | 20 2a 09 72 5f 61 62 62 |*/..char| *.r_abb|
|00004760| 72 76 61 72 3b 09 2f 2a | 20 76 61 72 69 61 62 6c |rvar;./*| variabl|
|00004770| 65 20 70 61 72 74 20 6f | 66 20 74 69 6d 65 20 7a |e part o|f time z|
|00004780| 6f 6e 65 20 61 62 62 72 | 65 76 69 61 74 69 6f 6e |one abbr|eviation|
|00004790| 20 2a 2f 0a 0a 09 69 6e | 74 09 72 5f 74 79 70 65 | */...in|t.r_type|
|000047a0| 3b 09 2f 2a 20 75 73 65 | 64 20 77 68 65 6e 20 63 |;./* use|d when c|
|000047b0| 72 65 61 74 69 6e 67 20 | 6f 75 74 70 75 74 20 66 |reating |output f|
|000047c0| 69 6c 65 73 20 2a 2f 0a | 7d 3b 0a 0a 2f 2a 0a 2a |iles */.|};../*.*|
|000047d0| 2a 09 72 5f 64 79 63 6f | 64 65 09 09 72 5f 64 61 |*.r_dyco|de..r_da|
|000047e0| 79 6f 66 6d 6f 6e 74 68 | 09 72 5f 77 64 61 79 0a |yofmonth|.r_wday.|
|000047f0| 2a 2f 0a 23 64 65 66 69 | 6e 65 20 44 43 5f 44 4f |*/.#defi|ne DC_DO|
|00004800| 4d 09 09 30 09 2f 2a 20 | 31 2e 2e 33 31 20 2a 2f |M..0./* |1..31 */|
|00004810| 09 2f 2a 20 75 6e 75 73 | 65 64 20 2a 2f 0a 23 64 |./* unus|ed */.#d|
|00004820| 65 66 69 6e 65 20 44 43 | 5f 44 4f 57 47 45 51 09 |efine DC|_DOWGEQ.|
|00004830| 31 09 2f 2a 20 31 2e 2e | 33 31 20 2a 2f 09 2f 2a |1./* 1..|31 */./*|
|00004840| 20 30 2e 2e 36 20 28 53 | 75 6e 2e 2e 53 61 74 29 | 0..6 (S|un..Sat)|
|00004850| 20 2a 2f 0a 23 64 65 66 | 69 6e 65 20 44 43 5f 44 | */.#def|ine DC_D|
|00004860| 4f 57 4c 45 51 09 32 09 | 2f 2a 20 31 2e 2e 33 31 |OWLEQ.2.|/* 1..31|
|00004870| 20 2a 2f 09 2f 2a 20 30 | 2e 2e 36 20 28 53 75 6e | */./* 0|..6 (Sun|
|00004880| 2e 2e 53 61 74 29 20 2a | 2f 0a 0a 73 74 61 74 69 |..Sat) *|/..stati|
|00004890| 63 20 73 74 72 75 63 74 | 20 72 75 6c 65 20 2a 09 |c struct| rule *.|
|000048a0| 72 75 6c 65 73 3b 0a 73 | 74 61 74 69 63 20 69 6e |rules;.s|tatic in|
|000048b0| 74 09 09 6e 72 75 6c 65 | 73 3b 09 2f 2a 20 6e 75 |t..nrule|s;./* nu|
|000048c0| 6d 62 65 72 20 6f 66 20 | 72 75 6c 65 73 20 2a 2f |mber of |rules */|
|000048d0| 0a 0a 73 74 72 75 63 74 | 20 7a 6f 6e 65 20 7b 0a |..struct| zone {.|
|000048e0| 09 63 68 61 72 20 2a 09 | 09 7a 5f 66 69 6c 65 6e |.char *.|.z_filen|
|000048f0| 61 6d 65 3b 0a 09 69 6e | 74 09 09 7a 5f 6c 69 6e |ame;..in|t..z_lin|
|00004900| 65 6e 75 6d 3b 0a 0a 09 | 63 68 61 72 20 2a 09 09 |enum;...|char *..|
|00004910| 7a 5f 6e 61 6d 65 3b 0a | 09 6c 6f 6e 67 09 09 7a |z_name;.|.long..z|
|00004920| 5f 67 6d 74 6f 66 66 3b | 0a 09 63 68 61 72 20 2a |_gmtoff;|..char *|
|00004930| 09 09 7a 5f 72 75 6c 65 | 3b 0a 09 63 68 61 72 20 |..z_rule|;..char |
|00004940| 2a 09 09 7a 5f 66 6f 72 | 6d 61 74 3b 0a 0a 09 73 |*..z_for|mat;...s|
|00004950| 74 72 75 63 74 20 72 75 | 6c 65 20 2a 09 7a 5f 72 |truct ru|le *.z_r|
|00004960| 75 6c 65 73 3b 0a 09 69 | 6e 74 09 09 7a 5f 6e 72 |ules;..i|nt..z_nr|
|00004970| 75 6c 65 73 3b 0a 7d 3b | 0a 0a 73 74 61 74 69 63 |ules;.};|..static|
|00004980| 20 73 74 72 75 63 74 20 | 7a 6f 6e 65 20 2a 09 7a | struct |zone *.z|
|00004990| 6f 6e 65 73 3b 0a 73 74 | 61 74 69 63 20 69 6e 74 |ones;.st|atic int|
|000049a0| 09 09 6e 7a 6f 6e 65 73 | 3b 09 2f 2a 20 6e 75 6d |..nzones|;./* num|
|000049b0| 62 65 72 20 6f 66 20 7a | 6f 6e 65 73 20 2a 2f 0a |ber of z|ones */.|
|000049c0| 0a 73 74 72 75 63 74 20 | 6c 69 6e 6b 20 7b 0a 09 |.struct |link {..|
|000049d0| 63 68 61 72 20 2a 09 09 | 6c 5f 66 69 6c 65 6e 61 |char *..|l_filena|
|000049e0| 6d 65 3b 0a 09 69 6e 74 | 09 09 6c 5f 6c 69 6e 65 |me;..int|..l_line|
|000049f0| 6e 75 6d 3b 0a 09 63 68 | 61 72 20 2a 09 09 6c 5f |num;..ch|ar *..l_|
|00004a00| 66 72 6f 6d 3b 0a 09 63 | 68 61 72 20 2a 09 09 6c |from;..c|har *..l|
|00004a10| 5f 74 6f 3b 0a 7d 3b 0a | 0a 73 74 61 74 69 63 20 |_to;.};.|.static |
|00004a20| 73 74 72 75 63 74 20 6c | 69 6e 6b 20 2a 09 6c 69 |struct l|ink *.li|
|00004a30| 6e 6b 73 3b 0a 73 74 61 | 74 69 63 20 69 6e 74 09 |nks;.sta|tic int.|
|00004a40| 09 6e 6c 69 6e 6b 73 3b | 0a 0a 73 74 72 75 63 74 |.nlinks;|..struct|
|00004a50| 20 6c 6f 6f 6b 75 70 20 | 7b 0a 09 63 68 61 72 20 | lookup |{..char |
|00004a60| 2a 09 09 6c 5f 77 6f 72 | 64 3b 0a 09 6c 6f 6e 67 |*..l_wor|d;..long|
|00004a70| 09 09 6c 5f 76 61 6c 75 | 65 3b 0a 7d 3b 0a 0a 73 |..l_valu|e;.};..s|
|00004a80| 74 61 74 69 63 20 73 74 | 72 75 63 74 20 6c 6f 6f |tatic st|ruct loo|
|00004a90| 6b 75 70 20 2a 09 62 79 | 77 6f 72 64 28 29 3b 0a |kup *.by|word();.|
|00004aa0| 0a 73 74 61 74 69 63 20 | 73 74 72 75 63 74 20 6c |.static |struct l|
|00004ab0| 6f 6f 6b 75 70 09 6c 69 | 6e 65 5f 63 6f 64 65 73 |ookup.li|ne_codes|
|00004ac0| 5b 5d 20 3d 20 7b 0a 09 | 22 52 75 6c 65 22 2c 09 |[] = {..|"Rule",.|
|00004ad0| 09 4c 43 5f 52 55 4c 45 | 2c 0a 09 22 5a 6f 6e 65 |.LC_RULE|,.."Zone|
|00004ae0| 22 2c 09 09 4c 43 5f 5a | 4f 4e 45 2c 0a 09 22 4c |",..LC_Z|ONE,.."L|
|00004af0| 69 6e 6b 22 2c 09 09 4c | 43 5f 4c 49 4e 4b 2c 0a |ink",..L|C_LINK,.|
|00004b00| 09 4e 55 4c 4c 2c 09 09 | 30 0a 7d 3b 0a 0a 73 74 |.NULL,..|0.};..st|
|00004b10| 61 74 69 63 20 73 74 72 | 75 63 74 20 6c 6f 6f 6b |atic str|uct look|
|00004b20| 75 70 09 6d 6f 6e 5f 6e | 61 6d 65 73 5b 5d 20 3d |up.mon_n|ames[] =|
|00004b30| 20 7b 0a 09 22 4a 61 6e | 75 61 72 79 22 2c 09 54 | {.."Jan|uary",.T|
|00004b40| 4d 5f 4a 41 4e 55 41 52 | 59 2c 0a 09 22 46 65 62 |M_JANUAR|Y,.."Feb|
|00004b50| 72 75 61 72 79 22 2c 09 | 54 4d 5f 46 45 42 52 55 |ruary",.|TM_FEBRU|
|00004b60| 41 52 59 2c 0a 09 22 4d | 61 72 63 68 22 2c 09 54 |ARY,.."M|arch",.T|
|00004b70| 4d 5f 4d 41 52 43 48 2c | 0a 09 22 41 70 72 69 6c |M_MARCH,|.."April|
|00004b80| 22 2c 09 54 4d 5f 41 50 | 52 49 4c 2c 0a 09 22 4d |",.TM_AP|RIL,.."M|
|00004b90| 61 79 22 2c 09 09 54 4d | 5f 4d 41 59 2c 0a 09 22 |ay",..TM|_MAY,.."|
|00004ba0| 4a 75 6e 65 22 2c 09 09 | 54 4d 5f 4a 55 4e 45 2c |June",..|TM_JUNE,|
|00004bb0| 0a 09 22 4a 75 6c 79 22 | 2c 09 09 54 4d 5f 4a 55 |.."July"|,..TM_JU|
|00004bc0| 4c 59 2c 0a 09 22 41 75 | 67 75 73 74 22 2c 09 54 |LY,.."Au|gust",.T|
|00004bd0| 4d 5f 41 55 47 55 53 54 | 2c 0a 09 22 53 65 70 74 |M_AUGUST|,.."Sept|
|00004be0| 65 6d 62 65 72 22 2c 09 | 54 4d 5f 53 45 50 54 45 |ember",.|TM_SEPTE|
|00004bf0| 4d 42 45 52 2c 0a 09 22 | 4f 63 74 6f 62 65 72 22 |MBER,.."|October"|
|00004c00| 2c 09 54 4d 5f 4f 43 54 | 4f 42 45 52 2c 0a 09 22 |,.TM_OCT|OBER,.."|
|00004c10| 4e 6f 76 65 6d 62 65 72 | 22 2c 09 54 4d 5f 4e 4f |November|",.TM_NO|
|00004c20| 56 45 4d 42 45 52 2c 0a | 09 22 44 65 63 65 6d 62 |VEMBER,.|."Decemb|
|00004c30| 65 72 22 2c 09 54 4d 5f | 44 45 43 45 4d 42 45 52 |er",.TM_|DECEMBER|
|00004c40| 2c 0a 09 4e 55 4c 4c 2c | 09 09 30 0a 7d 3b 0a 0a |,..NULL,|..0.};..|
|00004c50| 73 74 61 74 69 63 20 73 | 74 72 75 63 74 20 6c 6f |static s|truct lo|
|00004c60| 6f 6b 75 70 09 77 64 61 | 79 5f 6e 61 6d 65 73 5b |okup.wda|y_names[|
|00004c70| 5d 20 3d 20 7b 0a 09 22 | 53 75 6e 64 61 79 22 2c |] = {.."|Sunday",|
|00004c80| 09 54 4d 5f 53 55 4e 44 | 41 59 2c 0a 09 22 4d 6f |.TM_SUND|AY,.."Mo|
|00004c90| 6e 64 61 79 22 2c 09 54 | 4d 5f 4d 4f 4e 44 41 59 |nday",.T|M_MONDAY|
|00004ca0| 2c 0a 09 22 54 75 65 73 | 64 61 79 22 2c 09 54 4d |,.."Tues|day",.TM|
|00004cb0| 5f 54 55 45 53 44 41 59 | 2c 0a 09 22 57 65 64 6e |_TUESDAY|,.."Wedn|
|00004cc0| 65 73 64 61 79 22 2c 09 | 54 4d 5f 57 45 44 4e 45 |esday",.|TM_WEDNE|
|00004cd0| 53 44 41 59 2c 0a 09 22 | 54 68 75 72 73 64 61 79 |SDAY,.."|Thursday|
|00004ce0| 22 2c 09 54 4d 5f 54 48 | 55 52 53 44 41 59 2c 0a |",.TM_TH|URSDAY,.|
|00004cf0| 09 22 46 72 69 64 61 79 | 22 2c 09 54 4d 5f 46 52 |."Friday|",.TM_FR|
|00004d00| 49 44 41 59 2c 0a 09 22 | 53 61 74 75 72 64 61 79 |IDAY,.."|Saturday|
|00004d10| 22 2c 09 54 4d 5f 53 41 | 54 55 52 44 41 59 2c 0a |",.TM_SA|TURDAY,.|
|00004d20| 09 4e 55 4c 4c 2c 09 09 | 30 0a 7d 3b 0a 0a 73 74 |.NULL,..|0.};..st|
|00004d30| 61 74 69 63 20 73 74 72 | 75 63 74 20 6c 6f 6f 6b |atic str|uct look|
|00004d40| 75 70 09 6c 61 73 74 73 | 5b 5d 20 3d 20 7b 0a 09 |up.lasts|[] = {..|
|00004d50| 22 6c 61 73 74 2d 53 75 | 6e 64 61 79 22 2c 09 09 |"last-Su|nday",..|
|00004d60| 54 4d 5f 53 55 4e 44 41 | 59 2c 0a 09 22 6c 61 73 |TM_SUNDA|Y,.."las|
|00004d70| 74 2d 4d 6f 6e 64 61 79 | 22 2c 09 09 54 4d 5f 4d |t-Monday|",..TM_M|
|00004d80| 4f 4e 44 41 59 2c 0a 09 | 22 6c 61 73 74 2d 54 75 |ONDAY,..|"last-Tu|
|00004d90| 65 73 64 61 79 22 2c 09 | 09 54 4d 5f 54 55 45 53 |esday",.|.TM_TUES|
|00004da0| 44 41 59 2c 0a 09 22 6c | 61 73 74 2d 57 65 64 6e |DAY,.."l|ast-Wedn|
|00004db0| 65 73 64 61 79 22 2c 09 | 54 4d 5f 57 45 44 4e 45 |esday",.|TM_WEDNE|
|00004dc0| 53 44 41 59 2c 0a 09 22 | 6c 61 73 74 2d 54 68 75 |SDAY,.."|last-Thu|
|00004dd0| 72 73 64 61 79 22 2c 09 | 54 4d 5f 54 48 55 52 53 |rsday",.|TM_THURS|
|00004de0| 44 41 59 2c 0a 09 22 6c | 61 73 74 2d 46 72 69 64 |DAY,.."l|ast-Frid|
|00004df0| 61 79 22 2c 09 09 54 4d | 5f 46 52 49 44 41 59 2c |ay",..TM|_FRIDAY,|
|00004e00| 0a 09 22 6c 61 73 74 2d | 53 61 74 75 72 64 61 79 |.."last-|Saturday|
|00004e10| 22 2c 09 54 4d 5f 53 41 | 54 55 52 44 41 59 2c 0a |",.TM_SA|TURDAY,.|
|00004e20| 09 4e 55 4c 4c 2c 09 09 | 09 30 0a 7d 3b 0a 0a 73 |.NULL,..|.0.};..s|
|00004e30| 74 61 74 69 63 20 6c 6f | 6e 67 09 6d 6f 6e 5f 6c |tatic lo|ng.mon_l|
|00004e40| 65 6e 67 74 68 73 5b 5d | 20 3d 20 7b 09 2f 2a 20 |engths[]| = {./* |
|00004e50| 22 2e 20 2e 20 2e 6b 6e | 75 63 6b 6c 65 73 20 61 |". . .kn|uckles a|
|00004e60| 72 65 20 33 31 2e 20 2e | 20 2e 22 20 2a 2f 0a 09 |re 31. .| ." */..|
|00004e70| 33 31 2c 20 32 38 2c 20 | 33 31 2c 20 33 30 2c 20 |31, 28, |31, 30, |
|00004e80| 33 31 2c 20 33 30 2c 20 | 33 31 2c 20 33 31 2c 20 |31, 30, |31, 31, |
|00004e90| 33 30 2c 20 33 31 2c 20 | 33 30 2c 20 33 31 0a 7d |30, 31, |30, 31.}|
|00004ea0| 3b 0a 0a 73 74 61 74 69 | 63 20 73 74 72 75 63 74 |;..stati|c struct|
|00004eb0| 20 74 7a 68 65 61 64 09 | 68 3b 0a 73 74 61 74 69 | tzhead.|h;.stati|
|00004ec0| 63 20 6c 6f 6e 67 09 09 | 61 74 73 5b 54 5a 5f 4d |c long..|ats[TZ_M|
|00004ed0| 41 58 5f 54 49 4d 45 53 | 5d 3b 0a 73 74 61 74 69 |AX_TIMES|];.stati|
|00004ee0| 63 20 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 09 |c unsign|ed char.|
|00004ef0| 74 79 70 65 73 5b 54 5a | 5f 4d 41 58 5f 54 49 4d |types[TZ|_MAX_TIM|
|00004f00| 45 53 5d 3b 0a 73 74 61 | 74 69 63 20 73 74 72 75 |ES];.sta|tic stru|
|00004f10| 63 74 20 74 74 69 6e 66 | 6f 09 74 74 69 73 5b 54 |ct ttinf|o.ttis[T|
|00004f20| 5a 5f 4d 41 58 5f 54 59 | 50 45 53 5d 3b 0a 73 74 |Z_MAX_TY|PES];.st|
|00004f30| 61 74 69 63 20 63 68 61 | 72 09 09 63 68 61 72 73 |atic cha|r..chars|
|00004f40| 5b 54 5a 5f 4d 41 58 5f | 43 48 41 52 53 5d 3b 0a |[TZ_MAX_|CHARS];.|
|00004f50| 0a 2f 2a 0a 2a 2a 20 45 | 78 69 74 73 2e 0a 2a 2f |./*.** E|xits..*/|
|00004f60| 0a 0a 73 74 61 74 69 63 | 0a 74 61 6d 65 65 78 69 |..static|.tameexi|
|00004f70| 74 28 29 0a 7b 0a 09 65 | 78 69 74 28 30 29 3b 0a |t().{..e|xit(0);.|
|00004f80| 7d 0a 0a 73 74 61 74 69 | 63 0a 77 69 6c 64 32 65 |}..stati|c.wild2e|
|00004f90| 78 69 74 28 70 61 72 74 | 31 2c 20 70 61 72 74 32 |xit(part|1, part2|
|00004fa0| 29 0a 63 68 61 72 20 2a | 09 70 61 72 74 31 3b 0a |).char *|.part1;.|
|00004fb0| 63 68 61 72 20 2a 09 70 | 61 72 74 32 3b 0a 7b 0a |char *.p|art2;.{.|
|00004fc0| 09 72 65 67 69 73 74 65 | 72 20 63 68 61 72 20 2a |.registe|r char *|
|00004fd0| 09 62 65 74 77 65 65 6e | 3b 0a 0a 09 69 66 20 28 |.between|;...if (|
|00004fe0| 70 61 72 74 31 20 3d 3d | 20 4e 55 4c 4c 29 0a 09 |part1 ==| NULL)..|
|00004ff0| 09 70 61 72 74 31 20 3d | 20 22 22 3b 0a 09 69 66 |.part1 =| "";..if|
|00005000| 20 28 70 61 72 74 32 20 | 3d 3d 20 4e 55 4c 4c 29 | (part2 |== NULL)|
|00005010| 0a 09 09 70 61 72 74 32 | 20 3d 20 22 22 3b 0a 09 |...part2| = "";..|
|00005020| 62 65 74 77 65 65 6e 20 | 3d 20 28 2a 70 61 72 74 |between |= (*part|
|00005030| 31 20 3d 3d 20 27 5c 30 | 27 20 7c 7c 20 2a 70 61 |1 == '\0|' || *pa|
|00005040| 72 74 32 20 3d 3d 20 27 | 5c 30 27 29 20 3f 20 22 |rt2 == '|\0') ? "|
|00005050| 22 20 3a 20 22 20 22 3b | 0a 09 28 76 6f 69 64 29 |" : " ";|..(void)|
|00005060| 20 66 70 72 69 6e 74 66 | 28 73 74 64 65 72 72 2c | fprintf|(stderr,|
|00005070| 20 22 25 73 3a 20 77 69 | 6c 64 20 25 73 25 73 25 | "%s: wi|ld %s%s%|
|00005080| 73 5c 6e 22 2c 0a 09 09 | 70 72 6f 67 6e 61 6d 65 |s\n",...|progname|
|00005090| 2c 20 70 61 72 74 31 2c | 20 62 65 74 77 65 65 6e |, part1,| between|
|000050a0| 2c 20 70 61 72 74 32 29 | 3b 0a 09 65 78 69 74 28 |, part2)|;..exit(|
|000050b0| 31 29 3b 0a 7d 0a 0a 73 | 74 61 74 69 63 0a 77 69 |1);.}..s|tatic.wi|
|000050c0| 6c 64 65 78 69 74 28 73 | 74 72 69 6e 67 29 0a 63 |ldexit(s|tring).c|
|000050d0| 68 61 72 20 2a 09 73 74 | 72 69 6e 67 3b 0a 7b 0a |har *.st|ring;.{.|
|000050e0| 09 77 69 6c 64 32 65 78 | 69 74 28 73 74 72 69 6e |.wild2ex|it(strin|
|000050f0| 67 2c 20 28 63 68 61 72 | 20 2a 29 20 4e 55 4c 4c |g, (char| *) NULL|
|00005100| 29 3b 0a 7d 0a 0a 73 74 | 61 74 69 63 0a 77 69 6c |);.}..st|atic.wil|
|00005110| 64 72 65 78 69 74 28 73 | 74 72 69 6e 67 29 0a 63 |drexit(s|tring).c|
|00005120| 68 61 72 20 2a 09 73 74 | 72 69 6e 67 3b 0a 7b 0a |har *.st|ring;.{.|
|00005130| 09 77 69 6c 64 32 65 78 | 69 74 28 22 72 65 73 75 |.wild2ex|it("resu|
|00005140| 6c 74 20 66 72 6f 6d 22 | 2c 20 73 74 72 69 6e 67 |lt from"|, string|
|00005150| 29 3b 0a 7d 0a 0a 2f 2a | 0a 2a 2a 20 4d 65 6d 6f |);.}../*|.** Memo|
|00005160| 72 79 20 61 6c 6c 6f 63 | 61 74 69 6f 6e 2e 0a 2a |ry alloc|ation..*|
|00005170| 2f 0a 0a 73 74 61 74 69 | 63 20 63 68 61 72 20 2a |/..stati|c char *|
|00005180| 0a 65 6d 61 6c 6c 6f 63 | 28 73 69 7a 65 29 0a 7b |.emalloc|(size).{|
|00005190| 0a 09 72 65 67 69 73 74 | 65 72 20 63 68 61 72 20 |..regist|er char |
|000051a0| 2a 09 63 70 3b 0a 0a 09 | 69 66 20 28 28 63 70 20 |*.cp;...|if ((cp |
|000051b0| 3d 20 6d 61 6c 6c 6f 63 | 28 28 61 6c 6c 6f 63 5f |= malloc|((alloc_|
|000051c0| 74 29 20 73 69 7a 65 29 | 29 20 3d 3d 20 4e 55 4c |t) size)|) == NUL|
|000051d0| 4c 20 7c 7c 20 63 70 20 | 3d 3d 20 4d 41 4c 29 0a |L || cp |== MAL).|
|000051e0| 09 09 77 69 6c 64 72 65 | 78 69 74 28 22 6d 61 6c |..wildre|xit("mal|
|000051f0| 6c 6f 63 22 29 3b 0a 09 | 72 65 74 75 72 6e 20 63 |loc");..|return c|
|00005200| 70 3b 0a 7d 0a 0a 73 74 | 61 74 69 63 20 63 68 61 |p;.}..st|atic cha|
|00005210| 72 20 2a 0a 65 72 65 61 | 6c 6c 6f 63 28 70 74 72 |r *.erea|lloc(ptr|
|00005220| 2c 20 73 69 7a 65 29 0a | 63 68 61 72 20 2a 09 70 |, size).|char *.p|
|00005230| 74 72 3b 0a 7b 0a 09 72 | 65 67 69 73 74 65 72 20 |tr;.{..r|egister |
|00005240| 63 68 61 72 20 2a 09 63 | 70 3b 0a 0a 09 69 66 20 |char *.c|p;...if |
|00005250| 28 28 63 70 20 3d 20 72 | 65 61 6c 6c 6f 63 28 70 |((cp = r|ealloc(p|
|00005260| 74 72 2c 20 28 61 6c 6c | 6f 63 5f 74 29 20 73 69 |tr, (all|oc_t) si|
|00005270| 7a 65 29 29 20 3d 3d 20 | 4e 55 4c 4c 29 0a 09 09 |ze)) == |NULL)...|
|00005280| 77 69 6c 64 72 65 78 69 | 74 28 22 72 65 61 6c 6c |wildrexi|t("reall|
|00005290| 6f 63 22 29 3b 0a 09 72 | 65 74 75 72 6e 20 63 70 |oc");..r|eturn cp|
|000052a0| 3b 0a 7d 0a 0a 73 74 61 | 74 69 63 20 63 68 61 72 |;.}..sta|tic char|
|000052b0| 20 2a 0a 65 61 6c 6c 6f | 63 70 79 28 6f 6c 64 29 | *.eallo|cpy(old)|
|000052c0| 0a 63 68 61 72 20 2a 09 | 6f 6c 64 3b 0a 7b 0a 09 |.char *.|old;.{..|
|000052d0| 72 65 67 69 73 74 65 72 | 20 63 68 61 72 20 2a 09 |register| char *.|
|000052e0| 6e 65 77 3b 0a 0a 09 69 | 66 20 28 6f 6c 64 20 3d |new;...i|f (old =|
|000052f0| 3d 20 4e 55 4c 4c 29 0a | 09 09 6f 6c 64 20 3d 20 |= NULL).|..old = |
|00005300| 22 22 3b 0a 09 6e 65 77 | 20 3d 20 65 6d 61 6c 6c |"";..new| = emall|
|00005310| 6f 63 28 73 74 72 6c 65 | 6e 28 6f 6c 64 29 20 2b |oc(strle|n(old) +|
|00005320| 20 31 29 3b 0a 09 28 76 | 6f 69 64 29 20 73 74 72 | 1);..(v|oid) str|
|00005330| 63 70 79 28 6e 65 77 2c | 20 6f 6c 64 29 3b 0a 09 |cpy(new,| old);..|
|00005340| 72 65 74 75 72 6e 20 6e | 65 77 3b 0a 7d 0a 0a 73 |return n|ew;.}..s|
|00005350| 74 61 74 69 63 0a 75 73 | 61 67 65 28 29 0a 7b 0a |tatic.us|age().{.|
|00005360| 09 28 76 6f 69 64 29 20 | 66 70 72 69 6e 74 66 28 |.(void) |fprintf(|
|00005370| 73 74 64 65 72 72 2c 0a | 09 22 25 73 3a 20 75 73 |stderr,.|."%s: us|
|00005380| 61 67 65 20 69 73 20 25 | 73 20 5b 20 2d 6c 20 6c |age is %|s [ -l l|
|00005390| 6f 63 61 6c 74 69 6d 65 | 20 5d 20 5b 20 2d 64 20 |ocaltime| ] [ -d |
|000053a0| 64 69 72 65 63 74 6f 72 | 79 20 5d 20 5b 20 66 69 |director|y ] [ fi|
|000053b0| 6c 65 6e 61 6d 65 20 2e | 2e 2e 20 5d 5c 6e 22 2c |lename .|.. ]\n",|
|000053c0| 0a 09 09 70 72 6f 67 6e | 61 6d 65 2c 20 70 72 6f |...progn|ame, pro|
|000053d0| 67 6e 61 6d 65 29 3b 0a | 09 65 78 69 74 28 31 29 |gname);.|.exit(1)|
|000053e0| 3b 0a 7d 0a 0a 73 74 61 | 74 69 63 20 63 68 61 72 |;.}..sta|tic char|
|000053f0| 20 2a 09 6c 6f 63 61 6c | 74 69 6d 65 20 3d 20 4e | *.local|time = N|
|00005400| 55 4c 4c 3b 0a 73 74 61 | 74 69 63 20 63 68 61 72 |ULL;.sta|tic char|
|00005410| 20 2a 09 64 69 72 65 63 | 74 6f 72 79 20 3d 20 4e | *.direc|tory = N|
|00005420| 55 4c 4c 3b 0a 0a 6d 61 | 69 6e 28 61 72 67 63 2c |ULL;..ma|in(argc,|
|00005430| 20 61 72 67 76 29 0a 69 | 6e 74 09 61 72 67 63 3b | argv).i|nt.argc;|
|00005440| 0a 63 68 61 72 20 2a 09 | 61 72 67 76 5b 5d 3b 0a |.char *.|argv[];.|
|00005450| 7b 0a 09 72 65 67 69 73 | 74 65 72 20 69 6e 74 09 |{..regis|ter int.|
|00005460| 69 3b 0a 09 72 65 67 69 | 73 74 65 72 20 69 6e 74 |i;..regi|ster int|
|00005470| 09 63 3b 0a 0a 09 70 72 | 6f 67 6e 61 6d 65 20 3d |.c;...pr|ogname =|
|00005480| 20 61 72 67 76 5b 30 5d | 3b 0a 09 77 68 69 6c 65 | argv[0]|;..while|
|00005490| 20 28 28 63 20 3d 20 67 | 65 74 6f 70 74 28 61 72 | ((c = g|etopt(ar|
|000054a0| 67 63 2c 20 61 72 67 76 | 2c 20 22 64 3a 6c 3a 22 |gc, argv|, "d:l:"|
|000054b0| 29 29 20 21 3d 20 45 4f | 46 29 0a 09 09 73 77 69 |)) != EO|F)...swi|
|000054c0| 74 63 68 20 28 63 29 20 | 7b 0a 09 09 09 64 65 66 |tch (c) |{....def|
|000054d0| 61 75 6c 74 3a 0a 09 09 | 09 09 75 73 61 67 65 28 |ault:...|..usage(|
|000054e0| 29 3b 0a 09 09 09 63 61 | 73 65 20 27 64 27 3a 0a |);....ca|se 'd':.|
|000054f0| 09 09 09 09 69 66 20 28 | 64 69 72 65 63 74 6f 72 |....if (|director|
|00005500| 79 20 3d 3d 20 4e 55 4c | 4c 29 0a 09 09 09 09 09 |y == NUL|L)......|
|00005510| 64 69 72 65 63 74 6f 72 | 79 20 3d 20 6f 70 74 61 |director|y = opta|
|00005520| 72 67 3b 0a 09 09 09 09 | 65 6c 73 65 09 77 69 6c |rg;.....|else.wil|
|00005530| 64 65 78 69 74 28 22 6d | 75 6c 74 69 70 6c 65 20 |dexit("m|ultiple |
|00005540| 63 6f 6d 6d 61 6e 64 20 | 6c 69 6e 65 20 2d 64 27 |command |line -d'|
|00005550| 73 22 29 3b 0a 09 09 09 | 09 62 72 65 61 6b 3b 0a |s");....|.break;.|
|00005560| 09 09 09 63 61 73 65 20 | 27 6c 27 3a 0a 09 09 09 |...case |'l':....|
|00005570| 09 69 66 20 28 6c 6f 63 | 61 6c 74 69 6d 65 20 3d |.if (loc|altime =|
|00005580| 3d 20 4e 55 4c 4c 29 0a | 09 09 09 09 09 6c 6f 63 |= NULL).|.....loc|
|00005590| 61 6c 74 69 6d 65 20 3d | 20 6f 70 74 61 72 67 3b |altime =| optarg;|
|000055a0| 0a 09 09 09 09 65 6c 73 | 65 09 77 69 6c 64 65 78 |.....els|e.wildex|
|000055b0| 69 74 28 22 6d 75 6c 74 | 69 70 6c 65 20 63 6f 6d |it("mult|iple com|
|000055c0| 6d 61 6e 64 20 6c 69 6e | 65 20 2d 6c 27 73 22 29 |mand lin|e -l's")|
|000055d0| 3b 0a 09 09 7d 0a 09 69 | 66 20 28 64 69 72 65 63 |;...}..i|f (direc|
|000055e0| 74 6f 72 79 20 3d 3d 20 | 4e 55 4c 4c 29 0a 09 09 |tory == |NULL)...|
|000055f0| 64 69 72 65 63 74 6f 72 | 79 20 3d 20 54 5a 44 49 |director|y = TZDI|
|00005600| 52 3b 0a 09 69 66 20 28 | 6f 70 74 69 6e 64 20 3d |R;..if (|optind =|
|00005610| 3d 20 61 72 67 63 20 2d | 20 31 20 26 26 20 73 74 |= argc -| 1 && st|
|00005620| 72 63 6d 70 28 61 72 67 | 76 5b 6f 70 74 69 6e 64 |rcmp(arg|v[optind|
|00005630| 5d 2c 20 22 3d 22 29 20 | 3d 3d 20 30 29 0a 09 09 |], "=") |== 0)...|
|00005640| 75 73 61 67 65 28 29 3b | 09 2f 2a 20 75 73 61 67 |usage();|./* usag|
|00005650| 65 20 6d 65 73 73 61 67 | 65 20 62 79 20 72 65 71 |e messag|e by req|
|00005660| 75 65 73 74 20 2a 2f 0a | 09 7a 6f 6e 65 73 20 3d |uest */.|.zones =|
|00005670| 20 28 73 74 72 75 63 74 | 20 7a 6f 6e 65 20 2a 29 | (struct| zone *)|
|00005680| 20 65 6d 61 6c 6c 6f 63 | 28 30 29 3b 0a 09 72 75 | emalloc|(0);..ru|
|00005690| 6c 65 73 20 3d 20 28 73 | 74 72 75 63 74 20 72 75 |les = (s|truct ru|
|000056a0| 6c 65 20 2a 29 20 65 6d | 61 6c 6c 6f 63 28 30 29 |le *) em|alloc(0)|
|000056b0| 3b 0a 09 6c 69 6e 6b 73 | 20 3d 20 28 73 74 72 75 |;..links| = (stru|
|000056c0| 63 74 20 6c 69 6e 6b 20 | 2a 29 20 65 6d 61 6c 6c |ct link |*) emall|
|000056d0| 6f 63 28 30 29 3b 0a 09 | 66 6f 72 20 28 69 20 3d |oc(0);..|for (i =|
|000056e0| 20 6f 70 74 69 6e 64 3b | 20 69 20 3c 20 61 72 67 | optind;| i < arg|
|000056f0| 63 3b 20 2b 2b 69 29 0a | 09 09 69 6e 66 69 6c 65 |c; ++i).|..infile|
|00005700| 28 61 72 67 76 5b 69 5d | 29 3b 0a 09 69 66 20 28 |(argv[i]|);..if (|
|00005710| 65 72 72 6f 72 73 29 0a | 09 09 77 69 6c 64 65 78 |errors).|..wildex|
|00005720| 69 74 28 22 69 6e 70 75 | 74 20 64 61 74 61 22 29 |it("inpu|t data")|
|00005730| 3b 0a 09 61 73 73 6f 63 | 69 61 74 65 28 29 3b 0a |;..assoc|iate();.|
|00005740| 09 66 6f 72 20 28 69 20 | 3d 20 30 3b 20 69 20 3c |.for (i |= 0; i <|
|00005750| 20 6e 7a 6f 6e 65 73 3b | 20 2b 2b 69 29 0a 09 09 | nzones;| ++i)...|
|00005760| 6f 75 74 7a 6f 6e 65 28 | 26 7a 6f 6e 65 73 5b 69 |outzone(|&zones[i|
|00005770| 5d 29 3b 0a 09 2f 2a 0a | 09 2a 2a 20 57 65 27 6c |]);../*.|.** We'l|
|00005780| 6c 20 74 61 6b 65 20 74 | 68 65 20 65 61 73 79 20 |l take t|he easy |
|00005790| 77 61 79 20 6f 75 74 20 | 6f 6e 20 74 68 69 73 20 |way out |on this |
|000057a0| 6c 61 73 74 20 70 61 72 | 74 2e 0a 09 2a 2f 0a 09 |last par|t...*/..|
|000057b0| 69 66 20 28 63 68 64 69 | 72 28 64 69 72 65 63 74 |if (chdi|r(direct|
|000057c0| 6f 72 79 29 20 21 3d 20 | 30 29 0a 09 09 77 69 6c |ory) != |0)...wil|
|000057d0| 64 32 65 78 69 74 28 22 | 72 65 73 75 6c 74 20 66 |d2exit("|result f|
|000057e0| 72 6f 6d 20 63 68 64 69 | 72 20 74 6f 22 2c 20 64 |rom chdi|r to", d|
|000057f0| 69 72 65 63 74 6f 72 79 | 29 3b 0a 09 66 6f 72 20 |irectory|);..for |
|00005800| 28 69 20 3d 20 30 3b 20 | 69 20 3c 20 6e 6c 69 6e |(i = 0; |i < nlin|
|00005810| 6b 73 3b 20 2b 2b 69 29 | 20 7b 0a 09 09 28 76 6f |ks; ++i)| {...(vo|
|00005820| 69 64 29 20 75 6e 6c 69 | 6e 6b 28 6c 69 6e 6b 73 |id) unli|nk(links|
|00005830| 5b 69 5d 2e 6c 5f 74 6f | 29 3b 0a 09 09 69 66 20 |[i].l_to|);...if |
|00005840| 28 6c 69 6e 6b 28 6c 69 | 6e 6b 73 5b 69 5d 2e 6c |(link(li|nks[i].l|
|00005850| 5f 66 72 6f 6d 2c 20 6c | 69 6e 6b 73 5b 69 5d 2e |_from, l|inks[i].|
|00005860| 6c 5f 74 6f 29 20 21 3d | 20 30 29 0a 09 09 09 77 |l_to) !=| 0)....w|
|00005870| 69 6c 64 32 65 78 69 74 | 28 22 72 65 73 75 6c 74 |ild2exit|("result|
|00005880| 20 63 72 65 61 74 69 6e | 67 22 2c 20 6c 69 6e 6b | creatin|g", link|
|00005890| 73 5b 69 5d 2e 6c 5f 74 | 6f 29 3b 0a 09 7d 0a 09 |s[i].l_t|o);..}..|
|000058a0| 69 66 20 28 6c 6f 63 61 | 6c 74 69 6d 65 20 21 3d |if (loca|ltime !=|
|000058b0| 20 4e 55 4c 4c 29 20 7b | 0a 09 09 28 76 6f 69 64 | NULL) {|...(void|
|000058c0| 29 20 75 6e 6c 69 6e 6b | 28 54 5a 44 45 46 41 55 |) unlink|(TZDEFAU|
|000058d0| 4c 54 29 3b 0a 09 09 69 | 66 20 28 6c 69 6e 6b 28 |LT);...i|f (link(|
|000058e0| 6c 6f 63 61 6c 74 69 6d | 65 2c 20 54 5a 44 45 46 |localtim|e, TZDEF|
|000058f0| 41 55 4c 54 29 20 21 3d | 20 30 29 0a 09 09 09 77 |AULT) !=| 0)....w|
|00005900| 69 6c 64 32 65 78 69 74 | 28 22 72 65 73 75 6c 74 |ild2exit|("result|
|00005910| 20 63 72 65 61 74 69 6e | 67 22 2c 20 54 5a 44 45 | creatin|g", TZDE|
|00005920| 46 41 55 4c 54 29 3b 0a | 09 7d 0a 09 74 61 6d 65 |FAULT);.|.}..tame|
|00005930| 65 78 69 74 28 29 3b 0a | 7d 0a 0a 2f 2a 0a 2a 2a |exit();.|}../*.**|
|00005940| 20 41 73 73 6f 63 69 61 | 74 65 20 73 65 74 73 20 | Associa|te sets |
|00005950| 6f 66 20 72 75 6c 65 73 | 20 77 69 74 68 20 7a 6f |of rules| with zo|
|00005960| 6e 65 73 2e 0a 2a 2f 0a | 0a 2f 2a 0a 2a 2a 20 53 |nes..*/.|./*.** S|
|00005970| 6f 72 74 20 62 79 20 72 | 75 6c 65 20 6e 61 6d 65 |ort by r|ule name|
|00005980| 2c 20 61 6e 64 20 62 79 | 20 6d 61 67 6e 69 74 75 |, and by| magnitu|
|00005990| 64 65 20 6f 66 20 73 74 | 61 6e 64 61 72 64 20 74 |de of st|andard t|
|000059a0| 69 6d 65 20 6f 66 66 73 | 65 74 20 66 6f 72 20 72 |ime offs|et for r|
|000059b0| 75 6c 65 73 20 6f 66 0a | 2a 2a 20 74 68 65 20 73 |ules of.|** the s|
|000059c0| 61 6d 65 20 6e 61 6d 65 | 2e 20 20 54 68 65 20 73 |ame name|. The s|
|000059d0| 65 63 6f 6e 64 20 73 6f | 72 74 20 67 65 74 73 20 |econd so|rt gets |
|000059e0| 73 74 61 6e 64 61 72 64 | 20 74 69 6d 65 20 65 6e |standard| time en|
|000059f0| 74 72 69 65 73 20 74 6f | 20 74 68 65 20 73 74 61 |tries to| the sta|
|00005a00| 72 74 0a 2a 2a 20 6f 66 | 20 74 68 65 20 64 73 69 |rt.** of| the dsi|
|00005a10| 6e 66 6f 20 74 61 62 6c | 65 20 28 61 6e 64 20 77 |nfo tabl|e (and w|
|00005a20| 65 20 77 61 6e 74 20 61 | 20 73 74 61 6e 64 61 72 |e want a| standar|
|00005a30| 64 20 74 69 6d 65 20 65 | 6e 74 72 79 20 61 74 20 |d time e|ntry at |
|00005a40| 74 68 65 20 73 74 61 72 | 74 20 6f 66 0a 2a 2a 20 |the star|t of.** |
|00005a50| 74 68 65 20 74 61 62 6c | 65 2c 20 73 69 6e 63 65 |the tabl|e, since|
|00005a60| 20 74 68 65 20 66 69 72 | 73 74 20 65 6e 74 72 79 | the fir|st entry|
|00005a70| 20 67 65 74 73 20 75 73 | 65 64 20 66 6f 72 20 74 | gets us|ed for t|
|00005a80| 69 6d 65 73 20 6e 6f 74 | 20 63 6f 76 65 72 65 64 |imes not| covered|
|00005a90| 20 62 79 20 74 68 65 0a | 2a 2a 20 72 75 6c 65 73 | by the.|** rules|
|00005aa0| 29 2e 0a 2a 2f 0a 0a 73 | 74 61 74 69 63 0a 72 63 |)..*/..s|tatic.rc|
|00005ab0| 6f 6d 70 28 63 70 31 2c | 20 63 70 32 29 0a 63 68 |omp(cp1,| cp2).ch|
|00005ac0| 61 72 20 2a 09 63 70 31 | 3b 0a 63 68 61 72 20 2a |ar *.cp1|;.char *|
|00005ad0| 09 63 70 32 3b 0a 7b 0a | 09 72 65 67 69 73 74 65 |.cp2;.{.|.registe|
|00005ae0| 72 20 73 74 72 75 63 74 | 20 72 75 6c 65 20 2a 09 |r struct| rule *.|
|00005af0| 72 70 31 3b 0a 09 72 65 | 67 69 73 74 65 72 20 73 |rp1;..re|gister s|
|00005b00| 74 72 75 63 74 20 72 75 | 6c 65 20 2a 09 72 70 32 |truct ru|le *.rp2|
|00005b10| 3b 0a 09 72 65 67 69 73 | 74 65 72 20 6c 6f 6e 67 |;..regis|ter long|
|00005b20| 09 09 6c 31 2c 20 6c 32 | 3b 0a 09 72 65 67 69 73 |..l1, l2|;..regis|
|00005b30| 74 65 72 20 69 6e 74 09 | 09 64 69 66 66 3b 0a 0a |ter int.|.diff;..|
|00005b40| 09 72 70 31 20 3d 20 28 | 73 74 72 75 63 74 20 72 |.rp1 = (|struct r|
|00005b50| 75 6c 65 20 2a 29 20 63 | 70 31 3b 0a 09 72 70 32 |ule *) c|p1;..rp2|
|00005b60| 20 3d 20 28 73 74 72 75 | 63 74 20 72 75 6c 65 20 | = (stru|ct rule |
|00005b70| 2a 29 20 63 70 32 3b 0a | 09 69 66 20 28 28 64 69 |*) cp2;.|.if ((di|
|00005b80| 66 66 20 3d 20 73 74 72 | 63 6d 70 28 72 70 31 2d |ff = str|cmp(rp1-|
|00005b90| 3e 72 5f 6e 61 6d 65 2c | 20 72 70 32 2d 3e 72 5f |>r_name,| rp2->r_|
|00005ba0| 6e 61 6d 65 29 29 20 21 | 3d 20 30 29 0a 09 09 72 |name)) !|= 0)...r|
|00005bb0| 65 74 75 72 6e 20 64 69 | 66 66 3b 0a 09 69 66 20 |eturn di|ff;..if |
|00005bc0| 28 28 6c 31 20 3d 20 72 | 70 31 2d 3e 72 5f 73 74 |((l1 = r|p1->r_st|
|00005bd0| 64 6f 66 66 29 20 3c 20 | 30 29 0a 09 09 6c 31 20 |doff) < |0)...l1 |
|00005be0| 3d 20 2d 6c 31 3b 0a 09 | 69 66 20 28 28 6c 32 20 |= -l1;..|if ((l2 |
|00005bf0| 3d 20 72 70 32 2d 3e 72 | 5f 73 74 64 6f 66 66 29 |= rp2->r|_stdoff)|
|00005c00| 20 3c 20 30 29 0a 09 09 | 6c 32 20 3d 20 2d 6c 32 | < 0)...|l2 = -l2|
|00005c10| 3b 0a 09 69 66 20 28 6c | 31 20 3e 20 6c 32 29 0a |;..if (l|1 > l2).|
|00005c20| 09 09 72 65 74 75 72 6e | 20 31 3b 0a 09 65 6c 73 |..return| 1;..els|
|00005c30| 65 20 69 66 20 28 6c 31 | 20 3c 20 6c 32 29 0a 09 |e if (l1| < l2)..|
|00005c40| 09 72 65 74 75 72 6e 20 | 2d 31 3b 0a 09 65 6c 73 |.return |-1;..els|
|00005c50| 65 09 72 65 74 75 72 6e | 20 30 3b 0a 7d 0a 0a 73 |e.return| 0;.}..s|
|00005c60| 74 61 74 69 63 0a 61 73 | 73 6f 63 69 61 74 65 28 |tatic.as|sociate(|
|00005c70| 29 0a 7b 0a 09 72 65 67 | 69 73 74 65 72 20 73 74 |).{..reg|ister st|
|00005c80| 72 75 63 74 20 7a 6f 6e | 65 20 2a 09 7a 70 3b 0a |ruct zon|e *.zp;.|
|00005c90| 09 72 65 67 69 73 74 65 | 72 20 73 74 72 75 63 74 |.registe|r struct|
|00005ca0| 20 72 75 6c 65 20 2a 09 | 72 70 3b 0a 09 72 65 67 | rule *.|rp;..reg|
|00005cb0| 69 73 74 65 72 20 69 6e | 74 09 09 62 61 73 65 2c |ister in|t..base,|
|00005cc0| 20 6f 75 74 3b 0a 09 72 | 65 67 69 73 74 65 72 20 | out;..r|egister |
|00005cd0| 69 6e 74 09 09 69 3b 0a | 0a 09 69 66 20 28 6e 72 |int..i;.|..if (nr|
|00005ce0| 75 6c 65 73 20 21 3d 20 | 30 29 0a 09 09 28 76 6f |ules != |0)...(vo|
|00005cf0| 69 64 29 20 71 73 6f 72 | 74 28 28 63 68 61 72 20 |id) qsor|t((char |
|00005d00| 2a 29 20 72 75 6c 65 73 | 2c 20 6e 72 75 6c 65 73 |*) rules|, nrules|
|00005d10| 2c 20 73 69 7a 65 6f 66 | 20 2a 72 75 6c 65 73 2c |, sizeof| *rules,|
|00005d20| 20 72 63 6f 6d 70 29 3b | 0a 09 62 61 73 65 20 3d | rcomp);|..base =|
|00005d30| 20 30 3b 0a 09 66 6f 72 | 20 28 69 20 3d 20 30 3b | 0;..for| (i = 0;|
|00005d40| 20 69 20 3c 20 6e 7a 6f | 6e 65 73 3b 20 2b 2b 69 | i < nzo|nes; ++i|
|00005d50| 29 20 7b 0a 09 09 7a 70 | 20 3d 20 26 7a 6f 6e 65 |) {...zp| = &zone|
|00005d60| 73 5b 69 5d 3b 0a 09 09 | 7a 70 2d 3e 7a 5f 72 75 |s[i];...|zp->z_ru|
|00005d70| 6c 65 73 20 3d 20 4e 55 | 4c 4c 3b 0a 09 09 7a 70 |les = NU|LL;...zp|
|00005d80| 2d 3e 7a 5f 6e 72 75 6c | 65 73 20 3d 20 30 3b 0a |->z_nrul|es = 0;.|
|00005d90| 09 7d 0a 09 77 68 69 6c | 65 20 28 62 61 73 65 20 |.}..whil|e (base |
|00005da0| 3c 20 6e 72 75 6c 65 73 | 29 20 7b 0a 09 09 72 70 |< nrules|) {...rp|
|00005db0| 20 3d 20 26 72 75 6c 65 | 73 5b 62 61 73 65 5d 3b | = &rule|s[base];|
|00005dc0| 0a 09 09 66 6f 72 20 28 | 6f 75 74 20 3d 20 62 61 |...for (|out = ba|
|00005dd0| 73 65 20 2b 20 31 3b 20 | 6f 75 74 20 3c 20 6e 72 |se + 1; |out < nr|
|00005de0| 75 6c 65 73 3b 20 2b 2b | 6f 75 74 29 0a 09 09 09 |ules; ++|out)....|
|00005df0| 69 66 20 28 73 74 72 63 | 6d 70 28 72 70 2d 3e 72 |if (strc|mp(rp->r|
|00005e00| 5f 6e 61 6d 65 2c 20 72 | 75 6c 65 73 5b 6f 75 74 |_name, r|ules[out|
|00005e10| 5d 2e 72 5f 6e 61 6d 65 | 29 20 21 3d 20 30 29 0a |].r_name|) != 0).|
|00005e20| 09 09 09 09 62 72 65 61 | 6b 3b 0a 09 09 66 6f 72 |....brea|k;...for|
|00005e30| 20 28 69 20 3d 20 30 3b | 20 69 20 3c 20 6e 7a 6f | (i = 0;| i < nzo|
|00005e40| 6e 65 73 3b 20 2b 2b 69 | 29 20 7b 0a 09 09 09 7a |nes; ++i|) {....z|
|00005e50| 70 20 3d 20 26 7a 6f 6e | 65 73 5b 69 5d 3b 0a 09 |p = &zon|es[i];..|
|00005e60| 09 09 69 66 20 28 73 74 | 72 63 6d 70 28 7a 70 2d |..if (st|rcmp(zp-|
|00005e70| 3e 7a 5f 72 75 6c 65 2c | 20 72 70 2d 3e 72 5f 6e |>z_rule,| rp->r_n|
|00005e80| 61 6d 65 29 20 21 3d 20 | 30 29 0a 09 09 09 09 63 |ame) != |0).....c|
|00005e90| 6f 6e 74 69 6e 75 65 3b | 0a 09 09 09 7a 70 2d 3e |ontinue;|....zp->|
|00005ea0| 7a 5f 72 75 6c 65 73 20 | 3d 20 72 70 3b 0a 09 09 |z_rules |= rp;...|
|00005eb0| 09 7a 70 2d 3e 7a 5f 6e | 72 75 6c 65 73 20 3d 20 |.zp->z_n|rules = |
|00005ec0| 6f 75 74 20 2d 20 62 61 | 73 65 3b 0a 09 09 7d 0a |out - ba|se;...}.|
|00005ed0| 09 09 62 61 73 65 20 3d | 20 6f 75 74 3b 0a 09 7d |..base =| out;..}|
|00005ee0| 0a 09 66 6f 72 20 28 69 | 20 3d 20 30 3b 20 69 20 |..for (i| = 0; i |
|00005ef0| 3c 20 6e 7a 6f 6e 65 73 | 3b 20 2b 2b 69 29 20 7b |< nzones|; ++i) {|
|00005f00| 0a 09 09 7a 70 20 3d 20 | 26 7a 6f 6e 65 73 5b 69 |...zp = |&zones[i|
|00005f10| 5d 3b 0a 09 09 69 66 20 | 28 2a 7a 70 2d 3e 7a 5f |];...if |(*zp->z_|
|00005f20| 72 75 6c 65 20 21 3d 20 | 27 5c 30 27 20 26 26 20 |rule != |'\0' && |
|00005f30| 7a 70 2d 3e 7a 5f 6e 72 | 75 6c 65 73 20 3d 3d 20 |zp->z_nr|ules == |
|00005f40| 30 29 20 7b 0a 09 09 09 | 66 69 6c 65 6e 61 6d 65 |0) {....|filename|
|00005f50| 20 3d 20 7a 70 2d 3e 7a | 5f 66 69 6c 65 6e 61 6d | = zp->z|_filenam|
|00005f60| 65 3b 0a 09 09 09 6c 69 | 6e 65 6e 75 6d 20 3d 20 |e;....li|nenum = |
|00005f70| 7a 70 2d 3e 7a 5f 6c 69 | 6e 65 6e 75 6d 3b 0a 09 |zp->z_li|nenum;..|
|00005f80| 09 09 65 72 72 6f 72 28 | 22 75 6e 72 75 6c 79 20 |..error(|"unruly |
|00005f90| 7a 6f 6e 65 22 29 3b 0a | 09 09 7d 0a 09 7d 0a 09 |zone");.|..}..}..|
|00005fa0| 69 66 20 28 65 72 72 6f | 72 73 29 0a 09 09 77 69 |if (erro|rs)...wi|
|00005fb0| 6c 64 65 78 69 74 28 22 | 75 6e 72 75 6c 79 20 7a |ldexit("|unruly z|
|00005fc0| 6f 6e 65 28 73 29 22 29 | 3b 0a 7d 0a 0a 73 74 61 |one(s)")|;.}..sta|
|00005fd0| 74 69 63 0a 65 72 72 6f | 72 28 73 74 72 69 6e 67 |tic.erro|r(string|
|00005fe0| 29 0a 63 68 61 72 20 2a | 09 73 74 72 69 6e 67 3b |).char *|.string;|
|00005ff0| 0a 7b 0a 09 28 76 6f 69 | 64 29 20 66 70 72 69 6e |.{..(voi|d) fprin|
|00006000| 74 66 28 73 74 64 65 72 | 72 2c 20 22 25 73 3a 20 |tf(stder|r, "%s: |
|00006010| 66 69 6c 65 20 5c 22 25 | 73 5c 22 2c 20 6c 69 6e |file \"%|s\", lin|
|00006020| 65 20 25 64 3a 20 77 69 | 6c 64 20 25 73 5c 6e 22 |e %d: wi|ld %s\n"|
|00006030| 2c 0a 09 09 70 72 6f 67 | 6e 61 6d 65 2c 20 66 69 |,...prog|name, fi|
|00006040| 6c 65 6e 61 6d 65 2c 20 | 6c 69 6e 65 6e 75 6d 2c |lename, |linenum,|
|00006050| 20 73 74 72 69 6e 67 29 | 3b 0a 09 2b 2b 65 72 72 | string)|;..++err|
|00006060| 6f 72 73 3b 0a 7d 0a 0a | 73 74 61 74 69 63 0a 69 |ors;.}..|static.i|
|00006070| 6e 66 69 6c 65 28 6e 61 | 6d 65 29 0a 63 68 61 72 |nfile(na|me).char|
|00006080| 20 2a 09 6e 61 6d 65 3b | 0a 7b 0a 09 72 65 67 69 | *.name;|.{..regi|
|00006090| 73 74 65 72 20 46 49 4c | 45 20 2a 09 09 09 66 70 |ster FIL|E *...fp|
|000060a0| 3b 0a 09 72 65 67 69 73 | 74 65 72 20 63 68 61 72 |;..regis|ter char|
|000060b0| 20 2a 2a 09 09 66 69 65 | 6c 64 73 3b 0a 09 72 65 | **..fie|lds;..re|
|000060c0| 67 69 73 74 65 72 20 63 | 68 61 72 20 2a 09 09 09 |gister c|har *...|
|000060d0| 63 70 3b 0a 09 72 65 67 | 69 73 74 65 72 20 73 74 |cp;..reg|ister st|
|000060e0| 72 75 63 74 20 6c 6f 6f | 6b 75 70 20 2a 09 6c 70 |ruct loo|kup *.lp|
|000060f0| 3b 0a 09 72 65 67 69 73 | 74 65 72 20 69 6e 74 09 |;..regis|ter int.|
|00006100| 09 09 6e 66 69 65 6c 64 | 73 3b 0a 09 63 68 61 72 |..nfield|s;..char|
|00006110| 09 09 09 09 62 75 66 5b | 42 55 46 53 49 5a 5d 3b |....buf[|BUFSIZ];|
|00006120| 0a 0a 09 69 66 20 28 73 | 74 72 63 6d 70 28 6e 61 |...if (s|trcmp(na|
|00006130| 6d 65 2c 20 22 2d 22 29 | 20 3d 3d 20 30 29 20 7b |me, "-")| == 0) {|
|00006140| 0a 09 09 6e 61 6d 65 20 | 3d 20 22 73 74 61 6e 64 |...name |= "stand|
|00006150| 61 72 64 20 69 6e 70 75 | 74 22 3b 0a 09 09 66 70 |ard inpu|t";...fp|
|00006160| 20 3d 20 73 74 64 69 6e | 3b 0a 09 7d 20 65 6c 73 | = stdin|;..} els|
|00006170| 65 20 69 66 20 28 28 66 | 70 20 3d 20 66 6f 70 65 |e if ((f|p = fope|
|00006180| 6e 28 6e 61 6d 65 2c 20 | 22 72 22 29 29 20 3d 3d |n(name, |"r")) ==|
|00006190| 20 4e 55 4c 4c 29 0a 09 | 09 77 69 6c 64 32 65 78 | NULL)..|.wild2ex|
|000061a0| 69 74 28 22 72 65 73 75 | 6c 74 20 6f 70 65 6e 69 |it("resu|lt openi|
|000061b0| 6e 67 22 2c 20 6e 61 6d | 65 29 3b 0a 09 66 69 6c |ng", nam|e);..fil|
|000061c0| 65 6e 61 6d 65 20 3d 20 | 65 61 6c 6c 6f 63 70 79 |ename = |eallocpy|
|000061d0| 28 6e 61 6d 65 29 3b 0a | 09 66 6f 72 20 28 6c 69 |(name);.|.for (li|
|000061e0| 6e 65 6e 75 6d 20 3d 20 | 31 3b 20 3b 20 2b 2b 6c |nenum = |1; ; ++l|
|000061f0| 69 6e 65 6e 75 6d 29 20 | 7b 0a 09 09 69 66 20 28 |inenum) |{...if (|
|00006200| 66 67 65 74 73 28 62 75 | 66 2c 20 73 69 7a 65 6f |fgets(bu|f, sizeo|
|00006210| 66 20 62 75 66 2c 20 66 | 70 29 20 21 3d 20 62 75 |f buf, f|p) != bu|
|00006220| 66 29 0a 09 09 09 62 72 | 65 61 6b 3b 0a 09 09 63 |f)....br|eak;...c|
|00006230| 70 20 3d 20 73 74 72 63 | 68 72 28 62 75 66 2c 20 |p = strc|hr(buf, |
|00006240| 27 5c 6e 27 29 3b 0a 09 | 09 69 66 20 28 63 70 20 |'\n');..|.if (cp |
|00006250| 3d 3d 20 4e 55 4c 4c 29 | 20 7b 0a 09 09 09 65 72 |== NULL)| {....er|
|00006260| 72 6f 72 28 22 6c 6f 6e | 67 20 6c 69 6e 65 22 29 |ror("lon|g line")|
|00006270| 3b 0a 09 09 09 77 69 6c | 64 65 78 69 74 28 22 69 |;....wil|dexit("i|
|00006280| 6e 70 75 74 20 64 61 74 | 61 22 29 3b 0a 09 09 7d |nput dat|a");...}|
|00006290| 0a 09 09 2a 63 70 20 3d | 20 27 5c 30 27 3b 0a 09 |...*cp =| '\0';..|
|000062a0| 09 69 66 20 28 28 66 69 | 65 6c 64 73 20 3d 20 67 |.if ((fi|elds = g|
|000062b0| 65 74 66 69 65 6c 64 73 | 28 62 75 66 29 29 20 3d |etfields|(buf)) =|
|000062c0| 3d 20 4e 55 4c 4c 29 0a | 09 09 09 77 69 6c 64 72 |= NULL).|...wildr|
|000062d0| 65 78 69 74 28 22 67 65 | 74 66 69 65 6c 64 73 22 |exit("ge|tfields"|
|000062e0| 29 3b 0a 09 09 6e 66 69 | 65 6c 64 73 20 3d 20 30 |);...nfi|elds = 0|
|000062f0| 3b 0a 09 09 77 68 69 6c | 65 20 28 66 69 65 6c 64 |;...whil|e (field|
|00006300| 73 5b 6e 66 69 65 6c 64 | 73 5d 20 21 3d 20 4e 55 |s[nfield|s] != NU|
|00006310| 4c 4c 29 20 7b 0a 09 09 | 09 69 66 20 28 63 69 65 |LL) {...|.if (cie|
|00006320| 71 75 61 6c 28 66 69 65 | 6c 64 73 5b 6e 66 69 65 |qual(fie|lds[nfie|
|00006330| 6c 64 73 5d 2c 20 22 2d | 22 29 29 0a 09 09 09 09 |lds], "-|")).....|
|00006340| 66 69 65 6c 64 73 5b 6e | 66 69 65 6c 64 73 5d 20 |fields[n|fields] |
|00006350| 3d 20 22 22 3b 0a 09 09 | 09 2b 2b 6e 66 69 65 6c |= "";...|.++nfiel|
|00006360| 64 73 3b 0a 09 09 7d 0a | 09 09 69 66 20 28 6e 66 |ds;...}.|..if (nf|
|00006370| 69 65 6c 64 73 20 3e 20 | 30 29 09 2f 2a 20 6e 6f |ields > |0)./* no|
|00006380| 6e 2d 62 6c 61 6e 6b 20 | 6c 69 6e 65 20 2a 2f 0a |n-blank |line */.|
|00006390| 09 09 09 69 66 20 28 28 | 6c 70 20 3d 20 62 79 77 |...if ((|lp = byw|
|000063a0| 6f 72 64 28 66 69 65 6c | 64 73 5b 30 5d 2c 20 6c |ord(fiel|ds[0], l|
|000063b0| 69 6e 65 5f 63 6f 64 65 | 73 29 29 20 3d 3d 20 4e |ine_code|s)) == N|
|000063c0| 55 4c 4c 29 0a 09 09 09 | 09 65 72 72 6f 72 28 22 |ULL)....|.error("|
|000063d0| 69 6e 70 75 74 20 6c 69 | 6e 65 20 6f 66 20 75 6e |input li|ne of un|
|000063e0| 6b 6e 6f 77 6e 20 74 79 | 70 65 22 29 3b 0a 09 09 |known ty|pe");...|
|000063f0| 09 65 6c 73 65 20 73 77 | 69 74 63 68 20 28 6c 70 |.else sw|itch (lp|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.