home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| data
| 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 20 76 32 32 69 30 32 |Subject:| v22i02|
|00000010| 33 3a 20 20 45 72 72 6f | 72 20 74 61 62 6c 65 20 |3: Erro|r table |
|00000020| 63 6f 6d 70 69 6c 65 72 | 20 61 6e 64 20 6c 69 62 |compiler| and lib|
|00000030| 72 61 72 79 2c 20 50 61 | 72 74 30 32 2f 30 33 0a |rary, Pa|rt02/03.|
|00000040| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000050| 2e 73 6f 75 72 63 65 73 | 2e 75 6e 69 78 0a 41 70 |.sources|.unix.Ap|
|00000060| 70 72 6f 76 65 64 3a 20 | 72 73 61 6c 7a 40 75 75 |proved: |rsalz@uu|
|00000070| 6e 65 74 2e 55 55 2e 4e | 45 54 0a 58 2d 43 68 65 |net.UU.N|ET.X-Che|
|00000080| 63 6b 73 75 6d 2d 53 6e | 65 66 72 75 3a 20 35 35 |cksum-Sn|efru: 55|
|00000090| 36 37 62 65 35 35 20 30 | 37 33 36 35 39 61 31 20 |67be55 0|73659a1 |
|000000a0| 38 63 37 38 65 35 66 34 | 20 61 33 33 35 30 61 37 |8c78e5f4| a3350a7|
|000000b0| 61 0a 0a 53 75 62 6d 69 | 74 74 65 64 2d 62 79 3a |a..Submi|tted-by:|
|000000c0| 20 22 4a 6f 6e 61 74 68 | 61 6e 20 49 2e 20 4b 61 | "Jonath|an I. Ka|
|000000d0| 6d 65 6e 73 22 20 3c 6a | 69 6b 40 70 69 74 2d 6d |mens" <j|ik@pit-m|
|000000e0| 61 6e 61 67 65 72 2e 6d | 69 74 2e 65 64 75 3e 0a |anager.m|it.edu>.|
|000000f0| 50 6f 73 74 69 6e 67 2d | 6e 75 6d 62 65 72 3a 20 |Posting-|number: |
|00000100| 56 6f 6c 75 6d 65 20 32 | 32 2c 20 49 73 73 75 65 |Volume 2|2, Issue|
|00000110| 20 32 33 0a 41 72 63 68 | 69 76 65 2d 6e 61 6d 65 | 23.Arch|ive-name|
|00000120| 3a 20 65 74 2f 70 61 72 | 74 30 32 0a 0a 5b 20 20 |: et/par|t02..[ |
|00000130| 54 68 65 72 65 20 61 72 | 65 20 61 20 63 6f 75 70 |There ar|e a coup|
|00000140| 6c 65 20 6f 66 20 63 6f | 6e 74 72 6f 6c 20 63 68 |le of co|ntrol ch|
|00000150| 61 72 61 63 74 65 72 73 | 3a 0a 09 46 6f 75 6e 64 |aracters|:..Found|
|00000160| 20 31 20 63 6f 6e 74 72 | 6f 6c 20 63 68 61 72 20 | 1 contr|ol char |
|00000170| 69 6e 20 22 27 63 6f 6d | 5f 65 72 72 2e 74 65 78 |in "'com|_err.tex|
|00000180| 69 6e 66 6f 27 22 0a 09 | 46 6f 75 6e 64 20 31 35 |info'"..|Found 15|
|00000190| 20 63 6f 6e 74 72 6f 6c | 20 63 68 61 72 73 20 69 | control| chars i|
|000001a0| 6e 20 22 27 74 65 78 69 | 6e 66 6f 2e 74 65 78 2e |n "'texi|nfo.tex.|
|000001b0| 32 27 22 0a 20 20 2d 2d | 72 24 20 20 5d 0a 0a 23 |2'". --|r$ ]..#|
|000001c0| 21 20 2f 62 69 6e 2f 73 | 68 0a 23 20 54 68 69 73 |! /bin/s|h.# This|
|000001d0| 20 69 73 20 61 20 73 68 | 65 6c 6c 20 61 72 63 68 | is a sh|ell arch|
|000001e0| 69 76 65 2e 20 20 52 65 | 6d 6f 76 65 20 61 6e 79 |ive. Re|move any|
|000001f0| 74 68 69 6e 67 20 62 65 | 66 6f 72 65 20 74 68 69 |thing be|fore thi|
|00000200| 73 20 6c 69 6e 65 2c 20 | 74 68 65 6e 20 75 6e 70 |s line, |then unp|
|00000210| 61 63 6b 0a 23 20 69 74 | 20 62 79 20 73 61 76 69 |ack.# it| by savi|
|00000220| 6e 67 20 69 74 20 69 6e | 74 6f 20 61 20 66 69 6c |ng it in|to a fil|
|00000230| 65 20 61 6e 64 20 74 79 | 70 69 6e 67 20 22 73 68 |e and ty|ping "sh|
|00000240| 20 66 69 6c 65 22 2e 20 | 20 54 6f 20 6f 76 65 72 | file". | To over|
|00000250| 77 72 69 74 65 20 65 78 | 69 73 74 69 6e 67 0a 23 |write ex|isting.#|
|00000260| 20 66 69 6c 65 73 2c 20 | 74 79 70 65 20 22 73 68 | files, |type "sh|
|00000270| 20 66 69 6c 65 20 2d 63 | 22 2e 20 20 59 6f 75 20 | file -c|". You |
|00000280| 63 61 6e 20 61 6c 73 6f | 20 66 65 65 64 20 74 68 |can also| feed th|
|00000290| 69 73 20 61 73 20 73 74 | 61 6e 64 61 72 64 20 69 |is as st|andard i|
|000002a0| 6e 70 75 74 20 76 69 61 | 0a 23 20 75 6e 73 68 61 |nput via|.# unsha|
|000002b0| 72 2c 20 6f 72 20 62 79 | 20 74 79 70 69 6e 67 20 |r, or by| typing |
|000002c0| 22 73 68 20 3c 66 69 6c | 65 22 2c 20 65 2e 67 2e |"sh <fil|e", e.g.|
|000002d0| 2e 20 20 49 66 20 74 68 | 69 73 20 61 72 63 68 69 |. If th|is archi|
|000002e0| 76 65 20 69 73 20 63 6f | 6d 70 6c 65 74 65 2c 20 |ve is co|mplete, |
|000002f0| 79 6f 75 0a 23 20 77 69 | 6c 6c 20 73 65 65 20 74 |you.# wi|ll see t|
|00000300| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 6d 65 73 |he follo|wing mes|
|00000310| 73 61 67 65 20 61 74 20 | 74 68 65 20 65 6e 64 3a |sage at |the end:|
|00000320| 0a 23 09 09 22 45 6e 64 | 20 6f 66 20 61 72 63 68 |.#.."End| of arch|
|00000330| 69 76 65 20 32 20 28 6f | 66 20 33 29 2e 22 0a 23 |ive 2 (o|f 3).".#|
|00000340| 20 43 6f 6e 74 65 6e 74 | 73 3a 20 20 63 6f 6d 5f | Content|s: com_|
|00000350| 65 72 72 2e 74 65 78 69 | 6e 66 6f 20 74 65 78 69 |err.texi|nfo texi|
|00000360| 6e 66 6f 2e 74 65 78 2e | 32 0a 23 20 57 72 61 70 |nfo.tex.|2.# Wrap|
|00000370| 70 65 64 20 62 79 20 72 | 73 61 6c 7a 40 6c 69 74 |ped by r|salz@lit|
|00000380| 63 68 69 2e 62 62 6e 2e | 63 6f 6d 20 6f 6e 20 4d |chi.bbn.|com on M|
|00000390| 6f 6e 20 4d 61 79 20 20 | 37 20 31 36 3a 34 30 3a |on May |7 16:40:|
|000003a0| 33 34 20 31 39 39 30 0a | 50 41 54 48 3d 2f 62 69 |34 1990.|PATH=/bi|
|000003b0| 6e 3a 2f 75 73 72 2f 62 | 69 6e 3a 2f 75 73 72 2f |n:/usr/b|in:/usr/|
|000003c0| 75 63 62 20 3b 20 65 78 | 70 6f 72 74 20 50 41 54 |ucb ; ex|port PAT|
|000003d0| 48 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 63 6f |H.if tes|t -f 'co|
|000003e0| 6d 5f 65 72 72 2e 74 65 | 78 69 6e 66 6f 27 20 2d |m_err.te|xinfo' -|
|000003f0| 61 20 22 24 7b 31 7d 22 | 20 21 3d 20 22 2d 63 22 |a "${1}"| != "-c"|
|00000400| 20 3b 20 74 68 65 6e 20 | 0a 20 20 65 63 68 6f 20 | ; then |. echo |
|00000410| 73 68 61 72 3a 20 57 69 | 6c 6c 20 6e 6f 74 20 63 |shar: Wi|ll not c|
|00000420| 6c 6f 62 62 65 72 20 65 | 78 69 73 74 69 6e 67 20 |lobber e|xisting |
|00000430| 66 69 6c 65 20 5c 22 27 | 63 6f 6d 5f 65 72 72 2e |file \"'|com_err.|
|00000440| 74 65 78 69 6e 66 6f 27 | 5c 22 0a 65 6c 73 65 0a |texinfo'|\".else.|
|00000450| 65 63 68 6f 20 73 68 61 | 72 3a 20 45 78 74 72 61 |echo sha|r: Extra|
|00000460| 63 74 69 6e 67 20 5c 22 | 27 63 6f 6d 5f 65 72 72 |cting \"|'com_err|
|00000470| 2e 74 65 78 69 6e 66 6f | 27 5c 22 20 5c 28 32 31 |.texinfo|'\" \(21|
|00000480| 37 33 38 20 63 68 61 72 | 61 63 74 65 72 73 5c 29 |738 char|acters\)|
|00000490| 0a 73 65 64 20 22 73 2f | 5e 58 2f 2f 22 20 3e 27 |.sed "s/|^X//" >'|
|000004a0| 63 6f 6d 5f 65 72 72 2e | 74 65 78 69 6e 66 6f 27 |com_err.|texinfo'|
|000004b0| 20 3c 3c 27 45 4e 44 5f | 4f 46 5f 46 49 4c 45 27 | <<'END_|OF_FILE'|
|000004c0| 0a 58 5c 69 6e 70 75 74 | 20 74 65 78 69 6e 66 6f |.X\input| texinfo|
|000004d0| 20 40 63 20 2d 2a 2d 74 | 65 78 69 6e 66 6f 2d 2a | @c -*-t|exinfo-*|
|000004e0| 2d 0a 58 0a 58 40 63 20 | 24 48 65 61 64 65 72 24 |-.X.X@c |$Header$|
|000004f0| 0a 58 40 63 20 24 53 6f | 75 72 63 65 24 0a 58 40 |.X@c $So|urce$.X@|
|00000500| 63 20 24 4c 6f 63 6b 65 | 72 24 0a 58 0a 58 40 63 |c $Locke|r$.X.X@c|
|00000510| 20 4e 6f 74 65 20 74 68 | 61 74 20 61 6c 74 68 6f | Note th|at altho|
|00000520| 75 67 68 20 74 68 69 73 | 20 73 6f 75 72 63 65 20 |ugh this| source |
|00000530| 66 69 6c 65 20 69 73 20 | 69 6e 20 74 65 78 69 6e |file is |in texin|
|00000540| 66 6f 20 66 6f 72 6d 61 | 74 20 28 6d 6f 72 65 0a |fo forma|t (more.|
|00000550| 58 40 63 20 6f 72 20 6c | 65 73 73 29 2c 20 69 74 |X@c or l|ess), it|
|00000560| 20 69 73 20 6e 6f 74 20 | 79 65 74 20 73 75 69 74 | is not |yet suit|
|00000570| 61 62 6c 65 20 66 6f 72 | 20 74 75 72 6e 69 6e 67 |able for| turning|
|00000580| 20 69 6e 74 6f 20 61 6e | 20 60 60 69 6e 66 6f 27 | into an| ``info'|
|00000590| 27 0a 58 40 63 20 66 69 | 6c 65 2e 20 20 53 6f 72 |'.X@c fi|le. Sor|
|000005a0| 72 79 2c 20 6d 61 79 62 | 65 20 6e 65 78 74 20 74 |ry, mayb|e next t|
|000005b0| 69 6d 65 2e 0a 58 40 63 | 0a 58 40 63 20 49 6e 20 |ime..X@c|.X@c In |
|000005c0| 6f 72 64 65 72 20 74 6f | 20 70 72 6f 64 75 63 65 |order to| produce|
|000005d0| 20 68 61 72 64 63 6f 70 | 79 20 64 6f 63 75 6d 65 | hardcop|y docume|
|000005e0| 6e 74 61 74 69 6f 6e 20 | 66 72 6f 6d 20 61 20 74 |ntation |from a t|
|000005f0| 65 78 69 6e 66 6f 20 66 | 69 6c 65 2c 0a 58 40 63 |exinfo f|ile,.X@c|
|00000600| 20 72 75 6e 20 60 60 74 | 65 78 20 63 6f 6d 5f 65 | run ``t|ex com_e|
|00000610| 72 72 2e 74 65 78 69 6e | 66 6f 27 27 20 77 68 69 |rr.texin|fo'' whi|
|00000620| 63 68 20 77 69 6c 6c 20 | 6c 6f 61 64 20 69 6e 20 |ch will |load in |
|00000630| 74 65 78 69 6e 66 6f 2e | 74 65 78 2c 0a 58 40 63 |texinfo.|tex,.X@c|
|00000640| 20 70 72 6f 76 69 64 65 | 64 20 69 6e 20 74 68 69 | provide|d in thi|
|00000650| 73 20 64 69 73 74 72 69 | 62 75 74 69 6f 6e 2e 20 |s distri|bution. |
|00000660| 20 28 74 65 78 69 6e 66 | 6f 2e 74 65 78 20 69 73 | (texinf|o.tex is|
|00000670| 20 66 72 6f 6d 20 74 68 | 65 20 46 72 65 65 0a 58 | from th|e Free.X|
|00000680| 40 63 20 53 6f 66 74 77 | 61 72 65 20 46 6f 75 6e |@c Softw|are Foun|
|00000690| 64 61 74 69 6f 6e 2c 20 | 61 6e 64 20 69 73 20 75 |dation, |and is u|
|000006a0| 6e 64 65 72 20 64 69 66 | 66 65 72 65 6e 74 20 63 |nder dif|ferent c|
|000006b0| 6f 70 79 72 69 67 68 74 | 20 72 65 73 74 72 69 63 |opyright| restric|
|000006c0| 74 69 6f 6e 73 0a 58 40 | 63 20 66 72 6f 6d 20 74 |tions.X@|c from t|
|000006d0| 68 65 20 72 65 73 74 20 | 6f 66 20 74 68 69 73 20 |he rest |of this |
|000006e0| 70 61 63 6b 61 67 65 2e | 29 0a 58 0a 58 40 69 66 |package.|).X.X@if|
|000006f0| 69 6e 66 6f 0a 58 40 62 | 61 72 66 6f 0a 58 40 65 |info.X@b|arfo.X@e|
|00000700| 6e 64 20 69 66 69 6e 66 | 6f 0a 58 0a 58 40 69 66 |nd ifinf|o.X.X@if|
|00000710| 74 65 78 0a 58 40 74 6f | 6c 65 72 61 6e 63 65 20 |tex.X@to|lerance |
|00000720| 31 30 30 30 30 0a 58 0a | 58 40 63 20 4d 75 74 61 |10000.X.|X@c Muta|
|00000730| 74 65 20 73 65 63 74 69 | 6f 6e 20 68 65 61 64 65 |te secti|on heade|
|00000740| 72 73 2e 2e 2e 0a 58 40 | 62 65 67 69 6e 67 72 6f |rs....X@|begingro|
|00000750| 75 70 0a 58 20 20 40 63 | 61 74 63 6f 64 65 11 23 |up.X @c|atcode.#|
|00000760| 3d 36 0a 58 20 20 40 67 | 64 65 66 40 73 65 63 68 |=6.X @g|def@sech|
|00000770| 65 61 64 69 6e 67 23 31 | 23 32 23 33 7b 40 73 65 |eading#1|#2#3{@se|
|00000780| 63 68 65 61 64 69 6e 67 | 69 20 7b 23 33 40 65 6e |cheading|i {#3@en|
|00000790| 73 70 61 63 65 20 23 31 | 7d 7d 0a 58 40 65 6e 64 |space #1|}}.X@end|
|000007a0| 67 72 6f 75 70 0a 58 40 | 65 6e 64 20 69 66 74 65 |group.X@|end ifte|
|000007b0| 78 0a 58 0a 58 40 73 65 | 74 66 69 6c 65 6e 61 6d |x.X.X@se|tfilenam|
|000007c0| 65 20 63 6f 6d 5f 65 72 | 72 0a 58 40 73 65 74 74 |e com_er|r.X@sett|
|000007d0| 69 74 6c 65 20 41 20 43 | 6f 6d 6d 6f 6e 20 45 72 |itle A C|ommon Er|
|000007e0| 72 6f 72 20 44 65 73 63 | 72 69 70 74 69 6f 6e 20 |ror Desc|ription |
|000007f0| 4c 69 62 72 61 72 79 20 | 66 6f 72 20 55 4e 49 58 |Library |for UNIX|
|00000800| 0a 58 0a 58 40 69 66 69 | 6e 66 6f 0a 58 54 68 69 |.X.X@ifi|nfo.XThi|
|00000810| 73 20 66 69 6c 65 20 64 | 6f 63 75 6d 65 6e 74 73 |s file d|ocuments|
|00000820| 20 74 68 65 20 75 73 65 | 20 6f 66 20 74 68 65 20 | the use| of the |
|00000830| 43 6f 6d 6d 6f 6e 20 45 | 72 72 6f 72 20 44 65 73 |Common E|rror Des|
|00000840| 63 72 69 70 74 69 6f 6e | 20 6c 69 62 72 61 72 79 |cription| library|
|00000850| 2e 0a 58 0a 58 43 6f 70 | 79 72 69 67 68 74 20 28 |..X.XCop|yright (|
|00000860| 43 29 20 31 39 38 37 2c | 20 31 39 38 38 20 53 74 |C) 1987,| 1988 St|
|00000870| 75 64 65 6e 74 20 49 6e | 66 6f 72 6d 61 74 69 6f |udent In|formatio|
|00000880| 6e 20 50 72 6f 63 65 73 | 73 69 6e 67 20 42 6f 61 |n Proces|sing Boa|
|00000890| 72 64 20 6f 66 20 74 68 | 65 0a 58 4d 61 73 73 61 |rd of th|e.XMassa|
|000008a0| 63 68 75 73 65 74 74 73 | 20 49 6e 73 74 69 74 75 |chusetts| Institu|
|000008b0| 74 65 20 6f 66 20 54 65 | 63 68 6e 6f 6c 6f 67 79 |te of Te|chnology|
|000008c0| 2e 0a 58 0a 58 50 65 72 | 6d 69 73 73 69 6f 6e 20 |..X.XPer|mission |
|000008d0| 74 6f 20 75 73 65 2c 20 | 63 6f 70 79 2c 20 6d 6f |to use, |copy, mo|
|000008e0| 64 69 66 79 2c 20 61 6e | 64 20 64 69 73 74 72 69 |dify, an|d distri|
|000008f0| 62 75 74 65 20 74 68 69 | 73 20 73 6f 66 74 77 61 |bute thi|s softwa|
|00000900| 72 65 20 61 6e 64 20 69 | 74 73 0a 58 64 6f 63 75 |re and i|ts.Xdocu|
|00000910| 6d 65 6e 74 61 74 69 6f | 6e 20 66 6f 72 20 61 6e |mentatio|n for an|
|00000920| 79 20 70 75 72 70 6f 73 | 65 20 61 6e 64 20 77 69 |y purpos|e and wi|
|00000930| 74 68 6f 75 74 20 66 65 | 65 20 69 73 20 68 65 72 |thout fe|e is her|
|00000940| 65 62 79 20 67 72 61 6e | 74 65 64 2c 20 70 72 6f |eby gran|ted, pro|
|00000950| 76 69 64 65 64 0a 58 74 | 68 61 74 20 74 68 65 20 |vided.Xt|hat the |
|00000960| 61 62 6f 76 65 20 63 6f | 70 79 72 69 67 68 74 20 |above co|pyright |
|00000970| 6e 6f 74 69 63 65 20 61 | 70 70 65 61 72 20 69 6e |notice a|ppear in|
|00000980| 20 61 6c 6c 20 63 6f 70 | 69 65 73 20 61 6e 64 20 | all cop|ies and |
|00000990| 74 68 61 74 20 62 6f 74 | 68 20 74 68 61 74 0a 58 |that bot|h that.X|
|000009a0| 63 6f 70 79 72 69 67 68 | 74 20 6e 6f 74 69 63 65 |copyrigh|t notice|
|000009b0| 20 61 6e 64 20 74 68 69 | 73 20 70 65 72 6d 69 73 | and thi|s permis|
|000009c0| 73 69 6f 6e 20 6e 6f 74 | 69 63 65 20 61 70 70 65 |sion not|ice appe|
|000009d0| 61 72 20 69 6e 20 73 75 | 70 70 6f 72 74 69 6e 67 |ar in su|pporting|
|000009e0| 0a 58 64 6f 63 75 6d 65 | 6e 74 61 74 69 6f 6e 2c |.Xdocume|ntation,|
|000009f0| 20 61 6e 64 20 74 68 61 | 74 20 74 68 65 20 6e 61 | and tha|t the na|
|00000a00| 6d 65 73 20 6f 66 20 4d | 2e 49 2e 54 2e 20 61 6e |mes of M|.I.T. an|
|00000a10| 64 20 74 68 65 20 4d 2e | 49 2e 54 2e 20 53 2e 49 |d the M.|I.T. S.I|
|00000a20| 2e 50 2e 42 2e 20 6e 6f | 74 20 62 65 0a 58 75 73 |.P.B. no|t be.Xus|
|00000a30| 65 64 20 69 6e 20 61 64 | 76 65 72 74 69 73 69 6e |ed in ad|vertisin|
|00000a40| 67 20 6f 72 20 70 75 62 | 6c 69 63 69 74 79 20 70 |g or pub|licity p|
|00000a50| 65 72 74 61 69 6e 69 6e | 67 20 74 6f 20 64 69 73 |ertainin|g to dis|
|00000a60| 74 72 69 62 75 74 69 6f | 6e 20 6f 66 20 74 68 65 |tributio|n of the|
|00000a70| 20 73 6f 66 74 77 61 72 | 65 0a 58 77 69 74 68 6f | softwar|e.Xwitho|
|00000a80| 75 74 20 73 70 65 63 69 | 66 69 63 2c 20 77 72 69 |ut speci|fic, wri|
|00000a90| 74 74 65 6e 20 70 72 69 | 6f 72 20 70 65 72 6d 69 |tten pri|or permi|
|00000aa0| 73 73 69 6f 6e 2e 20 20 | 4d 2e 49 2e 54 2e 20 61 |ssion. |M.I.T. a|
|00000ab0| 6e 64 20 74 68 65 20 4d | 2e 49 2e 54 2e 20 53 2e |nd the M|.I.T. S.|
|00000ac0| 49 2e 50 2e 42 2e 0a 58 | 6d 61 6b 65 20 6e 6f 20 |I.P.B..X|make no |
|00000ad0| 72 65 70 72 65 73 65 6e | 74 61 74 69 6f 6e 73 20 |represen|tations |
|00000ae0| 61 62 6f 75 74 20 74 68 | 65 20 73 75 69 74 61 62 |about th|e suitab|
|00000af0| 69 6c 69 74 79 20 6f 66 | 20 74 68 69 73 20 73 6f |ility of| this so|
|00000b00| 66 74 77 61 72 65 20 66 | 6f 72 20 61 6e 79 0a 58 |ftware f|or any.X|
|00000b10| 70 75 72 70 6f 73 65 2e | 20 20 49 74 20 69 73 20 |purpose.| It is |
|00000b20| 70 72 6f 76 69 64 65 64 | 20 22 61 73 20 69 73 22 |provided| "as is"|
|00000b30| 20 77 69 74 68 6f 75 74 | 20 65 78 70 72 65 73 73 | without| express|
|00000b40| 20 6f 72 20 69 6d 70 6c | 69 65 64 20 77 61 72 72 | or impl|ied warr|
|00000b50| 61 6e 74 79 2e 0a 58 0a | 58 4e 6f 74 65 20 74 68 |anty..X.|XNote th|
|00000b60| 61 74 20 74 68 65 20 66 | 69 6c 65 20 74 65 78 69 |at the f|ile texi|
|00000b70| 6e 66 6f 2e 74 65 78 2c | 20 70 72 6f 76 69 64 65 |nfo.tex,| provide|
|00000b80| 64 20 77 69 74 68 20 74 | 68 69 73 20 64 69 73 74 |d with t|his dist|
|00000b90| 72 69 62 75 74 69 6f 6e | 2c 20 69 73 20 66 72 6f |ribution|, is fro|
|00000ba0| 6d 0a 58 74 68 65 20 46 | 72 65 65 20 53 6f 66 74 |m.Xthe F|ree Soft|
|00000bb0| 77 61 72 65 20 46 6f 75 | 6e 64 61 74 69 6f 6e 2c |ware Fou|ndation,|
|00000bc0| 20 61 6e 64 20 69 73 20 | 75 6e 64 65 72 20 64 69 | and is |under di|
|00000bd0| 66 66 65 72 65 6e 74 20 | 63 6f 70 79 72 69 67 68 |fferent |copyrigh|
|00000be0| 74 20 72 65 73 74 72 69 | 63 74 69 6f 6e 73 0a 58 |t restri|ctions.X|
|00000bf0| 66 72 6f 6d 20 74 68 65 | 20 72 65 6d 61 69 6e 64 |from the| remaind|
|00000c00| 65 72 20 6f 66 20 74 68 | 69 73 20 70 61 63 6b 61 |er of th|is packa|
|00000c10| 67 65 2e 0a 58 0a 58 40 | 65 6e 64 20 69 66 69 6e |ge..X.X@|end ifin|
|00000c20| 66 6f 0a 58 0a 58 40 69 | 67 6e 6f 72 65 0a 58 50 |fo.X.X@i|gnore.XP|
|00000c30| 65 72 6d 69 73 73 69 6f | 6e 20 69 73 20 67 72 61 |ermissio|n is gra|
|00000c40| 6e 74 65 64 20 74 6f 20 | 70 72 6f 63 65 73 73 20 |nted to |process |
|00000c50| 74 68 69 73 20 66 69 6c | 65 20 74 68 72 6f 75 67 |this fil|e throug|
|00000c60| 68 20 54 65 78 20 61 6e | 64 20 70 72 69 6e 74 20 |h Tex an|d print |
|00000c70| 74 68 65 0a 58 72 65 73 | 75 6c 74 73 2c 20 70 72 |the.Xres|ults, pr|
|00000c80| 6f 76 69 64 65 64 20 74 | 68 65 20 70 72 69 6e 74 |ovided t|he print|
|00000c90| 65 64 20 64 6f 63 75 6d | 65 6e 74 20 63 61 72 72 |ed docum|ent carr|
|00000ca0| 69 65 73 20 63 6f 70 79 | 69 6e 67 20 70 65 72 6d |ies copy|ing perm|
|00000cb0| 69 73 73 69 6f 6e 0a 58 | 6e 6f 74 69 63 65 20 69 |ission.X|notice i|
|00000cc0| 64 65 6e 74 69 63 61 6c | 20 74 6f 20 74 68 69 73 |dentical| to this|
|00000cd0| 20 6f 6e 65 20 65 78 63 | 65 70 74 20 66 6f 72 20 | one exc|ept for |
|00000ce0| 74 68 65 20 72 65 6d 6f | 76 61 6c 20 6f 66 20 74 |the remo|val of t|
|00000cf0| 68 69 73 20 70 61 72 61 | 67 72 61 70 68 0a 58 28 |his para|graph.X(|
|00000d00| 74 68 69 73 20 70 61 72 | 61 67 72 61 70 68 20 6e |this par|agraph n|
|00000d10| 6f 74 20 62 65 69 6e 67 | 20 72 65 6c 65 76 61 6e |ot being| relevan|
|00000d20| 74 20 74 6f 20 74 68 65 | 20 70 72 69 6e 74 65 64 |t to the| printed|
|00000d30| 20 6d 61 6e 75 61 6c 29 | 2e 0a 58 0a 58 40 65 6e | manual)|..X.X@en|
|00000d40| 64 20 69 67 6e 6f 72 65 | 0a 58 0a 58 40 73 65 74 |d ignore|.X.X@set|
|00000d50| 63 68 61 70 74 65 72 6e | 65 77 70 61 67 65 20 6f |chaptern|ewpage o|
|00000d60| 64 64 0a 58 0a 58 40 74 | 69 74 6c 65 70 61 67 65 |dd.X.X@t|itlepage|
|00000d70| 0a 58 40 63 65 6e 74 65 | 72 20 40 74 69 74 6c 65 |.X@cente|r @title|
|00000d80| 66 6f 6e 74 7b 41 20 43 | 6f 6d 6d 6f 6e 20 45 72 |font{A C|ommon Er|
|00000d90| 72 6f 72 20 44 65 73 63 | 72 69 70 74 69 6f 6e 7d |ror Desc|ription}|
|00000da0| 0a 58 40 63 65 6e 74 65 | 72 20 40 74 69 74 6c 65 |.X@cente|r @title|
|00000db0| 66 6f 6e 74 7b 4c 69 62 | 72 61 72 79 20 66 6f 72 |font{Lib|rary for|
|00000dc0| 20 55 4e 49 58 7d 0a 58 | 40 73 70 20 32 0a 58 40 | UNIX}.X|@sp 2.X@|
|00000dd0| 63 65 6e 74 65 72 20 4b | 65 6e 20 52 61 65 62 75 |center K|en Raebu|
|00000de0| 72 6e 0a 58 40 63 65 6e | 74 65 72 20 42 69 6c 6c |rn.X@cen|ter Bill|
|00000df0| 20 53 6f 6d 6d 65 72 66 | 65 6c 64 0a 58 40 73 70 | Sommerf|eld.X@sp|
|00000e00| 20 31 0a 58 40 63 65 6e | 74 65 72 20 4d 49 54 20 | 1.X@cen|ter MIT |
|00000e10| 53 74 75 64 65 6e 74 20 | 49 6e 66 6f 72 6d 61 74 |Student |Informat|
|00000e20| 69 6f 6e 20 50 72 6f 63 | 65 73 73 69 6e 67 20 42 |ion Proc|essing B|
|00000e30| 6f 61 72 64 0a 58 40 73 | 70 20 33 0a 58 40 63 65 |oard.X@s|p 3.X@ce|
|00000e40| 6e 74 65 72 20 6c 61 73 | 74 20 75 70 64 61 74 65 |nter las|t update|
|00000e50| 64 20 31 20 4a 61 6e 75 | 61 72 79 20 31 39 38 39 |d 1 Janu|ary 1989|
|00000e60| 0a 58 40 63 65 6e 74 65 | 72 20 66 6f 72 20 76 65 |.X@cente|r for ve|
|00000e70| 72 73 69 6f 6e 20 31 2e | 32 0a 58 40 63 65 6e 74 |rsion 1.|2.X@cent|
|00000e80| 65 72 20 2a 2a 2a 44 52 | 41 46 54 20 43 4f 50 59 |er ***DR|AFT COPY|
|00000e90| 20 4f 4e 4c 59 2a 2a 2a | 0a 58 0a 58 40 76 73 6b | ONLY***|.X.X@vsk|
|00000ea0| 69 70 20 32 69 6e 0a 58 | 0a 58 40 63 65 6e 74 65 |ip 2in.X|.X@cente|
|00000eb0| 72 20 40 62 7b 41 62 73 | 74 72 61 63 74 7d 0a 58 |r @b{Abs|tract}.X|
|00000ec0| 0a 58 55 4e 49 58 20 68 | 61 73 20 61 6c 77 61 79 |.XUNIX h|as alway|
|00000ed0| 73 20 68 61 64 20 61 20 | 63 6c 65 61 6e 20 61 6e |s had a |clean an|
|00000ee0| 64 20 73 69 6d 70 6c 65 | 20 73 79 73 74 65 6d 20 |d simple| system |
|00000ef0| 63 61 6c 6c 20 69 6e 74 | 65 72 66 61 63 65 2c 20 |call int|erface, |
|00000f00| 77 69 74 68 20 61 0a 58 | 73 74 61 6e 64 61 72 64 |with a.X|standard|
|00000f10| 20 73 65 74 20 6f 66 20 | 65 72 72 6f 72 20 63 6f | set of |error co|
|00000f20| 64 65 73 20 70 61 73 73 | 65 64 20 62 65 74 77 65 |des pass|ed betwe|
|00000f30| 65 6e 20 74 68 65 20 6b | 65 72 6e 65 6c 20 61 6e |en the k|ernel an|
|00000f40| 64 20 75 73 65 72 0a 58 | 70 72 6f 67 72 61 6d 73 |d user.X|programs|
|00000f50| 2e 20 20 55 6e 66 6f 72 | 74 75 6e 61 74 65 6c 79 |. Unfor|tunately|
|00000f60| 2c 20 74 68 65 20 73 61 | 6d 65 20 63 61 6e 6e 6f |, the sa|me canno|
|00000f70| 74 20 62 65 20 73 61 69 | 64 20 6f 66 20 6d 61 6e |t be sai|d of man|
|00000f80| 79 20 6f 66 20 74 68 65 | 0a 58 6c 69 62 72 61 72 |y of the|.Xlibrar|
|00000f90| 69 65 73 20 6c 61 79 65 | 72 65 64 20 6f 6e 20 74 |ies laye|red on t|
|00000fa0| 6f 70 20 6f 66 20 74 68 | 65 20 70 72 69 6d 69 74 |op of th|e primit|
|00000fb0| 69 76 65 73 20 70 72 6f | 76 69 64 65 64 20 62 79 |ives pro|vided by|
|00000fc0| 20 74 68 65 20 6b 65 72 | 6e 65 6c 2e 0a 58 54 79 | the ker|nel..XTy|
|00000fd0| 70 69 63 61 6c 6c 79 2c | 20 65 61 63 68 20 6f 6e |pically,| each on|
|00000fe0| 65 20 68 61 73 20 75 73 | 65 64 20 61 20 64 69 66 |e has us|ed a dif|
|00000ff0| 66 65 72 65 6e 74 20 73 | 74 79 6c 65 20 6f 66 20 |ferent s|tyle of |
|00001000| 69 6e 64 69 63 61 74 69 | 6e 67 20 65 72 72 6f 72 |indicati|ng error|
|00001010| 73 20 74 6f 0a 58 74 68 | 65 69 72 20 63 61 6c 6c |s to.Xth|eir call|
|00001020| 65 72 73 2c 20 6c 65 61 | 64 69 6e 67 20 74 6f 20 |ers, lea|ding to |
|00001030| 61 20 74 6f 74 61 6c 20 | 68 6f 64 67 65 70 6f 64 |a total |hodgepod|
|00001040| 67 65 20 6f 66 20 65 72 | 72 6f 72 20 68 61 6e 64 |ge of er|ror hand|
|00001050| 6c 69 6e 67 2c 20 61 6e | 64 0a 58 63 6f 6e 73 69 |ling, an|d.Xconsi|
|00001060| 64 65 72 61 62 6c 65 20 | 61 6d 6f 75 6e 74 73 20 |derable |amounts |
|00001070| 6f 66 20 77 6f 72 6b 20 | 66 6f 72 20 74 68 65 20 |of work |for the |
|00001080| 70 72 6f 67 72 61 6d 6d | 65 72 2e 20 20 54 68 69 |programm|er. Thi|
|00001090| 73 20 70 61 70 65 72 20 | 64 65 73 63 72 69 62 65 |s paper |describe|
|000010a0| 73 0a 58 61 20 6c 69 62 | 72 61 72 79 20 61 6e 64 |s.Xa lib|rary and|
|000010b0| 20 61 73 73 6f 63 69 61 | 74 65 64 20 75 74 69 6c | associa|ted util|
|000010c0| 69 74 69 65 73 20 77 68 | 69 63 68 20 61 6c 6c 6f |ities wh|ich allo|
|000010d0| 77 73 20 61 20 6d 6f 72 | 65 20 75 6e 69 66 6f 72 |ws a mor|e unifor|
|000010e0| 6d 20 77 61 79 20 66 6f | 72 0a 58 6c 69 62 72 61 |m way fo|r.Xlibra|
|000010f0| 72 69 65 73 20 74 6f 20 | 72 65 74 75 72 6e 20 65 |ries to |return e|
|00001100| 72 72 6f 72 73 20 74 6f | 20 74 68 65 69 72 20 63 |rrors to| their c|
|00001110| 61 6c 6c 65 72 73 2c 20 | 61 6e 64 20 66 6f 72 20 |allers, |and for |
|00001120| 70 72 6f 67 72 61 6d 73 | 20 74 6f 0a 58 64 65 73 |programs| to.Xdes|
|00001130| 63 72 69 62 65 20 65 72 | 72 6f 72 73 20 61 6e 64 |cribe er|rors and|
|00001140| 20 65 78 63 65 70 74 69 | 6f 6e 61 6c 20 63 6f 6e | excepti|onal con|
|00001150| 64 69 74 69 6f 6e 73 20 | 74 6f 20 74 68 65 69 72 |ditions |to their|
|00001160| 20 75 73 65 72 73 2e 0a | 58 0a 58 40 70 61 67 65 | users..|X.X@page|
|00001170| 0a 58 40 76 73 6b 69 70 | 20 30 70 74 20 70 6c 75 |.X@vskip| 0pt plu|
|00001180| 73 20 31 66 69 6c 6c 6c | 0a 58 0a 58 43 6f 70 79 |s 1filll|.X.XCopy|
|00001190| 72 69 67 68 74 20 40 63 | 6f 70 79 72 69 67 68 74 |right @c|opyright|
|000011a0| 7b 7d 20 31 39 38 37 2c | 20 31 39 38 38 20 62 79 |{} 1987,| 1988 by|
|000011b0| 20 74 68 65 20 53 74 75 | 64 65 6e 74 20 49 6e 66 | the Stu|dent Inf|
|000011c0| 6f 72 6d 61 74 69 6f 6e | 20 50 72 6f 63 65 73 73 |ormation| Process|
|000011d0| 69 6e 67 0a 58 42 6f 61 | 72 64 20 6f 66 20 74 68 |ing.XBoa|rd of th|
|000011e0| 65 20 4d 61 73 73 61 63 | 68 75 73 65 74 74 73 20 |e Massac|husetts |
|000011f0| 49 6e 73 74 69 74 75 74 | 65 20 6f 66 20 54 65 63 |Institut|e of Tec|
|00001200| 68 6e 6f 6c 6f 67 79 2e | 0a 58 0a 58 50 65 72 6d |hnology.|.X.XPerm|
|00001210| 69 73 73 69 6f 6e 20 74 | 6f 20 75 73 65 2c 20 63 |ission t|o use, c|
|00001220| 6f 70 79 2c 20 6d 6f 64 | 69 66 79 2c 20 61 6e 64 |opy, mod|ify, and|
|00001230| 20 64 69 73 74 72 69 62 | 75 74 65 20 74 68 69 73 | distrib|ute this|
|00001240| 20 73 6f 66 74 77 61 72 | 65 20 61 6e 64 20 69 74 | softwar|e and it|
|00001250| 73 0a 58 64 6f 63 75 6d | 65 6e 74 61 74 69 6f 6e |s.Xdocum|entation|
|00001260| 20 66 6f 72 20 61 6e 79 | 20 70 75 72 70 6f 73 65 | for any| purpose|
|00001270| 20 61 6e 64 20 77 69 74 | 68 6f 75 74 20 66 65 65 | and wit|hout fee|
|00001280| 20 69 73 20 68 65 72 65 | 62 79 20 67 72 61 6e 74 | is here|by grant|
|00001290| 65 64 2c 20 70 72 6f 76 | 69 64 65 64 0a 58 74 68 |ed, prov|ided.Xth|
|000012a0| 61 74 20 74 68 65 20 61 | 62 6f 76 65 20 63 6f 70 |at the a|bove cop|
|000012b0| 79 72 69 67 68 74 20 6e | 6f 74 69 63 65 20 61 70 |yright n|otice ap|
|000012c0| 70 65 61 72 20 69 6e 20 | 61 6c 6c 20 63 6f 70 69 |pear in |all copi|
|000012d0| 65 73 20 61 6e 64 20 74 | 68 61 74 20 62 6f 74 68 |es and t|hat both|
|000012e0| 20 74 68 61 74 0a 58 63 | 6f 70 79 72 69 67 68 74 | that.Xc|opyright|
|000012f0| 20 6e 6f 74 69 63 65 20 | 61 6e 64 20 74 68 69 73 | notice |and this|
|00001300| 20 70 65 72 6d 69 73 73 | 69 6f 6e 20 6e 6f 74 69 | permiss|ion noti|
|00001310| 63 65 20 61 70 70 65 61 | 72 20 69 6e 20 73 75 70 |ce appea|r in sup|
|00001320| 70 6f 72 74 69 6e 67 0a | 58 64 6f 63 75 6d 65 6e |porting.|Xdocumen|
|00001330| 74 61 74 69 6f 6e 2c 20 | 61 6e 64 20 74 68 61 74 |tation, |and that|
|00001340| 20 74 68 65 20 6e 61 6d | 65 73 20 6f 66 20 4d 2e | the nam|es of M.|
|00001350| 49 2e 54 2e 20 61 6e 64 | 20 74 68 65 20 4d 2e 49 |I.T. and| the M.I|
|00001360| 2e 54 2e 20 53 2e 49 2e | 50 2e 42 2e 20 6e 6f 74 |.T. S.I.|P.B. not|
|00001370| 20 62 65 0a 58 75 73 65 | 64 20 69 6e 20 61 64 76 | be.Xuse|d in adv|
|00001380| 65 72 74 69 73 69 6e 67 | 20 6f 72 20 70 75 62 6c |ertising| or publ|
|00001390| 69 63 69 74 79 20 70 65 | 72 74 61 69 6e 69 6e 67 |icity pe|rtaining|
|000013a0| 20 74 6f 20 64 69 73 74 | 72 69 62 75 74 69 6f 6e | to dist|ribution|
|000013b0| 20 6f 66 20 74 68 65 20 | 73 6f 66 74 77 61 72 65 | of the |software|
|000013c0| 0a 58 77 69 74 68 6f 75 | 74 20 73 70 65 63 69 66 |.Xwithou|t specif|
|000013d0| 69 63 2c 20 77 72 69 74 | 74 65 6e 20 70 72 69 6f |ic, writ|ten prio|
|000013e0| 72 20 70 65 72 6d 69 73 | 73 69 6f 6e 2e 20 20 4d |r permis|sion. M|
|000013f0| 2e 49 2e 54 2e 20 61 6e | 64 20 74 68 65 20 4d 2e |.I.T. an|d the M.|
|00001400| 49 2e 54 2e 20 53 2e 49 | 2e 50 2e 42 2e 0a 58 6d |I.T. S.I|.P.B..Xm|
|00001410| 61 6b 65 20 6e 6f 20 72 | 65 70 72 65 73 65 6e 74 |ake no r|epresent|
|00001420| 61 74 69 6f 6e 73 20 61 | 62 6f 75 74 20 74 68 65 |ations a|bout the|
|00001430| 20 73 75 69 74 61 62 69 | 6c 69 74 79 20 6f 66 20 | suitabi|lity of |
|00001440| 74 68 69 73 20 73 6f 66 | 74 77 61 72 65 20 66 6f |this sof|tware fo|
|00001450| 72 20 61 6e 79 0a 58 70 | 75 72 70 6f 73 65 2e 20 |r any.Xp|urpose. |
|00001460| 20 49 74 20 69 73 20 70 | 72 6f 76 69 64 65 64 20 | It is p|rovided |
|00001470| 22 61 73 20 69 73 22 20 | 77 69 74 68 6f 75 74 20 |"as is" |without |
|00001480| 65 78 70 72 65 73 73 20 | 6f 72 20 69 6d 70 6c 69 |express |or impli|
|00001490| 65 64 20 77 61 72 72 61 | 6e 74 79 2e 0a 58 0a 58 |ed warra|nty..X.X|
|000014a0| 4e 6f 74 65 20 74 68 61 | 74 20 74 68 65 20 66 69 |Note tha|t the fi|
|000014b0| 6c 65 20 74 65 78 69 6e | 66 6f 2e 74 65 78 2c 20 |le texin|fo.tex, |
|000014c0| 70 72 6f 76 69 64 65 64 | 20 77 69 74 68 20 74 68 |provided| with th|
|000014d0| 69 73 20 64 69 73 74 72 | 69 62 75 74 69 6f 6e 2c |is distr|ibution,|
|000014e0| 20 69 73 20 66 72 6f 6d | 0a 58 74 68 65 20 46 72 | is from|.Xthe Fr|
|000014f0| 65 65 20 53 6f 66 74 77 | 61 72 65 20 46 6f 75 6e |ee Softw|are Foun|
|00001500| 64 61 74 69 6f 6e 2c 20 | 61 6e 64 20 69 73 20 75 |dation, |and is u|
|00001510| 6e 64 65 72 20 64 69 66 | 66 65 72 65 6e 74 20 63 |nder dif|ferent c|
|00001520| 6f 70 79 72 69 67 68 74 | 20 72 65 73 74 72 69 63 |opyright| restric|
|00001530| 74 69 6f 6e 73 0a 58 66 | 72 6f 6d 20 74 68 65 20 |tions.Xf|rom the |
|00001540| 72 65 6d 61 69 6e 64 65 | 72 20 6f 66 20 74 68 69 |remainde|r of thi|
|00001550| 73 20 70 61 63 6b 61 67 | 65 2e 0a 58 0a 58 40 65 |s packag|e..X.X@e|
|00001560| 6e 64 20 74 69 74 6c 65 | 70 61 67 65 0a 58 0a 58 |nd title|page.X.X|
|00001570| 40 69 66 69 6e 66 6f 0a | 58 40 63 20 73 68 6f 75 |@ifinfo.|X@c shou|
|00001580| 6c 64 20 70 75 74 20 61 | 20 6d 65 6e 75 20 68 65 |ld put a| menu he|
|00001590| 72 65 20 73 6f 6d 65 64 | 61 79 2e 2e 2e 2e 0a 58 |re somed|ay.....X|
|000015a0| 40 65 6e 64 20 69 66 69 | 6e 66 6f 0a 58 0a 58 40 |@end ifi|nfo.X.X@|
|000015b0| 70 61 67 65 0a 58 0a 58 | 40 73 65 63 74 69 6f 6e |page.X.X|@section|
|000015c0| 20 57 68 79 20 63 6f 6d | 5f 65 72 72 3f 0a 58 0a | Why com|_err?.X.|
|000015d0| 58 49 6e 20 62 75 69 6c | 64 69 6e 67 20 61 70 70 |XIn buil|ding app|
|000015e0| 6c 69 63 61 74 69 6f 6e | 20 73 6f 66 74 77 61 72 |lication| softwar|
|000015f0| 65 20 70 61 63 6b 61 67 | 65 73 2c 20 61 20 70 72 |e packag|es, a pr|
|00001600| 6f 67 72 61 6d 6d 65 72 | 20 6f 66 74 65 6e 20 68 |ogrammer| often h|
|00001610| 61 73 20 74 6f 0a 58 64 | 65 61 6c 20 77 69 74 68 |as to.Xd|eal with|
|00001620| 20 61 20 6e 75 6d 62 65 | 72 20 6f 66 20 6c 69 62 | a numbe|r of lib|
|00001630| 72 61 72 69 65 73 2c 20 | 65 61 63 68 20 6f 66 20 |raries, |each of |
|00001640| 77 68 69 63 68 20 63 61 | 6e 20 75 73 65 20 61 20 |which ca|n use a |
|00001650| 64 69 66 66 65 72 65 6e | 74 0a 58 65 72 72 6f 72 |differen|t.Xerror|
|00001660| 2d 72 65 70 6f 72 74 69 | 6e 67 20 6d 65 63 68 61 |-reporti|ng mecha|
|00001670| 6e 69 73 6d 2e 20 20 53 | 6f 6d 65 74 69 6d 65 73 |nism. S|ometimes|
|00001680| 20 6f 6e 65 20 6f 66 20 | 74 77 6f 20 76 61 6c 75 | one of |two valu|
|00001690| 65 73 20 69 73 20 72 65 | 74 75 72 6e 65 64 2c 0a |es is re|turned,.|
|000016a0| 58 69 6e 64 69 63 61 74 | 69 6e 67 20 73 69 6d 70 |Xindicat|ing simp|
|000016b0| 6c 79 20 53 55 43 43 45 | 53 53 20 6f 72 20 46 41 |ly SUCCE|SS or FA|
|000016c0| 49 4c 55 52 45 2c 20 77 | 69 74 68 20 6e 6f 20 64 |ILURE, w|ith no d|
|000016d0| 65 73 63 72 69 70 74 69 | 6f 6e 20 6f 66 20 65 72 |escripti|on of er|
|000016e0| 72 6f 72 73 0a 58 65 6e | 63 6f 75 6e 74 65 72 65 |rors.Xen|countere|
|000016f0| 64 2e 20 20 53 6f 6d 65 | 74 69 6d 65 73 20 69 74 |d. Some|times it|
|00001700| 20 69 73 20 61 6e 20 69 | 6e 64 65 78 20 69 6e 74 | is an i|ndex int|
|00001710| 6f 20 61 20 74 61 62 6c | 65 20 6f 66 20 74 65 78 |o a tabl|e of tex|
|00001720| 74 20 73 74 72 69 6e 67 | 73 2c 0a 58 77 68 65 72 |t string|s,.Xwher|
|00001730| 65 20 74 68 65 20 6e 61 | 6d 65 20 6f 66 20 74 68 |e the na|me of th|
|00001740| 65 20 74 61 62 6c 65 20 | 75 73 65 64 20 69 73 20 |e table |used is |
|00001750| 64 65 70 65 6e 64 65 6e | 74 20 6f 6e 20 74 68 65 |dependen|t on the|
|00001760| 20 6c 69 62 72 61 72 79 | 20 62 65 69 6e 67 0a 58 | library| being.X|
|00001770| 75 73 65 64 20 77 68 65 | 6e 20 74 68 65 20 65 72 |used whe|n the er|
|00001780| 72 6f 72 20 69 73 20 67 | 65 6e 65 72 61 74 65 64 |ror is g|enerated|
|00001790| 3b 20 73 69 6e 63 65 20 | 65 61 63 68 20 74 61 62 |; since |each tab|
|000017a0| 6c 65 20 73 74 61 72 74 | 73 20 6e 75 6d 62 65 72 |le start|s number|
|000017b0| 69 6e 67 20 61 74 0a 58 | 30 20 6f 72 20 31 2c 20 |ing at.X|0 or 1, |
|000017c0| 61 64 64 69 74 69 6f 6e | 61 6c 20 69 6e 66 6f 72 |addition|al infor|
|000017d0| 6d 61 74 69 6f 6e 20 61 | 73 20 74 6f 20 74 68 65 |mation a|s to the|
|000017e0| 20 73 6f 75 72 63 65 20 | 6f 66 20 74 68 65 20 65 | source |of the e|
|000017f0| 72 72 6f 72 20 63 6f 64 | 65 20 69 73 0a 58 6e 65 |rror cod|e is.Xne|
|00001800| 65 64 65 64 20 74 6f 20 | 64 65 74 65 72 6d 69 6e |eded to |determin|
|00001810| 65 20 77 68 69 63 68 20 | 74 61 62 6c 65 20 74 6f |e which |table to|
|00001820| 20 6c 6f 6f 6b 20 61 74 | 2e 20 20 53 6f 6d 65 74 | look at|. Somet|
|00001830| 69 6d 65 73 20 6e 6f 20 | 74 65 78 74 20 6d 65 73 |imes no |text mes|
|00001840| 73 61 67 65 73 20 61 72 | 65 0a 58 73 75 70 70 6c |sages ar|e.Xsuppl|
|00001850| 69 65 64 20 61 74 20 61 | 6c 6c 2c 20 61 6e 64 20 |ied at a|ll, and |
|00001860| 74 68 65 20 70 72 6f 67 | 72 61 6d 6d 65 72 20 6d |the prog|rammer m|
|00001870| 75 73 74 20 73 75 70 70 | 6c 79 20 74 68 65 6d 20 |ust supp|ly them |
|00001880| 61 74 20 61 6e 79 20 70 | 6f 69 6e 74 20 61 74 20 |at any p|oint at |
|00001890| 77 68 69 63 68 0a 58 68 | 65 20 6d 61 79 20 77 69 |which.Xh|e may wi|
|000018a0| 73 68 20 74 6f 20 72 65 | 70 6f 72 74 20 65 72 72 |sh to re|port err|
|000018b0| 6f 72 20 63 6f 6e 64 69 | 74 69 6f 6e 73 2e 0a 58 |or condi|tions..X|
|000018c0| 4f 66 74 65 6e 2c 20 61 | 20 67 6c 6f 62 61 6c 20 |Often, a| global |
|000018d0| 76 61 72 69 61 62 6c 65 | 20 69 73 20 61 73 73 69 |variable| is assi|
|000018e0| 67 6e 65 64 20 73 6f 6d | 65 20 76 61 6c 75 65 20 |gned som|e value |
|000018f0| 64 65 73 63 72 69 62 69 | 6e 67 20 74 68 65 20 65 |describi|ng the e|
|00001900| 72 72 6f 72 2c 20 62 75 | 74 0a 58 74 68 65 20 70 |rror, bu|t.Xthe p|
|00001910| 72 6f 67 72 61 6d 6d 65 | 72 20 68 61 73 20 74 6f |rogramme|r has to|
|00001920| 20 6b 6e 6f 77 20 69 6e | 20 65 61 63 68 20 63 61 | know in| each ca|
|00001930| 73 65 20 77 68 65 74 68 | 65 72 20 74 6f 20 6c 6f |se wheth|er to lo|
|00001940| 6f 6b 20 61 74 20 40 63 | 6f 64 65 7b 65 72 72 6e |ok at @c|ode{errn|
|00001950| 6f 7d 2c 0a 58 40 63 6f | 64 65 7b 68 5f 65 72 72 |o},.X@co|de{h_err|
|00001960| 6e 6f 7d 2c 20 74 68 65 | 20 72 65 74 75 72 6e 20 |no}, the| return |
|00001970| 76 61 6c 75 65 20 66 72 | 6f 6d 20 40 63 6f 64 65 |value fr|om @code|
|00001980| 7b 68 65 73 5f 65 72 72 | 28 29 7d 2c 20 6f 72 20 |{hes_err|()}, or |
|00001990| 77 68 61 74 65 76 65 72 | 20 6f 74 68 65 72 0a 58 |whatever| other.X|
|000019a0| 76 61 72 69 61 62 6c 65 | 73 20 6f 72 20 72 6f 75 |variable|s or rou|
|000019b0| 74 69 6e 65 73 20 61 72 | 65 20 73 70 65 63 69 66 |tines ar|e specif|
|000019c0| 69 65 64 2e 0a 58 41 6e | 64 20 77 68 61 74 20 68 |ied..XAn|d what h|
|000019d0| 61 70 70 65 6e 73 20 69 | 66 20 73 6f 6d 65 74 68 |appens i|f someth|
|000019e0| 69 6e 67 0a 58 69 6e 20 | 74 68 65 20 70 72 6f 63 |ing.Xin |the proc|
|000019f0| 65 64 75 72 65 20 6f 66 | 0a 58 65 78 61 6d 69 6e |edure of|.Xexamin|
|00001a00| 69 6e 67 20 6f 72 20 72 | 65 70 6f 72 74 69 6e 67 |ing or r|eporting|
|00001a10| 20 74 68 65 20 65 72 72 | 6f 72 20 63 68 61 6e 67 | the err|or chang|
|00001a20| 65 73 20 74 68 65 20 73 | 61 6d 65 20 76 61 72 69 |es the s|ame vari|
|00001a30| 61 62 6c 65 3f 0a 58 0a | 58 54 68 65 20 70 61 63 |able?.X.|XThe pac|
|00001a40| 6b 61 67 65 20 77 65 20 | 68 61 76 65 20 64 65 76 |kage we |have dev|
|00001a50| 65 6c 6f 70 65 64 20 69 | 73 20 61 6e 20 61 74 74 |eloped i|s an att|
|00001a60| 65 6d 70 74 20 74 6f 20 | 70 72 65 73 65 6e 74 20 |empt to |present |
|00001a70| 61 20 63 6f 6d 6d 6f 6e | 0a 58 65 72 72 6f 72 2d |a common|.Xerror-|
|00001a80| 68 61 6e 64 6c 69 6e 67 | 20 6d 65 63 68 61 6e 69 |handling| mechani|
|00001a90| 73 6d 20 74 6f 20 6d 61 | 6e 69 70 75 6c 61 74 65 |sm to ma|nipulate|
|00001aa0| 20 74 68 65 20 6d 6f 73 | 74 20 63 6f 6d 6d 6f 6e | the mos|t common|
|00001ab0| 20 66 6f 72 6d 20 6f 66 | 20 65 72 72 6f 72 20 63 | form of| error c|
|00001ac0| 6f 64 65 0a 58 69 6e 20 | 61 20 66 61 73 68 69 6f |ode.Xin |a fashio|
|00001ad0| 6e 20 74 68 61 74 20 64 | 6f 65 73 20 6e 6f 74 20 |n that d|oes not |
|00001ae0| 68 61 76 65 20 74 68 65 | 20 70 72 6f 62 6c 65 6d |have the| problem|
|00001af0| 73 20 6c 69 73 74 65 64 | 20 61 62 6f 76 65 2e 0a |s listed| above..|
|00001b00| 58 0a 58 41 20 6c 69 73 | 74 20 6f 66 20 75 70 20 |X.XA lis|t of up |
|00001b10| 74 6f 20 32 35 36 20 74 | 65 78 74 20 6d 65 73 73 |to 256 t|ext mess|
|00001b20| 61 67 65 73 20 69 73 20 | 73 75 70 70 6c 69 65 64 |ages is |supplied|
|00001b30| 20 74 6f 20 61 20 74 72 | 61 6e 73 6c 61 74 6f 72 | to a tr|anslator|
|00001b40| 20 77 65 20 68 61 76 65 | 0a 58 77 72 69 74 74 65 | we have|.Xwritte|
|00001b50| 6e 2c 20 61 6c 6f 6e 67 | 20 77 69 74 68 20 74 68 |n, along| with th|
|00001b60| 65 20 74 68 72 65 65 2d | 20 74 6f 20 66 6f 75 72 |e three-| to four|
|00001b70| 2d 63 68 61 72 61 63 74 | 65 72 20 60 60 6e 61 6d |-charact|er ``nam|
|00001b80| 65 27 27 20 6f 66 20 74 | 68 65 20 65 72 72 6f 72 |e'' of t|he error|
|00001b90| 0a 58 74 61 62 6c 65 2e | 20 20 54 68 65 20 6c 69 |.Xtable.| The li|
|00001ba0| 62 72 61 72 79 20 75 73 | 69 6e 67 20 74 68 69 73 |brary us|ing this|
|00001bb0| 20 65 72 72 6f 72 20 74 | 61 62 6c 65 20 6e 65 65 | error t|able nee|
|00001bc0| 64 20 6f 6e 6c 79 20 63 | 61 6c 6c 20 61 20 72 6f |d only c|all a ro|
|00001bd0| 75 74 69 6e 65 0a 58 67 | 65 6e 65 72 61 74 65 64 |utine.Xg|enerated|
|00001be0| 20 66 72 6f 6d 20 74 68 | 69 73 20 65 72 72 6f 72 | from th|is error|
|00001bf0| 2d 74 61 62 6c 65 20 73 | 6f 75 72 63 65 20 74 6f |-table s|ource to|
|00001c00| 20 6d 61 6b 65 20 74 68 | 65 20 74 61 62 6c 65 20 | make th|e table |
|00001c10| 60 60 6b 6e 6f 77 6e 27 | 27 20 74 6f 20 74 68 65 |``known'|' to the|
|00001c20| 0a 58 63 6f 6d 5f 65 72 | 72 20 6c 69 62 72 61 72 |.Xcom_er|r librar|
|00001c30| 79 2c 20 61 6e 64 20 61 | 6e 79 20 65 72 72 6f 72 |y, and a|ny error|
|00001c40| 20 63 6f 64 65 20 74 68 | 65 20 6c 69 62 72 61 72 | code th|e librar|
|00001c50| 79 20 67 65 6e 65 72 61 | 74 65 73 20 63 61 6e 20 |y genera|tes can |
|00001c60| 62 65 20 63 6f 6e 76 65 | 72 74 65 64 0a 58 74 6f |be conve|rted.Xto|
|00001c70| 20 74 68 65 20 63 6f 72 | 72 65 73 70 6f 6e 64 69 | the cor|respondi|
|00001c80| 6e 67 20 65 72 72 6f 72 | 20 6d 65 73 73 61 67 65 |ng error| message|
|00001c90| 2e 20 20 54 68 65 72 65 | 20 69 73 20 61 6c 73 6f |. There| is also|
|00001ca0| 20 61 20 64 65 66 61 75 | 6c 74 20 66 6f 72 6d 61 | a defau|lt forma|
|00001cb0| 74 20 66 6f 72 0a 58 65 | 72 72 6f 72 20 63 6f 64 |t for.Xe|rror cod|
|00001cc0| 65 73 20 61 63 63 69 64 | 65 6e 74 61 6c 6c 79 20 |es accid|entally |
|00001cd0| 72 65 74 75 72 6e 65 64 | 20 62 65 66 6f 72 65 20 |returned| before |
|00001ce0| 6d 61 6b 69 6e 67 20 74 | 68 65 20 74 61 62 6c 65 |making t|he table|
|00001cf0| 20 6b 6e 6f 77 6e 2c 20 | 77 68 69 63 68 20 69 73 | known, |which is|
|00001d00| 0a 58 6f 66 20 74 68 65 | 20 66 6f 72 6d 20 40 73 |.Xof the| form @s|
|00001d10| 61 6d 70 7b 75 6e 6b 6e | 6f 77 6e 20 63 6f 64 65 |amp{unkn|own code|
|00001d20| 20 66 6f 6f 20 33 32 7d | 2c 20 77 68 65 72 65 20 | foo 32}|, where |
|00001d30| 40 73 61 6d 70 7b 66 6f | 6f 7d 20 77 6f 75 6c 64 |@samp{fo|o} would|
|00001d40| 20 62 65 20 74 68 65 20 | 6e 61 6d 65 0a 58 6f 66 | be the |name.Xof|
|00001d50| 20 74 68 65 20 74 61 62 | 6c 65 2e 0a 58 0a 58 40 | the tab|le..X.X@|
|00001d60| 73 65 63 74 69 6f 6e 20 | 45 72 72 6f 72 20 63 6f |section |Error co|
|00001d70| 64 65 73 0a 58 0a 58 45 | 72 72 6f 72 20 63 6f 64 |des.X.XE|rror cod|
|00001d80| 65 73 20 74 68 65 6d 73 | 65 6c 76 65 73 20 61 72 |es thems|elves ar|
|00001d90| 65 20 33 32 20 62 69 74 | 20 28 73 69 67 6e 65 64 |e 32 bit| (signed|
|00001da0| 29 20 69 6e 74 65 67 65 | 72 73 2c 20 6f 66 20 77 |) intege|rs, of w|
|00001db0| 68 69 63 68 20 74 68 65 | 20 68 69 67 68 0a 58 6f |hich the| high.Xo|
|00001dc0| 72 64 65 72 20 32 34 20 | 62 69 74 73 20 61 72 65 |rder 24 |bits are|
|00001dd0| 20 61 6e 20 69 64 65 6e | 74 69 66 69 65 72 20 6f | an iden|tifier o|
|00001de0| 66 20 77 68 69 63 68 20 | 65 72 72 6f 72 20 74 61 |f which |error ta|
|00001df0| 62 6c 65 20 74 68 65 20 | 65 72 72 6f 72 20 63 6f |ble the |error co|
|00001e00| 64 65 20 69 73 0a 58 66 | 72 6f 6d 2c 20 61 6e 64 |de is.Xf|rom, and|
|00001e10| 20 74 68 65 20 6c 6f 77 | 20 6f 72 64 65 72 20 38 | the low| order 8|
|00001e20| 20 62 69 74 73 20 61 72 | 65 20 61 20 73 65 71 75 | bits ar|e a sequ|
|00001e30| 65 6e 74 69 61 6c 20 65 | 72 72 6f 72 20 6e 75 6d |ential e|rror num|
|00001e40| 62 65 72 20 77 69 74 68 | 69 6e 0a 58 74 68 65 20 |ber with|in.Xthe |
|00001e50| 74 61 62 6c 65 2e 20 20 | 41 6e 20 65 72 72 6f 72 |table. |An error|
|00001e60| 20 63 6f 64 65 20 6d 61 | 79 20 74 68 75 73 20 62 | code ma|y thus b|
|00001e70| 65 20 65 61 73 69 6c 79 | 20 64 65 63 6f 6d 70 6f |e easily| decompo|
|00001e80| 73 65 64 20 69 6e 74 6f | 20 69 74 73 20 63 6f 6d |sed into| its com|
|00001e90| 70 6f 6e 65 6e 74 0a 58 | 70 61 72 74 73 2e 20 20 |ponent.X|parts. |
|00001ea0| 4f 6e 6c 79 20 74 68 65 | 20 6c 6f 77 65 73 74 20 |Only the| lowest |
|00001eb0| 33 32 20 62 69 74 73 20 | 6f 66 20 61 6e 20 65 72 |32 bits |of an er|
|00001ec0| 72 6f 72 20 63 6f 64 65 | 20 61 72 65 20 63 6f 6e |ror code| are con|
|00001ed0| 73 69 64 65 72 65 64 20 | 73 69 67 6e 69 66 69 63 |sidered |signific|
|00001ee0| 61 6e 74 0a 58 6f 6e 20 | 73 79 73 74 65 6d 73 20 |ant.Xon |systems |
|00001ef0| 77 68 69 63 68 20 73 75 | 70 70 6f 72 74 20 77 69 |which su|pport wi|
|00001f00| 64 65 72 20 76 61 6c 75 | 65 73 2e 0a 58 0a 58 45 |der valu|es..X.XE|
|00001f10| 72 72 6f 72 20 74 61 62 | 6c 65 20 30 20 69 73 20 |rror tab|le 0 is |
|00001f20| 64 65 66 69 6e 65 64 20 | 74 6f 20 6d 61 74 63 68 |defined |to match|
|00001f30| 20 74 68 65 20 55 4e 49 | 58 20 73 79 73 74 65 6d | the UNI|X system|
|00001f40| 20 63 61 6c 6c 20 65 72 | 72 6f 72 20 74 61 62 6c | call er|ror tabl|
|00001f50| 65 0a 58 28 40 63 6f 64 | 65 7b 73 79 73 5f 65 72 |e.X(@cod|e{sys_er|
|00001f60| 72 6c 69 73 74 7d 29 3b | 20 74 68 69 73 20 61 6c |rlist});| this al|
|00001f70| 6c 6f 77 73 20 40 63 6f | 64 65 7b 65 72 72 6e 6f |lows @co|de{errno|
|00001f80| 7d 20 76 61 6c 75 65 73 | 20 74 6f 20 62 65 20 75 |} values| to be u|
|00001f90| 73 65 64 20 64 69 72 65 | 63 74 6c 79 0a 58 69 6e |sed dire|ctly.Xin|
|00001fa0| 20 74 68 65 20 6c 69 62 | 72 61 72 79 20 28 61 73 | the lib|rary (as|
|00001fb0| 73 75 6d 69 6e 67 20 74 | 68 61 74 20 40 63 6f 64 |suming t|hat @cod|
|00001fc0| 65 7b 65 72 72 6e 6f 7d | 20 69 73 20 6f 66 20 61 |e{errno}| is of a|
|00001fd0| 20 74 79 70 65 20 77 69 | 74 68 20 74 68 65 20 73 | type wi|th the s|
|00001fe0| 61 6d 65 20 77 69 64 74 | 68 0a 58 61 73 20 40 74 |ame widt|h.Xas @t|
|00001ff0| 7b 6c 6f 6e 67 7d 29 2e | 20 20 4f 74 68 65 72 20 |{long}).| Other |
|00002000| 65 72 72 6f 72 20 74 61 | 62 6c 65 20 6e 75 6d 62 |error ta|ble numb|
|00002010| 65 72 73 20 61 72 65 20 | 66 6f 72 6d 65 64 20 62 |ers are |formed b|
|00002020| 79 20 63 6f 6d 70 61 63 | 74 69 6e 67 20 74 6f 67 |y compac|ting tog|
|00002030| 65 74 68 65 72 0a 58 74 | 68 65 20 66 69 72 73 74 |ether.Xt|he first|
|00002040| 20 66 6f 75 72 20 63 68 | 61 72 61 63 74 65 72 73 | four ch|aracters|
|00002050| 20 6f 66 20 74 68 65 20 | 65 72 72 6f 72 20 74 61 | of the |error ta|
|00002060| 62 6c 65 20 6e 61 6d 65 | 2e 20 20 54 68 65 20 6d |ble name|. The m|
|00002070| 61 70 70 69 6e 67 20 62 | 65 74 77 65 65 6e 0a 58 |apping b|etween.X|
|00002080| 63 68 61 72 61 63 74 65 | 72 73 20 69 6e 20 74 68 |characte|rs in th|
|00002090| 65 20 6e 61 6d 65 20 61 | 6e 64 20 6e 75 6d 65 72 |e name a|nd numer|
|000020a0| 69 63 20 76 61 6c 75 65 | 73 20 69 6e 20 74 68 65 |ic value|s in the|
|000020b0| 20 65 72 72 6f 72 20 63 | 6f 64 65 20 61 72 65 20 | error c|ode are |
|000020c0| 64 65 66 69 6e 65 64 20 | 69 6e 0a 58 61 20 73 79 |defined |in.Xa sy|
|000020d0| 73 74 65 6d 2d 69 6e 64 | 65 70 65 6e 64 65 6e 74 |stem-ind|ependent|
|000020e0| 20 66 61 73 68 69 6f 6e | 2c 20 73 6f 20 74 68 61 | fashion|, so tha|
|000020f0| 74 20 74 77 6f 20 73 79 | 73 74 65 6d 73 20 74 68 |t two sy|stems th|
|00002100| 61 74 20 63 61 6e 20 70 | 61 73 73 20 69 6e 74 65 |at can p|ass inte|
|00002110| 67 72 61 6c 0a 58 76 61 | 6c 75 65 73 20 62 65 74 |gral.Xva|lues bet|
|00002120| 77 65 65 6e 20 74 68 65 | 6d 20 63 61 6e 20 72 65 |ween the|m can re|
|00002130| 6c 69 61 62 6c 79 20 70 | 61 73 73 20 65 72 72 6f |liably p|ass erro|
|00002140| 72 20 63 6f 64 65 73 20 | 77 69 74 68 6f 75 74 20 |r codes |without |
|00002150| 6c 6f 73 73 20 6f 66 20 | 6d 65 61 6e 69 6e 67 3b |loss of |meaning;|
|00002160| 0a 58 74 68 69 73 20 73 | 68 6f 75 6c 64 20 77 6f |.Xthis s|hould wo|
|00002170| 72 6b 20 65 76 65 6e 20 | 69 66 20 74 68 65 20 63 |rk even |if the c|
|00002180| 68 61 72 61 63 74 65 72 | 20 73 65 74 73 20 75 73 |haracter| sets us|
|00002190| 65 64 20 61 72 65 20 6e | 6f 74 20 74 68 65 20 73 |ed are n|ot the s|
|000021a0| 61 6d 65 2e 0a 58 28 48 | 6f 77 65 76 65 72 2c 20 |ame..X(H|owever, |
|000021b0| 69 66 20 74 68 69 73 20 | 69 73 20 74 6f 20 62 65 |if this |is to be|
|000021c0| 20 64 6f 6e 65 2c 20 65 | 72 72 6f 72 20 74 61 62 | done, e|rror tab|
|000021d0| 6c 65 20 30 20 73 68 6f | 75 6c 64 20 62 65 20 61 |le 0 sho|uld be a|
|000021e0| 76 6f 69 64 65 64 2c 20 | 73 69 6e 63 65 20 74 68 |voided, |since th|
|000021f0| 65 0a 58 6c 6f 63 61 6c | 20 73 79 73 74 65 6d 20 |e.Xlocal| system |
|00002200| 63 61 6c 6c 20 65 72 72 | 6f 72 20 74 61 62 6c 65 |call err|or table|
|00002210| 73 20 6d 61 79 20 64 69 | 66 66 65 72 2e 29 0a 58 |s may di|ffer.).X|
|00002220| 0a 58 41 6e 79 20 76 61 | 72 69 61 62 6c 65 20 77 |.XAny va|riable w|
|00002230| 68 69 63 68 20 69 73 20 | 74 6f 20 63 6f 6e 74 61 |hich is |to conta|
|00002240| 69 6e 20 61 6e 20 65 72 | 72 6f 72 20 63 6f 64 65 |in an er|ror code|
|00002250| 20 73 68 6f 75 6c 64 20 | 62 65 20 64 65 63 6c 61 | should |be decla|
|00002260| 72 65 64 20 40 74 7b 6c | 6f 6e 67 7d 2e 0a 58 54 |red @t{l|ong}..XT|
|00002270| 68 65 20 64 72 61 66 74 | 20 70 72 6f 70 6f 73 65 |he draft| propose|
|00002280| 64 20 41 6d 65 72 69 63 | 61 6e 20 4e 61 74 69 6f |d Americ|an Natio|
|00002290| 6e 61 6c 20 53 74 61 6e | 64 61 72 64 20 66 6f 72 |nal Stan|dard for|
|000022a0| 20 43 20 28 61 73 20 6f | 66 20 4d 61 79 2c 20 31 | C (as o|f May, 1|
|000022b0| 39 38 38 29 0a 58 72 65 | 71 75 69 72 65 73 20 74 |988).Xre|quires t|
|000022c0| 68 61 74 20 40 74 7b 6c | 6f 6e 67 7d 20 76 61 72 |hat @t{l|ong} var|
|000022d0| 69 61 62 6c 65 73 20 62 | 65 20 61 74 20 6c 65 61 |iables b|e at lea|
|000022e0| 73 74 20 33 32 20 62 69 | 74 73 3b 20 61 6e 79 20 |st 32 bi|ts; any |
|000022f0| 73 79 73 74 65 6d 20 77 | 68 69 63 68 20 64 6f 65 |system w|hich doe|
|00002300| 73 0a 58 6e 6f 74 20 73 | 75 70 70 6f 72 74 20 33 |s.Xnot s|upport 3|
|00002310| 32 2d 62 69 74 20 40 74 | 7b 6c 6f 6e 67 7d 20 76 |2-bit @t|{long} v|
|00002320| 61 6c 75 65 73 20 63 61 | 6e 6e 6f 74 20 6d 61 6b |alues ca|nnot mak|
|00002330| 65 20 75 73 65 20 6f 66 | 20 74 68 69 73 20 70 61 |e use of| this pa|
|00002340| 63 6b 61 67 65 20 28 6e | 6f 72 0a 58 6d 75 63 68 |ckage (n|or.Xmuch|
|00002350| 20 6f 74 68 65 72 20 73 | 6f 66 74 77 61 72 65 20 | other s|oftware |
|00002360| 74 68 61 74 20 61 73 73 | 75 6d 65 73 20 61 6e 20 |that ass|umes an |
|00002370| 41 4e 53 49 2d 43 20 65 | 6e 76 69 72 6f 6e 6d 65 |ANSI-C e|nvironme|
|00002380| 6e 74 20 62 61 73 65 29 | 20 77 69 74 68 6f 75 74 |nt base)| without|
|00002390| 0a 58 73 69 67 6e 69 66 | 69 63 61 6e 74 20 65 66 |.Xsignif|icant ef|
|000023a0| 66 6f 72 74 2e 0a 58 0a | 58 40 73 65 63 74 69 6f |fort..X.|X@sectio|
|000023b0| 6e 20 45 72 72 6f 72 20 | 74 61 62 6c 65 20 73 6f |n Error |table so|
|000023c0| 75 72 63 65 20 66 69 6c | 65 0a 58 0a 58 54 68 65 |urce fil|e.X.XThe|
|000023d0| 20 65 72 72 6f 72 20 74 | 61 62 6c 65 20 73 6f 75 | error t|able sou|
|000023e0| 72 63 65 20 66 69 6c 65 | 20 62 65 67 69 6e 73 20 |rce file| begins |
|000023f0| 77 69 74 68 20 74 68 65 | 20 64 65 63 6c 61 72 61 |with the| declara|
|00002400| 74 69 6f 6e 20 6f 66 20 | 74 68 65 20 74 61 62 6c |tion of |the tabl|
|00002410| 65 20 6e 61 6d 65 2c 0a | 58 61 73 0a 58 0a 58 40 |e name,.|Xas.X.X@|
|00002420| 65 78 61 6d 70 6c 65 0a | 58 65 72 72 6f 72 5f 74 |example.|Xerror_t|
|00002430| 61 62 6c 65 20 40 76 61 | 72 7b 74 61 62 6c 65 6e |able @va|r{tablen|
|00002440| 61 6d 65 7d 0a 58 40 65 | 6e 64 20 65 78 61 6d 70 |ame}.X@e|nd examp|
|00002450| 6c 65 0a 58 0a 58 49 6e | 64 69 76 69 64 75 61 6c |le.X.XIn|dividual|
|00002460| 20 65 72 72 6f 72 20 63 | 6f 64 65 73 20 61 72 65 | error c|odes are|
|00002470| 0a 58 73 70 65 63 69 66 | 69 65 64 20 77 69 74 68 |.Xspecif|ied with|
|00002480| 0a 58 0a 58 40 65 78 61 | 6d 70 6c 65 0a 58 65 72 |.X.X@exa|mple.Xer|
|00002490| 72 6f 72 5f 63 6f 64 65 | 20 40 76 61 72 7b 45 52 |ror_code| @var{ER|
|000024a0| 52 4f 52 5f 4e 41 4d 45 | 7d 2c 20 40 76 61 72 7b |ROR_NAME|}, @var{|
|000024b0| 22 74 65 78 74 20 6d 65 | 73 73 61 67 65 22 7d 0a |"text me|ssage"}.|
|000024c0| 58 40 65 6e 64 20 65 78 | 61 6d 70 6c 65 0a 58 0a |X@end ex|ample.X.|
|000024d0| 58 77 68 65 72 65 20 40 | 73 61 6d 70 7b 65 63 7d |Xwhere @|samp{ec}|
|000024e0| 20 63 61 6e 20 61 6c 73 | 6f 20 62 65 20 75 73 65 | can als|o be use|
|000024f0| 64 20 61 73 20 61 20 73 | 68 6f 72 74 20 66 6f 72 |d as a s|hort for|
|00002500| 6d 20 6f 66 20 40 73 61 | 6d 70 7b 65 72 72 6f 72 |m of @sa|mp{error|
|00002510| 5f 63 6f 64 65 7d 2e 20 | 20 54 6f 0a 58 69 6e 64 |_code}. | To.Xind|
|00002520| 69 63 61 74 65 20 74 68 | 65 20 65 6e 64 20 6f 66 |icate th|e end of|
|00002530| 20 74 68 65 20 74 61 62 | 6c 65 2c 20 75 73 65 20 | the tab|le, use |
|00002540| 40 73 61 6d 70 7b 65 6e | 64 7d 2e 20 20 54 68 75 |@samp{en|d}. Thu|
|00002550| 73 2c 20 61 20 28 73 68 | 6f 72 74 29 20 73 61 6d |s, a (sh|ort) sam|
|00002560| 70 6c 65 0a 58 65 72 72 | 6f 72 20 74 61 62 6c 65 |ple.Xerr|or table|
|00002570| 20 6d 69 67 68 74 20 62 | 65 3a 0a 58 0a 58 40 65 | might b|e:.X.X@e|
|00002580| 78 61 6d 70 6c 65 0a 58 | 0a 58 20 20 20 20 20 20 |xample.X|.X |
|00002590| 20 20 65 72 72 6f 72 5f | 74 61 62 6c 65 20 20 20 | error_|table |
|000025a0| 20 20 64 73 63 0a 58 0a | 58 20 20 20 20 20 20 20 | dsc.X.|X |
|000025b0| 20 65 72 72 6f 72 5f 63 | 6f 64 65 20 20 20 20 20 | error_c|ode |
|000025c0| 20 44 53 43 5f 44 55 50 | 5f 4d 54 47 5f 4e 41 4d | DSC_DUP|_MTG_NAM|
|000025d0| 45 2c 0a 58 20 20 20 20 | 20 20 20 20 20 20 20 20 |E,.X | |
|000025e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 22 4d 65 65 | | "Mee|
|000025f0| 74 69 6e 67 20 61 6c 72 | 65 61 64 79 20 65 78 69 |ting alr|eady exi|
|00002600| 73 74 73 22 0a 58 0a 58 | 20 20 20 20 20 20 20 20 |sts".X.X| |
|00002610| 65 63 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ec | |
|00002620| 44 53 43 5f 42 41 44 5f | 50 41 54 48 2c 0a 58 20 |DSC_BAD_|PATH,.X |
|00002630| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002640| 20 20 20 20 20 20 20 22 | 41 20 62 61 64 20 6d 65 | "|A bad me|
|00002650| 65 74 69 6e 67 20 70 61 | 74 68 6e 61 6d 65 20 77 |eting pa|thname w|
|00002660| 61 73 20 67 69 76 65 6e | 22 0a 58 0a 58 20 20 20 |as given|".X.X |
|00002670| 20 20 20 20 20 65 63 20 | 20 20 20 20 20 20 20 20 | ec | |
|00002680| 20 20 20 20 20 44 53 43 | 5f 42 41 44 5f 4d 4f 44 | DSC|_BAD_MOD|
|00002690| 45 53 2c 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |ES,.X | |
|000026a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 22 49 6e | | "In|
|000026b0| 76 61 6c 69 64 20 6d 6f | 64 65 20 66 6f 72 20 74 |valid mo|de for t|
|000026c0| 68 69 73 20 61 63 63 65 | 73 73 20 63 6f 6e 74 72 |his acce|ss contr|
|000026d0| 6f 6c 20 6c 69 73 74 22 | 0a 58 0a 58 20 20 20 20 |ol list"|.X.X |
|000026e0| 20 20 20 20 65 6e 64 0a | 58 0a 58 40 65 6e 64 20 | end.|X.X@end |
|000026f0| 65 78 61 6d 70 6c 65 0a | 58 0a 58 40 73 65 63 74 |example.|X.X@sect|
|00002700| 69 6f 6e 20 54 68 65 20 | 65 72 72 6f 72 2d 74 61 |ion The |error-ta|
|00002710| 62 6c 65 20 63 6f 6d 70 | 69 6c 65 72 0a 58 0a 58 |ble comp|iler.X.X|
|00002720| 54 68 65 20 65 72 72 6f | 72 20 74 61 62 6c 65 20 |The erro|r table |
|00002730| 63 6f 6d 70 69 6c 65 72 | 20 69 73 20 6e 61 6d 65 |compiler| is name|
|00002740| 64 20 40 63 6f 64 65 7b | 63 6f 6d 70 69 6c 65 5f |d @code{|compile_|
|00002750| 65 74 7d 2e 20 20 49 74 | 20 74 61 6b 65 73 20 6f |et}. It| takes o|
|00002760| 6e 65 0a 58 61 72 67 75 | 6d 65 6e 74 2c 20 74 68 |ne.Xargu|ment, th|
|00002770| 65 20 70 61 74 68 6e 61 | 6d 65 20 6f 66 20 61 20 |e pathna|me of a |
|00002780| 66 69 6c 65 20 28 65 6e | 64 69 6e 67 20 69 6e 20 |file (en|ding in |
|00002790| 40 73 61 6d 70 7b 2e 65 | 74 7d 2c 20 65 2e 67 2e |@samp{.e|t}, e.g.|
|000027a0| 2c 0a 58 40 73 61 6d 70 | 7b 64 73 63 5f 65 72 72 |,.X@samp|{dsc_err|
|000027b0| 2e 65 74 7d 29 20 63 6f | 6e 74 61 69 6e 69 6e 67 |.et}) co|ntaining|
|000027c0| 20 61 6e 20 65 72 72 6f | 72 20 74 61 62 6c 65 20 | an erro|r table |
|000027d0| 73 6f 75 72 63 65 20 66 | 69 6c 65 2e 20 20 49 74 |source f|ile. It|
|000027e0| 20 70 61 72 73 65 73 20 | 74 68 65 0a 58 65 72 72 | parses |the.Xerr|
|000027f0| 6f 72 20 74 61 62 6c 65 | 2c 20 61 6e 64 20 67 65 |or table|, and ge|
|00002800| 6e 65 72 61 74 65 73 20 | 74 77 6f 20 6f 75 74 70 |nerates |two outp|
|00002810| 75 74 20 66 69 6c 65 73 | 20 2d 2d 20 61 20 43 20 |ut files| -- a C |
|00002820| 68 65 61 64 65 72 20 66 | 69 6c 65 0a 58 28 40 73 |header f|ile.X(@s|
|00002830| 61 6d 70 7b 64 69 73 63 | 75 73 73 5f 65 72 72 2e |amp{disc|uss_err.|
|00002840| 68 7d 29 20 77 68 69 63 | 68 20 63 6f 6e 74 61 69 |h}) whic|h contai|
|00002850| 6e 73 20 64 65 66 69 6e | 69 74 69 6f 6e 73 20 6f |ns defin|itions o|
|00002860| 66 20 74 68 65 20 6e 75 | 6d 65 72 69 63 61 6c 20 |f the nu|merical |
|00002870| 76 61 6c 75 65 73 0a 58 | 6f 66 20 74 68 65 20 65 |values.X|of the e|
|00002880| 72 72 6f 72 20 63 6f 64 | 65 73 20 64 65 66 69 6e |rror cod|es defin|
|00002890| 65 64 20 69 6e 20 74 68 | 65 20 65 72 72 6f 72 20 |ed in th|e error |
|000028a0| 74 61 62 6c 65 2c 20 61 | 6e 64 20 61 20 43 20 73 |table, a|nd a C s|
|000028b0| 6f 75 72 63 65 20 66 69 | 6c 65 20 77 68 69 63 68 |ource fi|le which|
|000028c0| 0a 58 73 68 6f 75 6c 64 | 20 62 65 20 63 6f 6d 70 |.Xshould| be comp|
|000028d0| 69 6c 65 64 20 61 6e 64 | 20 6c 69 6e 6b 65 64 20 |iled and| linked |
|000028e0| 77 69 74 68 20 74 68 65 | 20 65 78 65 63 75 74 61 |with the| executa|
|000028f0| 62 6c 65 2e 20 20 54 68 | 65 20 68 65 61 64 65 72 |ble. Th|e header|
|00002900| 20 66 69 6c 65 20 6d 75 | 73 74 20 62 65 0a 58 69 | file mu|st be.Xi|
|00002910| 6e 63 6c 75 64 65 64 20 | 69 6e 20 74 68 65 20 73 |ncluded |in the s|
|00002920| 6f 75 72 63 65 20 6f 66 | 20 61 20 6d 6f 64 75 6c |ource of| a modul|
|00002930| 65 20 77 68 69 63 68 20 | 77 69 73 68 65 73 20 74 |e which |wishes t|
|00002940| 6f 20 72 65 66 65 72 65 | 6e 63 65 20 74 68 65 20 |o refere|nce the |
|00002950| 65 72 72 6f 72 0a 58 63 | 6f 64 65 73 20 64 65 66 |error.Xc|odes def|
|00002960| 69 6e 65 64 3b 20 74 68 | 65 20 6f 62 6a 65 63 74 |ined; th|e object|
|00002970| 20 6d 6f 64 75 6c 65 20 | 67 65 6e 65 72 61 74 65 | module |generate|
|00002980| 64 20 66 72 6f 6d 20 74 | 68 65 20 43 20 63 6f 64 |d from t|he C cod|
|00002990| 65 20 6d 61 79 20 62 65 | 20 6c 69 6e 6b 65 64 20 |e may be| linked |
|000029a0| 69 6e 0a 58 74 6f 20 61 | 20 70 72 6f 67 72 61 6d |in.Xto a| program|
|000029b0| 20 77 68 69 63 68 20 77 | 69 73 68 65 73 20 74 6f | which w|ishes to|
|000029c0| 20 75 73 65 20 74 68 65 | 20 70 72 69 6e 74 65 64 | use the| printed|
|000029d0| 20 66 6f 72 6d 73 20 6f | 66 20 74 68 65 20 65 72 | forms o|f the er|
|000029e0| 72 6f 72 20 63 6f 64 65 | 73 2e 0a 58 0a 58 54 68 |ror code|s..X.XTh|
|000029f0| 69 73 20 74 72 61 6e 73 | 6c 61 74 6f 72 20 61 63 |is trans|lator ac|
|00002a00| 63 65 70 74 73 20 61 20 | 40 6b 62 64 7b 2d 6c 61 |cepts a |@kbd{-la|
|00002a10| 6e 67 75 61 67 65 20 40 | 76 61 72 7b 6c 61 6e 67 |nguage @|var{lang|
|00002a20| 7d 7d 20 61 72 67 75 6d | 65 6e 74 2c 20 77 68 69 |}} argum|ent, whi|
|00002a30| 63 68 0a 58 64 65 74 65 | 72 6d 69 6e 65 73 20 66 |ch.Xdete|rmines f|
|00002a40| 6f 72 20 77 68 69 63 68 | 20 6c 61 6e 67 75 61 67 |or which| languag|
|00002a50| 65 20 28 6f 72 20 6c 61 | 6e 67 75 61 67 65 20 76 |e (or la|nguage v|
|00002a60| 61 72 69 61 6e 74 29 20 | 74 68 65 20 6f 75 74 70 |ariant) |the outp|
|00002a70| 75 74 20 73 68 6f 75 6c | 64 20 62 65 0a 58 77 72 |ut shoul|d be.Xwr|
|00002a80| 69 74 74 65 6e 2e 20 20 | 41 74 20 74 68 65 20 6d |itten. |At the m|
|00002a90| 6f 6d 65 6e 74 2c 20 40 | 76 61 72 7b 6c 61 6e 67 |oment, @|var{lang|
|00002aa0| 7d 20 69 73 20 63 75 72 | 72 65 6e 74 6c 79 20 6c |} is cur|rently l|
|00002ab0| 69 6d 69 74 65 64 20 74 | 6f 20 40 6b 62 64 7b 41 |imited t|o @kbd{A|
|00002ac0| 4e 53 49 2d 43 7d 0a 58 | 61 6e 64 20 40 6b 62 64 |NSI-C}.X|and @kbd|
|00002ad0| 7b 4b 26 52 2d 43 7d 2c | 20 61 6e 64 20 73 6f 6d |{K&R-C},| and som|
|00002ae0| 65 20 61 62 62 72 65 76 | 69 61 74 65 64 20 66 6f |e abbrev|iated fo|
|00002af0| 72 6d 73 20 6f 66 20 65 | 61 63 68 2e 20 20 45 76 |rms of e|ach. Ev|
|00002b00| 65 6e 74 75 61 6c 6c 79 | 2c 20 74 68 69 73 20 77 |entually|, this w|
|00002b10| 69 6c 6c 0a 58 62 65 20 | 65 78 74 65 6e 64 65 64 |ill.Xbe |extended|
|00002b20| 20 74 6f 20 69 6e 63 6c | 75 64 65 20 73 6f 6d 65 | to incl|ude some|
|00002b30| 20 73 75 70 70 6f 72 74 | 20 66 6f 72 20 43 2b 2b | support| for C++|
|00002b40| 2e 20 20 54 68 65 20 64 | 65 66 61 75 6c 74 20 69 |. The d|efault i|
|00002b50| 73 20 63 75 72 72 65 6e | 74 6c 79 0a 58 40 6b 62 |s curren|tly.X@kb|
|00002b60| 64 7b 4b 26 52 2d 43 7d | 2c 20 74 68 6f 75 67 68 |d{K&R-C}|, though|
|00002b70| 20 74 68 65 20 67 65 6e | 65 72 61 74 65 64 20 73 | the gen|erated s|
|00002b80| 6f 75 72 63 65 73 20 77 | 69 6c 6c 20 68 61 76 65 |ources w|ill have|
|00002b90| 20 41 4e 53 49 2d 43 20 | 63 6f 64 65 0a 58 63 6f | ANSI-C |code.Xco|
|00002ba0| 6e 64 69 74 69 6f 6e 61 | 6c 69 7a 65 64 20 6f 6e |nditiona|lized on|
|00002bb0| 20 74 68 65 20 73 79 6d | 62 6f 6c 20 40 74 7b 5f | the sym|bol @t{_|
|00002bc0| 5f 53 54 44 43 5f 5f 7d | 2e 0a 58 0a 58 40 73 65 |_STDC__}|..X.X@se|
|00002bd0| 63 74 69 6f 6e 20 52 75 | 6e 2d 74 69 6d 65 20 73 |ction Ru|n-time s|
|00002be0| 75 70 70 6f 72 74 20 72 | 6f 75 74 69 6e 65 73 0a |upport r|outines.|
|00002bf0| 58 0a 58 41 6e 79 20 73 | 6f 75 72 63 65 20 66 69 |X.XAny s|ource fi|
|00002c00| 6c 65 20 77 68 69 63 68 | 20 75 73 65 73 20 74 68 |le which| uses th|
|00002c10| 65 20 72 6f 75 74 69 6e | 65 73 20 73 75 70 70 6c |e routin|es suppl|
|00002c20| 69 65 64 20 77 69 74 68 | 20 6f 72 20 70 72 6f 64 |ied with| or prod|
|00002c30| 75 63 65 64 20 62 79 20 | 74 68 65 0a 58 63 6f 6d |uced by |the.Xcom|
|00002c40| 5f 65 72 72 20 70 61 63 | 6b 61 67 65 20 73 68 6f |_err pac|kage sho|
|00002c50| 75 6c 64 20 69 6e 63 6c | 75 64 65 20 74 68 65 20 |uld incl|ude the |
|00002c60| 68 65 61 64 65 72 20 66 | 69 6c 65 20 40 66 69 6c |header f|ile @fil|
|00002c70| 65 7b 3c 63 6f 6d 5f 65 | 72 72 2e 68 3e 7d 2e 20 |e{<com_e|rr.h>}. |
|00002c80| 20 49 74 0a 58 63 6f 6e | 74 61 69 6e 73 20 64 65 | It.Xcon|tains de|
|00002c90| 63 6c 61 72 61 74 69 6f | 6e 73 20 61 6e 64 20 64 |claratio|ns and d|
|00002ca0| 65 66 69 6e 69 74 69 6f | 6e 73 20 77 68 69 63 68 |efinitio|ns which|
|00002cb0| 20 6d 61 79 20 62 65 20 | 6e 65 65 64 65 64 20 6f | may be |needed o|
|00002cc0| 6e 20 73 6f 6d 65 20 73 | 79 73 74 65 6d 73 2e 0a |n some s|ystems..|
|00002cd0| 58 28 53 6f 6d 65 20 66 | 75 6e 63 74 69 6f 6e 73 |X(Some f|unctions|
|00002ce0| 20 63 61 6e 6e 6f 74 20 | 62 65 20 72 65 66 65 72 | cannot |be refer|
|00002cf0| 65 6e 63 65 64 20 70 72 | 6f 70 65 72 6c 79 20 77 |enced pr|operly w|
|00002d00| 69 74 68 6f 75 74 20 74 | 68 65 20 72 65 74 75 72 |ithout t|he retur|
|00002d10| 6e 20 74 79 70 65 0a 58 | 64 65 63 6c 61 72 61 74 |n type.X|declarat|
|00002d20| 69 6f 6e 73 20 69 6e 20 | 74 68 69 73 20 66 69 6c |ions in |this fil|
|00002d30| 65 2e 20 20 53 6f 6d 65 | 20 66 75 6e 63 74 69 6f |e. Some| functio|
|00002d40| 6e 73 20 6d 61 79 20 77 | 6f 72 6b 20 70 72 6f 70 |ns may w|ork prop|
|00002d50| 65 72 6c 79 20 6f 6e 20 | 6d 6f 73 74 0a 58 61 72 |erly on |most.Xar|
|00002d60| 63 68 69 74 65 63 74 75 | 72 65 73 20 65 76 65 6e |chitectu|res even|
|00002d70| 20 77 69 74 68 6f 75 74 | 20 74 68 65 20 68 65 61 | without| the hea|
|00002d80| 64 65 72 20 66 69 6c 65 | 2c 20 62 75 74 20 72 65 |der file|, but re|
|00002d90| 6c 79 69 6e 67 20 6f 6e | 20 74 68 69 73 20 69 73 |lying on| this is|
|00002da0| 20 6e 6f 74 0a 58 72 65 | 63 6f 6d 6d 65 6e 64 65 | not.Xre|commende|
|00002db0| 64 2e 29 0a 58 0a 58 54 | 68 65 20 72 75 6e 2d 74 |d.).X.XT|he run-t|
|00002dc0| 69 6d 65 20 73 75 70 70 | 6f 72 74 20 72 6f 75 74 |ime supp|ort rout|
|00002dd0| 69 6e 65 73 20 61 6e 64 | 20 76 61 72 69 61 62 6c |ines and| variabl|
|00002de0| 65 73 20 70 72 6f 76 69 | 64 65 64 20 76 69 61 20 |es provi|ded via |
|00002df0| 74 68 69 73 20 70 61 63 | 6b 61 67 65 0a 58 69 6e |this pac|kage.Xin|
|00002e00| 63 6c 75 64 65 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |clude th|e follow|
|00002e10| 69 6e 67 3a 0a 58 0a 58 | 40 65 78 61 6d 70 6c 65 |ing:.X.X|@example|
|00002e20| 0a 58 76 6f 69 64 20 69 | 6e 69 74 69 61 6c 69 7a |.Xvoid i|nitializ|
|00002e30| 65 5f 40 76 61 72 7b 78 | 78 78 78 7d 5f 65 72 72 |e_@var{x|xxx}_err|
|00002e40| 6f 72 5f 74 61 62 6c 65 | 20 28 76 6f 69 64 29 3b |or_table| (void);|
|00002e50| 0a 58 40 65 6e 64 20 65 | 78 61 6d 70 6c 65 0a 58 |.X@end e|xample.X|
|00002e60| 0a 58 4f 6e 65 20 6f 66 | 20 74 68 65 73 65 20 72 |.XOne of| these r|
|00002e70| 6f 75 74 69 6e 65 73 20 | 69 73 20 62 75 69 6c 74 |outines |is built|
|00002e80| 20 62 79 20 74 68 65 20 | 65 72 72 6f 72 20 63 6f | by the |error co|
|00002e90| 6d 70 69 6c 65 72 20 66 | 6f 72 20 65 61 63 68 20 |mpiler f|or each |
|00002ea0| 65 72 72 6f 72 20 74 61 | 62 6c 65 2e 0a 58 49 74 |error ta|ble..XIt|
|00002eb0| 20 6d 61 6b 65 73 20 74 | 68 65 20 40 76 61 72 7b | makes t|he @var{|
|00002ec0| 78 78 78 78 7d 20 65 72 | 72 6f 72 20 74 61 62 6c |xxxx} er|ror tabl|
|00002ed0| 65 20 60 60 6b 6e 6f 77 | 6e 27 27 20 74 6f 20 74 |e ``know|n'' to t|
|00002ee0| 68 65 20 65 72 72 6f 72 | 20 72 65 70 6f 72 74 69 |he error| reporti|
|00002ef0| 6e 67 0a 58 73 79 73 74 | 65 6d 2e 20 20 42 79 20 |ng.Xsyst|em. By |
|00002f00| 63 6f 6e 76 65 6e 74 69 | 6f 6e 2c 20 74 68 69 73 |conventi|on, this|
|00002f10| 20 72 6f 75 74 69 6e 65 | 20 73 68 6f 75 6c 64 20 | routine| should |
|00002f20| 62 65 20 63 61 6c 6c 65 | 64 20 69 6e 20 74 68 65 |be calle|d in the|
|00002f30| 20 69 6e 69 74 69 61 6c | 69 7a 61 74 69 6f 6e 0a | initial|ization.|
|00002f40| 58 72 6f 75 74 69 6e 65 | 20 6f 66 20 74 68 65 20 |Xroutine| of the |
|00002f50| 40 76 61 72 7b 78 78 78 | 78 7d 20 6c 69 62 72 61 |@var{xxx|x} libra|
|00002f60| 72 79 2e 20 20 49 66 20 | 74 68 65 20 6c 69 62 72 |ry. If |the libr|
|00002f70| 61 72 79 20 68 61 73 20 | 6e 6f 20 69 6e 69 74 69 |ary has |no initi|
|00002f80| 61 6c 69 7a 61 74 69 6f | 6e 0a 58 72 6f 75 74 69 |alizatio|n.Xrouti|
|00002f90| 6e 65 2c 20 73 6f 6d 65 | 20 63 6f 6d 62 69 6e 61 |ne, some| combina|
|00002fa0| 74 69 6f 6e 20 6f 66 20 | 72 6f 75 74 69 6e 65 73 |tion of |routines|
|00002fb0| 20 77 68 69 63 68 20 66 | 6f 72 6d 20 74 68 65 20 | which f|orm the |
|00002fc0| 63 6f 72 65 20 6f 66 20 | 74 68 65 20 6c 69 62 72 |core of |the libr|
|00002fd0| 61 72 79 0a 58 73 68 6f | 75 6c 64 20 65 6e 73 75 |ary.Xsho|uld ensu|
|00002fe0| 72 65 20 74 68 61 74 20 | 74 68 69 73 20 72 6f 75 |re that |this rou|
|00002ff0| 74 69 6e 65 20 69 73 20 | 63 61 6c 6c 65 64 2e 20 |tine is |called. |
|00003000| 20 49 74 20 69 73 20 6e | 6f 74 20 61 64 76 69 73 | It is n|ot advis|
|00003010| 65 64 20 74 6f 20 6c 65 | 61 76 65 20 69 74 0a 58 |ed to le|ave it.X|
|00003020| 74 68 65 20 63 61 6c 6c | 65 72 20 74 6f 20 6d 61 |the call|er to ma|
|00003030| 6b 65 20 74 68 69 73 20 | 63 61 6c 6c 2e 0a 58 0a |ke this |call..X.|
|00003040| 58 54 68 65 72 65 20 69 | 73 20 6e 6f 20 68 61 72 |XThere i|s no har|
|00003050| 6d 20 69 6e 20 63 61 6c | 6c 69 6e 67 20 74 68 69 |m in cal|ling thi|
|00003060| 73 20 72 6f 75 74 69 6e | 65 20 6d 6f 72 65 20 74 |s routin|e more t|
|00003070| 68 61 6e 20 6f 6e 63 65 | 2e 0a 58 0a 58 40 65 78 |han once|..X.X@ex|
|00003080| 61 6d 70 6c 65 0a 58 23 | 64 65 66 69 6e 65 20 45 |ample.X#|define E|
|00003090| 52 52 4f 52 5f 54 41 42 | 4c 45 5f 42 41 53 45 5f |RROR_TAB|LE_BASE_|
|000030a0| 40 76 61 72 7b 78 78 78 | 78 7d 20 40 76 61 72 7b |@var{xxx|x} @var{|
|000030b0| 6e 6e 6e 6e 6e 7d 4c 0a | 58 40 65 6e 64 20 65 78 |nnnnn}L.|X@end ex|
|000030c0| 61 6d 70 6c 65 0a 58 0a | 58 54 68 69 73 20 73 79 |ample.X.|XThis sy|
|000030d0| 6d 62 6f 6c 20 63 6f 6e | 74 61 69 6e 73 20 74 68 |mbol con|tains th|
|000030e0| 65 20 76 61 6c 75 65 20 | 6f 66 20 74 68 65 20 66 |e value |of the f|
|000030f0| 69 72 73 74 20 65 72 72 | 6f 72 20 63 6f 64 65 20 |irst err|or code |
|00003100| 65 6e 74 72 79 20 69 6e | 20 74 68 65 0a 58 73 70 |entry in| the.Xsp|
|00003110| 65 63 69 66 69 65 64 20 | 74 61 62 6c 65 2e 0a 58 |ecified |table..X|
|00003120| 54 68 69 73 20 72 61 72 | 65 6c 79 20 6e 65 65 64 |This rar|ely need|
|00003130| 73 20 62 65 20 75 73 65 | 64 20 62 79 20 74 68 65 |s be use|d by the|
|00003140| 0a 58 70 72 6f 67 72 61 | 6d 6d 65 72 2e 0a 58 0a |.Xprogra|mmer..X.|
|00003150| 58 40 65 78 61 6d 70 6c | 65 0a 58 63 6f 6e 73 74 |X@exampl|e.Xconst|
|00003160| 20 63 68 61 72 20 2a 65 | 72 72 6f 72 5f 6d 65 73 | char *e|rror_mes|
|00003170| 73 61 67 65 20 28 6c 6f | 6e 67 20 63 6f 64 65 29 |sage (lo|ng code)|
|00003180| 3b 0a 58 40 65 6e 64 20 | 65 78 61 6d 70 6c 65 0a |;.X@end |example.|
|00003190| 58 0a 58 54 68 69 73 20 | 72 6f 75 74 69 6e 65 20 |X.XThis |routine |
|000031a0| 72 65 74 75 72 6e 73 20 | 74 68 65 20 63 68 61 72 |returns |the char|
|000031b0| 61 63 74 65 72 20 73 74 | 72 69 6e 67 20 65 72 72 |acter st|ring err|
|000031c0| 6f 72 20 6d 65 73 73 61 | 67 65 20 61 73 73 6f 63 |or messa|ge assoc|
|000031d0| 69 61 74 65 64 0a 58 77 | 69 74 68 20 40 63 6f 64 |iated.Xw|ith @cod|
|000031e0| 65 7b 63 6f 64 65 7d 3b | 20 69 66 20 74 68 69 73 |e{code};| if this|
|000031f0| 20 69 73 20 61 73 73 6f | 63 69 61 74 65 64 20 77 | is asso|ciated w|
|00003200| 69 74 68 20 61 6e 20 75 | 6e 6b 6e 6f 77 6e 20 65 |ith an u|nknown e|
|00003210| 72 72 6f 72 20 74 61 62 | 6c 65 2c 20 6f 72 0a 58 |rror tab|le, or.X|
|00003220| 69 66 20 74 68 65 20 63 | 6f 64 65 20 69 73 20 61 |if the c|ode is a|
|00003230| 73 73 6f 63 69 61 74 65 | 64 20 77 69 74 68 20 61 |ssociate|d with a|
|00003240| 20 6b 6e 6f 77 6e 20 65 | 72 72 6f 72 20 74 61 62 | known e|rror tab|
|00003250| 6c 65 20 62 75 74 20 74 | 68 65 20 63 6f 64 65 20 |le but t|he code |
|00003260| 69 73 20 6e 6f 74 0a 58 | 69 6e 20 74 68 65 20 74 |is not.X|in the t|
|00003270| 61 62 6c 65 2c 20 61 20 | 73 74 72 69 6e 67 20 6f |able, a |string o|
|00003280| 66 20 74 68 65 20 66 6f | 72 6d 20 40 73 61 6d 70 |f the fo|rm @samp|
|00003290| 7b 55 6e 6b 6e 6f 77 6e | 20 63 6f 64 65 20 40 76 |{Unknown| code @v|
|000032a0| 61 72 7b 78 78 78 78 20 | 6e 6e 7d 7d 20 69 73 0a |ar{xxxx |nn}} is.|
|000032b0| 58 72 65 74 75 72 6e 65 | 64 2c 20 77 68 65 72 65 |Xreturne|d, where|
|000032c0| 20 40 76 61 72 7b 78 78 | 78 78 7d 20 69 73 20 74 | @var{xx|xx} is t|
|000032d0| 68 65 20 65 72 72 6f 72 | 20 74 61 62 6c 65 20 6e |he error| table n|
|000032e0| 61 6d 65 20 70 72 6f 64 | 75 63 65 64 20 62 79 0a |ame prod|uced by.|
|000032f0| 58 72 65 76 65 72 73 69 | 6e 67 20 74 68 65 20 63 |Xreversi|ng the c|
|00003300| 6f 6d 70 61 63 74 69 6f | 6e 20 70 65 72 66 6f 72 |ompactio|n perfor|
|00003310| 6d 65 64 20 6f 6e 20 74 | 68 65 20 65 72 72 6f 72 |med on t|he error|
|00003320| 20 74 61 62 6c 65 20 6e | 75 6d 62 65 72 20 69 6d | table n|umber im|
|00003330| 70 6c 69 65 64 0a 58 62 | 79 20 74 68 61 74 20 65 |plied.Xb|y that e|
|00003340| 72 72 6f 72 20 63 6f 64 | 65 2c 20 61 6e 64 20 40 |rror cod|e, and @|
|00003350| 76 61 72 7b 6e 6e 7d 20 | 69 73 20 74 68 65 20 6f |var{nn} |is the o|
|00003360| 66 66 73 65 74 20 66 72 | 6f 6d 20 74 68 61 74 20 |ffset fr|om that |
|00003370| 62 61 73 65 20 76 61 6c | 75 65 2e 0a 58 0a 58 41 |base val|ue..X.XA|
|00003380| 6c 74 68 6f 75 67 68 20 | 74 68 69 73 20 72 6f 75 |lthough |this rou|
|00003390| 74 69 6e 65 20 69 73 20 | 61 76 61 69 6c 61 62 6c |tine is |availabl|
|000033a0| 65 20 66 6f 72 20 75 73 | 65 20 77 68 65 6e 20 6e |e for us|e when n|
|000033b0| 65 65 64 65 64 2c 20 69 | 74 73 20 75 73 65 20 73 |eeded, i|ts use s|
|000033c0| 68 6f 75 6c 64 20 62 65 | 0a 58 6c 65 66 74 20 74 |hould be|.Xleft t|
|000033d0| 6f 20 63 69 72 63 75 6d | 73 74 61 6e 63 65 73 20 |o circum|stances |
|000033e0| 77 68 69 63 68 20 72 65 | 6e 64 65 72 20 40 63 6f |which re|nder @co|
|000033f0| 64 65 7b 63 6f 6d 5f 65 | 72 72 7d 20 28 62 65 6c |de{com_e|rr} (bel|
|00003400| 6f 77 29 20 75 6e 75 73 | 61 62 6c 65 2e 0a 58 0a |ow) unus|able..X.|
|00003410| 58 40 65 78 61 6d 70 6c | 65 0a 58 76 6f 69 64 20 |X@exampl|e.Xvoid |
|00003420| 63 6f 6d 5f 65 72 72 20 | 28 63 6f 6e 73 74 20 63 |com_err |(const c|
|00003430| 68 61 72 20 2a 77 68 6f | 61 6d 69 2c 20 20 2f 2a |har *who|ami, /*|
|00003440| 20 6d 6f 64 75 6c 65 20 | 72 65 70 6f 72 74 69 6e | module |reportin|
|00003450| 67 20 65 72 72 6f 72 20 | 2a 2f 0a 58 20 20 20 20 |g error |*/.X |
|00003460| 20 20 20 20 20 20 20 20 | 20 20 6c 6f 6e 67 20 63 | | long c|
|00003470| 6f 64 65 2c 20 20 20 20 | 20 20 20 20 20 20 20 2f |ode, | /|
|00003480| 2a 20 65 72 72 6f 72 20 | 63 6f 64 65 20 2a 2f 0a |* error |code */.|
|00003490| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 63 |X | c|
|000034a0| 6f 6e 73 74 20 63 68 61 | 72 20 2a 66 6f 72 6d 61 |onst cha|r *forma|
|000034b0| 74 2c 20 20 2f 2a 20 66 | 6f 72 6d 61 74 20 66 6f |t, /* f|ormat fo|
|000034c0| 72 20 61 64 64 69 74 69 | 6f 6e 61 6c 20 64 65 74 |r additi|onal det|
|000034d0| 61 69 6c 20 2a 2f 0a 58 | 20 20 20 20 20 20 20 20 |ail */.X| |
|000034e0| 20 20 20 20 20 20 2e 2e | 2e 29 3b 20 20 20 20 20 | ..|.); |
|000034f0| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2a 20 20 28 | | /* (|
|00003500| 65 78 74 72 61 20 70 61 | 72 61 6d 65 74 65 72 73 |extra pa|rameters|
|00003510| 29 20 2a 2f 0a 58 40 65 | 6e 64 20 65 78 61 6d 70 |) */.X@e|nd examp|
|00003520| 6c 65 0a 58 0a 58 54 68 | 69 73 20 72 6f 75 74 69 |le.X.XTh|is routi|
|00003530| 6e 65 20 70 72 6f 76 69 | 64 65 73 20 61 6e 20 61 |ne provi|des an a|
|00003540| 6c 74 65 72 6e 61 74 65 | 20 77 61 79 20 74 6f 20 |lternate| way to |
|00003550| 70 72 69 6e 74 20 65 72 | 72 6f 72 20 6d 65 73 73 |print er|ror mess|
|00003560| 61 67 65 73 20 74 6f 0a | 58 73 74 61 6e 64 61 72 |ages to.|Xstandar|
|00003570| 64 20 65 72 72 6f 72 3b | 20 69 74 20 61 6c 6c 6f |d error;| it allo|
|00003580| 77 73 20 74 68 65 20 65 | 72 72 6f 72 20 6d 65 73 |ws the e|rror mes|
|00003590| 73 61 67 65 20 74 6f 20 | 62 65 20 70 61 73 73 65 |sage to |be passe|
|000035a0| 64 20 69 6e 20 61 73 20 | 61 0a 58 70 61 72 61 6d |d in as |a.Xparam|
|000035b0| 65 74 65 72 2c 20 72 61 | 74 68 65 72 20 74 68 61 |eter, ra|ther tha|
|000035c0| 6e 20 69 6e 20 61 6e 20 | 65 78 74 65 72 6e 61 6c |n in an |external|
|000035d0| 20 76 61 72 69 61 62 6c | 65 2e 20 20 40 65 6d 70 | variabl|e. @emp|
|000035e0| 68 7b 50 72 6f 76 69 64 | 65 20 67 72 61 6d 6d 61 |h{Provid|e gramma|
|000035f0| 74 69 63 61 6c 0a 58 63 | 6f 6e 74 65 78 74 20 66 |tical.Xc|ontext f|
|00003600| 6f 72 20 60 60 6d 65 73 | 73 61 67 65 2e 27 27 7d |or ``mes|sage.''}|
|00003610| 0a 58 0a 58 49 66 20 40 | 76 61 72 7b 66 6f 72 6d |.X.XIf @|var{form|
|00003620| 61 74 7d 20 69 73 20 40 | 63 6f 64 65 7b 28 63 68 |at} is @|code{(ch|
|00003630| 61 72 20 2a 29 4e 55 4c | 4c 7d 2c 20 74 68 65 20 |ar *)NUL|L}, the |
|00003640| 66 6f 72 6d 61 74 74 65 | 64 20 6d 65 73 73 61 67 |formatte|d messag|
|00003650| 65 20 77 69 6c 6c 20 6e | 6f 74 20 62 65 0a 58 70 |e will n|ot be.Xp|
|00003660| 72 69 6e 74 65 64 2e 20 | 20 40 76 61 72 7b 66 6f |rinted. | @var{fo|
|00003670| 72 6d 61 74 7d 20 6d 61 | 79 20 6e 6f 74 20 62 65 |rmat} ma|y not be|
|00003680| 20 6f 6d 69 74 74 65 64 | 2e 0a 58 0a 58 40 65 78 | omitted|..X.X@ex|
|00003690| 61 6d 70 6c 65 0a 58 23 | 69 6e 63 6c 75 64 65 20 |ample.X#|include |
|000036a0| 3c 73 74 64 61 72 67 2e | 68 3e 0a 58 0a 58 76 6f |<stdarg.|h>.X.Xvo|
|000036b0| 69 64 20 63 6f 6d 5f 65 | 72 72 5f 76 61 20 28 63 |id com_e|rr_va (c|
|000036c0| 6f 6e 73 74 20 63 68 61 | 72 20 2a 77 68 6f 61 6d |onst cha|r *whoam|
|000036d0| 69 2c 0a 58 20 20 20 20 | 20 20 20 20 20 20 20 20 |i,.X | |
|000036e0| 20 20 20 20 20 6c 6f 6e | 67 20 63 6f 64 65 2c 0a | lon|g code,.|
|000036f0| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |X | |
|00003700| 20 20 63 6f 6e 73 74 20 | 63 68 61 72 20 2a 66 6f | const |char *fo|
|00003710| 72 6d 61 74 2c 0a 58 20 | 20 20 20 20 20 20 20 20 |rmat,.X | |
|00003720| 20 20 20 20 20 20 20 20 | 76 61 5f 6c 69 73 74 20 | |va_list |
|00003730| 61 72 67 73 29 3b 0a 58 | 40 65 6e 64 20 65 78 61 |args);.X|@end exa|
|00003740| 6d 70 6c 65 0a 58 0a 58 | 54 68 69 73 20 72 6f 75 |mple.X.X|This rou|
|00003750| 74 69 6e 65 20 70 72 6f | 76 69 64 65 73 20 61 6e |tine pro|vides an|
|00003760| 20 69 6e 74 65 72 66 61 | 63 65 2c 20 65 71 75 69 | interfa|ce, equi|
|00003770| 76 61 6c 65 6e 74 20 74 | 6f 20 40 63 6f 64 65 7b |valent t|o @code{|
|00003780| 63 6f 6d 5f 65 72 72 7d | 20 61 62 6f 76 65 2c 0a |com_err}| above,.|
|00003790| 58 77 68 69 63 68 20 6d | 61 79 20 62 65 20 75 73 |Xwhich m|ay be us|
|000037a0| 65 64 20 62 79 20 68 69 | 67 68 65 72 2d 6c 65 76 |ed by hi|gher-lev|
|000037b0| 65 6c 20 76 61 72 69 61 | 64 69 63 20 66 75 6e 63 |el varia|dic func|
|000037c0| 74 69 6f 6e 73 20 28 66 | 75 6e 63 74 69 6f 6e 73 |tions (f|unctions|
|000037d0| 20 77 68 69 63 68 0a 58 | 61 63 63 65 70 74 20 76 | which.X|accept v|
|000037e0| 61 72 69 61 62 6c 65 20 | 6e 75 6d 62 65 72 73 20 |ariable |numbers |
|000037f0| 6f 66 20 61 72 67 75 6d | 65 6e 74 73 29 2e 0a 58 |of argum|ents)..X|
|00003800| 0a 58 40 65 78 61 6d 70 | 6c 65 0a 58 23 69 6e 63 |.X@examp|le.X#inc|
|00003810| 6c 75 64 65 20 3c 73 74 | 64 61 72 67 2e 68 3e 0a |lude <st|darg.h>.|
|00003820| 58 0a 58 76 6f 69 64 20 | 28 2a 73 65 74 5f 63 6f |X.Xvoid |(*set_co|
|00003830| 6d 5f 65 72 72 5f 68 6f | 6f 6b 20 28 76 6f 69 64 |m_err_ho|ok (void|
|00003840| 20 28 2a 70 72 6f 63 29 | 20 28 29 29 29 20 28 29 | (*proc)| ())) ()|
|00003850| 3b 0a 58 0a 58 76 6f 69 | 64 20 28 2a 40 76 61 72 |;.X.Xvoi|d (*@var|
|00003860| 7b 70 72 6f 63 7d 29 20 | 28 63 6f 6e 73 74 20 63 |{proc}) |(const c|
|00003870| 68 61 72 20 2a 77 68 6f | 61 6d 69 2c 20 6c 6f 6e |har *who|ami, lon|
|00003880| 67 20 63 6f 64 65 2c 20 | 76 61 5f 6c 69 73 74 20 |g code, |va_list |
|00003890| 61 72 67 73 29 3b 0a 58 | 0a 58 76 6f 69 64 20 72 |args);.X|.Xvoid r|
|000038a0| 65 73 65 74 5f 63 6f 6d | 5f 65 72 72 5f 68 6f 6f |eset_com|_err_hoo|
|000038b0| 6b 20 28 29 3b 0a 58 40 | 65 6e 64 20 65 78 61 6d |k ();.X@|end exam|
|000038c0| 70 6c 65 0a 58 0a 58 54 | 68 65 73 65 20 74 77 6f |ple.X.XT|hese two|
|000038d0| 20 72 6f 75 74 69 6e 65 | 73 20 61 6c 6c 6f 77 20 | routine|s allow |
|000038e0| 61 20 72 6f 75 74 69 6e | 65 20 74 6f 20 62 65 20 |a routin|e to be |
|000038f0| 64 79 6e 61 6d 69 63 61 | 6c 6c 79 20 73 75 62 73 |dynamica|lly subs|
|00003900| 74 69 74 75 74 65 64 20 | 66 6f 72 0a 58 40 73 61 |tituted |for.X@sa|
|00003910| 6d 70 7b 63 6f 6d 5f 65 | 72 72 7d 2e 20 20 41 66 |mp{com_e|rr}. Af|
|00003920| 74 65 72 20 40 73 61 6d | 70 7b 73 65 74 5f 63 6f |ter @sam|p{set_co|
|00003930| 6d 5f 65 72 72 5f 68 6f | 6f 6b 7d 20 68 61 73 20 |m_err_ho|ok} has |
|00003940| 62 65 65 6e 20 63 61 6c | 6c 65 64 2c 0a 58 63 61 |been cal|led,.Xca|
|00003950| 6c 6c 73 20 74 6f 20 40 | 73 61 6d 70 7b 63 6f 6d |lls to @|samp{com|
|00003960| 5f 65 72 72 7d 20 77 69 | 6c 6c 20 74 75 72 6e 20 |_err} wi|ll turn |
|00003970| 69 6e 74 6f 20 63 61 6c | 6c 73 20 74 6f 20 74 68 |into cal|ls to th|
|00003980| 65 20 6e 65 77 20 68 6f | 6f 6b 20 72 6f 75 74 69 |e new ho|ok routi|
|00003990| 6e 65 2e 0a 58 40 73 61 | 6d 70 7b 72 65 73 65 74 |ne..X@sa|mp{reset|
|000039a0| 5f 63 6f 6d 5f 65 72 72 | 5f 68 6f 6f 6b 7d 20 74 |_com_err|_hook} t|
|000039b0| 75 72 6e 73 20 6f 66 66 | 20 74 68 69 73 20 68 6f |urns off| this ho|
|000039c0| 6f 6b 2e 20 20 54 68 69 | 73 20 6d 61 79 20 69 6e |ok. Thi|s may in|
|000039d0| 74 65 6e 64 65 64 20 74 | 6f 0a 58 62 65 20 75 73 |tended t|o.Xbe us|
|000039e0| 65 64 20 69 6e 20 64 61 | 65 6d 6f 6e 73 20 28 74 |ed in da|emons (t|
|000039f0| 6f 20 75 73 65 20 61 20 | 72 6f 75 74 69 6e 65 20 |o use a |routine |
|00003a00| 77 68 69 63 68 20 63 61 | 6c 6c 73 20 40 76 61 72 |which ca|lls @var|
|00003a10| 7b 73 79 73 6c 6f 67 28 | 33 29 7d 29 2c 20 6f 72 |{syslog(|3)}), or|
|00003a20| 0a 58 69 6e 20 61 20 77 | 69 6e 64 6f 77 20 73 79 |.Xin a w|indow sy|
|00003a30| 73 74 65 6d 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |stem app|lication|
|00003a40| 20 28 77 68 69 63 68 20 | 63 6f 75 6c 64 20 70 6f | (which |could po|
|00003a50| 70 20 75 70 20 61 20 64 | 69 61 6c 6f 67 75 65 20 |p up a d|ialogue |
|00003a60| 62 6f 78 29 2e 0a 58 0a | 58 49 66 20 61 20 70 72 |box)..X.|XIf a pr|
|00003a70| 6f 67 72 61 6d 20 69 73 | 20 74 6f 20 62 65 20 75 |ogram is| to be u|
|00003a80| 73 65 64 20 69 6e 20 61 | 6e 20 65 6e 76 69 72 6f |sed in a|n enviro|
|00003a90| 6e 6d 65 6e 74 20 69 6e | 20 77 68 69 63 68 20 73 |nment in| which s|
|00003aa0| 69 6d 70 6c 79 20 70 72 | 69 6e 74 69 6e 67 0a 58 |imply pr|inting.X|
|00003ab0| 6d 65 73 73 61 67 65 73 | 20 74 6f 20 74 68 65 20 |messages| to the |
|00003ac0| 40 63 6f 64 65 7b 73 74 | 64 65 72 72 7d 20 73 74 |@code{st|derr} st|
|00003ad0| 72 65 61 6d 20 77 6f 75 | 6c 64 20 62 65 20 69 6e |ream wou|ld be in|
|00003ae0| 61 70 70 72 6f 70 72 69 | 61 74 65 20 28 73 75 63 |appropri|ate (suc|
|00003af0| 68 20 61 73 20 69 6e 20 | 61 0a 58 64 61 65 6d 6f |h as in |a.Xdaemo|
|00003b00| 6e 20 70 72 6f 67 72 61 | 6d 20 77 68 69 63 68 20 |n progra|m which |
|00003b10| 72 75 6e 73 20 77 69 74 | 68 6f 75 74 20 61 20 74 |runs wit|hout a t|
|00003b20| 65 72 6d 69 6e 61 6c 20 | 61 74 74 61 63 68 65 64 |erminal |attached|
|00003b30| 29 2c 0a 58 40 63 6f 64 | 65 7b 73 65 74 5f 63 6f |),.X@cod|e{set_co|
|00003b40| 6d 5f 65 72 72 5f 68 6f | 6f 6b 7d 20 6d 61 79 20 |m_err_ho|ok} may |
|00003b50| 62 65 20 75 73 65 64 20 | 74 6f 20 72 65 64 69 72 |be used |to redir|
|00003b60| 65 63 74 20 6f 75 74 70 | 75 74 20 66 72 6f 6d 20 |ect outp|ut from |
|00003b70| 40 63 6f 64 65 7b 63 6f | 6d 5f 65 72 72 7d 2e 0a |@code{co|m_err}..|
|00003b80| 58 54 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 69 |XThe fol|lowing i|
|00003b90| 73 20 61 6e 20 65 78 61 | 6d 70 6c 65 20 6f 66 20 |s an exa|mple of |
|00003ba0| 61 6e 20 65 72 72 6f 72 | 20 68 61 6e 64 6c 65 72 |an error| handler|
|00003bb0| 20 77 68 69 63 68 20 75 | 73 65 73 20 40 76 61 72 | which u|ses @var|
|00003bc0| 7b 73 79 73 6c 6f 67 28 | 33 29 7d 0a 58 61 73 20 |{syslog(|3)}.Xas |
|00003bd0| 73 75 70 70 6c 69 65 64 | 20 69 6e 20 42 53 44 20 |supplied| in BSD |
|00003be0| 34 2e 33 3a 0a 58 0a 58 | 40 65 78 61 6d 70 6c 65 |4.3:.X.X|@example|
|00003bf0| 0a 58 23 69 6e 63 6c 75 | 64 65 20 3c 73 74 64 69 |.X#inclu|de <stdi|
|00003c00| 6f 2e 68 3e 0a 58 23 69 | 6e 63 6c 75 64 65 20 3c |o.h>.X#i|nclude <|
|00003c10| 73 74 64 61 72 67 2e 68 | 3e 0a 58 23 69 6e 63 6c |stdarg.h|>.X#incl|
|00003c20| 75 64 65 20 3c 73 79 73 | 6c 6f 67 2e 68 3e 0a 58 |ude <sys|log.h>.X|
|00003c30| 0a 58 2f 2a 20 65 78 74 | 65 72 6e 20 6f 70 65 6e |.X/* ext|ern open|
|00003c40| 6c 6f 67 20 28 63 6f 6e | 73 74 20 63 68 61 72 20 |log (con|st char |
|00003c50| 2a 20 6e 61 6d 65 2c 20 | 69 6e 74 20 6c 6f 67 6f |* name, |int logo|
|00003c60| 70 74 2c 20 69 6e 74 20 | 66 61 63 69 6c 69 74 79 |pt, int |facility|
|00003c70| 29 3b 20 2a 2f 0a 58 2f | 2a 20 65 78 74 65 72 6e |); */.X/|* extern|
|00003c80| 20 73 79 73 6c 6f 67 20 | 28 69 6e 74 20 70 72 69 | syslog |(int pri|
|00003c90| 6f 72 69 74 79 2c 20 63 | 68 61 72 20 2a 20 6d 65 |ority, c|har * me|
|00003ca0| 73 73 61 67 65 2c 20 2e | 2e 2e 29 3b 20 2a 2f 0a |ssage, .|..); */.|
|00003cb0| 58 0a 58 76 6f 69 64 20 | 68 6f 6f 6b 20 28 63 6f |X.Xvoid |hook (co|
|00003cc0| 6e 73 74 20 63 68 61 72 | 20 2a 20 77 68 6f 61 6d |nst char| * whoam|
|00003cd0| 69 2c 20 6c 6f 6e 67 20 | 63 6f 64 65 2c 0a 58 20 |i, long |code,.X |
|00003ce0| 20 20 20 20 20 20 20 20 | 20 20 63 6f 6e 73 74 20 | | const |
|00003cf0| 63 68 61 72 20 2a 20 66 | 6f 72 6d 61 74 2c 20 76 |char * f|ormat, v|
|00003d00| 61 5f 6c 69 73 74 20 61 | 72 67 73 29 0a 58 40 7b |a_list a|rgs).X@{|
|00003d10| 0a 58 20 20 20 20 63 68 | 61 72 20 62 75 66 66 65 |.X ch|ar buffe|
|00003d20| 72 5b 42 55 46 53 49 5a | 5d 3b 0a 58 20 20 20 20 |r[BUFSIZ|];.X |
|00003d30| 73 74 61 74 69 63 20 69 | 6e 74 20 69 6e 69 74 69 |static i|nt initi|
|00003d40| 61 6c 69 7a 65 64 20 3d | 20 30 3b 0a 58 20 20 20 |alized =| 0;.X |
|00003d50| 20 69 66 20 28 21 69 6e | 69 74 69 61 6c 69 7a 65 | if (!in|itialize|
|00003d60| 64 29 20 40 7b 0a 58 20 | 20 20 20 20 20 20 20 6f |d) @{.X | o|
|00003d70| 70 65 6e 6c 6f 67 20 28 | 77 68 6f 61 6d 69 2c 0a |penlog (|whoami,.|
|00003d80| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |X | |
|00003d90| 20 20 4c 4f 47 5f 4e 4f | 57 41 49 54 7c 4c 4f 47 | LOG_NO|WAIT|LOG|
|00003da0| 5f 43 4f 4e 53 7c 4c 4f | 47 5f 50 49 44 7c 4c 4f |_CONS|LO|G_PID|LO|
|00003db0| 47 5f 4e 44 45 4c 41 59 | 2c 0a 58 20 20 20 20 20 |G_NDELAY|,.X |
|00003dc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 4c 4f 47 5f | | LOG_|
|00003dd0| 44 41 45 4d 4f 4e 29 3b | 0a 58 20 20 20 20 20 20 |DAEMON);|.X |
|00003de0| 20 20 69 6e 69 74 69 61 | 6c 69 7a 65 64 20 3d 20 | initia|lized = |
|00003df0| 31 3b 0a 58 20 20 20 20 | 40 7d 0a 58 20 20 20 20 |1;.X |@}.X |
|00003e00| 76 73 70 72 69 6e 74 66 | 20 28 62 75 66 66 65 72 |vsprintf| (buffer|
|00003e10| 2c 20 66 6f 72 6d 61 74 | 2c 20 61 72 67 73 29 3b |, format|, args);|
|00003e20| 0a 58 20 20 20 20 73 79 | 73 6c 6f 67 20 28 4c 4f |.X sy|slog (LO|
|00003e30| 47 5f 45 52 52 2c 20 22 | 25 73 20 25 73 22 2c 20 |G_ERR, "|%s %s", |
|00003e40| 65 72 72 6f 72 5f 6d 65 | 73 73 61 67 65 20 28 63 |error_me|ssage (c|
|00003e50| 6f 64 65 29 2c 20 62 75 | 66 66 65 72 29 3b 0a 58 |ode), bu|ffer);.X|
|00003e60| 40 7d 0a 58 40 65 6e 64 | 20 65 78 61 6d 70 6c 65 |@}.X@end| example|
|00003e70| 0a 58 0a 58 41 66 74 65 | 72 20 6d 61 6b 69 6e 67 |.X.XAfte|r making|
|00003e80| 20 74 68 65 20 63 61 6c | 6c 0a 58 40 63 6f 64 65 | the cal|l.X@code|
|00003e90| 7b 73 65 74 5f 63 6f 6d | 5f 65 72 72 5f 68 6f 6f |{set_com|_err_hoo|
|00003ea0| 6b 20 28 68 6f 6f 6b 29 | 3b 7d 2c 0a 58 61 6e 79 |k (hook)|;},.Xany|
|00003eb0| 20 63 61 6c 6c 73 20 74 | 6f 20 40 63 6f 64 65 7b | calls t|o @code{|
|00003ec0| 63 6f 6d 5f 65 72 72 7d | 20 77 69 6c 6c 20 72 65 |com_err}| will re|
|00003ed0| 73 75 6c 74 20 69 6e 20 | 6d 65 73 73 61 67 65 73 |sult in |messages|
|00003ee0| 20 62 65 69 6e 67 20 73 | 65 6e 74 20 74 6f 20 74 | being s|ent to t|
|00003ef0| 68 65 0a 58 40 76 61 72 | 7b 73 79 73 6c 6f 67 64 |he.X@var|{syslogd|
|00003f00| 7d 20 64 61 65 6d 6f 6e | 20 66 6f 72 20 6c 6f 67 |} daemon| for log|
|00003f10| 67 69 6e 67 2e 0a 58 54 | 68 65 20 6e 61 6d 65 20 |ging..XT|he name |
|00003f20| 6f 66 20 74 68 65 20 70 | 72 6f 67 72 61 6d 2c 20 |of the p|rogram, |
|00003f30| 40 73 61 6d 70 7b 77 68 | 6f 61 6d 69 7d 2c 20 69 |@samp{wh|oami}, i|
|00003f40| 73 20 73 75 70 70 6c 69 | 65 64 20 74 6f 20 74 68 |s suppli|ed to th|
|00003f50| 65 0a 58 40 73 61 6d 70 | 7b 6f 70 65 6e 6c 6f 67 |e.X@samp|{openlog|
|00003f60| 28 29 7d 20 63 61 6c 6c | 2c 20 61 6e 64 20 74 68 |()} call|, and th|
|00003f70| 65 20 6d 65 73 73 61 67 | 65 20 69 73 20 66 6f 72 |e messag|e is for|
|00003f80| 6d 61 74 74 65 64 20 69 | 6e 74 6f 20 61 20 62 75 |matted i|nto a bu|
|00003f90| 66 66 65 72 20 61 6e 64 | 0a 58 70 61 73 73 65 64 |ffer and|.Xpassed|
|00003fa0| 20 74 6f 20 40 63 6f 64 | 65 7b 73 79 73 6c 6f 67 | to @cod|e{syslog|
|00003fb0| 7d 2e 0a 58 0a 58 4e 6f | 74 65 20 74 68 61 74 20 |}..X.XNo|te that |
|00003fc0| 73 69 6e 63 65 20 74 68 | 65 20 65 78 74 72 61 20 |since th|e extra |
|00003fd0| 61 72 67 75 6d 65 6e 74 | 73 20 74 6f 20 40 63 6f |argument|s to @co|
|00003fe0| 64 65 7b 63 6f 6d 5f 65 | 72 72 7d 20 61 72 65 20 |de{com_e|rr} are |
|00003ff0| 70 61 73 73 65 64 20 62 | 79 0a 58 72 65 66 65 72 |passed b|y.Xrefer|
|00004000| 65 6e 63 65 20 76 69 61 | 20 74 68 65 20 40 63 6f |ence via| the @co|
|00004010| 64 65 7b 76 61 5f 6c 69 | 73 74 7d 20 76 61 6c 75 |de{va_li|st} valu|
|00004020| 65 20 40 63 6f 64 65 7b | 61 72 67 73 7d 2c 20 74 |e @code{|args}, t|
|00004030| 68 65 20 68 6f 6f 6b 20 | 72 6f 75 74 69 6e 65 20 |he hook |routine |
|00004040| 6d 61 79 0a 58 70 6c 61 | 63 65 20 61 6e 79 20 66 |may.Xpla|ce any f|
|00004050| 6f 72 6d 20 6f 66 20 69 | 6e 74 65 72 70 72 65 74 |orm of i|nterpret|
|00004060| 61 74 69 6f 6e 20 6f 6e | 20 74 68 65 6d 2c 20 69 |ation on| them, i|
|00004070| 6e 63 6c 75 64 69 6e 67 | 20 69 67 6e 6f 72 69 6e |ncluding| ignorin|
|00004080| 67 20 74 68 65 6d 2e 20 | 20 46 6f 72 0a 58 63 6f |g them. | For.Xco|
|00004090| 6e 73 69 73 74 65 6e 63 | 79 2c 20 40 63 6f 64 65 |nsistenc|y, @code|
|000040a0| 7b 70 72 69 6e 74 66 7d | 2d 73 74 79 6c 65 20 69 |{printf}|-style i|
|000040b0| 6e 74 65 72 70 72 65 74 | 61 74 69 6f 6e 20 69 73 |nterpret|ation is|
|000040c0| 20 73 75 67 67 65 73 74 | 65 64 2c 20 76 69 61 0a | suggest|ed, via.|
|000040d0| 58 40 63 6f 64 65 7b 76 | 73 70 72 69 6e 74 66 7d |X@code{v|sprintf}|
|000040e0| 20 28 6f 72 20 40 63 6f | 64 65 7b 5f 64 6f 70 72 | (or @co|de{_dopr|
|000040f0| 6e 74 7d 20 6f 6e 20 42 | 53 44 20 73 79 73 74 65 |nt} on B|SD syste|
|00004100| 6d 73 20 77 69 74 68 6f | 75 74 20 66 75 6c 6c 20 |ms witho|ut full |
|00004110| 73 75 70 70 6f 72 74 20 | 66 6f 72 0a 58 74 68 65 |support |for.Xthe|
|00004120| 20 41 4e 53 49 20 43 20 | 6c 69 62 72 61 72 79 29 | ANSI C |library)|
|00004130| 2e 0a 58 0a 58 40 73 65 | 63 74 69 6f 6e 20 43 6f |..X.X@se|ction Co|
|00004140| 64 69 6e 67 20 43 6f 6e | 76 65 6e 74 69 6f 6e 73 |ding Con|ventions|
|00004150| 0a 58 0a 58 54 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |.X.XThe |followin|
|00004160| 67 20 63 6f 6e 76 65 6e | 74 69 6f 6e 73 20 61 72 |g conven|tions ar|
|00004170| 65 20 6a 75 73 74 20 73 | 6f 6d 65 20 67 65 6e 65 |e just s|ome gene|
|00004180| 72 61 6c 20 73 74 79 6c | 69 73 74 69 63 20 63 6f |ral styl|istic co|
|00004190| 6e 76 65 6e 74 69 6f 6e | 73 0a 58 74 6f 20 66 6f |nvention|s.Xto fo|
|000041a0| 6c 6c 6f 77 20 77 68 65 | 6e 20 77 72 69 74 69 6e |llow whe|n writin|
|000041b0| 67 20 72 6f 62 75 73 74 | 20 6c 69 62 72 61 72 69 |g robust| librari|
|000041c0| 65 73 20 61 6e 64 20 70 | 72 6f 67 72 61 6d 73 2e |es and p|rograms.|
|000041d0| 20 20 43 6f 6e 76 65 6e | 74 69 6f 6e 73 0a 58 73 | Conven|tions.Xs|
|000041e0| 69 6d 69 6c 61 72 20 74 | 6f 20 74 68 69 73 20 61 |imilar t|o this a|
|000041f0| 72 65 20 67 65 6e 65 72 | 61 6c 6c 79 20 66 6f 6c |re gener|ally fol|
|00004200| 6c 6f 77 65 64 20 69 6e | 73 69 64 65 20 74 68 65 |lowed in|side the|
|00004210| 20 55 4e 49 58 20 6b 65 | 72 6e 65 6c 20 61 6e 64 | UNIX ke|rnel and|
|00004220| 20 6d 6f 73 74 0a 58 72 | 6f 75 74 69 6e 65 73 20 | most.Xr|outines |
|00004230| 69 6e 20 74 68 65 20 4d | 75 6c 74 69 63 73 20 6f |in the M|ultics o|
|00004240| 70 65 72 61 74 69 6e 67 | 20 73 79 73 74 65 6d 2e |perating| system.|
|00004250| 20 20 49 6e 20 67 65 6e | 65 72 61 6c 2c 20 61 20 | In gen|eral, a |
|00004260| 72 6f 75 74 69 6e 65 0a | 58 65 69 74 68 65 72 20 |routine.|Xeither |
|00004270| 73 75 63 63 65 65 64 73 | 20 28 72 65 74 75 72 6e |succeeds| (return|
|00004280| 69 6e 67 20 61 20 7a 65 | 72 6f 20 65 72 72 6f 72 |ing a ze|ro error|
|00004290| 20 63 6f 64 65 2c 20 61 | 6e 64 20 64 6f 69 6e 67 | code, a|nd doing|
|000042a0| 20 73 6f 6d 65 20 73 69 | 64 65 0a 58 65 66 66 65 | some si|de.Xeffe|
|000042b0| 63 74 73 20 69 6e 20 74 | 68 65 20 70 72 6f 63 65 |cts in t|he proce|
|000042c0| 73 73 29 2c 20 6f 72 20 | 69 74 20 66 61 69 6c 73 |ss), or |it fails|
|000042d0| 2c 20 64 6f 69 6e 67 20 | 6d 69 6e 69 6d 61 6c 20 |, doing |minimal |
|000042e0| 73 69 64 65 20 65 66 66 | 65 63 74 73 3b 20 69 6e |side eff|ects; in|
|000042f0| 0a 58 61 6e 79 20 65 76 | 65 6e 74 2c 20 61 6e 79 |.Xany ev|ent, any|
|00004300| 20 69 6e 76 61 72 69 61 | 6e 74 20 77 68 69 63 68 | invaria|nt which|
|00004310| 20 74 68 65 20 6c 69 62 | 72 61 72 79 20 61 73 73 | the lib|rary ass|
|00004320| 75 6d 65 73 20 6d 75 73 | 74 20 62 65 20 6d 61 69 |umes mus|t be mai|
|00004330| 6e 74 61 69 6e 65 64 2e | 0a 58 0a 58 49 6e 20 67 |ntained.|.X.XIn g|
|00004340| 65 6e 65 72 61 6c 2c 20 | 69 74 20 69 73 20 6e 6f |eneral, |it is no|
|00004350| 74 20 69 6e 20 74 68 65 | 20 64 6f 6d 61 69 6e 20 |t in the| domain |
|00004360| 6f 66 20 6e 6f 6e 20 75 | 73 65 72 2d 69 6e 74 65 |of non u|ser-inte|
|00004370| 72 66 61 63 65 20 6c 69 | 62 72 61 72 79 0a 58 72 |rface li|brary.Xr|
|00004380| 6f 75 74 69 6e 65 73 20 | 74 6f 20 77 72 69 74 65 |outines |to write|
|00004390| 20 65 72 72 6f 72 20 6d | 65 73 73 61 67 65 73 20 | error m|essages |
|000043a0| 74 6f 20 74 68 65 20 75 | 73 65 72 27 73 20 74 65 |to the u|ser's te|
|000043b0| 72 6d 69 6e 61 6c 2c 20 | 6f 72 20 68 61 6c 74 20 |rminal, |or halt |
|000043c0| 74 68 65 0a 58 70 72 6f | 63 65 73 73 2e 20 20 53 |the.Xpro|cess. S|
|000043d0| 75 63 68 20 66 6f 72 6d | 73 20 6f 66 20 60 60 65 |uch form|s of ``e|
|000043e0| 72 72 6f 72 20 68 61 6e | 64 6c 69 6e 67 27 27 20 |rror han|dling'' |
|000043f0| 73 68 6f 75 6c 64 20 62 | 65 20 72 65 73 65 72 76 |should b|e reserv|
|00004400| 65 64 20 66 6f 72 0a 58 | 66 61 69 6c 75 72 65 73 |ed for.X|failures|
|00004410| 20 6f 66 20 69 6e 74 65 | 72 6e 61 6c 20 69 6e 76 | of inte|rnal inv|
|00004420| 61 72 69 61 6e 74 73 20 | 61 6e 64 20 63 6f 6e 73 |ariants |and cons|
|00004430| 69 73 74 61 6e 63 79 20 | 63 68 65 63 6b 73 20 6f |istancy |checks o|
|00004440| 6e 6c 79 2c 20 61 73 20 | 69 74 0a 58 70 72 6f 76 |nly, as |it.Xprov|
|00004450| 69 64 65 73 20 74 68 65 | 20 75 73 65 72 20 6f 66 |ides the| user of|
|00004460| 20 74 68 65 20 6c 69 62 | 72 61 72 79 20 6e 6f 20 | the lib|rary no |
|00004470| 77 61 79 20 74 6f 20 63 | 6c 65 61 6e 20 75 70 20 |way to c|lean up |
|00004480| 66 6f 72 20 68 69 6d 73 | 65 6c 66 20 69 6e 20 74 |for hims|elf in t|
|00004490| 68 65 0a 58 65 76 65 6e | 74 20 6f 66 20 74 6f 74 |he.Xeven|t of tot|
|000044a0| 61 6c 20 66 61 69 6c 75 | 72 65 2e 0a 58 0a 58 4c |al failu|re..X.XL|
|000044b0| 69 62 72 61 72 79 20 72 | 6f 75 74 69 6e 65 73 20 |ibrary r|outines |
|000044c0| 77 68 69 63 68 20 63 61 | 6e 20 66 61 69 6c 20 73 |which ca|n fail s|
|000044d0| 68 6f 75 6c 64 20 62 65 | 20 73 65 74 20 75 70 20 |hould be| set up |
|000044e0| 74 6f 20 72 65 74 75 72 | 6e 20 61 6e 20 65 72 72 |to retur|n an err|
|000044f0| 6f 72 0a 58 63 6f 64 65 | 2e 20 20 54 68 69 73 20 |or.Xcode|. This |
|00004500| 73 68 6f 75 6c 64 20 75 | 73 75 61 6c 6c 79 20 62 |should u|sually b|
|00004510| 65 20 64 6f 6e 65 20 61 | 73 20 74 68 65 20 72 65 |e done a|s the re|
|00004520| 74 75 72 6e 20 76 61 6c | 75 65 20 6f 66 20 74 68 |turn val|ue of th|
|00004530| 65 0a 58 66 75 6e 63 74 | 69 6f 6e 3b 20 69 66 20 |e.Xfunct|ion; if |
|00004540| 74 68 69 73 20 69 73 20 | 6e 6f 74 20 61 63 63 65 |this is |not acce|
|00004550| 70 74 61 62 6c 65 2c 20 | 74 68 65 20 72 6f 75 74 |ptable, |the rout|
|00004560| 69 6e 65 20 73 68 6f 75 | 6c 64 20 72 65 74 75 72 |ine shou|ld retur|
|00004570| 6e 20 61 0a 58 60 60 6e | 75 6c 6c 27 27 20 76 61 |n a.X``n|ull'' va|
|00004580| 6c 75 65 2c 20 61 6e 64 | 20 70 75 74 20 74 68 65 |lue, and| put the|
|00004590| 20 65 72 72 6f 72 20 63 | 6f 64 65 20 69 6e 74 6f | error c|ode into|
|000045a0| 20 61 20 70 61 72 61 6d | 65 74 65 72 20 70 61 73 | a param|eter pas|
|000045b0| 73 65 64 20 62 79 0a 58 | 72 65 66 65 72 65 6e 63 |sed by.X|referenc|
|000045c0| 65 2e 0a 58 0a 58 52 6f | 75 74 69 6e 65 73 20 77 |e..X.XRo|utines w|
|000045d0| 68 69 63 68 20 75 73 65 | 20 74 68 65 20 66 69 72 |hich use| the fir|
|000045e0| 73 74 20 73 74 79 6c 65 | 20 6f 66 20 69 6e 74 65 |st style| of inte|
|000045f0| 72 66 61 63 65 20 63 61 | 6e 20 62 65 20 75 73 65 |rface ca|n be use|
|00004600| 64 20 66 72 6f 6d 0a 58 | 75 73 65 72 2d 69 6e 74 |d from.X|user-int|
|00004610| 65 72 66 61 63 65 20 6c | 65 76 65 6c 73 20 6f 66 |erface l|evels of|
|00004620| 20 61 20 70 72 6f 67 72 | 61 6d 20 61 73 20 66 6f | a progr|am as fo|
|00004630| 6c 6c 6f 77 73 3a 0a 58 | 0a 58 40 65 78 61 6d 70 |llows:.X|.X@examp|
|00004640| 6c 65 0a 58 40 7b 0a 58 | 20 20 20 20 69 66 20 28 |le.X@{.X| if (|
|00004650| 28 63 6f 64 65 20 3d 20 | 69 6e 69 74 69 61 6c 69 |(code = |initiali|
|00004660| 7a 65 5f 77 6f 72 6c 64 | 28 67 65 74 75 69 64 28 |ze_world|(getuid(|
|00004670| 29 2c 20 72 61 6e 64 6f | 6d 28 29 29 29 20 21 3d |), rando|m())) !=|
|00004680| 20 30 29 20 40 7b 0a 58 | 20 20 20 20 20 20 20 20 | 0) @{.X| |
|00004690| 63 6f 6d 5f 65 72 72 28 | 22 64 65 6d 6f 22 2c 20 |com_err(|"demo", |
|000046a0| 63 6f 64 65 2c 0a 58 20 | 20 20 20 20 20 20 20 20 |code,.X | |
|000046b0| 20 20 20 20 20 20 20 22 | 77 68 65 6e 20 74 72 79 | "|when try|
|000046c0| 69 6e 67 20 74 6f 20 69 | 6e 69 74 69 61 6c 69 7a |ing to i|nitializ|
|000046d0| 65 20 77 6f 72 6c 64 22 | 29 3b 0a 58 20 20 20 20 |e world"|);.X |
|000046e0| 20 20 20 20 65 78 69 74 | 28 31 29 3b 0a 58 20 20 | exit|(1);.X |
|000046f0| 20 20 40 7d 0a 58 20 20 | 20 20 69 66 20 28 28 64 | @}.X | if ((d|
|00004700| 61 74 61 62 61 73 65 20 | 3d 20 6f 70 65 6e 5f 64 |atabase |= open_d|
|00004710| 61 74 61 62 61 73 65 28 | 22 6d 79 5f 73 65 63 72 |atabase(|"my_secr|
|00004720| 65 74 73 22 2c 20 26 63 | 6f 64 65 29 29 3d 3d 4e |ets", &c|ode))==N|
|00004730| 55 4c 4c 29 20 40 7b 0a | 58 20 20 20 20 20 20 20 |ULL) @{.|X |
|00004740| 20 63 6f 6d 5f 65 72 72 | 28 22 64 65 6d 6f 22 2c | com_err|("demo",|
|00004750| 20 63 6f 64 65 2c 0a 58 | 20 20 20 20 20 20 20 20 | code,.X| |
|00004760| 20 20 20 20 20 20 20 20 | 22 77 68 69 6c 65 20 6f | |"while o|
|00004770| 70 65 6e 69 6e 67 20 6d | 79 5f 73 65 63 72 65 74 |pening m|y_secret|
|00004780| 73 22 29 3b 0a 58 20 20 | 20 20 20 20 20 20 65 78 |s");.X | ex|
|00004790| 69 74 28 31 29 3b 0a 58 | 20 20 20 20 40 7d 0a 58 |it(1);.X| @}.X|
|000047a0| 40 7d 0a 58 40 65 6e 64 | 20 65 78 61 6d 70 6c 65 |@}.X@end| example|
|000047b0| 0a 58 0a 58 41 20 63 61 | 6c 6c 65 72 20 77 68 69 |.X.XA ca|ller whi|
|000047c0| 63 68 20 66 61 69 6c 73 | 20 74 6f 20 63 68 65 63 |ch fails| to chec|
|000047d0| 6b 20 74 68 65 20 72 65 | 74 75 72 6e 20 73 74 61 |k the re|turn sta|
|000047e0| 74 75 73 20 69 73 20 69 | 6e 20 65 72 72 6f 72 2e |tus is i|n error.|
|000047f0| 20 20 49 74 20 69 73 0a | 58 70 6f 73 73 69 62 6c | It is.|Xpossibl|
|00004800| 65 20 74 6f 20 6c 6f 6f | 6b 20 66 6f 72 20 63 6f |e to loo|k for co|
|00004810| 64 65 20 77 68 69 63 68 | 20 69 67 6e 6f 72 65 73 |de which| ignores|
|00004820| 20 65 72 72 6f 72 20 72 | 65 74 75 72 6e 73 20 62 | error r|eturns b|
|00004830| 79 20 75 73 69 6e 67 20 | 6c 69 6e 74 3b 0a 58 6c |y using |lint;.Xl|
|00004840| 6f 6f 6b 20 66 6f 72 20 | 65 72 72 6f 72 20 6d 65 |ook for |error me|
|00004850| 73 73 61 67 65 73 20 6f | 66 20 74 68 65 20 66 6f |ssages o|f the fo|
|00004860| 72 6d 20 60 60 66 6f 6f | 62 61 72 20 72 65 74 75 |rm ``foo|bar retu|
|00004870| 72 6e 73 20 76 61 6c 75 | 65 20 77 68 69 63 68 20 |rns valu|e which |
|00004880| 69 73 0a 58 73 6f 6d 65 | 74 69 6d 65 73 20 69 67 |is.Xsome|times ig|
|00004890| 6e 6f 72 65 64 27 27 20 | 6f 72 20 60 60 66 6f 6f |nored'' |or ``foo|
|000048a0| 62 61 72 20 72 65 74 75 | 72 6e 73 20 76 61 6c 75 |bar retu|rns valu|
|000048b0| 65 20 77 68 69 63 68 20 | 69 73 20 61 6c 77 61 79 |e which |is alway|
|000048c0| 73 0a 58 69 67 6e 6f 72 | 65 64 2e 27 27 0a 58 0a |s.Xignor|ed.''.X.|
|000048d0| 58 53 69 6e 63 65 20 6c | 69 62 72 61 72 69 65 73 |XSince l|ibraries|
|000048e0| 20 6d 61 79 20 62 65 20 | 62 75 69 6c 74 20 6f 75 | may be |built ou|
|000048f0| 74 20 6f 66 20 6f 74 68 | 65 72 20 6c 69 62 72 61 |t of oth|er libra|
|00004900| 72 69 65 73 2c 20 69 74 | 20 69 73 20 6f 66 74 65 |ries, it| is ofte|
|00004910| 6e 20 6e 65 63 65 73 73 | 61 72 79 0a 58 66 6f 72 |n necess|ary.Xfor|
|00004920| 20 74 68 65 20 73 75 63 | 63 65 73 73 20 6f 66 20 | the suc|cess of |
|00004930| 6f 6e 65 20 72 6f 75 74 | 69 6e 65 20 74 6f 20 64 |one rout|ine to d|
|00004940| 65 70 65 6e 64 20 6f 6e | 20 61 6e 6f 74 68 65 72 |epend on| another|
|00004950| 2e 20 20 57 68 65 6e 20 | 61 20 6c 6f 77 65 72 20 |. When |a lower |
|00004960| 6c 65 76 65 6c 0a 58 72 | 6f 75 74 69 6e 65 20 72 |level.Xr|outine r|
|00004970| 65 74 75 72 6e 73 20 61 | 6e 20 65 72 72 6f 72 20 |eturns a|n error |
|00004980| 63 6f 64 65 2c 20 74 68 | 65 20 6d 69 64 64 6c 65 |code, th|e middle|
|00004990| 20 6c 65 76 65 6c 20 72 | 6f 75 74 69 6e 65 20 68 | level r|outine h|
|000049a0| 61 73 20 61 20 66 65 77 | 20 70 6f 73 73 69 62 6c |as a few| possibl|
|000049b0| 65 0a 58 6f 70 74 69 6f | 6e 73 2e 20 20 49 74 20 |e.Xoptio|ns. It |
|000049c0| 63 61 6e 20 73 69 6d 70 | 6c 79 20 72 65 74 75 72 |can simp|ly retur|
|000049d0| 6e 20 74 68 65 20 65 72 | 72 6f 72 20 63 6f 64 65 |n the er|ror code|
|000049e0| 20 74 6f 20 69 74 73 20 | 63 61 6c 6c 65 72 20 61 | to its |caller a|
|000049f0| 66 74 65 72 20 64 6f 69 | 6e 67 0a 58 73 6f 6d 65 |fter doi|ng.Xsome|
|00004a00| 20 66 6f 72 6d 20 6f 66 | 20 63 6c 65 61 6e 75 70 | form of| cleanup|
|00004a10| 2c 20 69 74 20 63 61 6e | 20 73 75 62 73 74 69 74 |, it can| substit|
|00004a20| 75 74 65 20 6f 6e 65 20 | 6f 66 20 69 74 73 20 6f |ute one |of its o|
|00004a30| 77 6e 2c 20 6f 72 20 69 | 74 20 63 61 6e 20 74 61 |wn, or i|t can ta|
|00004a40| 6b 65 0a 58 63 6f 72 72 | 65 63 74 69 76 65 20 61 |ke.Xcorr|ective a|
|00004a50| 63 74 69 6f 6e 20 6f 66 | 20 69 74 73 20 6f 77 6e |ction of| its own|
|00004a60| 20 61 6e 64 20 63 6f 6e | 74 69 6e 75 65 20 6e 6f | and con|tinue no|
|00004a70| 72 6d 61 6c 6c 79 2e 20 | 20 46 6f 72 20 69 6e 73 |rmally. | For ins|
|00004a80| 74 61 6e 63 65 2c 20 61 | 0a 58 6c 69 62 72 61 72 |tance, a|.Xlibrar|
|00004a90| 79 20 72 6f 75 74 69 6e | 65 20 77 68 69 63 68 20 |y routin|e which |
|00004aa0| 6d 61 6b 65 73 20 61 20 | 60 60 63 6f 6e 6e 65 63 |makes a |``connec|
|00004ab0| 74 27 27 20 73 79 73 74 | 65 6d 20 63 61 6c 6c 20 |t'' syst|em call |
|00004ac0| 74 6f 20 6d 61 6b 65 20 | 61 20 6e 65 74 77 6f 72 |to make |a networ|
|00004ad0| 6b 0a 58 63 6f 6e 6e 65 | 63 74 69 6f 6e 20 6d 61 |k.Xconne|ction ma|
|00004ae0| 79 20 72 65 66 6c 65 63 | 74 20 74 68 65 20 73 79 |y reflec|t the sy|
|00004af0| 73 74 65 6d 20 65 72 72 | 6f 72 20 63 6f 64 65 20 |stem err|or code |
|00004b00| 40 63 6f 64 65 7b 45 43 | 4f 4e 4e 52 45 46 55 53 |@code{EC|ONNREFUS|
|00004b10| 45 44 7d 0a 58 28 43 6f | 6e 6e 65 63 74 69 6f 6e |ED}.X(Co|nnection|
|00004b20| 20 72 65 66 75 73 65 64 | 29 20 74 6f 20 69 74 73 | refused|) to its|
|00004b30| 20 63 61 6c 6c 65 72 2c | 20 6f 72 20 69 74 20 6d | caller,| or it m|
|00004b40| 61 79 20 72 65 74 75 72 | 6e 20 61 20 60 60 73 65 |ay retur|n a ``se|
|00004b50| 72 76 65 72 20 6e 6f 74 | 0a 58 61 76 61 69 6c 61 |rver not|.Xavaila|
|00004b60| 62 6c 65 2c 20 74 72 79 | 20 61 67 61 69 6e 20 6c |ble, try| again l|
|00004b70| 61 74 65 72 2c 27 27 20 | 6f 72 20 69 74 20 6d 61 |ater,'' |or it ma|
|00004b80| 79 20 74 72 79 20 61 20 | 64 69 66 66 65 72 65 6e |y try a |differen|
|00004b90| 74 20 73 65 72 76 65 72 | 2e 0a 58 0a 58 43 6c 65 |t server|..X.XCle|
|00004ba0| 61 6e 75 70 20 77 68 69 | 63 68 20 69 73 20 74 79 |anup whi|ch is ty|
|00004bb0| 70 69 63 61 6c 6c 79 20 | 6e 65 63 65 73 73 61 72 |pically |necessar|
|00004bc0| 79 20 6d 61 79 20 69 6e | 63 6c 75 64 65 2c 20 62 |y may in|clude, b|
|00004bd0| 75 74 20 6e 6f 74 20 62 | 65 20 6c 69 6d 69 74 65 |ut not b|e limite|
|00004be0| 64 0a 58 74 6f 2c 20 66 | 72 65 65 69 6e 67 20 61 |d.Xto, f|reeing a|
|00004bf0| 6c 6c 6f 63 61 74 65 64 | 20 6d 65 6d 6f 72 79 20 |llocated| memory |
|00004c00| 77 68 69 63 68 20 77 69 | 6c 6c 20 6e 6f 74 20 62 |which wi|ll not b|
|00004c10| 65 20 6e 65 65 64 65 64 | 20 61 6e 79 20 6d 6f 72 |e needed| any mor|
|00004c20| 65 2c 0a 58 75 6e 6c 6f | 63 6b 69 6e 67 20 63 6f |e,.Xunlo|cking co|
|00004c30| 6e 63 75 72 72 61 6e 63 | 79 20 6c 6f 63 6b 73 2c |ncurranc|y locks,|
|00004c40| 20 64 72 6f 70 70 69 6e | 67 20 72 65 66 65 72 65 | droppin|g refere|
|00004c50| 6e 63 65 20 63 6f 75 6e | 74 73 2c 20 63 6c 6f 73 |nce coun|ts, clos|
|00004c60| 69 6e 67 20 66 69 6c 65 | 0a 58 64 65 73 63 72 69 |ing file|.Xdescri|
|00004c70| 70 74 6f 72 73 2c 20 6f | 72 20 6f 74 68 65 72 77 |ptors, o|r otherw|
|00004c80| 69 73 65 20 75 6e 64 6f | 69 6e 67 20 61 6e 79 74 |ise undo|ing anyt|
|00004c90| 68 69 6e 67 20 77 68 69 | 63 68 20 74 68 65 20 70 |hing whi|ch the p|
|00004ca0| 72 6f 63 65 64 75 72 65 | 20 64 69 64 20 75 70 0a |rocedure| did up.|
|00004cb0| 58 74 6f 20 74 68 69 73 | 20 70 6f 69 6e 74 2e 20 |Xto this| point. |
|00004cc0| 20 57 68 65 6e 20 74 68 | 65 72 65 20 61 72 65 20 | When th|ere are |
|00004cd0| 61 20 6c 6f 74 20 6f 66 | 20 74 68 69 6e 67 73 20 |a lot of| things |
|00004ce0| 77 68 69 63 68 20 63 61 | 6e 20 67 6f 20 77 72 6f |which ca|n go wro|
|00004cf0| 6e 67 2c 20 69 74 0a 58 | 69 73 20 67 65 6e 65 72 |ng, it.X|is gener|
|00004d00| 61 6c 6c 79 20 67 6f 6f | 64 20 74 6f 20 77 72 69 |ally goo|d to wri|
|00004d10| 74 65 20 6f 6e 65 20 62 | 6c 6f 63 6b 20 6f 66 20 |te one b|lock of |
|00004d20| 65 72 72 6f 72 2d 68 61 | 6e 64 6c 69 6e 67 20 63 |error-ha|ndling c|
|00004d30| 6f 64 65 20 77 68 69 63 | 68 20 69 73 0a 58 62 72 |ode whic|h is.Xbr|
|00004d40| 61 6e 63 68 65 64 20 74 | 6f 2c 20 75 73 69 6e 67 |anched t|o, using|
|00004d50| 20 61 20 67 6f 74 6f 2c | 20 69 6e 20 74 68 65 20 | a goto,| in the |
|00004d60| 65 76 65 6e 74 20 6f 66 | 20 66 61 69 6c 75 72 65 |event of| failure|
|00004d70| 2e 20 20 41 20 63 6f 6d | 6d 6f 6e 20 73 6f 75 72 |. A com|mon sour|
|00004d80| 63 65 0a 58 6f 66 20 65 | 72 72 6f 72 73 20 69 6e |ce.Xof e|rrors in|
|00004d90| 20 55 4e 49 58 20 70 72 | 6f 67 72 61 6d 73 20 69 | UNIX pr|ograms i|
|00004da0| 73 20 66 61 69 6c 69 6e | 67 20 74 6f 20 63 6c 6f |s failin|g to clo|
|00004db0| 73 65 20 66 69 6c 65 20 | 64 65 73 63 72 69 70 74 |se file |descript|
|00004dc0| 6f 72 73 20 6f 6e 0a 58 | 65 72 72 6f 72 20 72 65 |ors on.X|error re|
|00004dd0| 74 75 72 6e 73 3b 20 74 | 68 69 73 20 6c 65 61 76 |turns; t|his leav|
|00004de0| 65 73 20 61 20 6e 75 6d | 62 65 72 20 6f 66 20 60 |es a num|ber of `|
|00004df0| 60 7a 6f 6d 62 69 65 64 | 27 27 20 66 69 6c 65 20 |`zombied|'' file |
|00004e00| 64 65 73 63 72 69 70 74 | 6f 72 73 0a 58 6f 70 65 |descript|ors.Xope|
|00004e10| 6e 2c 20 77 68 69 63 68 | 20 65 76 65 6e 74 75 61 |n, which| eventua|
|00004e20| 6c 6c 79 20 63 61 75 73 | 65 73 20 74 68 65 20 70 |lly caus|es the p|
|00004e30| 72 6f 63 65 73 73 20 74 | 6f 20 72 75 6e 20 6f 75 |rocess t|o run ou|
|00004e40| 74 20 6f 66 20 66 69 6c | 65 0a 58 64 65 73 63 72 |t of fil|e.Xdescr|
|00004e50| 69 70 74 6f 72 73 20 61 | 6e 64 20 66 61 6c 6c 20 |iptors a|nd fall |
|00004e60| 6f 76 65 72 2e 0a 58 0a | 58 40 65 78 61 6d 70 6c |over..X.|X@exampl|
|00004e70| 65 0a 58 40 7b 0a 58 20 | 20 20 20 46 49 4c 45 20 |e.X@{.X | FILE |
|00004e80| 2a 66 31 3d 4e 55 4c 4c | 2c 20 2a 66 32 3d 4e 55 |*f1=NULL|, *f2=NU|
|00004e90| 4c 4c 2c 20 2a 66 33 3d | 4e 55 4c 4c 3b 0a 58 20 |LL, *f3=|NULL;.X |
|00004ea0| 20 20 20 69 6e 74 20 73 | 74 61 74 75 73 20 3d 20 | int s|tatus = |
|00004eb0| 30 3b 0a 58 0a 58 20 20 | 20 20 69 66 20 28 20 28 |0;.X.X | if ( (|
|00004ec0| 66 31 20 3d 20 66 6f 70 | 65 6e 28 46 49 4c 45 31 |f1 = fop|en(FILE1|
|00004ed0| 2c 20 22 72 22 29 29 20 | 3d 3d 20 4e 55 4c 4c 29 |, "r")) |== NULL)|
|00004ee0| 20 40 7b 0a 58 20 20 20 | 20 20 20 20 20 73 74 61 | @{.X | sta|
|00004ef0| 74 75 73 20 3d 20 65 72 | 72 6e 6f 3b 0a 58 20 20 |tus = er|rno;.X |
|00004f00| 20 20 20 20 20 20 67 6f | 74 6f 20 65 72 72 6f 72 | go|to error|
|00004f10| 3b 0a 58 20 20 20 20 40 | 7d 0a 58 0a 58 20 20 20 |;.X @|}.X.X |
|00004f20| 20 2f 2a 0a 58 20 20 20 | 20 20 2a 20 43 72 75 6e | /*.X | * Crun|
|00004f30| 63 68 20 66 6f 72 20 61 | 20 77 68 69 6c 65 0a 58 |ch for a| while.X|
|00004f40| 20 20 20 20 20 2a 2f 0a | 58 0a 58 20 20 20 20 69 | */.|X.X i|
|00004f50| 66 20 28 20 28 66 32 20 | 3d 20 66 6f 70 65 6e 28 |f ( (f2 |= fopen(|
|00004f60| 46 49 4c 45 32 2c 20 22 | 77 22 29 29 20 3d 3d 20 |FILE2, "|w")) == |
|00004f70| 4e 55 4c 4c 29 20 40 7b | 0a 58 20 20 20 20 20 20 |NULL) @{|.X |
|00004f80| 20 20 73 74 61 74 75 73 | 20 3d 20 65 72 72 6e 6f | status| = errno|
|00004f90| 3b 0a 58 20 20 20 20 20 | 20 20 20 67 6f 74 6f 20 |;.X | goto |
|00004fa0| 65 72 72 6f 72 3b 0a 58 | 20 20 20 20 40 7d 0a 58 |error;.X| @}.X|
|00004fb0| 0a 58 20 20 20 20 69 66 | 20 28 20 28 66 33 20 3d |.X if| ( (f3 =|
|00004fc0| 20 66 6f 70 65 6e 28 46 | 49 4c 45 33 2c 20 22 61 | fopen(F|ILE3, "a|
|00004fd0| 2b 22 29 29 20 3d 3d 20 | 4e 55 4c 4c 29 20 40 7b |+")) == |NULL) @{|
|00004fe0| 0a 58 20 20 20 20 20 20 | 20 20 73 74 61 74 75 73 |.X | status|
|00004ff0| 20 3d 20 65 72 72 6e 6f | 3b 0a 58 20 20 20 20 20 | = errno|;.X |
|00005000| 20 20 20 20 20 20 20 67 | 6f 74 6f 20 65 72 72 6f | g|oto erro|
|00005010| 72 3b 0a 58 20 20 20 20 | 40 7d 0a 58 0a 58 20 20 |r;.X |@}.X.X |
|00005020| 20 20 2f 2a 0a 58 20 20 | 20 20 20 2a 20 44 6f 20 | /*.X | * Do |
|00005030| 6d 6f 72 65 20 70 72 6f | 63 65 73 73 69 6e 67 2e |more pro|cessing.|
|00005040| 0a 58 20 20 20 20 20 2a | 2f 0a 58 20 20 20 20 66 |.X *|/.X f|
|00005050| 63 6c 6f 73 65 28 66 31 | 29 3b 0a 58 20 20 20 20 |close(f1|);.X |
|00005060| 66 63 6c 6f 73 65 28 66 | 32 29 3b 0a 58 20 20 20 |fclose(f|2);.X |
|00005070| 20 66 63 6c 6f 73 65 28 | 66 33 29 3b 0a 58 20 20 | fclose(|f3);.X |
|00005080| 20 20 72 65 74 75 72 6e | 20 30 3b 0a 58 0a 58 65 | return| 0;.X.Xe|
|00005090| 72 72 6f 72 3a 0a 58 20 | 20 20 20 69 66 20 28 66 |rror:.X | if (f|
|000050a0| 31 29 20 66 63 6c 6f 73 | 65 28 66 31 29 3b 0a 58 |1) fclos|e(f1);.X|
|000050b0| 20 20 20 20 69 66 20 28 | 66 32 29 20 66 63 6c 6f | if (|f2) fclo|
|000050c0| 73 65 28 66 32 29 3b 0a | 58 20 20 20 20 69 66 20 |se(f2);.|X if |
|000050d0| 28 66 33 29 20 66 63 6c | 6f 73 65 28 66 33 29 3b |(f3) fcl|ose(f3);|
|000050e0| 0a 58 20 20 20 20 72 65 | 74 75 72 6e 20 73 74 61 |.X re|turn sta|
|000050f0| 74 75 73 3b 0a 58 40 7d | 0a 58 40 65 6e 64 20 65 |tus;.X@}|.X@end e|
|00005100| 78 61 6d 70 6c 65 0a 58 | 0a 58 40 73 65 63 74 69 |xample.X|.X@secti|
|00005110| 6f 6e 20 42 75 69 6c 64 | 69 6e 67 20 61 6e 64 20 |on Build|ing and |
|00005120| 49 6e 73 74 61 6c 6c 61 | 74 69 6f 6e 0a 58 0a 58 |Installa|tion.X.X|
|00005130| 54 68 65 20 64 69 73 74 | 72 69 62 75 74 69 6f 6e |The dist|ribution|
|00005140| 20 6f 66 20 74 68 69 73 | 20 70 61 63 6b 61 67 65 | of this| package|
|00005150| 20 77 69 6c 6c 20 70 72 | 6f 62 61 62 6c 79 20 62 | will pr|obably b|
|00005160| 65 20 64 6f 6e 65 20 61 | 73 20 61 20 63 6f 6d 70 |e done a|s a comp|
|00005170| 72 65 73 73 65 64 0a 58 | 60 60 74 61 72 27 27 2d |ressed.X|``tar''-|
|00005180| 66 6f 72 6d 61 74 20 66 | 69 6c 65 20 61 76 61 69 |format f|ile avai|
|00005190| 6c 61 62 6c 65 20 76 69 | 61 20 61 6e 6f 6e 79 6d |lable vi|a anonym|
|000051a0| 6f 75 73 20 46 54 50 20 | 66 72 6f 6d 20 53 49 50 |ous FTP |from SIP|
|000051b0| 42 2e 4d 49 54 2e 45 44 | 55 2e 0a 58 52 65 74 72 |B.MIT.ED|U..XRetr|
|000051c0| 69 65 76 65 20 40 73 61 | 6d 70 7b 70 75 62 2f 63 |ieve @sa|mp{pub/c|
|000051d0| 6f 6d 5f 65 72 72 2e 74 | 61 72 2e 5a 7d 20 61 6e |om_err.t|ar.Z} an|
|000051e0| 64 20 65 78 74 72 61 63 | 74 20 74 68 65 20 63 6f |d extrac|t the co|
|000051f0| 6e 74 65 6e 74 73 2e 20 | 20 41 20 73 75 62 64 69 |ntents. | A subdi|
|00005200| 72 65 63 74 6f 72 79 0a | 58 40 74 7b 70 72 6f 66 |rectory.|X@t{prof|
|00005210| 69 6c 65 64 7d 20 73 68 | 6f 75 6c 64 20 62 65 20 |iled} sh|ould be |
|00005220| 63 72 65 61 74 65 64 20 | 74 6f 20 68 6f 6c 64 20 |created |to hold |
|00005230| 6f 62 6a 65 63 74 73 20 | 63 6f 6d 70 69 6c 65 64 |objects |compiled|
|00005240| 20 66 6f 72 20 70 72 6f | 66 69 6c 69 6e 67 2e 0a | for pro|filing..|
|00005250| 58 52 75 6e 6e 69 6e 67 | 20 60 60 6d 61 6b 65 20 |XRunning| ``make |
|00005260| 61 6c 6c 27 27 20 73 68 | 6f 75 6c 64 20 74 68 65 |all'' sh|ould the|
|00005270| 6e 20 62 65 20 73 75 66 | 66 69 63 69 65 6e 74 20 |n be suf|ficient |
|00005280| 74 6f 20 62 75 69 6c 64 | 20 74 68 65 20 6c 69 62 |to build| the lib|
|00005290| 72 61 72 79 20 61 6e 64 | 0a 58 65 72 72 6f 72 2d |rary and|.Xerror-|
|000052a0| 74 61 62 6c 65 20 63 6f | 6d 70 69 6c 65 72 2e 20 |table co|mpiler. |
|000052b0| 20 54 68 65 20 66 69 6c | 65 73 20 40 73 61 6d 70 | The fil|es @samp|
|000052c0| 7b 6c 69 62 63 6f 6d 5f | 65 72 72 2e 61 7d 2c 0a |{libcom_|err.a},.|
|000052d0| 58 40 73 61 6d 70 7b 6c | 69 62 63 6f 6d 5f 65 72 |X@samp{l|ibcom_er|
|000052e0| 72 5f 70 2e 61 7d 2c 20 | 40 73 61 6d 70 7b 63 6f |r_p.a}, |@samp{co|
|000052f0| 6d 5f 65 72 72 2e 68 7d | 2c 20 61 6e 64 20 40 73 |m_err.h}|, and @s|
|00005300| 61 6d 70 7b 63 6f 6d 70 | 69 6c 65 5f 65 74 7d 20 |amp{comp|ile_et} |
|00005310| 73 68 6f 75 6c 64 20 62 | 65 0a 58 69 6e 73 74 61 |should b|e.Xinsta|
|00005320| 6c 6c 65 64 20 66 6f 72 | 20 75 73 65 3b 20 40 73 |lled for| use; @s|
|00005330| 61 6d 70 7b 63 6f 6d 5f | 65 72 72 2e 33 7d 20 61 |amp{com_|err.3} a|
|00005340| 6e 64 20 40 73 61 6d 70 | 7b 63 6f 6d 70 69 6c 65 |nd @samp|{compile|
|00005350| 5f 65 74 2e 31 7d 20 63 | 61 6e 20 61 6c 73 6f 20 |_et.1} c|an also |
|00005360| 62 65 0a 58 69 6e 73 74 | 61 6c 6c 65 64 20 61 73 |be.Xinst|alled as|
|00005370| 20 6d 61 6e 75 61 6c 20 | 70 61 67 65 73 2e 0a 58 | manual |pages..X|
|00005380| 0a 58 50 6f 74 65 6e 74 | 69 61 6c 20 70 72 6f 62 |.XPotent|ial prob|
|00005390| 6c 65 6d 73 3a 0a 58 0a | 58 40 69 74 65 6d 69 7a |lems:.X.|X@itemiz|
|000053a0| 65 20 40 62 75 6c 6c 65 | 74 0a 58 0a 58 40 69 74 |e @bulle|t.X.X@it|
|000053b0| 65 6d 20 55 73 65 20 6f | 66 20 40 63 6f 64 65 7b |em Use o|f @code{|
|000053c0| 73 74 72 63 61 73 65 63 | 6d 70 7d 2c 20 61 20 72 |strcasec|mp}, a r|
|000053d0| 6f 75 74 69 6e 65 20 70 | 72 6f 76 69 64 65 64 20 |outine p|rovided |
|000053e0| 69 6e 20 42 53 44 20 66 | 6f 72 0a 58 63 61 73 65 |in BSD f|or.Xcase|
|000053f0| 2d 69 6e 73 65 6e 73 69 | 74 69 76 65 20 73 74 72 |-insensi|tive str|
|00005400| 69 6e 67 20 63 6f 6d 70 | 61 72 69 73 6f 6e 73 2e |ing comp|arisons.|
|00005410| 20 20 49 66 20 61 6e 20 | 65 71 75 69 76 61 6c 65 | If an |equivale|
|00005420| 6e 74 20 72 6f 75 74 69 | 6e 65 20 69 73 0a 58 61 |nt routi|ne is.Xa|
|00005430| 76 61 69 6c 61 62 6c 65 | 2c 20 79 6f 75 20 63 61 |vailable|, you ca|
|00005440| 6e 20 6d 6f 64 69 66 79 | 20 40 63 6f 64 65 7b 43 |n modify| @code{C|
|00005450| 46 4c 41 47 53 7d 20 69 | 6e 20 74 68 65 20 6d 61 |FLAGS} i|n the ma|
|00005460| 6b 65 66 69 6c 65 20 74 | 6f 20 64 65 66 69 6e 65 |kefile t|o define|
|00005470| 0a 58 40 63 6f 64 65 7b | 73 74 72 63 61 73 65 63 |.X@code{|strcasec|
|00005480| 6d 70 7d 20 74 6f 20 74 | 68 65 20 6e 61 6d 65 20 |mp} to t|he name |
|00005490| 6f 66 20 74 68 61 74 20 | 72 6f 75 74 69 6e 65 2e |of that |routine.|
|000054a0| 0a 58 0a 58 40 69 74 65 | 6d 20 43 6f 6d 70 69 6c |.X.X@ite|m Compil|
|000054b0| 65 72 73 20 74 68 61 74 | 20 64 65 66 69 6e 65 64 |ers that| defined|
|000054c0| 20 40 63 6f 64 65 7b 5f | 5f 53 54 44 43 5f 5f 7d | @code{_|_STDC__}|
|000054d0| 20 77 69 74 68 6f 75 74 | 20 70 72 6f 76 69 64 69 | without| providi|
|000054e0| 6e 67 20 74 68 65 20 68 | 65 61 64 65 72 0a 58 66 |ng the h|eader.Xf|
|000054f0| 69 6c 65 20 40 63 6f 64 | 65 7b 3c 73 74 64 61 72 |ile @cod|e{<stdar|
|00005500| 67 2e 68 3e 7d 2e 20 20 | 4f 6e 65 20 73 75 63 68 |g.h>}. |One such|
|00005510| 20 65 78 61 6d 70 6c 65 | 20 69 73 20 4d 65 74 61 | example| is Meta|
|00005520| 77 61 72 65 27 73 20 48 | 69 67 68 20 60 60 43 27 |ware's H|igh ``C'|
|00005530| 27 0a 58 63 6f 6d 70 69 | 6c 65 72 2c 20 61 73 20 |'.Xcompi|ler, as |
|00005540| 70 72 6f 76 69 64 65 64 | 20 61 74 20 50 72 6f 6a |provided| at Proj|
|00005550| 65 63 74 20 41 74 68 65 | 6e 61 20 6f 6e 20 74 68 |ect Athe|na on th|
|00005560| 65 20 49 42 4d 20 52 54 | 2f 50 43 20 77 6f 72 6b |e IBM RT|/PC work|
|00005570| 73 74 61 74 69 6f 6e 3b | 20 69 66 0a 58 40 63 6f |station;| if.X@co|
|00005580| 64 65 7b 5f 5f 48 49 47 | 48 43 5f 5f 7d 20 69 73 |de{__HIG|HC__} is|
|00005590| 20 64 65 66 69 6e 65 64 | 2c 20 69 74 20 69 73 20 | defined|, it is |
|000055a0| 61 73 73 75 6d 65 64 20 | 74 68 61 74 20 40 63 6f |assumed |that @co|
|000055b0| 64 65 7b 3c 73 74 64 61 | 72 67 2e 68 3e 7d 20 69 |de{<stda|rg.h>} i|
|000055c0| 73 20 6e 6f 74 0a 58 61 | 76 61 69 6c 61 62 6c 65 |s not.Xa|vailable|
|000055d0| 2c 20 61 6e 64 20 74 68 | 65 72 65 66 6f 72 65 20 |, and th|erefore |
|000055e0| 40 63 6f 64 65 7b 3c 76 | 61 72 61 72 67 73 2e 68 |@code{<v|arargs.h|
|000055f0| 3e 7d 20 6d 75 73 74 20 | 62 65 20 75 73 65 64 2e |>} must |be used.|
|00005600| 20 20 49 66 20 74 68 65 | 20 73 79 6d 62 6f 6c 0a | If the| symbol.|
|00005610| 58 40 63 6f 64 65 7b 56 | 41 52 41 52 47 53 7d 20 |X@code{V|ARARGS} |
|00005620| 69 73 20 64 65 66 69 6e | 65 64 20 28 65 2e 67 2e |is defin|ed (e.g.|
|00005630| 2c 20 69 6e 20 74 68 65 | 20 6d 61 6b 65 66 69 6c |, in the| makefil|
|00005640| 65 29 2c 20 40 63 6f 64 | 65 7b 3c 76 61 72 61 72 |e), @cod|e{<varar|
|00005650| 67 73 2e 68 3e 7d 20 77 | 69 6c 6c 0a 58 62 65 20 |gs.h>} w|ill.Xbe |
|00005660| 75 73 65 64 2e 0a 58 0a | 58 40 69 74 65 6d 20 49 |used..X.|X@item I|
|00005670| 66 20 79 6f 75 72 20 6c | 69 6e 6b 65 72 20 72 65 |f your l|inker re|
|00005680| 6a 65 63 74 73 20 73 79 | 6d 62 6f 6c 73 20 74 68 |jects sy|mbols th|
|00005690| 61 74 20 61 72 65 20 73 | 69 6d 75 6c 74 61 6e 65 |at are s|imultane|
|000056a0| 6f 75 73 6c 79 20 64 65 | 66 69 6e 65 64 20 69 6e |ously de|fined in|
|000056b0| 20 74 77 6f 0a 58 6c 69 | 62 72 61 72 79 20 66 69 | two.Xli|brary fi|
|000056c0| 6c 65 73 2c 20 65 64 69 | 74 20 40 73 61 6d 70 7b |les, edi|t @samp{|
|000056d0| 4d 61 6b 65 66 69 6c 65 | 7d 20 74 6f 20 72 65 6d |Makefile|} to rem|
|000056e0| 6f 76 65 20 40 73 61 6d | 70 7b 70 65 72 72 6f 72 |ove @sam|p{perror|
|000056f0| 2e 63 7d 20 66 72 6f 6d | 20 74 68 65 0a 58 6c 69 |.c} from| the.Xli|
|00005700| 62 72 61 72 79 2e 20 20 | 54 68 69 73 20 66 69 6c |brary. |This fil|
|00005710| 65 20 63 6f 6e 74 61 69 | 6e 73 20 61 20 76 65 72 |e contai|ns a ver|
|00005720| 73 69 6f 6e 20 6f 66 20 | 40 76 61 72 7b 70 65 72 |sion of |@var{per|
|00005730| 72 6f 72 28 33 29 7d 20 | 77 68 69 63 68 20 63 61 |ror(3)} |which ca|
|00005740| 6c 6c 73 0a 58 40 63 6f | 64 65 7b 63 6f 6d 5f 65 |lls.X@co|de{com_e|
|00005750| 72 72 7d 20 69 6e 73 74 | 65 61 64 20 6f 66 20 63 |rr} inst|ead of c|
|00005760| 61 6c 6c 69 6e 67 20 40 | 63 6f 64 65 7b 77 72 69 |alling @|code{wri|
|00005770| 74 65 7d 20 64 69 72 65 | 63 74 6c 79 2e 0a 58 0a |te} dire|ctly..X.|
|00005780| 58 40 65 6e 64 20 69 74 | 65 6d 69 7a 65 0a 58 0a |X@end it|emize.X.|
|00005790| 58 41 73 20 49 20 64 6f | 20 6e 6f 74 20 68 61 76 |XAs I do| not hav|
|000057a0| 65 20 61 63 63 65 73 73 | 20 74 6f 20 6e 6f 6e 2d |e access| to non-|
|000057b0| 42 53 44 20 73 79 73 74 | 65 6d 73 2c 20 74 68 65 |BSD syst|ems, the|
|000057c0| 72 65 20 61 72 65 20 70 | 72 6f 62 61 62 6c 79 0a |re are p|robably.|
|000057d0| 58 62 75 67 73 20 70 72 | 65 73 65 6e 74 20 74 68 |Xbugs pr|esent th|
|000057e0| 61 74 20 6d 61 79 20 69 | 6e 74 65 72 66 65 72 65 |at may i|nterfere|
|000057f0| 20 77 69 74 68 20 62 75 | 69 6c 64 69 6e 67 20 6f | with bu|ilding o|
|00005800| 72 20 75 73 69 6e 67 20 | 74 68 69 73 20 70 61 63 |r using |this pac|
|00005810| 6b 61 67 65 20 6f 6e 0a | 58 6f 74 68 65 72 20 73 |kage on.|Xother s|
|00005820| 79 73 74 65 6d 73 2e 20 | 20 49 66 20 74 68 65 79 |ystems. | If they|
|00005830| 20 61 72 65 20 72 65 70 | 6f 72 74 65 64 20 74 6f | are rep|orted to|
|00005840| 20 6d 65 2c 20 74 68 65 | 79 20 63 61 6e 20 70 72 | me, the|y can pr|
|00005850| 6f 62 61 62 6c 79 20 62 | 65 20 66 69 78 65 64 20 |obably b|e fixed |
|00005860| 66 6f 72 0a 58 74 68 65 | 20 6e 65 78 74 20 76 65 |for.Xthe| next ve|
|00005870| 72 73 69 6f 6e 2e 0a 58 | 0a 58 40 73 65 63 74 69 |rsion..X|.X@secti|
|00005880| 6f 6e 20 42 75 67 20 52 | 65 70 6f 72 74 73 0a 58 |on Bug R|eports.X|
|00005890| 0a 58 50 6c 65 61 73 65 | 20 73 65 6e 64 20 61 6e |.XPlease| send an|
|000058a0| 79 20 63 6f 6d 6d 65 6e | 74 73 20 6f 72 20 62 75 |y commen|ts or bu|
|000058b0| 67 20 72 65 70 6f 72 74 | 73 20 74 6f 20 74 68 65 |g report|s to the|
|000058c0| 20 70 72 69 6e 63 69 70 | 61 6c 20 61 75 74 68 6f | princip|al autho|
|000058d0| 72 3a 20 4b 65 6e 0a 58 | 52 61 65 62 75 72 6e 2c |r: Ken.X|Raeburn,|
|000058e0| 20 40 74 7b 52 61 65 62 | 75 72 6e 40 40 41 74 68 | @t{Raeb|urn@@Ath|
|000058f0| 65 6e 61 2e 4d 49 54 2e | 45 44 55 7d 2e 0a 58 0a |ena.MIT.|EDU}..X.|
|00005900| 58 40 73 65 63 74 69 6f | 6e 20 41 63 6b 6e 6f 77 |X@sectio|n Acknow|
|00005910| 6c 65 64 67 65 6d 65 6e | 74 73 0a 58 0a 58 49 20 |ledgemen|ts.X.XI |
|00005920| 77 6f 75 6c 64 20 6c 69 | 6b 65 20 74 6f 20 74 68 |would li|ke to th|
|00005930| 61 6e 6b 3a 20 42 69 6c | 6c 20 53 6f 6d 6d 65 72 |ank: Bil|l Sommer|
|00005940| 66 65 6c 64 2c 20 66 6f | 72 20 68 69 73 20 68 65 |feld, fo|r his he|
|00005950| 6c 70 20 77 69 74 68 20 | 73 6f 6d 65 20 6f 66 20 |lp with |some of |
|00005960| 74 68 69 73 0a 58 64 6f | 63 75 6d 65 6e 74 61 74 |this.Xdo|cumentat|
|00005970| 69 6f 6e 2c 20 61 6e 64 | 20 63 61 74 63 68 69 6e |ion, and| catchin|
|00005980| 67 20 73 6f 6d 65 20 6f | 66 20 74 68 65 20 62 75 |g some o|f the bu|
|00005990| 67 73 20 74 68 65 20 66 | 69 72 73 74 20 74 69 6d |gs the f|irst tim|
|000059a0| 65 20 61 72 6f 75 6e 64 | 3b 0a 58 48 6f 6e 65 79 |e around|;.XHoney|
|000059b0| 77 65 6c 6c 20 49 6e 66 | 6f 72 6d 61 74 69 6f 6e |well Inf|ormation|
|000059c0| 20 53 79 73 74 65 6d 73 | 2c 20 66 6f 72 20 6e 6f | Systems|, for no|
|000059d0| 74 20 6b 69 6c 6c 69 6e | 67 20 6f 66 66 20 74 68 |t killin|g off th|
|000059e0| 65 20 40 65 6d 70 68 7b | 4d 75 6c 74 69 63 73 7d |e @emph{|Multics}|
|000059f0| 0a 58 6f 70 65 72 61 74 | 69 6e 67 20 73 79 73 74 |.Xoperat|ing syst|
|00005a00| 65 6d 20 62 65 66 6f 72 | 65 20 49 20 68 61 64 20 |em befor|e I had |
|00005a10| 61 6e 20 6f 70 70 6f 72 | 74 75 6e 69 74 79 20 74 |an oppor|tunity t|
|00005a20| 6f 20 75 73 65 20 69 74 | 3b 20 48 6f 6e 65 79 77 |o use it|; Honeyw|
|00005a30| 65 6c 6c 27 73 0a 58 63 | 75 73 74 6f 6d 65 72 73 |ell's.Xc|ustomers|
|00005a40| 2c 20 77 68 6f 20 70 65 | 72 73 75 61 64 65 64 20 |, who pe|rsuaded |
|00005a50| 74 68 65 6d 20 6e 6f 74 | 20 74 6f 20 64 6f 20 73 |them not| to do s|
|00005a60| 6f 2c 20 66 6f 72 20 61 | 20 77 68 69 6c 65 3b 20 |o, for a| while; |
|00005a70| 54 65 64 20 41 6e 64 65 | 72 73 6f 6e 20 6f 66 0a |Ted Ande|rson of.|
|00005a80| 58 43 4d 55 2c 20 66 6f | 72 20 63 61 74 63 68 69 |XCMU, fo|r catchi|
|00005a90| 6e 67 20 73 6f 6d 65 20 | 70 72 6f 62 6c 65 6d 73 |ng some |problems|
|00005aa0| 20 62 65 66 6f 72 65 20 | 76 65 72 73 69 6f 6e 20 | before |version |
|00005ab0| 31 2e 32 20 6c 65 66 74 | 20 74 68 65 20 6e 65 73 |1.2 left| the nes|
|00005ac0| 74 3b 20 53 74 61 6e 0a | 58 5a 61 6e 61 72 6f 74 |t; Stan.|XZanarot|
|00005ad0| 74 69 20 61 6e 64 20 73 | 65 76 65 72 61 6c 20 6f |ti and s|everal o|
|00005ae0| 74 68 65 72 73 20 6f 66 | 20 4d 49 54 27 73 20 53 |thers of| MIT's S|
|00005af0| 74 75 64 65 6e 74 20 49 | 6e 66 6f 72 6d 61 74 69 |tudent I|nformati|
|00005b00| 6f 6e 20 50 72 6f 63 65 | 73 73 69 6e 67 20 42 6f |on Proce|ssing Bo|
|00005b10| 61 72 64 2c 0a 58 66 6f | 72 20 67 65 74 74 69 6e |ard,.Xfo|r gettin|
|00005b20| 67 20 75 73 20 73 74 61 | 72 74 65 64 20 77 69 74 |g us sta|rted wit|
|00005b30| 68 20 60 60 64 69 73 63 | 75 73 73 2c 27 27 20 66 |h ``disc|uss,'' f|
|00005b40| 6f 72 20 77 68 69 63 68 | 20 74 68 69 73 20 70 61 |or which| this pa|
|00005b50| 63 6b 61 67 65 20 77 61 | 73 0a 58 6f 72 69 67 69 |ckage wa|s.Xorigi|
|00005b60| 6e 61 6c 6c 79 20 77 72 | 69 74 74 65 6e 3b 20 61 |nally wr|itten; a|
|00005b70| 6e 64 20 65 76 65 72 79 | 6f 6e 65 20 49 27 76 65 |nd every|one I've|
|00005b80| 20 74 61 6c 6b 65 64 20 | 69 6e 74 6f 20 2d 2d 2d | talked |into ---|
|00005b90| 20 49 20 6d 65 61 6e 2c | 20 61 73 6b 65 64 20 74 | I mean,| asked t|
|00005ba0| 6f 20 72 65 61 64 0a 58 | 74 68 69 73 20 64 6f 63 |o read.X|this doc|
|00005bb0| 75 6d 65 6e 74 20 61 6e | 64 20 74 68 65 20 60 60 |ument an|d the ``|
|00005bc0| 6d 61 6e 27 27 20 70 61 | 67 65 73 2e 0a 58 0a 58 |man'' pa|ges..X.X|
|00005bd0| 40 62 79 65 0a 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |@bye.END|_OF_FILE|
|00005be0| 0a 65 63 68 6f 20 73 68 | 61 72 3a 20 31 20 63 6f |.echo sh|ar: 1 co|
|00005bf0| 6e 74 72 6f 6c 20 63 68 | 61 72 61 63 74 65 72 20 |ntrol ch|aracter |
|00005c00| 6d 61 79 20 62 65 20 6d | 69 73 73 69 6e 67 20 66 |may be m|issing f|
|00005c10| 72 6f 6d 20 5c 22 27 63 | 6f 6d 5f 65 72 72 2e 74 |rom \"'c|om_err.t|
|00005c20| 65 78 69 6e 66 6f 27 5c | 22 0a 69 66 20 74 65 73 |exinfo'\|".if tes|
|00005c30| 74 20 32 31 37 33 38 20 | 2d 6e 65 20 60 77 63 20 |t 21738 |-ne `wc |
|00005c40| 2d 63 20 3c 27 63 6f 6d | 5f 65 72 72 2e 74 65 78 |-c <'com|_err.tex|
|00005c50| 69 6e 66 6f 27 60 3b 20 | 74 68 65 6e 0a 20 20 20 |info'`; |then. |
|00005c60| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 5c 22 27 63 | echo sh|ar: \"'c|
|00005c70| 6f 6d 5f 65 72 72 2e 74 | 65 78 69 6e 66 6f 27 5c |om_err.t|exinfo'\|
|00005c80| 22 20 75 6e 70 61 63 6b | 65 64 20 77 69 74 68 20 |" unpack|ed with |
|00005c90| 77 72 6f 6e 67 20 73 69 | 7a 65 21 0a 66 69 0a 23 |wrong si|ze!.fi.#|
|00005ca0| 20 65 6e 64 20 6f 66 20 | 27 63 6f 6d 5f 65 72 72 | end of |'com_err|
|00005cb0| 2e 74 65 78 69 6e 66 6f | 27 0a 66 69 0a 69 66 20 |.texinfo|'.fi.if |
|00005cc0| 74 65 73 74 20 2d 66 20 | 27 74 65 78 69 6e 66 6f |test -f |'texinfo|
|00005cd0| 2e 74 65 78 2e 32 27 20 | 2d 61 20 22 24 7b 31 7d |.tex.2' |-a "${1}|
|00005ce0| 22 20 21 3d 20 22 2d 63 | 22 20 3b 20 74 68 65 6e |" != "-c|" ; then|
|00005cf0| 20 0a 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 57 | . echo| shar: W|
|00005d00| 69 6c 6c 20 6e 6f 74 20 | 63 6c 6f 62 62 65 72 20 |ill not |clobber |
|00005d10| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 5c 22 |existing| file \"|
|00005d20| 27 74 65 78 69 6e 66 6f | 2e 74 65 78 2e 32 27 5c |'texinfo|.tex.2'\|
|00005d30| 22 0a 65 6c 73 65 0a 65 | 63 68 6f 20 73 68 61 72 |".else.e|cho shar|
|00005d40| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|00005d50| 74 65 78 69 6e 66 6f 2e | 74 65 78 2e 32 27 5c 22 |texinfo.|tex.2'\"|
|00005d60| 20 5c 28 31 35 39 37 38 | 20 63 68 61 72 61 63 74 | \(15978| charact|
|00005d70| 65 72 73 5c 29 0a 73 65 | 64 20 22 73 2f 5e 58 2f |ers\).se|d "s/^X/|
|00005d80| 2f 22 20 3e 27 74 65 78 | 69 6e 66 6f 2e 74 65 78 |/" >'tex|info.tex|
|00005d90| 2e 32 27 20 3c 3c 27 45 | 4e 44 5f 4f 46 5f 46 49 |.2' <<'E|ND_OF_FI|
|00005da0| 4c 45 27 0a 58 5c 64 65 | 66 5c 71 75 6f 74 61 74 |LE'.X\de|f\quotat|
|00005db0| 69 6f 6e 7b 5c 62 65 67 | 69 6e 67 72 6f 75 70 5c |ion{\beg|ingroup\|
|00005dc0| 69 6e 45 4e 56 20 25 54 | 68 69 73 20 67 72 6f 75 |inENV %T|his grou|
|00005dd0| 70 20 65 6e 64 73 20 61 | 74 20 74 68 65 20 65 6e |p ends a|t the en|
|00005de0| 64 20 6f 66 20 74 68 65 | 20 40 71 75 6f 74 61 74 |d of the| @quotat|
|00005df0| 69 6f 6e 20 62 6f 64 79 | 0a 58 7b 5c 70 61 72 73 |ion body|.X{\pars|
|00005e00| 6b 69 70 3d 30 70 74 20 | 20 25 20 62 65 63 61 75 |kip=0pt | % becau|
|00005e10| 73 65 20 77 65 20 77 69 | 6c 6c 20 73 6b 69 70 20 |se we wi|ll skip |
|00005e20| 62 79 20 5c 70 61 72 73 | 6b 69 70 20 74 6f 6f 2c |by \pars|kip too,|
|00005e30| 20 6c 61 74 65 72 0a 58 | 5c 61 62 6f 76 65 65 6e | later.X|\aboveen|
|00005e40| 76 62 72 65 61 6b 7d 25 | 0a 58 5c 73 69 6e 67 6c |vbreak}%|.X\singl|
|00005e50| 65 73 70 61 63 65 0a 58 | 5c 70 61 72 69 6e 64 65 |espace.X|\parinde|
|00005e60| 6e 74 3d 30 70 74 0a 58 | 5c 64 65 66 5c 45 71 75 |nt=0pt.X|\def\Equ|
|00005e70| 6f 74 61 74 69 6f 6e 7b | 5c 70 61 72 5c 65 6e 64 |otation{|\par\end|
|00005e80| 67 72 6f 75 70 5c 61 66 | 74 65 72 65 6e 76 62 72 |group\af|terenvbr|
|00005e90| 65 61 6b 7d 25 0a 58 5c | 61 64 76 61 6e 63 65 20 |eak}%.X\|advance |
|00005ea0| 5c 72 69 67 68 74 73 6b | 69 70 20 62 79 20 5c 6c |\rightsk|ip by \l|
|00005eb0| 69 73 70 6e 61 72 72 6f | 77 69 6e 67 20 0a 58 5c |ispnarro|wing .X\|
|00005ec0| 61 64 76 61 6e 63 65 20 | 5c 6c 65 66 74 73 6b 69 |advance |\leftski|
|00005ed0| 70 20 62 79 20 5c 6c 69 | 73 70 6e 61 72 72 6f 77 |p by \li|spnarrow|
|00005ee0| 69 6e 67 7d 0a 58 0a 58 | 5c 6d 65 73 73 61 67 65 |ing}.X.X|\message|
|00005ef0| 7b 64 65 66 75 6e 73 2c | 7d 0a 58 25 20 44 65 66 |{defuns,|}.X% Def|
|00005f00| 69 6e 65 20 66 6f 72 6d | 61 74 74 65 72 20 66 6f |ine form|atter fo|
|00005f10| 72 20 64 65 66 75 6e 73 | 0a 58 25 20 46 69 72 73 |r defuns|.X% Firs|
|00005f20| 74 2c 20 61 6c 6c 6f 77 | 20 75 73 65 72 20 74 6f |t, allow| user to|
|00005f30| 20 63 68 61 6e 67 65 20 | 64 65 66 69 6e 69 74 69 | change |definiti|
|00005f40| 6f 6e 20 6f 62 6a 65 63 | 74 20 66 6f 6e 74 20 28 |on objec|t font (|
|00005f50| 5c 64 66 29 20 69 6e 74 | 65 72 6e 61 6c 6c 79 0a |\df) int|ernally.|
|00005f60| 58 5c 64 65 66 5c 73 65 | 74 64 65 66 66 6f 6e 74 |X\def\se|tdeffont|
|00005f70| 20 23 31 20 7b 5c 63 73 | 6e 61 6d 65 20 44 45 46 | #1 {\cs|name DEF|
|00005f80| 23 31 5c 65 6e 64 63 73 | 6e 61 6d 65 7d 0a 58 0a |#1\endcs|name}.X.|
|00005f90| 58 5c 6e 65 77 73 6b 69 | 70 5c 64 65 66 62 6f 64 |X\newski|p\defbod|
|00005fa0| 79 69 6e 64 65 6e 74 20 | 5c 64 65 66 62 6f 64 79 |yindent |\defbody|
|00005fb0| 69 6e 64 65 6e 74 3d 33 | 36 70 74 0a 58 5c 6e 65 |indent=3|6pt.X\ne|
|00005fc0| 77 73 6b 69 70 5c 64 65 | 66 61 72 67 73 69 6e 64 |wskip\de|fargsind|
|00005fd0| 65 6e 74 20 5c 64 65 66 | 61 72 67 73 69 6e 64 65 |ent \def|argsinde|
|00005fe0| 6e 74 3d 35 30 70 74 0a | 58 5c 6e 65 77 73 6b 69 |nt=50pt.|X\newski|
|00005ff0| 70 5c 64 65 66 74 79 70 | 65 6d 61 72 67 69 6e 20 |p\deftyp|emargin |
|00006000| 5c 64 65 66 74 79 70 65 | 6d 61 72 67 69 6e 3d 31 |\deftype|margin=1|
|00006010| 32 70 74 0a 58 5c 6e 65 | 77 73 6b 69 70 5c 64 65 |2pt.X\ne|wskip\de|
|00006020| 66 6c 61 73 74 61 72 67 | 6d 61 72 67 69 6e 20 5c |flastarg|margin \|
|00006030| 64 65 66 6c 61 73 74 61 | 72 67 6d 61 72 67 69 6e |deflasta|rgmargin|
|00006040| 3d 31 38 70 74 0a 58 0a | 58 5c 6e 65 77 63 6f 75 |=18pt.X.|X\newcou|
|00006050| 6e 74 5c 70 61 72 65 6e | 63 6f 75 6e 74 0a 58 25 |nt\paren|count.X%|
|00006060| 20 64 65 66 69 6e 65 20 | 5c 66 75 6e 63 74 69 6f | define |\functio|
|00006070| 6e 70 61 72 65 6e 73 2c | 20 77 68 69 63 68 20 6d |nparens,| which m|
|00006080| 61 6b 65 73 20 28 20 61 | 6e 64 20 29 20 61 6e 64 |akes ( a|nd ) and|
|00006090| 20 26 20 64 6f 20 73 70 | 65 63 69 61 6c 20 74 68 | & do sp|ecial th|
|000060a0| 69 6e 67 73 2e 0a 58 25 | 20 5c 66 75 6e 63 74 69 |ings..X%| \functi|
|000060b0| 6f 6e 70 61 72 65 6e 73 | 20 61 66 66 65 63 74 73 |onparens| affects|
|000060c0| 20 74 68 65 20 67 72 6f | 75 70 20 69 74 20 69 73 | the gro|up it is|
|000060d0| 20 63 6f 6e 74 61 69 6e | 65 64 20 69 6e 2e 0a 58 | contain|ed in..X|
|000060e0| 5c 64 65 66 5c 61 63 74 | 69 76 65 70 61 72 65 6e |\def\act|iveparen|
|000060f0| 73 7b 25 0a 58 5c 63 61 | 74 63 6f 64 65 60 5c 28 |s{%.X\ca|tcode`\(|
|00006100| 3d 5c 61 63 74 69 76 65 | 20 5c 63 61 74 63 6f 64 |=\active| \catcod|
|00006110| 65 60 5c 29 3d 5c 61 63 | 74 69 76 65 20 5c 63 61 |e`\)=\ac|tive \ca|
|00006120| 74 63 6f 64 65 60 5c 26 | 3d 5c 61 63 74 69 76 65 |tcode`\&|=\active|
|00006130| 0a 58 5c 63 61 74 63 6f | 64 65 60 5c 5b 3d 5c 61 |.X\catco|de`\[=\a|
|00006140| 63 74 69 76 65 20 5c 63 | 61 74 63 6f 64 65 60 5c |ctive \c|atcode`\|
|00006150| 5d 3d 5c 61 63 74 69 76 | 65 7d 0a 58 7b 5c 61 63 |]=\activ|e}.X{\ac|
|00006160| 74 69 76 65 70 61 72 65 | 6e 73 20 25 20 4e 6f 77 |tivepare|ns % Now|
|00006170| 2c 20 73 6d 61 72 74 20 | 70 61 72 65 6e 73 20 64 |, smart |parens d|
|00006180| 6f 6e 27 74 20 74 75 72 | 6e 20 6f 6e 20 75 6e 74 |on't tur|n on unt|
|00006190| 69 6c 20 26 66 6f 6f 20 | 28 73 65 65 20 5c 61 6d |il &foo |(see \am|
|000061a0| 70 72 6d 29 0a 58 5c 67 | 64 65 66 5c 66 75 6e 63 |prm).X\g|def\func|
|000061b0| 74 69 6f 6e 70 61 72 65 | 6e 73 7b 5c 62 6f 6c 64 |tionpare|ns{\bold|
|000061c0| 62 72 61 78 5c 6c 65 74 | 26 3d 5c 61 6d 70 72 6d |brax\let|&=\amprm|
|000061d0| 5c 70 61 72 65 6e 63 6f | 75 6e 74 3d 30 20 7d 0a |\parenco|unt=0 }.|
|000061e0| 58 5c 67 64 65 66 5c 62 | 6f 6c 64 62 72 61 78 7b |X\gdef\b|oldbrax{|
|000061f0| 5c 6c 65 74 28 3d 5c 6f | 70 6e 72 5c 6c 65 74 29 |\let(=\o|pnr\let)|
|00006200| 3d 5c 63 6c 6e 72 5c 6c | 65 74 5b 3d 5c 6c 62 72 |=\clnr\l|et[=\lbr|
|00006210| 62 5c 6c 65 74 5d 3d 5c | 72 62 72 62 7d 0a 58 0a |b\let]=\|rbrb}.X.|
|00006220| 58 25 20 44 65 66 69 6e | 69 74 69 6f 6e 73 20 6f |X% Defin|itions o|
|00006230| 66 20 28 2c 20 29 20 61 | 6e 64 20 26 20 75 73 65 |f (, ) a|nd & use|
|00006240| 64 20 69 6e 20 61 72 67 | 73 20 66 6f 72 20 66 75 |d in arg|s for fu|
|00006250| 6e 63 74 69 6f 6e 73 2e | 0a 58 25 20 54 68 69 73 |nctions.|.X% This|
|00006260| 20 69 73 20 74 68 65 20 | 64 65 66 69 6e 69 74 69 | is the |definiti|
|00006270| 6f 6e 20 6f 66 20 28 20 | 6f 75 74 73 69 64 65 20 |on of ( |outside |
|00006280| 6f 66 20 61 6c 6c 20 70 | 61 72 65 6e 74 68 65 73 |of all p|arenthes|
|00006290| 65 73 2e 0a 58 5c 67 64 | 65 66 5c 6f 70 72 6d 23 |es..X\gd|ef\oprm#|
|000062a0| 31 20 7b 7b 5c 72 6d 5c | 63 68 61 72 60 5c 28 7d |1 {{\rm\|char`\(}|
|000062b0| 23 31 20 5c 62 66 20 5c | 6c 65 74 28 3d 5c 6f 70 |#1 \bf \|let(=\op|
|000062c0| 6e 65 73 74 65 64 20 25 | 0a 58 5c 67 6c 6f 62 61 |nested %|.X\globa|
|000062d0| 6c 5c 61 64 76 61 6e 63 | 65 5c 70 61 72 65 6e 63 |l\advanc|e\parenc|
|000062e0| 6f 75 6e 74 20 62 79 20 | 31 20 7d 0a 58 25 0a 58 |ount by |1 }.X%.X|
|000062f0| 25 20 54 68 69 73 20 69 | 73 20 74 68 65 20 64 65 |% This i|s the de|
|00006300| 66 69 6e 69 74 69 6f 6e | 20 6f 66 20 28 20 77 68 |finition| of ( wh|
|00006310| 65 6e 20 61 6c 72 65 61 | 64 79 20 69 6e 73 69 64 |en alrea|dy insid|
|00006320| 65 20 61 20 6c 65 76 65 | 6c 20 6f 66 20 70 61 72 |e a leve|l of par|
|00006330| 65 6e 73 2e 0a 58 5c 67 | 64 65 66 5c 6f 70 6e 65 |ens..X\g|def\opne|
|00006340| 73 74 65 64 7b 5c 63 68 | 61 72 60 5c 28 5c 67 6c |sted{\ch|ar`\(\gl|
|00006350| 6f 62 61 6c 5c 61 64 76 | 61 6e 63 65 5c 70 61 72 |obal\adv|ance\par|
|00006360| 65 6e 63 6f 75 6e 74 20 | 62 79 20 31 20 7d 0a 58 |encount |by 1 }.X|
|00006370| 25 0a 58 5c 67 64 65 66 | 5c 63 6c 72 6d 7b 25 20 |%.X\gdef|\clrm{% |
|00006380| 50 72 69 6e 74 20 61 20 | 70 61 72 65 6e 20 69 6e |Print a |paren in|
|00006390| 20 72 6f 6d 61 6e 20 69 | 66 20 69 74 20 69 73 20 | roman i|f it is |
|000063a0| 74 61 6b 69 6e 67 20 75 | 73 20 62 61 63 6b 20 74 |taking u|s back t|
|000063b0| 6f 20 64 65 70 74 68 20 | 6f 66 20 30 2e 0a 58 25 |o depth |of 0..X%|
|000063c0| 20 61 6c 73 6f 20 69 6e | 20 74 68 61 74 20 63 61 | also in| that ca|
|000063d0| 73 65 20 72 65 73 74 6f | 72 65 20 74 68 65 20 6f |se resto|re the o|
|000063e0| 75 74 65 72 2d 6c 65 76 | 65 6c 20 64 65 66 69 6e |uter-lev|el defin|
|000063f0| 69 74 69 6f 6e 20 6f 66 | 20 28 2e 0a 58 5c 69 66 |ition of| (..X\if|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.