home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / docs / src / devinfo-5.src < prev    next >
LaTeX Document  |  1997-01-27  |  9.2 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
100% dexvert C/C++ Source or Header (text/c) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file C source text default
98% file C source, ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% detectItEasy Format: Plain text[LF] default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 73 65 63 74 69 6f 6e | 7b 43 6f 64 69 6e 67 20 |\section|{Coding |
|00000010| 63 6f 6e 76 65 6e 74 69 | 6f 6e 73 7d 0a 0a 5c 73 |conventi|ons}..\s|
|00000020| 75 62 73 65 63 74 69 6f | 6e 7b 47 65 6e 65 72 61 |ubsectio|n{Genera|
|00000030| 6c 20 73 74 79 6c 65 7d | 0a 0a 54 68 69 73 20 63 |l style}|..This c|
|00000040| 6f 64 65 20 69 73 20 75 | 73 65 64 20 62 79 20 6d |ode is u|sed by m|
|00000050| 61 6e 79 20 70 65 6f 70 | 6c 65 20 61 6e 64 20 74 |any peop|le and t|
|00000060| 68 65 72 65 66 6f 72 65 | 20 79 6f 75 20 73 68 6f |herefore| you sho|
|00000070| 75 6c 64 20 6b 65 65 70 | 20 73 6f 6d 65 20 74 68 |uld keep| some th|
|00000080| 69 6e 67 73 0a 69 6e 20 | 6d 69 6e 64 20 77 68 65 |ings.in |mind whe|
|00000090| 6e 20 79 6f 75 20 73 75 | 62 6d 69 74 20 73 6f 75 |n you su|bmit sou|
|000000a0| 72 63 65 20 63 6f 64 65 | 3a 0a 0a 5c 62 65 67 69 |rce code|:..\begi|
|000000b0| 6e 7b 69 74 65 6d 69 7a | 65 7d 0a 5c 69 74 65 6d |n{itemiz|e}.\item|
|000000c0| 20 4b 65 65 70 20 74 68 | 69 6e 67 73 20 73 69 6d | Keep th|ings sim|
|000000d0| 70 6c 65 0a 5c 69 74 65 | 6d 20 4b 65 65 70 20 74 |ple.\ite|m Keep t|
|000000e0| 68 65 20 73 6f 75 72 63 | 65 20 63 6c 65 61 6e 0a |he sourc|e clean.|
|000000f0| 5c 69 74 65 6d 20 41 6c | 77 61 79 73 20 6b 6e 6f |\item Al|ways kno|
|00000100| 77 20 77 68 61 74 20 79 | 6f 75 20 61 72 65 20 64 |w what y|ou are d|
|00000110| 6f 69 6e 67 0a 5c 69 74 | 65 6d 20 54 65 6c 6c 20 |oing.\it|em Tell |
|00000120| 77 68 61 74 20 79 6f 75 | 20 61 72 65 20 64 6f 69 |what you| are doi|
|00000130| 6e 67 0a 5c 65 6e 64 7b | 69 74 65 6d 69 7a 65 7d |ng.\end{|itemize}|
|00000140| 0a 0a 5c 73 75 62 73 65 | 63 74 69 6f 6e 7b 43 6f |..\subse|ction{Co|
|00000150| 6d 6d 65 6e 74 73 7d 0a | 0a 41 52 4f 53 20 75 73 |mments}.|.AROS us|
|00000160| 65 73 20 73 6f 6d 65 20 | 6f 66 20 74 68 65 20 63 |es some |of the c|
|00000170| 6f 6d 6d 65 6e 74 73 20 | 69 6e 20 74 68 65 20 73 |omments |in the s|
|00000180| 6f 75 72 63 65 20 74 6f | 20 67 65 6e 65 72 61 74 |ource to| generat|
|00000190| 65 20 74 68 65 20 64 6f | 63 75 6d 65 6e 74 61 74 |e the do|cumentat|
|000001a0| 69 6f 6e 2e 0a 54 68 65 | 72 65 66 6f 72 65 20 69 |ion..The|refore i|
|000001b0| 74 27 73 20 6e 65 63 63 | 65 73 73 61 72 79 20 74 |t's necc|essary t|
|000001c0| 6f 20 6b 65 65 70 20 61 | 20 63 65 72 74 61 69 6e |o keep a| certain|
|000001d0| 20 66 6f 72 6d 61 74 20 | 73 6f 20 74 68 65 20 74 | format |so the t|
|000001e0| 6f 6f 6c 73 20 63 61 6e | 20 66 69 6e 64 0a 74 68 |ools can| find.th|
|000001f0| 65 69 72 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 2e |eir info|rmation.|
|00000200| 20 4f 74 68 65 72 20 63 | 6f 6d 6d 65 6e 74 73 20 | Other c|omments |
|00000210| 61 72 65 20 69 67 6e 6f | 72 65 64 20 62 75 74 20 |are igno|red but |
|00000220| 74 68 65 79 20 73 68 6f | 75 6c 64 20 65 78 70 6c |they sho|uld expl|
|00000230| 61 69 6e 20 77 68 61 74 | 0a 79 6f 75 20 74 68 6f |ain what|.you tho|
|00000240| 75 67 68 74 20 77 68 65 | 6e 20 79 6f 75 20 77 72 |ught whe|n you wr|
|00000250| 6f 74 65 20 74 68 65 20 | 63 6f 64 65 2e 20 49 66 |ote the |code. If|
|00000260| 20 79 6f 75 20 72 65 61 | 6c 6c 79 20 63 61 6e 27 | you rea|lly can'|
|00000270| 74 20 74 68 69 6e 6b 20 | 6f 66 20 61 6e 0a 65 78 |t think |of an.ex|
|00000280| 70 6c 61 6e 61 74 69 6f | 6e 2c 20 74 68 65 6e 20 |planatio|n, then |
|00000290| 64 6f 6e 27 74 20 77 72 | 69 74 65 20 74 68 65 20 |don't wr|ite the |
|000002a0| 63 6f 64 65 20 61 20 73 | 65 63 6f 6e 64 20 74 69 |code a s|econd ti|
|000002b0| 6d 65 20 6c 69 6b 65 20 | 74 68 69 73 3a 0a 0a 5c |me like |this:..\|
|000002c0| 62 65 67 69 6e 7b 65 78 | 61 6d 70 6c 65 7d 0a 2f |begin{ex|ample}./|
|000002d0| 2a 20 54 68 69 73 20 61 | 64 64 73 20 31 20 74 6f |* This a|dds 1 to|
|000002e0| 20 74 20 2a 2f 0a 74 20 | 2b 2b 3b 0a 5c 65 6e 64 | t */.t |++;.\end|
|000002f0| 7b 65 78 61 6d 70 6c 65 | 7d 0a 0a 57 68 61 74 20 |{example|}..What |
|00000300| 77 65 20 74 68 69 6e 6b | 20 6f 66 20 69 73 20 74 |we think| of is t|
|00000310| 68 69 73 3a 0a 0a 5c 62 | 65 67 69 6e 7b 65 78 61 |his:..\b|egin{exa|
|00000320| 6d 70 6c 65 7d 0a 2f 2a | 20 47 6f 20 6f 6e 20 77 |mple}./*| Go on w|
|00000330| 69 74 68 20 6e 65 78 74 | 20 65 6c 65 6d 65 6e 74 |ith next| element|
|00000340| 20 2a 2f 0a 74 20 2b 2b | 3b 0a 5c 65 6e 64 7b 65 | */.t ++|;.\end{e|
|00000350| 78 61 6d 70 6c 65 7d 0a | 0a 5c 73 75 62 73 65 63 |xample}.|.\subsec|
|00000360| 74 69 6f 6e 7b 46 75 6e | 63 74 69 6f 6e 20 70 72 |tion{Fun|ction pr|
|00000370| 6f 74 6f 74 79 70 65 73 | 20 61 6e 64 20 68 65 61 |ototypes| and hea|
|00000380| 64 65 72 73 7d 0a 0a 45 | 76 65 72 79 20 66 75 6e |ders}..E|very fun|
|00000390| 63 74 69 6f 6e 20 69 6e | 20 41 52 4f 53 20 6d 75 |ction in| AROS mu|
|000003a0| 73 74 20 68 61 76 65 20 | 61 20 66 75 6c 6c 20 41 |st have |a full A|
|000003b0| 4e 53 49 20 43 20 70 72 | 6f 74 6f 74 79 70 65 2e |NSI C pr|ototype.|
|000003c0| 20 50 72 6f 74 6f 74 79 | 70 65 73 20 73 68 6f 75 | Prototy|pes shou|
|000003d0| 6c 64 0a 62 65 20 63 6f | 6c 6c 65 63 74 65 64 20 |ld.be co|llected |
|000003e0| 69 6e 20 69 6e 20 6f 6e | 65 20 68 65 61 64 65 72 |in in on|e header|
|000003f0| 20 70 65 72 20 66 69 6c | 65 20 69 66 20 69 74 20 | per fil|e if it |
|00000400| 69 73 20 6e 65 65 64 65 | 64 20 62 79 20 6f 6e 6c |is neede|d by onl|
|00000410| 79 20 61 20 66 65 77 20 | 66 69 6c 65 73 0a 28 6e |y a few |files.(n|
|00000420| 6f 20 6e 65 65 64 20 74 | 6f 20 72 65 63 6f 6d 70 |o need t|o recomp|
|00000430| 69 6c 65 20 74 68 65 20 | 77 68 6f 6c 65 20 70 72 |ile the |whole pr|
|00000440| 6f 6a 65 63 74 20 69 66 | 20 79 6f 75 20 63 68 61 |oject if| you cha|
|00000450| 6e 67 65 20 61 20 66 75 | 6e 63 74 69 6f 6e 20 77 |nge a fu|nction w|
|00000460| 68 69 63 68 20 75 73 65 | 64 0a 6f 6e 6c 79 20 6f |hich use|d.only o|
|00000470| 6e 63 65 29 2c 20 69 6e | 20 6f 6e 65 20 68 65 61 |nce), in| one hea|
|00000480| 64 65 72 20 70 65 72 20 | 64 69 72 65 63 74 6f 72 |der per |director|
|00000490| 79 20 69 66 20 69 74 27 | 73 20 61 20 63 6f 6d 6d |y if it'|s a comm|
|000004a0| 6f 6e 6c 79 20 75 73 65 | 64 20 66 75 6e 63 74 69 |only use|d functi|
|000004b0| 6f 6e 20 69 6e 0a 74 68 | 61 74 20 64 69 72 65 63 |on in.th|at direc|
|000004c0| 74 6f 72 79 20 6f 72 20 | 69 6e 20 6f 6e 65 20 68 |tory or |in one h|
|000004d0| 65 61 64 65 72 20 70 65 | 72 20 6c 6f 67 69 63 61 |eader pe|r logica|
|000004e0| 6c 20 67 72 6f 75 70 20 | 28 69 65 2e 20 6f 6e 65 |l group |(ie. one|
|000004f0| 20 68 65 61 64 65 72 20 | 66 6f 72 20 61 6c 6c 0a | header |for all.|
|00000500| 66 75 6e 63 74 69 6f 6e | 73 20 69 6e 20 61 20 6c |function|s in a l|
|00000510| 69 62 72 61 72 79 29 2e | 0a 0a 54 68 65 20 66 75 |ibrary).|..The fu|
|00000520| 6e 63 74 69 6f 6e 20 68 | 65 61 64 65 72 20 28 69 |nction h|eader (i|
|00000530| 65 2e 20 74 68 65 20 63 | 6f 6d 6d 65 6e 74 20 62 |e. the c|omment b|
|00000540| 65 66 6f 72 65 20 74 68 | 65 20 66 75 6e 63 74 69 |efore th|e functi|
|00000550| 6f 6e 29 20 6d 75 73 74 | 20 62 65 20 6f 66 20 61 |on) must| be of a|
|00000560| 0a 73 70 65 63 69 61 6c | 20 66 6f 72 6d 61 74 20 |.special| format |
|00000570| 62 65 63 61 75 73 65 20 | 74 68 65 20 41 75 74 6f |because |the Auto|
|00000580| 44 6f 63 73 20 61 72 65 | 20 67 65 6e 65 72 61 74 |Docs are| generat|
|00000590| 65 64 20 66 72 6f 6d 20 | 69 74 2e 20 48 65 72 65 |ed from |it. Here|
|000005a0| 20 69 73 20 61 6e 0a 65 | 78 61 6d 70 6c 65 20 66 | is an.e|xample f|
|000005b0| 6f 72 20 69 74 20 28 66 | 72 6f 6d 20 5c 66 69 6c |or it (f|rom \fil|
|000005c0| 65 6e 61 6d 65 7b 41 52 | 4f 53 2f 65 78 65 63 2f |ename{AR|OS/exec/|
|000005d0| 61 64 64 68 65 61 64 2e | 63 7d 29 3a 0a 0a 5c 62 |addhead.|c}):..\b|
|000005e0| 65 67 69 6e 7b 65 78 61 | 6d 70 6c 65 7d 0a 2f 2a |egin{exa|mple}./*|
|000005f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000600| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000610| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000620| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000630| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 0a 0a 20 20 |********|****.. |
|00000640| 20 20 4e 41 4d 45 20 2a | 2f 0a 23 69 6e 63 6c 75 | NAME *|/.#inclu|
|00000650| 64 65 20 3c 65 78 65 63 | 2f 6c 69 73 74 73 2e 68 |de <exec|/lists.h|
|00000660| 3e 0a 23 69 6e 63 6c 75 | 64 65 20 3c 63 6c 69 62 |>.#inclu|de <clib|
|00000670| 2f 65 78 65 63 5f 70 72 | 6f 74 6f 73 2e 68 3e 0a |/exec_pr|otos.h>.|
|00000680| 0a 09 41 52 4f 53 5f 4c | 48 32 49 28 76 6f 69 64 |..AROS_L|H2I(void|
|00000690| 2c 20 41 64 64 48 65 61 | 64 2c 0a 0a 2f 2a 20 20 |, AddHea|d,../* |
|000006a0| 53 59 4e 4f 50 53 49 53 | 20 2a 2f 0a 09 41 52 4f |SYNOPSIS| */..ARO|
|000006b0| 53 5f 4c 48 41 28 73 74 | 72 75 63 74 20 4c 69 73 |S_LHA(st|ruct Lis|
|000006c0| 74 20 2a 2c 20 6c 69 73 | 74 2c 20 41 30 29 2c 0a |t *, lis|t, A0),.|
|000006d0| 09 41 52 4f 53 5f 4c 48 | 41 28 73 74 72 75 63 74 |.AROS_LH|A(struct|
|000006e0| 20 4e 6f 64 65 20 2a 2c | 20 6e 6f 64 65 2c 20 41 | Node *,| node, A|
|000006f0| 31 29 2c 0a 0a 2f 2a 20 | 20 4c 4f 43 41 54 49 4f |1),../* | LOCATIO|
|00000700| 4e 20 2a 2f 0a 09 73 74 | 72 75 63 74 20 45 78 65 |N */..st|ruct Exe|
|00000710| 63 42 61 73 65 20 2a 2c | 20 53 79 73 42 61 73 65 |cBase *,| SysBase|
|00000720| 2c 20 34 30 2c 20 45 78 | 65 63 29 0a 0a 2f 2a 20 |, 40, Ex|ec)../* |
|00000730| 20 46 55 4e 43 54 49 4f | 4e 0a 09 49 6e 73 65 72 | FUNCTIO|N..Inser|
|00000740| 74 20 4e 6f 64 65 20 6e | 6f 64 65 20 61 73 20 74 |t Node n|ode as t|
|00000750| 68 65 20 66 69 72 73 74 | 20 6e 6f 64 65 20 6f 66 |he first| node of|
|00000760| 20 74 68 65 20 6c 69 73 | 74 2e 0a 0a 20 20 20 20 | the lis|t... |
|00000770| 49 4e 50 55 54 53 0a 09 | 6c 69 73 74 20 2d 20 54 |INPUTS..|list - T|
|00000780| 68 65 20 6c 69 73 74 20 | 74 6f 20 69 6e 73 65 72 |he list |to inser|
|00000790| 74 20 74 68 65 20 6e 6f | 64 65 20 69 6e 74 6f 0a |t the no|de into.|
|000007a0| 09 6e 6f 64 65 20 2d 20 | 54 68 69 73 20 6e 6f 64 |.node - |This nod|
|000007b0| 65 20 69 73 20 74 6f 20 | 62 65 20 69 6e 73 65 72 |e is to |be inser|
|000007c0| 74 65 64 0a 0a 20 20 20 | 20 52 45 53 55 4c 54 0a |ted.. | RESULT.|
|000007d0| 09 4e 6f 6e 65 2e 0a 0a | 20 20 20 20 4e 4f 54 45 |.None...| NOTE|
|000007e0| 53 0a 0a 20 20 20 20 45 | 58 41 4d 50 4c 45 0a 09 |S.. E|XAMPLE..|
|000007f0| 73 74 72 75 63 74 20 4c | 69 73 74 20 2a 20 6c 69 |struct L|ist * li|
|00000800| 73 74 3b 0a 09 73 74 72 | 75 63 74 20 4e 6f 64 65 |st;..str|uct Node|
|00000810| 20 2a 20 70 72 65 64 3b | 0a 0a 09 2f 2f 20 49 6e | * pred;|...// In|
|00000820| 73 65 72 74 20 4e 6f 64 | 65 20 61 74 20 74 6f 70 |sert Nod|e at top|
|00000830| 0a 09 41 64 64 48 65 61 | 64 20 28 6c 69 73 74 2c |..AddHea|d (list,|
|00000840| 20 6e 6f 64 65 29 3b 0a | 0a 20 20 20 20 42 55 47 | node);.|. BUG|
|00000850| 53 0a 0a 20 20 20 20 53 | 45 45 20 41 4c 53 4f 0a |S.. S|EE ALSO.|
|00000860| 09 4e 65 77 4c 69 73 74 | 28 29 2c 20 41 64 64 54 |.NewList|(), AddT|
|00000870| 61 69 6c 28 29 2c 20 49 | 6e 73 65 72 74 28 29 2c |ail(), I|nsert(),|
|00000880| 20 52 65 6d 6f 76 65 28 | 29 2c 20 52 65 6d 48 65 | Remove(|), RemHe|
|00000890| 61 64 28 29 2c 20 52 65 | 6d 54 61 69 6c 28 29 2c |ad(), Re|mTail(),|
|000008a0| 0a 09 45 6e 71 75 65 75 | 65 28 29 0a 0a 20 20 20 |..Enqueu|e().. |
|000008b0| 20 49 4e 54 45 52 4e 41 | 4c 53 0a 0a 20 20 20 20 | INTERNA|LS.. |
|000008c0| 48 49 53 54 4f 52 59 0a | 09 32 36 2d 30 38 2d 39 |HISTORY.|.26-08-9|
|000008d0| 35 20 20 20 20 64 69 67 | 75 6c 6c 61 20 63 72 65 |5 dig|ulla cre|
|000008e0| 61 74 65 64 20 61 66 74 | 65 72 20 45 58 45 43 2d |ated aft|er EXEC-|
|000008f0| 52 6f 75 74 69 6e 65 0a | 09 32 36 2d 31 30 2d 39 |Routine.|.26-10-9|
|00000900| 35 20 20 20 20 64 69 67 | 75 6c 6c 61 20 61 64 6a |5 dig|ulla adj|
|00000910| 75 73 74 65 64 20 74 6f | 20 6e 65 77 20 63 61 6c |usted to| new cal|
|00000920| 6c 69 6e 67 20 73 63 68 | 65 6d 65 0a 0a 2a 2a 2a |ling sch|eme..***|
|00000930| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000940| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000950| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000960| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000970| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2f 0a 7b 0a 5c |********|***/.{.\|
|00000980| 65 6e 64 7b 65 78 61 6d | 70 6c 65 7d 0a 0a 41 73 |end{exam|ple}..As|
|00000990| 20 79 6f 75 20 63 61 6e | 20 73 65 65 2c 20 63 6f | you can| see, co|
|000009a0| 6d 6d 65 6e 74 73 20 61 | 72 65 20 75 73 65 64 20 |mments a|re used |
|000009b0| 74 6f 20 6d 65 72 67 65 | 20 74 68 65 20 66 75 6e |to merge| the fun|
|000009c0| 63 74 69 6f 6e 20 70 72 | 6f 74 6f 74 79 70 65 20 |ction pr|ototype |
|000009d0| 61 6e 64 20 74 68 65 0a | 68 65 61 64 65 72 20 69 |and the.|header i|
|000009e0| 6e 74 6f 20 6f 6e 65 2e | 0a 0a 5c 62 65 67 69 6e |nto one.|..\begin|
|000009f0| 7b 64 65 73 63 72 69 70 | 74 69 6f 6e 7d 0a 5c 69 |{descrip|tion}.\i|
|00000a00| 74 65 6d 7b 4e 41 4d 45 | 7d 20 54 68 69 73 20 66 |tem{NAME|} This f|
|00000a10| 69 65 6c 64 20 63 6f 6e | 74 61 69 6e 73 20 61 6c |ield con|tains al|
|00000a20| 6c 20 6e 65 63 63 65 73 | 73 61 72 79 20 70 72 6f |l necces|sary pro|
|00000a30| 74 6f 74 79 70 65 73 20 | 74 6f 20 75 73 65 20 74 |totypes |to use t|
|00000a40| 68 65 20 66 75 6e 63 74 | 69 6f 6e 0a 66 72 6f 6d |he funct|ion.from|
|00000a50| 20 74 68 65 20 75 73 65 | 72 20 70 6f 69 6e 74 20 | the use|r point |
|00000a60| 6f 66 20 76 69 65 77 20 | 61 6e 64 20 74 68 65 20 |of view |and the |
|00000a70| 6e 61 6d 65 20 6f 66 20 | 74 68 65 20 66 75 6e 63 |name of |the func|
|00000a80| 74 69 6f 6e 20 69 6e 20 | 61 20 7c 41 52 4f 53 5f |tion in |a |AROS_|
|00000a90| 4c 48 2a 28 29 7c 0a 6d | 61 63 72 6f 20 28 4c 69 |LH*()|.m|acro (Li|
|00000aa0| 62 72 61 72 79 20 48 65 | 61 64 65 72 29 2e 20 54 |brary He|ader). T|
|00000ab0| 68 65 73 65 20 6d 61 63 | 72 6f 73 20 61 72 65 20 |hese mac|ros are |
|00000ac0| 75 73 65 64 20 74 6f 20 | 6d 61 6b 65 20 74 68 65 |used to |make the|
|00000ad0| 20 73 61 6d 65 20 63 6f | 64 65 20 77 6f 72 6b 20 | same co|de work |
|00000ae0| 6f 6e 0a 64 69 66 66 65 | 72 65 6e 74 20 6b 69 6e |on.diffe|rent kin|
|00000af0| 64 20 6f 66 20 68 61 72 | 64 77 61 72 65 73 2e 20 |d of har|dwares. |
|00000b00| 54 68 65 20 6e 61 6d 65 | 20 6f 66 20 74 68 65 20 |The name| of the |
|00000b10| 6d 61 63 72 6f 20 64 65 | 70 65 6e 64 73 20 6f 6e |macro de|pends on|
|00000b20| 20 74 68 65 20 61 6d 6f | 75 6e 74 20 6f 66 0a 70 | the amo|unt of.p|
|00000b30| 61 72 61 6d 65 74 65 72 | 73 20 61 6e 64 20 77 68 |arameter|s and wh|
|00000b40| 65 74 68 65 72 20 74 68 | 65 20 66 75 6e 63 74 69 |ether th|e functi|
|00000b50| 6f 6e 20 6e 65 65 64 73 | 20 74 68 65 20 6c 69 62 |on needs| the lib|
|00000b60| 72 61 72 79 20 62 61 73 | 65 2e 20 7c 41 64 64 48 |rary bas|e. |AddH|
|00000b70| 65 61 64 28 29 7c 0a 64 | 6f 65 73 20 6e 6f 74 20 |ead()|.d|oes not |
|00000b80| 61 6e 64 20 74 68 65 72 | 65 66 6f 72 65 20 61 6e |and ther|efore an|
|00000b90| 20 22 49 22 20 69 73 20 | 61 70 70 65 6e 64 65 64 | "I" is |appended|
|00000ba0| 20 74 6f 20 74 68 65 20 | 6d 61 63 72 6f 73 20 6e | to the |macros n|
|00000bb0| 61 6d 65 2e 20 49 66 20 | 69 74 20 6e 65 65 64 0a |ame. If |it need.|
|00000bc0| 74 68 65 20 6c 69 62 72 | 61 72 79 20 62 61 73 65 |the libr|ary base|
|00000bd0| 20 28 6c 69 6b 65 20 7c | 41 64 64 54 61 73 6b 28 | (like ||AddTask(|
|00000be0| 29 7c 29 2c 20 74 68 65 | 6e 20 74 68 65 20 22 49 |)|), the|n the "I|
|00000bf0| 22 20 69 73 20 6f 6d 69 | 74 74 65 64 2e 0a 0a 49 |" is omi|tted...I|
|00000c00| 66 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 69 |f the fu|nction i|
|00000c10| 73 20 6e 6f 74 20 70 61 | 72 74 20 6f 66 20 61 20 |s not pa|rt of a |
|00000c20| 73 68 61 72 65 64 20 6c | 69 62 72 61 72 79 20 61 |shared l|ibrary a|
|00000c30| 6e 64 20 69 74 27 73 20 | 61 72 67 75 6d 65 6e 74 |nd it's |argument|
|00000c40| 73 20 6d 75 73 74 20 62 | 65 0a 70 61 73 73 65 64 |s must b|e.passed|
|00000c50| 20 69 6e 20 63 65 72 74 | 61 69 6e 20 72 65 67 69 | in cert|ain regi|
|00000c60| 73 74 65 72 73 20 28 65 | 67 2e 20 63 61 6c 6c 62 |sters (e|g. callb|
|00000c70| 61 63 6b 20 68 6f 6f 6b | 73 29 2c 20 79 6f 75 20 |ack hook|s), you |
|00000c80| 6d 75 73 74 20 75 73 65 | 0a 7c 41 52 4f 53 5f 55 |must use|.|AROS_U|
|00000c90| 46 48 2a 28 29 7c 20 6d | 61 63 72 6f 73 20 28 55 |FH*()| m|acros (U|
|00000ca0| 73 65 72 20 46 75 6e 63 | 74 69 6f 6e 20 48 65 61 |ser Func|tion Hea|
|00000cb0| 64 65 72 29 20 69 6e 73 | 74 65 61 64 20 6f 66 20 |der) ins|tead of |
|00000cc0| 7c 41 52 4f 53 5f 4c 48 | 2a 28 29 7c 2e 20 41 70 ||AROS_LH|*()|. Ap|
|00000cd0| 70 65 6e 64 0a 74 68 65 | 20 6e 75 6d 62 65 72 20 |pend.the| number |
|00000ce0| 6f 66 20 61 72 67 75 6d | 65 6e 74 73 20 74 6f 20 |of argum|ents to |
|00000cf0| 74 68 69 73 20 6d 61 63 | 72 6f 2e 20 53 69 6e 63 |this mac|ro. Sinc|
|00000d00| 65 20 69 74 20 68 61 73 | 20 6e 65 76 65 72 20 61 |e it has| never a|
|00000d10| 20 62 61 73 65 2c 20 74 | 68 65 20 66 69 65 6c 64 | base, t|he field|
|00000d20| 0a 4c 4f 43 41 54 49 4f | 4e 20 6d 75 73 74 20 62 |.LOCATIO|N must b|
|00000d30| 65 20 6f 6d 69 74 74 65 | 64 20 61 6e 64 20 69 74 |e omitte|d and it|
|00000d40| 27 73 20 6e 6f 74 20 6e | 65 63 63 65 73 73 61 72 |'s not n|eccessar|
|00000d50| 79 20 74 6f 20 61 70 70 | 65 6e 64 20 74 68 65 20 |y to app|end the |
|00000d60| 22 49 22 20 74 6f 20 74 | 68 65 0a 6d 61 63 72 6f |"I" to t|he.macro|
|00000d70| 73 20 6e 61 6d 65 2e 20 | 41 6e 20 65 78 61 6d 70 |s name. |An examp|
|00000d80| 6c 65 20 66 6f 72 20 61 | 20 63 61 6c 6c 62 61 63 |le for a| callbac|
|00000d90| 6b 20 68 6f 6f 6b 20 7c | 66 6f 6f 28 29 7c 20 77 |k hook ||foo()| w|
|00000da0| 6f 75 6c 64 20 62 65 3a | 0a 0a 5c 62 65 67 69 6e |ould be:|..\begin|
|00000db0| 7b 65 78 61 6d 70 6c 65 | 7d 0a 41 52 4f 53 5f 55 |{example|}.AROS_U|
|00000dc0| 46 48 33 28 55 4c 4f 4e | 47 2c 20 66 6f 6f 2c 0a |FH3(ULON|G, foo,.|
|00000dd0| 20 20 20 20 41 52 4f 53 | 5f 55 46 48 41 28 73 74 | AROS|_UFHA(st|
|00000de0| 72 75 63 74 20 48 6f 6f | 6b 2c 20 68 6f 6f 6b 2c |ruct Hoo|k, hook,|
|00000df0| 20 20 41 30 29 2c 0a 20 | 20 20 20 41 52 4f 53 5f | A0),. | AROS_|
|00000e00| 55 46 48 41 28 41 50 54 | 52 2c 20 20 20 20 20 20 |UFHA(APT|R, |
|00000e10| 20 20 6f 62 6a 2c 20 20 | 20 41 32 29 2c 0a 20 20 | obj, | A2),. |
|00000e20| 20 20 41 52 4f 53 5f 55 | 46 48 41 28 41 50 54 52 | AROS_U|FHA(APTR|
|00000e30| 2c 20 20 20 20 20 20 20 | 20 70 61 72 61 6d 2c 20 |, | param, |
|00000e40| 41 31 29 0a 29 0a 5c 65 | 6e 64 7b 65 78 61 6d 70 |A1).).\e|nd{examp|
|00000e50| 6c 65 7d 0a 0a 28 6e 6f | 74 65 20 74 68 61 74 20 |le}..(no|te that |
|00000e60| 74 68 65 20 72 65 67 69 | 73 74 65 72 73 20 6e 65 |the regi|sters ne|
|00000e70| 65 64 20 6e 6f 74 20 68 | 61 76 65 20 61 20 70 61 |ed not h|ave a pa|
|00000e80| 72 74 69 63 75 6c 61 72 | 20 6f 72 64 65 72 29 2e |rticular| order).|
|00000e90| 0a 0a 49 66 20 74 68 65 | 20 66 75 6e 63 74 69 6f |..If the| functio|
|00000ea0| 6e 20 69 73 20 6e 6f 74 | 20 70 61 72 74 20 6f 66 |n is not| part of|
|00000eb0| 20 61 20 73 68 61 72 65 | 64 20 6c 69 62 72 61 72 | a share|d librar|
|00000ec0| 79 20 61 6e 64 20 69 74 | 27 73 20 61 72 67 75 6d |y and it|'s argum|
|00000ed0| 65 6e 74 73 20 6e 65 65 | 64 20 6e 6f 74 0a 62 65 |ents nee|d not.be|
|00000ee0| 20 69 6e 20 73 70 65 63 | 69 66 69 63 20 72 65 67 | in spec|ific reg|
|00000ef0| 69 73 74 65 72 73 2c 20 | 79 6f 75 20 6e 65 65 64 |isters, |you need|
|00000f00| 20 6e 6f 20 7c 41 52 4f | 53 5f 2a 48 2a 28 29 7c | no |ARO|S_*H*()||
|00000f10| 20 6d 61 63 72 6f 73 3a | 0a 0a 5c 62 65 67 69 6e | macros:|..\begin|
|00000f20| 7b 65 78 61 6d 70 6c 65 | 7d 0a 2f 2a 2a 2a 2a 2a |{example|}./*****|
|00000f30| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000f40| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000f50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000f60| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000f70| 2a 2a 2a 2a 2a 2a 2a 2a | 0a 0a 20 20 20 20 4e 41 |********|.. NA|
|00000f80| 4d 45 20 2a 2f 0a 23 69 | 6e 63 6c 75 64 65 20 3c |ME */.#i|nclude <|
|00000f90| 68 65 61 64 65 72 2e 68 | 3e 0a 0a 09 69 6e 74 20 |header.h|>...int |
|00000fa0| 66 6f 6f 20 28 0a 0a 2f | 2a 20 20 53 59 4e 4f 50 |foo (../|* SYNOP|
|00000fb0| 53 49 53 20 2a 2f 0a 09 | 69 6e 74 20 61 2c 0a 09 |SIS */..|int a,..|
|00000fc0| 69 6e 74 20 62 29 0a 0a | 2f 2a 20 20 46 55 4e 43 |int b)..|/* FUNC|
|00000fd0| 54 49 4f 4e 0a 09 62 6c | 61 68 62 6c 61 68 62 6c |TION..bl|ahblahbl|
|00000fe0| 61 68 2e 0a 09 2e 2e 2e | 0a 0a 2a 2a 2a 2a 2a 2a |ah......|..******|
|00000ff0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001000| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001010| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001020| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001030| 2a 2a 2a 2a 2a 2a 2a 2f | 0a 5c 65 6e 64 7b 65 78 |*******/|.\end{ex|
|00001040| 61 6d 70 6c 65 7d 0a 0a | 5c 69 74 65 6d 7b 53 59 |ample}..|\item{SY|
|00001050| 4e 4f 50 53 49 53 7d 20 | 54 68 69 73 20 66 69 65 |NOPSIS} |This fie|
|00001060| 6c 64 20 63 6f 6e 74 61 | 69 6e 73 20 61 6c 6c 20 |ld conta|ins all |
|00001070| 61 72 67 75 6d 65 6e 74 | 73 20 6f 66 20 74 68 65 |argument|s of the|
|00001080| 20 66 75 6e 63 74 69 6f | 6e 20 6f 6e 65 20 62 79 | functio|n one by|
|00001090| 0a 6f 6e 65 20 69 6e 20 | 7c 41 52 4f 53 5f 4c 48 |.one in ||AROS_LH|
|000010a0| 41 28 29 7c 20 6d 61 63 | 72 6f 73 20 28 4c 69 62 |A()| mac|ros (Lib|
|000010b0| 72 61 72 79 20 48 65 61 | 64 65 72 20 41 72 67 75 |rary Hea|der Argu|
|000010c0| 6d 65 6e 74 29 2e 20 54 | 68 69 73 20 6d 61 63 72 |ment). T|his macr|
|000010d0| 6f 20 6d 61 6b 65 73 20 | 73 75 72 65 0a 74 68 65 |o makes |sure.the|
|000010e0| 20 72 65 73 70 65 63 74 | 69 76 65 20 61 72 67 75 | respect|ive argu|
|000010f0| 6d 65 6e 74 20 69 73 20 | 70 75 74 20 69 6e 20 74 |ment is |put in t|
|00001100| 68 65 20 72 69 67 68 74 | 20 43 50 55 20 72 65 67 |he right| CPU reg|
|00001110| 69 73 74 65 72 20 77 68 | 65 6e 20 74 68 65 20 66 |ister wh|en the f|
|00001120| 75 6e 63 74 69 6f 6e 0a | 69 73 20 63 61 6c 6c 65 |unction.|is calle|
|00001130| 64 20 28 69 66 20 70 6f | 73 73 69 62 6c 65 20 61 |d (if po|ssible a|
|00001140| 6e 64 20 6e 65 63 63 65 | 73 73 61 72 79 29 2e 20 |nd necce|ssary). |
|00001150| 54 68 65 20 66 69 72 73 | 74 20 61 72 67 75 6d 65 |The firs|t argume|
|00001160| 6e 74 20 66 6f 72 20 74 | 68 65 20 6d 61 63 72 6f |nt for t|he macro|
|00001170| 20 69 73 0a 74 68 65 20 | 74 79 70 65 20 6f 66 20 | is.the |type of |
|00001180| 74 68 65 20 70 61 72 61 | 6d 65 74 65 72 20 66 6f |the para|meter fo|
|00001190| 6c 6c 6f 77 65 64 20 62 | 79 20 74 68 65 20 6e 61 |llowed b|y the na|
|000011a0| 6d 65 20 6f 66 20 74 68 | 65 20 70 61 72 61 6d 65 |me of th|e parame|
|000011b0| 74 65 72 20 61 6e 64 20 | 74 68 65 0a 72 65 67 69 |ter and |the.regi|
|000011c0| 73 74 65 72 20 74 68 65 | 20 70 61 72 61 6d 65 74 |ster the| paramet|
|000011d0| 65 72 20 69 73 20 65 78 | 70 65 63 74 65 64 20 69 |er is ex|pected i|
|000011e0| 6e 2e 20 56 61 6c 69 64 | 20 6e 61 6d 65 73 20 66 |n. Valid| names f|
|000011f0| 6f 72 20 72 65 67 69 73 | 74 65 72 73 20 61 72 65 |or regis|ters are|
|00001200| 20 44 30 2c 0a 44 31 2c | 20 44 32 20 75 70 74 6f | D0,.D1,| D2 upto|
|00001210| 20 44 37 20 61 6e 64 20 | 41 30 20 75 70 74 6f 20 | D7 and |A0 upto |
|00001220| 41 36 2e 0a 0a 49 66 20 | 74 68 65 20 66 75 6e 63 |A6...If |the func|
|00001230| 74 69 6f 6e 20 69 73 20 | 6e 6f 74 20 70 61 72 74 |tion is |not part|
|00001240| 20 6f 66 20 61 20 6c 69 | 62 72 61 72 79 20 62 75 | of a li|brary bu|
|00001250| 74 20 74 68 65 20 61 72 | 67 75 6d 65 6e 74 73 20 |t the ar|guments |
|00001260| 6d 75 73 74 20 62 65 20 | 70 61 73 73 65 64 0a 74 |must be |passed.t|
|00001270| 6f 20 69 74 20 69 6e 20 | 72 65 67 69 73 74 65 72 |o it in |register|
|00001280| 73 2c 20 74 68 65 6e 20 | 75 73 65 20 7c 41 52 4f |s, then |use |ARO|
|00001290| 53 5f 55 46 48 41 28 29 | 7c 20 6d 61 63 72 6f 73 |S_UFHA()|| macros|
|000012a0| 20 28 55 73 65 72 20 46 | 75 6e 63 74 69 6f 6e 20 | (User F|unction |
|000012b0| 48 65 61 64 65 72 0a 41 | 72 67 75 6d 65 6e 74 29 |Header.A|rgument)|
|000012c0| 20 77 68 69 63 68 20 74 | 61 6b 65 20 74 68 65 20 | which t|ake the |
|000012d0| 73 61 6d 65 20 70 61 72 | 61 6d 65 74 65 72 73 20 |same par|ameters |
|000012e0| 61 73 20 74 68 65 20 7c | 41 52 4f 53 5f 4c 48 41 |as the ||AROS_LHA|
|000012f0| 28 29 7c 20 6d 61 63 72 | 6f 73 2e 20 44 6f 6e 27 |()| macr|os. Don'|
|00001300| 74 0a 66 6f 72 67 65 74 | 20 74 68 65 20 63 6c 6f |t.forget| the clo|
|00001310| 73 69 6e 67 20 70 61 72 | 65 6e 74 68 65 73 65 20 |sing par|enthese |
|00001320| 66 6f 72 20 74 68 65 20 | 41 52 4f 53 5f 55 46 43 |for the |AROS_UFC|
|00001330| 0a 0a 49 66 20 74 68 65 | 20 66 75 6e 63 74 69 6f |..If the| functio|
|00001340| 6e 20 69 73 20 6e 6f 74 | 20 70 61 72 74 20 6f 66 |n is not| part of|
|00001350| 20 61 20 6c 69 62 72 61 | 72 79 20 61 6e 64 20 74 | a libra|ry and t|
|00001360| 68 65 20 61 72 67 75 6d | 65 6e 74 73 20 6e 65 65 |he argum|ents nee|
|00001370| 64 20 6e 6f 74 20 62 65 | 0a 70 61 73 73 65 64 20 |d not be|.passed |
|00001380| 69 6e 20 72 65 67 69 73 | 74 65 72 73 2c 20 6e 6f |in regis|ters, no|
|00001390| 20 6d 61 63 72 6f 73 20 | 61 72 65 20 6e 65 63 63 | macros |are necc|
|000013a0| 65 73 73 61 72 79 2e 0a | 0a 5c 69 74 65 6d 7b 4c |essary..|.\item{L|
|000013b0| 4f 43 41 54 49 4f 4e 7d | 20 54 68 69 73 20 66 69 |OCATION}| This fi|
|000013c0| 65 6c 64 20 69 73 20 6e | 65 63 63 65 73 73 61 72 |eld is n|eccessar|
|000013d0| 79 20 66 6f 72 20 73 68 | 61 72 65 64 20 6c 69 62 |y for sh|ared lib|
|000013e0| 72 61 72 69 65 73 20 6f | 6e 6c 79 2e 20 49 74 0a |raries o|nly. It.|
|000013f0| 63 6f 6e 74 61 69 6e 73 | 20 74 68 65 20 6c 61 73 |contains| the las|
|00001400| 74 20 66 6f 75 72 20 70 | 61 72 61 6d 65 74 65 72 |t four p|arameter|
|00001410| 73 20 66 6f 72 20 74 68 | 65 20 7c 41 52 4f 53 5f |s for th|e |AROS_|
|00001420| 4c 48 2a 28 29 7c 20 6d | 61 63 72 6f 20 77 68 69 |LH*()| m|acro whi|
|00001430| 63 68 20 61 72 65 20 74 | 68 65 0a 74 79 70 65 20 |ch are t|he.type |
|00001440| 6f 66 20 74 68 65 20 6c | 69 62 72 61 72 79 2c 20 |of the l|ibrary, |
|00001450| 74 68 65 20 6e 61 6d 65 | 20 6f 66 20 74 68 65 20 |the name| of the |
|00001460| 76 61 72 69 61 62 6c 65 | 2c 20 69 6e 20 77 68 69 |variable|, in whi|
|00001470| 63 68 20 74 68 65 20 66 | 75 6e 63 74 69 6f 6e 0a |ch the f|unction.|
|00001480| 65 78 70 65 63 74 73 20 | 74 68 65 20 6c 69 62 72 |expects |the libr|
|00001490| 61 72 79 20 62 61 73 65 | 2c 20 74 68 65 20 6f 66 |ary base|, the of|
|000014a0| 66 73 65 74 20 6f 66 20 | 74 68 65 20 66 75 6e 63 |fset of |the func|
|000014b0| 74 69 6f 6e 20 69 6e 20 | 74 68 65 20 6a 75 6d 70 |tion in |the jump|
|000014c0| 74 61 62 6c 65 20 28 74 | 68 65 0a 66 69 72 73 74 |table (t|he.first|
|000014d0| 20 76 65 63 74 6f 72 20 | 68 61 73 20 31 20 61 6e | vector |has 1 an|
|000014e0| 64 20 74 68 65 20 66 69 | 72 73 74 20 76 65 63 74 |d the fi|rst vect|
|000014f0| 6f 72 20 77 68 69 63 68 | 20 6d 61 79 20 62 65 20 |or which| may be |
|00001500| 75 73 65 64 20 62 79 20 | 61 20 66 75 6e 63 74 69 |used by |a functi|
|00001510| 6f 6e 20 69 73 0a 35 29 | 20 61 6e 64 20 74 68 65 |on is.5)| and the|
|00001520| 20 6e 61 6d 65 20 6f 66 | 20 74 68 65 20 6c 69 62 | name of| the lib|
|00001530| 72 61 72 79 2e 0a 0a 5c | 69 74 65 6d 7b 46 55 4e |rary...\|item{FUN|
|00001540| 43 54 49 4f 4e 7d 20 54 | 68 69 73 20 66 69 65 6c |CTION} T|his fiel|
|00001550| 64 20 63 6f 6e 74 61 69 | 6e 73 20 61 20 64 65 73 |d contai|ns a des|
|00001560| 63 72 69 70 74 69 6f 6e | 20 6f 66 20 74 68 65 20 |cription| of the |
|00001570| 66 75 6e 63 74 69 6f 6e | 2e 0a 0a 5c 69 74 65 6d |function|...\item|
|00001580| 7b 49 4e 50 55 54 53 7d | 20 54 68 69 73 20 66 69 |{INPUTS}| This fi|
|00001590| 65 6c 64 20 63 6f 6e 74 | 61 69 6e 73 20 61 20 6c |eld cont|ains a l|
|000015a0| 69 73 74 20 6f 66 20 61 | 6c 6c 20 70 61 72 61 6d |ist of a|ll param|
|000015b0| 65 74 65 72 73 20 6f 66 | 20 74 68 65 20 66 6f 72 |eters of| the for|
|000015c0| 6d 0a 22 6e 61 6d 65 20 | 2d 20 64 65 73 63 72 69 |m."name |- descri|
|000015d0| 70 74 69 6f 6e 22 20 6f | 72 20 22 6e 61 6d 65 2c |ption" o|r "name,|
|000015e0| 20 6e 61 6d 65 2c 20 6e | 61 6d 65 20 2d 20 64 65 | name, n|ame - de|
|000015f0| 73 63 72 69 70 74 69 6f | 6e 22 2e 20 54 68 65 20 |scriptio|n". The |
|00001600| 64 65 73 63 72 69 70 74 | 69 6f 6e 0a 73 68 6f 75 |descript|ion.shou|
|00001610| 6c 64 20 74 65 6c 6c 20 | 77 68 61 74 20 74 68 65 |ld tell |what the|
|00001620| 20 70 61 72 61 6d 65 74 | 65 72 20 69 73 20 61 6e | paramet|er is an|
|00001630| 64 20 77 68 61 74 20 76 | 61 6c 75 65 73 20 63 61 |d what v|alues ca|
|00001640| 6e 20 62 65 20 70 61 73 | 73 65 64 20 74 6f 20 69 |n be pas|sed to i|
|00001650| 74 2e 0a 54 68 65 72 65 | 20 69 73 20 6e 6f 20 70 |t..There| is no p|
|00001660| 6f 69 6e 74 20 69 6e 20 | 65 78 70 6c 61 69 6e 69 |oint in |explaini|
|00001670| 6e 67 20 74 68 65 20 70 | 61 72 61 6d 65 74 65 72 |ng the p|arameter|
|00001680| 20 74 77 69 63 65 20 69 | 6e 20 46 55 4e 43 54 49 | twice i|n FUNCTI|
|00001690| 4f 4e 20 61 6e 64 20 68 | 65 72 65 2e 0a 49 66 20 |ON and h|ere..If |
|000016a0| 74 68 65 20 66 75 6e 63 | 74 69 6f 6e 20 68 61 73 |the func|tion has|
|000016b0| 20 6e 6f 20 70 61 72 61 | 6d 65 74 65 72 73 2c 20 | no para|meters, |
|000016c0| 73 61 79 20 22 4e 6f 6e | 65 2e 22 20 68 65 72 65 |say "Non|e." here|
|000016d0| 2e 0a 0a 5c 69 74 65 6d | 7b 52 45 53 55 4c 54 7d |...\item|{RESULT}|
|000016e0| 20 57 68 61 74 20 74 68 | 65 20 66 75 6e 63 74 69 | What th|e functi|
|000016f0| 6f 6e 20 70 61 73 73 65 | 73 20 62 61 63 6b 2e 20 |on passe|s back. |
|00001700| 54 68 69 73 20 69 6e 63 | 6c 75 64 65 73 20 72 65 |This inc|ludes re|
|00001710| 74 75 72 6e 20 76 61 6c | 75 65 73 0a 61 6e 64 20 |turn val|ues.and |
|00001720| 76 61 6c 75 65 73 20 70 | 61 73 73 65 64 20 69 6e |values p|assed in|
|00001730| 20 61 72 67 75 6d 65 6e | 74 73 20 6f 66 20 74 68 | argumen|ts of th|
|00001740| 65 20 66 75 6e 63 74 69 | 6f 6e 2e 20 49 66 20 74 |e functi|on. If t|
|00001750| 68 65 20 66 75 6e 63 74 | 69 6f 6e 20 6d 61 79 20 |he funct|ion may |
|00001760| 66 61 69 6c 2c 0a 79 6f | 75 20 73 68 6f 75 6c 64 |fail,.yo|u should|
|00001770| 20 65 78 70 6c 61 69 6e | 20 77 68 61 74 20 69 74 | explain| what it|
|00001780| 20 72 65 74 75 72 6e 73 | 20 6f 6e 20 66 61 69 6c | returns| on fail|
|00001790| 75 72 65 20 61 6e 64 20 | 77 68 79 20 69 74 20 6d |ure and |why it m|
|000017a0| 69 67 68 74 20 66 61 69 | 6c 2e 0a 0a 5c 69 74 65 |ight fai|l...\ite|
|000017b0| 6d 7b 4e 4f 54 45 53 7d | 20 49 6d 70 6f 72 74 61 |m{NOTES}| Importa|
|000017c0| 6e 74 20 74 68 69 6e 67 | 73 20 74 68 65 20 75 73 |nt thing|s the us|
|000017d0| 65 72 20 6d 75 73 74 20 | 6b 6e 6f 77 20 6f 72 20 |er must |know or |
|000017e0| 74 61 6b 65 20 69 6e 74 | 6f 20 61 63 63 6f 75 6e |take int|o accoun|
|000017f0| 74 2e 0a 0a 5c 69 74 65 | 6d 7b 45 58 41 4d 50 4c |t...\ite|m{EXAMPL|
|00001800| 45 7d 20 54 68 69 73 20 | 66 69 65 6c 64 20 73 68 |E} This |field sh|
|00001810| 6f 75 6c 64 20 63 6f 6e | 74 61 69 6e 20 61 20 73 |ould con|tain a s|
|00001820| 6d 61 6c 6c 20 6f 72 20 | 66 75 6c 6c 79 20 66 65 |mall or |fully fe|
|00001830| 61 74 75 72 65 64 20 65 | 78 61 6d 70 6c 65 2e 0a |atured e|xample..|
|00001840| 41 20 67 6f 6f 64 20 77 | 61 79 20 74 6f 20 70 72 |A good w|ay to pr|
|00001850| 65 73 65 6e 74 20 61 6e | 20 65 78 61 6d 70 6c 65 |esent an| example|
|00001860| 20 69 73 20 74 6f 20 77 | 72 69 74 65 20 73 6f 6d | is to w|rite som|
|00001870| 65 20 63 6f 64 65 20 77 | 68 69 63 68 20 74 65 73 |e code w|hich tes|
|00001880| 74 73 20 74 68 65 0a 66 | 75 6e 63 74 69 6f 6e 2c |ts the.f|unction,|
|00001890| 20 70 75 74 20 69 74 20 | 69 6e 74 6f 20 7c 23 69 | put it |into |#i|
|000018a0| 66 64 65 66 20 54 45 53 | 54 7c 20 73 6f 6d 65 77 |fdef TES|T| somew|
|000018b0| 68 65 72 65 20 69 6e 20 | 74 68 65 20 66 69 6c 65 |here in |the file|
|000018c0| 20 61 6e 64 20 70 75 74 | 20 61 0a 22 53 65 65 20 | and put| a."See |
|000018d0| 62 65 6c 6f 77 2e 22 20 | 68 65 72 65 2e 20 49 66 |below." |here. If|
|000018e0| 20 79 6f 75 20 6e 65 65 | 64 20 63 6f 6d 6d 65 6e | you nee|d commen|
|000018f0| 74 73 20 69 6e 20 74 68 | 65 20 63 6f 64 65 2c 20 |ts in th|e code, |
|00001900| 79 6f 75 20 68 61 76 65 | 20 74 77 6f 20 77 61 79 |you have| two way|
|00001910| 73 20 66 6f 72 0a 74 68 | 69 73 2e 20 49 66 20 79 |s for.th|is. If y|
|00001920| 6f 75 20 6e 65 65 64 20 | 6f 6e 6c 79 20 73 68 6f |ou need |only sho|
|00001930| 72 74 20 6f 6e 65 2d 6c | 69 6e 65 20 63 6f 6d 6d |rt one-l|ine comm|
|00001940| 65 6e 74 73 2c 20 75 73 | 65 20 43 2b 2b 20 73 74 |ents, us|e C++ st|
|00001950| 79 6c 65 20 28 7c 2f 2f | 0a 63 6f 6d 6d 65 6e 74 |yle (|//|.comment|
|00001960| 7c 29 2e 20 45 76 65 72 | 79 74 68 69 6e 67 20 66 ||). Ever|ything f|
|00001970| 72 6f 6d 20 74 68 65 20 | 7c 2f 2f 7c 20 74 6f 20 |rom the ||//| to |
|00001980| 74 68 65 20 65 6e 64 20 | 69 66 20 74 68 65 20 6c |the end |if the l|
|00001990| 69 6e 65 20 69 73 20 74 | 68 65 20 63 6f 6d 6d 65 |ine is t|he comme|
|000019a0| 6e 74 2e 0a 49 66 20 79 | 6f 75 20 6e 65 65 64 20 |nt..If y|ou need |
|000019b0| 6d 6f 72 65 20 63 6f 6d | 6d 65 6e 74 2c 20 74 68 |more com|ment, th|
|000019c0| 65 6e 20 79 6f 75 20 63 | 61 6e 20 65 6e 64 20 74 |en you c|an end t|
|000019d0| 68 65 20 63 6f 6d 6d 65 | 6e 74 20 61 66 74 65 72 |he comme|nt after|
|000019e0| 20 74 68 65 20 7c 45 58 | 41 4d 50 4c 45 7c 0a 61 | the |EX|AMPLE|.a|
|000019f0| 6e 64 20 75 73 65 20 7c | 23 69 66 64 65 66 20 45 |nd use ||#ifdef E|
|00001a00| 58 41 4d 50 4c 45 7c 20 | 74 6f 20 6d 61 73 6b 20 |XAMPLE| |to mask |
|00001a10| 74 68 65 20 65 78 61 6d | 70 6c 65 20 6f 75 74 3a |the exam|ple out:|
|00001a20| 0a 0a 5c 62 65 67 69 6e | 7b 65 78 61 6d 70 6c 65 |..\begin|{example|
|00001a30| 7d 0a 20 20 20 20 45 58 | 41 4d 50 4c 45 20 2a 2f |}. EX|AMPLE */|
|00001a40| 0a 23 69 66 64 65 66 20 | 45 58 41 4d 50 4c 45 0a |.#ifdef |EXAMPLE.|
|00001a50| 09 73 74 72 75 63 74 20 | 4c 69 73 74 20 2a 20 6c |.struct |List * l|
|00001a60| 69 73 74 3b 0a 09 73 74 | 72 75 63 74 20 4e 6f 64 |ist;..st|ruct Nod|
|00001a70| 65 20 2a 20 70 72 65 64 | 3b 0a 0a 09 2f 2a 20 49 |e * pred|;.../* I|
|00001a80| 6e 73 65 72 74 20 4e 6f | 64 65 20 61 74 20 74 6f |nsert No|de at to|
|00001a90| 70 20 6f 66 20 74 68 65 | 20 6c 69 73 74 20 2a 2f |p of the| list */|
|00001aa0| 0a 09 41 64 64 48 65 61 | 64 20 28 6c 69 73 74 2c |..AddHea|d (list,|
|00001ab0| 20 6e 6f 64 65 29 3b 0a | 23 65 6e 64 69 66 0a 5c | node);.|#endif.\|
|00001ac0| 65 6e 64 7b 65 78 61 6d | 70 6c 65 7d 0a 0a 44 6f |end{exam|ple}..Do|
|00001ad0| 6e 27 74 20 75 73 65 20 | 7c 23 69 66 64 65 66 20 |n't use ||#ifdef |
|00001ae0| 45 58 41 4d 50 4c 45 7c | 20 69 66 20 79 6f 75 20 |EXAMPLE|| if you |
|00001af0| 68 61 76 65 20 61 20 66 | 75 6c 6c 79 20 66 65 61 |have a f|ully fea|
|00001b00| 74 75 72 65 64 20 65 78 | 61 6d 70 6c 65 20 28 69 |tured ex|ample (i|
|00001b10| 65 2e 20 6f 6e 65 0a 77 | 68 69 63 68 20 63 61 6e |e. one.w|hich can|
|00001b20| 20 62 65 20 63 6f 6d 70 | 69 6c 65 64 20 77 69 74 | be comp|iled wit|
|00001b30| 68 6f 75 74 20 65 72 72 | 6f 72 73 29 2e 0a 0a 5c |hout err|ors)...\|
|00001b40| 69 74 65 6d 7b 42 55 47 | 53 7d 20 54 68 69 73 20 |item{BUG|S} This |
|00001b50| 66 69 65 6c 64 20 63 6f | 6e 74 61 69 6e 73 20 61 |field co|ntains a|
|00001b60| 20 6c 69 73 74 20 6f 66 | 20 6b 6e 6f 77 6e 20 62 | list of| known b|
|00001b70| 75 67 73 2e 0a 0a 5c 69 | 74 65 6d 7b 53 45 45 20 |ugs...\i|tem{SEE |
|00001b80| 41 4c 53 4f 7d 20 54 68 | 69 73 20 66 69 65 6c 64 |ALSO} Th|is field|
|00001b90| 20 63 6f 6e 74 61 69 6e | 73 20 61 20 6c 69 73 74 | contain|s a list|
|00001ba0| 20 6f 66 20 6f 74 68 65 | 72 20 66 75 6e 63 74 69 | of othe|r functi|
|00001bb0| 6f 6e 73 20 61 6e 64 20 | 64 6f 63 75 6d 65 6e 74 |ons and |document|
|00001bc0| 73 0a 77 68 69 63 68 20 | 6d 69 67 68 74 20 62 65 |s.which |might be|
|00001bd0| 20 6f 66 20 69 6e 74 65 | 72 65 73 74 2e 20 54 68 | of inte|rest. Th|
|00001be0| 69 73 20 69 6e 63 6c 75 | 64 65 73 20 66 75 6e 63 |is inclu|des func|
|00001bf0| 74 69 6f 6e 20 77 68 69 | 63 68 20 79 6f 75 20 6e |tion whi|ch you n|
|00001c00| 65 65 64 20 74 6f 0a 69 | 6e 69 74 69 61 6c 69 7a |eed to.i|nitializ|
|00001c10| 65 2c 20 63 72 65 61 74 | 65 20 6f 72 20 64 65 73 |e, creat|e or des|
|00001c20| 74 72 6f 79 20 61 6e 20 | 6f 62 6a 65 63 74 20 6e |troy an |object n|
|00001c30| 65 63 65 73 73 61 72 79 | 20 66 6f 72 20 74 68 69 |ecessary| for thi|
|00001c40| 73 20 66 75 6e 63 74 69 | 6f 6e 2c 0a 66 75 6e 63 |s functi|on,.func|
|00001c50| 74 69 6f 6e 73 20 77 68 | 69 63 68 20 64 6f 20 73 |tions wh|ich do s|
|00001c60| 69 6d 69 6c 61 72 20 61 | 6e 64 20 6f 70 70 6f 73 |imilar a|nd oppos|
|00001c70| 69 74 65 20 74 68 69 6e | 67 73 20 6f 6e 20 74 68 |ite thin|gs on th|
|00001c80| 65 20 6d 61 69 6e 20 6f | 62 6a 65 63 74 2e 0a 0a |e main o|bject...|
|00001c90| 46 6f 72 20 65 78 61 6d | 70 6c 65 2c 20 7c 53 65 |For exam|ple, |Se|
|00001ca0| 74 41 74 74 72 73 28 29 | 7c 20 73 68 6f 75 6c 64 |tAttrs()|| should|
|00001cb0| 20 63 6f 6e 74 61 69 6e | 20 66 75 6e 63 74 69 6f | contain| functio|
|00001cc0| 6e 73 20 68 65 72 65 20 | 77 68 69 63 68 20 63 61 |ns here |which ca|
|00001cd0| 6e 20 63 72 65 61 74 65 | 2c 0a 64 65 73 74 72 6f |n create|,.destro|
|00001ce0| 79 20 61 6e 64 20 6d 61 | 6e 69 70 75 6c 61 74 65 |y and ma|nipulate|
|00001cf0| 20 42 4f 4f 50 53 49 20 | 6f 62 6a 65 63 74 73 20 | BOOPSI |objects |
|00001d00| 62 75 74 20 6e 6f 74 20 | 74 61 67 6c 69 73 74 73 |but not |taglists|
|00001d10| 2e 0a 0a 5c 69 74 65 6d | 7b 49 4e 54 45 52 4e 41 |...\item|{INTERNA|
|00001d20| 4c 53 7d 20 54 68 69 73 | 20 66 69 65 6c 64 20 73 |LS} This| field s|
|00001d30| 68 6f 75 6c 64 20 63 6f | 6e 74 61 69 6e 20 69 6e |hould co|ntain in|
|00001d40| 66 6f 72 6d 61 74 69 6f | 6e 20 66 6f 72 20 6f 74 |formatio|n for ot|
|00001d50| 68 65 72 20 64 65 76 65 | 6c 6f 70 65 72 73 0a 77 |her deve|lopers.w|
|00001d60| 68 69 63 68 20 61 72 65 | 20 69 72 72 65 6c 65 76 |hich are| irrelev|
|00001d70| 61 6e 74 20 74 6f 20 74 | 68 65 20 75 73 65 72 2c |ant to t|he user,|
|00001d80| 20 66 6f 72 20 65 78 61 | 6d 70 6c 65 20 61 6e 20 | for exa|mple an |
|00001d90| 65 78 70 6c 61 6e 61 74 | 69 6f 6e 20 6f 66 20 74 |explanat|ion of t|
|00001da0| 68 65 0a 61 6c 67 6f 72 | 69 74 68 6d 20 6f 66 20 |he.algor|ithm of |
|00001db0| 74 68 65 20 66 75 6e 63 | 74 69 6f 6e 20 6f 72 20 |the func|tion or |
|00001dc0| 64 65 70 65 6e 64 65 6e | 63 69 65 73 2e 0a 0a 5c |dependen|cies...\|
|00001dd0| 69 74 65 6d 7b 48 49 53 | 54 4f 52 59 7d 20 54 68 |item{HIS|TORY} Th|
|00001de0| 69 73 20 66 69 65 6c 64 | 20 73 68 6f 75 6c 64 20 |is field| should |
|00001df0| 63 6f 6e 74 61 69 6e 20 | 61 20 62 72 69 65 66 20 |contain |a brief |
|00001e00| 68 69 73 74 6f 72 79 20 | 6f 66 20 63 68 61 6e 67 |history |of chang|
|00001e10| 65 73 2e 0a 54 68 65 20 | 66 6f 72 6d 61 74 20 69 |es..The |format i|
|00001e20| 73 20 64 61 74 65 20 28 | 44 44 2d 4d 4d 2d 59 59 |s date (|DD-MM-YY|
|00001e30| 29 2c 20 61 63 72 6f 6e | 79 6d 20 28 6f 6e 65 20 |), acron|ym (one |
|00001e40| 77 6f 72 64 29 20 61 6e | 64 20 64 65 73 63 72 69 |word) an|d descri|
|00001e50| 70 74 69 6f 6e 2e 0a 0a | 5c 65 6e 64 7b 64 65 73 |ption...|\end{des|
|00001e60| 63 72 69 70 74 69 6f 6e | 7d 0a 0a 5c 73 75 62 73 |cription|}..\subs|
|00001e70| 65 63 74 69 6f 6e 7b 46 | 6f 72 6d 61 74 74 69 6e |ection{F|ormattin|
|00001e80| 67 7d 0a 0a 48 65 72 65 | 20 69 73 20 61 6e 20 65 |g}..Here| is an e|
|00001e90| 78 61 6d 70 6c 65 20 6f | 66 20 68 6f 77 20 74 6f |xample o|f how to|
|00001ea0| 20 66 6f 72 6d 61 74 20 | 41 52 4f 53 20 63 6f 64 | format |AROS cod|
|00001eb0| 65 3a 0a 0a 5c 62 65 67 | 69 6e 7b 65 78 61 6d 70 |e:..\beg|in{examp|
|00001ec0| 6c 65 7d 0a 7b 0a 20 20 | 20 20 2f 2a 20 61 20 2a |le}.{. | /* a *|
|00001ed0| 2f 0a 20 20 20 20 73 74 | 72 75 63 74 20 52 61 73 |/. st|ruct Ras|
|00001ee0| 74 50 6f 72 74 20 2a 20 | 72 70 3b 0a 20 20 20 20 |tPort * |rp;. |
|00001ef0| 69 6e 74 20 09 20 20 20 | 20 20 20 61 3b 0a 0a 20 |int . | a;.. |
|00001f00| 20 20 20 2f 2a 20 62 20 | 2a 2f 0a 20 20 20 20 72 | /* b |*/. r|
|00001f10| 70 20 3d 20 4e 55 4c 4c | 3b 0a 20 20 20 20 61 20 |p = NULL|;. a |
|00001f20| 20 3d 20 31 3b 0a 0a 20 | 20 20 20 2f 2a 20 63 20 | = 1;.. | /* c |
|00001f30| 2a 2f 0a 20 20 20 20 69 | 66 20 28 61 20 3d 3d 20 |*/. i|f (a == |
|00001f40| 31 29 0a 09 70 72 69 6e | 74 66 20 28 22 49 6e 69 |1)..prin|tf ("Ini|
|00001f50| 74 20 77 6f 72 6b 65 64 | 5c 5c 6e 22 29 3b 0a 0a |t worked|\\n");..|
|00001f60| 20 20 20 20 2f 2a 20 64 | 20 2a 2f 0a 20 20 20 20 | /* d| */. |
|00001f70| 69 66 0a 20 20 20 20 28 | 0a 09 21 28 72 70 20 3d |if. (|..!(rp =|
|00001f80| 20 47 65 74 5f 61 5f 70 | 6f 69 6e 74 65 72 5f 74 | Get_a_p|ointer_t|
|00001f90| 6f 5f 74 68 65 5f 52 61 | 73 74 50 6f 72 74 0a 09 |o_the_Ra|stPort..|
|00001fa0| 20 20 20 20 28 0a 09 09 | 73 6f 6d 65 2c 0a 09 09 | (...|some,...|
|00001fb0| 6c 6f 6e 67 2c 0a 09 09 | 61 72 67 75 6d 65 6e 74 |long,...|argument|
|00001fc0| 73 0a 09 20 20 20 20 29 | 0a 09 29 0a 20 20 20 20 |s.. )|..). |
|00001fd0| 7c 7c 0a 09 61 20 3d 3d | 20 30 0a 20 20 20 20 29 |||..a ==| 0. )|
|00001fe0| 0a 20 20 20 20 7b 0a 09 | 70 72 69 6e 74 66 20 28 |. {..|printf (|
|00001ff0| 22 53 6f 6d 65 74 68 69 | 6e 67 20 66 61 69 6c 65 |"Somethi|ng faile|
|00002000| 64 5c 5c 6e 22 29 3b 0a | 09 72 65 74 75 72 6e 20 |d\\n");.|.return |
|00002010| 46 41 49 4c 3b 0a 20 20 | 20 20 7d 0a 0a 20 20 20 |FAIL;. | }.. |
|00002020| 20 2f 2a 20 65 20 2a 2f | 0a 20 20 20 20 61 20 3d | /* e */|. a =|
|00002030| 20 70 72 69 6e 74 66 20 | 28 22 4d 79 20 52 61 73 | printf |("My Ras|
|00002040| 74 50 6f 72 74 20 69 73 | 20 25 70 2c 20 61 3d 25 |tPort is| %p, a=%|
|00002050| 64 5c 5c 6e 22 0a 09 2c | 20 72 70 0a 09 2c 20 61 |d\\n"..,| rp.., a|
|00002060| 0a 20 20 20 20 29 3b 0a | 0a 20 20 20 20 72 65 74 |. );.|. ret|
|00002070| 75 72 6e 20 4f 4b 3b 0a | 7d 0a 5c 65 6e 64 7b 65 |urn OK;.|}.\end{e|
|00002080| 78 61 6d 70 6c 65 7d 0a | 0a 4c 6f 6f 6b 20 75 67 |xample}.|.Look ug|
|00002090| 6c 79 2c 20 65 68 20 3f | 20 3a 2d 29 0a 0a 4f 6b |ly, eh ?| :-)..Ok|
|000020a0| 2c 20 68 65 72 65 20 61 | 72 65 20 74 68 65 20 72 |, here a|re the r|
|000020b0| 75 6c 65 73 3a 0a 0a 5c | 62 65 67 69 6e 7b 69 74 |ules:..\|begin{it|
|000020c0| 65 6d 69 7a 65 7d 0a 5c | 69 74 65 6d 20 49 66 20 |emize}.\|item If |
|000020d0| 73 65 76 65 72 61 6c 20 | 6c 69 6e 65 73 20 63 6f |several |lines co|
|000020e0| 6e 74 61 69 6e 20 73 69 | 6d 69 6c 61 72 20 63 6f |ntain si|milar co|
|000020f0| 64 65 2c 20 70 75 74 20 | 73 69 6d 69 6c 61 72 20 |de, put |similar |
|00002100| 74 68 69 6e 67 73 20 62 | 65 6c 6f 77 20 65 61 63 |things b|elow eac|
|00002110| 68 0a 6f 74 68 65 72 20 | 28 73 65 65 20 61 20 61 |h.other |(see a a|
|00002120| 6e 64 20 62 29 3b 0a 0a | 5c 69 74 65 6d 20 50 75 |nd b);..|\item Pu|
|00002130| 74 20 73 70 61 63 65 73 | 20 62 65 74 77 65 65 6e |t spaces| between|
|00002140| 20 6f 70 65 72 61 6e 64 | 73 20 61 6e 64 20 6f 70 | operand|s and op|
|00002150| 65 72 61 74 6f 72 73 0a | 0a 5c 69 74 65 6d 20 50 |erators.|.\item P|
|00002160| 75 74 20 62 72 61 63 65 | 73 20 7b 7d 2c 20 62 72 |ut brace|s {}, br|
|00002170| 61 63 6b 65 74 73 20 5b | 5d 20 61 6e 64 20 70 61 |ackets [|] and pa|
|00002180| 72 65 6e 74 68 65 73 65 | 20 28 29 20 62 65 6c 6f |renthese| () belo|
|00002190| 77 20 65 61 63 68 20 6f | 74 68 65 72 20 28 64 29 |w each o|ther (d)|
|000021a0| 20 69 66 0a 74 68 65 72 | 65 20 69 73 20 6d 75 63 | if.ther|e is muc|
|000021b0| 68 20 63 6f 64 65 20 62 | 65 74 77 65 65 6e 2e 20 |h code b|etween. |
|000021c0| 42 72 61 63 6b 65 74 73 | 20 61 6e 64 20 70 61 72 |Brackets| and par|
|000021d0| 65 6e 74 68 65 73 65 20 | 6d 61 79 20 62 65 20 69 |enthese |may be i|
|000021e0| 6e 20 6f 6e 65 20 6c 69 | 6e 65 20 69 66 0a 74 68 |n one li|ne if.th|
|000021f0| 65 20 63 6f 64 65 20 62 | 65 74 77 65 65 6e 20 69 |e code b|etween i|
|00002200| 73 20 73 6d 61 6c 6c 20 | 28 63 29 0a 0a 5c 69 74 |s small |(c)..\it|
|00002210| 65 6d 20 49 6e 64 65 6e | 74 20 62 79 20 34 20 53 |em Inden|t by 4 S|
|00002220| 70 61 63 65 73 2e 20 54 | 77 6f 20 69 6e 64 65 6e |paces. T|wo inden|
|00002230| 74 20 6c 65 76 65 6c 73 | 20 6d 61 79 20 62 65 20 |t levels| may be |
|00002240| 61 62 62 72 65 76 69 61 | 74 65 64 20 62 79 20 6f |abbrevia|ted by o|
|00002250| 6e 65 20 74 61 62 2e 0a | 0a 5c 69 74 65 6d 20 49 |ne tab..|.\item I|
|00002260| 66 20 79 6f 75 20 68 61 | 76 65 20 61 20 66 75 6e |f you ha|ve a fun|
|00002270| 63 74 69 6f 6e 20 77 69 | 74 68 20 6d 61 6e 79 20 |ction wi|th many |
|00002280| 61 72 67 75 6d 65 6e 74 | 73 20 28 64 2c 20 65 29 |argument|s (d, e)|
|00002290| 20 79 6f 75 20 73 68 6f | 75 6c 64 20 70 75 74 20 | you sho|uld put |
|000022a0| 74 68 65 0a 70 61 72 65 | 6e 74 68 65 73 65 20 69 |the.pare|nthese i|
|000022b0| 6e 20 6c 69 6e 65 73 20 | 6f 66 20 74 68 65 69 72 |n lines |of their|
|000022c0| 20 6f 77 6e 20 61 6e 64 | 20 65 61 63 68 20 61 72 | own and| each ar|
|000022d0| 67 75 6d 65 6e 74 20 69 | 6e 20 6f 6e 65 20 6c 69 |gument i|n one li|
|000022e0| 6e 65 20 28 64 29 20 6f | 72 20 70 75 74 0a 74 68 |ne (d) o|r put.th|
|000022f0| 65 20 66 69 72 73 74 20 | 61 72 67 75 6d 65 6e 74 |e first |argument|
|00002300| 20 62 65 68 69 6e 64 20 | 74 68 65 20 6f 70 65 6e | behind |the open|
|00002310| 69 6e 67 20 70 61 72 65 | 6e 74 68 65 73 65 20 28 |ing pare|nthese (|
|00002320| 65 29 20 61 6e 64 20 65 | 61 63 68 20 66 6f 6c 6c |e) and e|ach foll|
|00002330| 6f 77 69 6e 67 0a 61 72 | 67 75 6d 65 6e 74 20 69 |owing.ar|gument i|
|00002340| 6e 20 61 20 6c 69 6e 65 | 20 6f 66 20 69 74 73 20 |n a line| of its |
|00002350| 6f 77 6e 20 77 69 74 68 | 20 74 68 65 20 63 6f 6d |own with| the com|
|00002360| 6d 61 20 69 6e 20 66 72 | 6f 6e 74 2e 20 54 68 65 |ma in fr|ont. The|
|00002370| 20 63 6c 6f 73 69 6e 67 | 0a 70 61 72 65 6e 74 68 | closing|.parenth|
|00002380| 65 73 65 20 69 73 20 69 | 6e 20 61 20 6c 69 6e 65 |ese is i|n a line|
|00002390| 20 6f 66 20 69 74 73 20 | 6f 77 6e 20 61 6e 64 20 | of its |own and |
|000023a0| 61 6c 69 67 6e 65 64 20 | 77 69 74 68 20 74 68 65 |aligned |with the|
|000023b0| 20 62 65 67 69 6e 6e 69 | 6e 67 20 6f 66 20 74 68 | beginni|ng of th|
|000023c0| 65 0a 65 78 70 72 65 73 | 73 69 6f 6e 20 28 69 65 |e.expres|sion (ie|
|000023d0| 2e 20 74 68 65 20 61 20 | 61 6e 64 20 6e 6f 74 20 |. the a |and not |
|000023e0| 74 68 65 20 6f 70 65 6e | 69 6e 67 20 70 61 72 65 |the open|ing pare|
|000023f0| 6e 74 68 65 73 65 20 6f | 72 20 74 68 65 20 7c 70 |nthese o|r the |p|
|00002400| 72 69 6e 74 66 28 29 7c | 29 2e 0a 0a 5c 69 74 65 |rintf()||)...\ite|
|00002410| 6d 20 75 73 65 20 61 20 | 73 69 6e 67 6c 65 20 62 |m use a |single b|
|00002420| 6c 61 6e 6b 20 6c 69 6e | 65 20 74 6f 20 73 65 70 |lank lin|e to sep|
|00002430| 61 72 61 74 65 20 6c 6f | 67 69 63 61 6c 20 62 6c |arate lo|gical bl|
|00002440| 6f 63 6b 73 2e 20 4c 61 | 72 67 65 20 63 6f 6d 6d |ocks. La|rge comm|
|00002450| 65 6e 74 73 0a 73 68 6f | 75 6c 64 20 68 61 76 65 |ents.sho|uld have|
|00002460| 20 61 20 62 6c 61 6e 6b | 20 6c 69 6e 65 20 62 65 | a blank| line be|
|00002470| 66 6f 72 65 20 61 6e 64 | 20 61 66 74 65 72 20 74 |fore and| after t|
|00002480| 68 65 6d 2c 20 73 6d 61 | 6c 6c 20 63 6f 6d 6d 65 |hem, sma|ll comme|
|00002490| 6e 74 73 20 73 68 6f 75 | 6c 64 20 62 65 0a 70 75 |nts shou|ld be.pu|
|000024a0| 74 20 62 65 66 6f 72 65 | 20 74 68 65 20 63 6f 64 |t before| the cod|
|000024b0| 65 20 74 68 65 79 20 65 | 78 70 6c 61 69 6e 20 77 |e they e|xplain w|
|000024c0| 69 74 68 20 6f 6e 6c 79 | 20 6f 6e 65 20 62 6c 61 |ith only| one bla|
|000024d0| 6e 6b 20 6c 69 6e 65 20 | 62 65 66 6f 72 65 20 74 |nk line |before t|
|000024e0| 68 65 6d 2e 0a 0a 5c 65 | 6e 64 7b 69 74 65 6d 69 |hem...\e|nd{itemi|
|000024f0| 7a 65 7d 0a 0a | |ze}.. | |
+--------+-------------------------+-------------------------+--------+--------+