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
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news or mail text
| default
| |
99%
| file
| C source text
| default
| |
98%
| file
| makefile script text
| default
| |
97%
| file
| C source, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/rfc822
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 53 75 62 6a 65 63 74 3a | 20 20 76 31 33 69 30 38 |Subject:| v13i08|
|00000010| 34 3a 20 20 53 75 6e 20 | 52 50 43 2c 20 72 65 6c |4: Sun |RPC, rel|
|00000020| 65 61 73 65 20 33 2e 39 | 2c 20 50 61 72 74 30 37 |ease 3.9|, Part07|
|00000030| 2f 31 35 0a 4e 65 77 73 | 67 72 6f 75 70 73 3a 20 |/15.News|groups: |
|00000040| 63 6f 6d 70 2e 73 6f 75 | 72 63 65 73 2e 75 6e 69 |comp.sou|rces.uni|
|00000050| 78 0a 53 65 6e 64 65 72 | 3a 20 73 6f 75 72 63 65 |x.Sender|: source|
|00000060| 73 0a 41 70 70 72 6f 76 | 65 64 3a 20 72 73 61 6c |s.Approv|ed: rsal|
|00000070| 7a 40 75 75 6e 65 74 2e | 55 55 2e 4e 45 54 0a 0a |z@uunet.|UU.NET..|
|00000080| 53 75 62 6d 69 74 74 65 | 64 2d 62 79 3a 20 53 74 |Submitte|d-by: St|
|00000090| 65 70 68 65 6e 20 58 2e | 20 4e 61 68 6d 20 3c 73 |ephen X.| Nahm <s|
|000000a0| 78 6e 40 53 75 6e 2e 43 | 4f 4d 3e 0a 50 6f 73 74 |xn@Sun.C|OM>.Post|
|000000b0| 69 6e 67 2d 6e 75 6d 62 | 65 72 3a 20 56 6f 6c 75 |ing-numb|er: Volu|
|000000c0| 6d 65 20 31 33 2c 20 49 | 73 73 75 65 20 38 34 0a |me 13, I|ssue 84.|
|000000d0| 41 72 63 68 69 76 65 2d | 6e 61 6d 65 3a 20 72 70 |Archive-|name: rp|
|000000e0| 63 33 2e 39 2f 70 61 72 | 74 30 37 0a 0a 23 21 20 |c3.9/par|t07..#! |
|000000f0| 2f 62 69 6e 2f 73 68 0a | 23 20 54 68 69 73 20 69 |/bin/sh.|# This i|
|00000100| 73 20 61 20 73 68 65 6c | 6c 20 61 72 63 68 69 76 |s a shel|l archiv|
|00000110| 65 2e 20 54 6f 20 65 78 | 74 72 61 63 74 2c 20 72 |e. To ex|tract, r|
|00000120| 65 6d 6f 76 65 20 74 68 | 65 20 68 65 61 64 65 72 |emove th|e header|
|00000130| 20 61 6e 64 20 74 79 70 | 65 20 22 73 68 20 66 69 | and typ|e "sh fi|
|00000140| 6c 65 6e 61 6d 65 22 0a | 23 0a 65 63 68 6f 20 78 |lename".|#.echo x|
|00000150| 20 2d 20 72 70 63 67 65 | 6e 0a 65 63 68 6f 20 63 | - rpcge|n.echo c|
|00000160| 72 65 61 74 69 6e 67 20 | 64 69 72 65 63 74 6f 72 |reating |director|
|00000170| 79 20 72 70 63 67 65 6e | 0a 6d 6b 64 69 72 20 72 |y rpcgen|.mkdir r|
|00000180| 70 63 67 65 6e 0a 63 64 | 20 72 70 63 67 65 6e 0a |pcgen.cd| rpcgen.|
|00000190| 65 63 68 6f 20 78 20 2d | 20 4d 61 6b 65 66 69 6c |echo x -| Makefil|
|000001a0| 65 0a 63 61 74 20 3e 20 | 4d 61 6b 65 66 69 6c 65 |e.cat > |Makefile|
|000001b0| 20 3c 3c 27 46 75 6e 6b | 79 5f 53 74 75 66 66 27 | <<'Funk|y_Stuff'|
|000001c0| 0a 23 0a 23 20 40 28 23 | 29 4d 61 6b 65 66 69 6c |.#.# @(#|)Makefil|
|000001d0| 65 09 31 2e 32 20 38 37 | 2f 31 31 2f 30 39 20 33 |e.1.2 87|/11/09 3|
|000001e0| 2e 39 20 52 50 43 53 52 | 43 0a 23 0a 23 20 4d 61 |.9 RPCSR|C.#.# Ma|
|000001f0| 6b 65 66 69 6c 65 20 66 | 6f 72 20 72 70 63 20 70 |kefile f|or rpc p|
|00000200| 72 6f 74 6f 63 6f 6c 20 | 63 6f 6d 70 69 6c 65 72 |rotocol |compiler|
|00000210| 0a 23 20 43 6f 70 79 72 | 69 67 68 74 20 28 43 29 |.# Copyr|ight (C)|
|00000220| 20 31 39 38 37 2c 20 53 | 75 6e 20 4d 69 63 72 6f | 1987, S|un Micro|
|00000230| 73 79 73 74 65 6d 73 2c | 20 49 6e 63 2e 0a 23 0a |systems,| Inc..#.|
|00000240| 53 52 43 53 3d 20 72 70 | 63 5f 6d 61 69 6e 2e 63 |SRCS= rp|c_main.c|
|00000250| 20 72 70 63 5f 68 6f 75 | 74 2e 63 20 72 70 63 5f | rpc_hou|t.c rpc_|
|00000260| 63 6f 75 74 2e 63 20 72 | 70 63 5f 70 61 72 73 65 |cout.c r|pc_parse|
|00000270| 2e 63 20 72 70 63 5f 73 | 63 61 6e 2e 63 20 72 70 |.c rpc_s|can.c rp|
|00000280| 63 5f 75 74 69 6c 2e 63 | 20 5c 0a 09 72 70 63 5f |c_util.c| \..rpc_|
|00000290| 73 76 63 6f 75 74 2e 63 | 20 72 70 63 5f 63 6c 6e |svcout.c| rpc_cln|
|000002a0| 74 6f 75 74 2e 63 0a 48 | 44 52 53 3d 20 72 70 63 |tout.c.H|DRS= rpc|
|000002b0| 5f 75 74 69 6c 2e 68 20 | 72 70 63 5f 70 61 72 73 |_util.h |rpc_pars|
|000002c0| 65 2e 68 20 72 70 63 5f | 73 63 61 6e 2e 68 0a 4f |e.h rpc_|scan.h.O|
|000002d0| 42 4a 53 3d 20 72 70 63 | 5f 6d 61 69 6e 2e 6f 20 |BJS= rpc|_main.o |
|000002e0| 72 70 63 5f 68 6f 75 74 | 2e 6f 20 72 70 63 5f 63 |rpc_hout|.o rpc_c|
|000002f0| 6f 75 74 2e 6f 20 72 70 | 63 5f 70 61 72 73 65 2e |out.o rp|c_parse.|
|00000300| 6f 20 72 70 63 5f 73 63 | 61 6e 2e 6f 20 72 70 63 |o rpc_sc|an.o rpc|
|00000310| 5f 75 74 69 6c 2e 6f 20 | 5c 0a 09 72 70 63 5f 73 |_util.o |\..rpc_s|
|00000320| 76 63 6f 75 74 2e 6f 20 | 72 70 63 5f 63 6c 6e 74 |vcout.o |rpc_clnt|
|00000330| 6f 75 74 2e 6f 0a 0a 47 | 4f 41 4c 3d 72 70 63 67 |out.o..G|OAL=rpcg|
|00000340| 65 6e 0a 43 46 4c 41 47 | 53 20 3d 20 2d 4f 0a 44 |en.CFLAG|S = -O.D|
|00000350| 45 53 54 44 49 52 3d 0a | 0a 24 28 47 4f 41 4c 29 |ESTDIR=.|.$(GOAL)|
|00000360| 3a 20 24 28 4f 42 4a 53 | 29 0a 09 24 28 43 43 29 |: $(OBJS|)..$(CC)|
|00000370| 20 24 28 43 46 4c 41 47 | 53 29 20 24 28 4f 42 4a | $(CFLAG|S) $(OBJ|
|00000380| 53 29 20 2d 6f 20 24 40 | 0a 0a 69 6e 73 74 61 6c |S) -o $@|..instal|
|00000390| 6c 3a 20 24 28 47 4f 41 | 4c 29 0a 09 40 65 63 68 |l: $(GOA|L)..@ech|
|000003a0| 6f 20 22 49 6e 73 74 61 | 6c 6c 69 6e 67 20 74 68 |o "Insta|lling th|
|000003b0| 65 20 52 50 43 20 50 72 | 6f 74 6f 63 6f 6c 20 43 |e RPC Pr|otocol C|
|000003c0| 6f 6d 70 69 6c 65 72 22 | 0a 09 69 6e 73 74 61 6c |ompiler"|..instal|
|000003d0| 6c 20 2d 73 20 24 28 47 | 4f 41 4c 29 20 24 28 44 |l -s $(G|OAL) $(D|
|000003e0| 45 53 54 44 49 52 29 2f | 75 73 72 2f 62 69 6e 0a |ESTDIR)/|usr/bin.|
|000003f0| 0a 6c 69 6e 74 3a 20 24 | 28 53 52 43 53 29 20 24 |.lint: $|(SRCS) $|
|00000400| 28 48 44 52 53 29 0a 09 | 6c 69 6e 74 20 24 28 53 |(HDRS)..|lint $(S|
|00000410| 52 43 53 29 0a 0a 63 6c | 65 61 6e 3a 0a 09 72 6d |RCS)..cl|ean:..rm|
|00000420| 20 2d 66 20 24 28 47 4f | 41 4c 29 20 24 28 4f 42 | -f $(GO|AL) $(OB|
|00000430| 4a 53 29 0a 0a 64 65 70 | 65 6e 64 3a 20 24 28 53 |JS)..dep|end: $(S|
|00000440| 52 43 53 29 20 24 28 48 | 44 52 53 29 0a 09 40 24 |RCS) $(H|DRS)..@$|
|00000450| 7b 43 43 7d 20 24 7b 43 | 46 4c 41 47 53 7d 20 2d |{CC} ${C|FLAGS} -|
|00000460| 4d 20 24 7b 53 52 43 53 | 7d 20 3e 20 6d 61 6b 65 |M ${SRCS|} > make|
|00000470| 64 65 70 0a 09 40 65 63 | 68 6f 20 27 2f 5e 23 20 |dep..@ec|ho '/^# |
|00000480| 44 4f 20 4e 4f 54 20 44 | 45 4c 45 54 45 20 54 48 |DO NOT D|ELETE TH|
|00000490| 49 53 20 4c 49 4e 45 2f | 2b 31 2c 24 24 64 27 20 |IS LINE/|+1,$$d' |
|000004a0| 3e 65 64 64 65 70 0a 09 | 40 65 63 68 6f 20 27 24 |>eddep..|@echo '$|
|000004b0| 24 72 20 6d 61 6b 65 64 | 65 70 27 20 3e 3e 65 64 |$r maked|ep' >>ed|
|000004c0| 64 65 70 0a 09 40 65 63 | 68 6f 20 27 77 27 20 3e |dep..@ec|ho 'w' >|
|000004d0| 3e 65 64 64 65 70 0a 09 | 40 63 70 20 4d 61 6b 65 |>eddep..|@cp Make|
|000004e0| 66 69 6c 65 20 6d 61 6b | 65 66 69 6c 65 2e 62 61 |file mak|efile.ba|
|000004f0| 6b 0a 09 40 65 64 20 2d | 20 4d 61 6b 65 66 69 6c |k..@ed -| Makefil|
|00000500| 65 20 3c 20 65 64 64 65 | 70 0a 09 40 72 6d 20 65 |e < edde|p..@rm e|
|00000510| 64 64 65 70 20 6d 61 6b | 65 64 65 70 20 6d 61 6b |ddep mak|edep mak|
|00000520| 65 66 69 6c 65 2e 62 61 | 6b 0a 0a 64 65 70 65 6e |efile.ba|k..depen|
|00000530| 64 2e 34 32 42 53 44 20 | 64 65 70 65 6e 64 2e 34 |d.42BSD |depend.4|
|00000540| 32 62 73 64 3a 0a 09 63 | 70 20 2f 64 65 76 2f 6e |2bsd:..c|p /dev/n|
|00000550| 75 6c 6c 20 78 2e 63 0a | 09 66 6f 72 20 69 20 69 |ull x.c.|.for i i|
|00000560| 6e 20 24 28 53 52 43 53 | 29 20 3b 20 64 6f 20 5c |n $(SRCS|) ; do \|
|00000570| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 28 |. | (|
|00000580| 2f 62 69 6e 2f 67 72 65 | 70 20 27 5e 23 5b 20 20 |/bin/gre|p '^#[ |
|00000590| 20 20 20 20 20 20 20 5d | 2a 69 6e 63 6c 75 64 65 | ]|*include|
|000005a0| 27 20 78 2e 63 20 24 24 | 69 20 7c 20 73 65 64 20 |' x.c $$|i | sed |
|000005b0| 5c 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |\. | |
|000005c0| 20 20 20 20 20 20 20 20 | 2d 65 20 27 2f 5c 2e 5c | |-e '/\.\|
|000005d0| 2e 5c 2f 68 2f 64 27 20 | 5c 0a 20 20 20 20 20 20 |.\/h/d' |\. |
|000005e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000005f0| 2d 65 20 27 2f 5c 2e 5c | 2e 5c 2f 75 66 73 2f 64 |-e '/\.\|.\/ufs/d|
|00000600| 27 20 5c 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |' \. | |
|00000610| 20 20 20 20 20 20 20 20 | 20 20 2d 65 20 27 73 2c | | -e 's,|
|00000620| 3c 5c 28 2e 2a 5c 29 3e | 2c 22 2f 75 73 72 2f 69 |<\(.*\)>|,"/usr/i|
|00000630| 6e 63 6c 75 64 65 2f 5c | 31 22 2c 27 20 5c 0a 20 |nclude/\|1",' \. |
|00000640| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000650| 20 20 20 20 20 2d 65 20 | 27 73 2f 3a 5b 5e 22 5d | -e |'s/:[^"]|
|00000660| 2a 22 5c 28 5b 5e 22 5d | 2a 5c 29 22 2e 2a 2f 3a |*"\([^"]|*\)".*/:|
|00000670| 20 5c 31 2f 27 20 5c 0a | 09 20 20 20 20 20 20 20 | \1/' \.|. |
|00000680| 20 20 20 20 20 20 20 20 | 20 20 20 2d 65 20 27 73 | | -e 's|
|00000690| 2f 5c 2e 63 2f 5c 2e 6f | 2f 27 20 3e 3e 6d 61 6b |/\.c/\.o|/' >>mak|
|000006a0| 65 64 65 70 29 3b 20 64 | 6f 6e 65 0a 09 65 63 68 |edep); d|one..ech|
|000006b0| 6f 20 27 2f 5e 23 20 44 | 4f 20 4e 4f 54 20 44 45 |o '/^# D|O NOT DE|
|000006c0| 4c 45 54 45 20 54 48 49 | 53 20 4c 49 4e 45 2f 2b |LETE THI|S LINE/+|
|000006d0| 32 2c 24 24 64 27 20 3e | 65 64 64 65 70 0a 09 65 |2,$$d' >|eddep..e|
|000006e0| 63 68 6f 20 27 24 24 72 | 20 6d 61 6b 65 64 65 70 |cho '$$r| makedep|
|000006f0| 27 20 3e 3e 65 64 64 65 | 70 0a 09 65 63 68 6f 20 |' >>edde|p..echo |
|00000700| 27 77 27 20 3e 3e 65 64 | 64 65 70 0a 09 63 70 20 |'w' >>ed|dep..cp |
|00000710| 4d 61 6b 65 66 69 6c 65 | 20 4d 61 6b 65 66 69 6c |Makefile| Makefil|
|00000720| 65 2e 62 61 6b 0a 09 65 | 64 20 2d 20 4d 61 6b 65 |e.bak..e|d - Make|
|00000730| 66 69 6c 65 20 3c 20 65 | 64 64 65 70 0a 09 72 6d |file < e|ddep..rm|
|00000740| 20 65 64 64 65 70 20 6d | 61 6b 65 64 65 70 20 78 | eddep m|akedep x|
|00000750| 2e 63 0a 09 65 63 68 6f | 20 27 23 20 44 45 50 45 |.c..echo| '# DEPE|
|00000760| 4e 44 45 4e 43 49 45 53 | 20 4d 55 53 54 20 45 4e |NDENCIES| MUST EN|
|00000770| 44 20 41 54 20 45 4e 44 | 20 4f 46 20 46 49 4c 45 |D AT END| OF FILE|
|00000780| 27 20 3e 3e 20 4d 61 6b | 65 66 69 6c 65 0a 09 65 |' >> Mak|efile..e|
|00000790| 63 68 6f 20 27 23 20 49 | 46 20 59 4f 55 20 50 55 |cho '# I|F YOU PU|
|000007a0| 54 20 53 54 55 46 46 20 | 48 45 52 45 20 49 54 20 |T STUFF |HERE IT |
|000007b0| 57 49 4c 4c 20 47 4f 20 | 41 57 41 59 27 20 3e 3e |WILL GO |AWAY' >>|
|000007c0| 20 4d 61 6b 65 66 69 6c | 65 0a 09 65 63 68 6f 20 | Makefil|e..echo |
|000007d0| 27 23 20 73 65 65 20 6d | 61 6b 65 20 64 65 70 65 |'# see m|ake depe|
|000007e0| 6e 64 20 61 62 6f 76 65 | 27 20 3e 3e 20 4d 61 6b |nd above|' >> Mak|
|000007f0| 65 66 69 6c 65 0a 0a 23 | 20 44 4f 20 4e 4f 54 20 |efile..#| DO NOT |
|00000800| 44 45 4c 45 54 45 20 54 | 48 49 53 20 4c 49 4e 45 |DELETE T|HIS LINE|
|00000810| 0a 0a 0a 46 75 6e 6b 79 | 5f 53 74 75 66 66 0a 6c |...Funky|_Stuff.l|
|00000820| 65 6e 3d 60 77 63 20 2d | 63 20 3c 20 4d 61 6b 65 |en=`wc -|c < Make|
|00000830| 66 69 6c 65 60 0a 69 66 | 20 5b 20 24 6c 65 6e 20 |file`.if| [ $len |
|00000840| 21 3d 20 20 20 20 20 31 | 36 31 38 20 5d 20 3b 20 |!= 1|618 ] ; |
|00000850| 74 68 65 6e 0a 20 20 65 | 63 68 6f 20 65 72 72 6f |then. e|cho erro|
|00000860| 72 3a 20 4d 61 6b 65 66 | 69 6c 65 20 77 61 73 20 |r: Makef|ile was |
|00000870| 24 6c 65 6e 20 62 79 74 | 65 73 20 6c 6f 6e 67 2c |$len byt|es long,|
|00000880| 20 73 68 6f 75 6c 64 20 | 68 61 76 65 20 62 65 65 | should |have bee|
|00000890| 6e 20 20 20 20 20 31 36 | 31 38 0a 66 69 0a 65 63 |n 16|18.fi.ec|
|000008a0| 68 6f 20 78 20 2d 20 72 | 70 63 5f 63 6c 6e 74 6f |ho x - r|pc_clnto|
|000008b0| 75 74 2e 63 0a 63 61 74 | 20 3e 20 72 70 63 5f 63 |ut.c.cat| > rpc_c|
|000008c0| 6c 6e 74 6f 75 74 2e 63 | 20 3c 3c 27 46 75 6e 6b |lntout.c| <<'Funk|
|000008d0| 79 5f 53 74 75 66 66 27 | 0a 2f 2a 20 40 28 23 29 |y_Stuff'|./* @(#)|
|000008e0| 72 70 63 5f 63 6c 6e 74 | 6f 75 74 2e 63 09 31 2e |rpc_clnt|out.c.1.|
|000008f0| 32 20 38 37 2f 31 31 2f | 32 34 20 33 2e 39 20 52 |2 87/11/|24 3.9 R|
|00000900| 50 43 53 52 43 20 2a 2f | 0a 2f 2a 0a 20 2a 20 53 |PCSRC */|./*. * S|
|00000910| 75 6e 20 52 50 43 20 69 | 73 20 61 20 70 72 6f 64 |un RPC i|s a prod|
|00000920| 75 63 74 20 6f 66 20 53 | 75 6e 20 4d 69 63 72 6f |uct of S|un Micro|
|00000930| 73 79 73 74 65 6d 73 2c | 20 49 6e 63 2e 20 61 6e |systems,| Inc. an|
|00000940| 64 20 69 73 20 70 72 6f | 76 69 64 65 64 20 66 6f |d is pro|vided fo|
|00000950| 72 0a 20 2a 20 75 6e 72 | 65 73 74 72 69 63 74 65 |r. * unr|estricte|
|00000960| 64 20 75 73 65 20 70 72 | 6f 76 69 64 65 64 20 74 |d use pr|ovided t|
|00000970| 68 61 74 20 74 68 69 73 | 20 6c 65 67 65 6e 64 20 |hat this| legend |
|00000980| 69 73 20 69 6e 63 6c 75 | 64 65 64 20 6f 6e 20 61 |is inclu|ded on a|
|00000990| 6c 6c 20 74 61 70 65 0a | 20 2a 20 6d 65 64 69 61 |ll tape.| * media|
|000009a0| 20 61 6e 64 20 61 73 20 | 61 20 70 61 72 74 20 6f | and as |a part o|
|000009b0| 66 20 74 68 65 20 73 6f | 66 74 77 61 72 65 20 70 |f the so|ftware p|
|000009c0| 72 6f 67 72 61 6d 20 69 | 6e 20 77 68 6f 6c 65 20 |rogram i|n whole |
|000009d0| 6f 72 20 70 61 72 74 2e | 20 20 55 73 65 72 73 0a |or part.| Users.|
|000009e0| 20 2a 20 6d 61 79 20 63 | 6f 70 79 20 6f 72 20 6d | * may c|opy or m|
|000009f0| 6f 64 69 66 79 20 53 75 | 6e 20 52 50 43 20 77 69 |odify Su|n RPC wi|
|00000a00| 74 68 6f 75 74 20 63 68 | 61 72 67 65 2c 20 62 75 |thout ch|arge, bu|
|00000a10| 74 20 61 72 65 20 6e 6f | 74 20 61 75 74 68 6f 72 |t are no|t author|
|00000a20| 69 7a 65 64 0a 20 2a 20 | 74 6f 20 6c 69 63 65 6e |ized. * |to licen|
|00000a30| 73 65 20 6f 72 20 64 69 | 73 74 72 69 62 75 74 65 |se or di|stribute|
|00000a40| 20 69 74 20 74 6f 20 61 | 6e 79 6f 6e 65 20 65 6c | it to a|nyone el|
|00000a50| 73 65 20 65 78 63 65 70 | 74 20 61 73 20 70 61 72 |se excep|t as par|
|00000a60| 74 20 6f 66 20 61 20 70 | 72 6f 64 75 63 74 20 6f |t of a p|roduct o|
|00000a70| 72 0a 20 2a 20 70 72 6f | 67 72 61 6d 20 64 65 76 |r. * pro|gram dev|
|00000a80| 65 6c 6f 70 65 64 20 62 | 79 20 74 68 65 20 75 73 |eloped b|y the us|
|00000a90| 65 72 2e 0a 20 2a 20 0a | 20 2a 20 53 55 4e 20 52 |er.. * .| * SUN R|
|00000aa0| 50 43 20 49 53 20 50 52 | 4f 56 49 44 45 44 20 41 |PC IS PR|OVIDED A|
|00000ab0| 53 20 49 53 20 57 49 54 | 48 20 4e 4f 20 57 41 52 |S IS WIT|H NO WAR|
|00000ac0| 52 41 4e 54 49 45 53 20 | 4f 46 20 41 4e 59 20 4b |RANTIES |OF ANY K|
|00000ad0| 49 4e 44 20 49 4e 43 4c | 55 44 49 4e 47 20 54 48 |IND INCL|UDING TH|
|00000ae0| 45 0a 20 2a 20 57 41 52 | 52 41 4e 54 49 45 53 20 |E. * WAR|RANTIES |
|00000af0| 4f 46 20 44 45 53 49 47 | 4e 2c 20 4d 45 52 43 48 |OF DESIG|N, MERCH|
|00000b00| 41 4e 54 49 42 49 4c 49 | 54 59 20 41 4e 44 20 46 |ANTIBILI|TY AND F|
|00000b10| 49 54 4e 45 53 53 20 46 | 4f 52 20 41 20 50 41 52 |ITNESS F|OR A PAR|
|00000b20| 54 49 43 55 4c 41 52 0a | 20 2a 20 50 55 52 50 4f |TICULAR.| * PURPO|
|00000b30| 53 45 2c 20 4f 52 20 41 | 52 49 53 49 4e 47 20 46 |SE, OR A|RISING F|
|00000b40| 52 4f 4d 20 41 20 43 4f | 55 52 53 45 20 4f 46 20 |ROM A CO|URSE OF |
|00000b50| 44 45 41 4c 49 4e 47 2c | 20 55 53 41 47 45 20 4f |DEALING,| USAGE O|
|00000b60| 52 20 54 52 41 44 45 20 | 50 52 41 43 54 49 43 45 |R TRADE |PRACTICE|
|00000b70| 2e 0a 20 2a 20 0a 20 2a | 20 53 75 6e 20 52 50 43 |.. * . *| Sun RPC|
|00000b80| 20 69 73 20 70 72 6f 76 | 69 64 65 64 20 77 69 74 | is prov|ided wit|
|00000b90| 68 20 6e 6f 20 73 75 70 | 70 6f 72 74 20 61 6e 64 |h no sup|port and|
|00000ba0| 20 77 69 74 68 6f 75 74 | 20 61 6e 79 20 6f 62 6c | without| any obl|
|00000bb0| 69 67 61 74 69 6f 6e 20 | 6f 6e 20 74 68 65 0a 20 |igation |on the. |
|00000bc0| 2a 20 70 61 72 74 20 6f | 66 20 53 75 6e 20 4d 69 |* part o|f Sun Mi|
|00000bd0| 63 72 6f 73 79 73 74 65 | 6d 73 2c 20 49 6e 63 2e |crosyste|ms, Inc.|
|00000be0| 20 74 6f 20 61 73 73 69 | 73 74 20 69 6e 20 69 74 | to assi|st in it|
|00000bf0| 73 20 75 73 65 2c 20 63 | 6f 72 72 65 63 74 69 6f |s use, c|orrectio|
|00000c00| 6e 2c 0a 20 2a 20 6d 6f | 64 69 66 69 63 61 74 69 |n,. * mo|dificati|
|00000c10| 6f 6e 20 6f 72 20 65 6e | 68 61 6e 63 65 6d 65 6e |on or en|hancemen|
|00000c20| 74 2e 0a 20 2a 20 0a 20 | 2a 20 53 55 4e 20 4d 49 |t.. * . |* SUN MI|
|00000c30| 43 52 4f 53 59 53 54 45 | 4d 53 2c 20 49 4e 43 2e |CROSYSTE|MS, INC.|
|00000c40| 20 53 48 41 4c 4c 20 48 | 41 56 45 20 4e 4f 20 4c | SHALL H|AVE NO L|
|00000c50| 49 41 42 49 4c 49 54 59 | 20 57 49 54 48 20 52 45 |IABILITY| WITH RE|
|00000c60| 53 50 45 43 54 20 54 4f | 20 54 48 45 0a 20 2a 20 |SPECT TO| THE. * |
|00000c70| 49 4e 46 52 49 4e 47 45 | 4d 45 4e 54 20 4f 46 20 |INFRINGE|MENT OF |
|00000c80| 43 4f 50 59 52 49 47 48 | 54 53 2c 20 54 52 41 44 |COPYRIGH|TS, TRAD|
|00000c90| 45 20 53 45 43 52 45 54 | 53 20 4f 52 20 41 4e 59 |E SECRET|S OR ANY|
|00000ca0| 20 50 41 54 45 4e 54 53 | 20 42 59 20 53 55 4e 20 | PATENTS| BY SUN |
|00000cb0| 52 50 43 0a 20 2a 20 4f | 52 20 41 4e 59 20 50 41 |RPC. * O|R ANY PA|
|00000cc0| 52 54 20 54 48 45 52 45 | 4f 46 2e 0a 20 2a 20 0a |RT THERE|OF.. * .|
|00000cd0| 20 2a 20 49 6e 20 6e 6f | 20 65 76 65 6e 74 20 77 | * In no| event w|
|00000ce0| 69 6c 6c 20 53 75 6e 20 | 4d 69 63 72 6f 73 79 73 |ill Sun |Microsys|
|00000cf0| 74 65 6d 73 2c 20 49 6e | 63 2e 20 62 65 20 6c 69 |tems, In|c. be li|
|00000d00| 61 62 6c 65 20 66 6f 72 | 20 61 6e 79 20 6c 6f 73 |able for| any los|
|00000d10| 74 20 72 65 76 65 6e 75 | 65 0a 20 2a 20 6f 72 20 |t revenu|e. * or |
|00000d20| 70 72 6f 66 69 74 73 20 | 6f 72 20 6f 74 68 65 72 |profits |or other|
|00000d30| 20 73 70 65 63 69 61 6c | 2c 20 69 6e 64 69 72 65 | special|, indire|
|00000d40| 63 74 20 61 6e 64 20 63 | 6f 6e 73 65 71 75 65 6e |ct and c|onsequen|
|00000d50| 74 69 61 6c 20 64 61 6d | 61 67 65 73 2c 20 65 76 |tial dam|ages, ev|
|00000d60| 65 6e 20 69 66 0a 20 2a | 20 53 75 6e 20 68 61 73 |en if. *| Sun has|
|00000d70| 20 62 65 65 6e 20 61 64 | 76 69 73 65 64 20 6f 66 | been ad|vised of|
|00000d80| 20 74 68 65 20 70 6f 73 | 73 69 62 69 6c 69 74 79 | the pos|sibility|
|00000d90| 20 6f 66 20 73 75 63 68 | 20 64 61 6d 61 67 65 73 | of such| damages|
|00000da0| 2e 0a 20 2a 20 0a 20 2a | 20 53 75 6e 20 4d 69 63 |.. * . *| Sun Mic|
|00000db0| 72 6f 73 79 73 74 65 6d | 73 2c 20 49 6e 63 2e 0a |rosystem|s, Inc..|
|00000dc0| 20 2a 20 32 35 35 30 20 | 47 61 72 63 69 61 20 41 | * 2550 |Garcia A|
|00000dd0| 76 65 6e 75 65 0a 20 2a | 20 4d 6f 75 6e 74 61 69 |venue. *| Mountai|
|00000de0| 6e 20 56 69 65 77 2c 20 | 43 61 6c 69 66 6f 72 6e |n View, |Californ|
|00000df0| 69 61 20 20 39 34 30 34 | 33 0a 20 2a 2f 0a 23 69 |ia 9404|3. */.#i|
|00000e00| 66 6e 64 65 66 20 6c 69 | 6e 74 0a 73 74 61 74 69 |fndef li|nt.stati|
|00000e10| 63 20 63 68 61 72 20 73 | 63 63 73 69 64 5b 5d 20 |c char s|ccsid[] |
|00000e20| 3d 20 22 40 28 23 29 72 | 70 63 5f 63 6c 6e 74 6f |= "@(#)r|pc_clnto|
|00000e30| 75 74 2e 63 20 31 2e 32 | 20 38 37 2f 30 36 2f 32 |ut.c 1.2| 87/06/2|
|00000e40| 34 20 28 43 29 20 31 39 | 38 37 20 53 4d 49 22 3b |4 (C) 19|87 SMI";|
|00000e50| 0a 23 65 6e 64 69 66 0a | 0a 2f 2a 0a 20 2a 20 72 |.#endif.|./*. * r|
|00000e60| 70 63 5f 63 6c 6e 74 6f | 75 74 2e 63 2c 20 43 6c |pc_clnto|ut.c, Cl|
|00000e70| 69 65 6e 74 2d 73 74 75 | 62 20 6f 75 74 70 75 74 |ient-stu|b output|
|00000e80| 74 65 72 20 66 6f 72 20 | 74 68 65 20 52 50 43 20 |ter for |the RPC |
|00000e90| 70 72 6f 74 6f 63 6f 6c | 20 63 6f 6d 70 69 6c 65 |protocol| compile|
|00000ea0| 72 0a 20 2a 20 43 6f 70 | 79 72 69 67 68 74 20 28 |r. * Cop|yright (|
|00000eb0| 43 29 20 31 39 38 37 2c | 20 53 75 6e 20 4d 69 63 |C) 1987,| Sun Mic|
|00000ec0| 72 6f 73 79 74 73 65 6d | 73 2c 20 49 6e 63 2e 0a |rosytsem|s, Inc..|
|00000ed0| 20 2a 2f 0a 23 69 6e 63 | 6c 75 64 65 20 3c 73 74 | */.#inc|lude <st|
|00000ee0| 64 69 6f 2e 68 3e 0a 23 | 69 6e 63 6c 75 64 65 20 |dio.h>.#|include |
|00000ef0| 3c 73 74 72 69 6e 67 73 | 2e 68 3e 0a 23 69 6e 63 |<strings|.h>.#inc|
|00000f00| 6c 75 64 65 20 22 72 70 | 63 5f 70 61 72 73 65 2e |lude "rp|c_parse.|
|00000f10| 68 22 0a 23 69 6e 63 6c | 75 64 65 20 22 72 70 63 |h".#incl|ude "rpc|
|00000f20| 5f 75 74 69 6c 2e 68 22 | 0a 0a 23 64 65 66 69 6e |_util.h"|..#defin|
|00000f30| 65 20 44 45 46 41 55 4c | 54 5f 54 49 4d 45 4f 55 |e DEFAUL|T_TIMEOU|
|00000f40| 54 20 32 35 09 2f 2a 20 | 69 6e 20 73 65 63 6f 6e |T 25./* |in secon|
|00000f50| 64 73 20 2a 2f 0a 0a 76 | 6f 69 64 0a 77 72 69 74 |ds */..v|oid.writ|
|00000f60| 65 5f 73 74 75 62 73 28 | 29 0a 7b 0a 09 6c 69 73 |e_stubs(|).{..lis|
|00000f70| 74 20 2a 6c 3b 0a 09 64 | 65 66 69 6e 69 74 69 6f |t *l;..d|efinitio|
|00000f80| 6e 20 2a 64 65 66 3b 0a | 0a 09 66 5f 70 72 69 6e |n *def;.|..f_prin|
|00000f90| 74 28 66 6f 75 74 2c 20 | 22 5c 6e 73 74 61 74 69 |t(fout, |"\nstati|
|00000fa0| 63 20 73 74 72 75 63 74 | 20 74 69 6d 65 76 61 6c |c struct| timeval|
|00000fb0| 20 54 49 4d 45 4f 55 54 | 20 3d 20 7b 20 25 64 2c | TIMEOUT| = { %d,|
|00000fc0| 20 30 20 7d 3b 5c 6e 22 | 2c 0a 09 09 44 45 46 41 | 0 };\n"|,...DEFA|
|00000fd0| 55 4c 54 5f 54 49 4d 45 | 4f 55 54 29 3b 0a 09 66 |ULT_TIME|OUT);..f|
|00000fe0| 6f 72 20 28 6c 20 3d 20 | 64 65 66 69 6e 65 64 3b |or (l = |defined;|
|00000ff0| 20 6c 20 21 3d 20 4e 55 | 4c 4c 3b 20 6c 20 3d 20 | l != NU|LL; l = |
|00001000| 6c 2d 3e 6e 65 78 74 29 | 20 7b 0a 09 09 64 65 66 |l->next)| {...def|
|00001010| 20 3d 20 28 64 65 66 69 | 6e 69 74 69 6f 6e 20 2a | = (defi|nition *|
|00001020| 29 20 6c 2d 3e 76 61 6c | 3b 0a 09 09 69 66 20 28 |) l->val|;...if (|
|00001030| 64 65 66 2d 3e 64 65 66 | 5f 6b 69 6e 64 20 3d 3d |def->def|_kind ==|
|00001040| 20 44 45 46 5f 50 52 4f | 47 52 41 4d 29 20 7b 0a | DEF_PRO|GRAM) {.|
|00001050| 09 09 09 77 72 69 74 65 | 5f 70 72 6f 67 72 61 6d |...write|_program|
|00001060| 28 64 65 66 29 3b 0a 09 | 09 7d 0a 09 7d 0a 7d 0a |(def);..|.}..}.}.|
|00001070| 0a 0a 73 74 61 74 69 63 | 0a 77 72 69 74 65 5f 70 |..static|.write_p|
|00001080| 72 6f 67 72 61 6d 28 64 | 65 66 29 0a 09 64 65 66 |rogram(d|ef)..def|
|00001090| 69 6e 69 74 69 6f 6e 20 | 2a 64 65 66 3b 0a 7b 0a |inition |*def;.{.|
|000010a0| 09 76 65 72 73 69 6f 6e | 5f 6c 69 73 74 20 2a 76 |.version|_list *v|
|000010b0| 70 3b 0a 09 70 72 6f 63 | 5f 6c 69 73 74 20 2a 70 |p;..proc|_list *p|
|000010c0| 72 6f 63 3b 0a 0a 09 66 | 6f 72 20 28 76 70 20 3d |roc;...f|or (vp =|
|000010d0| 20 64 65 66 2d 3e 64 65 | 66 2e 70 72 2e 76 65 72 | def->de|f.pr.ver|
|000010e0| 73 69 6f 6e 73 3b 20 76 | 70 20 21 3d 20 4e 55 4c |sions; v|p != NUL|
|000010f0| 4c 3b 20 76 70 20 3d 20 | 76 70 2d 3e 6e 65 78 74 |L; vp = |vp->next|
|00001100| 29 20 7b 0a 09 09 66 6f | 72 20 28 70 72 6f 63 20 |) {...fo|r (proc |
|00001110| 3d 20 76 70 2d 3e 70 72 | 6f 63 73 3b 20 70 72 6f |= vp->pr|ocs; pro|
|00001120| 63 20 21 3d 20 4e 55 4c | 4c 3b 20 70 72 6f 63 20 |c != NUL|L; proc |
|00001130| 3d 20 70 72 6f 63 2d 3e | 6e 65 78 74 29 20 7b 0a |= proc->|next) {.|
|00001140| 09 09 09 66 5f 70 72 69 | 6e 74 28 66 6f 75 74 2c |...f_pri|nt(fout,|
|00001150| 20 22 5c 6e 22 29 3b 0a | 09 09 09 70 74 79 70 65 | "\n");.|...ptype|
|00001160| 28 70 72 6f 63 2d 3e 72 | 65 73 5f 70 72 65 66 69 |(proc->r|es_prefi|
|00001170| 78 2c 20 70 72 6f 63 2d | 3e 72 65 73 5f 74 79 70 |x, proc-|>res_typ|
|00001180| 65 2c 20 31 29 3b 0a 09 | 09 09 66 5f 70 72 69 6e |e, 1);..|..f_prin|
|00001190| 74 28 66 6f 75 74 2c 20 | 22 2a 5c 6e 22 29 3b 0a |t(fout, |"*\n");.|
|000011a0| 09 09 09 70 76 6e 61 6d | 65 28 70 72 6f 63 2d 3e |...pvnam|e(proc->|
|000011b0| 70 72 6f 63 5f 6e 61 6d | 65 2c 20 76 70 2d 3e 76 |proc_nam|e, vp->v|
|000011c0| 65 72 73 5f 6e 75 6d 29 | 3b 0a 09 09 09 66 5f 70 |ers_num)|;....f_p|
|000011d0| 72 69 6e 74 28 66 6f 75 | 74 2c 20 22 28 61 72 67 |rint(fou|t, "(arg|
|000011e0| 70 2c 20 63 6c 6e 74 29 | 5c 6e 22 29 3b 0a 09 09 |p, clnt)|\n");...|
|000011f0| 09 66 5f 70 72 69 6e 74 | 28 66 6f 75 74 2c 20 22 |.f_print|(fout, "|
|00001200| 5c 74 22 29 3b 0a 09 09 | 09 70 74 79 70 65 28 70 |\t");...|.ptype(p|
|00001210| 72 6f 63 2d 3e 61 72 67 | 5f 70 72 65 66 69 78 2c |roc->arg|_prefix,|
|00001220| 20 70 72 6f 63 2d 3e 61 | 72 67 5f 74 79 70 65 2c | proc->a|rg_type,|
|00001230| 20 31 29 3b 0a 09 09 09 | 66 5f 70 72 69 6e 74 28 | 1);....|f_print(|
|00001240| 66 6f 75 74 2c 20 22 2a | 61 72 67 70 3b 5c 6e 22 |fout, "*|argp;\n"|
|00001250| 29 3b 0a 09 09 09 66 5f | 70 72 69 6e 74 28 66 6f |);....f_|print(fo|
|00001260| 75 74 2c 20 22 5c 74 43 | 4c 49 45 4e 54 20 2a 63 |ut, "\tC|LIENT *c|
|00001270| 6c 6e 74 3b 5c 6e 22 29 | 3b 0a 09 09 09 66 5f 70 |lnt;\n")|;....f_p|
|00001280| 72 69 6e 74 28 66 6f 75 | 74 2c 20 22 7b 5c 6e 22 |rint(fou|t, "{\n"|
|00001290| 29 3b 0a 09 09 09 70 72 | 69 6e 74 62 6f 64 79 28 |);....pr|intbody(|
|000012a0| 70 72 6f 63 29 3b 0a 09 | 09 09 66 5f 70 72 69 6e |proc);..|..f_prin|
|000012b0| 74 28 66 6f 75 74 2c 20 | 22 7d 5c 6e 5c 6e 22 29 |t(fout, |"}\n\n")|
|000012c0| 3b 0a 09 09 7d 0a 09 7d | 0a 7d 0a 0a 73 74 61 74 |;...}..}|.}..stat|
|000012d0| 69 63 20 63 68 61 72 20 | 2a 0a 61 6d 70 72 28 74 |ic char |*.ampr(t|
|000012e0| 79 70 65 29 0a 09 63 68 | 61 72 20 2a 74 79 70 65 |ype)..ch|ar *type|
|000012f0| 3b 0a 7b 0a 09 69 66 20 | 28 69 73 76 65 63 74 6f |;.{..if |(isvecto|
|00001300| 72 64 65 66 28 74 79 70 | 65 2c 20 52 45 4c 5f 41 |rdef(typ|e, REL_A|
|00001310| 4c 49 41 53 29 29 20 7b | 0a 09 09 72 65 74 75 72 |LIAS)) {|...retur|
|00001320| 6e 20 28 22 22 29 3b 0a | 09 7d 20 65 6c 73 65 20 |n ("");.|.} else |
|00001330| 7b 0a 09 09 72 65 74 75 | 72 6e 20 28 22 26 22 29 |{...retu|rn ("&")|
|00001340| 3b 0a 09 7d 0a 7d 0a 0a | 73 74 61 74 69 63 0a 70 |;..}.}..|static.p|
|00001350| 72 69 6e 74 62 6f 64 79 | 28 70 72 6f 63 29 0a 09 |rintbody|(proc)..|
|00001360| 70 72 6f 63 5f 6c 69 73 | 74 20 2a 70 72 6f 63 3b |proc_lis|t *proc;|
|00001370| 0a 7b 0a 09 66 5f 70 72 | 69 6e 74 28 66 6f 75 74 |.{..f_pr|int(fout|
|00001380| 2c 20 22 5c 74 73 74 61 | 74 69 63 20 22 29 3b 0a |, "\tsta|tic ");.|
|00001390| 09 69 66 20 28 73 74 72 | 65 71 28 70 72 6f 63 2d |.if (str|eq(proc-|
|000013a0| 3e 72 65 73 5f 74 79 70 | 65 2c 20 22 76 6f 69 64 |>res_typ|e, "void|
|000013b0| 22 29 29 20 7b 0a 09 09 | 66 5f 70 72 69 6e 74 28 |")) {...|f_print(|
|000013c0| 66 6f 75 74 2c 20 22 63 | 68 61 72 20 22 29 3b 0a |fout, "c|har ");.|
|000013d0| 09 7d 20 65 6c 73 65 20 | 7b 0a 09 09 70 74 79 70 |.} else |{...ptyp|
|000013e0| 65 28 70 72 6f 63 2d 3e | 72 65 73 5f 70 72 65 66 |e(proc->|res_pref|
|000013f0| 69 78 2c 20 70 72 6f 63 | 2d 3e 72 65 73 5f 74 79 |ix, proc|->res_ty|
|00001400| 70 65 2c 20 30 29 3b 0a | 09 7d 0a 09 66 5f 70 72 |pe, 0);.|.}..f_pr|
|00001410| 69 6e 74 28 66 6f 75 74 | 2c 20 22 72 65 73 3b 5c |int(fout|, "res;\|
|00001420| 6e 22 29 3b 0a 09 66 5f | 70 72 69 6e 74 28 66 6f |n");..f_|print(fo|
|00001430| 75 74 2c 20 22 5c 6e 22 | 29 3b 0a 09 66 5f 70 72 |ut, "\n"|);..f_pr|
|00001440| 69 6e 74 28 66 6f 75 74 | 2c 20 22 5c 74 62 7a 65 |int(fout|, "\tbze|
|00001450| 72 6f 28 25 73 72 65 73 | 2c 20 73 69 7a 65 6f 66 |ro(%sres|, sizeof|
|00001460| 28 72 65 73 29 29 3b 5c | 6e 22 2c 20 61 6d 70 72 |(res));\|n", ampr|
|00001470| 28 70 72 6f 63 2d 3e 72 | 65 73 5f 74 79 70 65 29 |(proc->r|es_type)|
|00001480| 29 3b 0a 09 66 5f 70 72 | 69 6e 74 28 66 6f 75 74 |);..f_pr|int(fout|
|00001490| 2c 0a 09 09 22 5c 74 69 | 66 20 28 63 6c 6e 74 5f |,..."\ti|f (clnt_|
|000014a0| 63 61 6c 6c 28 63 6c 6e | 74 2c 20 25 73 2c 20 78 |call(cln|t, %s, x|
|000014b0| 64 72 5f 25 73 2c 20 61 | 72 67 70 2c 20 78 64 72 |dr_%s, a|rgp, xdr|
|000014c0| 5f 25 73 2c 20 25 73 72 | 65 73 2c 20 54 49 4d 45 |_%s, %sr|es, TIME|
|000014d0| 4f 55 54 29 20 21 3d 20 | 52 50 43 5f 53 55 43 43 |OUT) != |RPC_SUCC|
|000014e0| 45 53 53 29 20 7b 5c 6e | 22 2c 0a 09 09 70 72 6f |ESS) {\n|",...pro|
|000014f0| 63 2d 3e 70 72 6f 63 5f | 6e 61 6d 65 2c 20 73 74 |c->proc_|name, st|
|00001500| 72 69 6e 67 66 69 78 28 | 70 72 6f 63 2d 3e 61 72 |ringfix(|proc->ar|
|00001510| 67 5f 74 79 70 65 29 2c | 0a 09 09 73 74 72 69 6e |g_type),|...strin|
|00001520| 67 66 69 78 28 70 72 6f | 63 2d 3e 72 65 73 5f 74 |gfix(pro|c->res_t|
|00001530| 79 70 65 29 2c 20 61 6d | 70 72 28 70 72 6f 63 2d |ype), am|pr(proc-|
|00001540| 3e 72 65 73 5f 74 79 70 | 65 29 29 3b 0a 09 66 5f |>res_typ|e));..f_|
|00001550| 70 72 69 6e 74 28 66 6f | 75 74 2c 20 22 5c 74 5c |print(fo|ut, "\t\|
|00001560| 74 72 65 74 75 72 6e 20 | 28 4e 55 4c 4c 29 3b 5c |treturn |(NULL);\|
|00001570| 6e 22 29 3b 0a 09 66 5f | 70 72 69 6e 74 28 66 6f |n");..f_|print(fo|
|00001580| 75 74 2c 20 22 5c 74 7d | 5c 6e 22 29 3b 0a 09 69 |ut, "\t}|\n");..i|
|00001590| 66 20 28 73 74 72 65 71 | 28 70 72 6f 63 2d 3e 72 |f (streq|(proc->r|
|000015a0| 65 73 5f 74 79 70 65 2c | 20 22 76 6f 69 64 22 29 |es_type,| "void")|
|000015b0| 29 20 7b 0a 09 09 66 5f | 70 72 69 6e 74 28 66 6f |) {...f_|print(fo|
|000015c0| 75 74 2c 20 22 5c 74 72 | 65 74 75 72 6e 20 28 28 |ut, "\tr|eturn ((|
|000015d0| 76 6f 69 64 20 2a 29 25 | 73 72 65 73 29 3b 5c 6e |void *)%|sres);\n|
|000015e0| 22 2c 0a 09 09 09 61 6d | 70 72 28 70 72 6f 63 2d |",....am|pr(proc-|
|000015f0| 3e 72 65 73 5f 74 79 70 | 65 29 29 3b 0a 09 7d 20 |>res_typ|e));..} |
|00001600| 65 6c 73 65 20 7b 0a 09 | 09 66 5f 70 72 69 6e 74 |else {..|.f_print|
|00001610| 28 66 6f 75 74 2c 20 22 | 5c 74 72 65 74 75 72 6e |(fout, "|\treturn|
|00001620| 20 28 25 73 72 65 73 29 | 3b 5c 6e 22 2c 20 61 6d | (%sres)|;\n", am|
|00001630| 70 72 28 70 72 6f 63 2d | 3e 72 65 73 5f 74 79 70 |pr(proc-|>res_typ|
|00001640| 65 29 29 3b 0a 09 7d 0a | 7d 0a 46 75 6e 6b 79 5f |e));..}.|}.Funky_|
|00001650| 53 74 75 66 66 0a 6c 65 | 6e 3d 60 77 63 20 2d 63 |Stuff.le|n=`wc -c|
|00001660| 20 3c 20 72 70 63 5f 63 | 6c 6e 74 6f 75 74 2e 63 | < rpc_c|lntout.c|
|00001670| 60 0a 69 66 20 5b 20 24 | 6c 65 6e 20 21 3d 20 20 |`.if [ $|len != |
|00001680| 20 20 20 33 34 34 31 20 | 5d 20 3b 20 74 68 65 6e | 3441 |] ; then|
|00001690| 0a 20 20 65 63 68 6f 20 | 65 72 72 6f 72 3a 20 72 |. echo |error: r|
|000016a0| 70 63 5f 63 6c 6e 74 6f | 75 74 2e 63 20 77 61 73 |pc_clnto|ut.c was|
|000016b0| 20 24 6c 65 6e 20 62 79 | 74 65 73 20 6c 6f 6e 67 | $len by|tes long|
|000016c0| 2c 20 73 68 6f 75 6c 64 | 20 68 61 76 65 20 62 65 |, should| have be|
|000016d0| 65 6e 20 20 20 20 20 33 | 34 34 31 0a 66 69 0a 65 |en 3|441.fi.e|
|000016e0| 63 68 6f 20 78 20 2d 20 | 72 70 63 5f 63 6f 75 74 |cho x - |rpc_cout|
|000016f0| 2e 63 0a 63 61 74 20 3e | 20 72 70 63 5f 63 6f 75 |.c.cat >| rpc_cou|
|00001700| 74 2e 63 20 3c 3c 27 46 | 75 6e 6b 79 5f 53 74 75 |t.c <<'F|unky_Stu|
|00001710| 66 66 27 0a 2f 2a 20 40 | 28 23 29 72 70 63 5f 63 |ff'./* @|(#)rpc_c|
|00001720| 6f 75 74 2e 63 09 31 2e | 31 20 38 37 2f 31 31 2f |out.c.1.|1 87/11/|
|00001730| 30 34 20 33 2e 39 20 52 | 50 43 53 52 43 20 2a 2f |04 3.9 R|PCSRC */|
|00001740| 0a 2f 2a 0a 20 2a 20 53 | 75 6e 20 52 50 43 20 69 |./*. * S|un RPC i|
|00001750| 73 20 61 20 70 72 6f 64 | 75 63 74 20 6f 66 20 53 |s a prod|uct of S|
|00001760| 75 6e 20 4d 69 63 72 6f | 73 79 73 74 65 6d 73 2c |un Micro|systems,|
|00001770| 20 49 6e 63 2e 20 61 6e | 64 20 69 73 20 70 72 6f | Inc. an|d is pro|
|00001780| 76 69 64 65 64 20 66 6f | 72 0a 20 2a 20 75 6e 72 |vided fo|r. * unr|
|00001790| 65 73 74 72 69 63 74 65 | 64 20 75 73 65 20 70 72 |estricte|d use pr|
|000017a0| 6f 76 69 64 65 64 20 74 | 68 61 74 20 74 68 69 73 |ovided t|hat this|
|000017b0| 20 6c 65 67 65 6e 64 20 | 69 73 20 69 6e 63 6c 75 | legend |is inclu|
|000017c0| 64 65 64 20 6f 6e 20 61 | 6c 6c 20 74 61 70 65 0a |ded on a|ll tape.|
|000017d0| 20 2a 20 6d 65 64 69 61 | 20 61 6e 64 20 61 73 20 | * media| and as |
|000017e0| 61 20 70 61 72 74 20 6f | 66 20 74 68 65 20 73 6f |a part o|f the so|
|000017f0| 66 74 77 61 72 65 20 70 | 72 6f 67 72 61 6d 20 69 |ftware p|rogram i|
|00001800| 6e 20 77 68 6f 6c 65 20 | 6f 72 20 70 61 72 74 2e |n whole |or part.|
|00001810| 20 20 55 73 65 72 73 0a | 20 2a 20 6d 61 79 20 63 | Users.| * may c|
|00001820| 6f 70 79 20 6f 72 20 6d | 6f 64 69 66 79 20 53 75 |opy or m|odify Su|
|00001830| 6e 20 52 50 43 20 77 69 | 74 68 6f 75 74 20 63 68 |n RPC wi|thout ch|
|00001840| 61 72 67 65 2c 20 62 75 | 74 20 61 72 65 20 6e 6f |arge, bu|t are no|
|00001850| 74 20 61 75 74 68 6f 72 | 69 7a 65 64 0a 20 2a 20 |t author|ized. * |
|00001860| 74 6f 20 6c 69 63 65 6e | 73 65 20 6f 72 20 64 69 |to licen|se or di|
|00001870| 73 74 72 69 62 75 74 65 | 20 69 74 20 74 6f 20 61 |stribute| it to a|
|00001880| 6e 79 6f 6e 65 20 65 6c | 73 65 20 65 78 63 65 70 |nyone el|se excep|
|00001890| 74 20 61 73 20 70 61 72 | 74 20 6f 66 20 61 20 70 |t as par|t of a p|
|000018a0| 72 6f 64 75 63 74 20 6f | 72 0a 20 2a 20 70 72 6f |roduct o|r. * pro|
|000018b0| 67 72 61 6d 20 64 65 76 | 65 6c 6f 70 65 64 20 62 |gram dev|eloped b|
|000018c0| 79 20 74 68 65 20 75 73 | 65 72 2e 0a 20 2a 20 0a |y the us|er.. * .|
|000018d0| 20 2a 20 53 55 4e 20 52 | 50 43 20 49 53 20 50 52 | * SUN R|PC IS PR|
|000018e0| 4f 56 49 44 45 44 20 41 | 53 20 49 53 20 57 49 54 |OVIDED A|S IS WIT|
|000018f0| 48 20 4e 4f 20 57 41 52 | 52 41 4e 54 49 45 53 20 |H NO WAR|RANTIES |
|00001900| 4f 46 20 41 4e 59 20 4b | 49 4e 44 20 49 4e 43 4c |OF ANY K|IND INCL|
|00001910| 55 44 49 4e 47 20 54 48 | 45 0a 20 2a 20 57 41 52 |UDING TH|E. * WAR|
|00001920| 52 41 4e 54 49 45 53 20 | 4f 46 20 44 45 53 49 47 |RANTIES |OF DESIG|
|00001930| 4e 2c 20 4d 45 52 43 48 | 41 4e 54 49 42 49 4c 49 |N, MERCH|ANTIBILI|
|00001940| 54 59 20 41 4e 44 20 46 | 49 54 4e 45 53 53 20 46 |TY AND F|ITNESS F|
|00001950| 4f 52 20 41 20 50 41 52 | 54 49 43 55 4c 41 52 0a |OR A PAR|TICULAR.|
|00001960| 20 2a 20 50 55 52 50 4f | 53 45 2c 20 4f 52 20 41 | * PURPO|SE, OR A|
|00001970| 52 49 53 49 4e 47 20 46 | 52 4f 4d 20 41 20 43 4f |RISING F|ROM A CO|
|00001980| 55 52 53 45 20 4f 46 20 | 44 45 41 4c 49 4e 47 2c |URSE OF |DEALING,|
|00001990| 20 55 53 41 47 45 20 4f | 52 20 54 52 41 44 45 20 | USAGE O|R TRADE |
|000019a0| 50 52 41 43 54 49 43 45 | 2e 0a 20 2a 20 0a 20 2a |PRACTICE|.. * . *|
|000019b0| 20 53 75 6e 20 52 50 43 | 20 69 73 20 70 72 6f 76 | Sun RPC| is prov|
|000019c0| 69 64 65 64 20 77 69 74 | 68 20 6e 6f 20 73 75 70 |ided wit|h no sup|
|000019d0| 70 6f 72 74 20 61 6e 64 | 20 77 69 74 68 6f 75 74 |port and| without|
|000019e0| 20 61 6e 79 20 6f 62 6c | 69 67 61 74 69 6f 6e 20 | any obl|igation |
|000019f0| 6f 6e 20 74 68 65 0a 20 | 2a 20 70 61 72 74 20 6f |on the. |* part o|
|00001a00| 66 20 53 75 6e 20 4d 69 | 63 72 6f 73 79 73 74 65 |f Sun Mi|crosyste|
|00001a10| 6d 73 2c 20 49 6e 63 2e | 20 74 6f 20 61 73 73 69 |ms, Inc.| to assi|
|00001a20| 73 74 20 69 6e 20 69 74 | 73 20 75 73 65 2c 20 63 |st in it|s use, c|
|00001a30| 6f 72 72 65 63 74 69 6f | 6e 2c 0a 20 2a 20 6d 6f |orrectio|n,. * mo|
|00001a40| 64 69 66 69 63 61 74 69 | 6f 6e 20 6f 72 20 65 6e |dificati|on or en|
|00001a50| 68 61 6e 63 65 6d 65 6e | 74 2e 0a 20 2a 20 0a 20 |hancemen|t.. * . |
|00001a60| 2a 20 53 55 4e 20 4d 49 | 43 52 4f 53 59 53 54 45 |* SUN MI|CROSYSTE|
|00001a70| 4d 53 2c 20 49 4e 43 2e | 20 53 48 41 4c 4c 20 48 |MS, INC.| SHALL H|
|00001a80| 41 56 45 20 4e 4f 20 4c | 49 41 42 49 4c 49 54 59 |AVE NO L|IABILITY|
|00001a90| 20 57 49 54 48 20 52 45 | 53 50 45 43 54 20 54 4f | WITH RE|SPECT TO|
|00001aa0| 20 54 48 45 0a 20 2a 20 | 49 4e 46 52 49 4e 47 45 | THE. * |INFRINGE|
|00001ab0| 4d 45 4e 54 20 4f 46 20 | 43 4f 50 59 52 49 47 48 |MENT OF |COPYRIGH|
|00001ac0| 54 53 2c 20 54 52 41 44 | 45 20 53 45 43 52 45 54 |TS, TRAD|E SECRET|
|00001ad0| 53 20 4f 52 20 41 4e 59 | 20 50 41 54 45 4e 54 53 |S OR ANY| PATENTS|
|00001ae0| 20 42 59 20 53 55 4e 20 | 52 50 43 0a 20 2a 20 4f | BY SUN |RPC. * O|
|00001af0| 52 20 41 4e 59 20 50 41 | 52 54 20 54 48 45 52 45 |R ANY PA|RT THERE|
|00001b00| 4f 46 2e 0a 20 2a 20 0a | 20 2a 20 49 6e 20 6e 6f |OF.. * .| * In no|
|00001b10| 20 65 76 65 6e 74 20 77 | 69 6c 6c 20 53 75 6e 20 | event w|ill Sun |
|00001b20| 4d 69 63 72 6f 73 79 73 | 74 65 6d 73 2c 20 49 6e |Microsys|tems, In|
|00001b30| 63 2e 20 62 65 20 6c 69 | 61 62 6c 65 20 66 6f 72 |c. be li|able for|
|00001b40| 20 61 6e 79 20 6c 6f 73 | 74 20 72 65 76 65 6e 75 | any los|t revenu|
|00001b50| 65 0a 20 2a 20 6f 72 20 | 70 72 6f 66 69 74 73 20 |e. * or |profits |
|00001b60| 6f 72 20 6f 74 68 65 72 | 20 73 70 65 63 69 61 6c |or other| special|
|00001b70| 2c 20 69 6e 64 69 72 65 | 63 74 20 61 6e 64 20 63 |, indire|ct and c|
|00001b80| 6f 6e 73 65 71 75 65 6e | 74 69 61 6c 20 64 61 6d |onsequen|tial dam|
|00001b90| 61 67 65 73 2c 20 65 76 | 65 6e 20 69 66 0a 20 2a |ages, ev|en if. *|
|00001ba0| 20 53 75 6e 20 68 61 73 | 20 62 65 65 6e 20 61 64 | Sun has| been ad|
|00001bb0| 76 69 73 65 64 20 6f 66 | 20 74 68 65 20 70 6f 73 |vised of| the pos|
|00001bc0| 73 69 62 69 6c 69 74 79 | 20 6f 66 20 73 75 63 68 |sibility| of such|
|00001bd0| 20 64 61 6d 61 67 65 73 | 2e 0a 20 2a 20 0a 20 2a | damages|.. * . *|
|00001be0| 20 53 75 6e 20 4d 69 63 | 72 6f 73 79 73 74 65 6d | Sun Mic|rosystem|
|00001bf0| 73 2c 20 49 6e 63 2e 0a | 20 2a 20 32 35 35 30 20 |s, Inc..| * 2550 |
|00001c00| 47 61 72 63 69 61 20 41 | 76 65 6e 75 65 0a 20 2a |Garcia A|venue. *|
|00001c10| 20 4d 6f 75 6e 74 61 69 | 6e 20 56 69 65 77 2c 20 | Mountai|n View, |
|00001c20| 43 61 6c 69 66 6f 72 6e | 69 61 20 20 39 34 30 34 |Californ|ia 9404|
|00001c30| 33 0a 20 2a 2f 0a 23 69 | 66 6e 64 65 66 20 6c 69 |3. */.#i|fndef li|
|00001c40| 6e 74 0a 73 74 61 74 69 | 63 20 63 68 61 72 20 73 |nt.stati|c char s|
|00001c50| 63 63 73 69 64 5b 5d 20 | 3d 20 22 40 28 23 29 72 |ccsid[] |= "@(#)r|
|00001c60| 70 63 5f 63 6f 75 74 2e | 63 20 31 2e 38 20 38 37 |pc_cout.|c 1.8 87|
|00001c70| 2f 30 36 2f 32 34 20 28 | 43 29 20 31 39 38 37 20 |/06/24 (|C) 1987 |
|00001c80| 53 4d 49 22 3b 0a 23 65 | 6e 64 69 66 0a 0a 2f 2a |SMI";.#e|ndif../*|
|00001c90| 0a 20 2a 20 72 70 63 5f | 63 6f 75 74 2e 63 2c 20 |. * rpc_|cout.c, |
|00001ca0| 58 44 52 20 72 6f 75 74 | 69 6e 65 20 6f 75 74 70 |XDR rout|ine outp|
|00001cb0| 75 74 74 65 72 20 66 6f | 72 20 74 68 65 20 52 50 |utter fo|r the RP|
|00001cc0| 43 20 70 72 6f 74 6f 63 | 6f 6c 20 63 6f 6d 70 69 |C protoc|ol compi|
|00001cd0| 6c 65 72 20 0a 20 2a 20 | 43 6f 70 79 72 69 67 68 |ler . * |Copyrigh|
|00001ce0| 74 20 28 43 29 20 31 39 | 38 37 2c 20 53 75 6e 20 |t (C) 19|87, Sun |
|00001cf0| 4d 69 63 72 6f 73 79 73 | 74 65 6d 73 2c 20 49 6e |Microsys|tems, In|
|00001d00| 63 2e 20 0a 20 2a 2f 0a | 23 69 6e 63 6c 75 64 65 |c. . */.|#include|
|00001d10| 20 3c 73 74 64 69 6f 2e | 68 3e 0a 23 69 6e 63 6c | <stdio.|h>.#incl|
|00001d20| 75 64 65 20 3c 73 74 72 | 69 6e 67 73 2e 68 3e 0a |ude <str|ings.h>.|
|00001d30| 23 69 6e 63 6c 75 64 65 | 20 22 72 70 63 5f 75 74 |#include| "rpc_ut|
|00001d40| 69 6c 2e 68 22 0a 23 69 | 6e 63 6c 75 64 65 20 22 |il.h".#i|nclude "|
|00001d50| 72 70 63 5f 70 61 72 73 | 65 2e 68 22 0a 0a 2f 2a |rpc_pars|e.h"../*|
|00001d60| 0a 20 2a 20 45 6d 69 74 | 20 74 68 65 20 43 2d 72 |. * Emit| the C-r|
|00001d70| 6f 75 74 69 6e 65 20 66 | 6f 72 20 74 68 65 20 67 |outine f|or the g|
|00001d80| 69 76 65 6e 20 64 65 66 | 69 6e 69 74 69 6f 6e 20 |iven def|inition |
|00001d90| 0a 20 2a 2f 0a 76 6f 69 | 64 0a 65 6d 69 74 28 64 |. */.voi|d.emit(d|
|00001da0| 65 66 29 0a 09 64 65 66 | 69 6e 69 74 69 6f 6e 20 |ef)..def|inition |
|00001db0| 2a 64 65 66 3b 0a 7b 0a | 09 69 66 20 28 64 65 66 |*def;.{.|.if (def|
|00001dc0| 2d 3e 64 65 66 5f 6b 69 | 6e 64 20 3d 3d 20 44 45 |->def_ki|nd == DE|
|00001dd0| 46 5f 50 52 4f 47 52 41 | 4d 20 7c 7c 20 64 65 66 |F_PROGRA|M || def|
|00001de0| 2d 3e 64 65 66 5f 6b 69 | 6e 64 20 3d 3d 20 44 45 |->def_ki|nd == DE|
|00001df0| 46 5f 43 4f 4e 53 54 29 | 20 7b 0a 09 09 72 65 74 |F_CONST)| {...ret|
|00001e00| 75 72 6e 3b 0a 09 7d 0a | 09 70 72 69 6e 74 5f 68 |urn;..}.|.print_h|
|00001e10| 65 61 64 65 72 28 64 65 | 66 29 3b 0a 09 73 77 69 |eader(de|f);..swi|
|00001e20| 74 63 68 20 28 64 65 66 | 2d 3e 64 65 66 5f 6b 69 |tch (def|->def_ki|
|00001e30| 6e 64 29 20 7b 0a 09 63 | 61 73 65 20 44 45 46 5f |nd) {..c|ase DEF_|
|00001e40| 55 4e 49 4f 4e 3a 0a 09 | 09 65 6d 69 74 5f 75 6e |UNION:..|.emit_un|
|00001e50| 69 6f 6e 28 64 65 66 29 | 3b 0a 09 09 62 72 65 61 |ion(def)|;...brea|
|00001e60| 6b 3b 0a 09 63 61 73 65 | 20 44 45 46 5f 45 4e 55 |k;..case| DEF_ENU|
|00001e70| 4d 3a 0a 09 09 65 6d 69 | 74 5f 65 6e 75 6d 28 64 |M:...emi|t_enum(d|
|00001e80| 65 66 29 3b 0a 09 09 62 | 72 65 61 6b 3b 0a 09 63 |ef);...b|reak;..c|
|00001e90| 61 73 65 20 44 45 46 5f | 53 54 52 55 43 54 3a 0a |ase DEF_|STRUCT:.|
|00001ea0| 09 09 65 6d 69 74 5f 73 | 74 72 75 63 74 28 64 65 |..emit_s|truct(de|
|00001eb0| 66 29 3b 0a 09 09 62 72 | 65 61 6b 3b 0a 09 63 61 |f);...br|eak;..ca|
|00001ec0| 73 65 20 44 45 46 5f 54 | 59 50 45 44 45 46 3a 0a |se DEF_T|YPEDEF:.|
|00001ed0| 09 09 65 6d 69 74 5f 74 | 79 70 65 64 65 66 28 64 |..emit_t|ypedef(d|
|00001ee0| 65 66 29 3b 0a 09 09 62 | 72 65 61 6b 3b 0a 09 7d |ef);...b|reak;..}|
|00001ef0| 0a 09 70 72 69 6e 74 5f | 74 72 61 69 6c 65 72 28 |..print_|trailer(|
|00001f00| 29 3b 0a 7d 0a 0a 73 74 | 61 74 69 63 0a 66 69 6e |);.}..st|atic.fin|
|00001f10| 64 74 79 70 65 28 64 65 | 66 2c 20 74 79 70 65 29 |dtype(de|f, type)|
|00001f20| 0a 09 64 65 66 69 6e 69 | 74 69 6f 6e 20 2a 64 65 |..defini|tion *de|
|00001f30| 66 3b 0a 09 63 68 61 72 | 20 2a 74 79 70 65 3b 0a |f;..char| *type;.|
|00001f40| 7b 0a 09 69 66 20 28 64 | 65 66 2d 3e 64 65 66 5f |{..if (d|ef->def_|
|00001f50| 6b 69 6e 64 20 3d 3d 20 | 44 45 46 5f 50 52 4f 47 |kind == |DEF_PROG|
|00001f60| 52 41 4d 20 7c 7c 20 64 | 65 66 2d 3e 64 65 66 5f |RAM || d|ef->def_|
|00001f70| 6b 69 6e 64 20 3d 3d 20 | 44 45 46 5f 43 4f 4e 53 |kind == |DEF_CONS|
|00001f80| 54 29 20 7b 0a 09 09 72 | 65 74 75 72 6e 20 28 30 |T) {...r|eturn (0|
|00001f90| 29 3b 0a 09 7d 20 65 6c | 73 65 20 7b 0a 09 09 72 |);..} el|se {...r|
|00001fa0| 65 74 75 72 6e 20 28 73 | 74 72 65 71 28 64 65 66 |eturn (s|treq(def|
|00001fb0| 2d 3e 64 65 66 5f 6e 61 | 6d 65 2c 20 74 79 70 65 |->def_na|me, type|
|00001fc0| 29 29 3b 0a 09 7d 0a 7d | 0a 0a 73 74 61 74 69 63 |));..}.}|..static|
|00001fd0| 0a 75 6e 64 65 66 69 6e | 65 64 28 74 79 70 65 29 |.undefin|ed(type)|
|00001fe0| 0a 09 63 68 61 72 20 2a | 74 79 70 65 3b 0a 7b 0a |..char *|type;.{.|
|00001ff0| 09 64 65 66 69 6e 69 74 | 69 6f 6e 20 2a 64 65 66 |.definit|ion *def|
|00002000| 3b 0a 0a 09 64 65 66 20 | 3d 20 28 64 65 66 69 6e |;...def |= (defin|
|00002010| 69 74 69 6f 6e 20 2a 29 | 20 46 49 4e 44 56 41 4c |ition *)| FINDVAL|
|00002020| 28 64 65 66 69 6e 65 64 | 2c 20 74 79 70 65 2c 20 |(defined|, type, |
|00002030| 66 69 6e 64 74 79 70 65 | 29 3b 0a 09 72 65 74 75 |findtype|);..retu|
|00002040| 72 6e 20 28 64 65 66 20 | 3d 3d 20 4e 55 4c 4c 29 |rn (def |== NULL)|
|00002050| 3b 0a 7d 0a 0a 0a 73 74 | 61 74 69 63 0a 70 72 69 |;.}...st|atic.pri|
|00002060| 6e 74 5f 68 65 61 64 65 | 72 28 64 65 66 29 0a 09 |nt_heade|r(def)..|
|00002070| 64 65 66 69 6e 69 74 69 | 6f 6e 20 2a 64 65 66 3b |definiti|on *def;|
|00002080| 0a 7b 0a 09 73 70 61 63 | 65 28 29 3b 0a 09 66 5f |.{..spac|e();..f_|
|00002090| 70 72 69 6e 74 28 66 6f | 75 74 2c 20 22 62 6f 6f |print(fo|ut, "boo|
|000020a0| 6c 5f 74 5c 6e 22 29 3b | 0a 09 66 5f 70 72 69 6e |l_t\n");|..f_prin|
|000020b0| 74 28 66 6f 75 74 2c 20 | 22 78 64 72 5f 25 73 28 |t(fout, |"xdr_%s(|
|000020c0| 78 64 72 73 2c 20 6f 62 | 6a 70 29 5c 6e 22 2c 20 |xdrs, ob|jp)\n", |
|000020d0| 64 65 66 2d 3e 64 65 66 | 5f 6e 61 6d 65 29 3b 0a |def->def|_name);.|
|000020e0| 09 66 5f 70 72 69 6e 74 | 28 66 6f 75 74 2c 20 22 |.f_print|(fout, "|
|000020f0| 5c 74 58 44 52 20 2a 78 | 64 72 73 3b 5c 6e 22 29 |\tXDR *x|drs;\n")|
|00002100| 3b 0a 09 66 5f 70 72 69 | 6e 74 28 66 6f 75 74 2c |;..f_pri|nt(fout,|
|00002110| 20 22 5c 74 25 73 20 22 | 2c 20 64 65 66 2d 3e 64 | "\t%s "|, def->d|
|00002120| 65 66 5f 6e 61 6d 65 29 | 3b 0a 09 69 66 20 28 64 |ef_name)|;..if (d|
|00002130| 65 66 2d 3e 64 65 66 5f | 6b 69 6e 64 20 21 3d 20 |ef->def_|kind != |
|00002140| 44 45 46 5f 54 59 50 45 | 44 45 46 20 7c 7c 0a 09 |DEF_TYPE|DEF ||..|
|00002150| 20 20 20 20 21 69 73 76 | 65 63 74 6f 72 64 65 66 | !isv|ectordef|
|00002160| 28 64 65 66 2d 3e 64 65 | 66 2e 74 79 2e 6f 6c 64 |(def->de|f.ty.old|
|00002170| 5f 74 79 70 65 2c 20 64 | 65 66 2d 3e 64 65 66 2e |_type, d|ef->def.|
|00002180| 74 79 2e 72 65 6c 29 29 | 20 7b 0a 09 09 66 5f 70 |ty.rel))| {...f_p|
|00002190| 72 69 6e 74 28 66 6f 75 | 74 2c 20 22 2a 22 29 3b |rint(fou|t, "*");|
|000021a0| 0a 09 7d 0a 09 66 5f 70 | 72 69 6e 74 28 66 6f 75 |..}..f_p|rint(fou|
|000021b0| 74 2c 20 22 6f 62 6a 70 | 3b 5c 6e 22 29 3b 0a 09 |t, "objp|;\n");..|
|000021c0| 66 5f 70 72 69 6e 74 28 | 66 6f 75 74 2c 20 22 7b |f_print(|fout, "{|
|000021d0| 5c 6e 22 29 3b 0a 7d 0a | 0a 73 74 61 74 69 63 0a |\n");.}.|.static.|
|000021e0| 70 72 69 6e 74 5f 74 72 | 61 69 6c 65 72 28 29 0a |print_tr|ailer().|
|000021f0| 7b 0a 09 66 5f 70 72 69 | 6e 74 28 66 6f 75 74 2c |{..f_pri|nt(fout,|
|00002200| 20 22 5c 74 72 65 74 75 | 72 6e 20 28 54 52 55 45 | "\tretu|rn (TRUE|
|00002210| 29 3b 5c 6e 22 29 3b 0a | 09 66 5f 70 72 69 6e 74 |);\n");.|.f_print|
|00002220| 28 66 6f 75 74 2c 20 22 | 7d 5c 6e 22 29 3b 0a 09 |(fout, "|}\n");..|
|00002230| 73 70 61 63 65 28 29 3b | 0a 7d 0a 0a 0a 73 74 61 |space();|.}...sta|
|00002240| 74 69 63 0a 70 72 69 6e | 74 5f 69 66 6f 70 65 6e |tic.prin|t_ifopen|
|00002250| 28 69 6e 64 65 6e 74 2c | 20 6e 61 6d 65 29 0a 09 |(indent,| name)..|
|00002260| 69 6e 74 20 69 6e 64 65 | 6e 74 3b 0a 09 63 68 61 |int inde|nt;..cha|
|00002270| 72 20 2a 6e 61 6d 65 3b | 0a 7b 0a 09 74 61 62 69 |r *name;|.{..tabi|
|00002280| 66 79 28 66 6f 75 74 2c | 20 69 6e 64 65 6e 74 29 |fy(fout,| indent)|
|00002290| 3b 0a 09 66 5f 70 72 69 | 6e 74 28 66 6f 75 74 2c |;..f_pri|nt(fout,|
|000022a0| 20 22 69 66 20 28 21 78 | 64 72 5f 25 73 28 78 64 | "if (!x|dr_%s(xd|
|000022b0| 72 73 22 2c 20 6e 61 6d | 65 29 3b 0a 7d 0a 0a 0a |rs", nam|e);.}...|
|000022c0| 73 74 61 74 69 63 0a 70 | 72 69 6e 74 5f 69 66 61 |static.p|rint_ifa|
|000022d0| 72 67 28 61 72 67 29 0a | 09 63 68 61 72 20 2a 61 |rg(arg).|.char *a|
|000022e0| 72 67 3b 0a 7b 0a 09 66 | 5f 70 72 69 6e 74 28 66 |rg;.{..f|_print(f|
|000022f0| 6f 75 74 2c 20 22 2c 20 | 25 73 22 2c 20 61 72 67 |out, ", |%s", arg|
|00002300| 29 3b 0a 7d 0a 0a 0a 73 | 74 61 74 69 63 0a 70 72 |);.}...s|tatic.pr|
|00002310| 69 6e 74 5f 69 66 73 69 | 7a 65 6f 66 28 70 72 65 |int_ifsi|zeof(pre|
|00002320| 66 69 78 2c 20 74 79 70 | 65 29 0a 09 63 68 61 72 |fix, typ|e)..char|
|00002330| 20 2a 70 72 65 66 69 78 | 3b 0a 09 63 68 61 72 20 | *prefix|;..char |
|00002340| 2a 74 79 70 65 3b 0a 7b | 0a 09 69 66 20 28 73 74 |*type;.{|..if (st|
|00002350| 72 65 71 28 74 79 70 65 | 2c 20 22 62 6f 6f 6c 22 |req(type|, "bool"|
|00002360| 29 29 20 7b 0a 09 09 66 | 5f 70 72 69 6e 74 28 66 |)) {...f|_print(f|
|00002370| 6f 75 74 2c 20 22 2c 20 | 73 69 7a 65 6f 66 28 62 |out, ", |sizeof(b|
|00002380| 6f 6f 6c 5f 74 29 2c 20 | 78 64 72 5f 62 6f 6f 6c |ool_t), |xdr_bool|
|00002390| 22 29 3b 0a 09 7d 20 65 | 6c 73 65 20 7b 0a 09 09 |");..} e|lse {...|
|000023a0| 66 5f 70 72 69 6e 74 28 | 66 6f 75 74 2c 20 22 2c |f_print(|fout, ",|
|000023b0| 20 73 69 7a 65 6f 66 28 | 22 29 3b 0a 09 09 69 66 | sizeof(|");...if|
|000023c0| 20 28 75 6e 64 65 66 69 | 6e 65 64 28 74 79 70 65 | (undefi|ned(type|
|000023d0| 29 20 26 26 20 70 72 65 | 66 69 78 29 20 7b 0a 09 |) && pre|fix) {..|
|000023e0| 09 09 66 5f 70 72 69 6e | 74 28 66 6f 75 74 2c 20 |..f_prin|t(fout, |
|000023f0| 22 25 73 20 22 2c 20 70 | 72 65 66 69 78 29 3b 0a |"%s ", p|refix);.|
|00002400| 09 09 7d 0a 09 09 66 5f | 70 72 69 6e 74 28 66 6f |..}...f_|print(fo|
|00002410| 75 74 2c 20 22 25 73 29 | 2c 20 78 64 72 5f 25 73 |ut, "%s)|, xdr_%s|
|00002420| 22 2c 20 74 79 70 65 2c | 20 74 79 70 65 29 3b 0a |", type,| type);.|
|00002430| 09 7d 0a 7d 0a 0a 73 74 | 61 74 69 63 0a 70 72 69 |.}.}..st|atic.pri|
|00002440| 6e 74 5f 69 66 63 6c 6f | 73 65 28 69 6e 64 65 6e |nt_ifclo|se(inden|
|00002450| 74 29 0a 09 69 6e 74 20 | 69 6e 64 65 6e 74 3b 0a |t)..int |indent;.|
|00002460| 7b 0a 09 66 5f 70 72 69 | 6e 74 28 66 6f 75 74 2c |{..f_pri|nt(fout,|
|00002470| 20 22 29 29 20 7b 5c 6e | 22 29 3b 0a 09 74 61 62 | ")) {\n|");..tab|
|00002480| 69 66 79 28 66 6f 75 74 | 2c 20 69 6e 64 65 6e 74 |ify(fout|, indent|
|00002490| 29 3b 0a 09 66 5f 70 72 | 69 6e 74 28 66 6f 75 74 |);..f_pr|int(fout|
|000024a0| 2c 20 22 5c 74 72 65 74 | 75 72 6e 20 28 46 41 4c |, "\tret|urn (FAL|
|000024b0| 53 45 29 3b 5c 6e 22 29 | 3b 0a 09 74 61 62 69 66 |SE);\n")|;..tabif|
|000024c0| 79 28 66 6f 75 74 2c 20 | 69 6e 64 65 6e 74 29 3b |y(fout, |indent);|
|000024d0| 0a 09 66 5f 70 72 69 6e | 74 28 66 6f 75 74 2c 20 |..f_prin|t(fout, |
|000024e0| 22 7d 5c 6e 22 29 3b 0a | 7d 0a 0a 73 74 61 74 69 |"}\n");.|}..stati|
|000024f0| 63 0a 73 70 61 63 65 28 | 29 0a 7b 0a 09 66 5f 70 |c.space(|).{..f_p|
|00002500| 72 69 6e 74 28 66 6f 75 | 74 2c 20 22 5c 6e 5c 6e |rint(fou|t, "\n\n|
|00002510| 22 29 3b 0a 7d 0a 0a 73 | 74 61 74 69 63 0a 70 72 |");.}..s|tatic.pr|
|00002520| 69 6e 74 5f 69 66 73 74 | 61 74 28 69 6e 64 65 6e |int_ifst|at(inden|
|00002530| 74 2c 20 70 72 65 66 69 | 78 2c 20 74 79 70 65 2c |t, prefi|x, type,|
|00002540| 20 72 65 6c 2c 20 61 6d | 61 78 2c 20 6f 62 6a 6e | rel, am|ax, objn|
|00002550| 61 6d 65 2c 20 6e 61 6d | 65 29 0a 09 69 6e 74 20 |ame, nam|e)..int |
|00002560| 69 6e 64 65 6e 74 3b 0a | 09 63 68 61 72 20 2a 70 |indent;.|.char *p|
|00002570| 72 65 66 69 78 3b 0a 09 | 63 68 61 72 20 2a 74 79 |refix;..|char *ty|
|00002580| 70 65 3b 0a 09 72 65 6c | 61 74 69 6f 6e 20 72 65 |pe;..rel|ation re|
|00002590| 6c 3b 0a 09 63 68 61 72 | 20 2a 61 6d 61 78 3b 0a |l;..char| *amax;.|
|000025a0| 09 63 68 61 72 20 2a 6f | 62 6a 6e 61 6d 65 3b 0a |.char *o|bjname;.|
|000025b0| 09 63 68 61 72 20 2a 6e | 61 6d 65 3b 0a 7b 0a 09 |.char *n|ame;.{..|
|000025c0| 63 68 61 72 20 2a 61 6c | 74 20 3d 20 4e 55 4c 4c |char *al|t = NULL|
|000025d0| 3b 0a 0a 09 73 77 69 74 | 63 68 20 28 72 65 6c 29 |;...swit|ch (rel)|
|000025e0| 20 7b 0a 09 63 61 73 65 | 20 52 45 4c 5f 50 4f 49 | {..case| REL_POI|
|000025f0| 4e 54 45 52 3a 0a 09 09 | 70 72 69 6e 74 5f 69 66 |NTER:...|print_if|
|00002600| 6f 70 65 6e 28 69 6e 64 | 65 6e 74 2c 20 22 70 6f |open(ind|ent, "po|
|00002610| 69 6e 74 65 72 22 29 3b | 0a 09 09 70 72 69 6e 74 |inter");|...print|
|00002620| 5f 69 66 61 72 67 28 22 | 28 63 68 61 72 20 2a 2a |_ifarg("|(char **|
|00002630| 29 22 29 3b 0a 09 09 66 | 5f 70 72 69 6e 74 28 66 |)");...f|_print(f|
|00002640| 6f 75 74 2c 20 22 25 73 | 22 2c 20 6f 62 6a 6e 61 |out, "%s|", objna|
|00002650| 6d 65 29 3b 0a 09 09 70 | 72 69 6e 74 5f 69 66 73 |me);...p|rint_ifs|
|00002660| 69 7a 65 6f 66 28 70 72 | 65 66 69 78 2c 20 74 79 |izeof(pr|efix, ty|
|00002670| 70 65 29 3b 0a 09 09 62 | 72 65 61 6b 3b 0a 09 63 |pe);...b|reak;..c|
|00002680| 61 73 65 20 52 45 4c 5f | 56 45 43 54 4f 52 3a 0a |ase REL_|VECTOR:.|
|00002690| 09 09 69 66 20 28 73 74 | 72 65 71 28 74 79 70 65 |..if (st|req(type|
|000026a0| 2c 20 22 73 74 72 69 6e | 67 22 29 29 20 7b 0a 09 |, "strin|g")) {..|
|000026b0| 09 09 61 6c 74 20 3d 20 | 22 73 74 72 69 6e 67 22 |..alt = |"string"|
|000026c0| 3b 0a 09 09 7d 20 65 6c | 73 65 20 69 66 20 28 73 |;...} el|se if (s|
|000026d0| 74 72 65 71 28 74 79 70 | 65 2c 20 22 6f 70 61 71 |treq(typ|e, "opaq|
|000026e0| 75 65 22 29 29 20 7b 0a | 09 09 09 61 6c 74 20 3d |ue")) {.|...alt =|
|000026f0| 20 22 6f 70 61 71 75 65 | 22 3b 0a 09 09 7d 0a 09 | "opaque|";...}..|
|00002700| 09 69 66 20 28 61 6c 74 | 29 20 7b 0a 09 09 09 70 |.if (alt|) {....p|
|00002710| 72 69 6e 74 5f 69 66 6f | 70 65 6e 28 69 6e 64 65 |rint_ifo|pen(inde|
|00002720| 6e 74 2c 20 61 6c 74 29 | 3b 0a 09 09 09 70 72 69 |nt, alt)|;....pri|
|00002730| 6e 74 5f 69 66 61 72 67 | 28 6f 62 6a 6e 61 6d 65 |nt_ifarg|(objname|
|00002740| 29 3b 0a 09 09 7d 20 65 | 6c 73 65 20 7b 0a 09 09 |);...} e|lse {...|
|00002750| 09 70 72 69 6e 74 5f 69 | 66 6f 70 65 6e 28 69 6e |.print_i|fopen(in|
|00002760| 64 65 6e 74 2c 20 22 76 | 65 63 74 6f 72 22 29 3b |dent, "v|ector");|
|00002770| 0a 09 09 09 70 72 69 6e | 74 5f 69 66 61 72 67 28 |....prin|t_ifarg(|
|00002780| 22 28 63 68 61 72 20 2a | 29 22 29 3b 0a 09 09 09 |"(char *|)");....|
|00002790| 66 5f 70 72 69 6e 74 28 | 66 6f 75 74 2c 20 22 25 |f_print(|fout, "%|
|000027a0| 73 22 2c 20 6f 62 6a 6e | 61 6d 65 29 3b 0a 09 09 |s", objn|ame);...|
|000027b0| 7d 0a 09 09 70 72 69 6e | 74 5f 69 66 61 72 67 28 |}...prin|t_ifarg(|
|000027c0| 61 6d 61 78 29 3b 0a 09 | 09 69 66 20 28 21 61 6c |amax);..|.if (!al|
|000027d0| 74 29 20 7b 0a 09 09 09 | 70 72 69 6e 74 5f 69 66 |t) {....|print_if|
|000027e0| 73 69 7a 65 6f 66 28 70 | 72 65 66 69 78 2c 20 74 |sizeof(p|refix, t|
|000027f0| 79 70 65 29 3b 0a 09 09 | 7d 0a 09 09 62 72 65 61 |ype);...|}...brea|
|00002800| 6b 3b 0a 09 63 61 73 65 | 20 52 45 4c 5f 41 52 52 |k;..case| REL_ARR|
|00002810| 41 59 3a 0a 09 09 69 66 | 20 28 73 74 72 65 71 28 |AY:...if| (streq(|
|00002820| 74 79 70 65 2c 20 22 73 | 74 72 69 6e 67 22 29 29 |type, "s|tring"))|
|00002830| 20 7b 0a 09 09 09 61 6c | 74 20 3d 20 22 73 74 72 | {....al|t = "str|
|00002840| 69 6e 67 22 3b 0a 09 09 | 7d 20 65 6c 73 65 20 69 |ing";...|} else i|
|00002850| 66 20 28 73 74 72 65 71 | 28 74 79 70 65 2c 20 22 |f (streq|(type, "|
|00002860| 6f 70 61 71 75 65 22 29 | 29 20 7b 0a 09 09 09 61 |opaque")|) {....a|
|00002870| 6c 74 20 3d 20 22 62 79 | 74 65 73 22 3b 0a 09 09 |lt = "by|tes";...|
|00002880| 7d 0a 09 09 69 66 20 28 | 73 74 72 65 71 28 74 79 |}...if (|streq(ty|
|00002890| 70 65 2c 20 22 73 74 72 | 69 6e 67 22 29 29 20 7b |pe, "str|ing")) {|
|000028a0| 0a 09 09 09 70 72 69 6e | 74 5f 69 66 6f 70 65 6e |....prin|t_ifopen|
|000028b0| 28 69 6e 64 65 6e 74 2c | 20 61 6c 74 29 3b 0a 09 |(indent,| alt);..|
|000028c0| 09 09 70 72 69 6e 74 5f | 69 66 61 72 67 28 6f 62 |..print_|ifarg(ob|
|000028d0| 6a 6e 61 6d 65 29 3b 0a | 09 09 7d 20 65 6c 73 65 |jname);.|..} else|
|000028e0| 20 7b 0a 09 09 09 69 66 | 20 28 61 6c 74 29 20 7b | {....if| (alt) {|
|000028f0| 0a 09 09 09 09 70 72 69 | 6e 74 5f 69 66 6f 70 65 |.....pri|nt_ifope|
|00002900| 6e 28 69 6e 64 65 6e 74 | 2c 20 61 6c 74 29 3b 0a |n(indent|, alt);.|
|00002910| 09 09 09 7d 20 65 6c 73 | 65 20 7b 0a 09 09 09 09 |...} els|e {.....|
|00002920| 70 72 69 6e 74 5f 69 66 | 6f 70 65 6e 28 69 6e 64 |print_if|open(ind|
|00002930| 65 6e 74 2c 20 22 61 72 | 72 61 79 22 29 3b 0a 09 |ent, "ar|ray");..|
|00002940| 09 09 7d 0a 09 09 09 70 | 72 69 6e 74 5f 69 66 61 |..}....p|rint_ifa|
|00002950| 72 67 28 22 28 63 68 61 | 72 20 2a 2a 29 22 29 3b |rg("(cha|r **)");|
|00002960| 0a 09 09 09 69 66 20 28 | 2a 6f 62 6a 6e 61 6d 65 |....if (|*objname|
|00002970| 20 3d 3d 20 27 26 27 29 | 20 7b 0a 09 09 09 09 66 | == '&')| {.....f|
|00002980| 5f 70 72 69 6e 74 28 66 | 6f 75 74 2c 20 22 25 73 |_print(f|out, "%s|
|00002990| 2e 25 73 5f 76 61 6c 2c | 20 28 75 5f 69 6e 74 20 |.%s_val,| (u_int |
|000029a0| 2a 29 25 73 2e 25 73 5f | 6c 65 6e 22 2c 0a 09 09 |*)%s.%s_|len",...|
|000029b0| 09 09 09 6f 62 6a 6e 61 | 6d 65 2c 20 6e 61 6d 65 |...objna|me, name|
|000029c0| 2c 20 6f 62 6a 6e 61 6d | 65 2c 20 6e 61 6d 65 29 |, objnam|e, name)|
|000029d0| 3b 0a 09 09 09 7d 20 65 | 6c 73 65 20 7b 0a 09 09 |;....} e|lse {...|
|000029e0| 09 09 66 5f 70 72 69 6e | 74 28 66 6f 75 74 2c 20 |..f_prin|t(fout, |
|000029f0| 22 26 25 73 2d 3e 25 73 | 5f 76 61 6c 2c 20 28 75 |"&%s->%s|_val, (u|
|00002a00| 5f 69 6e 74 20 2a 29 26 | 25 73 2d 3e 25 73 5f 6c |_int *)&|%s->%s_l|
|00002a10| 65 6e 22 2c 0a 09 09 09 | 09 09 6f 62 6a 6e 61 6d |en",....|..objnam|
|00002a20| 65 2c 20 6e 61 6d 65 2c | 20 6f 62 6a 6e 61 6d 65 |e, name,| objname|
|00002a30| 2c 20 6e 61 6d 65 29 3b | 0a 09 09 09 7d 0a 09 09 |, name);|....}...|
|00002a40| 7d 0a 09 09 70 72 69 6e | 74 5f 69 66 61 72 67 28 |}...prin|t_ifarg(|
|00002a50| 61 6d 61 78 29 3b 0a 09 | 09 69 66 20 28 21 61 6c |amax);..|.if (!al|
|00002a60| 74 29 20 7b 0a 09 09 09 | 70 72 69 6e 74 5f 69 66 |t) {....|print_if|
|00002a70| 73 69 7a 65 6f 66 28 70 | 72 65 66 69 78 2c 20 74 |sizeof(p|refix, t|
|00002a80| 79 70 65 29 3b 0a 09 09 | 7d 0a 09 09 62 72 65 61 |ype);...|}...brea|
|00002a90| 6b 3b 0a 09 63 61 73 65 | 20 52 45 4c 5f 41 4c 49 |k;..case| REL_ALI|
|00002aa0| 41 53 3a 0a 09 09 70 72 | 69 6e 74 5f 69 66 6f 70 |AS:...pr|int_ifop|
|00002ab0| 65 6e 28 69 6e 64 65 6e | 74 2c 20 74 79 70 65 29 |en(inden|t, type)|
|00002ac0| 3b 0a 09 09 70 72 69 6e | 74 5f 69 66 61 72 67 28 |;...prin|t_ifarg(|
|00002ad0| 6f 62 6a 6e 61 6d 65 29 | 3b 0a 09 09 62 72 65 61 |objname)|;...brea|
|00002ae0| 6b 3b 0a 09 7d 0a 09 70 | 72 69 6e 74 5f 69 66 63 |k;..}..p|rint_ifc|
|00002af0| 6c 6f 73 65 28 69 6e 64 | 65 6e 74 29 3b 0a 7d 0a |lose(ind|ent);.}.|
|00002b00| 0a 0a 2f 2a 20 41 52 47 | 53 55 53 45 44 20 2a 2f |../* ARG|SUSED */|
|00002b10| 0a 73 74 61 74 69 63 0a | 65 6d 69 74 5f 65 6e 75 |.static.|emit_enu|
|00002b20| 6d 28 64 65 66 29 0a 09 | 64 65 66 69 6e 69 74 69 |m(def)..|definiti|
|00002b30| 6f 6e 20 2a 64 65 66 3b | 0a 7b 0a 09 70 72 69 6e |on *def;|.{..prin|
|00002b40| 74 5f 69 66 6f 70 65 6e | 28 31 2c 20 22 65 6e 75 |t_ifopen|(1, "enu|
|00002b50| 6d 22 29 3b 0a 09 70 72 | 69 6e 74 5f 69 66 61 72 |m");..pr|int_ifar|
|00002b60| 67 28 22 28 65 6e 75 6d | 5f 74 20 2a 29 6f 62 6a |g("(enum|_t *)obj|
|00002b70| 70 22 29 3b 0a 09 70 72 | 69 6e 74 5f 69 66 63 6c |p");..pr|int_ifcl|
|00002b80| 6f 73 65 28 31 29 3b 0a | 7d 0a 0a 0a 73 74 61 74 |ose(1);.|}...stat|
|00002b90| 69 63 0a 65 6d 69 74 5f | 75 6e 69 6f 6e 28 64 65 |ic.emit_|union(de|
|00002ba0| 66 29 0a 09 64 65 66 69 | 6e 69 74 69 6f 6e 20 2a |f)..defi|nition *|
|00002bb0| 64 65 66 3b 0a 7b 0a 09 | 64 65 63 6c 61 72 61 74 |def;.{..|declarat|
|00002bc0| 69 6f 6e 20 2a 64 66 6c | 74 3b 0a 09 63 61 73 65 |ion *dfl|t;..case|
|00002bd0| 5f 6c 69 73 74 20 2a 63 | 6c 3b 0a 09 64 65 63 6c |_list *c|l;..decl|
|00002be0| 61 72 61 74 69 6f 6e 20 | 2a 63 73 3b 0a 09 63 68 |aration |*cs;..ch|
|00002bf0| 61 72 20 2a 6f 62 6a 65 | 63 74 3b 0a 09 63 68 61 |ar *obje|ct;..cha|
|00002c00| 72 20 2a 66 6f 72 6d 61 | 74 20 3d 20 22 26 6f 62 |r *forma|t = "&ob|
|00002c10| 6a 70 2d 3e 25 73 5f 75 | 2e 25 73 22 3b 0a 0a 09 |jp->%s_u|.%s";...|
|00002c20| 70 72 69 6e 74 5f 73 74 | 61 74 28 26 64 65 66 2d |print_st|at(&def-|
|00002c30| 3e 64 65 66 2e 75 6e 2e | 65 6e 75 6d 5f 64 65 63 |>def.un.|enum_dec|
|00002c40| 6c 29 3b 0a 09 66 5f 70 | 72 69 6e 74 28 66 6f 75 |l);..f_p|rint(fou|
|00002c50| 74 2c 20 22 5c 74 73 77 | 69 74 63 68 20 28 6f 62 |t, "\tsw|itch (ob|
|00002c60| 6a 70 2d 3e 25 73 29 20 | 7b 5c 6e 22 2c 20 64 65 |jp->%s) |{\n", de|
|00002c70| 66 2d 3e 64 65 66 2e 75 | 6e 2e 65 6e 75 6d 5f 64 |f->def.u|n.enum_d|
|00002c80| 65 63 6c 2e 6e 61 6d 65 | 29 3b 0a 09 66 6f 72 20 |ecl.name|);..for |
|00002c90| 28 63 6c 20 3d 20 64 65 | 66 2d 3e 64 65 66 2e 75 |(cl = de|f->def.u|
|00002ca0| 6e 2e 63 61 73 65 73 3b | 20 63 6c 20 21 3d 20 4e |n.cases;| cl != N|
|00002cb0| 55 4c 4c 3b 20 63 6c 20 | 3d 20 63 6c 2d 3e 6e 65 |ULL; cl |= cl->ne|
|00002cc0| 78 74 29 20 7b 0a 09 09 | 63 73 20 3d 20 26 63 6c |xt) {...|cs = &cl|
|00002cd0| 2d 3e 63 61 73 65 5f 64 | 65 63 6c 3b 0a 09 09 66 |->case_d|ecl;...f|
|00002ce0| 5f 70 72 69 6e 74 28 66 | 6f 75 74 2c 20 22 5c 74 |_print(f|out, "\t|
|00002cf0| 63 61 73 65 20 25 73 3a | 5c 6e 22 2c 20 63 6c 2d |case %s:|\n", cl-|
|00002d00| 3e 63 61 73 65 5f 6e 61 | 6d 65 29 3b 0a 09 09 69 |>case_na|me);...i|
|00002d10| 66 20 28 21 73 74 72 65 | 71 28 63 73 2d 3e 74 79 |f (!stre|q(cs->ty|
|00002d20| 70 65 2c 20 22 76 6f 69 | 64 22 29 29 20 7b 0a 09 |pe, "voi|d")) {..|
|00002d30| 09 09 6f 62 6a 65 63 74 | 20 3d 20 61 6c 6c 6f 63 |..object| = alloc|
|00002d40| 28 73 74 72 6c 65 6e 28 | 64 65 66 2d 3e 64 65 66 |(strlen(|def->def|
|00002d50| 5f 6e 61 6d 65 29 20 2b | 20 73 74 72 6c 65 6e 28 |_name) +| strlen(|
|00002d60| 66 6f 72 6d 61 74 29 20 | 2b 0a 09 09 09 09 20 20 |format) |+..... |
|00002d70| 20 20 20 20 20 73 74 72 | 6c 65 6e 28 63 73 2d 3e | str|len(cs->|
|00002d80| 6e 61 6d 65 29 20 2b 20 | 31 29 3b 0a 09 09 09 73 |name) + |1);....s|
|00002d90| 5f 70 72 69 6e 74 28 6f | 62 6a 65 63 74 2c 20 66 |_print(o|bject, f|
|00002da0| 6f 72 6d 61 74 2c 20 64 | 65 66 2d 3e 64 65 66 5f |ormat, d|ef->def_|
|00002db0| 6e 61 6d 65 2c 20 63 73 | 2d 3e 6e 61 6d 65 29 3b |name, cs|->name);|
|00002dc0| 0a 09 09 09 70 72 69 6e | 74 5f 69 66 73 74 61 74 |....prin|t_ifstat|
|00002dd0| 28 32 2c 20 63 73 2d 3e | 70 72 65 66 69 78 2c 20 |(2, cs->|prefix, |
|00002de0| 63 73 2d 3e 74 79 70 65 | 2c 20 63 73 2d 3e 72 65 |cs->type|, cs->re|
|00002df0| 6c 2c 20 63 73 2d 3e 61 | 72 72 61 79 5f 6d 61 78 |l, cs->a|rray_max|
|00002e00| 2c 0a 09 09 09 09 20 20 | 20 20 20 6f 62 6a 65 63 |,..... | objec|
|00002e10| 74 2c 20 63 73 2d 3e 6e | 61 6d 65 29 3b 0a 09 09 |t, cs->n|ame);...|
|00002e20| 09 66 72 65 65 28 6f 62 | 6a 65 63 74 29 3b 0a 09 |.free(ob|ject);..|
|00002e30| 09 7d 0a 09 09 66 5f 70 | 72 69 6e 74 28 66 6f 75 |.}...f_p|rint(fou|
|00002e40| 74 2c 20 22 5c 74 5c 74 | 62 72 65 61 6b 3b 5c 6e |t, "\t\t|break;\n|
|00002e50| 22 29 3b 0a 09 7d 0a 09 | 64 66 6c 74 20 3d 20 64 |");..}..|dflt = d|
|00002e60| 65 66 2d 3e 64 65 66 2e | 75 6e 2e 64 65 66 61 75 |ef->def.|un.defau|
|00002e70| 6c 74 5f 64 65 63 6c 3b | 0a 09 69 66 20 28 64 66 |lt_decl;|..if (df|
|00002e80| 6c 74 20 21 3d 20 4e 55 | 4c 4c 29 20 7b 0a 09 09 |lt != NU|LL) {...|
|00002e90| 69 66 20 28 21 73 74 72 | 65 71 28 64 66 6c 74 2d |if (!str|eq(dflt-|
|00002ea0| 3e 74 79 70 65 2c 20 22 | 76 6f 69 64 22 29 29 20 |>type, "|void")) |
|00002eb0| 7b 0a 09 09 09 66 5f 70 | 72 69 6e 74 28 66 6f 75 |{....f_p|rint(fou|
|00002ec0| 74 2c 20 22 5c 74 64 65 | 66 61 75 6c 74 3a 5c 6e |t, "\tde|fault:\n|
|00002ed0| 22 29 3b 0a 09 09 09 6f | 62 6a 65 63 74 20 3d 20 |");....o|bject = |
|00002ee0| 61 6c 6c 6f 63 28 73 74 | 72 6c 65 6e 28 64 65 66 |alloc(st|rlen(def|
|00002ef0| 2d 3e 64 65 66 5f 6e 61 | 6d 65 29 20 2b 20 73 74 |->def_na|me) + st|
|00002f00| 72 6c 65 6e 28 66 6f 72 | 6d 61 74 29 20 2b 0a 09 |rlen(for|mat) +..|
|00002f10| 09 09 09 20 20 20 20 20 | 20 20 73 74 72 6c 65 6e |... | strlen|
|00002f20| 28 64 66 6c 74 2d 3e 6e | 61 6d 65 29 20 2b 20 31 |(dflt->n|ame) + 1|
|00002f30| 29 3b 0a 09 09 09 73 5f | 70 72 69 6e 74 28 6f 62 |);....s_|print(ob|
|00002f40| 6a 65 63 74 2c 20 66 6f | 72 6d 61 74 2c 20 64 65 |ject, fo|rmat, de|
|00002f50| 66 2d 3e 64 65 66 5f 6e | 61 6d 65 2c 20 64 66 6c |f->def_n|ame, dfl|
|00002f60| 74 2d 3e 6e 61 6d 65 29 | 3b 0a 09 09 09 70 72 69 |t->name)|;....pri|
|00002f70| 6e 74 5f 69 66 73 74 61 | 74 28 32 2c 20 64 66 6c |nt_ifsta|t(2, dfl|
|00002f80| 74 2d 3e 70 72 65 66 69 | 78 2c 20 64 66 6c 74 2d |t->prefi|x, dflt-|
|00002f90| 3e 74 79 70 65 2c 20 64 | 66 6c 74 2d 3e 72 65 6c |>type, d|flt->rel|
|00002fa0| 2c 0a 09 09 09 09 20 20 | 20 20 20 64 66 6c 74 2d |,..... | dflt-|
|00002fb0| 3e 61 72 72 61 79 5f 6d | 61 78 2c 20 6f 62 6a 65 |>array_m|ax, obje|
|00002fc0| 63 74 2c 20 64 66 6c 74 | 2d 3e 6e 61 6d 65 29 3b |ct, dflt|->name);|
|00002fd0| 0a 09 09 09 66 72 65 65 | 28 6f 62 6a 65 63 74 29 |....free|(object)|
|00002fe0| 3b 0a 09 09 09 66 5f 70 | 72 69 6e 74 28 66 6f 75 |;....f_p|rint(fou|
|00002ff0| 74 2c 20 22 5c 74 5c 74 | 62 72 65 61 6b 3b 5c 6e |t, "\t\t|break;\n|
|00003000| 22 29 3b 0a 09 09 7d 0a | 09 7d 20 65 6c 73 65 20 |");...}.|.} else |
|00003010| 7b 0a 09 09 66 5f 70 72 | 69 6e 74 28 66 6f 75 74 |{...f_pr|int(fout|
|00003020| 2c 20 22 5c 74 64 65 66 | 61 75 6c 74 3a 5c 6e 22 |, "\tdef|ault:\n"|
|00003030| 29 3b 0a 09 09 66 5f 70 | 72 69 6e 74 28 66 6f 75 |);...f_p|rint(fou|
|00003040| 74 2c 20 22 5c 74 5c 74 | 72 65 74 75 72 6e 20 28 |t, "\t\t|return (|
|00003050| 46 41 4c 53 45 29 3b 5c | 6e 22 29 3b 0a 09 7d 0a |FALSE);\|n");..}.|
|00003060| 09 66 5f 70 72 69 6e 74 | 28 66 6f 75 74 2c 20 22 |.f_print|(fout, "|
|00003070| 5c 74 7d 5c 6e 22 29 3b | 0a 7d 0a 0a 0a 0a 73 74 |\t}\n");|.}....st|
|00003080| 61 74 69 63 0a 65 6d 69 | 74 5f 73 74 72 75 63 74 |atic.emi|t_struct|
|00003090| 28 64 65 66 29 0a 09 64 | 65 66 69 6e 69 74 69 6f |(def)..d|efinitio|
|000030a0| 6e 20 2a 64 65 66 3b 0a | 7b 0a 09 64 65 63 6c 5f |n *def;.|{..decl_|
|000030b0| 6c 69 73 74 20 2a 64 6c | 3b 0a 0a 09 66 6f 72 20 |list *dl|;...for |
|000030c0| 28 64 6c 20 3d 20 64 65 | 66 2d 3e 64 65 66 2e 73 |(dl = de|f->def.s|
|000030d0| 74 2e 64 65 63 6c 73 3b | 20 64 6c 20 21 3d 20 4e |t.decls;| dl != N|
|000030e0| 55 4c 4c 3b 20 64 6c 20 | 3d 20 64 6c 2d 3e 6e 65 |ULL; dl |= dl->ne|
|000030f0| 78 74 29 20 7b 0a 09 09 | 70 72 69 6e 74 5f 73 74 |xt) {...|print_st|
|00003100| 61 74 28 26 64 6c 2d 3e | 64 65 63 6c 29 3b 0a 09 |at(&dl->|decl);..|
|00003110| 7d 0a 7d 0a 0a 0a 0a 0a | 73 74 61 74 69 63 0a 65 |}.}.....|static.e|
|00003120| 6d 69 74 5f 74 79 70 65 | 64 65 66 28 64 65 66 29 |mit_type|def(def)|
|00003130| 0a 09 64 65 66 69 6e 69 | 74 69 6f 6e 20 2a 64 65 |..defini|tion *de|
|00003140| 66 3b 0a 7b 0a 09 63 68 | 61 72 20 2a 70 72 65 66 |f;.{..ch|ar *pref|
|00003150| 69 78 20 3d 20 64 65 66 | 2d 3e 64 65 66 2e 74 79 |ix = def|->def.ty|
|00003160| 2e 6f 6c 64 5f 70 72 65 | 66 69 78 3b 0a 09 63 68 |.old_pre|fix;..ch|
|00003170| 61 72 20 2a 74 79 70 65 | 20 3d 20 64 65 66 2d 3e |ar *type| = def->|
|00003180| 64 65 66 2e 74 79 2e 6f | 6c 64 5f 74 79 70 65 3b |def.ty.o|ld_type;|
|00003190| 0a 09 63 68 61 72 20 2a | 61 6d 61 78 20 3d 20 64 |..char *|amax = d|
|000031a0| 65 66 2d 3e 64 65 66 2e | 74 79 2e 61 72 72 61 79 |ef->def.|ty.array|
|000031b0| 5f 6d 61 78 3b 0a 09 72 | 65 6c 61 74 69 6f 6e 20 |_max;..r|elation |
|000031c0| 72 65 6c 20 3d 20 64 65 | 66 2d 3e 64 65 66 2e 74 |rel = de|f->def.t|
|000031d0| 79 2e 72 65 6c 3b 0a 0a | 09 70 72 69 6e 74 5f 69 |y.rel;..|.print_i|
|000031e0| 66 73 74 61 74 28 31 2c | 20 70 72 65 66 69 78 2c |fstat(1,| prefix,|
|000031f0| 20 74 79 70 65 2c 20 72 | 65 6c 2c 20 61 6d 61 78 | type, r|el, amax|
|00003200| 2c 20 22 6f 62 6a 70 22 | 2c 20 64 65 66 2d 3e 64 |, "objp"|, def->d|
|00003210| 65 66 5f 6e 61 6d 65 29 | 3b 0a 7d 0a 0a 0a 0a 0a |ef_name)|;.}.....|
|00003220| 0a 73 74 61 74 69 63 0a | 70 72 69 6e 74 5f 73 74 |.static.|print_st|
|00003230| 61 74 28 64 65 63 29 0a | 09 64 65 63 6c 61 72 61 |at(dec).|.declara|
|00003240| 74 69 6f 6e 20 2a 64 65 | 63 3b 0a 7b 0a 09 63 68 |tion *de|c;.{..ch|
|00003250| 61 72 20 2a 70 72 65 66 | 69 78 20 3d 20 64 65 63 |ar *pref|ix = dec|
|00003260| 2d 3e 70 72 65 66 69 78 | 3b 0a 09 63 68 61 72 20 |->prefix|;..char |
|00003270| 2a 74 79 70 65 20 3d 20 | 64 65 63 2d 3e 74 79 70 |*type = |dec->typ|
|00003280| 65 3b 0a 09 63 68 61 72 | 20 2a 61 6d 61 78 20 3d |e;..char| *amax =|
|00003290| 20 64 65 63 2d 3e 61 72 | 72 61 79 5f 6d 61 78 3b | dec->ar|ray_max;|
|000032a0| 0a 09 72 65 6c 61 74 69 | 6f 6e 20 72 65 6c 20 3d |..relati|on rel =|
|000032b0| 20 64 65 63 2d 3e 72 65 | 6c 3b 0a 09 63 68 61 72 | dec->re|l;..char|
|000032c0| 20 6e 61 6d 65 5b 32 35 | 36 5d 3b 0a 0a 09 69 66 | name[25|6];...if|
|000032d0| 20 28 69 73 76 65 63 74 | 6f 72 64 65 66 28 74 79 | (isvect|ordef(ty|
|000032e0| 70 65 2c 20 72 65 6c 29 | 29 20 7b 0a 09 09 73 5f |pe, rel)|) {...s_|
|000032f0| 70 72 69 6e 74 28 6e 61 | 6d 65 2c 20 22 6f 62 6a |print(na|me, "obj|
|00003300| 70 2d 3e 25 73 22 2c 20 | 64 65 63 2d 3e 6e 61 6d |p->%s", |dec->nam|
|00003310| 65 29 3b 0a 09 7d 20 65 | 6c 73 65 20 7b 0a 09 09 |e);..} e|lse {...|
|00003320| 73 5f 70 72 69 6e 74 28 | 6e 61 6d 65 2c 20 22 26 |s_print(|name, "&|
|00003330| 6f 62 6a 70 2d 3e 25 73 | 22 2c 20 64 65 63 2d 3e |objp->%s|", dec->|
|00003340| 6e 61 6d 65 29 3b 0a 09 | 7d 0a 09 70 72 69 6e 74 |name);..|}..print|
|00003350| 5f 69 66 73 74 61 74 28 | 31 2c 20 70 72 65 66 69 |_ifstat(|1, prefi|
|00003360| 78 2c 20 74 79 70 65 2c | 20 72 65 6c 2c 20 61 6d |x, type,| rel, am|
|00003370| 61 78 2c 20 6e 61 6d 65 | 2c 20 64 65 63 2d 3e 6e |ax, name|, dec->n|
|00003380| 61 6d 65 29 3b 0a 7d 0a | 46 75 6e 6b 79 5f 53 74 |ame);.}.|Funky_St|
|00003390| 75 66 66 0a 6c 65 6e 3d | 60 77 63 20 2d 63 20 3c |uff.len=|`wc -c <|
|000033a0| 20 72 70 63 5f 63 6f 75 | 74 2e 63 60 0a 69 66 20 | rpc_cou|t.c`.if |
|000033b0| 5b 20 24 6c 65 6e 20 21 | 3d 20 20 20 20 20 37 32 |[ $len !|= 72|
|000033c0| 38 34 20 5d 20 3b 20 74 | 68 65 6e 0a 20 20 65 63 |84 ] ; t|hen. ec|
|000033d0| 68 6f 20 65 72 72 6f 72 | 3a 20 72 70 63 5f 63 6f |ho error|: rpc_co|
|000033e0| 75 74 2e 63 20 77 61 73 | 20 24 6c 65 6e 20 62 79 |ut.c was| $len by|
|000033f0| 74 65 73 20 6c 6f 6e 67 | 2c 20 73 68 6f 75 6c 64 |tes long|, should|
|00003400| 20 68 61 76 65 20 62 65 | 65 6e 20 20 20 20 20 37 | have be|en 7|
|00003410| 32 38 34 0a 66 69 0a 65 | 63 68 6f 20 78 20 2d 20 |284.fi.e|cho x - |
|00003420| 72 70 63 5f 68 6f 75 74 | 2e 63 0a 63 61 74 20 3e |rpc_hout|.c.cat >|
|00003430| 20 72 70 63 5f 68 6f 75 | 74 2e 63 20 3c 3c 27 46 | rpc_hou|t.c <<'F|
|00003440| 75 6e 6b 79 5f 53 74 75 | 66 66 27 0a 2f 2a 20 40 |unky_Stu|ff'./* @|
|00003450| 28 23 29 72 70 63 5f 68 | 6f 75 74 2e 63 09 31 2e |(#)rpc_h|out.c.1.|
|00003460| 32 20 38 37 2f 31 31 2f | 33 30 20 33 2e 39 20 52 |2 87/11/|30 3.9 R|
|00003470| 50 43 53 52 43 20 2a 2f | 0a 2f 2a 0a 20 2a 20 53 |PCSRC */|./*. * S|
|00003480| 75 6e 20 52 50 43 20 69 | 73 20 61 20 70 72 6f 64 |un RPC i|s a prod|
|00003490| 75 63 74 20 6f 66 20 53 | 75 6e 20 4d 69 63 72 6f |uct of S|un Micro|
|000034a0| 73 79 73 74 65 6d 73 2c | 20 49 6e 63 2e 20 61 6e |systems,| Inc. an|
|000034b0| 64 20 69 73 20 70 72 6f | 76 69 64 65 64 20 66 6f |d is pro|vided fo|
|000034c0| 72 0a 20 2a 20 75 6e 72 | 65 73 74 72 69 63 74 65 |r. * unr|estricte|
|000034d0| 64 20 75 73 65 20 70 72 | 6f 76 69 64 65 64 20 74 |d use pr|ovided t|
|000034e0| 68 61 74 20 74 68 69 73 | 20 6c 65 67 65 6e 64 20 |hat this| legend |
|000034f0| 69 73 20 69 6e 63 6c 75 | 64 65 64 20 6f 6e 20 61 |is inclu|ded on a|
|00003500| 6c 6c 20 74 61 70 65 0a | 20 2a 20 6d 65 64 69 61 |ll tape.| * media|
|00003510| 20 61 6e 64 20 61 73 20 | 61 20 70 61 72 74 20 6f | and as |a part o|
|00003520| 66 20 74 68 65 20 73 6f | 66 74 77 61 72 65 20 70 |f the so|ftware p|
|00003530| 72 6f 67 72 61 6d 20 69 | 6e 20 77 68 6f 6c 65 20 |rogram i|n whole |
|00003540| 6f 72 20 70 61 72 74 2e | 20 20 55 73 65 72 73 0a |or part.| Users.|
|00003550| 20 2a 20 6d 61 79 20 63 | 6f 70 79 20 6f 72 20 6d | * may c|opy or m|
|00003560| 6f 64 69 66 79 20 53 75 | 6e 20 52 50 43 20 77 69 |odify Su|n RPC wi|
|00003570| 74 68 6f 75 74 20 63 68 | 61 72 67 65 2c 20 62 75 |thout ch|arge, bu|
|00003580| 74 20 61 72 65 20 6e 6f | 74 20 61 75 74 68 6f 72 |t are no|t author|
|00003590| 69 7a 65 64 0a 20 2a 20 | 74 6f 20 6c 69 63 65 6e |ized. * |to licen|
|000035a0| 73 65 20 6f 72 20 64 69 | 73 74 72 69 62 75 74 65 |se or di|stribute|
|000035b0| 20 69 74 20 74 6f 20 61 | 6e 79 6f 6e 65 20 65 6c | it to a|nyone el|
|000035c0| 73 65 20 65 78 63 65 70 | 74 20 61 73 20 70 61 72 |se excep|t as par|
|000035d0| 74 20 6f 66 20 61 20 70 | 72 6f 64 75 63 74 20 6f |t of a p|roduct o|
|000035e0| 72 0a 20 2a 20 70 72 6f | 67 72 61 6d 20 64 65 76 |r. * pro|gram dev|
|000035f0| 65 6c 6f 70 65 64 20 62 | 79 20 74 68 65 20 75 73 |eloped b|y the us|
|00003600| 65 72 2e 0a 20 2a 20 0a | 20 2a 20 53 55 4e 20 52 |er.. * .| * SUN R|
|00003610| 50 43 20 49 53 20 50 52 | 4f 56 49 44 45 44 20 41 |PC IS PR|OVIDED A|
|00003620| 53 20 49 53 20 57 49 54 | 48 20 4e 4f 20 57 41 52 |S IS WIT|H NO WAR|
|00003630| 52 41 4e 54 49 45 53 20 | 4f 46 20 41 4e 59 20 4b |RANTIES |OF ANY K|
|00003640| 49 4e 44 20 49 4e 43 4c | 55 44 49 4e 47 20 54 48 |IND INCL|UDING TH|
|00003650| 45 0a 20 2a 20 57 41 52 | 52 41 4e 54 49 45 53 20 |E. * WAR|RANTIES |
|00003660| 4f 46 20 44 45 53 49 47 | 4e 2c 20 4d 45 52 43 48 |OF DESIG|N, MERCH|
|00003670| 41 4e 54 49 42 49 4c 49 | 54 59 20 41 4e 44 20 46 |ANTIBILI|TY AND F|
|00003680| 49 54 4e 45 53 53 20 46 | 4f 52 20 41 20 50 41 52 |ITNESS F|OR A PAR|
|00003690| 54 49 43 55 4c 41 52 0a | 20 2a 20 50 55 52 50 4f |TICULAR.| * PURPO|
|000036a0| 53 45 2c 20 4f 52 20 41 | 52 49 53 49 4e 47 20 46 |SE, OR A|RISING F|
|000036b0| 52 4f 4d 20 41 20 43 4f | 55 52 53 45 20 4f 46 20 |ROM A CO|URSE OF |
|000036c0| 44 45 41 4c 49 4e 47 2c | 20 55 53 41 47 45 20 4f |DEALING,| USAGE O|
|000036d0| 52 20 54 52 41 44 45 20 | 50 52 41 43 54 49 43 45 |R TRADE |PRACTICE|
|000036e0| 2e 0a 20 2a 20 0a 20 2a | 20 53 75 6e 20 52 50 43 |.. * . *| Sun RPC|
|000036f0| 20 69 73 20 70 72 6f 76 | 69 64 65 64 20 77 69 74 | is prov|ided wit|
|00003700| 68 20 6e 6f 20 73 75 70 | 70 6f 72 74 20 61 6e 64 |h no sup|port and|
|00003710| 20 77 69 74 68 6f 75 74 | 20 61 6e 79 20 6f 62 6c | without| any obl|
|00003720| 69 67 61 74 69 6f 6e 20 | 6f 6e 20 74 68 65 0a 20 |igation |on the. |
|00003730| 2a 20 70 61 72 74 20 6f | 66 20 53 75 6e 20 4d 69 |* part o|f Sun Mi|
|00003740| 63 72 6f 73 79 73 74 65 | 6d 73 2c 20 49 6e 63 2e |crosyste|ms, Inc.|
|00003750| 20 74 6f 20 61 73 73 69 | 73 74 20 69 6e 20 69 74 | to assi|st in it|
|00003760| 73 20 75 73 65 2c 20 63 | 6f 72 72 65 63 74 69 6f |s use, c|orrectio|
|00003770| 6e 2c 0a 20 2a 20 6d 6f | 64 69 66 69 63 61 74 69 |n,. * mo|dificati|
|00003780| 6f 6e 20 6f 72 20 65 6e | 68 61 6e 63 65 6d 65 6e |on or en|hancemen|
|00003790| 74 2e 0a 20 2a 20 0a 20 | 2a 20 53 55 4e 20 4d 49 |t.. * . |* SUN MI|
|000037a0| 43 52 4f 53 59 53 54 45 | 4d 53 2c 20 49 4e 43 2e |CROSYSTE|MS, INC.|
|000037b0| 20 53 48 41 4c 4c 20 48 | 41 56 45 20 4e 4f 20 4c | SHALL H|AVE NO L|
|000037c0| 49 41 42 49 4c 49 54 59 | 20 57 49 54 48 20 52 45 |IABILITY| WITH RE|
|000037d0| 53 50 45 43 54 20 54 4f | 20 54 48 45 0a 20 2a 20 |SPECT TO| THE. * |
|000037e0| 49 4e 46 52 49 4e 47 45 | 4d 45 4e 54 20 4f 46 20 |INFRINGE|MENT OF |
|000037f0| 43 4f 50 59 52 49 47 48 | 54 53 2c 20 54 52 41 44 |COPYRIGH|TS, TRAD|
|00003800| 45 20 53 45 43 52 45 54 | 53 20 4f 52 20 41 4e 59 |E SECRET|S OR ANY|
|00003810| 20 50 41 54 45 4e 54 53 | 20 42 59 20 53 55 4e 20 | PATENTS| BY SUN |
|00003820| 52 50 43 0a 20 2a 20 4f | 52 20 41 4e 59 20 50 41 |RPC. * O|R ANY PA|
|00003830| 52 54 20 54 48 45 52 45 | 4f 46 2e 0a 20 2a 20 0a |RT THERE|OF.. * .|
|00003840| 20 2a 20 49 6e 20 6e 6f | 20 65 76 65 6e 74 20 77 | * In no| event w|
|00003850| 69 6c 6c 20 53 75 6e 20 | 4d 69 63 72 6f 73 79 73 |ill Sun |Microsys|
|00003860| 74 65 6d 73 2c 20 49 6e | 63 2e 20 62 65 20 6c 69 |tems, In|c. be li|
|00003870| 61 62 6c 65 20 66 6f 72 | 20 61 6e 79 20 6c 6f 73 |able for| any los|
|00003880| 74 20 72 65 76 65 6e 75 | 65 0a 20 2a 20 6f 72 20 |t revenu|e. * or |
|00003890| 70 72 6f 66 69 74 73 20 | 6f 72 20 6f 74 68 65 72 |profits |or other|
|000038a0| 20 73 70 65 63 69 61 6c | 2c 20 69 6e 64 69 72 65 | special|, indire|
|000038b0| 63 74 20 61 6e 64 20 63 | 6f 6e 73 65 71 75 65 6e |ct and c|onsequen|
|000038c0| 74 69 61 6c 20 64 61 6d | 61 67 65 73 2c 20 65 76 |tial dam|ages, ev|
|000038d0| 65 6e 20 69 66 0a 20 2a | 20 53 75 6e 20 68 61 73 |en if. *| Sun has|
|000038e0| 20 62 65 65 6e 20 61 64 | 76 69 73 65 64 20 6f 66 | been ad|vised of|
|000038f0| 20 74 68 65 20 70 6f 73 | 73 69 62 69 6c 69 74 79 | the pos|sibility|
|00003900| 20 6f 66 20 73 75 63 68 | 20 64 61 6d 61 67 65 73 | of such| damages|
|00003910| 2e 0a 20 2a 20 0a 20 2a | 20 53 75 6e 20 4d 69 63 |.. * . *| Sun Mic|
|00003920| 72 6f 73 79 73 74 65 6d | 73 2c 20 49 6e 63 2e 0a |rosystem|s, Inc..|
|00003930| 20 2a 20 32 35 35 30 20 | 47 61 72 63 69 61 20 41 | * 2550 |Garcia A|
|00003940| 76 65 6e 75 65 0a 20 2a | 20 4d 6f 75 6e 74 61 69 |venue. *| Mountai|
|00003950| 6e 20 56 69 65 77 2c 20 | 43 61 6c 69 66 6f 72 6e |n View, |Californ|
|00003960| 69 61 20 20 39 34 30 34 | 33 0a 20 2a 2f 0a 23 69 |ia 9404|3. */.#i|
|00003970| 66 6e 64 65 66 20 6c 69 | 6e 74 0a 73 74 61 74 69 |fndef li|nt.stati|
|00003980| 63 20 63 68 61 72 20 73 | 63 63 73 69 64 5b 5d 20 |c char s|ccsid[] |
|00003990| 3d 20 22 40 28 23 29 72 | 70 63 5f 68 6f 75 74 2e |= "@(#)r|pc_hout.|
|000039a0| 63 20 31 2e 36 20 38 37 | 2f 30 37 2f 32 38 20 28 |c 1.6 87|/07/28 (|
|000039b0| 43 29 20 31 39 38 37 20 | 53 4d 49 22 3b 0a 23 65 |C) 1987 |SMI";.#e|
|000039c0| 6e 64 69 66 0a 0a 2f 2a | 0a 20 2a 20 72 70 63 5f |ndif../*|. * rpc_|
|000039d0| 68 6f 75 74 2e 63 2c 20 | 48 65 61 64 65 72 20 66 |hout.c, |Header f|
|000039e0| 69 6c 65 20 6f 75 74 70 | 75 74 74 65 72 20 66 6f |ile outp|utter fo|
|000039f0| 72 20 74 68 65 20 52 50 | 43 20 70 72 6f 74 6f 63 |r the RP|C protoc|
|00003a00| 6f 6c 20 63 6f 6d 70 69 | 6c 65 72 20 0a 20 2a 20 |ol compi|ler . * |
|00003a10| 43 6f 70 79 72 69 67 68 | 74 20 28 43 29 20 31 39 |Copyrigh|t (C) 19|
|00003a20| 38 37 2c 20 53 75 6e 20 | 4d 69 63 72 6f 73 79 73 |87, Sun |Microsys|
|00003a30| 74 65 6d 73 2c 20 49 6e | 63 2e 20 0a 20 2a 2f 0a |tems, In|c. . */.|
|00003a40| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 64 69 6f 2e |#include| <stdio.|
|00003a50| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 3c 63 74 79 |h>.#incl|ude <cty|
|00003a60| 70 65 2e 68 3e 0a 23 69 | 6e 63 6c 75 64 65 20 22 |pe.h>.#i|nclude "|
|00003a70| 72 70 63 5f 75 74 69 6c | 2e 68 22 0a 23 69 6e 63 |rpc_util|.h".#inc|
|00003a80| 6c 75 64 65 20 22 72 70 | 63 5f 70 61 72 73 65 2e |lude "rp|c_parse.|
|00003a90| 68 22 0a 0a 0a 2f 2a 0a | 20 2a 20 50 72 69 6e 74 |h".../*.| * Print|
|00003aa0| 20 74 68 65 20 43 2d 76 | 65 72 73 69 6f 6e 20 6f | the C-v|ersion o|
|00003ab0| 66 20 61 6e 20 78 64 72 | 20 64 65 66 69 6e 69 74 |f an xdr| definit|
|00003ac0| 69 6f 6e 20 0a 20 2a 2f | 0a 76 6f 69 64 0a 70 72 |ion . */|.void.pr|
|00003ad0| 69 6e 74 5f 64 61 74 61 | 64 65 66 28 64 65 66 29 |int_data|def(def)|
|00003ae0| 0a 09 64 65 66 69 6e 69 | 74 69 6f 6e 20 2a 64 65 |..defini|tion *de|
|00003af0| 66 3b 0a 7b 0a 09 69 66 | 20 28 64 65 66 2d 3e 64 |f;.{..if| (def->d|
|00003b00| 65 66 5f 6b 69 6e 64 20 | 21 3d 20 44 45 46 5f 43 |ef_kind |!= DEF_C|
|00003b10| 4f 4e 53 54 29 20 7b 0a | 09 09 66 5f 70 72 69 6e |ONST) {.|..f_prin|
|00003b20| 74 28 66 6f 75 74 2c 20 | 22 5c 6e 22 29 3b 0a 09 |t(fout, |"\n");..|
|00003b30| 7d 0a 09 73 77 69 74 63 | 68 20 28 64 65 66 2d 3e |}..switc|h (def->|
|00003b40| 64 65 66 5f 6b 69 6e 64 | 29 20 7b 0a 09 63 61 73 |def_kind|) {..cas|
|00003b50| 65 20 44 45 46 5f 53 54 | 52 55 43 54 3a 0a 09 09 |e DEF_ST|RUCT:...|
|00003b60| 70 73 74 72 75 63 74 64 | 65 66 28 64 65 66 29 3b |pstructd|ef(def);|
|00003b70| 0a 09 09 62 72 65 61 6b | 3b 0a 09 63 61 73 65 20 |...break|;..case |
|00003b80| 44 45 46 5f 55 4e 49 4f | 4e 3a 0a 09 09 70 75 6e |DEF_UNIO|N:...pun|
|00003b90| 69 6f 6e 64 65 66 28 64 | 65 66 29 3b 0a 09 09 62 |iondef(d|ef);...b|
|00003ba0| 72 65 61 6b 3b 0a 09 63 | 61 73 65 20 44 45 46 5f |reak;..c|ase DEF_|
|00003bb0| 45 4e 55 4d 3a 0a 09 09 | 70 65 6e 75 6d 64 65 66 |ENUM:...|penumdef|
|00003bc0| 28 64 65 66 29 3b 0a 09 | 09 62 72 65 61 6b 3b 0a |(def);..|.break;.|
|00003bd0| 09 63 61 73 65 20 44 45 | 46 5f 54 59 50 45 44 45 |.case DE|F_TYPEDE|
|00003be0| 46 3a 0a 09 09 70 74 79 | 70 65 64 65 66 28 64 65 |F:...pty|pedef(de|
|00003bf0| 66 29 3b 0a 09 09 62 72 | 65 61 6b 3b 0a 09 63 61 |f);...br|eak;..ca|
|00003c00| 73 65 20 44 45 46 5f 50 | 52 4f 47 52 41 4d 3a 0a |se DEF_P|ROGRAM:.|
|00003c10| 09 09 70 70 72 6f 67 72 | 61 6d 64 65 66 28 64 65 |..pprogr|amdef(de|
|00003c20| 66 29 3b 0a 09 09 62 72 | 65 61 6b 3b 0a 09 63 61 |f);...br|eak;..ca|
|00003c30| 73 65 20 44 45 46 5f 43 | 4f 4e 53 54 3a 0a 09 09 |se DEF_C|ONST:...|
|00003c40| 70 63 6f 6e 73 74 64 65 | 66 28 64 65 66 29 3b 0a |pconstde|f(def);.|
|00003c50| 09 09 62 72 65 61 6b 3b | 0a 09 7d 0a 09 69 66 20 |..break;|..}..if |
|00003c60| 28 64 65 66 2d 3e 64 65 | 66 5f 6b 69 6e 64 20 21 |(def->de|f_kind !|
|00003c70| 3d 20 44 45 46 5f 50 52 | 4f 47 52 41 4d 20 26 26 |= DEF_PR|OGRAM &&|
|00003c80| 20 64 65 66 2d 3e 64 65 | 66 5f 6b 69 6e 64 20 21 | def->de|f_kind !|
|00003c90| 3d 20 44 45 46 5f 43 4f | 4e 53 54 29 20 7b 0a 09 |= DEF_CO|NST) {..|
|00003ca0| 09 66 5f 70 72 69 6e 74 | 28 66 6f 75 74 2c 20 22 |.f_print|(fout, "|
|00003cb0| 62 6f 6f 6c 5f 74 20 78 | 64 72 5f 25 73 28 29 3b |bool_t x|dr_%s();|
|00003cc0| 5c 6e 22 2c 20 64 65 66 | 2d 3e 64 65 66 5f 6e 61 |\n", def|->def_na|
|00003cd0| 6d 65 29 3b 0a 09 7d 0a | 09 69 66 20 28 64 65 66 |me);..}.|.if (def|
|00003ce0| 2d 3e 64 65 66 5f 6b 69 | 6e 64 20 21 3d 20 44 45 |->def_ki|nd != DE|
|00003cf0| 46 5f 43 4f 4e 53 54 29 | 20 7b 0a 09 09 66 5f 70 |F_CONST)| {...f_p|
|00003d00| 72 69 6e 74 28 66 6f 75 | 74 2c 20 22 5c 6e 22 29 |rint(fou|t, "\n")|
|00003d10| 3b 0a 09 7d 0a 7d 0a 0a | 73 74 61 74 69 63 0a 70 |;..}.}..|static.p|
|00003d20| 63 6f 6e 73 74 64 65 66 | 28 64 65 66 29 0a 09 64 |constdef|(def)..d|
|00003d30| 65 66 69 6e 69 74 69 6f | 6e 20 2a 64 65 66 3b 0a |efinitio|n *def;.|
|00003d40| 7b 0a 09 70 64 65 66 69 | 6e 65 28 64 65 66 2d 3e |{..pdefi|ne(def->|
|00003d50| 64 65 66 5f 6e 61 6d 65 | 2c 20 64 65 66 2d 3e 64 |def_name|, def->d|
|00003d60| 65 66 2e 63 6f 29 3b 0a | 7d 0a 0a 73 74 61 74 69 |ef.co);.|}..stati|
|00003d70| 63 0a 70 73 74 72 75 63 | 74 64 65 66 28 64 65 66 |c.pstruc|tdef(def|
|00003d80| 29 0a 09 64 65 66 69 6e | 69 74 69 6f 6e 20 2a 64 |)..defin|ition *d|
|00003d90| 65 66 3b 0a 7b 0a 09 64 | 65 63 6c 5f 6c 69 73 74 |ef;.{..d|ecl_list|
|00003da0| 20 2a 6c 3b 0a 09 63 68 | 61 72 20 2a 6e 61 6d 65 | *l;..ch|ar *name|
|00003db0| 20 3d 20 64 65 66 2d 3e | 64 65 66 5f 6e 61 6d 65 | = def->|def_name|
|00003dc0| 3b 0a 0a 09 66 5f 70 72 | 69 6e 74 28 66 6f 75 74 |;...f_pr|int(fout|
|00003dd0| 2c 20 22 73 74 72 75 63 | 74 20 25 73 20 7b 5c 6e |, "struc|t %s {\n|
|00003de0| 22 2c 20 6e 61 6d 65 29 | 3b 0a 09 66 6f 72 20 28 |", name)|;..for (|
|00003df0| 6c 20 3d 20 64 65 66 2d | 3e 64 65 66 2e 73 74 2e |l = def-|>def.st.|
|00003e00| 64 65 63 6c 73 3b 20 6c | 20 21 3d 20 4e 55 4c 4c |decls; l| != NULL|
|00003e10| 3b 20 6c 20 3d 20 6c 2d | 3e 6e 65 78 74 29 20 7b |; l = l-|>next) {|
|00003e20| 0a 09 09 70 64 65 63 6c | 61 72 61 74 69 6f 6e 28 |...pdecl|aration(|
|00003e30| 6e 61 6d 65 2c 20 26 6c | 2d 3e 64 65 63 6c 2c 20 |name, &l|->decl, |
|00003e40| 31 29 3b 0a 09 7d 0a 09 | 66 5f 70 72 69 6e 74 28 |1);..}..|f_print(|
|00003e50| 66 6f 75 74 2c 20 22 7d | 3b 5c 6e 22 29 3b 0a 09 |fout, "}|;\n");..|
|00003e60| 66 5f 70 72 69 6e 74 28 | 66 6f 75 74 2c 20 22 74 |f_print(|fout, "t|
|00003e70| 79 70 65 64 65 66 20 73 | 74 72 75 63 74 20 25 73 |ypedef s|truct %s|
|00003e80| 20 25 73 3b 5c 6e 22 2c | 20 6e 61 6d 65 2c 20 6e | %s;\n",| name, n|
|00003e90| 61 6d 65 29 3b 0a 7d 0a | 0a 73 74 61 74 69 63 0a |ame);.}.|.static.|
|00003ea0| 70 75 6e 69 6f 6e 64 65 | 66 28 64 65 66 29 0a 09 |punionde|f(def)..|
|00003eb0| 64 65 66 69 6e 69 74 69 | 6f 6e 20 2a 64 65 66 3b |definiti|on *def;|
|00003ec0| 0a 7b 0a 09 63 61 73 65 | 5f 6c 69 73 74 20 2a 6c |.{..case|_list *l|
|00003ed0| 3b 0a 09 63 68 61 72 20 | 2a 6e 61 6d 65 20 3d 20 |;..char |*name = |
|00003ee0| 64 65 66 2d 3e 64 65 66 | 5f 6e 61 6d 65 3b 0a 09 |def->def|_name;..|
|00003ef0| 64 65 63 6c 61 72 61 74 | 69 6f 6e 20 2a 64 65 63 |declarat|ion *dec|
|00003f00| 6c 3b 0a 0a 09 66 5f 70 | 72 69 6e 74 28 66 6f 75 |l;...f_p|rint(fou|
|00003f10| 74 2c 20 22 73 74 72 75 | 63 74 20 25 73 20 7b 5c |t, "stru|ct %s {\|
|00003f20| 6e 22 2c 20 6e 61 6d 65 | 29 3b 0a 09 64 65 63 6c |n", name|);..decl|
|00003f30| 20 3d 20 26 64 65 66 2d | 3e 64 65 66 2e 75 6e 2e | = &def-|>def.un.|
|00003f40| 65 6e 75 6d 5f 64 65 63 | 6c 3b 0a 09 69 66 20 28 |enum_dec|l;..if (|
|00003f50| 73 74 72 65 71 28 64 65 | 63 6c 2d 3e 74 79 70 65 |streq(de|cl->type|
|00003f60| 2c 20 22 62 6f 6f 6c 22 | 29 29 20 7b 0a 09 09 66 |, "bool"|)) {...f|
|00003f70| 5f 70 72 69 6e 74 28 66 | 6f 75 74 2c 20 22 5c 74 |_print(f|out, "\t|
|00003f80| 62 6f 6f 6c 5f 74 20 25 | 73 3b 5c 6e 22 2c 20 64 |bool_t %|s;\n", d|
|00003f90| 65 63 6c 2d 3e 6e 61 6d | 65 29 3b 0a 09 7d 20 65 |ecl->nam|e);..} e|
|00003fa0| 6c 73 65 20 7b 0a 09 09 | 66 5f 70 72 69 6e 74 28 |lse {...|f_print(|
|00003fb0| 66 6f 75 74 2c 20 22 5c | 74 25 73 20 25 73 3b 5c |fout, "\|t%s %s;\|
|00003fc0| 6e 22 2c 20 64 65 63 6c | 2d 3e 74 79 70 65 2c 20 |n", decl|->type, |
|00003fd0| 64 65 63 6c 2d 3e 6e 61 | 6d 65 29 3b 0a 09 7d 0a |decl->na|me);..}.|
|00003fe0| 09 66 5f 70 72 69 6e 74 | 28 66 6f 75 74 2c 20 22 |.f_print|(fout, "|
|00003ff0| 5c 74 75 6e 69 6f 6e 20 | 7b 5c 6e 22 29 3b 0a 09 |\tunion |{\n");..|
|00004000| 66 6f 72 20 28 6c 20 3d | 20 64 65 66 2d 3e 64 65 |for (l =| def->de|
|00004010| 66 2e 75 6e 2e 63 61 73 | 65 73 3b 20 6c 20 21 3d |f.un.cas|es; l !=|
|00004020| 20 4e 55 4c 4c 3b 20 6c | 20 3d 20 6c 2d 3e 6e 65 | NULL; l| = l->ne|
|00004030| 78 74 29 20 7b 0a 09 09 | 70 64 65 63 6c 61 72 61 |xt) {...|pdeclara|
|00004040| 74 69 6f 6e 28 6e 61 6d | 65 2c 20 26 6c 2d 3e 63 |tion(nam|e, &l->c|
|00004050| 61 73 65 5f 64 65 63 6c | 2c 20 32 29 3b 0a 09 7d |ase_decl|, 2);..}|
|00004060| 0a 09 64 65 63 6c 20 3d | 20 64 65 66 2d 3e 64 65 |..decl =| def->de|
|00004070| 66 2e 75 6e 2e 64 65 66 | 61 75 6c 74 5f 64 65 63 |f.un.def|ault_dec|
|00004080| 6c 3b 0a 09 69 66 20 28 | 64 65 63 6c 20 26 26 20 |l;..if (|decl && |
|00004090| 21 73 74 72 65 71 28 64 | 65 63 6c 2d 3e 74 79 70 |!streq(d|ecl->typ|
|000040a0| 65 2c 20 22 76 6f 69 64 | 22 29 29 20 7b 0a 09 09 |e, "void|")) {...|
|000040b0| 70 64 65 63 6c 61 72 61 | 74 69 6f 6e 28 6e 61 6d |pdeclara|tion(nam|
|000040c0| 65 2c 20 64 65 63 6c 2c | 20 32 29 3b 0a 09 7d 0a |e, decl,| 2);..}.|
|000040d0| 09 66 5f 70 72 69 6e 74 | 28 66 6f 75 74 2c 20 22 |.f_print|(fout, "|
|000040e0| 5c 74 7d 20 25 73 5f 75 | 3b 5c 6e 22 2c 20 6e 61 |\t} %s_u|;\n", na|
|000040f0| 6d 65 29 3b 0a 09 66 5f | 70 72 69 6e 74 28 66 6f |me);..f_|print(fo|
|00004100| 75 74 2c 20 22 7d 3b 5c | 6e 22 29 3b 0a 09 66 5f |ut, "};\|n");..f_|
|00004110| 70 72 69 6e 74 28 66 6f | 75 74 2c 20 22 74 79 70 |print(fo|ut, "typ|
|00004120| 65 64 65 66 20 73 74 72 | 75 63 74 20 25 73 20 25 |edef str|uct %s %|
|00004130| 73 3b 5c 6e 22 2c 20 6e | 61 6d 65 2c 20 6e 61 6d |s;\n", n|ame, nam|
|00004140| 65 29 3b 0a 7d 0a 0a 0a | 0a 73 74 61 74 69 63 0a |e);.}...|.static.|
|00004150| 70 64 65 66 69 6e 65 28 | 6e 61 6d 65 2c 20 6e 75 |pdefine(|name, nu|
|00004160| 6d 29 0a 09 63 68 61 72 | 20 2a 6e 61 6d 65 3b 0a |m)..char| *name;.|
|00004170| 09 63 68 61 72 20 2a 6e | 75 6d 3b 0a 7b 0a 09 66 |.char *n|um;.{..f|
|00004180| 5f 70 72 69 6e 74 28 66 | 6f 75 74 2c 20 22 23 64 |_print(f|out, "#d|
|00004190| 65 66 69 6e 65 20 25 73 | 20 25 73 5c 6e 22 2c 20 |efine %s| %s\n", |
|000041a0| 6e 61 6d 65 2c 20 6e 75 | 6d 29 3b 0a 7d 0a 0a 73 |name, nu|m);.}..s|
|000041b0| 74 61 74 69 63 0a 70 75 | 6c 64 65 66 69 6e 65 28 |tatic.pu|ldefine(|
|000041c0| 6e 61 6d 65 2c 20 6e 75 | 6d 29 0a 09 63 68 61 72 |name, nu|m)..char|
|000041d0| 20 2a 6e 61 6d 65 3b 0a | 09 63 68 61 72 20 2a 6e | *name;.|.char *n|
|000041e0| 75 6d 3b 0a 7b 0a 09 66 | 5f 70 72 69 6e 74 28 66 |um;.{..f|_print(f|
|000041f0| 6f 75 74 2c 20 22 23 64 | 65 66 69 6e 65 20 25 73 |out, "#d|efine %s|
|00004200| 20 28 28 75 5f 6c 6f 6e | 67 29 25 73 29 5c 6e 22 | ((u_lon|g)%s)\n"|
|00004210| 2c 20 6e 61 6d 65 2c 20 | 6e 75 6d 29 3b 0a 7d 0a |, name, |num);.}.|
|00004220| 0a 73 74 61 74 69 63 0a | 64 65 66 69 6e 65 5f 70 |.static.|define_p|
|00004230| 72 69 6e 74 65 64 28 73 | 74 6f 70 2c 20 73 74 61 |rinted(s|top, sta|
|00004240| 72 74 29 0a 09 70 72 6f | 63 5f 6c 69 73 74 20 2a |rt)..pro|c_list *|
|00004250| 73 74 6f 70 3b 0a 09 76 | 65 72 73 69 6f 6e 5f 6c |stop;..v|ersion_l|
|00004260| 69 73 74 20 2a 73 74 61 | 72 74 3b 0a 7b 0a 09 76 |ist *sta|rt;.{..v|
|00004270| 65 72 73 69 6f 6e 5f 6c | 69 73 74 20 2a 76 65 72 |ersion_l|ist *ver|
|00004280| 73 3b 0a 09 70 72 6f 63 | 5f 6c 69 73 74 20 2a 70 |s;..proc|_list *p|
|00004290| 72 6f 63 3b 0a 0a 09 66 | 6f 72 20 28 76 65 72 73 |roc;...f|or (vers|
|000042a0| 20 3d 20 73 74 61 72 74 | 3b 20 76 65 72 73 20 21 | = start|; vers !|
|000042b0| 3d 20 4e 55 4c 4c 3b 20 | 76 65 72 73 20 3d 20 76 |= NULL; |vers = v|
|000042c0| 65 72 73 2d 3e 6e 65 78 | 74 29 20 7b 0a 09 09 66 |ers->nex|t) {...f|
|000042d0| 6f 72 20 28 70 72 6f 63 | 20 3d 20 76 65 72 73 2d |or (proc| = vers-|
|000042e0| 3e 70 72 6f 63 73 3b 20 | 70 72 6f 63 20 21 3d 20 |>procs; |proc != |
|000042f0| 4e 55 4c 4c 3b 20 70 72 | 6f 63 20 3d 20 70 72 6f |NULL; pr|oc = pro|
|00004300| 63 2d 3e 6e 65 78 74 29 | 20 7b 0a 09 09 09 69 66 |c->next)| {....if|
|00004310| 20 28 70 72 6f 63 20 3d | 3d 20 73 74 6f 70 29 20 | (proc =|= stop) |
|00004320| 7b 0a 09 09 09 09 72 65 | 74 75 72 6e 20 28 30 29 |{.....re|turn (0)|
|00004330| 3b 0a 09 09 09 7d 20 65 | 6c 73 65 20 69 66 20 28 |;....} e|lse if (|
|00004340| 73 74 72 65 71 28 70 72 | 6f 63 2d 3e 70 72 6f 63 |streq(pr|oc->proc|
|00004350| 5f 6e 61 6d 65 2c 20 73 | 74 6f 70 2d 3e 70 72 6f |_name, s|top->pro|
|00004360| 63 5f 6e 61 6d 65 29 29 | 20 7b 0a 09 09 09 09 72 |c_name))| {.....r|
|00004370| 65 74 75 72 6e 20 28 31 | 29 3b 0a 09 09 09 7d 0a |eturn (1|);....}.|
|00004380| 09 09 7d 0a 09 7d 0a 09 | 61 62 6f 72 74 28 29 3b |..}..}..|abort();|
|00004390| 0a 09 2f 2a 20 4e 4f 54 | 52 45 41 43 48 45 44 20 |../* NOT|REACHED |
|000043a0| 2a 2f 0a 7d 0a 0a 0a 73 | 74 61 74 69 63 0a 70 70 |*/.}...s|tatic.pp|
|000043b0| 72 6f 67 72 61 6d 64 65 | 66 28 64 65 66 29 0a 09 |rogramde|f(def)..|
|000043c0| 64 65 66 69 6e 69 74 69 | 6f 6e 20 2a 64 65 66 3b |definiti|on *def;|
|000043d0| 0a 7b 0a 09 76 65 72 73 | 69 6f 6e 5f 6c 69 73 74 |.{..vers|ion_list|
|000043e0| 20 2a 76 65 72 73 3b 0a | 09 70 72 6f 63 5f 6c 69 | *vers;.|.proc_li|
|000043f0| 73 74 20 2a 70 72 6f 63 | 3b 0a 0a 09 70 75 6c 64 |st *proc|;...puld|
|00004400| 65 66 69 6e 65 28 64 65 | 66 2d 3e 64 65 66 5f 6e |efine(de|f->def_n|
|00004410| 61 6d 65 2c 20 64 65 66 | 2d 3e 64 65 66 2e 70 72 |ame, def|->def.pr|
|00004420| 2e 70 72 6f 67 5f 6e 75 | 6d 29 3b 0a 09 66 6f 72 |.prog_nu|m);..for|
|00004430| 20 28 76 65 72 73 20 3d | 20 64 65 66 2d 3e 64 65 | (vers =| def->de|
|00004440| 66 2e 70 72 2e 76 65 72 | 73 69 6f 6e 73 3b 20 76 |f.pr.ver|sions; v|
|00004450| 65 72 73 20 21 3d 20 4e | 55 4c 4c 3b 20 76 65 72 |ers != N|ULL; ver|
|00004460| 73 20 3d 20 76 65 72 73 | 2d 3e 6e 65 78 74 29 20 |s = vers|->next) |
|00004470| 7b 0a 09 09 70 75 6c 64 | 65 66 69 6e 65 28 76 65 |{...puld|efine(ve|
|00004480| 72 73 2d 3e 76 65 72 73 | 5f 6e 61 6d 65 2c 20 76 |rs->vers|_name, v|
|00004490| 65 72 73 2d 3e 76 65 72 | 73 5f 6e 75 6d 29 3b 0a |ers->ver|s_num);.|
|000044a0| 09 09 66 6f 72 20 28 70 | 72 6f 63 20 3d 20 76 65 |..for (p|roc = ve|
|000044b0| 72 73 2d 3e 70 72 6f 63 | 73 3b 20 70 72 6f 63 20 |rs->proc|s; proc |
|000044c0| 21 3d 20 4e 55 4c 4c 3b | 20 70 72 6f 63 20 3d 20 |!= NULL;| proc = |
|000044d0| 70 72 6f 63 2d 3e 6e 65 | 78 74 29 20 7b 0a 09 09 |proc->ne|xt) {...|
|000044e0| 09 69 66 20 28 21 64 65 | 66 69 6e 65 5f 70 72 69 |.if (!de|fine_pri|
|000044f0| 6e 74 65 64 28 70 72 6f | 63 2c 20 64 65 66 2d 3e |nted(pro|c, def->|
|00004500| 64 65 66 2e 70 72 2e 76 | 65 72 73 69 6f 6e 73 29 |def.pr.v|ersions)|
|00004510| 29 20 7b 0a 09 09 09 09 | 70 75 6c 64 65 66 69 6e |) {.....|puldefin|
|00004520| 65 28 70 72 6f 63 2d 3e | 70 72 6f 63 5f 6e 61 6d |e(proc->|proc_nam|
|00004530| 65 2c 20 70 72 6f 63 2d | 3e 70 72 6f 63 5f 6e 75 |e, proc-|>proc_nu|
|00004540| 6d 29 3b 0a 09 09 09 7d | 0a 09 09 09 70 70 72 6f |m);....}|....ppro|
|00004550| 63 64 65 66 28 70 72 6f | 63 2c 20 76 65 72 73 29 |cdef(pro|c, vers)|
|00004560| 3b 0a 09 09 7d 0a 09 7d | 0a 7d 0a 0a 0a 70 70 72 |;...}..}|.}...ppr|
|00004570| 6f 63 64 65 66 28 70 72 | 6f 63 2c 20 76 70 29 0a |ocdef(pr|oc, vp).|
|00004580| 09 70 72 6f 63 5f 6c 69 | 73 74 20 2a 70 72 6f 63 |.proc_li|st *proc|
|00004590| 3b 0a 09 76 65 72 73 69 | 6f 6e 5f 6c 69 73 74 20 |;..versi|on_list |
|000045a0| 2a 76 70 3b 0a 7b 0a 09 | 66 5f 70 72 69 6e 74 28 |*vp;.{..|f_print(|
|000045b0| 66 6f 75 74 2c 20 22 65 | 78 74 65 72 6e 20 22 29 |fout, "e|xtern ")|
|000045c0| 3b 0a 09 69 66 20 28 70 | 72 6f 63 2d 3e 72 65 73 |;..if (p|roc->res|
|000045d0| 5f 70 72 65 66 69 78 29 | 20 7b 0a 09 09 69 66 20 |_prefix)| {...if |
|000045e0| 28 73 74 72 65 71 28 70 | 72 6f 63 2d 3e 72 65 73 |(streq(p|roc->res|
|000045f0| 5f 70 72 65 66 69 78 2c | 20 22 65 6e 75 6d 22 29 |_prefix,| "enum")|
|00004600| 29 20 7b 0a 09 09 09 66 | 5f 70 72 69 6e 74 28 66 |) {....f|_print(f|
|00004610| 6f 75 74 2c 20 22 65 6e | 75 6d 20 22 29 3b 0a 09 |out, "en|um ");..|
|00004620| 09 7d 20 65 6c 73 65 20 | 7b 0a 09 09 09 66 5f 70 |.} else |{....f_p|
|00004630| 72 69 6e 74 28 66 6f 75 | 74 2c 20 22 73 74 72 75 |rint(fou|t, "stru|
|00004640| 63 74 20 22 29 3b 0a 09 | 09 7d 0a 09 7d 0a 09 69 |ct ");..|.}..}..i|
|00004650| 66 20 28 73 74 72 65 71 | 28 70 72 6f 63 2d 3e 72 |f (streq|(proc->r|
|00004660| 65 73 5f 74 79 70 65 2c | 20 22 62 6f 6f 6c 22 29 |es_type,| "bool")|
|00004670| 29 20 7b 0a 09 09 66 5f | 70 72 69 6e 74 28 66 6f |) {...f_|print(fo|
|00004680| 75 74 2c 20 22 62 6f 6f | 6c 5f 74 20 2a 22 29 3b |ut, "boo|l_t *");|
|00004690| 0a 09 7d 20 65 6c 73 65 | 20 69 66 20 28 73 74 72 |..} else| if (str|
|000046a0| 65 71 28 70 72 6f 63 2d | 3e 72 65 73 5f 74 79 70 |eq(proc-|>res_typ|
|000046b0| 65 2c 20 22 73 74 72 69 | 6e 67 22 29 29 20 7b 0a |e, "stri|ng")) {.|
|000046c0| 09 09 66 5f 70 72 69 6e | 74 28 66 6f 75 74 2c 20 |..f_prin|t(fout, |
|000046d0| 22 63 68 61 72 20 2a 2a | 22 29 3b 0a 09 7d 20 65 |"char **|");..} e|
|000046e0| 6c 73 65 20 7b 0a 09 09 | 66 5f 70 72 69 6e 74 28 |lse {...|f_print(|
|000046f0| 66 6f 75 74 2c 20 22 25 | 73 20 2a 22 2c 20 66 69 |fout, "%|s *", fi|
|00004700| 78 74 79 70 65 28 70 72 | 6f 63 2d 3e 72 65 73 5f |xtype(pr|oc->res_|
|00004710| 74 79 70 65 29 29 3b 0a | 09 7d 0a 09 70 76 6e 61 |type));.|.}..pvna|
|00004720| 6d 65 28 70 72 6f 63 2d | 3e 70 72 6f 63 5f 6e 61 |me(proc-|>proc_na|
|00004730| 6d 65 2c 20 76 70 2d 3e | 76 65 72 73 5f 6e 75 6d |me, vp->|vers_num|
|00004740| 29 3b 0a 09 66 5f 70 72 | 69 6e 74 28 66 6f 75 74 |);..f_pr|int(fout|
|00004750| 2c 20 22 28 29 3b 5c 6e | 22 29 3b 0a 7d 0a 0a 73 |, "();\n|");.}..s|
|00004760| 74 61 74 69 63 0a 70 65 | 6e 75 6d 64 65 66 28 64 |tatic.pe|numdef(d|
|00004770| 65 66 29 0a 09 64 65 66 | 69 6e 69 74 69 6f 6e 20 |ef)..def|inition |
|00004780| 2a 64 65 66 3b 0a 7b 0a | 09 63 68 61 72 20 2a 6e |*def;.{.|.char *n|
|00004790| 61 6d 65 20 3d 20 64 65 | 66 2d 3e 64 65 66 5f 6e |ame = de|f->def_n|
|000047a0| 61 6d 65 3b 0a 09 65 6e | 75 6d 76 61 6c 5f 6c 69 |ame;..en|umval_li|
|000047b0| 73 74 20 2a 6c 3b 0a 09 | 63 68 61 72 20 2a 6c 61 |st *l;..|char *la|
|000047c0| 73 74 20 3d 20 4e 55 4c | 4c 3b 0a 09 69 6e 74 20 |st = NUL|L;..int |
|000047d0| 63 6f 75 6e 74 20 3d 20 | 30 3b 0a 0a 09 66 5f 70 |count = |0;...f_p|
|000047e0| 72 69 6e 74 28 66 6f 75 | 74 2c 20 22 65 6e 75 6d |rint(fou|t, "enum|
|000047f0| 20 25 73 20 7b 5c 6e 22 | 2c 20 6e 61 6d 65 29 3b | %s {\n"|, name);|
|00004800| 0a 09 66 6f 72 20 28 6c | 20 3d 20 64 65 66 2d 3e |..for (l| = def->|
|00004810| 64 65 66 2e 65 6e 2e 76 | 61 6c 73 3b 20 6c 20 21 |def.en.v|als; l !|
|00004820| 3d 20 4e 55 4c 4c 3b 20 | 6c 20 3d 20 6c 2d 3e 6e |= NULL; |l = l->n|
|00004830| 65 78 74 29 20 7b 0a 09 | 09 66 5f 70 72 69 6e 74 |ext) {..|.f_print|
|00004840| 28 66 6f 75 74 2c 20 22 | 5c 74 25 73 22 2c 20 6c |(fout, "|\t%s", l|
|00004850| 2d 3e 6e 61 6d 65 29 3b | 0a 09 09 69 66 20 28 6c |->name);|...if (l|
|00004860| 2d 3e 61 73 73 69 67 6e | 6d 65 6e 74 29 20 7b 0a |->assign|ment) {.|
|00004870| 09 09 09 66 5f 70 72 69 | 6e 74 28 66 6f 75 74 2c |...f_pri|nt(fout,|
|00004880| 20 22 20 3d 20 25 73 22 | 2c 20 6c 2d 3e 61 73 73 | " = %s"|, l->ass|
|00004890| 69 67 6e 6d 65 6e 74 29 | 3b 0a 09 09 09 6c 61 73 |ignment)|;....las|
|000048a0| 74 20 3d 20 6c 2d 3e 61 | 73 73 69 67 6e 6d 65 6e |t = l->a|ssignmen|
|000048b0| 74 3b 0a 09 09 09 63 6f | 75 6e 74 20 3d 20 31 3b |t;....co|unt = 1;|
|000048c0| 0a 09 09 7d 20 65 6c 73 | 65 20 7b 0a 09 09 09 69 |...} els|e {....i|
|000048d0| 66 20 28 6c 61 73 74 20 | 3d 3d 20 4e 55 4c 4c 29 |f (last |== NULL)|
|000048e0| 20 7b 0a 09 09 09 09 66 | 5f 70 72 69 6e 74 28 66 | {.....f|_print(f|
|000048f0| 6f 75 74 2c 20 22 20 3d | 20 25 64 22 2c 20 63 6f |out, " =| %d", co|
|00004900| 75 6e 74 2b 2b 29 3b 0a | 09 09 09 7d 20 65 6c 73 |unt++);.|...} els|
|00004910| 65 20 7b 0a 09 09 09 09 | 66 5f 70 72 69 6e 74 28 |e {.....|f_print(|
|00004920| 66 6f 75 74 2c 20 22 20 | 3d 20 25 73 20 2b 20 25 |fout, " |= %s + %|
|00004930| 64 22 2c 20 6c 61 73 74 | 2c 20 63 6f 75 6e 74 2b |d", last|, count+|
|00004940| 2b 29 3b 0a 09 09 09 7d | 0a 09 09 7d 0a 09 09 66 |+);....}|...}...f|
|00004950| 5f 70 72 69 6e 74 28 66 | 6f 75 74 2c 20 22 2c 5c |_print(f|out, ",\|
|00004960| 6e 22 29 3b 0a 09 7d 0a | 09 66 5f 70 72 69 6e 74 |n");..}.|.f_print|
|00004970| 28 66 6f 75 74 2c 20 22 | 7d 3b 5c 6e 22 29 3b 0a |(fout, "|};\n");.|
|00004980| 09 66 5f 70 72 69 6e 74 | 28 66 6f 75 74 2c 20 22 |.f_print|(fout, "|
|00004990| 74 79 70 65 64 65 66 20 | 65 6e 75 6d 20 25 73 20 |typedef |enum %s |
|000049a0| 25 73 3b 5c 6e 22 2c 20 | 6e 61 6d 65 2c 20 6e 61 |%s;\n", |name, na|
|000049b0| 6d 65 29 3b 0a 7d 0a 0a | 73 74 61 74 69 63 0a 70 |me);.}..|static.p|
|000049c0| 74 79 70 65 64 65 66 28 | 64 65 66 29 0a 09 64 65 |typedef(|def)..de|
|000049d0| 66 69 6e 69 74 69 6f 6e | 20 2a 64 65 66 3b 0a 7b |finition| *def;.{|
|000049e0| 0a 09 63 68 61 72 20 2a | 6e 61 6d 65 20 3d 20 64 |..char *|name = d|
|000049f0| 65 66 2d 3e 64 65 66 5f | 6e 61 6d 65 3b 0a 09 63 |ef->def_|name;..c|
|00004a00| 68 61 72 20 2a 6f 6c 64 | 20 3d 20 64 65 66 2d 3e |har *old| = def->|
|00004a10| 64 65 66 2e 74 79 2e 6f | 6c 64 5f 74 79 70 65 3b |def.ty.o|ld_type;|
|00004a20| 0a 09 63 68 61 72 20 70 | 72 65 66 69 78 5b 38 5d |..char p|refix[8]|
|00004a30| 3b 09 2f 2a 20 65 6e 6f | 75 67 68 20 74 6f 20 63 |;./* eno|ugh to c|
|00004a40| 6f 6e 74 61 69 6e 20 22 | 73 74 72 75 63 74 20 22 |ontain "|struct "|
|00004a50| 2c 20 69 6e 63 6c 75 64 | 69 6e 67 20 4e 55 4c 20 |, includ|ing NUL |
|00004a60| 2a 2f 0a 09 72 65 6c 61 | 74 69 6f 6e 20 72 65 6c |*/..rela|tion rel|
|00004a70| 20 3d 20 64 65 66 2d 3e | 64 65 66 2e 74 79 2e 72 | = def->|def.ty.r|
|00004a80| 65 6c 3b 0a 0a 0a 09 69 | 66 20 28 21 73 74 72 65 |el;....i|f (!stre|
|00004a90| 71 28 6e 61 6d 65 2c 20 | 6f 6c 64 29 29 20 7b 0a |q(name, |old)) {.|
|00004aa0| 09 09 69 66 20 28 73 74 | 72 65 71 28 6f 6c 64 2c |..if (st|req(old,|
|00004ab0| 20 22 73 74 72 69 6e 67 | 22 29 29 20 7b 0a 09 09 | "string|")) {...|
|00004ac0| 09 6f 6c 64 20 3d 20 22 | 63 68 61 72 22 3b 0a 09 |.old = "|char";..|
|00004ad0| 09 09 72 65 6c 20 3d 20 | 52 45 4c 5f 50 4f 49 4e |..rel = |REL_POIN|
|00004ae0| 54 45 52 3b 0a 09 09 7d | 20 65 6c 73 65 20 69 66 |TER;...}| else if|
|00004af0| 20 28 73 74 72 65 71 28 | 6f 6c 64 2c 20 22 6f 70 | (streq(|old, "op|
|00004b00| 61 71 75 65 22 29 29 20 | 7b 0a 09 09 09 6f 6c 64 |aque")) |{....old|
|00004b10| 20 3d 20 22 63 68 61 72 | 22 3b 0a 09 09 7d 20 65 | = "char|";...} e|
|00004b20| 6c 73 65 20 69 66 20 28 | 73 74 72 65 71 28 6f 6c |lse if (|streq(ol|
|00004b30| 64 2c 20 22 62 6f 6f 6c | 22 29 29 20 7b 0a 09 09 |d, "bool|")) {...|
|00004b40| 09 6f 6c 64 20 3d 20 22 | 62 6f 6f 6c 5f 74 22 3b |.old = "|bool_t";|
|00004b50| 0a 09 09 7d 0a 09 09 69 | 66 20 28 75 6e 64 65 66 |...}...i|f (undef|
|00004b60| 69 6e 65 64 32 28 6f 6c | 64 2c 20 6e 61 6d 65 29 |ined2(ol|d, name)|
|00004b70| 20 26 26 20 64 65 66 2d | 3e 64 65 66 2e 74 79 2e | && def-|>def.ty.|
|00004b80| 6f 6c 64 5f 70 72 65 66 | 69 78 29 20 7b 0a 09 09 |old_pref|ix) {...|
|00004b90| 09 73 5f 70 72 69 6e 74 | 28 70 72 65 66 69 78 2c |.s_print|(prefix,|
|00004ba0| 20 22 25 73 20 22 2c 20 | 64 65 66 2d 3e 64 65 66 | "%s ", |def->def|
|00004bb0| 2e 74 79 2e 6f 6c 64 5f | 70 72 65 66 69 78 29 3b |.ty.old_|prefix);|
|00004bc0| 0a 09 09 7d 20 65 6c 73 | 65 20 7b 0a 09 09 09 70 |...} els|e {....p|
|00004bd0| 72 65 66 69 78 5b 30 5d | 20 3d 20 30 3b 0a 09 09 |refix[0]| = 0;...|
|00004be0| 7d 0a 09 09 66 5f 70 72 | 69 6e 74 28 66 6f 75 74 |}...f_pr|int(fout|
|00004bf0| 2c 20 22 74 79 70 65 64 | 65 66 20 22 29 3b 0a 09 |, "typed|ef ");..|
|00004c00| 09 73 77 69 74 63 68 20 | 28 72 65 6c 29 20 7b 0a |.switch |(rel) {.|
|00004c10| 09 09 63 61 73 65 20 52 | 45 4c 5f 41 52 52 41 59 |..case R|EL_ARRAY|
|00004c20| 3a 0a 09 09 09 66 5f 70 | 72 69 6e 74 28 66 6f 75 |:....f_p|rint(fou|
|00004c30| 74 2c 20 22 73 74 72 75 | 63 74 20 7b 5c 6e 22 29 |t, "stru|ct {\n")|
|00004c40| 3b 0a 09 09 09 66 5f 70 | 72 69 6e 74 28 66 6f 75 |;....f_p|rint(fou|
|00004c50| 74 2c 20 22 5c 74 75 5f | 69 6e 74 20 25 73 5f 6c |t, "\tu_|int %s_l|
|00004c60| 65 6e 3b 5c 6e 22 2c 20 | 6e 61 6d 65 29 3b 0a 09 |en;\n", |name);..|
|00004c70| 09 09 66 5f 70 72 69 6e | 74 28 66 6f 75 74 2c 20 |..f_prin|t(fout, |
|00004c80| 22 5c 74 25 73 25 73 20 | 2a 25 73 5f 76 61 6c 3b |"\t%s%s |*%s_val;|
|00004c90| 5c 6e 22 2c 20 70 72 65 | 66 69 78 2c 20 6f 6c 64 |\n", pre|fix, old|
|00004ca0| 2c 20 6e 61 6d 65 29 3b | 0a 09 09 09 66 5f 70 72 |, name);|....f_pr|
|00004cb0| 69 6e 74 28 66 6f 75 74 | 2c 20 22 7d 20 25 73 22 |int(fout|, "} %s"|
|00004cc0| 2c 20 6e 61 6d 65 29 3b | 0a 09 09 09 62 72 65 61 |, name);|....brea|
|00004cd0| 6b 3b 0a 09 09 63 61 73 | 65 20 52 45 4c 5f 50 4f |k;...cas|e REL_PO|
|00004ce0| 49 4e 54 45 52 3a 0a 09 | 09 09 66 5f 70 72 69 6e |INTER:..|..f_prin|
|00004cf0| 74 28 66 6f 75 74 2c 20 | 22 25 73 25 73 20 2a 25 |t(fout, |"%s%s *%|
|00004d00| 73 22 2c 20 70 72 65 66 | 69 78 2c 20 6f 6c 64 2c |s", pref|ix, old,|
|00004d10| 20 6e 61 6d 65 29 3b 0a | 09 09 09 62 72 65 61 6b | name);.|...break|
|00004d20| 3b 0a 09 09 63 61 73 65 | 20 52 45 4c 5f 56 45 43 |;...case| REL_VEC|
|00004d30| 54 4f 52 3a 0a 09 09 09 | 66 5f 70 72 69 6e 74 28 |TOR:....|f_print(|
|00004d40| 66 6f 75 74 2c 20 22 25 | 73 25 73 20 25 73 5b 25 |fout, "%|s%s %s[%|
|00004d50| 73 5d 22 2c 20 70 72 65 | 66 69 78 2c 20 6f 6c 64 |s]", pre|fix, old|
|00004d60| 2c 20 6e 61 6d 65 2c 0a | 09 09 09 09 64 65 66 2d |, name,.|....def-|
|00004d70| 3e 64 65 66 2e 74 79 2e | 61 72 72 61 79 5f 6d 61 |>def.ty.|array_ma|
|00004d80| 78 29 3b 0a 09 09 09 62 | 72 65 61 6b 3b 0a 09 09 |x);....b|reak;...|
|00004d90| 63 61 73 65 20 52 45 4c | 5f 41 4c 49 41 53 3a 0a |case REL|_ALIAS:.|
|00004da0| 09 09 09 66 5f 70 72 69 | 6e 74 28 66 6f 75 74 2c |...f_pri|nt(fout,|
|00004db0| 20 22 25 73 25 73 20 2a | 25 73 22 2c 20 70 72 65 | "%s%s *|%s", pre|
|00004dc0| 66 69 78 2c 20 6f 6c 64 | 2c 20 6e 61 6d 65 29 3b |fix, old|, name);|
|00004dd0| 0a 09 09 09 62 72 65 61 | 6b 3b 0a 09 09 7d 0a 09 |....brea|k;...}..|
|00004de0| 09 66 5f 70 72 69 6e 74 | 28 66 6f 75 74 2c 20 22 |.f_print|(fout, "|
|00004df0| 3b 5c 6e 22 29 3b 0a 09 | 7d 0a 7d 0a 0a 0a 73 74 |;\n");..|}.}...st|
|00004e00| 61 74 69 63 0a 70 64 65 | 63 6c 61 72 61 74 69 6f |atic.pde|claratio|
|00004e10| 6e 28 6e 61 6d 65 2c 20 | 64 65 63 2c 20 74 61 62 |n(name, |dec, tab|
|00004e20| 29 0a 09 63 68 61 72 20 | 2a 6e 61 6d 65 3b 0a 09 |)..char |*name;..|
|00004e30| 64 65 63 6c 61 72 61 74 | 69 6f 6e 20 2a 64 65 63 |declarat|ion *dec|
|00004e40| 3b 0a 09 69 6e 74 20 74 | 61 62 3b 0a 7b 0a 09 63 |;..int t|ab;.{..c|
|00004e50| 68 61 72 20 62 75 66 5b | 38 5d 3b 09 2f 2a 20 65 |har buf[|8];./* e|
|00004e60| 6e 6f 75 67 68 20 74 6f | 20 68 6f 6c 64 20 22 73 |nough to| hold "s|
|00004e70| 74 72 75 63 74 20 22 2c | 20 69 6e 63 6c 75 64 65 |truct ",| include|
|00004e80| 20 4e 55 4c 20 2a 2f 0a | 09 63 68 61 72 20 2a 70 | NUL */.|.char *p|
|00004e90| 72 65 66 69 78 3b 0a 09 | 63 68 61 72 20 2a 74 79 |refix;..|char *ty|
|00004ea0| 70 65 3b 0a 0a 09 69 66 | 20 28 73 74 72 65 71 28 |pe;...if| (streq(|
|00004eb0| 64 65 63 2d 3e 74 79 70 | 65 2c 20 22 76 6f 69 64 |dec->typ|e, "void|
|00004ec0| 22 29 29 20 7b 0a 09 09 | 72 65 74 75 72 6e 3b 0a |")) {...|return;.|
|00004ed0| 09 7d 0a 09 74 61 62 69 | 66 79 28 66 6f 75 74 2c |.}..tabi|fy(fout,|
|00004ee0| 20 74 61 62 29 3b 0a 09 | 69 66 20 28 73 74 72 65 | tab);..|if (stre|
|00004ef0| 71 28 64 65 63 2d 3e 74 | 79 70 65 2c 20 6e 61 6d |q(dec->t|ype, nam|
|00004f00| 65 29 20 26 26 20 21 64 | 65 63 2d 3e 70 72 65 66 |e) && !d|ec->pref|
|00004f10| 69 78 29 20 7b 0a 09 09 | 66 5f 70 72 69 6e 74 28 |ix) {...|f_print(|
|00004f20| 66 6f 75 74 2c 20 22 73 | 74 72 75 63 74 20 22 29 |fout, "s|truct ")|
|00004f30| 3b 0a 09 7d 0a 09 69 66 | 20 28 73 74 72 65 71 28 |;..}..if| (streq(|
|00004f40| 64 65 63 2d 3e 74 79 70 | 65 2c 20 22 73 74 72 69 |dec->typ|e, "stri|
|00004f50| 6e 67 22 29 29 20 7b 0a | 09 09 66 5f 70 72 69 6e |ng")) {.|..f_prin|
|00004f60| 74 28 66 6f 75 74 2c 20 | 22 63 68 61 72 20 2a 25 |t(fout, |"char *%|
|00004f70| 73 22 2c 20 64 65 63 2d | 3e 6e 61 6d 65 29 3b 0a |s", dec-|>name);.|
|00004f80| 09 7d 20 65 6c 73 65 20 | 7b 0a 09 09 70 72 65 66 |.} else |{...pref|
|00004f90| 69 78 20 3d 20 22 22 3b | 0a 09 09 69 66 20 28 73 |ix = "";|...if (s|
|00004fa0| 74 72 65 71 28 64 65 63 | 2d 3e 74 79 70 65 2c 20 |treq(dec|->type, |
|00004fb0| 22 62 6f 6f 6c 22 29 29 | 20 7b 0a 09 09 09 74 79 |"bool"))| {....ty|
|00004fc0| 70 65 20 3d 20 22 62 6f | 6f 6c 5f 74 22 3b 0a 09 |pe = "bo|ol_t";..|
|00004fd0| 09 7d 20 65 6c 73 65 20 | 69 66 20 28 73 74 72 65 |.} else |if (stre|
|00004fe0| 71 28 64 65 63 2d 3e 74 | 79 70 65 2c 20 22 6f 70 |q(dec->t|ype, "op|
|00004ff0| 61 71 75 65 22 29 29 20 | 7b 0a 09 09 09 74 79 70 |aque")) |{....typ|
|00005000| 65 20 3d 20 22 63 68 61 | 72 22 3b 0a 09 09 7d 20 |e = "cha|r";...} |
|00005010| 65 6c 73 65 20 7b 0a 09 | 09 09 69 66 20 28 64 65 |else {..|..if (de|
|00005020| 63 2d 3e 70 72 65 66 69 | 78 29 20 7b 0a 09 09 09 |c->prefi|x) {....|
|00005030| 09 73 5f 70 72 69 6e 74 | 28 62 75 66 2c 20 22 25 |.s_print|(buf, "%|
|00005040| 73 20 22 2c 20 64 65 63 | 2d 3e 70 72 65 66 69 78 |s ", dec|->prefix|
|00005050| 29 3b 0a 09 09 09 09 70 | 72 65 66 69 78 20 3d 20 |);.....p|refix = |
|00005060| 62 75 66 3b 0a 09 09 09 | 7d 0a 09 09 09 74 79 70 |buf;....|}....typ|
|00005070| 65 20 3d 20 64 65 63 2d | 3e 74 79 70 65 3b 0a 09 |e = dec-|>type;..|
|00005080| 09 7d 0a 09 09 73 77 69 | 74 63 68 20 28 64 65 63 |.}...swi|tch (dec|
|00005090| 2d 3e 72 65 6c 29 20 7b | 0a 09 09 63 61 73 65 20 |->rel) {|...case |
|000050a0| 52 45 4c 5f 41 4c 49 41 | 53 3a 0a 09 09 09 66 5f |REL_ALIA|S:....f_|
|000050b0| 70 72 69 6e 74 28 66 6f | 75 74 2c 20 22 25 73 25 |print(fo|ut, "%s%|
|000050c0| 73 20 25 73 22 2c 20 70 | 72 65 66 69 78 2c 20 74 |s %s", p|refix, t|
|000050d0| 79 70 65 2c 20 64 65 63 | 2d 3e 6e 61 6d 65 29 3b |ype, dec|->name);|
|000050e0| 0a 09 09 09 62 72 65 61 | 6b 3b 0a 09 09 63 61 73 |....brea|k;...cas|
|000050f0| 65 20 52 45 4c 5f 56 45 | 43 54 4f 52 3a 0a 09 09 |e REL_VE|CTOR:...|
|00005100| 09 66 5f 70 72 69 6e 74 | 28 66 6f 75 74 2c 20 22 |.f_print|(fout, "|
|00005110| 25 73 25 73 20 25 73 5b | 25 73 5d 22 2c 20 70 72 |%s%s %s[|%s]", pr|
|00005120| 65 66 69 78 2c 20 74 79 | 70 65 2c 20 64 65 63 2d |efix, ty|pe, dec-|
|00005130| 3e 6e 61 6d 65 2c 0a 09 | 09 09 09 64 65 63 2d 3e |>name,..|...dec->|
|00005140| 61 72 72 61 79 5f 6d 61 | 78 29 3b 0a 09 09 09 62 |array_ma|x);....b|
|00005150| 72 65 61 6b 3b 0a 09 09 | 63 61 73 65 20 52 45 4c |reak;...|case REL|
|00005160| 5f 50 4f 49 4e 54 45 52 | 3a 0a 09 09 09 66 5f 70 |_POINTER|:....f_p|
|00005170| 72 69 6e 74 28 66 6f 75 | 74 2c 20 22 25 73 25 73 |rint(fou|t, "%s%s|
|00005180| 20 2a 25 73 22 2c 20 70 | 72 65 66 69 78 2c 20 74 | *%s", p|refix, t|
|00005190| 79 70 65 2c 20 64 65 63 | 2d 3e 6e 61 6d 65 29 3b |ype, dec|->name);|
|000051a0| 0a 09 09 09 62 72 65 61 | 6b 3b 0a 09 09 63 61 73 |....brea|k;...cas|
|000051b0| 65 20 52 45 4c 5f 41 52 | 52 41 59 3a 0a 09 09 09 |e REL_AR|RAY:....|
|000051c0| 66 5f 70 72 69 6e 74 28 | 66 6f 75 74 2c 20 22 73 |f_print(|fout, "s|
|000051d0| 74 72 75 63 74 20 7b 5c | 6e 22 29 3b 0a 09 09 09 |truct {\|n");....|
|000051e0| 74 61 62 69 66 79 28 66 | 6f 75 74 2c 20 74 61 62 |tabify(f|out, tab|
|000051f0| 29 3b 0a 09 09 09 66 5f | 70 72 69 6e 74 28 66 6f |);....f_|print(fo|
|00005200| 75 74 2c 20 22 5c 74 75 | 5f 69 6e 74 20 25 73 5f |ut, "\tu|_int %s_|
|00005210| 6c 65 6e 3b 5c 6e 22 2c | 20 64 65 63 2d 3e 6e 61 |len;\n",| dec->na|
|00005220| 6d 65 29 3b 0a 09 09 09 | 74 61 62 69 66 79 28 66 |me);....|tabify(f|
|00005230| 6f 75 74 2c 20 74 61 62 | 29 3b 0a 09 09 09 66 5f |out, tab|);....f_|
|00005240| 70 72 69 6e 74 28 66 6f | 75 74 2c 20 22 5c 74 25 |print(fo|ut, "\t%|
|00005250| 73 25 73 20 2a 25 73 5f | 76 61 6c 3b 5c 6e 22 2c |s%s *%s_|val;\n",|
|00005260| 20 70 72 65 66 69 78 2c | 20 74 79 70 65 2c 20 64 | prefix,| type, d|
|00005270| 65 63 2d 3e 6e 61 6d 65 | 29 3b 0a 09 09 09 74 61 |ec->name|);....ta|
|00005280| 62 69 66 79 28 66 6f 75 | 74 2c 20 74 61 62 29 3b |bify(fou|t, tab);|
|00005290| 0a 09 09 09 66 5f 70 72 | 69 6e 74 28 66 6f 75 74 |....f_pr|int(fout|
|000052a0| 2c 20 22 7d 20 25 73 22 | 2c 20 64 65 63 2d 3e 6e |, "} %s"|, dec->n|
|000052b0| 61 6d 65 29 3b 0a 09 09 | 09 62 72 65 61 6b 3b 0a |ame);...|.break;.|
|000052c0| 09 09 7d 0a 09 7d 0a 09 | 66 5f 70 72 69 6e 74 28 |..}..}..|f_print(|
|000052d0| 66 6f 75 74 2c 20 22 3b | 5c 6e 22 29 3b 0a 7d 0a |fout, ";|\n");.}.|
|000052e0| 0a 0a 0a 73 74 61 74 69 | 63 0a 75 6e 64 65 66 69 |...stati|c.undefi|
|000052f0| 6e 65 64 32 28 74 79 70 | 65 2c 20 73 74 6f 70 29 |ned2(typ|e, stop)|
|00005300| 0a 09 63 68 61 72 20 2a | 74 79 70 65 3b 0a 09 63 |..char *|type;..c|
|00005310| 68 61 72 20 2a 73 74 6f | 70 3b 0a 7b 0a 09 6c 69 |har *sto|p;.{..li|
|00005320| 73 74 20 2a 6c 3b 0a 09 | 64 65 66 69 6e 69 74 69 |st *l;..|definiti|
|00005330| 6f 6e 20 2a 64 65 66 3b | 0a 0a 09 66 6f 72 20 28 |on *def;|...for (|
|00005340| 6c 20 3d 20 64 65 66 69 | 6e 65 64 3b 20 6c 20 21 |l = defi|ned; l !|
|00005350| 3d 20 4e 55 4c 4c 3b 20 | 6c 20 3d 20 6c 2d 3e 6e |= NULL; |l = l->n|
|00005360| 65 78 74 29 20 7b 0a 09 | 09 64 65 66 20 3d 20 28 |ext) {..|.def = (|
|00005370| 64 65 66 69 6e 69 74 69 | 6f 6e 20 2a 29 20 6c 2d |definiti|on *) l-|
|00005380| 3e 76 61 6c 3b 0a 09 09 | 69 66 20 28 64 65 66 2d |>val;...|if (def-|
|00005390| 3e 64 65 66 5f 6b 69 6e | 64 20 21 3d 20 44 45 46 |>def_kin|d != DEF|
|000053a0| 5f 50 52 4f 47 52 41 4d | 29 20 7b 0a 09 09 09 69 |_PROGRAM|) {....i|
|000053b0| 66 20 28 73 74 72 65 71 | 28 64 65 66 2d 3e 64 65 |f (streq|(def->de|
|000053c0| 66 5f 6e 61 6d 65 2c 20 | 73 74 6f 70 29 29 20 7b |f_name, |stop)) {|
|000053d0| 0a 09 09 09 09 72 65 74 | 75 72 6e 20 28 31 29 3b |.....ret|urn (1);|
|000053e0| 0a 09 09 09 7d 20 65 6c | 73 65 20 69 66 20 28 73 |....} el|se if (s|
|000053f0| 74 72 65 71 28 64 65 66 | 2d 3e 64 65 66 5f 6e 61 |treq(def|->def_na|
|00005400| 6d 65 2c 20 74 79 70 65 | 29 29 20 7b 0a 09 09 09 |me, type|)) {....|
|00005410| 09 72 65 74 75 72 6e 20 | 28 30 29 3b 0a 09 09 09 |.return |(0);....|
|00005420| 7d 0a 09 09 7d 0a 09 7d | 0a 09 72 65 74 75 72 6e |}...}..}|..return|
|00005430| 20 28 31 29 3b 0a 7d 0a | 46 75 6e 6b 79 5f 53 74 | (1);.}.|Funky_St|
|00005440| 75 66 66 0a 6c 65 6e 3d | 60 77 63 20 2d 63 20 3c |uff.len=|`wc -c <|
|00005450| 20 72 70 63 5f 68 6f 75 | 74 2e 63 60 0a 69 66 20 | rpc_hou|t.c`.if |
|00005460| 5b 20 24 6c 65 6e 20 21 | 3d 20 20 20 20 20 38 31 |[ $len !|= 81|
|00005470| 37 32 20 5d 20 3b 20 74 | 68 65 6e 0a 20 20 65 63 |72 ] ; t|hen. ec|
|00005480| 68 6f 20 65 72 72 6f 72 | 3a 20 72 70 63 5f 68 6f |ho error|: rpc_ho|
|00005490| 75 74 2e 63 20 77 61 73 | 20 24 6c 65 6e 20 62 79 |ut.c was| $len by|
|000054a0| 74 65 73 20 6c 6f 6e 67 | 2c 20 73 68 6f 75 6c 64 |tes long|, should|
|000054b0| 20 68 61 76 65 20 62 65 | 65 6e 20 20 20 20 20 38 | have be|en 8|
|000054c0| 31 37 32 0a 66 69 0a 65 | 63 68 6f 20 78 20 2d 20 |172.fi.e|cho x - |
|000054d0| 72 70 63 5f 6d 61 69 6e | 2e 63 0a 63 61 74 20 3e |rpc_main|.c.cat >|
|000054e0| 20 72 70 63 5f 6d 61 69 | 6e 2e 63 20 3c 3c 27 46 | rpc_mai|n.c <<'F|
|000054f0| 75 6e 6b 79 5f 53 74 75 | 66 66 27 0a 2f 2a 20 40 |unky_Stu|ff'./* @|
|00005500| 28 23 29 72 70 63 5f 6d | 61 69 6e 2e 63 09 31 2e |(#)rpc_m|ain.c.1.|
|00005510| 34 20 38 37 2f 31 31 2f | 33 30 20 33 2e 39 20 52 |4 87/11/|30 3.9 R|
|00005520| 50 43 53 52 43 20 2a 2f | 0a 2f 2a 0a 20 2a 20 53 |PCSRC */|./*. * S|
|00005530| 75 6e 20 52 50 43 20 69 | 73 20 61 20 70 72 6f 64 |un RPC i|s a prod|
|00005540| 75 63 74 20 6f 66 20 53 | 75 6e 20 4d 69 63 72 6f |uct of S|un Micro|
|00005550| 73 79 73 74 65 6d 73 2c | 20 49 6e 63 2e 20 61 6e |systems,| Inc. an|
|00005560| 64 20 69 73 20 70 72 6f | 76 69 64 65 64 20 66 6f |d is pro|vided fo|
|00005570| 72 0a 20 2a 20 75 6e 72 | 65 73 74 72 69 63 74 65 |r. * unr|estricte|
|00005580| 64 20 75 73 65 20 70 72 | 6f 76 69 64 65 64 20 74 |d use pr|ovided t|
|00005590| 68 61 74 20 74 68 69 73 | 20 6c 65 67 65 6e 64 20 |hat this| legend |
|000055a0| 69 73 20 69 6e 63 6c 75 | 64 65 64 20 6f 6e 20 61 |is inclu|ded on a|
|000055b0| 6c 6c 20 74 61 70 65 0a | 20 2a 20 6d 65 64 69 61 |ll tape.| * media|
|000055c0| 20 61 6e 64 20 61 73 20 | 61 20 70 61 72 74 20 6f | and as |a part o|
|000055d0| 66 20 74 68 65 20 73 6f | 66 74 77 61 72 65 20 70 |f the so|ftware p|
|000055e0| 72 6f 67 72 61 6d 20 69 | 6e 20 77 68 6f 6c 65 20 |rogram i|n whole |
|000055f0| 6f 72 20 70 61 72 74 2e | 20 20 55 73 65 72 73 0a |or part.| Users.|
|00005600| 20 2a 20 6d 61 79 20 63 | 6f 70 79 20 6f 72 20 6d | * may c|opy or m|
|00005610| 6f 64 69 66 79 20 53 75 | 6e 20 52 50 43 20 77 69 |odify Su|n RPC wi|
|00005620| 74 68 6f 75 74 20 63 68 | 61 72 67 65 2c 20 62 75 |thout ch|arge, bu|
|00005630| 74 20 61 72 65 20 6e 6f | 74 20 61 75 74 68 6f 72 |t are no|t author|
|00005640| 69 7a 65 64 0a 20 2a 20 | 74 6f 20 6c 69 63 65 6e |ized. * |to licen|
|00005650| 73 65 20 6f 72 20 64 69 | 73 74 72 69 62 75 74 65 |se or di|stribute|
|00005660| 20 69 74 20 74 6f 20 61 | 6e 79 6f 6e 65 20 65 6c | it to a|nyone el|
|00005670| 73 65 20 65 78 63 65 70 | 74 20 61 73 20 70 61 72 |se excep|t as par|
|00005680| 74 20 6f 66 20 61 20 70 | 72 6f 64 75 63 74 20 6f |t of a p|roduct o|
|00005690| 72 0a 20 2a 20 70 72 6f | 67 72 61 6d 20 64 65 76 |r. * pro|gram dev|
|000056a0| 65 6c 6f 70 65 64 20 62 | 79 20 74 68 65 20 75 73 |eloped b|y the us|
|000056b0| 65 72 2e 0a 20 2a 20 0a | 20 2a 20 53 55 4e 20 52 |er.. * .| * SUN R|
|000056c0| 50 43 20 49 53 20 50 52 | 4f 56 49 44 45 44 20 41 |PC IS PR|OVIDED A|
|000056d0| 53 20 49 53 20 57 49 54 | 48 20 4e 4f 20 57 41 52 |S IS WIT|H NO WAR|
|000056e0| 52 41 4e 54 49 45 53 20 | 4f 46 20 41 4e 59 20 4b |RANTIES |OF ANY K|
|000056f0| 49 4e 44 20 49 4e 43 4c | 55 44 49 4e 47 20 54 48 |IND INCL|UDING TH|
|00005700| 45 0a 20 2a 20 57 41 52 | 52 41 4e 54 49 45 53 20 |E. * WAR|RANTIES |
|00005710| 4f 46 20 44 45 53 49 47 | 4e 2c 20 4d 45 52 43 48 |OF DESIG|N, MERCH|
|00005720| 41 4e 54 49 42 49 4c 49 | 54 59 20 41 4e 44 20 46 |ANTIBILI|TY AND F|
|00005730| 49 54 4e 45 53 53 20 46 | 4f 52 20 41 20 50 41 52 |ITNESS F|OR A PAR|
|00005740| 54 49 43 55 4c 41 52 0a | 20 2a 20 50 55 52 50 4f |TICULAR.| * PURPO|
|00005750| 53 45 2c 20 4f 52 20 41 | 52 49 53 49 4e 47 20 46 |SE, OR A|RISING F|
|00005760| 52 4f 4d 20 41 20 43 4f | 55 52 53 45 20 4f 46 20 |ROM A CO|URSE OF |
|00005770| 44 45 41 4c 49 4e 47 2c | 20 55 53 41 47 45 20 4f |DEALING,| USAGE O|
|00005780| 52 20 54 52 41 44 45 20 | 50 52 41 43 54 49 43 45 |R TRADE |PRACTICE|
|00005790| 2e 0a 20 2a 20 0a 20 2a | 20 53 75 6e 20 52 50 43 |.. * . *| Sun RPC|
|000057a0| 20 69 73 20 70 72 6f 76 | 69 64 65 64 20 77 69 74 | is prov|ided wit|
|000057b0| 68 20 6e 6f 20 73 75 70 | 70 6f 72 74 20 61 6e 64 |h no sup|port and|
|000057c0| 20 77 69 74 68 6f 75 74 | 20 61 6e 79 20 6f 62 6c | without| any obl|
|000057d0| 69 67 61 74 69 6f 6e 20 | 6f 6e 20 74 68 65 0a 20 |igation |on the. |
|000057e0| 2a 20 70 61 72 74 20 6f | 66 20 53 75 6e 20 4d 69 |* part o|f Sun Mi|
|000057f0| 63 72 6f 73 79 73 74 65 | 6d 73 2c 20 49 6e 63 2e |crosyste|ms, Inc.|
|00005800| 20 74 6f 20 61 73 73 69 | 73 74 20 69 6e 20 69 74 | to assi|st in it|
|00005810| 73 20 75 73 65 2c 20 63 | 6f 72 72 65 63 74 69 6f |s use, c|orrectio|
|00005820| 6e 2c 0a 20 2a 20 6d 6f | 64 69 66 69 63 61 74 69 |n,. * mo|dificati|
|00005830| 6f 6e 20 6f 72 20 65 6e | 68 61 6e 63 65 6d 65 6e |on or en|hancemen|
|00005840| 74 2e 0a 20 2a 20 0a 20 | 2a 20 53 55 4e 20 4d 49 |t.. * . |* SUN MI|
|00005850| 43 52 4f 53 59 53 54 45 | 4d 53 2c 20 49 4e 43 2e |CROSYSTE|MS, INC.|
|00005860| 20 53 48 41 4c 4c 20 48 | 41 56 45 20 4e 4f 20 4c | SHALL H|AVE NO L|
|00005870| 49 41 42 49 4c 49 54 59 | 20 57 49 54 48 20 52 45 |IABILITY| WITH RE|
|00005880| 53 50 45 43 54 20 54 4f | 20 54 48 45 0a 20 2a 20 |SPECT TO| THE. * |
|00005890| 49 4e 46 52 49 4e 47 45 | 4d 45 4e 54 20 4f 46 20 |INFRINGE|MENT OF |
|000058a0| 43 4f 50 59 52 49 47 48 | 54 53 2c 20 54 52 41 44 |COPYRIGH|TS, TRAD|
|000058b0| 45 20 53 45 43 52 45 54 | 53 20 4f 52 20 41 4e 59 |E SECRET|S OR ANY|
|000058c0| 20 50 41 54 45 4e 54 53 | 20 42 59 20 53 55 4e 20 | PATENTS| BY SUN |
|000058d0| 52 50 43 0a 20 2a 20 4f | 52 20 41 4e 59 20 50 41 |RPC. * O|R ANY PA|
|000058e0| 52 54 20 54 48 45 52 45 | 4f 46 2e 0a 20 2a 20 0a |RT THERE|OF.. * .|
|000058f0| 20 2a 20 49 6e 20 6e 6f | 20 65 76 65 6e 74 20 77 | * In no| event w|
|00005900| 69 6c 6c 20 53 75 6e 20 | 4d 69 63 72 6f 73 79 73 |ill Sun |Microsys|
|00005910| 74 65 6d 73 2c 20 49 6e | 63 2e 20 62 65 20 6c 69 |tems, In|c. be li|
|00005920| 61 62 6c 65 20 66 6f 72 | 20 61 6e 79 20 6c 6f 73 |able for| any los|
|00005930| 74 20 72 65 76 65 6e 75 | 65 0a 20 2a 20 6f 72 20 |t revenu|e. * or |
|00005940| 70 72 6f 66 69 74 73 20 | 6f 72 20 6f 74 68 65 72 |profits |or other|
|00005950| 20 73 70 65 63 69 61 6c | 2c 20 69 6e 64 69 72 65 | special|, indire|
|00005960| 63 74 20 61 6e 64 20 63 | 6f 6e 73 65 71 75 65 6e |ct and c|onsequen|
|00005970| 74 69 61 6c 20 64 61 6d | 61 67 65 73 2c 20 65 76 |tial dam|ages, ev|
|00005980| 65 6e 20 69 66 0a 20 2a | 20 53 75 6e 20 68 61 73 |en if. *| Sun has|
|00005990| 20 62 65 65 6e 20 61 64 | 76 69 73 65 64 20 6f 66 | been ad|vised of|
|000059a0| 20 74 68 65 20 70 6f 73 | 73 69 62 69 6c 69 74 79 | the pos|sibility|
|000059b0| 20 6f 66 20 73 75 63 68 | 20 64 61 6d 61 67 65 73 | of such| damages|
|000059c0| 2e 0a 20 2a 20 0a 20 2a | 20 53 75 6e 20 4d 69 63 |.. * . *| Sun Mic|
|000059d0| 72 6f 73 79 73 74 65 6d | 73 2c 20 49 6e 63 2e 0a |rosystem|s, Inc..|
|000059e0| 20 2a 20 32 35 35 30 20 | 47 61 72 63 69 61 20 41 | * 2550 |Garcia A|
|000059f0| 76 65 6e 75 65 0a 20 2a | 20 4d 6f 75 6e 74 61 69 |venue. *| Mountai|
|00005a00| 6e 20 56 69 65 77 2c 20 | 43 61 6c 69 66 6f 72 6e |n View, |Californ|
|00005a10| 69 61 20 20 39 34 30 34 | 33 0a 20 2a 2f 0a 23 69 |ia 9404|3. */.#i|
|00005a20| 66 6e 64 65 66 20 6c 69 | 6e 74 0a 73 74 61 74 69 |fndef li|nt.stati|
|00005a30| 63 20 63 68 61 72 20 73 | 63 63 73 69 64 5b 5d 20 |c char s|ccsid[] |
|00005a40| 3d 20 22 40 28 23 29 72 | 70 63 5f 6d 61 69 6e 2e |= "@(#)r|pc_main.|
|00005a50| 63 20 31 2e 37 20 38 37 | 2f 30 36 2f 32 34 20 28 |c 1.7 87|/06/24 (|
|00005a60| 43 29 20 31 39 38 37 20 | 53 4d 49 22 3b 0a 23 65 |C) 1987 |SMI";.#e|
|00005a70| 6e 64 69 66 0a 0a 2f 2a | 0a 20 2a 20 72 70 63 5f |ndif../*|. * rpc_|
|00005a80| 6d 61 69 6e 2e 63 2c 20 | 54 6f 70 20 6c 65 76 65 |main.c, |Top leve|
|00005a90| 6c 20 6f 66 20 74 68 65 | 20 52 50 43 20 70 72 6f |l of the| RPC pro|
|00005aa0| 74 6f 63 6f 6c 20 63 6f | 6d 70 69 6c 65 72 2e 20 |tocol co|mpiler. |
|00005ab0| 0a 20 2a 20 43 6f 70 79 | 72 69 67 68 74 20 28 43 |. * Copy|right (C|
|00005ac0| 29 20 31 39 38 37 2c 20 | 53 75 6e 20 4d 69 63 72 |) 1987, |Sun Micr|
|00005ad0| 6f 73 79 73 74 65 6d 73 | 2c 20 49 6e 63 2e 20 0a |osystems|, Inc. .|
|00005ae0| 20 2a 2f 0a 0a 23 69 6e | 63 6c 75 64 65 20 3c 73 | */..#in|clude <s|
|00005af0| 74 64 69 6f 2e 68 3e 0a | 23 69 6e 63 6c 75 64 65 |tdio.h>.|#include|
|00005b00| 20 3c 73 74 72 69 6e 67 | 73 2e 68 3e 0a 23 69 6e | <string|s.h>.#in|
|00005b10| 63 6c 75 64 65 20 3c 73 | 79 73 2f 66 69 6c 65 2e |clude <s|ys/file.|
|00005b20| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 22 72 70 63 |h>.#incl|ude "rpc|
|00005b30| 5f 75 74 69 6c 2e 68 22 | 0a 23 69 6e 63 6c 75 64 |_util.h"|.#includ|
|00005b40| 65 20 22 72 70 63 5f 70 | 61 72 73 65 2e 68 22 0a |e "rpc_p|arse.h".|
|00005b50| 23 69 6e 63 6c 75 64 65 | 20 22 72 70 63 5f 73 63 |#include| "rpc_sc|
|00005b60| 61 6e 2e 68 22 0a 0a 23 | 64 65 66 69 6e 65 20 45 |an.h"..#|define E|
|00005b70| 58 54 45 4e 44 09 31 09 | 09 2f 2a 20 61 6c 69 61 |XTEND.1.|./* alia|
|00005b80| 73 20 66 6f 72 20 54 52 | 55 45 20 2a 2f 0a 0a 73 |s for TR|UE */..s|
|00005b90| 74 72 75 63 74 20 63 6f | 6d 6d 61 6e 64 6c 69 6e |truct co|mmandlin|
|00005ba0| 65 20 7b 0a 09 69 6e 74 | 20 63 66 6c 61 67 3b 0a |e {..int| cflag;.|
|00005bb0| 09 69 6e 74 20 68 66 6c | 61 67 3b 0a 09 69 6e 74 |.int hfl|ag;..int|
|00005bc0| 20 6c 66 6c 61 67 3b 0a | 09 69 6e 74 20 73 66 6c | lflag;.|.int sfl|
|00005bd0| 61 67 3b 0a 09 69 6e 74 | 20 6d 66 6c 61 67 3b 0a |ag;..int| mflag;.|
|00005be0| 09 63 68 61 72 20 2a 69 | 6e 66 69 6c 65 3b 0a 09 |.char *i|nfile;..|
|00005bf0| 63 68 61 72 20 2a 6f 75 | 74 66 69 6c 65 3b 0a 7d |char *ou|tfile;.}|
|00005c00| 3b 0a 0a 73 74 61 74 69 | 63 20 63 68 61 72 20 2a |;..stati|c char *|
|00005c10| 63 6d 64 6e 61 6d 65 3b | 0a 73 74 61 74 69 63 20 |cmdname;|.static |
|00005c20| 63 68 61 72 20 43 50 50 | 5b 5d 20 3d 20 22 2f 6c |char CPP|[] = "/l|
|00005c30| 69 62 2f 63 70 70 22 3b | 0a 73 74 61 74 69 63 20 |ib/cpp";|.static |
|00005c40| 63 68 61 72 20 43 50 50 | 46 4c 41 47 53 5b 5d 20 |char CPP|FLAGS[] |
|00005c50| 3d 20 22 2d 43 22 3b 0a | 73 74 61 74 69 63 20 63 |= "-C";.|static c|
|00005c60| 68 61 72 20 2a 61 6c 6c | 76 5b 5d 20 3d 20 7b 0a |har *all|v[] = {.|
|00005c70| 09 22 72 70 63 67 65 6e | 22 2c 20 22 2d 73 22 2c |."rpcgen|", "-s",|
|00005c80| 20 22 75 64 70 22 2c 20 | 22 2d 73 22 2c 20 22 74 | "udp", |"-s", "t|
|00005c90| 63 70 22 2c 0a 7d 3b 0a | 73 74 61 74 69 63 20 69 |cp",.};.|static i|
|00005ca0| 6e 74 20 61 6c 6c 63 20 | 3d 20 73 69 7a 65 6f 66 |nt allc |= sizeof|
|00005cb0| 28 61 6c 6c 76 29 2f 73 | 69 7a 65 6f 66 28 61 6c |(allv)/s|izeof(al|
|00005cc0| 6c 76 5b 30 5d 29 3b 0a | 0a 6d 61 69 6e 28 61 72 |lv[0]);.|.main(ar|
|00005cd0| 67 63 2c 20 61 72 67 76 | 29 0a 09 69 6e 74 20 61 |gc, argv|)..int a|
|00005ce0| 72 67 63 3b 0a 09 63 68 | 61 72 20 2a 61 72 67 76 |rgc;..ch|ar *argv|
|00005cf0| 5b 5d 3b 0a 0a 7b 0a 09 | 73 74 72 75 63 74 20 63 |[];..{..|struct c|
|00005d00| 6f 6d 6d 61 6e 64 6c 69 | 6e 65 20 63 6d 64 3b 0a |ommandli|ne cmd;.|
|00005d10| 0a 09 69 66 20 28 21 70 | 61 72 73 65 61 72 67 73 |..if (!p|arseargs|
|00005d20| 28 61 72 67 63 2c 20 61 | 72 67 76 2c 20 26 63 6d |(argc, a|rgv, &cm|
|00005d30| 64 29 29 20 7b 0a 09 09 | 66 5f 70 72 69 6e 74 28 |d)) {...|f_print(|
|00005d40| 73 74 64 65 72 72 2c 0a | 09 09 09 22 75 73 61 67 |stderr,.|..."usag|
|00005d50| 65 3a 20 25 73 20 69 6e | 66 69 6c 65 5c 6e 22 2c |e: %s in|file\n",|
|00005d60| 20 63 6d 64 6e 61 6d 65 | 29 3b 0a 09 09 66 5f 70 | cmdname|);...f_p|
|00005d70| 72 69 6e 74 28 73 74 64 | 65 72 72 2c 0a 09 09 09 |rint(std|err,....|
|00005d80| 22 20 20 20 20 20 20 20 | 25 73 20 5b 2d 63 20 7c |" |%s [-c ||
|00005d90| 20 2d 68 20 7c 20 2d 6c | 20 7c 20 2d 6d 5d 20 5b | -h | -l| | -m] [|
|00005da0| 2d 6f 20 6f 75 74 66 69 | 6c 65 5d 20 5b 69 6e 66 |-o outfi|le] [inf|
|00005db0| 69 6c 65 5d 5c 6e 22 2c | 0a 09 09 09 63 6d 64 6e |ile]\n",|....cmdn|
|00005dc0| 61 6d 65 29 3b 0a 09 09 | 66 5f 70 72 69 6e 74 28 |ame);...|f_print(|
|00005dd0| 73 74 64 65 72 72 2c 0a | 09 09 09 22 20 20 20 20 |stderr,.|..." |
|00005de0| 20 20 20 25 73 20 5b 2d | 73 20 75 64 70 7c 74 63 | %s [-|s udp|tc|
|00005df0| 70 5d 2a 20 5b 2d 6f 20 | 6f 75 74 66 69 6c 65 5d |p]* [-o |outfile]|
|00005e00| 20 5b 69 6e 66 69 6c 65 | 5d 5c 6e 22 2c 0a 09 09 | [infile|]\n",...|
|00005e10| 09 63 6d 64 6e 61 6d 65 | 29 3b 0a 09 09 65 78 69 |.cmdname|);...exi|
|00005e20| 74 28 31 29 3b 0a 09 7d | 0a 09 69 66 20 28 63 6d |t(1);..}|..if (cm|
|00005e30| 64 2e 63 66 6c 61 67 29 | 20 7b 0a 09 09 63 5f 6f |d.cflag)| {...c_o|
|00005e40| 75 74 70 75 74 28 63 6d | 64 2e 69 6e 66 69 6c 65 |utput(cm|d.infile|
|00005e50| 2c 20 22 2d 44 52 50 43 | 5f 58 44 52 22 2c 20 21 |, "-DRPC|_XDR", !|
|00005e60| 45 58 54 45 4e 44 2c 20 | 63 6d 64 2e 6f 75 74 66 |EXTEND, |cmd.outf|
|00005e70| 69 6c 65 29 3b 0a 09 7d | 20 65 6c 73 65 20 69 66 |ile);..}| else if|
|00005e80| 20 28 63 6d 64 2e 68 66 | 6c 61 67 29 20 7b 0a 09 | (cmd.hf|lag) {..|
|00005e90| 09 68 5f 6f 75 74 70 75 | 74 28 63 6d 64 2e 69 6e |.h_outpu|t(cmd.in|
|00005ea0| 66 69 6c 65 2c 20 22 2d | 44 52 50 43 5f 48 44 52 |file, "-|DRPC_HDR|
|00005eb0| 22 2c 20 21 45 58 54 45 | 4e 44 2c 20 63 6d 64 2e |", !EXTE|ND, cmd.|
|00005ec0| 6f 75 74 66 69 6c 65 29 | 3b 0a 09 7d 20 65 6c 73 |outfile)|;..} els|
|00005ed0| 65 20 69 66 20 28 63 6d | 64 2e 6c 66 6c 61 67 29 |e if (cm|d.lflag)|
|00005ee0| 20 7b 0a 09 09 6c 5f 6f | 75 74 70 75 74 28 63 6d | {...l_o|utput(cm|
|00005ef0| 64 2e 69 6e 66 69 6c 65 | 2c 20 22 2d 44 52 50 43 |d.infile|, "-DRPC|
|00005f00| 5f 43 4c 4e 54 22 2c 20 | 21 45 58 54 45 4e 44 2c |_CLNT", |!EXTEND,|
|00005f10| 20 63 6d 64 2e 6f 75 74 | 66 69 6c 65 29 3b 0a 09 | cmd.out|file);..|
|00005f20| 7d 20 65 6c 73 65 20 69 | 66 20 28 63 6d 64 2e 73 |} else i|f (cmd.s|
|00005f30| 66 6c 61 67 20 7c 7c 20 | 63 6d 64 2e 6d 66 6c 61 |flag || |cmd.mfla|
|00005f40| 67 29 20 7b 0a 09 09 73 | 5f 6f 75 74 70 75 74 28 |g) {...s|_output(|
|00005f50| 61 72 67 63 2c 20 61 72 | 67 76 2c 20 63 6d 64 2e |argc, ar|gv, cmd.|
|00005f60| 69 6e 66 69 6c 65 2c 20 | 22 2d 44 52 50 43 5f 53 |infile, |"-DRPC_S|
|00005f70| 56 43 22 2c 20 21 45 58 | 54 45 4e 44 2c 0a 09 09 |VC", !EX|TEND,...|
|00005f80| 09 20 63 6d 64 2e 6f 75 | 74 66 69 6c 65 2c 20 63 |. cmd.ou|tfile, c|
|00005f90| 6d 64 2e 6d 66 6c 61 67 | 29 3b 0a 09 7d 20 65 6c |md.mflag|);..} el|
|00005fa0| 73 65 20 7b 0a 09 09 63 | 5f 6f 75 74 70 75 74 28 |se {...c|_output(|
|00005fb0| 63 6d 64 2e 69 6e 66 69 | 6c 65 2c 20 22 2d 44 52 |cmd.infi|le, "-DR|
|00005fc0| 50 43 5f 58 44 52 22 2c | 20 45 58 54 45 4e 44 2c |PC_XDR",| EXTEND,|
|00005fd0| 20 22 5f 78 64 72 2e 63 | 22 29 3b 0a 09 09 72 65 | "_xdr.c|");...re|
|00005fe0| 69 6e 69 74 69 61 6c 69 | 7a 65 28 29 3b 0a 09 09 |initiali|ze();...|
|00005ff0| 68 5f 6f 75 74 70 75 74 | 28 63 6d 64 2e 69 6e 66 |h_output|(cmd.inf|
|00006000| 69 6c 65 2c 20 22 2d 44 | 52 50 43 5f 48 44 52 22 |ile, "-D|RPC_HDR"|
|00006010| 2c 20 45 58 54 45 4e 44 | 2c 20 22 2e 68 22 29 3b |, EXTEND|, ".h");|
|00006020| 0a 09 09 72 65 69 6e 69 | 74 69 61 6c 69 7a 65 28 |...reini|tialize(|
|00006030| 29 3b 0a 09 09 6c 5f 6f | 75 74 70 75 74 28 63 6d |);...l_o|utput(cm|
|00006040| 64 2e 69 6e 66 69 6c 65 | 2c 20 22 2d 44 52 50 43 |d.infile|, "-DRPC|
|00006050| 5f 43 4c 4e 54 22 2c 20 | 45 58 54 45 4e 44 2c 20 |_CLNT", |EXTEND, |
|00006060| 22 5f 63 6c 6e 74 2e 63 | 22 29 3b 0a 09 09 72 65 |"_clnt.c|");...re|
|00006070| 69 6e 69 74 69 61 6c 69 | 7a 65 28 29 3b 0a 09 09 |initiali|ze();...|
|00006080| 73 5f 6f 75 74 70 75 74 | 28 61 6c 6c 63 2c 20 61 |s_output|(allc, a|
|00006090| 6c 6c 76 2c 20 63 6d 64 | 2e 69 6e 66 69 6c 65 2c |llv, cmd|.infile,|
|000060a0| 20 22 2d 44 52 50 43 5f | 53 56 43 22 2c 20 45 58 | "-DRPC_|SVC", EX|
|000060b0| 54 45 4e 44 2c 0a 09 09 | 09 20 22 5f 73 76 63 2e |TEND,...|. "_svc.|
|000060c0| 63 22 2c 20 63 6d 64 2e | 6d 66 6c 61 67 29 3b 0a |c", cmd.|mflag);.|
|000060d0| 09 7d 0a 09 65 78 69 74 | 28 30 29 3b 0a 7d 0a 0a |.}..exit|(0);.}..|
|000060e0| 2f 2a 0a 20 2a 20 61 64 | 64 20 65 78 74 65 6e 73 |/*. * ad|d extens|
|000060f0| 69 6f 6e 20 74 6f 20 66 | 69 6c 65 6e 61 6d 65 20 |ion to f|ilename |
|00006100| 0a 20 2a 2f 0a 73 74 61 | 74 69 63 20 63 68 61 72 |. */.sta|tic char|
|00006110| 20 2a 0a 65 78 74 65 6e | 64 66 69 6c 65 28 66 69 | *.exten|dfile(fi|
|00006120| 6c 65 2c 20 65 78 74 29 | 0a 09 63 68 61 72 20 2a |le, ext)|..char *|
|00006130| 66 69 6c 65 3b 0a 09 63 | 68 61 72 20 2a 65 78 74 |file;..c|har *ext|
|00006140| 3b 0a 7b 0a 09 63 68 61 | 72 20 2a 72 65 73 3b 0a |;.{..cha|r *res;.|
|00006150| 09 63 68 61 72 20 2a 70 | 3b 0a 0a 09 72 65 73 20 |.char *p|;...res |
|00006160| 3d 20 61 6c 6c 6f 63 28 | 73 74 72 6c 65 6e 28 66 |= alloc(|strlen(f|
|00006170| 69 6c 65 29 20 2b 20 73 | 74 72 6c 65 6e 28 65 78 |ile) + s|trlen(ex|
|00006180| 74 29 20 2b 20 31 29 3b | 0a 09 69 66 20 28 72 65 |t) + 1);|..if (re|
|00006190| 73 20 3d 3d 20 4e 55 4c | 4c 29 20 7b 0a 09 09 61 |s == NUL|L) {...a|
|000061a0| 62 6f 72 74 28 29 3b 0a | 09 7d 0a 09 70 20 3d 20 |bort();.|.}..p = |
|000061b0| 72 69 6e 64 65 78 28 66 | 69 6c 65 2c 20 27 2e 27 |rindex(f|ile, '.'|
|000061c0| 29 3b 0a 09 69 66 20 28 | 70 20 3d 3d 20 4e 55 4c |);..if (|p == NUL|
|000061d0| 4c 29 20 7b 0a 09 09 70 | 20 3d 20 66 69 6c 65 20 |L) {...p| = file |
|000061e0| 2b 20 73 74 72 6c 65 6e | 28 66 69 6c 65 29 3b 0a |+ strlen|(file);.|
|000061f0| 09 7d 0a 09 28 76 6f 69 | 64 29 20 73 74 72 63 70 |.}..(voi|d) strcp|
|00006200| 79 28 72 65 73 2c 20 66 | 69 6c 65 29 3b 0a 09 28 |y(res, f|ile);..(|
|00006210| 76 6f 69 64 29 20 73 74 | 72 63 70 79 28 72 65 73 |void) st|rcpy(res|
|00006220| 20 2b 20 28 70 20 2d 20 | 66 69 6c 65 29 2c 20 65 | + (p - |file), e|
|00006230| 78 74 29 3b 0a 09 72 65 | 74 75 72 6e 20 28 72 65 |xt);..re|turn (re|
|00006240| 73 29 3b 0a 7d 0a 0a 2f | 2a 0a 20 2a 20 4f 70 65 |s);.}../|*. * Ope|
|00006250| 6e 20 6f 75 74 70 75 74 | 20 66 69 6c 65 20 77 69 |n output| file wi|
|00006260| 74 68 20 67 69 76 65 6e | 20 65 78 74 65 6e 73 69 |th given| extensi|
|00006270| 6f 6e 20 0a 20 2a 2f 0a | 73 74 61 74 69 63 0a 6f |on . */.|static.o|
|00006280| 70 65 6e 5f 6f 75 74 70 | 75 74 28 69 6e 66 69 6c |pen_outp|ut(infil|
|00006290| 65 2c 20 6f 75 74 66 69 | 6c 65 29 0a 09 63 68 61 |e, outfi|le)..cha|
|000062a0| 72 20 2a 69 6e 66 69 6c | 65 3b 0a 09 63 68 61 72 |r *infil|e;..char|
|000062b0| 20 2a 6f 75 74 66 69 6c | 65 3b 0a 7b 0a 09 69 66 | *outfil|e;.{..if|
|000062c0| 20 28 6f 75 74 66 69 6c | 65 20 3d 3d 20 4e 55 4c | (outfil|e == NUL|
|000062d0| 4c 29 20 7b 0a 09 09 66 | 6f 75 74 20 3d 20 73 74 |L) {...f|out = st|
|000062e0| 64 6f 75 74 3b 0a 09 09 | 72 65 74 75 72 6e 3b 0a |dout;...|return;.|
|000062f0| 09 7d 0a 09 69 66 20 28 | 69 6e 66 69 6c 65 20 21 |.}..if (|infile !|
|00006300| 3d 20 4e 55 4c 4c 20 26 | 26 20 73 74 72 65 71 28 |= NULL &|& streq(|
|00006310| 6f 75 74 66 69 6c 65 2c | 20 69 6e 66 69 6c 65 29 |outfile,| infile)|
|00006320| 29 20 7b 0a 09 09 66 5f | 70 72 69 6e 74 28 73 74 |) {...f_|print(st|
|00006330| 64 65 72 72 2c 20 22 25 | 73 3a 20 6f 75 74 70 75 |derr, "%|s: outpu|
|00006340| 74 20 77 6f 75 6c 64 20 | 6f 76 65 72 77 72 69 74 |t would |overwrit|
|00006350| 65 20 25 73 5c 6e 22 2c | 20 63 6d 64 6e 61 6d 65 |e %s\n",| cmdname|
|00006360| 2c 0a 09 09 09 69 6e 66 | 69 6c 65 29 3b 0a 09 09 |,....inf|ile);...|
|00006370| 63 72 61 73 68 28 29 3b | 0a 09 7d 0a 09 66 6f 75 |crash();|..}..fou|
|00006380| 74 20 3d 20 66 6f 70 65 | 6e 28 6f 75 74 66 69 6c |t = fope|n(outfil|
|00006390| 65 2c 20 22 77 22 29 3b | 0a 09 69 66 20 28 66 6f |e, "w");|..if (fo|
|000063a0| 75 74 20 3d 3d 20 4e 55 | 4c 4c 29 20 7b 0a 09 09 |ut == NU|LL) {...|
|000063b0| 66 5f 70 72 69 6e 74 28 | 73 74 64 65 72 72 2c 20 |f_print(|stderr, |
|000063c0| 22 25 73 3a 20 75 6e 61 | 62 6c 65 20 74 6f 20 6f |"%s: una|ble to o|
|000063d0| 70 65 6e 20 22 2c 20 63 | 6d 64 6e 61 6d 65 29 3b |pen ", c|mdname);|
|000063e0| 0a 09 09 70 65 72 72 6f | 72 28 6f 75 74 66 69 6c |...perro|r(outfil|
|000063f0| 65 29 3b 0a 09 09 63 72 | 61 73 68 28 29 3b 0a 09 |e);...cr|ash();..|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.