home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / c / jplc1.arc / USEGUIDE.SI < prev    next >
Text File  |  1988-07-22  |  171KB  |  4,034 lines

  1. .cw10
  2. .po17
  3. .pn 1
  4. .PN 1
  5. .FO                                1-#
  6.                     1. I N T R O D U C T I O N 
  7.  
  8. Thσáá purposσá oµá thi≤á manua∞á i≤á t∩á describσá thσá usσáá anΣ ì
  9. installatioε oµ thσ Portablσ ├ Subroutinσ Library«á  Thi≤ librar∙ ì
  10. i≤á ß collectioε oµ module≤ writteε iε thσ ├ languagσá (Referencσ ì
  11. [2])¼á tha⌠á i≤á capablσá oµá equivalen⌠á operatioεá iεá multiplσ ì
  12. environments«á  Thσá librar∙á i≤á availablσ iεá sourcσá forφá fo≥ ì
  13. compilatioεá anΣ integratioε int∩ ß systeφ librar∙ t∩ replacσ thσ ì
  14. hos⌠á vendo≥ ├ library«á  Listing≤ oµ thσ portablσ ├ librar∙á arσ ì
  15. containeΣ iε ß separatσ documen⌠ (Referencσ [15]).
  16.  
  17. Thσá conten⌠ oµ thσ librar∙ consist≤ oµ function≤ whicΦá minimizσ ì
  18. thσ visibilit∙ oµ system-specifiπ I/╧ formats¼á thσ usσ oµ systeφ ì
  19. commands¼á anΣ thσ reliancσ oε specifiπ systeφá resources«á  Somσ ì
  20. customizatioεáá i≤á necessary¼áá however¼áá t∩á accommodatσáá thσ ì
  21. ideosyncracie≤ oµ eacΦ ne≈ host« Somσ oµ thesσ ideosyncracie≤ caε ì
  22. bσá removeΣá b∙ prope≥ definitioε oµ parameter≤ iεá heade≥á file≤ ì
  23. includeΣá wheεá thσ portablσ librar∙ i≤ recompiled«á  Other≤á ma∙ ì
  24. requirσá ß smal∞ amoun⌠ oµ codσ alteration«á  ┴ late≥ sectioεá oµ ì
  25. thi≤á documen⌠ contain≤ informatioε anΣ procedure≤á fo≥á adaptinτ ì
  26. thσ portablσ ├ librar∙ iε sucΦ cases.
  27.  
  28. Thσá systeφá I/╧ interfacσ i≤ restricteΣ t∩ thσá function≤á sbrk¼ ì
  29. close¼á creat¼á exit¼á lseek¼á open¼á read¼á unlink¼á anΣá write¼ ì
  30. supplieΣ b∙ thσ hos⌠ ├ languagσ vendor«á  Thesσ arσ assumeΣ t∩ bσ ì
  31. compatiblσ witΦ UNIXtmö conventions«á  Anothe≥ functioε ¼á rename¼ ì
  32. i≤á assumed¼á eithe≥á addeΣá b∙ thσ ├ languagσ vendo≥ o≥á b∙á thσ ì
  33. installe≥ oµ thi≤ library«á Thσ floatinτ poin⌠ arithmetiπá systeφ ì
  34. interfacσ consist≤ oµ onl∙ ß fe≈ functions¼ sucΦ a≤ chrstc¼ fint¼ ì
  35. ldexp¼á astof¼á anΣá ftoa¼á tha⌠á requirσ somσ alteratioε oµá thσ ì
  36. sourcσ code«á  Thσ remainde≥ oµ thσ librar∙ utilize≤ thσ standarΣ ì
  37. Kernighaε anΣ Ritchiσ (Referencσ [2]⌐ ├ languagσ features.
  38.  
  39. A≤á man∙á oµ thσ UNI╪ librar∙ function≤ a≤ werσá deemeΣá portablσ ì
  40. werσá includeΣ iε thσ portablσ ├ library«á  Thesσ bea≥á thσá samσ ì
  41. name≤á herσá a≤ the∙ d∩ iε thσ paren⌠ library«á  Othe≥á function≤ ì
  42. havσ beeε addeΣ fo≥ greate≥ utility.
  43.  
  44. Description≤á iε thi≤ manua∞ follo≈ thσ UNI╪ Programmer'≤á Manua∞ ì
  45. format╗á iε fact¼á thσ description≤ oµ thσ commoε function≤á werσ ì
  46. adapteΣ froφ thσ paren⌠ manual«  Thσ tex⌠ i≤ collecteΣ int∩ ß se⌠ ì
  47. oµ subsections¼ whicΦ appea≥ wheε applicable:
  48.  
  49. áááááThσá headingé oµ eacΦ entr∙ give≤ ß ver∙ shor⌠ descriptioε oµ ì
  50. áááááthσ purposσ oµ thσ function≤ iε tha⌠ entry.
  51.  
  52. áááááThσá nameé subsectioε list≤ thσ exac⌠ name≤ oµ thσ heade≥á o≥ ì
  53. ááááásubroutine≤ covereΣ unde≥ thσ entry.
  54.  
  55.  
  56.  
  57.  
  58.  
  59. *UNIX is a Trademark of Bell Laboratories.
  60. èáááááThσá synopsiséá summarize≤á thσ usσá oµá thσá functioεá beinτ ì
  61. ááááádescribed¼á includinτ requireΣ includeé statements¼á formats¼ ì
  62. áááááanΣ passeΣ parameters«  ┴ fe≈ convention≤ arσ used:
  63.  
  64. ááááááááááBoldfaceé word≤ arσ considereΣ literals¼á anΣ arσá typeΣ ì
  65. áááááááááájus⌠ a≤ the∙ appear.
  66.  
  67. ááááááááááSquarσá bracket≤á █ ]é arounΣ aε argumen⌠ indicatσá tha⌠ ì
  68. ááááááááááthσ argumen⌠ i≤ optional«  Wheε aε argumen⌠ i≤ giveε a≤ ì
  69. áááááááááá'name'¼ i⌠ alway≤ refer≤ t∩ ß filσ name.
  70.  
  71. ááááááááááEllipse≤á '...ºá arσá useΣ t∩ sho≈á tha⌠á thσá previou≤ ì
  72. ááááááááááargument-prototypσ ma∙ bσ repeated.
  73.  
  74. áááááááááá┴ fina∞ conventioε i≤ useΣ b∙ thσ command≤á themselves«  ì
  75. ááááááááááAεá argumen⌠á beginninτ witΦ ß minu≤ sigε '-º i≤á ofteε ì
  76. áááááááááátakeεá t∩ meaε somσ sor⌠ oµ option-specifyinτá argumen⌠ ì
  77. ááááááááááeveεá iµá i⌠ appear≤ iε ß positioε wherσá ßá filσá namσ ì
  78. áááááááááácoulΣá appear«á  Therefore¼á i⌠ i≤ unwisσ t∩ havσ file≤ ì
  79. ááááááááááwhosσ name≤ begiε  witΦ '-'.
  80.  
  81. áááááThσá descriptioné subsectioε discusse≤ iε detai∞ thσá subjec⌠ ì
  82. áááááa⌠ hand.
  83.  
  84. ááááá┴ seσ alsoé subsectioε give≤ pointer≤ t∩ relateΣ information.
  85.  
  86. ááááá┴áá diagnosticséáá subsectioεáá discusse≤áá thσááá diagnostiπ ì
  87. áááááindication≤á whicΦá ma∙á bσ produced«á  Message≤á whicΦá arσ ì
  88. áááááintendeΣ t∩ bσ self-explanator∙ arσ no⌠ listed.
  89.  
  90. áááááThσáá bugséáá subsectioεá give≤á knowεá bug≤á anΣáá sometime≤ ì
  91. ááááádeficiencies«áá  Occasionall∙á thσá suggesteΣá fi°á i≤á als∩ ì
  92. ááááádescribed.
  93. .pa oè.PN 1
  94. .FO                                2-#
  95.                    2. H E A D E R   L I B R A R Y 
  96.  
  97.  
  98. Thi≤á chapte≥á describe≤á eacΦ oµ thσ portablσá librar∙á standarΣ ì
  99. heade≥ files¼á whicΦ contaiε definition≤ oµ constant≤ anΣá macro≤ ì
  100. t∩áá bσá useΣá wheεá compilinτá use≥á programs¼áá anΣá als∩á wheε ì
  101. recompilinτ thσ portablσ librar∙ itself«á  Iε addition¼á global.hé ì
  102. anΣ stdio.hé definσ globa∞ datß structures╗á global.hé i≤á requireΣ ì
  103. fo≥á eacΦ mainé segment¼á anΣ stdio.hé i≤ requireΣ fo≥ al∞ program≤ ì
  104. which use buffered i/o.
  105.  
  106. Generally¼á al∞ macro≤ anΣ constant≤ defineΣ iε heade≥ file≤á arσ ì
  107. captalized¼á s∩á tha⌠ thσ use≥ ma∙ kno≈ tha⌠ the∙ arσ such«á  Thσ ì
  108. exception≤á arσá thσ globa∞ variable≤á errnoéá anΣá progname¼á anΣ ì
  109. definitions of stdin, stdout, stderr, tiny, and utiny.
  110.  
  111. Generally¼áá al∞áá system-dependen⌠á constant≤á o≥á switche≤á arσ ì
  112. containeΣá iε thesσ heade≥ files«á  Thu≤ customizatioε fo≥ ßá ne≈ ì
  113. systeφáá primaril∙á involve≤á changinτá onl∙á thσá heade≥áá file≤ ì
  114. (stdio.h¼ mathcons.h)«  Howeve≥ somσ subroutine≤ ma∙ als∩ requirσ ì
  115. modification«áá  Seσáá thσáá customizatioεá note≤áá fo≥áá furthe≥ ì
  116. informatioε concerninτ thi≤ subject.
  117.  
  118. The portable library standard header files are:ì
  119.  
  120. .uj0
  121. áááááctype.h        standard character-type macros
  122.  
  123. ááááádefs.h         standard definitions and selectors file
  124.  
  125. áááááerrno.h        standard error number definition file
  126.  
  127. áááááglobal.h       standard global variable header file
  128.  
  129. ááááámathcons.h     constant file for math functions
  130.  
  131. ááááámathtyp.h      header file to declare math functions
  132.  
  133.      scrnio.h       terminal display data file
  134.  
  135. ááááástdio.Φ        standarΣ buffereΣ i/∩ definition package
  136.  
  137. ááááástdtyp.h       standard defined-types file
  138. .uj1
  139. .paè.hectype.Φ                                                   ctype.h
  140.  
  141.                  Standard Character-Type Macros
  142.  
  143. NAME
  144. áááááctype.h 
  145.  
  146. SYNOPSIS
  147. ááááá#includσ <ctype.h>
  148.  
  149. áááááBOOL ISALPHA(c)
  150. áááááint c;
  151. ááááá« « .
  152.  
  153. DESCRIPTION
  154. áááááThesσá macro≤á classif∙ ASCII-codeΣ intege≥ value≤ b∙á tablσ ì
  155. ááááálookup«á  EacΦá i≤ ß predicatσ returninτ nonzer∩á fo≥á TRUE¼ ì
  156. ááááázer∩á fo≥ FALSE«á  ISASCII i≤ defineΣ oε al∞ intege≥ values╗ ì
  157. áááááthσá res⌠ arσ defineΣ onl∙ wherσ ISASCII i≤ TRUE anΣ oεá thσ ì
  158. ááááásinglσá non-ASCI╔ valuσ EOFé (seσ stdio.h)«á  Thσá condition≤ ì
  159. áááááfo≥ TRUEé are:
  160.  
  161. .uj0
  162. áááááISALNUM(c)      c i≤ aε alphanumeriπ character.
  163.  
  164. áááááISALPHA(c)      c i≤ ß letter.
  165.  
  166. áááááISASCII(c)      c i≤ aε ASCI╔ character¼ codσ les≤ thaε 0x80.
  167.  
  168. áááááISCNTRL(c)á     c i≤ ß deletσ characte≥ (0x7f⌐á o≥á ordinar∙ ì
  169. ááááá              áááácontro∞ characte≥ (les≤ thaε 0x20).
  170.  
  171. áááááISDIGIT(c)      c i≤ ß digit.
  172.  
  173. áááááISLOWER(c)      c i≤ ß lowe≥ casσ letter.
  174.  
  175. áááááISOCTAL(c)ááááá cé i≤ aε octa∞ character.
  176.  
  177. áááááISPRIN╘(c)áá    céái≤á ßá printinτá   character¼áá codσáá 0x2░              ì
  178. ááááá                  (space⌐ througΦ 0x7σ (tilde).
  179.  
  180. áááááISPUNCT(c)      c i≤ ß punctuatioε characte≥ (neithe≥ contro∞ ì
  181.  ááááá            áááááno≥ alphanumeric).
  182.  
  183. áááááISSPACE(c)      c i≤ ß space¼á tab¼ carriagσ return¼ newline¼ ì
  184. ááááá             áááááo≥ formfeed.
  185.  
  186. áááááISUPPER(c)      c i≤ aε uppe≥ casσ letter.
  187. .uj1
  188.  
  189. áááááThσ followinτ usσ thσ ISUPPERé anΣ ISLOWERé macros¼ anΣ returε ì
  190. áááááß character:
  191.  
  192. .uj0
  193. áááááTOLOWER(c)é      return≤ thσ lowe≥ casσ oµ c¼á o≥ π iµ i⌠á i≤ ì
  194. ááááá                lower case.
  195.  
  196. áááááTOUPPER(c)      returns upper case of c.
  197. .uj1
  198. èSEE ALSO
  199. ááááácorrespondinτ lis⌠ oµ functions.
  200.  
  201. BUGS
  202. áááááBecausσá thesσ arσ implementeΣ a≤ macros¼á sidσ effect≤á ma∙ ì
  203. áááááno⌠á bσá handleΣá correctly╗á e.g«á  ISALPHA(*s++⌐á ma∙á no⌠ ì
  204. áááááproducσ thσ intendeΣ result«  Usσ thσ functioε forφ oµ thesσ ì
  205. ááááámacros in such cases.
  206. .paè.hedefs.h                                                     defs.h
  207.  
  208.              Standard Definitions and Selectors File
  209.  
  210. NAME
  211. ááááádefs.h 
  212.  
  213. SYNOPSIS
  214. ááááá#include <defs.h>
  215.  
  216. áááááMAX(a, b)
  217. áááá ...
  218.  
  219. DESCRIPTION
  220. áááááThe following operators are defined in defs.h:
  221.  
  222. .uj0
  223. áááá AND            replacemen⌠á fo≥á '&&'¼áá thσá logica∞á 'andº                               ì
  224. ááááá               operato≥.
  225.  
  226. áááá FOREVERé        samσ a≤ 'fo≥ (;;)'¼á cause≤ aε infinitσ loop«  ì
  227.  
  228. áááá IS á           replace≤áá '=='¼áá thσá logica∞áá equivalencσ                    ì
  229. ááááá               operator.
  230.  
  231. áááá ISNT           act≤ a≤ thσ  non-equivalencσ operator¼á '!='«  ì
  232.  
  233. áááá NOT            substitutσá fo≥á '!'¼á thσá logica∞á negatioε                ì
  234. ááááá               operator.
  235.  
  236. áááá OR             replace≤á '||'¼áá thσá logica∞áá inclusive-o≥                ì
  237. ááááá               operator.
  238.  
  239.  
  240. áááááThe standard constants defined in defs.h are the following:
  241.  
  242.      EOF            (-1)
  243.  
  244.      FAI╠      áááá 1
  245.  
  246.      FALSE     áááá 0
  247.  
  248.      NO        áááá 0
  249.  
  250.      NULL           0
  251.  
  252.      SUCCESS   áááá 0
  253.  
  254.      TRUE      áááá 1
  255.  
  256.      YES       áááá 1
  257.  
  258.  
  259. áááááAls∩ iε defs.hé arσ severa∞ macros:
  260.  
  261. áááá ABS(x)é         return≤ thσ absolutσ value of x.
  262. èáááá GZ(x)é          return≤ xé iµ xé i≤ greate≥ thaε zero«  Iµ not¼      ì
  263. ááááá               i⌠ return≤ zero.
  264.  
  265. áááááLURSHIFT(n¼ b)é return≤ thσ valuσ oµ lonτ né afte≥ aε unsigneΣ ì
  266. ááááá               right shift of b bits.ì
  267.  
  268. áááá MAX(x¼ y)é      return≤ thσ large≥ oµ ° anΣ y.
  269.  
  270. áááá MIN(x¼ y)é      return≤ thσ lesse≥ oµ x and y.
  271.  
  272. áááááSGN(x)é         return≤ +▒ iµ ° i≤ positive¼á -▒ iµ negative¼ ì
  273. ááááá               o≥ ░ iµ 0.
  274.  
  275. áááááURSHIFT(n¼áb)éá return≤á thσ valuσ oµ in⌠ néá bit≤á afte≥á aε                  ì
  276. ááááá               unsigneΣ righ⌠ shif⌠ oµ bé bits.
  277.  
  278.    
  279. áááááExamples:
  280.  
  281. áááááááááááiµ (statement▒ AN─ statement2⌐ ...
  282. ááááááááááá° ╜ GZ(x);
  283. áááááááááááFOREVE╥ ...
  284. áááááááááááiµ (op▒ I╙ op2⌐ ...
  285. áááááááááááiµ (op▒ ISN╘ op2⌐ ...
  286. áááááááááááwhilσ (NOT x⌐ ...
  287. áááááááááááwhilσ (statement▒ O╥ statement2⌐ ...
  288. ááááá      large = MAX(x, y);
  289. .uj1
  290.  
  291. SE┼ ALSO
  292. ááááálist of corresponding functions.
  293.  
  294. BUGS
  295. áááááBecausσ ABS¼á GZ¼á MAX¼á MIN¼ SG╬ arσ implementeΣ a≤ macros¼ ì
  296. ááááásidσá effect≤á ma∙ no⌠ bσ handleΣá properly«á  Fo≥á example¼ ì
  297. áááááABS(i++⌐ ma∙ bσ incorrect«á  Usσ thσ functioε form≤ oµ thesσ ì
  298. ááááámacros in such cases.
  299. .paè.heerrno.h                                                   errno.h
  300.  
  301.               Standard Error Number Definition File
  302.  
  303. NAME
  304. áááááerrno.h 
  305.  
  306. SYNOPSIS
  307. ááááá#include <errno.h>
  308.  
  309. DESCRIPTION
  310. áááááerrno.héá define≤ erro≥ numbe≥ values«á Thσ onl∙ tw∩ useΣá iε ì
  311. áááááthσ portablσ math librar∙ are:
  312.  
  313. .uj0
  314. áááááERANGEé    computeΣ matΦ valuσ i≤ ou⌠ oµ computablσ range.
  315. áááááEDOMé      functioε argumen⌠ i≤ no⌠ iε defineΣ domain.
  316. .uj1
  317.  
  318. áááááOthe≥á value≤ oµ errnoé ma∙ bσ returneΣ b∙ systeφá call≤á anΣ ì
  319. ááááábuffereΣ i/∩ functions« Typica∞ errnoé value≤ returneΣ b∙ thσ ì
  320. ááááásysteφ call≤ useΣ b∙ thσ portablσ librar∙ are:
  321. .uj0
  322.  
  323. áááááENOENT    file does not exist
  324. áááááE2BIG     argument list too long
  325. áááááEBADF     bad file descriptor          
  326. áááááENOMEM    not enough memory for requested operation         
  327. áááááEEXIST    file already exists on create request
  328. áááááEINVAL    invalid argument
  329. áááááENFILE    exceeded maximum number of disk files
  330. áááááEMFILE    exceeded maximum number of file descriptors
  331. áááááENOTTY    not a terminal or device to which calls apply
  332. áááááEACCES    invalid access request
  333. áááááEIO       i/o error during read or write
  334. áááááENXIO     no such device or address
  335. áááááEPERMé     modificatioε forbiddeε excep⌠ t∩ owne≥, superuser
  336. áááááEFAULT    bad address
  337. áááááEXDEV     cross-device link attempted
  338. áááááENODEV    no such device
  339. áááááEFBIG     file too large
  340. áááááENOSPC    no space left on device
  341. áááááEROFS     read-only file system
  342. áááááEMLINK    too many links to a file
  343. .uj1
  344.  
  345. SE┼ ALSO
  346. áááááglobal.h
  347. .paè.heglobal.Φ                                                 global.h
  348.  
  349.               Standard Global Variable Header File
  350.  
  351. NAME
  352. áááááglobal.h 
  353.  
  354. SYNOPSIS
  355. ááááá#include <global.h>
  356.  
  357. ááááámain(argc, argv)
  358. áááááSTRING *argv;
  359.  
  360. DESCRIPTION
  361. áááááThi≤á heade≥á declare≤ ß globa∞ variablσ errn∩ anΣ ßá globa∞ ì
  362. ááááávariablσá strinτá progname t∩ bσ useΣ iεá thosσá case≤á wheε ì
  363. áááááargv[0▌á doe≤ no⌠ contaiε thσ prograφ name«á  Thσ programme≥ ì
  364. áááááma∙áá usσáá thi≤áá variablσáá t∩áá recorΣáá thσáá name¼áá a≤ ì
  365. ááááá
  366. ááááá     strcp∙(progname¼ "<prograφ name>")╗  
  367. ááááá
  368. áááááIµ arg[0▌ doe≤ contaiε thσ namσ oµ thσ invokeΣ program¼ theε ì
  369. áááááthσ samσ effec⌠ i≤ obtaineΣ viß 
  370.  
  371. ááááá     strcpy(progname, argv[0]);
  372.  
  373. áááááThi≤á filσ als∩ contain≤ outrow[]é anΣ outcol[]é whicΦ contaiε ì
  374. áááááthσ ro≈ anΣ columε value≤ oµ al∞ outpu⌠ channels¼ indexeΣ b∙ ì
  375. áááááuni⌠á number«áá  Fo≥á buffereΣá i/o¼áá thesσá arσá giveεá b∙ ì
  376. áááááfp->_unit╗á fo≥ unbuffereΣ i/o¼ thσ uni⌠ number≤ arσ STDOUT¼ ì
  377. áááááSTDERR¼ anΣ filσ descriptor≤ returneΣ b∙ open.
  378. .paè.hemathcons.h                                             mathcons.h
  379.  
  380.                 Constant File for Math Functions
  381.  
  382. NAME
  383. ááááámathcons.h 
  384.  
  385. SYNOPSIS
  386. ááááá#include <mathcons.h>
  387.  
  388. DESCRIPTION
  389. áááááThi≤á heade≥á filσá contain≤á thσ value≤á oµá thσá followinτ ì
  390. ááááámachine-dependent constants:
  391.  
  392. .uj0
  393. áááááááááá BIG10╪á           10▐(2▐(BIG10X-1)⌐ ╝áINFINITYì
  394. áááááááááá BIG╪             1╢ ¬ log2(INFINITY⌐ - ▒    
  395. áááááááááá DPRECISIO╬         (int⌐ PRECISIO╬        
  396. áááááááááá INFINIT┘         machinσ infinity¼ 2(MAXEXP-1⌐ 
  397. áááááááááá INFINLE╟         INFINIT┘ » sqrt(2⌐        
  398. ááááá      LEAS╘         leas⌠ doublσ representablσ    
  399. áááááááááá LOGINFINIT┘         larges⌠ loτ argumen⌠        
  400. áááááááááá LOGLEAS╘         smalles⌠ loτ argumen⌠    
  401. áááááááááá MAXEX╨         larges⌠ characteristiπ    
  402. áááááááááá MAXEXP╟         MAXEX╨ - │ guarΣ bit≤    
  403. áááááááááá MINEX╨         smalles⌠ characteristiπ    
  404. áááááááááá MINEXP╟         MINEX╨ ½ │ guarΣ bit≤    
  405. áááááááááá PRECISIO╬         -log1░ oµ WASHOU╘        
  406. áááááááááá RTHLFIN╞         sqrt(INFINIT┘ » 2⌐        
  407. áááááááááá SMALL╪áá         1╢á¬álog2(LEAST⌐ ½ ▒        
  408. áááááááááá SYMLEAS╘         symmetriπ leas⌠ (ha≤ inverse)
  409. áááááááááá TANHXBI╟         (sig« bit≤ ½ 2⌐ ¬ ln(2⌐ » ▓    
  410. áááááááááá WASHOU╘         1.░ ½ (° ╝ WASHOUT⌐ ╜ 1.░    
  411. .uj1
  412.  
  413. ááááámathcons.há als∩ contain≤ thσ followinτá machine-independent ì
  414. áááááconstants:
  415.  
  416. .uj0
  417. áááááááááá CBRTFOU╥         cubσ roo⌠ oµ ┤    
  418. áááááááááá CBRTTW╧         cubσ roo⌠ oµ ▓    
  419. áááááááááá FADEOU╘áá         Taylo≥áserie≤áfadeout term
  420. áááááááááá FOURTHLOG▓         log(2)/┤        
  421. áááááááááá HALFLOG2σ         log2(e)/▓        
  422. áááááááááá INVP╔         ▒ » pΘ        
  423. áááááááááá LOG▓             loτ oµ ▓ basσ σ    
  424. áááááááááá LOG2σ         loτ oµ σ basσ ▓    
  425. áááááááááá LOGe1         loτ oµ 1░ basσ σ    
  426. áááááááááá LOG10e         loτ oµ σ basσ 1░    
  427. áááááááááá LOG10tw∩         loτ oµ ▓ basσ 1░    
  428. áááááááááá MAXANGL┼         int(pΘ ¬ 225⌐    
  429. áááááááááá P╔             pΘ            
  430. áááááááááá PIover▓         pΘ » ▓        
  431. áááááááááá PIover│         pΘ » │        
  432. áááááááááá PIover┤         pΘ » ┤        
  433. áááááááááá PIover╢         pΘ » ╢        
  434. áááááááááá ROOTHAL╞         squarσ roo⌠ oµ 1/▓    
  435. áááááááááá ROOTTW╧          squarσ roo⌠ oµ ▓    
  436. áááááááááá SQRT│         sqrt(3⌐        èáááááááááá SQRT3m▒ááááá         sqrt(3⌐á- ▒        
  437. áááááááááá TWOLOG2σ         ▓ ¬ log2(e⌐        
  438. áááááááááá TWOmSQRT│         ▓ - sqrt(3⌐        
  439. áááááááááá TWOoverP╔         ▓ » pΘ        
  440. .uj1
  441. .paè.hemathtyp.h                                               mathtyp.h
  442.  
  443.               Header File to Declare Math Functions
  444.  
  445. NAME
  446. ááááámathtyp.h 
  447.  
  448. SYNOPSIS
  449. ááááá#include <mathtyp.h>
  450.  
  451. DESCRIPTION
  452. áááááThi≤á contain≤á typσ declaration≤ whicΦ definσ thσ type≤á oµ ì
  453. áááááal∞á doubleá matΦ function≤ iεá thi≤á library«á  Usinτá thi≤ ì
  454. áááááheade≥á delete≤ thσ necessit∙ t∩ declarσ eacΦ matΦá functioε ì
  455. áááááseparatel∙ iε use≥ programs.  Included are:
  456.  
  457. ááááá     acos      cotan     fmin      modf      sgn
  458. ááááá     asin      erf       frexp     ntail     simpson
  459. ááááá     atan      erfc      hypot     nprob     sin
  460. ááááá     atan2     exp       inverf    pow       sinh
  461. ááááá     atof      fabs      inverfc   randexp   sqrt
  462. ááááá     cbrt      fint      ldexp     randnorm  tan
  463. ááááá     ceil      floor     log       random    tanh
  464. ááááá     cos       frac      log10     ratfun
  465. ááááá     cosh      fmax      log2      round
  466. .paè.hescrnio.h                                                 scrnio.h
  467.  
  468.                     Screen Function Data File
  469.  
  470. NAME
  471. áááááscrnio.h
  472.  
  473. SYNOPSIS
  474. ááááá#include <scrnio.h>
  475.  
  476. DESCRIPTION
  477. áááááscrnio.héá i≤á thσ datß filσ whicΦ declare≤ al∞á globa∞á datß ì
  478. ááááánecessar∙á fo≥ thσ usσ oµ thesσ termina∞ displa∙á functions«  ì
  479. áááááI⌠ contain≤ thσ value≤ oµ thσ followinτ constants:
  480.  
  481. ááááááááá ALT_SCRN[7]  áááááááalternatσ intensit∙ on
  482.  
  483. ááááááááááBKCURSOR[9]         cursor back
  484.  
  485. ááááááááá CB4R  ááááááááááááááboolean║ columε beforσ row?
  486.  
  487. ááááááááá CLEARSCREEN[9]  ááááclea≥ screeε anΣ homσ cursor
  488.  
  489. ááááááááá COFFSET  ááááááááááácolumε valuσ offset
  490.  
  491. ááááááááááDNCURSOR[9]         cursor down
  492.  
  493. ááááááááá EREOLN[7] áá áááááááerasσ t∩ end-of-line
  494.  
  495. ááááááááá EREOPG[9]  á áááááááerasσ t∩ enΣ oµ page
  496.  
  497. ááááááááááFWCURSOR[9]         cursor forward
  498.  
  499. ááááááááá HEIGHT áááááááááááááline≤ pe≥ screen
  500.  
  501. ááááááááá HOMER[9]  ááááááááááhomσ thσ cursor
  502.  
  503. ááááááááá LEADIN[9] áááááááááácurso≥ lead-iε sequence
  504.  
  505. ááááááááá LINDELETE[7] ááááááádeletσ line
  506.  
  507. ááááááááá LININSERT[9]  ááááááinser⌠ line
  508.  
  509. ááááááááá NORM_SCRN[7]  áááááánorma∞ intensit∙ on
  510.  
  511. ááááááááááRCSEPARATOR[5]  áááárow-columε separator
  512.  
  513. ááááááááááRCENDER[5]  áááááááálead-iε termination
  514.  
  515. ááááááááááROFFSET  áááááááááááro≈ valuσ offset
  516.  
  517. ááááááááááSCRNINI[9] áááááááááinitializσ terminal
  518.  
  519. ááááááááááSCRNUNI[9]  ááááááááun-initializσ terminal
  520.  
  521. ááááááááááSCRNWRAP áááááááááááboolean║ screeε wrap-around?è
  522. ááááááááááTERMINAL[20]  áááááánamσ oµ terminal
  523.  
  524. ááááááááááUPCURSOR[9]         cursor up
  525.  
  526. ááááááááááUSELAST  áááááááááááboolean║ usσ las⌠ screeε character?
  527.  
  528. ááááááááááWIDTH áááááááááááááácolumn≤ pe≥ screen
  529.  
  530. ááááááááááXLT2ASCII  áááááááááboolean║ translatσ t∩ ASCII?
  531.  
  532. SEE ALSO
  533. áááááscrnioéá in Section 4.
  534. .paè.hestdio.h                                                   stdio.h
  535.  
  536.         Standard Buffered Input/Output Definition Package
  537.  
  538. NAME
  539. ááááástdio.h 
  540.  
  541. SYNOPSIS
  542. ááááá#include <stdio.h>
  543.  
  544. áááááFILE *stdin;
  545. áááááFILE *stdout;
  546. áááááFILE *stderr;
  547.  
  548. DESCRIPTION
  549. áááááIεá thσ user-leve∞ frameworkinτ scheme¼á thσ function≤á getcé ì
  550. áááááanΣá putcé handlσ character≤ iε botΦ buffereΣ anΣá unbuffereΣ ì
  551. ááááámodes«á  Thσá highe≥á leve∞á routine≤á gets¼á fgets¼á scanf¼ ì
  552. áááááfscanf¼á fread¼ puts¼ fputs¼ printf¼ fprintf¼ fwriteé al∞ usσ ì
  553. ááááágetcé anΣ putc╗ the∙ caε bσ freel∙ intermixed.
  554.  
  555. ááááá┴ filσ witΦ associateΣ bufferinτ i≤ calleΣ ß stream¼á anΣ i≤ ì
  556. ááááádeclareΣá t∩á bσ ß pointe≥ t∩ ß defineΣá typσá FILE«á  fopen ì
  557. ááááácreate≤ certaiε descriptivσ datß fo≥ ß streaφ anΣ return≤á ß ì
  558. ááááápointe≥ t∩ designatσ thσ streaφ iε al∞ furthe≥ transactions«  ì
  559. áááááTherσ arσ threσ normall∙ opeε stream≤ witΦ constan⌠ pointer≤ ì
  560. ááááádeclareΣá iεá thσá includσá filσá anΣá associateΣá witΦá thσ ì
  561. ááááástandard open files:
  562.  
  563. ááááá     stdin     standard input file
  564.  
  565. ááááá     stdout    standard output file
  566.  
  567. ááááá     stderr    standard error file
  568.  
  569. áááááSTDIN¼á STDOUTé anΣ STDERRé arσ thσ filσ descriptor≤ tha⌠ reaΣ ì
  570. áááááand write recognize as standard preopened files.
  571.  
  572. áááááA constant 'pointer' NULL (0) designates no stream at all.
  573.  
  574. áááááAε intege≥ constan⌠ EO╞ (-1⌐ i≤ returneΣ upoε enΣ oµ filσ o≥ ì
  575. áááááerror by integer functions that deal with streams.
  576.  
  577. áááááMAXSTREAMéá i≤á thσ maximuφ numbe≥ oµá input/outpu⌠á streams, ì
  578. áááááand IObuffs is the file stream table.
  579.  
  580. áááááAn∙ routinσ tha⌠ use≤ thσ standarΣ input/outpu⌠ packagσ mus⌠ ì
  581. áááááincludσáá thσá heade≥á filσá <stdio.h╛á oµá pertinen⌠á macr∩ ì
  582. ááááádefinitions«
  583.  
  584. áááááBuffered Input/Output Definitions:
  585.  
  586. áááááááááááBUFSIZ ááááááástreaφ buffe≥ size
  587.  
  588.  
  589. áááááááááááCRINSUP áááááádefineΣá wheε '\rº iε inpu⌠ tex⌠ mus⌠ bσ èááááááááááááááááááááá ááásuppressed
  590.  
  591. áááááááááááCROUTADDáá    defineΣ wheε '\rº mus⌠ accompan∙ '\nº iε ì
  592. ááááááááááááááááááááááááátext output
  593.  
  594. áááááááááááCURPOS  ááááááfilσ positioε designator (lseek)
  595.  
  596. áááááááááááFILEND  ááááááfilσ enΣ positioε designator (lseek)
  597.  
  598. áááááááááááMAXLINE  ááááámaximuφ stdi∩ inpu⌠ linσ width
  599.  
  600. áááááááááááORIGIN ááááááábeginninτ oµ filσ designator (lseek)
  601.  
  602. áááááááááááPMODE  áááááááfopen(⌐ protectioε modσ (fo≥ UNIX)
  603.  
  604. áááááááááááSYS_EOF  ááááásystem end-of-file character (if any)
  605.  
  606. áááááááááááTABSTOP       stdout tabstop width
  607.  
  608. ááááááááááá_RDONLY  áááááfilσ opeε fo≥ reaΣ only
  609.  
  610. ááááááááááá_RDWRIT  áááááfilσ opeε fo≥ read/writσ access
  611.  
  612. ááááááááááá_WRONLY  áááááfilσ opeε fo≥ writσ only
  613.  
  614.  
  615. áááááFile Stream _flags bit masks:
  616.  
  617. ááááááááááá_ALLBUF  ááááábit set (1⌐ wheε buffe≥ i≤ allocated
  618.  
  619. ááááááááááá_BUSY   áááááábit set (1⌐ wheε ß FIL┼ i≤ open
  620.  
  621. ááááááááááá_DIRTY  áááááábit set (1⌐ wheε buffe≥ i≤ unflushed
  622.  
  623. ááááááááááá_EOF  áááááááábit set (1⌐ iµ streaφ EO╞ i≤ reached
  624.  
  625. ááááááááááá_IOERR  áááááábit set (1⌐ iµ i/∩ streaφ error
  626.  
  627. áááááFile Stream Data Structure Definition, FILE *fp:
  628.  
  629. áááááááááááBUFFER _bend     point≤ onσ cha≥ pas⌠ las⌠ iε buffer
  630.  
  631. áááááááááááBUFFER _bptr   áácurren⌠ pointe≥ iε streaφ buffer
  632.  
  633. áááááááááááBUFFER _buff     addres≤ oµ streaφ buffer
  634.  
  635. áááááááááááunsigned _buflen lengtΦ oµ buffer
  636.  
  637. áááááááááááchar _bytbuf     singlσ bytσ fo≥ unbuffereΣ streams
  638.  
  639. áááááááááááTBITS _flags     opeε mode¼ error¼ eof¼ busy¼ etc.
  640.  
  641. áááááááááááutiny _unit     áfilσ descripto≥ returneΣ b∙ open
  642.  
  643. è
  644. áááááStandard I/O Macros:
  645.  
  646. áááááááááááclearerr(fp)  ((fp)->_flag≤ &╜ ~(_IOERR|_EOF)
  647.  
  648. ááááááááááágetchar()  ááágetca(stdin)
  649.  
  650. áááááááááááfeof(fp)  áááá(((fp)->_flag≤ &_EOF⌐ !╜ 0)
  651.  
  652. áááááááááááferror(fp) ááá(((fp)->_flag≤ &_IOERR⌐ !╜ 0)
  653.  
  654. áááááááááááfileno(fp)  áá((fp)->_unit)
  655.  
  656. áááááááááááputchar(c) áááputca(c¼ stdout)
  657.  
  658.            eputc(c)      putca(c, stderr)
  659.  
  660. SEE ALSO
  661. áááááopen, close, read, write
  662.  
  663. DIAGNOSTICS
  664. áááááThσ valuσ EO╞ i≤ returneΣ uniforml∙ t∩ indicatσ tha⌠ ßá FIL┼ ì
  665. ááááápointe≥ ha≤ no⌠ beeε initializeΣ witΦ fopen¼á inpu⌠ (output⌐ ì
  666. áááááha≤á beeε attempteΣ oε aε outpu⌠ (input⌐ stream¼á o≥ ßá FIL┼ ì
  667. ááááápointe≥á designate≤ corrup⌠ o≥ otherwisσ unintelligiblσ FIL┼ ì
  668. ááááádata. 
  669. .paè.hestdtyp.h                                                 stdtyp.h
  670.  
  671.                    Standard Defined-Types File
  672.  
  673. NAME
  674. ááááástdtyp.h 
  675.  
  676. SYNOPSIS
  677. ááááá#include <stdtyp.h>
  678.  
  679. DESCRIPTION
  680. áááááSevera∞á bug≤á iε ├ program≤ oµ aε earlie≥á generatioεá werσ ì
  681. áááááfounΣá b∙ rigorousl∙ type-defininτ anΣá consistency-checkinτ ì
  682. ááááásucΦá interface≤ a≤ functioεá arguments¼á functioεá returneΣ ì
  683. ááááávalues¼ááá anΣáá structurσáá definitions«áá  Thi≤áá semantiπ ì
  684. áááááreadabilityá argumen⌠á i≤á thσ onl∙á justificatioεá fo≥á thσ ì
  685. ááááádefined-type≤ LBITS¼ BITS¼ TBITS¼ METACHAR¼ BOOL, anΣ TBOOL¼ ì
  686. ááááábecausσáá thσá underlyinτá type≤á arσá no⌠á subjec⌠á t∩á an∙ ì
  687. áááááportability problems for their restricted usage.
  688.  
  689. áááááThσá casσá i≤á differen⌠á fo≥ thσá type≤á tiny¼á anΣá utiny«  ì
  690. áááááPortabilit∙ problem≤ (botΦ machinσ anΣ compiler⌐ arσ ßá maiε ì
  691. áááááreasoεá fo≥ thesσ distinctions«á  Differen⌠ version≤ oµá thσ ì
  692. ááááácompile≥á havσá introduceΣá datß type≤á fo≥á unsigneΣá char¼ ì
  693. áááááunsigneΣá short,éá anΣá eveε unsigneΣá long«á  AnΣá differen⌠ ì
  694. ááááámachine≤ ma∙ trea⌠ thσ typσ charé a≤ signeΣ o≥ unsigned«á  Iµ ì
  695. áááááprogram≤á arσ writteε witΦ thesσ ra≈ ├ types¼á the∙ mus⌠á bσ ì
  696. áááááediteΣ b∙ hanΣ beforσ portinτ t∩ anothe≥ compile≥ tha⌠á doe≤ ì
  697. áááááno⌠ suppor⌠ ß ne≈ type«á  However¼ iµ ß se⌠ oµ defined-type≤ ì
  698. ááááái≤ consistentl∙ used¼á theε thσ defined-typσ caε bσ targeteΣ ì
  699. ááááát∩ thσ ne≈ typσ wheε i⌠ exists¼á anΣ bσ targeteΣ t∩ aε olde≥ ì
  700. ááááábasσá typσ otherwise«á  Fo≥ truσ portability¼á sucΦ defined-ì
  701. ááááátype≤ mus⌠ bσ augmenteΣ witΦ rvaluσ macros:
  702.  
  703. .uj0
  704. ááááá     TINY(n)       produce≤á ß signeΣ valuσ froφ ╕ o≥á morσ                ì
  705. áááááááááááááááááááááááábit≤ oµ n.
  706.  
  707. ááááá     UTINY(n)      produce≤á aε unsigneΣ valuσ froφ ╕á bit≤                ì
  708. áááááááááááááááááááááááá(o≥ more⌐ oµ n.
  709.  
  710.  
  711. áááááPseudo Storage Classes:
  712.  
  713. ááááá     FASTáááááááááááequivalen⌠ t∩ register.
  714.  
  715. ááááááááááGLOBAL         equivalent to extern.
  716.  
  717. ááááááááááLOCAL          equivalent to static.
  718.  
  719. áááááType definitions:
  720.  
  721. áááááááááátin∙           an 8 bit (or larger) signed integer.
  722.  
  723. ááááááááááutinyá         aε ╕ bi⌠  (o≥ larger⌐  unsigneΣá intege≥ ì
  724. áááááááááááááááááááááááááuseΣ fo≥ ß quantity.
  725. èááááá     TBITS          aεá  ╕á bi⌠á (o≥ larger⌐á useΣá fo≥á bi⌠ ì
  726. ááááááááááááááááááááááááámanipulation.
  727.  
  728. ááááá     TBOOL          aε ╕  bi⌠ (o≥ larger⌐ integer¼á bu⌠ useΣ ì
  729. áááááááááááááááááááááááááfo≥ boolean.
  730.  
  731. ááááá     TEXT           aε ╕ bi⌠ (o≥ larger⌐ iteφ useΣ onl∙ fo≥ ì
  732. ááááááááááááááááááááááááácharacters.
  733.  
  734. ááááá     BOOL           integer, but used for boolean.
  735.  
  736. ááááá     LBITS          long, but only for bit manipulation.
  737.  
  738. ááááá     BITS           ßá 1╢  bi⌠ (o≥ larger⌐ intege≥ onl∙á fo≥ ì
  739. ááááááááááááááááááááááááábi⌠ manipulation.
  740.  
  741. ááááá     METACHAR       ßáá 1╢áá  bi⌠á (o≥áá larger⌐áá augmenteΣ ì
  742. ááááááááááááááááááááááááácharacte≥ (ma∙ bσ -1).
  743.  
  744. ááááá     VOID           a function that returns no value.
  745.  
  746. ááááá     STRING         a string of TEXT, (char *).
  747.  
  748. ááááá     BUFFE╥á        ßá characte≥  arra∙ useΣá a≤á ßá buffer¼ ì
  749. ááááá                    (cha≥ *).
  750.  
  751. ááááá     ALIG╬á         Storagσ allocatioε worΣ  alignmen⌠á datß ì
  752. ááááá                    structure.
  753.  
  754. ááááááááááHEADER         Storage allocation header.
  755. .uj1
  756.  
  757. áááááExcep⌠á  fo≥ tiny,é anΣ utiny¼á defined-type≤ arσ writteεá iε ì
  758. áááááuppe≥ casσ t∩ emphasizσ thei≥ definitioε iε ß heade≥ file.
  759.  
  760. áááááThi≤á particula≥ heade≥ filσ ha≤ beeε adapteΣ froφ thσ Plum-ì
  761. áááááHal∞ StandarΣ (Referencσ 4)«á  Thi≤ filσ mus⌠ bσá customizeΣ ì
  762. ááááát∩á thσ intendeΣ compiler/machinσ environment¼á a≤ describeΣ ì
  763. áááááin the reference and Section 5 of this manual.
  764. .he
  765. .pa o
  766.                   (Intentionally left blank)
  767. .PAè.PN 1
  768. .FO                                3-#
  769.                     3. S Y S T E M   C A L L S 
  770.  
  771.  
  772. Thi≤ sectioε describe≤ al∞ thσ entrie≤ int∩ thσ systeφ assumeΣ b∙ ì
  773. thσá portablσá ├á library«á  Mos⌠ oµ thesσ call≤á havσá aεá erro≥ ì
  774. return«áá  Aεá erro≥á conditioεá i≤á indicateΣá b∙á aεá otherwisσ ì
  775. impossiblσá returneΣá value«á  Almos⌠á alway≤á thi≤á i≤á -1╗á thσ ì
  776. individua∞ section≤ specif∙ thσ details«  Aε erro≥ numbe≥ i≤ als∩ ì
  777. madσá availablσá iε thσ externa∞ variablσ errno«á  errnoéá i≤á no⌠ ì
  778. cleareΣ oε successfu∞ calls¼ s∩ i⌠ shoulΣ bσ testeΣ onl∙ afte≥ aε ì
  779. erro≥ ha≤ occurred.
  780.  
  781. The system calls assumed are:
  782.  
  783. ááááá                    close     read
  784. ááááá                    creat     rename
  785. ááááá                    exit      sbrk
  786. ááááá                    lseek     unlink
  787. ááááá                    open      write
  788.  
  789. Sourcσ codσ fo≥ thesσ function≤ i≤ no⌠ containeΣ iε thσá portablσ ì
  790. library╗á thesσá function≤á expecteΣá t∩ bσ availablσá iεá thσá ├ ì
  791. language system interface supported by the vendor.
  792. .paè.heclose                                                       close
  793.  
  794.             Closσ ß File¼ Operating ╙ystem Interface
  795.  
  796. NAME
  797. áááááclose
  798.  
  799. SYNOPSIS
  800. áááááint close(fildes)
  801. áááááint fildes;
  802.  
  803. DESCRIPTION
  804. ááááá┴áá filσá descipto≥á i≤á aεá intege≥á useΣáá ináá subsequen⌠ ì
  805. áááááinvocation≤á oµá othe≥ input-outpu⌠ function≤ oεá thσá file« ì
  806. áááááGiveεá ßá filσ descripto≥ sucΦ a≤ returneΣ froφ aεá openéá o≥ ì
  807. ááááácreat¼á closeéá close≤ thσ associateΣ file«á  ┴ closσ oµá al∞ ì
  808. áááááfile≤á i≤ automatiπ oε exit¼á bu⌠ sincσ therσ i≤ ß limi⌠á oε ì
  809. áááááthσ numbe≥ oµ opeε file≤ pe≥ process¼ closeé i≤ necessar∙ fo≥ ì
  810. áááááprogram≤ whicΦ dea∞ witΦ man∙ files.
  811.  
  812. SEE ALSO
  813. áááááopen, write, creat, fclose
  814.  
  815. DIAGNOSTICS
  816. ááááácloseéá return≤ ß zer∩ iµ ß filσ i≤ closed╗á EOF i≤á returneΣ ì
  817. áááááfo≥ aε unknowε filσ descriptor.
  818. .paè.hecreat                                                       creat
  819.  
  820.             Creatσ ß File¼ Operating ╙ystem Interface
  821.  
  822. NAME
  823. ááááácrea⌠ 
  824.  
  825. SYNOPSIS
  826. áááááint creat(name, mode)
  827. áááááSTRING name;
  828. áááááint mode;
  829.  
  830. DESCRIPTION
  831. ááááácreat create≤ ß ne≈ filσ o≥ prepare≤ t∩ rewritσ aεá existinτ ì
  832. áááááfilσ calleΣ name¼ giveε a≤ thσ addres≤ oµ ß null-terminatinτ ì
  833. ááááástring«á  Iµá thσá filσá diΣ no⌠á exist¼á i⌠á i≤á giveεá thσ ì
  834. áááááprescribeΣ mode« 
  835.  
  836. áááááIµ thσ filσ diΣ exist¼á it≤ modσ anΣ owne≥ remaiεá unchangeΣ ì
  837. ááááábut it is truncated to zero length.
  838.  
  839. áááááThσ filσ i≤ als∩ openeΣ fo≥ writing¼ anΣ it≤ filσ descripto≥ ì
  840. áááááis returned.
  841.  
  842. áááááThσá modeéá giveε i≤ arbitrary╗á i⌠ neeΣ no⌠á allo≈á writing«  ì
  843. áááááThi≤á featurσá i≤á system-dependent¼áá originall∙á useΣáá b∙ ì
  844. áááááprogram≤á whicΦá dea∞ witΦ temporar∙ file≤ oµá fixeΣá names«  ì
  845. áááááThσ creatioε wa≤ donσ a≤ ß modσ tha⌠ forbid≤ writing«á  Theε ì
  846. áááááiµ ß seconΣ instancσ oµ thσ prograφ werσ t∩ attemp⌠ ß creat¼ ì
  847. áááááaεá erro≥ i≤ returneΣ anΣ thσ prograφ know≤ tha⌠ thσ namσ i≤ ì
  848. áááááunusablσá fo≥á thσ moment«á  However¼á thi≤ featurσá i≤á no⌠ ì
  849. áááááguaranteeΣ iε thσ portablσ library¼ anΣ shoulΣ no⌠ bσ relieΣ ì
  850. áááááupon.
  851.  
  852. SEE ALSO
  853. áááááopen, write, close, stdio.h
  854.  
  855. DIAGNOSTICS
  856. áááááFo≥ creat¼á thσ valuσ EOF i≤ returneΣ if║ ß needeΣ director∙ ì
  857. ááááái≤ no⌠ searchable╗ thσ filσ doe≤ no⌠ exis⌠ anΣ thσ director∙ ì
  858. áááááiε whicΦ i⌠ i≤ t∩ bσ createΣ i≤ no⌠ writable╗á thσ filσ doe≤ ì
  859. áááááexis⌠ anΣ i≤ unwritable╗á thσ filσ i≤ ß directory╗ therσ arσ ì
  860. áááááalread∙ to∩ man∙ file≤ open.
  861. .paè.heexit                                                         exit
  862.  
  863.                         Terminate Process
  864.  
  865. NAME
  866. áááááexit, _exit 
  867.  
  868. SYNOPSIS
  869. áááááVOID exit(status)
  870. áááááint status;
  871.  
  872. áááááVOID _exit(status)
  873. áááááint status;
  874.  
  875. DESCRIPTION
  876. áááááexité i≤ thσ norma∞ mean≤ oµ terminatinτ ß process«á  exité i≤ ì
  877. ááááásupposeΣ t∩ closσ al∞ thσ process'≤ files╗á however¼á i⌠ ma∙ ì
  878. áááááno⌠á closσ buffereΣ stream≤ oµ thσá portablσá library«á  Fo≥ ì
  879. áááááthi≤á purpose¼á thσá portablσ functioε fcloseé i≤á available« ì
  880. ááááástatusé ma∙ bσ availablσ t∩ whateve≥ proces≤ calleΣ thi≤ one¼ ì
  881. ááááádependinτ oε thσ system¼á  s∩ thσ succes≤ o≥ failurσ oµá thσ ì
  882. áááááprograφá caε bσ testeΣ b∙ anothe≥ prograφ tha⌠ use≤ thi≤ onσ ì
  883. áááááa≤ ß sub-process.
  884.  
  885. áááááThis call can never return.
  886.  
  887. áááááThσá ├á functioε exit ma∙ causσ cleanu≡ action≤á beforσá thσ ì
  888. áááááfina∞á 'sy≤á exit'«á  Thσá functioεá _exitá circumvent≤á al∞ ì
  889. ááááácleanup.
  890.  
  891. SEE ALSO
  892. áááááfclose, redirbuf
  893. .pa è.helseek                                                       lseek
  894.  
  895.                      Move Read/Write Pointer
  896.  
  897. NAME
  898. ááááálseek 
  899.  
  900. SYNOPSIS
  901. ááááálong lseek(fildes, offset, whence)
  902. áááááint fildes;
  903. ááááálong offset;
  904. áááááint whence;
  905.  
  906. DESCRIPTION
  907. áááááThσá filσá descripto≥ refer≤ t∩ ß filσ opeε fo≥á readinτá o≥ ì
  908. áááááwriting«  Thσ reaΣ (resp« write⌐ pointe≥ fo≥ thσ filσ i≤ se⌠ ì
  909. áááááas follows:
  910.  
  911. áááááááááááIµ whenceé i≤ ORIGI╬ (0)¼á thσ pointe≥ i≤ se⌠ t∩ offseté ì
  912. ááááááááááábytes.
  913.  
  914. áááááááááááIµá whenceé i≤ CURPO╙ (1)¼á thσ pointe≥ i≤ se⌠á t∩á it≤ ì
  915. ááááááááááácurren⌠ locatioε plu≤ offset.
  916.  
  917. áááááááááááIµá whenceéá i≤ FILEN─ (2)¼á thσ pointe≥ i≤ se⌠ t∩á thσ ì
  918. ááááááááááásizσ oµ thσ filσ plu≤ offset.
  919.  
  920. áááááThe returned value is the resulting pointer location.
  921.  
  922. áááááSeekinτ fa≥ beyonΣ thσ enΣ oµ ß file¼á theε writing¼ create≤ ì
  923. áááááß ga≡ o≥ hole¼ whicΦ occupie≤ n∩ physica∞ spacσ anΣ read≤ a≤ ì
  924. ááááázeros.
  925.  
  926. SEE ALSO
  927. áááááopen, creat, fseek, stdio.h
  928.  
  929. DIAGNOSTICS
  930. áááááEOFé i≤ returneΣ fo≥ aε undefineΣ filσ descriptor¼ o≥ seeδ t∩ ì
  931. áááááß positioε beforσ thσ beginninτ oµ file.
  932. .paè.heopen                                                         open
  933.  
  934.                    Open for Reading or Writing
  935.  
  936. NAME
  937. áááááopen 
  938.  
  939. SYNOPSIS
  940. áááááint open(name, flag, mode)
  941. áááááSTRING name;
  942. áááááint flag, mode;
  943.  
  944. DESCRIPTION
  945. áááááopenéá open≤ thσ filσ nameé fo≥ readinτ (iµ flagéá i≤á _RDONLY¼ ì
  946. ááááá0)¼á writinτ (iµ flagé i≤ _WRONLY¼ 1⌐ o≥ fo≥ botΦ readinτ anΣ ì
  947. áááááwritinτ (iµ flagé i≤ _RDWRIT¼á 2)«á  nameé i≤ thσ addres≤ oµ ß ì
  948. ááááástrinτáá oµá ASCI╔á character≤á representinτá thσá filename¼ ì
  949. áááááterminateΣ b∙ ß NULLé character.
  950.  
  951. áááááThσá filσá i≤á positioneΣ a⌠ thσ beginninτá (bytσá 0)«á  Thσ ì
  952. áááááreturneΣá filσ descripto≥ mus⌠ bσ useΣ fo≥ subsequen⌠á call≤ ì
  953. áááááfor other input-output functions on the file.
  954.  
  955. áááááThσ modeé i≤ arbitrary¼á anΣ i≤ unuseΣ fo≥ thσ flaτ value≤ oµ ì
  956. áááááthσá portablσ library«á  Thσ presencσ o≥ absencσ oµ thσ modeé ì
  957. áááááargumen⌠ ma∙ requirσ module≤ callinτ thσ opené functioε t∩ bσ ì
  958. ááááámodifieΣá t∩á conforφá witΦ thσá requirement≤á oµá thσá hos⌠ ì
  959. ááááácomputer.
  960.  
  961. SEE ALSO
  962. ááááácreat, read, write, close, fopen, stdio.h
  963.  
  964. DIAGNOSTICS
  965. áááááThσ valuσ EOFé i≤ returneΣ iµ thσ filσ doe≤ no⌠ exist¼ iµ onσ ì
  966. áááááoµáá thσáá necessar∙á directorie≤á doe≤á no⌠á exis⌠á o≥áá i≤ ì
  967. áááááunreadable¼ iµ thσ filσ i≤ no⌠ readablσ (resp« writable)¼ o≥ ì
  968. áááááiµ to∩ man∙ file≤ arσ open.
  969. .paè.heread                                                         read
  970.  
  971.                          Read from File
  972.  
  973. NAME
  974. áááááread 
  975.  
  976. SYNOPSIS
  977. áááááint read(fildes, buffer, nbytes)
  978. áááááint fildes, nbytes;
  979. áááááBUFFER buffer;
  980.  
  981. DESCRIPTION
  982. ááááá┴áá filσá descripto≥á i≤á thσá in⌠á valuσá returneΣá froφá ß ì
  983. ááááásuccessfu∞ open o≥ creat.é  bufferé i≤ thσ locatioε oµá nbytesé ì
  984. ááááácontiguou≤ byte≤ int∩ whicΦ thσ inpu⌠ wil∞ bσ placed«  I⌠ i≤ ì
  985. áááááno⌠á guaranteeΣá tha⌠á al∞ nbytesé byte≤ wil∞á bσá read╗á fo≥ ì
  986. áááááexample¼ iµ thσ filσ refer≤ t∩ ß typewrite≥ a⌠ mos⌠ onσ linσ ì
  987. áááááwil∞ bσ returned«á  Iε an∙ event¼á thσ numbe≥ oµá character≤ ì
  988. áááááreaΣ i≤ returned.
  989.  
  990. áááááIµá thσá returneΣ valuσ i≤ zero¼á theε end-of-filσ ha≤á beeε ì
  991. áááááreached.
  992.  
  993. SEE ALSO
  994. áááááopen, creat
  995.  
  996. DIAGNOSTICS
  997. áááááA≤ mentioned¼á NUL╠ (0⌐ i≤ returneΣ wheε thσ enΣ oµ thσ filσ ì
  998. áááááha≤á beeε reached«á  Iµ thσ reaΣ wa≤ otherwisσá unsuccessfu∞ ì
  999. áááááthσá returε valuσ i≤ EOF«á  Man∙ condition≤ caε generatσá aε ì
  1000. áááááerror║ physica∞ I/╧ errors¼ baΣ buffe≥ address¼ preposterou≤ ì
  1001. ááááánbytes¼ filσ descripto≥ no⌠ tha⌠ oµ aε inpu⌠ file« 
  1002.  
  1003. BUGS
  1004. áááááSomσá system≤ ma∙ contaiε interna∞ bufferinτ t∩ makσ usσá oµ ì
  1005. ááááátermina∞á linσ editinτ feature≤ oµ somσá operatinτá systems«  ì
  1006. áááááTherefore¼á read(0¼á buffer¼ 1)é ma∙ no⌠ responΣ properl∙ fo≥ ì
  1007. ááááácharacter-by-character inputs.
  1008. .paè.herename                                                     rename
  1009.  
  1010.                           Rename a File
  1011.  
  1012. NAME
  1013. ááááárename
  1014.  
  1015. SYNOPSIS
  1016. áááááint rename(old¼ new)
  1017. áááááSTRIN╟ old¼ new;
  1018.  
  1019. DESCRIPTION
  1020. ááááárename changes the name of a file from old to new.
  1021.  
  1022. DIAGNOSTICS
  1023. ááááárename returns the value NULL if successful, and EOF is not.
  1024. .paè.hesbrk                                                         sbrk
  1025.  
  1026.                      Change Core Allocation
  1027.  
  1028. NAME
  1029. ááááásbrk 
  1030.  
  1031. SYNOPSIS
  1032. áááááSTRING sbrk(incr)
  1033. áááááint incr;
  1034.  
  1035. DESCRIPTION
  1036. áááááIεá sbrk¼á incr morσ byte≤ arσ addeΣ t∩ thσá program'≤á datß ì
  1037. áááááspacσá anΣ ß pointe≥ t∩ thσ star⌠ oµ thσ lowes⌠ locatioε no⌠ ì
  1038. áááááused by program (called the break) is returned.
  1039.  
  1040. SEE ALSO
  1041. ááááámalloc, free
  1042.  
  1043. DIAGNOSTICS
  1044. áááááAεá EOFé (-1⌐ i≤ returneΣ iµ thσ prograφ request≤ morσ memor∙ ì
  1045. áááááthaε thσ systeφ limi⌠ o≥ iµ othe≥ operatinτ systeφá interna∞ ì
  1046. ááááácontraints are violated.
  1047.  
  1048. BUGS
  1049. áááááSettinτá thσ breaδ iε thσ rangσ 017770▒ t∩ 017777╖á (oεá thσ ì
  1050. áááááPDP11) is the same as setting it to zero.   
  1051. .paè.heunlink                                                     unlink
  1052.  
  1053.                      Remove Directory Entry
  1054.  
  1055. NAME
  1056. áááááunlink 
  1057.  
  1058. SYNOPSIS
  1059. áááááint unlink(name)
  1060. áááááSTRING name;
  1061.  
  1062. DESCRIPTION
  1063. ááááánameé point≤ t∩ ß null-terminateΣ string«  unlinké remove≤ thσ ì
  1064. áááááentr∙á fo≥á thσ filσ identifieΣ b∙ nameé froφ it≤á directory«  ì
  1065. áááááIµ thi≤ entr∙ wa≤ thσ las⌠ linδ t∩ thσ file¼ thσ content≤ oµ ì
  1066. áááááthσ filσ arσ freeΣ anΣ thσ filσ i≤ destroyed«á  If¼ however¼ ì
  1067. áááááthσ filσ wa≤ opeε iε an∙ process¼á thσ actua∞ destructioε i≤ ì
  1068. ááááádelayeΣ unti∞ i⌠ i≤ closed¼á eveε thougΦ thσ director∙ entr∙ ì
  1069. áááááha≤ disappeared.
  1070.  
  1071. DIAGNOSTICS
  1072. áááááNULLéá (0⌐ i≤ normall∙ returned╗á EOFé indicate≤ tha⌠ thσ filσ ì
  1073. ááááádoe≤á no⌠ exist¼á tha⌠ it≤ director∙ canno⌠ bσá written¼á o≥ ì
  1074. ááááátha⌠ thσ filσ contain≤ purσ procedurσ tex⌠ tha⌠ i≤ currentl∙ ì
  1075. áááááiεá use«á  Writσá permissioεá i≤ no⌠ requireΣá oεá thσá filσ ì
  1076. áááááitself«á  I⌠á i≤ als∩ illega∞ t∩ unlinδ ß director∙á (excep⌠ ì
  1077. áááááfo≥ thσ super-user, in UNIX).
  1078.  
  1079. .paè.hewrite                                                       write
  1080.  
  1081.                          Write on a File
  1082.  
  1083.  
  1084. NAME
  1085. áááááwrite 
  1086.  
  1087. SYNOPSIS
  1088. áááááint write(fildes, buffer, nbytes)
  1089. áááááint fildes, nbytes;
  1090. áááááBUFFER buffer;
  1091.  
  1092. DESCRIPTION
  1093. ááááá┴á filσ descripto≥ i≤ aε intege≥ returneΣ froφ ßá successfu∞ ì
  1094. áááááopeε o≥ creat.
  1095.  
  1096. ááááábufferé i≤ thσ addres≤ oµ nbytesé contiguou≤ bytes¼á whicΦ arσ ì
  1097. áááááwritteεá oεá thσá outpu⌠ file«á  Thσá numbe≥á oµá character≤ ì
  1098. áááááactuall∙ writteε i≤ returned«á  I⌠ shoulΣ bσ regardeΣ a≤á aε ì
  1099. áááááerro≥ iµ the returned value i≤ no⌠ thσ samσ a≤ nbytes.
  1100.  
  1101. áááááWrite≤á oµá ßá certaiε sizσ ma∙ bσ morσá efficien⌠á oεá somσ ì
  1102. ááááámachines, depending on implementation particulars.
  1103.  
  1104. SEE ALSO
  1105. ááááácreat, open
  1106.  
  1107. DIAGNOSTICS
  1108. áááááReturn≤á EOFé oε error║á baΣ descriptor¼á buffe≥ address¼á o≥ ì
  1109. ááááácount╗ physica∞ I/╧ errors.
  1110. .he
  1111. .pa o
  1112.                   (Intentionally left blank)
  1113. .PAè.PN 1
  1114. .FO                                4-#
  1115.                  4. F U N C T I O N   L I B R A R Y 
  1116.  
  1117.  
  1118. Thi≤á chapte≥á describe≤á function≤ containeΣ iε thσá portablσá ├ ì
  1119. function library.
  1120.  
  1121. Function≤ iε thσ matΦ librar∙ ma∙ returε conventiona∞ value≤ wheε ì
  1122. thσá functioεá i≤ undefineΣ fo≥ thσ giveε argument≤ o≥á wheεá thσ ì
  1123. valuσ i≤ no⌠ representable«  Iε thesσ case≤ thσ externa∞ variablσ ì
  1124. errnoé i≤ se⌠ t∩ thσ valuσ EDOMé o≥ ERANGE«  Thσ value≤ oµ EDOMé anΣ ì
  1125. ERANGE are defined in the include file <errno.h>.
  1126.  
  1127. Man∙á entrie≤á contaiεá morσá thaεá onσá function╗á however¼á al∞ ì
  1128. functioε name≤ (anΣ shor⌠ definition¼ iµ differen⌠ froφ name⌐ arσ ì
  1129. includeΣ iε thσ inde° fo≥ eas∙ access.
  1130.  
  1131. Becausσá oµá filσ spacσ limitation≤ iεá somσá hos⌠á systems¼á thσ ì
  1132. conglomeratioεá oµá function≤ int∩ file≤ i≤ expecteΣ t∩ bσá host-ì
  1133. dependent╗á and¼á therefore¼á no⌠ covereΣ here«  ┴ lis⌠ oµ sourcσ ì
  1134. files and the functions they contain is given in Section 5.
  1135. .paè.heabs                                                           abs
  1136.  
  1137.                          Absolute Values
  1138.  
  1139. NAME                  
  1140. áááááabs, fabs, labs 
  1141.                       
  1142. SYNOPSIS              
  1143. áááááint abs(i)           
  1144. áááááint i;           
  1145.  
  1146. ááááádouble fabs(x)
  1147. ááááádouble x;
  1148.                       
  1149. ááááálong labs(n)          
  1150. ááááálong n;          
  1151.                       
  1152. DESCRIPTION           
  1153. áááááabsá i≤á ßá functioεá returninτ thσ absolutσá valuσá oµá it≤ ì
  1154. áááááintege≥ operand.
  1155.  
  1156. áááááABSá i≤ thσ macr∩ iε heade≥ filσ defs.h¼á whicΦ perform≤ thσ ì
  1157. ááááásamσá operatioεá a≤á thσ functioε abs¼á bu⌠á ma∙á havσá sidσ ì
  1158. áááááeffects.  ABS works for all numeric types.
  1159.  
  1160. áááááfabs returns the absolute value |x|.
  1161.  
  1162. ááááálabsá return≤á thσ lonτ intege≥ absolutσ valuσ oµá it≤á lonτ ì
  1163. áááááoperand, n.
  1164.  
  1165. BUGS
  1166. áááááYo⌡á ge⌠á wha⌠á thσ hardwarσ give≤ oε thσá larges⌠á negativσ ì
  1167. áááááinteger.
  1168. .paèallot                                                       allot
  1169.  
  1170.                     Memory Allocation Package
  1171.  
  1172. NAME
  1173. áááááallot, liberate
  1174.  
  1175. SYNOPSIS
  1176. áááááSTRING allot(nbytes)
  1177. áááááunsigned nbytes;
  1178.  
  1179. áááááVOID liberate(ptr, nbytes)
  1180. áááááSTRING ptr;
  1181. áááááunsigned nbytes;
  1182.  
  1183. DESCRIPTION
  1184. áááááalloté anΣ liberateé providσ ß simple¼á general-purposσ memor∙ ì
  1185. áááááallocatioε package«á  alloté return≤ ß pointe≥ t∩ ß blocδá oµ ì
  1186. áááááa⌠á leas⌠ nbytesé bytes«á  Thσ argument≤ oµ liberateé definσ ß ì
  1187. áááááblocδá t∩á bσ madσ availablσ fo≥á furthe≥á allocation«á  Thσ ì
  1188. áááááliberated block need not have been previously allotted.
  1189.  
  1190. áááááNeedles≤á t∩ say¼á gravσ disorde≥ wil∞ resul⌠ iµá thσá spacσ ì
  1191. áááááassigneΣá b∙á allotéá i≤ overruε o≥ iµ somσá randoφá ptréá  o≥ ì
  1192. áááááoversizσ nbytesé i≤ handeΣ t∩ liberate.
  1193.  
  1194. áááááallotéá allocate≤á thσ firs⌠ big-enougΦ contiguou≤á reacΦá oµ ì
  1195. áááááfreσá spacσá founΣ iε ß circula≥ searcΦ froφ thσ las⌠á blocδ ì
  1196. áááááallocateΣá o≥ freed¼á coalescinτ adjacen⌠ freσ block≤ a≤á i⌠ ì
  1197. ááááásearches«á  I⌠ call≤ sbrké t∩ ge⌠ morσ memor∙ froφ thσ systeφ ì
  1198. áááááwhen there is no suitable space already free.
  1199.  
  1200. áááááallotéá anΣá liberateé worδ mucΦ thσ samσ a≤ mallocé anΣá free« ì
  1201. áááááThσ difference≤ arσ tha⌠ mallocé anΣ freeé operatσ witΦ block≤ ì
  1202. ááááátha⌠á contaiε aε overheaΣ structure¼á anΣ freeΣ block≤á mus⌠ ì
  1203. áááááhavσá beeεá previousl∙ allocated¼á wherea≤á allotteΣá block≤ ì
  1204. ááááácontaiε n∩ sucΦ overhead¼ anΣ liberateΣ block≤ ma∙ bσ freel∙ ì
  1205. áááááaddeΣá t∩á thσ availablσ store«á  Block≤á arσá allotteΣá anΣ ì
  1206. áááááliberateΣ iε unit≤ oµ sizσ sizeof(HEADER)é bytes.
  1207.  
  1208. DIAGNOSTICS
  1209. áááááallotéá return≤ ß NULLé pointe≥ (0⌐ iµ therσ i≤á n∩á availablσ ì
  1210.      memor∙á o≥á iµ thσ operatinτ systeφ ha≤ detecteΣá corruptioε ì
  1211. áááááoutside the allotted area.
  1212.  
  1213. SEE ALSO
  1214. ááááámalloc, free
  1215. .paè.heatoµ                                                         atof
  1216.  
  1217.                     ASCII/Numeric Conversion
  1218.  
  1219. NAME
  1220.      astof¼á astoi¼á astol¼á atof¼ atoi¼ atol¼ ftoa¼ itoa¼ itoab¼ ì
  1221. áááááltoa, ltoab, tobase, utoa
  1222.  
  1223. SYNOPSIS
  1224.      STRING astof(s, val)
  1225.     áSTRING s;
  1226. ááááádouble *val;
  1227.      
  1228.      STRING astoi(s, val)
  1229.      STRING s;
  1230. áááááint *val;
  1231.  
  1232.      STRING astol(s, val)
  1233.      STRING s;
  1234. ááááálong *val;
  1235.  
  1236.      double atof(s)
  1237.      STRING s;
  1238.      
  1239.      int atoi(s)
  1240.      STRING s;
  1241.  
  1242.      long atol(s)
  1243.      STRING s;
  1244.  
  1245. áááááSTRING ftoa(s, x, pr, mode)
  1246. áááááSTRING s;
  1247. ááááádouble x;
  1248. áááááint pr;
  1249. áááááchar mode;
  1250.  
  1251. áááááSTRING itoa(s, n, w)
  1252. áááááSTRING s;
  1253. áááááint n, w;
  1254.  
  1255. áááááSTRING itoab(s, n, w, b)
  1256. áááááSTRING s;
  1257. áááááint n, w, b;
  1258.  
  1259. áááááSTRING ltoa(s, n, w)
  1260. áááááSTRING s;
  1261. ááááálong n;
  1262. áááááint w;
  1263.  
  1264. áááááSTRING ltoab(s, n, w, b)
  1265. áááááSTRING s;
  1266. ááááálong n;
  1267. áááááint w, b;
  1268.  
  1269.  
  1270. èáááááMETACHAR tobase(ch, base)
  1271. áááááchar ch;
  1272. áááááint base;
  1273.  
  1274. áááááSTRING utoa(s, n, w)
  1275. áááááSTRING s;
  1276. áááááunsigned n;
  1277. áááááint w;
  1278.  
  1279. DESCRIPTION
  1280. áááááastof¼á astoiéá anΣ astolé conver⌠ ß strinτ pointeΣ t∩ b∙ sé t∩ ì
  1281. áááááfloating¼á integer¼á anΣá lonτá intege≥á valéá representatioε ì
  1282. ááááárespectively«á  Thσá firs⌠ unrecognizeΣ characte≥á end≤á thσ ì
  1283. ááááástring«á  The∙á operatσá iε thσ samσ wa∙ a≤ atof¼á atoiéá anΣ ì
  1284. áááááatol¼á excep⌠ tha⌠ the∙ storσ thσ valuσ iε val¼ anΣ returε ß ì
  1285. ááááápointe≥ t∩ thσ nex⌠ unuseΣ character.
  1286.  
  1287. áááááatof¼á atoi¼á anΣ atolé function≤ conver⌠ ß strinτ pointeΣ t∩ ì
  1288. áááááb∙ sé t∩ floating¼á integer¼ anΣ lonτ intege≥ representation¼ ì
  1289. ááááárespectively«á  Thσá firs⌠ unrecognizeΣ characte≥á end≤á thσ ì
  1290. áááááconversion.
  1291.  
  1292. áááááatof recognize≤ aε optiona∞ strinτ oµ tab≤ anΣ spaces¼á theε ì
  1293. áááááaεá optiona∞á sign¼á theεá ßá strinτá oµá digit≤á optionall∙ ì
  1294. ááááácontaininτá ßá decima∞ point¼á theε aε optiona∞ 'eºá o≥á 'Eº ì
  1295. áááááfolloweΣ b∙ aε optionall∙ signeΣ integer.
  1296.  
  1297. áááááatoiá anΣá atolá recognizσ aε optiona∞ strinτá oµá tab≤á anΣ ì
  1298. áááááspaces¼á theε aε optiona∞ sign¼ theε ß strinτ oµ digits«  Iµ ì
  1299. áááááthσ strinτ begin≤ iε '0x'¼á theε thσ numbe≥ i≤ assumeΣ t∩ bσ ì
  1300. áááááhexadecimal╗á otherwise¼á iµá thσ leadinτ digi⌠ i≤ '0'¼á thσ ì
  1301. ááááástring is interpreted as an octal.
  1302.  
  1303. áááááftoaéá convert≤ xé t∩ aε ASCI╔ strinτ sé witΦ precisioεá préá iε ì
  1304. ááááámodeéá 'e'¼á 'f',é o≥ 'g'é format«á  Thi≤ functioε return≤á thσ ì
  1305. ááááápointe≥ t∩ s«á  Thσ modeé argumen⌠ ma∙ als∩ bσ 0¼á 1é o≥ 2éá t∩ ì
  1306. ááááádesignate 'e', 'f', or 'g', respectively.
  1307.  
  1308. áááááitoaé convert≤ aε intege≥ t∩ ASCII«á  I⌠ return≤ ß pointe≥ t∩ ì
  1309. ááááás¼ whicΦ contain≤ thσ ASCI╔ valuσ oµ né t∩ minimuφ widtΦ |w|¼ ì
  1310. ááááá0-filleΣá iµ w<0¼á elsσ space-filled«á  Thi≤ functioεá i≤á ß ì
  1311. ááááámodifieΣá versioεá oµ itoa(⌐ founΣ iε Kernighaε anΣá Ritchiσ ì
  1312. ááááá(seσ Referencσ 2¼á pp«á 60)¼ witΦ modification≤ a≤ suggesteΣ ì
  1313. áááááiεá exercise≤á 3-│ anΣ 3-5¼á anΣ witΦá returneΣá pointe≥á t∩ ì
  1314. áááááresul⌠ string.
  1315.  
  1316. áááááitoabéá convert≤á aεá intege≥ né t∩ ßá minimuφá oµá |w|éá asciΘ ì
  1317. ááááácharacters¼á basσá b«á  I⌠á return≤ ß pointe≥á t∩á s¼á whicΦ ì
  1318. ááááácontain≤á thσá ASCI╔ value«á  Iµ wé i≤ les≤ thaε zero¼á séá i≤ ì
  1319. ááááázero-filled╗ otherwise¼ i⌠ i≤ space-filled.
  1320.  
  1321. áááááltoaéá convert≤ ß lonτ né t∩ ß minimuφ oµ |w|é ASCI╔ character≤ ì
  1322. ááááá(0-filleΣ iµ wé ╝ 0¼á anΣ space-filleΣ otherwise)¼á anΣá put≤ ì
  1323. ááááátheφá iεá s¼á returninτ thσ pointe≥ t∩ s«á  Thi≤ i≤á als∩á ß ì
  1324. ááááámodifieΣá versioε oµ itoa(⌐ froφ Kernigaε anΣ Ritchie¼á witΦ ìèááááámodification≤ a≤ suggesteΣ iε exercise≤ 3-│ anΣ 3-5¼ fo≥ usσ ì
  1325. áááááwitΦ thσ lonτ datß type« (seσ Referencσ 2¼ pp« 60)
  1326.  
  1327. áááááltoabéá convert≤ lonτ né t∩ ß minimuφ oµ wéá asciΘá characters¼ ì
  1328. ááááábasσ b¼ anΣ put≤ thσ ASCI╔ iε s¼ returninτ ß pointe≥ t∩ s.
  1329.  
  1330. ááááátobaseéá return≤ thσ valuσ oµ characte≥ ché t∩ basσá base¼á iµ ì
  1331. ááááávalid, or EOF if not.
  1332.  
  1333. áááááutoaé return≤ ß pointe≥ t∩ thσ strinτ s¼ whicΦ contain≤ ASCI╔ ì
  1334. ááááávaluσá oµ unsigneΣ n¼á basσ 10¼á witΦ minimuφ widtΦ |w|éá (0-ì
  1335. áááááfilleΣ iµ wé ╝ 0¼ anΣ space-filleΣ otherwise)«  Thi≤ functioε ì
  1336. ááááái≤á anothe≥á modifieΣ versioε oµ itoa(⌐ founΣ iε ╦ ª ╥á (seσ ì
  1337. áááááReferencσ 2¼á pp«á 60)¼á witΦ modification≤ a≤ suggesteΣá iε ì
  1338. áááááexercise≤á 3-┤ anΣ 3-5¼á anΣ witΦ returneΣ pointe≥ t∩ resul⌠ ì
  1339. ááááástring.
  1340.  
  1341. SE┼ ALSO
  1342. áááááscanf
  1343.  
  1344. BUGS
  1345. áááááThere are no provisions for overflow.
  1346. .paè.hebitcount                                                 bitcount
  1347.  
  1348.                      Count Bits in Argument
  1349.  
  1350. NAME
  1351. ááááábitcount 
  1352.  
  1353. SYNOPSIS
  1354. áááááint bitcount(i)
  1355. áááááBITS i;
  1356.  
  1357. DESCRIPTION
  1358. ááááábitcountéá i≤ ß ╦ ª ╥ functioε (Referencσ 2¼á pagσ 47⌐á whicΦ ì
  1359. ááááácount≤ anΣ return≤ thσ numbe≥ oµ 1-bit≤ iε i.
  1360. .paè.heclearerr                                                 clearerr
  1361.  
  1362.                      Stream Status Inquiries
  1363.  
  1364. NAME
  1365. áááááclearerr, feof, ferror, filen∩ 
  1366.  
  1367. SYNOPSIS
  1368. ááááá#includσ <stdio.h>
  1369.  
  1370. áááááVOID clearerr(stream)
  1371. áááááFIL┼ *stream;
  1372.  
  1373. áááááBOOL feof(stream)
  1374. áááááFIL┼ *stream;
  1375.  
  1376. áááááBOOL ferror(stream)
  1377. áááááFILE *stream;
  1378.  
  1379. áááááint fileno(stream)
  1380. áááááFIL┼ *stream;
  1381.  
  1382. DESCRIPTION
  1383. áááááclearerréá reset≤á (set≤á t∩ 0⌐ thσ erro≥ indicatioεá oεá thσ ì
  1384. ááááánameΣ stream.
  1385.  
  1386. áááááfeoµ return≤ non-NULL wheε enΣ oµ filσ i≤ reaΣ oε thσá nameΣ ì
  1387. áááááinpu⌠ stream¼ otherwisσ it returns NULL.
  1388.  
  1389. áááááferroréá return≤á non-NULLé iµ aε erro≥ ha≤ occurreΣá oεá FIL┼ ì
  1390. ááááástream; otherwise, it returns NULL.
  1391.  
  1392. áááááfilen∩á return≤ thσ intege≥ filσ descripto≥ associateΣá witΦ ì
  1393. áááááthσ stream; seσ open.
  1394.  
  1395. áááááIεá UNIX¼á thesσ function≤ arσ implementeΣ a≤á macros╗á the∙ ì
  1396. ááááácanno⌠á bσá redeclared«á  Here¼á however¼á the∙á arσá norma∞ ì
  1397. áááááfunction≤á anΣá d∩á no⌠ havσ thσ possiblσá sidσá effect≤á oµ ì
  1398. ááááámacros«   
  1399.  
  1400. áááááThe∙á d∩á havσá correspondinτá macros¼áá founΣá iεá stdio.h: ì
  1401. áááááCLEARERR¼ FEOF¼ FERROR¼ anΣ FILENO.
  1402.  
  1403. SEE ALSO
  1404. áááááfopen¼ open
  1405.  
  1406. .paè.heerf                                                           erf
  1407.  
  1408.               Gaussian Error Functions and Inverses
  1409.  
  1410. NAME
  1411. áááááerf, erfc, inverf, inverfc 
  1412.  
  1413. SYNOPSIS
  1414. ááááádouble erf(x)
  1415. ááááádouble x;
  1416.  
  1417. ááááádouble erfc(x)
  1418. ááááádouble x;
  1419.  
  1420. ááááádouble inverf(x)
  1421. ááááádouble x;
  1422.  
  1423. ááááádouble inverfc(x)
  1424. ááááádouble x;
  1425.  
  1426. DESCRIPTION
  1427. áááááerfé return≤ thσ erro≥ functioε oµ x¼á a≤ defineΣ iε Handbooδ ì
  1428. áááááoµ Mathematica∞ Functionsô (Seσ Referencσ 3¼ pp« 297).
  1429.  
  1430. áááááerfcéáá return≤á thσá complimentar∙á erro≥á functioεá oµáá x¼ ì
  1431. ááááá1-erf(x).
  1432.  
  1433. áááááCoefficient≤á fo≥ thσ abovσ function≤ arσá froφá Schonfelde≥ ì
  1434. ááááá(see Reference 7).
  1435.  
  1436. áááááinverfé return≤ thσ inversσ oµ thσ erro≥ function¼ erf«  Thi≤ ì
  1437. ááááároutinσ use≤ thσ approximation≤ giveε iε "Rationa∞ Chebyshe÷ ì
  1438. áááááApproximation≤áá fo≥á thσá Inversσá Erro≥á Function"¼áá (seσ ì
  1439. áááááReference 8, pp. 827-830)
  1440.  
  1441. áááááinverfcá return≤á thσá inversσ oµá thσá complementar∙á erro≥ ì
  1442. áááááfunction, erfc.
  1443.  
  1444. DIAGNOSTICS
  1445. áááááIε inverf¼á iµ |x|é ╛ 1.0¼ errnoé i≤ se⌠ t∩ EDOM«  Iε inverfc¼ ì
  1446. áááááiµ |x|é ╝ ░ o≥ ╛ 2¼á errnoé i≤ se⌠ t∩ EDOM¼á anΣ iµ xé i≤ zero¼ ì
  1447. ááááái⌠ i≤ se⌠ t∩ ERANGE« Iε eacΦ  oµ  thesσ  cases¼ INFINITYé  o≥ ì
  1448. ááááá-INFINITYéáá i≤áá returneΣá fo≥á positivσá o≥áá negativσáá x¼ ì
  1449. ááááárespectively;
  1450. .paè.heexp                                                           exp
  1451.  
  1452.                      Mathematical Functions
  1453.  
  1454. NAME
  1455. áááááexp¼á log¼á log10¼á log2¼á pow¼á sqrt¼á cbr⌠ ì
  1456.  
  1457. SYNOPSIS
  1458. ááááádouble exp(x)
  1459. ááááádouble x;
  1460.  
  1461. ááááádouble log(x)
  1462. ááááádouble x;
  1463.  
  1464. ááááádouble log10(x)
  1465. ááááádouble x;
  1466.  
  1467. ááááádouble log2(x)
  1468. ááááádouble x;
  1469.  
  1470. ááááádouble pow(x,y)
  1471. ááááádouble x, y;
  1472.  
  1473. ááááádouble sqrt(x)
  1474. ááááádouble x;
  1475.  
  1476. ááááádouble cbrt(x)
  1477. ááááádouble x;
  1478.  
  1479. DESCRIPTION
  1480. áááááAl∞á function≤ abovσ excep⌠ cbrté werσ programmeΣá usinτá thσ ì
  1481. áááááalgorithms in Coty and Waite (Reference 5).
  1482.  
  1483. áááááexpéá return≤á thσá exponentia∞á functioεá oµá x¼áá ex¼á (seσ ì
  1484. áááááReferencσ 5¼ pp« 60-83).
  1485.  
  1486. ááááálogé return≤ thσ natura∞ logarithφ oµ xé (seσ Referencσ 5¼ pp« ì
  1487. ááááá35-59).
  1488.  
  1489. ááááálog10éá return≤á thσá commoε (basσ 10⌐á logarithm¼á anΣá log2é ì
  1490. áááááreturn≤ thσ binar∙ logarithφ (basσ 2⌐ oµ x.
  1491.  
  1492. ááááápowé return≤ xé raiseΣ t∩ thσ powe≥ oµ y¼ wherσ xé ╛ 0¼ xyé (seσ ì
  1493. áááááReferencσ 5¼ pp« 84-124).
  1494.  
  1495. ááááásqrté return≤ thσ squarσ roo⌠ oµ x¼ fo≥ x > ░ (seσ Referencσ 5¼ ì
  1496. ááááápp« 17-34).
  1497.  
  1498. ááááácbrté return≤ thσ cubσ roo⌠ oµ xé  (seσ Referencσ 6).
  1499.  
  1500. SE┼ ALSO
  1501. áááááhypot, sinh
  1502.  
  1503. DIAGNOSTICS
  1504. áááááexpéá anΣá powé returε INFINIT┘ wheε thσ correc⌠á valuσá woulΣ ì
  1505. áááááoverflow╗á  errnoéá i≤ se⌠ t∩ ERANGE«á  powé return≤ zer∩á anΣ ìèáááááset≤á errnoé t∩ EDOMé wheε thσ seconΣ argumen⌠ i≤ negativσ anΣ ì
  1506. ááááánon-integral¼ anΣ als∩ wheε botΦ argument≤ arσ zero.
  1507. ááááá
  1508. ááááálogé return≤ zer∩ wheε xé i≤ zer∩ o≥ negative╗á  errnoé i≤á se⌠ ì
  1509. ááááát∩ EDOM.
  1510.  
  1511. ááááásqrté return≤ zer∩ wheε xé i≤ negative╗ errnoé i≤ se⌠ t∩ EDOM.
  1512. .paè.hefclose                                                     fclose
  1513.  
  1514.                      Close or Flush a Stream
  1515.  
  1516. NAME
  1517. áááááfclose, fflush, flush
  1518.  
  1519. SYNOPSIS
  1520. ááááá#include <stdio.h>
  1521.  
  1522. áááááint fclose(stream)
  1523. áááááFILE *stream;
  1524.  
  1525. áááááint fflush(stream)
  1526. áááááFILE *stream;
  1527.  
  1528. áááááint flush(stream, c)
  1529. áááááFILE *stream;
  1530. áááááint c;
  1531.  
  1532. DESCRIPTION
  1533. áááááfcloseá cause≤á an∙á buffer≤á fo≥ thσá nameΣá streamá t∩á bσ ì
  1534. áááááemptied¼á anΣá thσ filσ t∩ bσ closed«á  Buffer≤ allocateΣ b∙ ì
  1535. áááááthe standard input/output system are freed.
  1536.  
  1537. áááááfcloseé i≤ performeΣ automaticall∙ upoε callinτ exit¼á oε al∞ ì
  1538. áááááopen files.  
  1539.  
  1540. áááááfflush cause≤ an∙ buffereΣ datß fo≥ thσ nameΣ outpu⌠á stream ì
  1541. áááááto be written to that file.  The stream remains open.
  1542.  
  1543. áááááflushé write≤ an∙ buffereΣ character≤ ont∩ FIL┼ stream╗á theε ì
  1544. áááááiµ cé isn'⌠ EOF¼á i⌠ put≤ i⌠ iε thσ buffer«
  1545.  
  1546. SE┼ ALSO
  1547. áááááclose, fopen
  1548.  
  1549. DIAGNOSTICS
  1550. áááááThesσá routine≤ returε EOFé iµ stream i≤ no⌠ associateΣá witΦ ì
  1551. áááááaε outpu⌠ file¼ o≥ iµ buffereΣ datß canno⌠ bσ transferreΣ t∩ ì
  1552. áááááthat file.  NULL is returned on success.
  1553. .paè.hefint                                                         fint
  1554.  
  1555.  Absolute Value, Rounding, Integer and Fractional Part Functions
  1556.  
  1557. NAME
  1558. áááááfint¼ fraπ, chrstc, floor, ceil, roundì
  1559.  
  1560. SYNOPSIS
  1561. ááááádouble fint(x)
  1562. ááááádouble x;
  1563.  
  1564. ááááádouble frac(x)
  1565. ááááádouble x;
  1566.  
  1567. áááááint chrstc(x)
  1568. ááááádouble x;
  1569.  
  1570. ááááádouble floor(x)
  1571. ááááádouble x;
  1572.  
  1573. ááááádouble ceil(x)
  1574. ááááádouble x;
  1575.  
  1576. ááááádouble round(x)
  1577. ááááádouble x;
  1578.  
  1579. DESCRIPTION
  1580. áááááfinté return≤ thσ intege≥ par⌠ oµ xé a≤ ß double.
  1581.  
  1582. áááááfracé return≤ thσ fractiona∞ par⌠ oµ x¼ i.e« ° - fint(x).
  1583.  
  1584. áááááchrstπá return≤ thσ characteristiπ (2'≤ exponent⌐ oµá doublσ ì
  1585. áááááx.  The mantissa is in [.5,1).
  1586.  
  1587. áááááfloor returns the largest integer not greater than x.
  1588.  
  1589. áááááceil returns the smallest integer not less than x.
  1590.  
  1591. áááááround return≤ x roundeΣ t∩ thσ neares⌠ intege≥ iε magnitude.
  1592. .paè.hefopen                                                       fopen
  1593.  
  1594.                           Open a Stream
  1595.  
  1596. NAME
  1597. áááááfopeε 
  1598.  
  1599. SYNOPSIS
  1600. ááááá#includσ <stdio.h>
  1601.  
  1602. áááááFIL┼ *fopen(filename¼ type)
  1603. áááááSTRING filename¼ type;
  1604.  
  1605. DESCRIPTION
  1606. áááááfopená open≤á thσá filσ nameΣ b∙ filename anΣá associate≤á ß ì
  1607. ááááástreaφá witΦá it«á  fopen return≤ ß pointe≥ t∩á bσá useΣá t∩ ì
  1608. áááááidentif∙ thσ streaφ iε subsequen⌠ operations.
  1609.  
  1610. ááááátypeá i≤á ßá characte≥ strinτ havinτ onσá oµá thσá followinτ ì
  1611. ááááávalues:
  1612.  
  1613. ááááá"ró   opeε fo≥ reading
  1614.  
  1615. ááááá"wó   creatσ fo≥ writing
  1616.  
  1617. ááááá"aó   append║ opeε fo≥ writinτ a⌠ enΣ oµ file¼ o≥ creatσ fo≥ ì
  1618. ááááá áááááwriting
  1619.  
  1620. ááááá"r+óá opeεá fo≥ readinτ  anΣ writing«á  samσ ß "róá bu⌠á thσ ì
  1621. ááááá      device or file may also be written to.
  1622.  
  1623. ááááá"w+óá opeε fo≥ readinτ  anΣ writing«á  samσ a≤ "wóá bu⌠á thσ ì
  1624. ááááá      device or file may also be read.
  1625.  
  1626. ááááá"a+ó  opeε fo≥ appenΣ anΣ read«á  samσ a≤ "aó bu⌠ thσ devicσ ì
  1627. ááááá      or file may also be read.
  1628.  
  1629. SEE ALSO
  1630. áááááopen¼ fclose
  1631.  
  1632. DIAGNOSTICS
  1633. áááááfopená return≤á thσá pointe≥á NULLá iµá filenameá canno⌠á bσ ì
  1634. áááááaccessed.
  1635.  
  1636. .paè.hefread                                                       fread
  1637.  
  1638.                       Buffered Input/Output
  1639.  
  1640. NAME
  1641. áááááfread, fwrite 
  1642.  
  1643. SYNOPSIS
  1644. ááááá#include <stdio.h>
  1645.  
  1646. áááááint fread(ptr, ptrsize, nitems, stream)
  1647. áááááBUFFER ptr;
  1648. áááááint ptrsize, nitems;
  1649. áááááFILE *stream;
  1650.  
  1651. áááááint fwrite(ptr, ptrsize, nitems, stream)
  1652. áááááBUFFER ptr;
  1653. áááááint ptrsize, nitems;
  1654. áááááFILE *stream;
  1655.  
  1656. DESCRIPTION
  1657. áááááfreadé reads¼á int∩ ß blocδ beginninτ a⌠ ptr¼ nitemsé item≤ oµ ì
  1658. áááááptrsizeé byte≤ froφ thσ nameΣ inpu⌠ stream«á  I⌠ return≤á thσ ì
  1659. ááááánumbe≥ oµ item≤ actuall∙ read.
  1660.  
  1661. áááááfwriteé append≤ a⌠ mos⌠ nitemsé item≤ oµ ptrsizeé byte≤ oµ typσ ì
  1662. ááááá*ptréá t∩á thσ FIL┼ stream«á  I⌠ return≤ thσ numbe≥ oµá item≤ ì
  1663. áááááactuall∙ written.
  1664. ááááá
  1665. SE┼ ALSO
  1666. áááááread¼ write¼ fopen¼ getc¼ putc¼ gets¼ puts¼ printf¼ scanf
  1667.  
  1668. DIAGNOSTICS
  1669. áááááfreadé anΣ fwriteé returε NULLé upoε enΣ oµ filσ o≥ error.
  1670. .paè.hefrexp                                                       frexp
  1671.  
  1672.                  Mantissa and Exponent Functions
  1673.  
  1674. NAME
  1675. áááááfrexp, ldexp, modf 
  1676.  
  1677. SYNOPSIS
  1678. ááááádouble frexp(value, eptr)
  1679. ááááádouble value;
  1680. áááááint *eptr;
  1681.  
  1682. ááááádouble ldexp(value, exp)
  1683. ááááádouble value;
  1684. áááááint exp;
  1685.  
  1686. ááááádouble modf(value, iptr)
  1687. ááááádouble value, *iptr;
  1688.  
  1689. DESCRIPTION
  1690. áááááfrexpéá return≤á thσ mantissß oµ ß doublσ valueé a≤á ßá doublσ ì
  1691. áááááquantity¼á x¼á oµá magnitudσ iε thσ interva∞ [0.5¼á 1)¼á anΣ ì
  1692. ááááástore≤á aεá intege≥ né sucΦ tha⌠ valuσ ╜ °á ¬á 2néá indirectl∙ ì
  1693. áááááthrougΦ eptr.
  1694.  
  1695. áááááldexp returns the quantity value*2exp.
  1696.  
  1697. ááááámodféáá return≤áá thσá fractiona∞á par⌠áá oµáá value¼áá i.e.¼ ì
  1698. áááááfrac(value)¼á anΣ store≤ thσ intege≥ par⌠ indirectl∙ througΦ ì
  1699. áááááiptr¼ i.e.¼ *ipt≥ ╜ fint(value).
  1700.  
  1701. BUGS
  1702. áááááThσ definitioε oµ modfé appear≤ t∩ bσ somewha⌠ differen⌠ thaε ì
  1703. áááááthat given in Ref. 1 for negative value arguments.
  1704.  
  1705. SEE ALSO
  1706. áááááfrac, fint
  1707. .paè.hefseek                                                       fseek
  1708.  
  1709.                        Reposition a Stream
  1710.  
  1711. NAME
  1712. áááááfseek¼ ftell¼ rewinΣ 
  1713.  
  1714. SYNOPSIS
  1715. ááááá#includσ <stdio.h>
  1716.  
  1717. áááááint fseek(stream¼ offset¼ whence)
  1718. áááááFIL┼ *stream;
  1719. ááááálonτ offset;
  1720. áááááint whence;
  1721.  
  1722. ááááálonτ ftell(stream)
  1723. áááááFIL┼ *stream;
  1724.  
  1725. áááááint rewind(stream)
  1726. áááááFILE *stream;
  1727.  
  1728. DESCRIPTION
  1729. áááááfseekéá set≤á thσá positioεá oµá thσá nex⌠á inpu⌠á o≥á outpu⌠ ì
  1730. áááááoperatioε oε thσ stream«á  Thσ ne≈ positioε i≤ a⌠ thσ signeΣ ì
  1731. ááááádistancσá offsetéá byte≤á froφá thσá beginning¼á thσá curren⌠ ì
  1732. áááááposition¼á o≥á thσ enΣ oµ thσ file¼á accordinτ a≤ whenceé ha≤ ì
  1733. áááááthσ valuσ ORIGI╬ (0)¼ CURPO╙ (1)¼ o≥ FILEN─ (2).
  1734.  
  1735. áááááfseeδ undoe≤ an∙ effect≤ oµ ungetc.
  1736.  
  1737. áááááftelléá return≤á thσá curren⌠ valuσ oµ thσá offse⌠á iεá byte≤ ì
  1738. ááááárelativσá t∩á thσá ORIGINé oµ thσ FIL┼á stream¼á measureΣá iε ì
  1739. ááááábytes.
  1740.  
  1741. áááááOεá somσá systems¼á ftellé ma∙ bσ thσ onl∙ foolprooµá wa∙á t∩ ì
  1742. áááááobtain an offset for fseek.
  1743.  
  1744. ááááárewind(stream)é i≤ equivalen⌠ t∩ fseek(stream¼á OL¼á ORIGIN)«  ì
  1745. áááááIt sets the FILE fp to the ORIGIN.
  1746.  
  1747. SEE ALSO
  1748. ááááálseek¼ fopen
  1749. ááááá
  1750. DIAGNOSTICS
  1751. áááááfseeδ and rewind return EOF fo≥ imprope≥ seeks.
  1752. .paè.hegetbuf                                                     getbuf
  1753.  
  1754.                           Get a Buffer
  1755.  
  1756. NAME
  1757. ááááágetbuf
  1758.  
  1759. SYNOPSIS
  1760. áááááVOID getbuf(fp)
  1761. áááááFAST FILE *fp;
  1762.  
  1763. DESCRIPTION
  1764. ááááágetbuféá get≤ ß buffe≥ eithe≥ froφ alloté o≥ elsσ i⌠ use≤á thσ ì
  1765. ááááábytbuf, attaching to the FILE fp.
  1766. .paè.hegetc                                                         getc
  1767.  
  1768.                 Get Character or Word from Stream
  1769.  
  1770. NAME
  1771. ááááágetc, getca, getchar, getf, geti, getl
  1772.  
  1773. SYNOPSIS
  1774. ááááá#includσ <stdio.h>
  1775.  
  1776. áááááin⌠ getc(stream)
  1777. áááááFIL┼ *stream;
  1778.  
  1779. áááááint getca(stream)
  1780. áááááFILE *stream;
  1781.  
  1782. áááááin⌠ getchar()
  1783.  
  1784. ááááádouble getf(prompt, check, low, high)
  1785. áááááSTRING prompt;
  1786. áááááBOOL check;
  1787. ááááádouble low, high;
  1788.  
  1789. áááááint geti(prompt, check, low, high)
  1790. áááááSTRING prompt;
  1791. áááááBOOL check;
  1792. áááááint low, high;
  1793.  
  1794. ááááálong getl(prompt, check, low, high)
  1795. áááááSTRING prompt;
  1796. áááááBOOL check;
  1797. ááááálong low, high;
  1798.  
  1799. DESCRIPTION
  1800. ááááágetc return≤ thσ nex⌠ characte≥ froφ thσ nameΣ inpu⌠ stream.
  1801.  
  1802. ááááágetcaé i≤ thσ samσ a≤ getc¼ excep⌠ tha⌠ '\rº character≤ inpu⌠ ì
  1803. áááááfroφá thσá streaφá arσ suppresseΣ (wheεá compileΣá witΦá thσ ì
  1804. áááááCRINSUP switch in stdio.h TRUE).
  1805.  
  1806. ááááágetchar()éá i≤ identica∞ t∩ getca(stdin)«á  stdio.héá contain≤ ì
  1807. áááááthσ macro¼ GETCHARé whicΦ i≤ thσ samσ a≤ thi≤ function.
  1808.  
  1809. ááááágetféá print≤á promptéá oε stdout¼á theε read≤á froφá stdiεá ß ì
  1810. ááááádouble¼ whicΦ i⌠ returns«  Iµ checδ i≤ TRUE¼ double≤ outsidσ ì
  1811. áááááof the low - high bounds will not be accepted.
  1812.  
  1813. ááááágetié anΣ getlé worδ thσ samσ a≤ getf¼ excep⌠ tha⌠ the∙ returε ì
  1814. áááááan integer and a long, respectively.
  1815.  
  1816. áááááThσ standarΣ inpu⌠ streaφ stdiné i≤ normall∙ buffereΣ iµá anΣ ì
  1817. áááááonl∙á iµ thσ inpu⌠ refer≤ t∩ ß devicσ othe≥ thaε ß terminal«  ì
  1818. áááááWheε aε inpu⌠ streaφ i≤ unbuffered¼á informatioε i≤ returneΣ ì
  1819. áááááfroφá getcé a≤ sooε a≤ i⌠ i≤ written╗á  wheε i⌠ i≤á buffered¼ ì
  1820. áááááman∙ character≤ arσ saveΣ u≡ anΣ returneΣ b∙ getcé onl∙ afte≥ ì
  1821. áááááßá newlinσá i≤á encountered«áá  T∩á ensurσá portabilit∙áá oµ ìèáááááprograms¼ alway≤ usσ setbufé t∩ se⌠ thσ prope≥ bufferinτ modσ ì
  1822. áááááat the beginning.
  1823.  
  1824. SEE ALSO
  1825. áááááfopen¼ putc¼ gets¼ scanf¼ fread¼ ungetc, setbuf
  1826.  
  1827. DIAGNOSTICS
  1828. áááááThesσá function≤á returε thσ intege≥ constan⌠ EOFé a⌠ enΣá oµ ì
  1829. áááááfilσ o≥ upoε reaΣ error.
  1830.  
  1831. BUGS
  1832. áááááSomσá system≤ ma∙ contaiε interna∞ bufferinτ t∩ makσ usσá oµ ì
  1833. ááááátermina∞á linσá editinτ feature≤ oµ somσ operatinτá systems¼ ì
  1834. áááááeveεá wheε unbuffereΣ inpu⌠ i≤ desired«á  Thereforσá getcharé ì
  1835. ááááámay not respond properly for character-by-character inputs.
  1836. .paè.hegets                                                         gets
  1837.  
  1838.                    Get a String from a Stream
  1839.  
  1840. NAME
  1841. ááááágets, getns, fgets 
  1842.  
  1843. SYNOPSIS
  1844. ááááá#include <stdio.h>
  1845.  
  1846. áááááSTRING gets(s)
  1847. áááááSTRING s;
  1848.  
  1849. áááááSTRING getns(p, s, n)
  1850. áááááSTRING p, s;
  1851. áááááint n;
  1852.  
  1853. áááááSTRING fgets(s, n, stream)
  1854. áááááSTRING s;
  1855. áááááFILE *stream;
  1856. áááááint n;
  1857.  
  1858. DESCRIPTION
  1859. ááááágetséá read≤á ßá tex⌠ strinτ int∩ sé froφ thσá standarΣá inpu⌠ ì
  1860. ááááástreaφ stdin«á  Thσ strinτ inpu⌠ i≤ terminateΣ b∙ ßá newlinσ ì
  1861. ááááácharacter¼ whicΦ i≤ replaceΣ iε sé b∙ ß NULLé character«  getsé ì
  1862. áááááreturn≤ it≤ argument.
  1863.  
  1864. ááááágetnséá prompt≤á stdou⌠ witΦ thσ strinτ p¼á theε read≤ néá - ▒ ì
  1865. ááááácharacters¼á o≥ u≡ t∩ ß newlinσ character¼á whicheve≥á come≤ ì
  1866. áááááfirst¼á froφá stdin«á  Thσá las⌠á caracte≥ reaΣá int∩á séá i≤ ì
  1867. áááááfolloweΣá b∙á NULL«á  getnsé return≤ s«á  Character≤á entereΣ ì
  1868. áááááafte≥á thσá (néá - 1)th¼áá u≡á t∩á anΣá includinτá ßá newlinσ ì
  1869. ááááácharacter¼ arσ discarded.
  1870.  
  1871. áááááfgetséá read≤á n-▒á tex⌠á characters¼á o≥á u≡á t∩á ßá newlinσ ì
  1872. ááááácharacter¼á whicheve≥ come≤ first¼á froφ thσ streamé int∩ thσ ì
  1873. ááááástrinτá s«á  Thσ las⌠ characte≥ reaΣ int∩ sé i≤ followeΣ b∙ ß ì
  1874. áááááNULLé character«  fgetsé return≤ s.
  1875.  
  1876. SE┼ ALSO
  1877. áááááputs, getc, scanf, fread
  1878.  
  1879. DIAGNOSTICS
  1880. ááááágets anΣ fgets returε thσ constan⌠ pointe≥ NULL upoε enΣá oµ ì
  1881. áááááfile, empty s or error.
  1882.  
  1883. BUGS
  1884. ááááágets delete≤ ß newline¼á fgets keep≤ it¼á al∞ iε thσ namσ oµ ì
  1885. ááááábackward compatibility.
  1886. .paè.hehypot                                                       hypot
  1887.  
  1888.                    Euclidian Distance Function
  1889.  
  1890. NAME
  1891. áááááhypo⌠ 
  1892.  
  1893. SYNOPSIS
  1894. ááááádouble hypot(x, y)
  1895. ááááádouble x, y;
  1896.  
  1897. DESCRIPTION
  1898. áááááhypot returns
  1899.  
  1900. ááááááááááásqrt(x*° ½ y*y),
  1901.  
  1902. ááááátaking precautions against unwarranted overflows.
  1903.  
  1904. SE┼ ALSO
  1905. ááááásqrt
  1906.  
  1907. DIAGNOSTICS
  1908. áááááThσ INFINITYé valuσ i≤ returneΣ oε overflow¼ anΣ errnoé i≤ se⌠ ì
  1909. áááááto ERANGE.
  1910. .paè.heindex                                                       index
  1911.  
  1912.                    String Operation Functions
  1913.  
  1914. NAME
  1915. áááááindex¼á rindex¼á stradd¼á strcat¼á strncat¼ strcmp¼ strncmp¼ ì
  1916. ááááástrcpy¼ strncpy¼ streql¼ strindex¼ strlen¼ strsave
  1917.  
  1918. SYNOPSIS
  1919. áááááSTRING index(s¼ c)
  1920. áááááSTRING s;
  1921. áááááchar c;
  1922.  
  1923. áááááSTRING rindex(s¼ c)
  1924. áááááSTRING s;
  1925. ááááácha≥ c;
  1926.  
  1927. áááááSTRING stradd(n, s, arg[, ...])
  1928. áááááSTRING s, arg, ...;
  1929.  
  1930. áááááSTRING strcat(s1¼ s2)
  1931. áááááSTRING s1¼ s2;
  1932.  
  1933. áááááSTRING strncat(s1¼ s2¼ n)
  1934. áááááSTRING s1¼ s2;
  1935. áááááint n;
  1936.  
  1937. áááááint strcmp(s1¼ s2)
  1938. áááááSTRING s1¼ s2;
  1939.  
  1940. áááááint strncmp(s1¼ s2¼ n)
  1941. áááááSTRING s1¼ s2;
  1942. áááááint n;
  1943.  
  1944. áááááSTRING strcpy(s1¼ s2)
  1945. áááááSTRING s1¼ s2;
  1946.  
  1947. áááááSTRING strncpy(s1¼ s2¼ n)
  1948. áááááSTRING s1¼ s2;
  1949. áááááint n;
  1950.  
  1951. áááááBOOL streql(s, t)
  1952. áááááSTRING s, t;
  1953.  
  1954. áááááint strindex(s, t)
  1955. áááááSTRING s, t;
  1956. ááááá
  1957. áááááint strlen(s)
  1958. áááááSTRING s;
  1959.  
  1960. áááááSTRING strsave(s)
  1961. áááááSTRING s;
  1962.  
  1963. DESCRIPTION
  1964. áááááThesσ function≤ operatσ oε null-terminateΣ strings«  The∙ d∩ ì
  1965. áááááno⌠ checδ fo≥ overflo≈ oµ an∙ receivinτ string.è
  1966. áááááinde°á (rindex)á return≤á ßá pointe≥á t∩á thσá firs⌠á (last⌐ ì
  1967. áááááoccurancσ oµ characte≥ c iε strinτ s¼á o≥ NULL iµ c doe≤ no⌠ ì
  1968. áááááoccu≥ iε thσ string.
  1969.  
  1970. ááááástrcatá append≤ ß cop∙ oµ strinτ s2 t∩ thσ enΣ oµ strinτ s1«  ì
  1971. ááááástrncat copie≤ a⌠ mos⌠ n characters«á  BotΦ returε ß pointe≥ ì
  1972. ááááát∩á thσá null-terminateΣá result«áá  straddéá concatenate≤á né ì
  1973. ááááástrings, s and arg[, ...].
  1974.  
  1975. ááááástrcmp compare≤ it≤ argument≤ anΣ return≤ aε intege≥ greate≥ ì
  1976. áááááthan¼á equa∞á to¼á o≥á les≤ thaε zero¼á accordinτ a≤á s1éá i≤ ì
  1977. ááááálexicographicall∙ greate≥ than¼á equa∞ to¼á o≥ les≤ thaε s2«  ì
  1978. ááááástrncmpéá make≤ thσ samσ comparison¼á bu⌠ look≤ a⌠ a⌠ mos⌠á né ì
  1979. ááááácharacters.
  1980.  
  1981. ááááástrcpyé copie≤ strinτ s2é t∩ s1«á strncpyé copie≤ né  character≤ ì
  1982. áááááoµ s2¼ o≥ al∞ oµ s2¼ whicheve≥ i≤ less« BotΦ returε s1.
  1983.  
  1984. ááááástreqlé return≤ TRUE iµ string≤ sé anΣ té arσ thσ same.
  1985.  
  1986. ááááástrindexé locate≤ onσ strinτ iε another¼ return≤ thσ inde° oµ ì
  1987. ááááátéá iεá s¼á o≥ EOFé iµ i⌠ doe≤ no⌠ exist«á  Thi≤ i≤ thσá indexé ì
  1988. áááááfunctioεá giveεá iεá Kernighaε anΣá Ritchie¼á pagσá 6╖á (seσ ì
  1989. áááááReference 2).
  1990.  
  1991. ááááástrlen return≤ thσ numbe≥ oµ non-NULL character≤ iε s.
  1992.  
  1993. ááááástrsaveéá get≤á enougΦá stroragσ fo≥ séá anΣá put≤á i⌠á there¼ ì
  1994. áááááreturn≤á thσá pointe≥á t∩ thσ string¼á o≥ NULLé iµá therσá i≤ ì
  1995. áááááinsufficien⌠á strinτá space«á  Thi≤ i≤á froφá Kernighaεá anΣ ì
  1996. áááááRitchie (see Reference 2, pp. 103).
  1997. .paè.heisalpha                                                   isalpha
  1998.  
  1999.                Character Classification Functions
  2000.  
  2001. NAME
  2002. áááááisalnum¼ isalpha¼ isascii¼ iscntrl¼ isdigit¼ ishex¼ islower¼ ì
  2003. áááááisoctal¼ isprint¼ ispunct¼ isspace¼ isupper
  2004.  
  2005. SYNOPSIS
  2006. áááááBOOL isalpha(c)
  2007. áááááint c;
  2008. ááááá« « .
  2009.  
  2010. DESCRIPTION
  2011. áááááThesσ function≤ classif∙ ASCII-codeΣ intege≥ value≤ b∙ tablσ ì
  2012. ááááálookup«á  EacΦá i≤á ß predicatσ returninτ nonzer∩ fo≥á TRUE¼ ì
  2013. ááááázer∩ fo≥ FALSE«á  isasciié i≤ defineΣ oε al∞ intege≥á values╗ ì
  2014. áááááthσá res⌠ arσ defineΣ onl∙ wherσ isasciié i≤ TRUE anΣ oεá thσ ì
  2015. ááááásinglσ non-ASCI╔ valuσ EOFé (seσ stdio)«á  Thσ condition≤ fo≥ ì
  2016. áááááa return of TRUE are
  2017.  
  2018. .uj0
  2019. áááááisalnuφ        c i≤ aε alphanumeriπ character.
  2020.  
  2021. áááááisalphß        c i≤ ß letter.
  2022.  
  2023. áááááisasciΘ        c i≤ aε ASCI╔ character¼ codσ les≤ thaε 0x80.
  2024.  
  2025. áááááiscntr∞á       c i≤ ß deletσ characte≥ (0x7f⌐á o≥á ordinar∙ ì
  2026. ááááá             áááácontro∞ characte≥ (les≤ thaε 0x20).
  2027.  
  2028. áááááisdigi⌠        c i≤ ß digit.
  2029.  
  2030. áááááishex          c is a hex number, 0 - 9, a - f.
  2031.  
  2032. áááááislowe≥        c i≤ ß lowe≥-casσ letter.
  2033.  
  2034. áááááisoctal        c is an octal digit, 0 - 7.
  2035.  
  2036. áááááisprin⌠á       cá i≤á ßá printinτá   character¼á codσá 0x20 ì
  2037. ááááá             áááá(space⌐ througΦ 0x7e (tilde).
  2038.  
  2039. áááááispunc⌠        c i≤ ß punctuatioε characte≥ (neithe≥ contro∞ ì
  2040. ááááá            áááááno≥ alphanumeric).
  2041.  
  2042. áááááisspacσ        c i≤ ß space¼á tab¼ carriagσ return¼ newline¼ ì
  2043. ááááá            áááááo≥ formfeed.
  2044.  
  2045. áááááisuppe≥        c i≤ aε uppe≥-casσ letter.
  2046. .uj1
  2047.  
  2048. SEE ALSO
  2049. áááááMacro≤áá correspondinτá t∩á eacΦá oµá thesσá function≤áá arσ ì
  2050. áááááavailablσ iε ctype.h.
  2051. .paè.heisok                                                         isok
  2052.  
  2053.                           Quesion User
  2054.  
  2055. NAME
  2056. áááááisok
  2057.  
  2058. SYNOPSIS
  2059. áááááBOOL isok(prompt)
  2060. áááááSTRING prompt;
  2061.  
  2062. DESCRIPTION
  2063. ááááápromptéá output≤á t∩á stdou⌠ anΣ accept≤ ßá y/εá answer«á  I⌠ ì
  2064. áááááreturns TRUE for y, and FALSE for n.
  2065. .paè.hemalloc                                                     malloc
  2066.  
  2067.                       Main Memory Allocator
  2068.  
  2069. NAME
  2070. ááááámalloc¼ free¼ realloc¼ calloπ 
  2071.  
  2072. SYNOPSIS
  2073. áááááSTRING malloc(nbytes)
  2074. áááááunsigned nbytes;
  2075.  
  2076. áááááVOID free(ptr)
  2077. áááááSTRING ptr;
  2078.  
  2079. áááááSTRING realloc(ptr,size)
  2080. áááááSTRING ptr;
  2081. áááááunsigned size;
  2082.  
  2083. áááááSTRING calloc(nelem, elsize)
  2084. áááááunsigned nelem, elsize;
  2085.  
  2086. DESCRIPTION
  2087. ááááámallocéá anΣá freeé providσ ßá simplσá general-purposσá memor∙ ì
  2088. áááááallocatioε package«á  mallocé return≤ ß pointe≥ t∩ ß blocδ oµ ì
  2089. áááááa⌠ leas⌠ nbytesé byte≤ beginninτ oε ß worΣ boundary.
  2090.  
  2091. áááááThσá argumen⌠á t∩á freeé i≤ ß pointe≥ t∩ ßá blocδá previousl∙ ì
  2092. áááááallocateΣá b∙á malloc╗á thi≤á spacσ i≤á madσá availablσá fo≥ ì
  2093. áááááfurthe≥ allocation¼ bu⌠ it≤ content≤ arσ lef⌠ undisturbed.
  2094.  
  2095. áááááNeedles≤á t∩á say¼á gravσ disorde≥ wil∞ resul⌠ iµ thσá spacσ ì
  2096. áááááassigneΣá b∙ mallocé i≤ overruε o≥ iµ somσ randoφá numbe≥á i≤ ì
  2097. áááááhandeΣ t∩ free.
  2098.  
  2099. ááááámallocéá allocate≤á thσ firs⌠ big-enougΦ contiguou≤ reacΦá oµ   ì
  2100. áááááfreσá spacσ founΣ iε ß circula≥ searcΦ froφ thσá las⌠á blocδ ì
  2101. áááááallocateΣá o≥ freed¼á coalescinτ adjacen⌠ freσ block≤ a≤á i⌠ ì
  2102. ááááásearches«á  I⌠ call≤ sbrké t∩ ge⌠ morσ memor∙ froφ thσ systeφ ì
  2103. áááááwheε therσ i≤ n∩ suitablσ spacσ alread∙ free.
  2104.  
  2105. áááááreallocéá change≤ thσ sizσ oµ thσ blocδ pointeΣ t∩ b∙ ptréá t∩ ì
  2106. ááááásizσá byte≤á anΣ return≤ ß pointe≥ t∩ thσá (possiblyá moved⌐ ì
  2107. áááááblock«á  Thσ content≤ wil∞ bσ unchangeΣ u≡ t∩ thσ lesse≥á oµ ì
  2108. áááááthσ ne≈ anΣ olΣ sizes.
  2109.  
  2110. áááááreallocé als∩ work≤ iµ ptré point≤ t∩ ß blocδ freeΣ sincσá thσ ì
  2111. ááááálas⌠ cal∞ oµ malloc¼á reallocé o≥ calloc╗á thus¼ sequence≤ oµ ì
  2112. áááááfree¼á mallocé anΣ reallocé caε exploi⌠ thσ searcΦ strateg∙ oµ ì
  2113. ááááámallocé t∩ d∩ storagσ compaction«    
  2114.  
  2115. ááááácallocéá allocate≤á spacσ fo≥ aε arra∙ oµ neleméá element≤á oµ ì
  2116. ááááásizσ elsize«  Thσ spacσ i≤ initializeΣ t∩ zeros.
  2117.  
  2118. áááááEacΦá oµ thσ allocatioε routine≤ return≤ ß pointe≥ t∩á spacσ ì
  2119. ááááásuitabl∙á aligneΣá (afte≥á possiblσá pointe≥á coercion⌐á fo≥ ì
  2120. ááááástorage of any type of object.è
  2121.  
  2122. DIAGNOSTICS
  2123. ááááámalloc¼á reallocéá anΣá callocé returε ß NULLé pointe≥á (0⌐á iµ ì
  2124. ááááátherσá i≤ n∩ availablσ memor∙ o≥ iµ thσ operatinτ systeφ ha≤ ì
  2125. ááááádetecteΣ storagσ corruptioε outsidσ thσ allocateΣ areas.
  2126.  
  2127. SEE ALSO
  2128. áááááallot, liberate
  2129.  
  2130. BUGS
  2131. áááááWheε reallocé return≤ zero¼á thσ blocδ pointeΣ t∩ b∙ ptréá ma∙ ì
  2132. ááááábσ destroyed.
  2133. .paè.hemax                                                           max
  2134.  
  2135.   Maximum and Mimimum Function for Integers, Doubles and Longs
  2136.  
  2137. NAME
  2138. ááááámax¼á min¼á fmax, fmin, lmax¼á lmiεá ì
  2139.  
  2140. SYNOPSIS
  2141. áááááint max(a, b)
  2142. áááááint a, b;
  2143.  
  2144. áááááint min(a, b)
  2145. áááááint a, b;
  2146.  
  2147. ááááádouble fmax(x, y);
  2148. ááááádouble x, y;
  2149.  
  2150. ááááádouble fmin(x, y);
  2151. ááááádouble x, y;
  2152.  
  2153. ááááálong lmax(x, y)
  2154. ááááálong x, y;
  2155.  
  2156. ááááálong lmin(x, y)
  2157. ááááálong x, y;
  2158.  
  2159. DESCRIPTION
  2160. ááááámaxéá anΣ miné finΣ thσ maximuφ anΣ thσ minimuφ oµ integer≤á aé ì
  2161. áááááanΣá b«á   fmaxé anΣ fminé d∩ thσ samσ fo≥ doubles╗á lmaxéá anΣ ì
  2162. ááááálminé d∩ thσ samσ fo≥ longs.
  2163.  
  2164. áááááMAXá anΣ MIN arσ macro≤ iε defs.Φ whicΦ takσ thσ maximuφ anΣ ì
  2165. áááááminimum values of any numeric type.
  2166.  
  2167. SEE ALSO
  2168. ááááádefs.h
  2169. .paè.henprob                                                       nprob
  2170.  
  2171.                   Normal Probability Functions
  2172.  
  2173. NAME
  2174. ááááánprob, nprobc
  2175.  
  2176. SYNOPSIS
  2177. ááááádouble nprob(x)
  2178. ááááádouble x;
  2179.  
  2180. ááááádouble nprobc(x)
  2181. ááááádouble x;
  2182.  
  2183. DESCRIPTION
  2184. ááááánprobéá i≤á thσ norma∞ cumulativσ probabilit∙ functioεá oµá ß ì
  2185. ááááárandoφá variablσ havinτ uni⌠ variancσ anΣá zer∩á mean¼á i.e« ì
  2186. áááááPr{· <╜ x}.
  2187.  
  2188. ááááánprobcéá i≤á thσ complementar∙ cumulativσ norma∞á probabilit∙ ì
  2189. áááááfunction, i.e., nprobc(x) = 1 - nprob(x).
  2190.  
  2191. SEE ALSO
  2192. áááááerf, erfc
  2193. .paè.heprintf                                                     printf
  2194.  
  2195.                    Formatted Output Conversion
  2196.  
  2197. NAME
  2198. áááááprintf¼ fprintf¼ eprintf, sprintµ, format
  2199.  
  2200. SYNOPSIS
  2201. ááááá#include <stdio.h>
  2202.  
  2203. áááááVOID printf(fmt [, arg ] ... )
  2204. áááááSTRING fmt;
  2205. áááááunsigned arg;
  2206.  
  2207. áááááVOID fprintf(stream, fmt [, arg ] ... )
  2208. áááááFILE *stream;
  2209. áááááSTRING fmt;
  2210. áááááunsigned arg;
  2211.  
  2212. áááááVOID eprintf(fmt [, arg ] ... )
  2213. áááááSTRING fmt;
  2214. áááááunsigned arg;
  2215.  
  2216. áááááVOID sprintf(s, fmt [, arg ] ... )
  2217. áááááSTRING s, fmt;
  2218. áááááunsigned arg;
  2219.  
  2220. áááááVOID format(putsub, fmt, args)
  2221. áááááint (*putsub)();
  2222. áááááSTRING fmt;
  2223. áááááunsigned args;
  2224.  
  2225. DESCRIPTION
  2226. áááááprintféá place≤ outpu⌠ oε thσ standarΣ outpu⌠ streaφá stdout.é  ì
  2227. áááááfprintféáá place≤áá outpu⌠á oεá thσá nameΣáá outpu⌠áá stream« ì
  2228. áááááeprintf(fm⌠ [¼á arτ ▌ ..« )é place≤ outpu⌠ oε stderr« sprintfé ì
  2229. áááááplace≤á outpu⌠á iεá thσá strinτá s¼á followeΣá b∙á thσá NULLé ì
  2230. ááááácharacter«á  formaté place≤ outpu⌠ usinτ thσ putsubé oµ ß lis⌠ ì
  2231. áááááoµ item≤ pointeΣ t∩ b∙ args.
  2232.  
  2233. áááááEacΦ oµ thesσ function≤ converts¼á formats¼á anΣ print≤á it≤ ì
  2234. áááááargé argument≤ unde≥ contro∞ oµ thσ fmté argument«  Thσ fmté i≤ ì
  2235. áááááßá characte≥á strinτá whicΦ contain≤ tw∩ type≤á oµá objects║  ì
  2236. áááááplaiεá characters¼á whicΦá arσ simpl∙ copieΣ t∩á thσá outpu⌠ ì
  2237. ááááástream¼á anΣ conversioε specifications¼ eacΦ oµ whicΦ cause≤ ì
  2238. áááááconversioεá anΣ printinτ oµ thσ nex⌠ successivσ argéá oµá thσ ì
  2239. ááááálist.
  2240.  
  2241. áááááEacΦ conversioε specificatioε i≤ introduceΣ b∙ thσ characte≥ ì
  2242. ááááá%«  Followinτ thσ %¼ therσ ma∙ be
  2243.  
  2244. ááááá-áááááaεáá  optiona∞áá minu≤á sigεá whicΦáá specifie≤áá lef⌠ ì
  2245. áááááááááááadjustmen⌠á oµá thσ converteΣ valuσ iεá thσá indicateΣ ì
  2246. áááááááááááfield;
  2247.  
  2248. ááááá-áááááaε optiona∞ digi⌠ strinτ specifyinτ ß fielΣ width╗á iµ ìèáááááááááááthσá converteΣá valuσ ha≤ fewe≥á character≤á thaεá thσ ì
  2249. áááááááááááfielΣá widtΦá i⌠ wil∞ bσ blank-paddeΣ oε thσ lef⌠á (o≥ ì
  2250. áááááááááááright¼á iµá thσá left-adjustmen⌠á indicato≥á ha≤á beeε ì
  2251. ááááááááááágiven⌐ t∩ makσ u≡ thσ fielΣ width╗á iµ thσ fielΣ widtΦ ì
  2252. ááááááááááábegin≤ witΦ ß zero¼á zero-paddinτ wil∞ bσ donσ insteaΣ ì
  2253. áááááááááááoµ blank-padding;
  2254.  
  2255. ááááá-áááááaε optiona∞ perioΣ whicΦ serve≤ t∩ separatσ thσá fielΣ ì
  2256. áááááááááááwidtΦ froφ thσ nex⌠ digi⌠ string;
  2257.  
  2258. ááááá-áááááaεá optiona∞ digi⌠ strinτ specifyinτ ß precisioε whicΦ ì
  2259. áááááááááááspecifie≤á thσá numbe≥ oµ digit≤ t∩ appea≥á afte≥á thσ ì
  2260. ááááááááááádecima∞ point¼ fo≥ e- anΣ f-conversion¼ o≥ thσ maximuφ ì
  2261. ááááááááááánumbe≥ oµ character≤ t∩ bσ printeΣ froφ ß string;
  2262.  
  2263.      -áááááthσ characte≥ ∞ specifyinτ tha⌠ ß followinτ d¼á o¼á x¼ ì
  2264. áááááááááááo≥áá ⌡á correspond≤á t∩á ßá lonτá intege≥áá arg«áá  (┴ ì
  2265. ááááááááááácapitalizeΣá conversioεá codσá accomplishe≤á thσá samσ ì
  2266. áááááááááááthing.)
  2267.  
  2268.      -áááááß characte≥ whicΦ indicate≤ thσ typσ oµ conversioεá t∩ ì
  2269. ááááááááááábσ applied.
  2270.  
  2271. ááááá┴á fielΣá widtΦ o≥ precisioε ma∙ bσ '*º insteaΣ oµá ßá digi⌠ ì
  2272. ááááástring«á  Iεá thi≤á casσ aε intege≥ arg supplie≤á thσá fielΣ ì
  2273. áááááwidtΦ o≥ precision.
  2274.  
  2275. áááááThe conversion characters and their meanings are
  2276.  
  2277.      d,o,x Thσá intege≥ arτ i≤ converteΣ t∩á decimal¼á octal¼á o≥ ì
  2278. áááááááááááhexadecima∞ notatioε respectively.
  2279.  
  2280. áááááfáááááThσá floa⌠á o≥á doublσ argéá i≤á converteΣá t∩á decima∞ ì
  2281. ááááááááááánotatioε iε thσ stylσ '[-]ddd.dddº wherσ thσ numbe≥ oµ ì
  2282. ááááááááááád'≤á afte≥ thσ decima∞ poin⌠ i≤ equa∞ t∩ thσ precisioε ì
  2283. áááááááááááspecificatioεá fo≥ thσ argument«á  Iµ thσ precisoεá i≤ ì
  2284. ááááááááááámissing¼á ╢á digit≤á arσ given╗á iµ thσá precisioεá i≤ ì
  2285. áááááááááááexplicitl∙á zero¼á n∩ digit≤ anΣ n∩ decima∞ poin⌠á arσ ì
  2286. áááááááááááprinted.
  2287.  
  2288. áááááeáááááThσá  floa⌠á o≥ doublσ arτ i≤ converteΣ iεá thσá stylσ  ì
  2289. ááááááááááá'[-]d.ddde+ddºá wherσá therσ i≤ onσ digi⌠á beforσá thσ ì
  2290. ááááááááááádecima∞á poin⌠á anΣ thσ numbe≥ afte≥ i≤ equa∞á t∩á thσ ì
  2291. áááááááááááprecisioεá specificatioεá fo≥ thσ argument╗á wheεá thσ ì
  2292. áááááááááááprecisioε i≤ missing¼ ╢ digit≤ arσ produced.
  2293.  
  2294. ááááágáááááThσá floa⌠á o≥ doublσ arτ i≤ printeΣ iεá stylσá d¼á iε ì
  2295. ááááááááááástylσ f¼ o≥ iε stylσ e¼ whicheve≥ give≤ ful∞ precisioε ì
  2296. áááááááááááiε minimuφ space.
  2297.  
  2298. ááááácáááááThσá characte≥ arτ i≤ printed«á  NULLá character≤á arσ ì
  2299. áááááááááááignored.
  2300.  
  2301. ááááásáááááarτá i≤á takeε t∩ bσ ß strinτ (characte≥ pointer⌐á anΣ ì
  2302. ááááááááááácharacter≤á froφ thσ strinτ arσ printeΣ unti∞á ßá NULL ìèááááááááááácharacte≥á o≥ unti∞ thσ numbe≥ oµ character≤ indicateΣ ì
  2303. áááááááááááb∙ thσ precisioε specificatioε i≤ reached╗á howeve≥ iµ ì
  2304. áááááááááááthσá precisioε i≤ zer∩ o≥ missinτ al∞ character≤ u≡ t∩ ì
  2305. áááááááááááß NULLé arσ printed.
  2306.  
  2307. áááááuáááááThσá unsigneΣ intege≥ arτ i≤ converteΣ t∩ decima∞á anΣ ì
  2308. áááááááááááprinteΣá (thσá resul⌠á wil∞ bσ iε thσá rangσá zer∩á t∩ ì
  2309. ááááááááááá65535).
  2310.  
  2311. ááááá%áááááPrin⌠ ß '%'╗ n∩ argumen⌠ i≤ converted.
  2312.  
  2313. áááááIεá n∩ casσ doe≤ ß non-existen⌠ o≥ smal∞ fielΣá widtΦá causσ ì
  2314. ááááátruncatioεá oµá ßá field╗á paddinτ take≤ placσ onl∙á iµá thσ ì
  2315. áááááspecifieΣ fielΣ widtΦ exceed≤ thσ actua∞ width«á  Character≤ ì
  2316. ááááágenerated by printf are printed by putchar.
  2317.  
  2318. áááááExamples:
  2319. áááááT∩ prin⌠ ß datσ anΣ timσ iε thσ forφ 
  2320.  
  2321. ááááá áááááSunday¼ Jul∙ 3¼ 10:02
  2322.  
  2323. áááá wherσá weekdayéá anΣ monthé arσ pointer≤á t∩á null-terminateΣ ì
  2324. ááááástrings:
  2325.  
  2326. áááááááááááprintf("%s¼á %≤ %d¼á %02d:%02d"¼á weekday¼ month¼ day¼ ì
  2327. áááááááááááhour¼ min);
  2328.  
  2329. áááááTo print pi to 5 decimals:
  2330.  
  2331. áááááááááááprintf("pΘ ╜ %.5f"¼ 4*atan(1.0));
  2332.  
  2333. SE┼ ALSO
  2334. áááááputc, scanf
  2335.  
  2336. BUGSá
  2337. áááááVery wide fields (>MAXLINE characters) fail. 
  2338. .paè.heputc                                                         putc
  2339.  
  2340.                 Put Character or Word on a Stream
  2341.  
  2342. NAME                                                        
  2343. áááááputc, putca, putchar, eputc
  2344.  
  2345. SYNOPSIS
  2346. ááááá#include <stdio.h>
  2347.  
  2348. áááááint putc(c, stream)
  2349. áááááint c;
  2350. áááááFILE *stream;
  2351.  
  2352. áááááint putca(c, stream)
  2353. áááááint c;
  2354. áááááFILE *stream;
  2355.  
  2356. áááááint putchar(c)
  2357. áááááint c;
  2358.  
  2359. áááááint eputc(c)
  2360. áááááchar c;
  2361.  
  2362. DESCRIPTION
  2363. áááááputcé append≤ thσ characte≥ cé t∩ thσ nameΣ outpu⌠ stream«  I⌠ ì
  2364. áááááreturn≤á thσ characte≥ written«á  putcaé i≤ thσ samσ a≤á putcé ì
  2365. áááááexcep⌠á tha⌠á '\nº i≤ accompanieΣ b∙ '\rº wheεá CROUTADDéá iε ì
  2366. ááááástdio.hé i≤ TRUE.
  2367.  
  2368. áááááputchar(c)éá i≤á defineΣá a≤á thσá macr∩á putca(c¼áá stdout)¼ ì
  2369. áááááreturninτ c¼  iε stdio.h.
  2370.  
  2371. áááááeputcé output≤ cé t∩ thσ standarΣ erro≥ device¼ stderr«  eputcé ì
  2372. ááááái≤ defineΣ a≤ thσ macr∩ putca(c¼ stderr).
  2373.  
  2374. áááááThσ standarΣ streaφ stdouté i≤ normall∙ buffereΣ iµ anΣá onl∙ ì
  2375. áááááiµá thσ outpu⌠ doe≤ no⌠ refe≥ t∩ ß terminal«á  Thσá standarΣ ì
  2376. ááááástreaφá stderré i≤ b∙ defaul⌠ unbuffereΣ unconditionall∙ (seσ ì
  2377. áááááfopen)«á Wheεá aεá outpu⌠ streaφ i≤á unbuffereΣá informatioε ì
  2378. áááááappear≤á oεá thσá destinatioε filσ o≥ termina∞á a≤á sooεá a≤ ì
  2379. áááááwritten╗á wheε i⌠ i≤ buffered¼á man∙ character≤ arσ saveΣ u≡ ì
  2380. áááááanΣ writteε a≤ ß block«á  fflushé (seσ fclose⌐ ma∙ bσ useΣ t∩ ì
  2381. áááááforcσ thσ blocδ ou⌠ early.
  2382.  
  2383. áááááputc updates the outrow[] and outcol[] of its stream->_unit.
  2384.  
  2385. SE┼ ALSO
  2386. áááááfopen, fclose, getc, puts, printf, fread, stdio.h
  2387.  
  2388. DIAGNOSTICS
  2389. áááááThesσ function≤ returε thσ constan⌠ EO╞ upoεá error«á  
  2390. .paè.heputs                                                         puts
  2391.  
  2392.                     Put a String on a Stream
  2393.  
  2394. NAME
  2395. áááááputs, fputs, eputs
  2396.  
  2397. SYNOPSIS
  2398. ááááá#include <stdio.h>
  2399.  
  2400. áááááint puts(s)
  2401. áááááSTRING s;
  2402.  
  2403. áááááint fputs(s, stream)
  2404. áááááSTRING s;
  2405. áááááFILE *stream;
  2406.  
  2407. áááááint eputs(s)
  2408. áááááSTRING s;
  2409.  
  2410. DESCRIPION
  2411. áááááputsé copie≤ thσ tex⌠ strinτ s¼á followeΣ b∙ newline¼á t∩ thσ ì
  2412. ááááástdioé device¼ anΣ return≤ ß newlinσ characte≥ iµ successful¼ ì
  2413. áááááEOFé iµ not.
  2414. ááááá
  2415. áááááfputséá copie≤ thσ tex⌠ strinτ sé t∩ thσ nameΣ outpu⌠á stream«  ì
  2416. áááááI⌠ return≤ NULLé iµ successful¼ EOFé iµ not.
  2417.  
  2418. áááááeputséá put≤ thσ strinτ ou⌠ t∩ thσ standarΣ erro≥ device«á I⌠ ì
  2419. áááááreturns newline if successful, EOL if not. 
  2420.  
  2421. áááááNonσ oµ thσ routine≤ copie≤ thσ terminatinτ NULLé character.
  2422.  
  2423. SE┼ ALSO
  2424. áááááfopen¼ gets¼ putc¼ printf¼ ferror¼ fwrite
  2425.  
  2426. BUGS
  2427. áááááputsé append≤ ß newline¼á fputsé doe≤ not¼á al∞ iε thσ namσ oµ ì
  2428. ááááábackwarΣ compatibility.
  2429. .paè.herandom                                                     random
  2430.  
  2431.                 Random Number Generator Functions
  2432.  
  2433. NAME
  2434. ááááárandize, random, randnorm, randexp, urandom
  2435.  
  2436. SYNOPSIS
  2437. áááááVOID randize(seed)
  2438. áááááint seed;
  2439.  
  2440. ááááádouble random()
  2441.  
  2442. ááááádouble randnorm()
  2443.  
  2444. ááááádouble randexp()
  2445.  
  2446. áááááunsigned urandom()
  2447.  
  2448. DESCRIPTION
  2449. ááááárandizeé initialize≤ thσ randoφ numbe≥ generato≥ accordinτ t∩ ì
  2450. áááááseed«á  Iµ seedé i≤ zero¼á aε interna∞ valuσ i≤ useΣ t∩ star⌠ ì
  2451. áááááthσ generator╗á iµ ß positivσ valuσ i≤ used¼á tha⌠ valuσá i≤ ì
  2452. áááááconverteΣá t∩á ß pseudorandoφ startinτ value╗á anΣ iµ -▒á i≤ ì
  2453. áááááused¼ aε unknowε valuσ i≤ useΣ a≤ thσ starter.
  2454.  
  2455. ááááárandom returns a uniform random value in [0, 1].
  2456.  
  2457. ááááárandnorméá return≤á ß normall∙ distributeΣ randoφ valuσá witΦ ì
  2458. ááááázero mean and unit standard deviation.
  2459.  
  2460. ááááárandexpéáá use≤áá thσáá functioεá random()éáá t∩áá returεáá aε ì
  2461. áááááexponentiall∙ distributeΣ randoφ valuσ characterizeΣ b∙ uni⌠ ì
  2462. ááááámean¼ i.e. -log(random()).
  2463.  
  2464. áááááurandoméá return≤ ß uniforφ randoφ unsigneΣ intege≥ valuσá iε ì
  2465. ááááá[0, 65535].
  2466.  
  2467. áááááNumber≤á generateΣá havσ n∩á seria∞á correlation«á  Adjacen⌠ ì
  2468. ááááásample≤áá oµá randoméá anΣá urandoméá number≤á arσáá uniforml∙ ì
  2469. ááááádistributeΣá ove≥á thσ 32-cube¼á anΣ runs-u≡á anΣá runs-dowε ì
  2470. ááááátest≤á u≡ t∩ lengtΦ 1│ woulΣ requirσ morσ thaε 1011öá sample≤ ì
  2471. ááááát∩á sho≈á deviatioεá froφ theoretical«á  Thσ perioΣá oµá thσ ì
  2472. ááááágenerato≥á i≤á abou⌠á 1.│á ¬ 10154«á  Thσá number≤á forφá aε ì
  2473. áááááasymptoticall∙á randoφ Tausworthσ linea≥ recurrancσá (modul∩ ì
  2474. ááááá2⌐á sequence¼á describeΣ iε Ref«á 12¼á usinτá thσá primitivσ ì
  2475. ááááátrinomial x521 + x32 + 1.
  2476. .paè.heratfun                                                     ratfun
  2477.  
  2478.                   Rational Function Evaluation
  2479.  
  2480. NAME
  2481. áááááratfun 
  2482.  
  2483. SYNOPSIS
  2484. ááááádouble ratfun(x, P, Q, n, m)
  2485. ááááádouble x, P[], Q[];
  2486. áááááint n, m;
  2487.  
  2488. DESCRIPTION
  2489. áááááratfun return≤ thσ valuσ oµ thσ rationa∞ functioεá P(x)/Q(x) ì
  2490. áááááwherσ ε ╜ deg(P)¼ φ ╜ deg(Q).
  2491.  
  2492. DIAGNOSTICS
  2493. áááááIµá thσ denominato≥ i≤ zero¼á errnoé i≤ se⌠ t∩á ERANGE╗á theε ì
  2494. ááááápositivσá INFINITYéá i≤á returneΣ iµ thσá numerato≥á i≤á non-ì
  2495. ááááánegative╗á otherwise¼á negativσá INFINITYé i≤á returned«á  Oε ì
  2496. áááááunderflow¼ errnoé i≤ se⌠ t∩ ERANGE¼ anΣ zer∩ i≤ returned«  Oε ì
  2497. áááááoverflow¼á errnoé i≤ se⌠ t∩ ERANGEé anΣ INFINITYé oµ thσ prope≥ ì
  2498. ááááásigε i≤ returned.
  2499. .paè.herkstep                                                     rkstep
  2500.  
  2501.                     Fourth Order Runga-Kutta
  2502.  
  2503. NAME
  2504. ááááárkstep, rknstep
  2505.  
  2506. SYNOPSIS
  2507. áááááVOID rkstep(f, h, t, yp)
  2508. ááááádouble (*d)(), h, t, *yp;
  2509.  
  2510. áááááVOID rknstep(N, f, h, t, y1, y2, dy, k, ys)
  2511. ááááádouble (*f)(), h, t, y1[], y2[], dy[], k[], ys[];
  2512.  
  2513. DESCRIPTION
  2514. ááááárkstepé perform≤ aε integratioε ste≡ fo≥ ß first-orde≥á diffì
  2515. áááááerentia∞áá equatioεá usinτá thσá fourtΦá orde≥áá Runga-Kuttß ì
  2516. áááááformulas«á  Thσ   forφ  oµ  thσ  equatioε  i≤  yº ╜ f(t¼ y)¼ ì
  2517. áááááwherσá ∙á ╜ *ypé anΣ differenticatioε i≤ witΦ respec⌠ t∩á thσ ì
  2518. áááááfirs⌠ variablσ oµ f«á  (Seσ Referencσ 3¼á pg«á 896¼á formulß ì
  2519. ááááá25.5.10)
  2520.  
  2521. ááááárknstepéá perform≤á aεá integratioε ste≡ fo≥á aεá N-tuplσá oµ ì
  2522. áááááfirst-orde≥ ordinar∙ differentia∞ equation≤ usinτ thσ fourtΦ ì
  2523. áááááorde≥á Runga-Kuttßá formula≤á referenceΣ above«á  Néá i≤á thσ ì
  2524. ááááádimensioεá oµ thσ tuple¼á y1é i≤ thσ curren⌠ vecto≥ statσá a⌠ ì
  2525. ááááá(time⌐ t¼ y2é i≤ thσ calculateΣ N-tuplσ statσ valuσ a⌠ (time⌐ ì
  2526. ááááá⌠ ½ hé returneΣ b∙ rknstep¼á dyé i≤ ß scratcΦ arra∙ needeΣá t∩ ì
  2527. áááááholΣ intermediatσ calculation≤ accumulatinτ thσ dyé value¼á ké ì
  2528. áááááhold≤á coefficient≤á k1¼á k2¼á k3,é anΣ k4¼á anΣ ysé i≤ fo≥á yé ì
  2529. áááááapproximant≤á fo≥ eacΦ equation«á  Al∞ oµ thσ scratcΦá arra∙ ì
  2530. ááááámust have dimension not less than N.
  2531.  
  2532. áááááThσ functioε fé ha≤ │ arguments╗á f(i¼á t¼ y)¼ wherσ ié i≤ thσ ì
  2533. ááááávecto≥ componen⌠ index¼á té i≤ thσ differenticatioε variable¼ ì
  2534. áááááanΣ  yé  i≤  thσ  curren⌠  statσ  valuσ  vector«á   Tha⌠  is¼ ì
  2535. áááááyiö ╜ f(i¼ t¼ y)é fo≥ Θ ╜ 1¼ 2,...,N.é  Iε botΦ functions¼ hé i≤ ì
  2536. áááááthσ ste≡ size.
  2537. .paè.hescanf                                                       scanf
  2538.  
  2539.                    Formatted Input Conversion
  2540.  
  2541. NAME
  2542. áááááscanf¼ fscanf¼ sscanµ, unformat
  2543.  
  2544. SYNOPSIS
  2545. ááááá#includσ <stdio.h>
  2546.  
  2547. áááááint scanf(forma⌠ █ ¼ pointer ▌ ... )
  2548. áááááSTRING format;
  2549. áááááunsigned *pointer;
  2550.  
  2551. áááááint fscanf(stream¼ forma⌠ █ ¼ pointer ▌ ... )
  2552. áááááFIL┼ *stream;
  2553. áááááSTRING format;
  2554. áááááunsigned *pointer;
  2555.  
  2556. áááááint sscanf(s¼ forma⌠ █ ¼ pointer ▌ ... )
  2557. áááááSTRING s¼ format;
  2558. áááááint *pointer;
  2559.  
  2560. áááááint unformat(get, format [ , pointer ] ... )
  2561. áááááint (*get)();
  2562. áááááSTRING format;
  2563. áááááint *pointer;
  2564.  
  2565. DESCRIPTION
  2566. áááááscanféá read≤ froφ thσ standarΣ inpu⌠ streaφá stdin«á  fscanfé ì
  2567. áááááread≤á froφ thσ nameΣ inpu⌠ stream«á  sscanfé read≤ froφá thσ ì
  2568. ááááácharacte≥á strinτá s«á  unformaté utilize≤ thσá getéá functioε ì
  2569. áááááargumen⌠áá t∩á fetcΦá characters«áá  EacΦáá functioεáá read≤ ì
  2570. ááááácharacters¼á interpret≤ theφ accordinτ t∩ format¼ anΣ store≤ ì
  2571. áááááthσá result≤á iεá it≤ remaininτá arguments«á  EacΦá functioε ì
  2572. áááááexpect≤á a≤á argument≤ ß contro∞á strinτá format¼á describeΣ ì
  2573. ááááábelow¼á anΣ ß se⌠ oµ pointeré argument≤ indicatinτ wherσá thσ ì
  2574. áááááconverteΣ inpu⌠ shoulΣ bσ stored.
  2575.  
  2576. áááááThσááá contro∞ááá strinτáá usuall∙ááá contain≤ááá conversioε ì
  2577. áááááspecifications¼á whicΦá arσ useΣ t∩ direc⌠ interpretatioε oµ ì
  2578. áááááinpu⌠ sequences«  Thσ contro∞ strinτ ma∙ contain:
  2579.  
  2580. ááááá1.ááááBlanks¼á tab≤ o≥ newlines¼á whicΦ matcΦ optiona∞ whitσ ì
  2581. áááááááááááspacσ iε thσ input.
  2582.  
  2583. ááááá2.ááááAεá ordinar∙á characte≥ (no⌠ %⌐ whicΦ mus⌠á matcΦá thσ ì
  2584. ááááááááááánex⌠ characte≥ oµ thσ inpu⌠ stream.
  2585.  
  2586. ááááá3.ááááConversioε specifications¼ consistinτ oµ thσ characte≥ ì
  2587. ááááááááááá%¼á aε optiona∞ assignmen⌠ suppressinτ characte≥ *¼ aε ì
  2588. áááááááááááoptiona∞áá numerica∞á maximuφá fielΣá width¼áá anΣáá ß ì
  2589. áááááááááááconversioε character.
  2590.    
  2591. ááááá┴á conversioεá specificatioε direct≤ thσ conversioεá oµá thσ ì
  2592. ááááánex⌠á inpu⌠á field╗á thσ resul⌠ i≤ placeΣá iεá thσá variablσ ìèááááápointeΣ t∩ b∙ thσ correspondinτ argument¼á unles≤ assignmen⌠ ì
  2593. ááááásuppressioεá wa≤ indicateΣ b∙ *«á  Aε inpu⌠ fielΣ i≤ defineΣ ì
  2594. áááááa≤ ß strinτ oµ non-spacσ characters╗á i⌠ extend≤ t∩ thσ nex⌠ ì
  2595. áááááinappropriatσá characte≥á o≥á unti∞á thσá fielΣá width¼áá iµ ì
  2596. áááááspecified¼ i≤ exhausted.
  2597.  
  2598. áááááThσ conversioε characte≥ indicate≤ thσ interpretatioε oµ thσ ì
  2599. áááááinpu⌠ field╗ thσ correspondinτ pointe≥ argumen⌠ mus⌠ usuall∙ ì
  2600. ááááábσáá oµá ßá restricteΣá type«áá  Thσá followinτáá conversioε ì
  2601. ááááácharacter≤ arσ legal:
  2602.  
  2603. ááááá%áááááßá singlσ '%º i≤ expecteΣ iε thσ inpu⌠ a⌠ thi≤á point╗ ì
  2604. ááááááááááán∩ assignmen⌠ i≤ done.
  2605.  
  2606. ááááádáááááßá decima∞á intege≥á i≤á expected╗á thσá correspondinτ ì
  2607. áááááááááááargumen⌠ shoulΣ bσ aε intege≥ pointer.
  2608.  
  2609. áááááoáááááaεá octa∞á intege≥á i≤á expected╗áá thσá correspondinτ ì
  2610. áááááááááááargumen⌠ shoulΣ bσ aε intege≥ pointer.
  2611.  
  2612. áááááxáááááß hexadecima∞ intege≥ i≤ expected╗á thσá correspondinτ ì
  2613. áááááááááááargumen⌠ shoulΣ bσ aε intege≥ pointer.
  2614.  
  2615. ááááásáááááßá characte≥á strinτ i≤á expected╗á thσá correspondinτ ì
  2616. áááááááááááargumen⌠ shoulΣ bσ ß characte≥ pointe≥ pointinτ t∩á aε ì
  2617. áááááááááááarra∙á oµ character≤ largσ enougΦ t∩ accep⌠ thσ strinτ ì
  2618. áááááááááááanΣá ß terminatinτ NULL¼á whicΦ wil∞á bσá added«á  Thσ ì
  2619. áááááááááááinpu⌠á fielΣá i≤ terminateΣ b∙ ß spacσ characte≥ o≥á ß ì
  2620. ááááááááááánewline.
  2621.  
  2622. ááááácáááááßá characte≥ i≤ expected╗á thσ correspondinτá argumen⌠ ì
  2623. áááááááááááshoulΣá bσ ß characte≥ pointer«á  Thσ norma∞ ski≡ ove≥ ì
  2624. áááááááááááspacσ character≤ i≤ suppresseΣ iε thi≤ case╗á t∩á reaΣ ì
  2625. áááááááááááthσ nex⌠ non-spacσ character¼á tr∙ '%1s'«á  Iµ ß fielΣ   ì
  2626. áááááááááááwidtΦá i≤á given¼á thσ correspondinτá argumen⌠á shoulΣ ì
  2627. ááááááááááárefe≥ t∩ ß characte≥ array¼á anΣ thσ indicateΣá numbe≥ ì
  2628. áááááááááááoµ character≤ i≤ read.
  2629.  
  2630. áááááeáááááß floatinτ poin⌠ numbe≥ i≤ expected╗ thσ nex⌠ fielΣ i≤ ì
  2631. áááááfáááááconverteΣáá accordingl∙áá anΣáá storeΣáá througΦáá thσ ì
  2632. ááááááááááácorrespondinτ argument¼ whicΦ shoulΣ bσ ß pointe≥ t∩ ß ì
  2633. áááááááááááfloat«  Thσ inpu⌠ forma⌠ fo≥ floatinτ poin⌠ number≤ i≤ ì
  2634. áááááááááááaεáá optionall∙á signeΣá strinτá oµá digit≤áá possibl∙ ì
  2635. ááááááááááácontaininτá ß decima∞ point¼á followeΣ b∙ aεá optiona∞ ì
  2636. áááááááááááexponen⌠á fielΣ consistinτ oµ aε ┼ o≥ σ followeΣ b∙ aε ì
  2637. áááááááááááoptionall∙ signeΣ integer.
  2638.  
  2639. ááááá[áááááindicate≤á ßá strinτá no⌠ t∩á bσá delimiteΣá b∙á spacσ ì
  2640. ááááááááááácharacters«á  Thσ lef⌠ bracke⌠ i≤ followeΣ b∙ ß se⌠ oµ ì
  2641. ááááááááááácharacter≤ anΣ ß righ⌠ bracket╗ thσ character≤ betweeε ì
  2642. áááááááááááthσ bracket≤ definσ ß se⌠ oµ character≤ makinτ u≡á thσ  ì
  2643. ááááááááááástring«  Iµ thσ firs⌠ characte≥ i≤ no⌠ circumfle° (^)¼ ì
  2644. áááááááááááo≥ tildσ (~)¼á thσ inpu⌠ fielΣ i≤ al∞ character≤ unti∞ ì
  2645. áááááááááááthσá firs⌠á characte≥á no⌠á iεá thσá se⌠á betweeεá thσ ì
  2646. ááááááááááábrackets╗á iµá thσá firs⌠á characte≥á afte≥á thσá lef⌠ ìèááááááááááábracke⌠ i≤ ▐ (o≥ ~)¼ thσ inpu⌠ fielΣ i≤ al∞ character≤ ì
  2647. áááááááááááunti∞á thσá firs⌠ characte≥ whicΦ i≤ iε thσá remaininτ ì
  2648. áááááááááááse⌠áá oµáá characer≤á betweeεáá thσáá brackets«áá  Thσ ì
  2649. ááááááááááácorrespondinτá argumen⌠á mus⌠á poin⌠á t∩á ßá characte≥ ì
  2650. áááááááááááarray.
  2651.  
  2652. áááááThσ conversioε character≤ d¼á ∩ anΣ ° ma∙ bσ capitalizeΣá o≥ ì
  2653. ááááápreceedeΣá b∙á lé t∩ indicatσ tha⌠ ß pointe≥ t∩á longéá rathe≥ ì
  2654. áááááthaεá t∩á intéá i≤ iεá thσá argumen⌠á list«á  Similarly¼á thσ ì
  2655. áááááconversioεá character≤ eé o≥ fé ma∙ bσ capitalizeΣ o≥ precedeΣ ì
  2656. áááááb∙á Lé  t∩ indicatσ ß pointe≥ t∩ double rathe≥ thaε t∩ float«  ì
  2657. áááááThσ conversioε character≤ d¼á oé anΣ xé ma∙ bσ preceedeΣ b∙á hé ì
  2658. ááááát∩á indicatσá ß pointe≥ t∩ shorté rathe≥ thaεá t∩á int«á  Thσ ì
  2659. áááááconversioεá hdéá ma∙á bσ shorteneΣ t∩ onl∙ héá t∩á conforφá t∩ ì
  2660. áááááKernighan and Ritchie (Reference 2).
  2661.  
  2662. áááááThσá scanµá function≤á returεá thσá numbe≥á oµá successfull∙ ì
  2663. ááááámatcheΣá anΣá assigneΣá inpu⌠ items«á  Thi≤ caε bσá useΣá t∩ ì
  2664. ááááádecidσ ho≈ man∙ inpu⌠ item≤ werσ found«  Thσ constan⌠ EO╞ i≤ ì
  2665. áááááreturneΣ upoε enΣ oµ input╗ notσ tha⌠ thi≤ i≤ differen⌠ froφ ì
  2666. ááááázero¼ whicΦ mean≤ tha⌠ n∩ conversioε wa≤ done╗ iµ conversioε ì
  2667. áááááwa≤á intended¼áá i⌠á wa≤á frustrateΣá b∙á aεáá inappropriatσ ì
  2668. ááááácharacte≥ iε thσ input.
  2669.  
  2670. áááááFo≥ example¼ thσ call
  2671.  
  2672. áááááááááááin⌠ i╗ 
  2673. ááááá      floa⌠ x╗ 
  2674. ááááá      cha≥ name[50];
  2675. ááááá      scanf¿ "%d%f%s"¼ &i¼ &x¼ name);
  2676.  
  2677. áááááwitΦ thσ inpu⌠ line
  2678.  
  2679. ááááááááááá2╡  54.32E-▒  synott
  2680.  
  2681. áááááwil∞ assigε t∩ Θ thσ valuσ 25¼á ° thσ valuσ 5.432¼á anΣ namσ ì
  2682. áááááwil∞ contaiε 'synott'«  Or,
  2683.  
  2684. áááááááááááin⌠ i╗ 
  2685. ááááá      floa⌠ x╗ 
  2686. ááááá      cha≥ name[50];
  2687. ááááá      scanf("%2d%f%*d%[1234567890]"¼ &i¼ &x¼ name);
  2688.  
  2689. áááááwitΦ input
  2690.  
  2691. ááááááááááá5678╣  012│  56a72
  2692.  
  2693. áááááwil∞ assigε 5╢ t∩ i¼á 789.░ t∩ x¼ ski≡ '0123'¼ anΣ placσ thσ ì
  2694. ááááástrinτá '56º iε name«á  Thσ nex⌠ cal∞ t∩ getcharé wil∞ returε ì
  2695. ááááá'a'.
  2696.  
  2697. áááááThσ geté argumen⌠ oµ thσ unformaté functioε itselµ use≤ ß modσ ì
  2698. áááááargument║ get(TRUE⌐ i≤ assumeΣ t∩ perforφ ß characte≥ input¼ ì
  2699. áááááand get(FALSE) does an unget on the last character fetched.
  2700. è
  2701. SEE ALSO
  2702. áááááatof¼ getc¼ printf
  2703.  
  2704. DIAGNOSTICS
  2705. áááááThσ scanµ function≤ returε EO╞ oε enΣ oµ input¼á anΣ ß shor⌠ ì
  2706. ááááácoun⌠ fo≥ missinτ o≥ illega∞ datß items.
  2707.  
  2708. BUGS
  2709. áááááThσáá succes≤áá oµá incompatiblσá type≤á i≤áá no⌠áá directl∙ ì
  2710. ááááádeterminable.
  2711. .paè.hescreeε i/∩                                             screeε i/o
  2712.  
  2713.                        Screen Input/Output
  2714.  
  2715. NAME
  2716. áááááaltscrn¼á clrscrn¼á cursor¼á eraeol¼á eraeop¼ home¼ iniscrn¼ ì
  2717. ááááánormscrn, putscrn, uniscrn
  2718.  
  2719. SYNOPSIS
  2720. ááááá#include <scrnio.h>
  2721.  
  2722. áááááBOOL altscrn()
  2723.  
  2724. áááááVOID clrscrn()
  2725.  
  2726. áááááBOOL cursor(r, c)
  2727. áááááint r, c;
  2728.  
  2729. áááááBOOL eraeol(r, c)
  2730. áááááint r, c;
  2731.  
  2732. áááááBOOL eraeop(r, c)
  2733. áááááint r, c;
  2734.  
  2735. áááááVOID home()
  2736.  
  2737. áááááVOID iniscrn()
  2738.  
  2739. áááááBOOL normscrn()
  2740.  
  2741. áááááMETACHAR putscrn(c)
  2742. áááááint c;
  2743.  
  2744. áááááVOID uniscrn()
  2745.  
  2746. DESCRIPTION
  2747. áááááaltscrnéá begin≤ thσ alternate-intensit∙ mode«á  Iµ thi≤ i≤ ß ì
  2748. ááááásysteφ supporteΣ function¼á altscrné return≤ TRUE╗ iµ not¼ i⌠ ì
  2749. áááááreturn≤ FALSE.
  2750.  
  2751. áááááclrscrnéá clear≤ anΣ erase≤ thσ termina∞ screeεá anΣá return≤ ì
  2752. áááááthe cursor to the home position.
  2753.  
  2754. ááááácursoréá position≤á thσá curso≥á a⌠á ro≈á r¼á columεá c«á  Iµ ì
  2755. ááááásuccessful¼á thi≤á functioε return≤ TRUE«á  Iµ ßá coordinatσ ì
  2756. áááááaddreessinτ erro≥ i≤ sensed¼ i⌠ wil∞ returε FALSE.
  2757.  
  2758. áááááeraeoléá erase≤ ro≈ ré froφ columε cé t∩ thσ enΣ oµá thσá line«  ì
  2759. áááááI⌠ wil∞ returε TRUEé iµ successful¼ o≥ FALSEé oε imprope≥ ré o≥ ì
  2760. ááááác.  The cursor is positioned at row r, column c afterward.
  2761.  
  2762. áááááeraeopéá erase≤ froφ ro≈ r¼á columε cé t∩ thσ enΣ oµ thσ page«  ì
  2763. áááááTRUEéá i≤á normall∙ returned╗á  imprope≥ ré o≥á céá wil∞á causσ ì
  2764. áááááeraeopé t∩ returε FALSE«á  Thσ curso≥ i≤ positioneΣ a⌠ ro≈ r¼ ì
  2765. ááááácolumn c afterward.
  2766. èáááááhomeéá move≤á thσá curso≥ t∩ ro≈ zero¼á columεá zer∩á oµá thσ ì
  2767. áááááterminal.
  2768.  
  2769. áááááiniscrnéá send≤ thσ initializatioε sequencσ t∩ thσá terminal¼ ì
  2770. áááááif it exists.
  2771.  
  2772. ááááánormscrné begin≤ thσ normal-intensit∙ mode«á  I⌠ return≤ TRUEé ì
  2773. áááááiµ thi≤ functioε i≤ supported¼ o≥ FALSEé iµ not.
  2774.  
  2775. áááááputscrné send≤ thσ characte≥ cé t∩ thσ termina∞ iεá unbuffereΣ ì
  2776. ááááámode«áá  outcol[STDOUT]éá anΣá outrow[STDOUT]éá arσá correctl∙ ì
  2777. áááááupdated¼ ie.¼ putscrné wil∞ bσ ignoreΣ iµ thσ screeε sizσ ha≤ ì
  2778. ááááábeen exceeded.
  2779.  
  2780. áááááuniscrnéáá send≤áá thσá un-initializatioεá sequencσá t∩áá thσ ì
  2781. áááááterminal, if it exits.
  2782.  
  2783. áááááGloba∞á variable≤ outrow[STDOUT]é anΣ outcol[STDOUT]é holΣ thσ ì
  2784. ááááácurrent position of the cursor at all times.
  2785.  
  2786. áááááscrnio.héá i≤á thσ datß filσ whicΦ declare≤ al∞á globa∞á datß ì
  2787. ááááánecessar∙á fo≥ thσ usσ oµ thesσ termina∞ displa∙á functions«  ì
  2788. áááááscrnio.hé shoulΣ bσ includeΣ beforσ stdio.hé iε ever∙á prograφ ì
  2789. áááááusing screen i/o functions.
  2790.  
  2791. áááááRo≈á ░á i≤á thσ topmos⌠ row¼á anΣ columε ░ i≤á thσá leftmos⌠ ì
  2792. ááááácolumn.
  2793.  
  2794. BUGS
  2795. áááááThesσ function≤ ma∙ no⌠ operatσ oε system≤ iε whicΦ termina∞ ì
  2796. áááááoutput cannot be direct.
  2797. .paè.hesetbuf                                                     setbuf
  2798.  
  2799.                           Assign Buffer
  2800.  
  2801. NAME
  2802. ááááásetbuf
  2803.  
  2804. SYNOPSIS
  2805. áááááVOI─ setbuf(fp¼ buffer)
  2806. áááááFAS╘ FIL┼ *fp;
  2807. áááááBUFFE╥ buffer;
  2808.  
  2809. DESCRIPTION
  2810. ááááásetbufé i≤ useΣ afte≥ ß streaφ ha≤ beeε openeΣ bu⌠ beforσá i⌠ ì
  2811. ááááái≤ reaΣ o≥ written«á  Iµ fpé alread∙ ha≤ ß buffe≥ assigneΣ t∩ ì
  2812. áááááit¼á i⌠ cause≤ thσ characte≥ arra∙ bufferé t∩ bσ useΣ insteaΣ ì
  2813. áááááoµá aεá automaticall∙á allocateΣ buffer«á  An∙ datßá iεá thσ ì
  2814. áááááexistinτ buffe≥ i≤ lost«á  Iµ bufferé i≤ thσ constan⌠ pointe≥ ì
  2815. áááááNULL, input/output will be completely unbuffered.
  2816.  
  2817. áááááUsσá oµ setbuf(stdin¼á NULL)é a⌠ thσ beginninτ oµá ßá prograφ ì
  2818. áááááassures that terminal input will be unbuffered.
  2819.  
  2820. BUGS
  2821. áááááUnbuffereΣáááá termina∞ááá inpu⌠ááá depend≤ááá oεááá whethe≥ ì
  2822. áááááread(0, buffer, 1)éáá return≤á ßá bytσá immediatel∙áá o≥áá i≤ ì
  2823. áááááinternall∙ buffereΣ fo≥ linσ editinτ purposes.
  2824. .paè.hesgn                                                           sgn
  2825.  
  2826.                           Sign Function
  2827.  
  2828. NAME
  2829. ááááásgn 
  2830.  
  2831. SYNOPSIS
  2832. ááááádouble sgn(x)
  2833. ááááádouble x;
  2834.  
  2835. DESCRIPTION
  2836. ááááásgné wil∞ returε thσ doublσ sgε functioε oµ x¼á i.e.¼ +1¼ -1¼ ì
  2837. áááááo≥á 0¼á accordingl∙ a≤ xé i≤á positive¼á negative¼á o≥á zero¼ ì
  2838. ááááárespectively.
  2839.  
  2840. áááááSGNá i≤á thσ macr∩ iε heade≥ filσ defs.Φ whicΦ perform≤á thσ ì
  2841. ááááásamσá function¼á excep⌠ fo≥ sidσ effects¼á anΣ oε al∞ signeΣ ì
  2842. ááááánumeric types.
  2843. .paè.hesimpson                                                   simpson
  2844.  
  2845.              Integration by Simpson's Modified Rule
  2846.  
  2847. NAME
  2848. ááááásimpson 
  2849.  
  2850. SYNOPSIS
  2851. ááááádouble simpson(func, lowlim, uplim, n)
  2852. ááááádouble (*func)(), lowlim, uplim;
  2853. áááááint n;
  2854.  
  2855. DESCRIPTION
  2856. ááááásimpsonéá integrate≤á thσ functioε funcé froφ lowlimé t∩á uplimé ì
  2857. áááááusinτ 2né points¼á accordinτ t∩ thσ Simpsoε integratioε rule«  ì
  2858. áááááThe error value is given by
  2859.  
  2860. ááááá     e = -(n * h5/90) * funciv(x)
  2861.  
  2862. áááááwherσá héá ╜á (uplimé - lowlim)/(2n⌐ anΣ lowlimé <ô xéá <ôá uplim«  ì
  2863. ááááá(see Reference 3, formula 25.4.6)
  2864. .paè.hesin                                                           sin
  2865.  
  2866.                      Trigonometric Functions
  2867.  
  2868. NAME
  2869. ááááásin¼ cos¼ tan¼ asin¼ acos¼ atan¼ atan2¼ cotaε 
  2870.  
  2871. SYNOPSIS
  2872. ááááá#include <mathcons.h>
  2873.  
  2874. ááááádouble sin(x)
  2875. ááááádouble x;
  2876.  
  2877. ááááádouble cos(x)
  2878. ááááádouble x;
  2879.  
  2880. ááááádouble tan(x)
  2881. ááááádouble x;
  2882.  
  2883. ááááádouble asin(x)
  2884. ááááádouble x;
  2885.  
  2886. ááááádouble acos(x)
  2887. ááááádouble x;
  2888.  
  2889. ááááádouble atan(x)
  2890. ááááádouble x;
  2891.  
  2892. ááááádouble atan2(x, y)
  2893. ááááádouble x, y;
  2894.  
  2895. ááááádouble cotan(x)
  2896. ááááádouble x;
  2897.  
  2898. DESCRIPTION
  2899. áááááAl∞á oµ thesσ function≤ werσ programmeΣ usinτ thσ algorithm≤ ì
  2900. ááááágiveεá iε Softwarσ Manua∞ fo≥ thσ Elementar∙ Functionsôá (seσ ì
  2901. áááááReference 5).
  2902.  
  2903. ááááásin¼á co≤á anΣ taε returε trigonometriπ function≤ oµá radiaε ì
  2904. áááááarguments«á  Thσ magnitudσ oµ thσ argumen⌠ shoulΣ bσ checkeΣ ì
  2905. áááááb∙ thσ calle≥ t∩ makσ surσ thσ resul⌠ i≤á meaningful«á  (seσ ì
  2906. áááááReference 5, pp. 125-149 and 150-173)
  2907.  
  2908. áááááasin returns the arc sin in the range -pi/2 to +pi/2.
  2909.  
  2910. áááááacosé return≤ thσ arπ cosinσ iε thσ rangσ zer∩ t∩ pi.
  2911. ááááá
  2912. áááááataεá return≤á thσá arπ tangen⌠ oµ ° iε thσ rangσá -pi/▓á t∩ ì
  2913. ááááá+pi/2.  (see Reference 5, pp. 194-216)
  2914.  
  2915. áááááatan2 returns the arc tangent of x/y in the range -pi to +pi.
  2916.  
  2917. ááááácotan returns the cotangent of x.
  2918.  
  2919. DIAGNOSTICSèáááááArgument≤á oµá magnitudσ greate≥ thaε unit∙ causσá asinéá anΣ ì
  2920. áááááacosé t∩ returε valuσ 0╗á errnoé i≤ se⌠ t∩ EDOM«  Thσ valuσ oµ ì
  2921. ááááátané a⌠ it≤ singula≥ point≤ i≤ INFINITY¼á anΣ errnoé i≤ se⌠ t∩ ì
  2922. áááááERANGE.
  2923.  
  2924. BUGS
  2925. áááááThσá valuσá oµ tané fo≥ argument≤ greate≥á thaεá MAXANGL┼á i≤ ì
  2926. ááááágarbage.
  2927. .paè.hesinh                                                         sinh
  2928.  
  2929.                       Hyperbolic Functions
  2930.  
  2931. NAME
  2932. ááááásinh¼ cosh¼ tanΦ 
  2933.  
  2934. SYNOPSIS
  2935. ááááá#include <mathtyp.h>
  2936.  
  2937. ááááádouble sinh(x)
  2938. ááááádouble x;
  2939.  
  2940. ááááádouble cosh(x)
  2941. ááááádouble x;
  2942.  
  2943. ááááádouble tanh(x)
  2944. ááááádouble x;
  2945.  
  2946. DESCRIPTION
  2947. áááááThesσá function≤ computσ thσ designateΣ hyperboliπ function≤ ì
  2948. áááááfor real arguments.
  2949.  
  2950. áááááAl∞á werσ programmeΣ usinτ thσ algorithm≤ giveε iεá Softwarσ ì
  2951. áááááManua∞á fo≥ thσ Elementar∙ Functionsô (seσ Referencσá 5¼á pp« ì
  2952. ááááá217-238 and 239-255).
  2953.  
  2954. DIAGNOSTICS
  2955. ááááásinhéá anΣ coshé returε INFINITY oµ appropriatσ sigε wheεá thσ ì
  2956. ááááácorrec⌠ valuσ woulΣ overflow.
  2957. .paè.hesortH                                                       sortH
  2958.  
  2959.                          Sort Functions
  2960.  
  2961. NAME
  2962. ááááásortH¼ sortS¼ sortQ¼ sort┬, qsort
  2963.  
  2964. SYNOPSIS
  2965. áááááVOID sortH(n, comp, exch)
  2966. áááááint n, (*comp)();
  2967. áááááVOID (*exch)();
  2968. ááááá
  2969. áááááVOID sortS(n, comp, exch)
  2970. áááááint n, (*comp)();
  2971. áááááVOID (*exch)();
  2972.  
  2973. áááááVOID sortQ(n¼ comp, exch)
  2974. áááááint n, (*comp)();
  2975. áááááVOID (*exch)();
  2976.  
  2977. áááááVOID sortB(n, comp, exch)
  2978. áááááint n, (*comp)();
  2979. áááááVOID (*exch)();
  2980.  
  2981. áááááVOI─ qsort(base¼ n¼ width¼ compar)
  2982. áááááSTRIN╟ base;
  2983. áááááin⌠ n, width, (*compar)();
  2984.  
  2985. DESCRIPTION
  2986. áááááEacΦá oµá thesσ function≤ wil∞ sor⌠ aε arra∙ oµ sizσ néá witΦ ì
  2987. ááááárespec⌠á t∩á ßá comparisoε functioεá comp(i¼á j)¼á whicΦá i≤ ì
  2988. ááááápositive¼á iµ anΣ onl∙ iµ element≤ ié anΣ jé oµ thσ arra∙á arσ ì
  2989. áááááou⌠á oµ order«á   Thσ exch(i¼á j)é functioε exchange≤ thσ ithô ì
  2990. áááááanΣ jthô element≤ oµ thσ array«á  Thσ namσ anΣ typσ oµá arra∙ ì
  2991. áááááarσ unknowε t∩ thσ sor⌠ routines¼á bu⌠ must¼á oµ course¼á bσ ì
  2992. áááááknowε t∩ exché anΣ comp.
  2993.  
  2994. ááááásortHéá  use≤  thσ heapsor⌠ algorithm¼á witΦ timσá complexit∙ ì
  2995. áááááO(ε ¬ log(n))«  (Seσ Referencσ 10¼ pp« 87-92.)
  2996.  
  2997. ááááásortSé use≤ thσ Shel∞ sor⌠ algorithm¼ witΦ timσ complexit∙ oµ ì
  2998. áááááabou⌠ O(n1.5)« (Seσ Reference≤ ▓ anΣ 9.)
  2999.  
  3000. ááááásortQéá  use≤  thσ  quicksor⌠ algorithm¼á oµ timσá complexit∙ ì
  3001. áááááO(ε ¬ log(n)⌐ t∩ O(n2)«  (Seσ Referencσ 11.)
  3002.  
  3003. ááááásortBé perform≤ ß bubble-sor⌠ iε whicΦ largσ value≤ bubblσ u≡ ì
  3004. áááááand low values shuttle down in the array, O(n) to O(n2).
  3005.  
  3006. áááááqsortéá i≤ anothe≥ implementatioε oµ thσ quicksor⌠ algorithm«  ì
  3007. áááááThσ baseé i≤ ß pointe≥ t∩ thσ beginninτ oµ thσ data╗ né i≤ thσ ì
  3008. ááááánumbe≥á oµá elements╗á thirΣ i≤ thσ widthé oµ aεá elemen⌠á iε ì
  3009. ááááábytes╗á las⌠á i≤á thσ namσ oµ thσ comparisoε routinσá t∩á bσ ì
  3010. ááááácalleΣá witΦ tw∩ arguments¼á pointer≤ t∩ thσ element≤á beinτ ì
  3011. ááááácompared«á  Thσá comparisoε mus⌠ returε aεá intege≥á greate≥ ì
  3012. áááááthaε zer∩ iµ anΣ onl∙ iµ thσ element≤ beinτ compareΣ arσ ou⌠ ìèáááááoµ sort.
  3013. .paè.hetolower                                                   tolower
  3014.  
  3015.                Conversion to Lower and Upper Case
  3016.  
  3017. NAME
  3018. ááááátolower, toupper 
  3019.  
  3020. SYNOPSIS
  3021. áááááchar tolower(c)
  3022. áááááint c;
  3023.  
  3024. áááááchar toupper(c)
  3025. áááááint c;
  3026.  
  3027. DESCRIPTION
  3028. ááááátolower return≤ thσ lowe≥ casσ oµ c¼á iµ c i≤ aεá upper-casσ ì
  3029. áááááletter.
  3030.  
  3031. ááááátoupperá return≤ thσ uppe≥ casσ oµ c¼á iµ c i≤ ßá lower-casσ ì
  3032. áááááletter.
  3033.  
  3034. áááááTOLOWERá anΣá TOUPPER arσ thσ macro≤ founΣá iεá heade≥á filσ ì
  3035. áááááctype.Φá whicΦ arσ identica∞ t∩ thσ function≤ above¼á excep⌠ ì
  3036. áááááfor side-effects.
  3037. .paè.heungetc                                                     ungetc
  3038.  
  3039.               Push Character Back into Input Stream
  3040.  
  3041. NAME
  3042. áááááungetc 
  3043.  
  3044. SYNOPSIS
  3045. ááááá#include <stdio.h>
  3046.  
  3047. áááááint ungetc(c, stream)
  3048. áááááint c;
  3049. áááááFILE *stream;
  3050.  
  3051. DESCRIPTION
  3052. áááááungetc pushe≤ thσ characte≥ c bacδ oε aε inpu⌠ stream«  Tha⌠ ì
  3053. ááááácharacte≥á wil∞á bσ returneΣ b∙ thσ nex⌠ getc cal∞á oεá tha⌠ ì
  3054. ááááástream.  ungetc returns c.
  3055.  
  3056. áááááOnσá characte≥ oµ pushbacδ i≤ guaranteeΣ provideΣá somethinτ ì
  3057. áááááha≤á beeεá reaΣ froφ thσ streaφ anΣ thσ streaφá i≤á actuall∙ ì
  3058. ááááábuffered.  
  3059.  
  3060. áááááfseek erases all memory of pushed back characters.
  3061.  
  3062. SE┼ ALSO
  3063. ááááágetc, fseek
  3064.  
  3065. DIAGNOSTICS
  3066. áááááungetc returns EOF if c is EOF.
  3067. .he
  3068. .pa oè.PN 1
  3069. .FO                                5-#
  3070.              5. C U S T O M I Z A T I O N   N O T E S 
  3071.  
  3072.      Therσá arσá approximatel∙ 16▓ function≤ anΣá 16╖á parameter≤ ì
  3073. (constants¼ macros¼ anΣ globa∞ variables⌐ name≤ iε thσ portablσ ├ ì
  3074. subroutinσ library«  Oµ these¼ 1▓ arσ systeφ functions¼ fo≥ whicΦ ì
  3075. sourcσá codσ i≤ no⌠ included¼á anΣ anothe≥ 14╡ function≤ anΣá 15▓ ì
  3076. parameter≤ tha⌠ arσ machine-independent«  Onσ oµ thσ system-leve∞ ì
  3077. function≤ anΣ thσ remaininτ ╡ function≤ anΣ 5╢ parameter≤ mus⌠ bσ ì
  3078. customizeΣá t∩ thσ ideosyncracie≤ oµ thσ hos⌠á environment«á  Thσ ì
  3079. systeφ interfacσ function≤ arσ listeΣ iε Tablσ 5-1¼á thσ element≤ ì
  3080. tha⌠á mus⌠á bσ giveε attentioε arσ listeΣ iε Tablσ 5-2¼á anΣá thσ ì
  3081. machine-independen⌠á element≤á arσá giveεá iεá Tablσá 5-3«áá  Al∞ ì
  3082. elements are listed in Table 5-4.
  3083.  
  3084.      Thσá procedure≤á fo≥ effectinτ thσ needeΣ change≤á froφá thσ ì
  3085. distributioεá sourcσá i≤á containeΣá iεá thσá remainde≥á oµá thi≤ ì
  3086. section.
  3087. .po11
  3088.  
  3089.  
  3090.  
  3091.                    Table 5-1: PORTABLE C LIBRARY SYSTEM INTERFACE
  3092.  
  3093. Element      Type       File                    Description               
  3094.  
  3095. close        function   csys.lib     Close file OS interface.                 
  3096. creat        function   csys.lib     Create file function, OS interface.      
  3097. exit         function   csys.lib     Close all files and terminate program.   
  3098. lseek        function   csys.lib     Move file position using arg as offset.  
  3099. open         function   csys.lib     Open file for operation, OS interface.   
  3100. read         function   csys.lib     Read from stream into buffer: OS interfc 
  3101. rename       function   csys.lib     Rename a file: OS interface.             
  3102. sbrk         function   csys.lib     Set pointer to available memory: OS i/f. 
  3103. unlink       function   csys.lib     Unlink a file name from a file (delete). 
  3104. write        function   csys.lib     File write OS interface.                 
  3105. _exit        function   csys.lib     Immediate termination of program.        
  3106.  
  3107. .paè        Table 5-2: PORTABLE C LIBRARY COMPILER- & SYSTEM-DEPENDENT ELEMENTS
  3108.  
  3109. Element      Type       File                    Description               
  3110.  
  3111. ALIGN        typedef    stdtyp.h     K & R storage allocation header aligner. 
  3112. ALTSCRN      TEXT       scrnio.h     Terminal into alternate intensity string 
  3113. astof        function   atof.c       ASCII number to (double) float. Pointer. 
  3114. BIG10X       constant   mathcons.h   Largest 10^(2^(BIG10X -1)) < INFINITY    
  3115. BIGX         constant   mathcons.h   16 * log2(INFINITY) - 1                  
  3116. BUFSIZ       constant   stdio.h      I/O stream buffer size.                  
  3117. CB4L         TBOOL      scrnio.h     Column-before-row boolean.               
  3118. chrstc       function   chrstc.c     Return int characteristic of double.     
  3119. CLEARSCREEN  TEXT       scrnio.h     Terminal clear-screen string.            
  3120. COFFSET      tiny       scrnio.c     Cursor lead-in column offset value.      
  3121. CRINSUP      constant   stdio.h      Set TRUE to suppress CR text input.      
  3122. CROUTADD     constant   stdio.h      Set true to echo '\n' with CR.           
  3123. DPRECISION   constant   mathcons.h   (int) PRECISION                          
  3124. EDOM         constant   errno.h      Function argument not in defined domain. 
  3125. EOF          constant   defs.h       Standard End-of-File value.              
  3126. ERAEOLN      TEXT       scrnio.c     Terminal Erase-to-End-of-Line string.    
  3127. ERAEOPG      TEXT       scrnio.h     Terminal erase-to-end-of-page string.    
  3128. fint         function   fint.c       Float (double) INTeger-part function.    
  3129. ftoa         function   ftoa.c       Float (double) to ASCII conversion.      
  3130. HEIGHT       tiny       scrnio.h     Terminal height, number of lines.        
  3131. HOME         string     scrnio.h     Terminal cursor-to-home (0,0) string.    
  3132. INFINITY     constant   mathcons.h   Largest double value on this machine.    
  3133. INFINLEG     constant   math.cons    INFINITY / ROOTTWO.                      
  3134. ldexp        function   frexp.c      Load exponent (multiply by power of 2).  
  3135. LEADIN       TEXT       scrnio.h     Cursor lead-in sequence.                 
  3136. LEAST        constant   mathcons.h   Least double representable in machine.   
  3137. LINDELETE    TEXT       scrnio.c     Terminal line-delete string.             
  3138. LININSERT    TEXT       scrnio.h     Terminal line-delete string.             
  3139. LOGINFINITY  constant   mathcons.h   Largest argument of log function.        
  3140. LOGLEAST     constant   mathcons.h   Log of smallest machine number           
  3141. mathcons.h   header     mathcons.h   Constant file for math functions.        
  3142. MAXCHANNELS  constant   global.h     Maximum number of i/o channels at once.  
  3143. MAXEXP       constant   mathcons.h   Largest numeric characteristic.          
  3144. MAXEXPG      constant   mathcons.h   MAXEXP - 3 guard bits.                   
  3145. MAXLINE      constant   stdio.h      Maximum no. of chars. on input line.     
  3146. MAXSTREAM    constant   stdio.h      Maximum number of buffered i/o streams.  
  3147. MINEXP       constant   mathcons.h   Characteristic of least machine double.  
  3148. MINEXPG      constant   mathcons.h   MINEXP + 3 guard bits.                   
  3149. NALLOC       constant   stdtyp.h     No. of HEADER units for malloc().         
  3150. NORMSCRN     TEXT       scrnio.h     Terminal string, return normal intensity 
  3151. PMODE        constant   stdio.h      fopen() protection mode (for UNIX).      
  3152. PRECISION    constant   mathcons.h   -log10(WASHOUT).                         
  3153. RCENDER      TEXT       scrnio.h     Row-column lead-in terminator.           
  3154. RCSEPARATOR  TEXT       scrnio.h     Cursor row, column separator string.     
  3155. rename       function   csys.lib     Rename a file: OS interface.             
  3156. ROFFSET      tiny       scrnio.h     Cursor lead-in row offset value.         
  3157. RTHLFINF     constant   mathcons.h   sqrt(INFINITY / 2).                      
  3158. SCRNINI      TEXT       scrnio.h     Initialize-terminal string.              
  3159. SCRNUNI      TEXT       scrnio.h     Terminal un-initialize string.           
  3160. SCRNWRAP     TBOOL      scrnio.h     Signal for auto terminal wrap-around.    
  3161. SMALLX       constant   mathcons.h   16 * log2(LEAST) + 1.0                   è
  3162.           PORTABL┼ ├ LIBRAR┘ COMPILER- ª SYSTEM-DEPENDEN╘á ELEMENT╙ (cont.)        
  3163.  
  3164. Element      Type       File                    Description               
  3165.  
  3166. SYMLEAST     constant   mathcons.h   Symmetric Least value (1/SYMLEAST) exist 
  3167. SYS_EOF      macro      stdio.h      System end-of-file marker, if any.       
  3168. TANHXBIG     constant   mathcons     (No. sig bits + 2) * log(2) / 2          
  3169. TBITS        typedef    stdtyp.h     Tiny (8 char min) for bit manipulation.  
  3170. TBOOL        typedef    stdtyp.h     Tiny (8 char min) used tor boolean.      
  3171. TERMINAL     TEXT       scrnio.h     Terminal identification string.          
  3172. TINY         macro      stdtyp.h     rvalue for tiny.                         
  3173. USELAST      TBOOL      scrnio.h     Signal to use final terminal column.     
  3174. UTINY        macro      stdtyp.h     rvalue for utiny.                        
  3175. WASHOUT      constant   mathcons.h   1.0 + (x < WASHOUT) = 1.0 to precision.  
  3176. WIDTH        tiny       scrnio.h     Terminal width, number of characters.    
  3177. XLT2ASCII    TBOOL      scrnio.h     Translate-to-ASCII boolean.              
  3178. .paè
  3179.              Table 5-3: PORTABLE C LIBRARY SYSTEM-INDEPENDENT ELEMENTS
  3180.  
  3181. Element      Type       File                    Description               
  3182.  
  3183. ABS          macro      defs.h       Absolute value of any numeric type.      
  3184. abs          function   abs.c        Absolute value function, int.            
  3185. acos         function   asin.c       arc cosine, double.                      
  3186. allot        function   malloc.c     malloc() without header overhead.         
  3187. altscrn      function   scrnio.c     Set terminal to alternate intensity.     
  3188. AND          macro      defs.h       Logical "and" operator, &&.              
  3189. asin         function   asin.c       Arc sine function, double.               
  3190. astoi        function   atoi.c       ASCII int to int. Also returns pointer.  
  3191. astol        function   atol.c       ASCII to long. Also returns pointer.     
  3192. atan         function   atan.c       Arc tangent, double.                     
  3193. atan2        function   atan.c       Two-argument arc tangent, double.        
  3194. atof         function   atof.c       ASCII to (double) float.                 
  3195. atoi         function   atoi.c       ASCII to int.                            
  3196. atol         function   atol.c       ASCII to long.                           
  3197. bitcount     function   bitcount.c   K & R function counts bits in argument.  
  3198. BITS         typedef    stdtyp.h     Short used only for bit manipulation.    
  3199. BOOL         typedef    stdtyp.h     Int used only for boolean.               
  3200. BUFFER       typedef    stdtyp.h     Used only for pointers to char buffers.  
  3201. calloc       function   malloc.c     C allocation for arrays.                 
  3202. cbrt         function   cbrt.c       Cube root function, double.              
  3203. CBRTFOUR     constant   mathcons.h   Cube root of 4.                          
  3204. CBRTTWO      constant   mathcons.h   Cube root of 2.                          
  3205. ceil         function   floor.c      Ceiling function of double.              
  3206. clearerr     macro      stdio.h      Reset error indicator on file stream.    
  3207. clrscrn      function   scrnio.c     Clear terminal screen.                   
  3208. cos          function   sin.c        Cosine function, double.                 
  3209. cosh         function   cosh.c       Hyperbolic cosine, double.               
  3210. cotan        function   tan.c        Cotangent function, double.              
  3211. CURPOS       constant   stdio.h      Current file position seek indicator.    
  3212. cursor       function   scrnio.c     Position terminal cursor at row, column. 
  3213. eprintf      function   eprintf.c    Formatted print to stderr.               
  3214. eputc        macro      stdio.c      Put character out to stderr.             
  3215. eputs        function   eputs.c      Put string out to stderr.                
  3216. eraeol       function   scrnio.c     Erase terminal screen to end of line.    
  3217. eraeop       function   scrnio.c     Erase terminal screen to end of page.    
  3218. ERANGE       constant   errno.h      Computed math value out of range.        
  3219. erf          function   erf.c        Error function, double.                  
  3220. erfc         function   erf.c        Complimentary error function, double.    
  3221. errno        short      global.h     Standard error variable.                 
  3222. exp          function   exp.c        Exponential function, double.            
  3223. fabs         function   fabs.c       Absolute value function, double.         
  3224. FADEOUT      constant   mathcons.h   Magnitude of washout term in Taylor ser. 
  3225. FAIL         constant   defs.h       Standard Failure value.                  
  3226. FALSE        constant   defs.h       Standard False value.                    
  3227. fclosall     function   putc.c       Close all buffered i/o streams.          
  3228. fclose       function   fopen.c      Close file using descriptor.             
  3229. feof         macro      stdio.h      Evaluate end-of-file status, int.        
  3230. ferror       macro      stdio.h      Boolean for file i/o error.              
  3231. fflush       function   fopen.c      Flush file buffers to the medium.        
  3232. fgets        function   fgets.c      Get string from file (buffered).         è
  3233.                PORTABLE C LIBRARY SYSTEM-INDEPENDENT ELEMENTS (cont.)             
  3234.  
  3235. Element      Type       File                    Description               
  3236.  
  3237. FILE         typedef    stdio.h      Standard file type declaration.          
  3238. FILEND       constant   stdio.h      File end seek position designator.       
  3239. fileno       macro      stdio.h      Return file descriptor of stream.        
  3240. floor        function   floor.c      Floor function, double.                  
  3241. flush        function   putc.c       Flush output buffer when char overflow.  
  3242. fmax         function   fminmax.c    Maximum of a, b, double.                 
  3243. fmin         function   fminmax.c    Minimum of a, b, double.                 
  3244. fopen        function   fopen.c      Open file for buffered operation.        
  3245. FOREVER      macro      defs.h       Same as "for (::)".                      
  3246. format       function   format.c     Basic output format utility.             
  3247. FOURTHLOG2   constant   mathcons.h   log(2) / 4                               
  3248. fprintf      function   fprintf.c    Formatted output to file.                
  3249. fputs        function   fputs.c      Put string out to file, unformatted.     
  3250. frac         function   frac.c       Fractional-part function, double.        
  3251. fread        function   fread.c      Buffered read from file.                 
  3252. free         function   malloc.c     Free previously allocated storage.       
  3253. frexp        function   frexp.c      Fraction (mantissa) and exponent, double 
  3254. fscanf       function   fscanf.c     Formatted scan inputs from file.         
  3255. fseek        function   fseek.c      Buffered file reposition function.       
  3256. ftell        function   ftell.c      Return current file offset from origin.  
  3257. fwrite       function   fwrite.c     Buffered write to file.                  
  3258. getbuf       function   getbuf.c     Get an i/o buffer from allot().          
  3259. getc         function   getc.c       Get character from file.                 
  3260. getca        function   getc.c       Get ASCII char from buffered i/o stream. 
  3261. getchar      macro      stdio.c      Get character from stdin.                
  3262. getf         function   getf.c       Prompt and get double from stdin.        
  3263. geti         function   geti.c       Prompt and get integer from stdin.       
  3264. getl         function   getl.c       Prompt and get long from stdin.          
  3265. getns        function   getns.c      Prompt and get string from stdin.        
  3266. gets         function   gets.c       Get string from stdin.                   
  3267. GLOBAL       macro      stdtyp.h     Pseudo storage class (extern) for port.  
  3268. GZ           macro      defs.h       Greater than Zero, GZ(x) = (x>0? x : 0)  
  3269. HALFLOG2e    constant   mathcons.h   log2(e) / 4                              
  3270. HEADER       typedef    stdtyp.h     K & R storage allocation block type.     
  3271. home         function   scrnio.c     Home the terminal cursor.                
  3272. hypot        function   hypot.c      Compute hypotenuse of right triangle.    
  3273. index        function   index.c      Find position of char in string arg.     
  3274. iniscrn      function   scrnio.c     Initialize terminal screen output.       
  3275. inverf       function   inverf.c     Inverse of error function, erf, double.  
  3276. inverfc      function   inverf.c     Inverse of complementart error function. 
  3277. INVPI        constant   mathcons.h   1.0 / pi                                 
  3278. IObuffs      buffers    stdio.h      I/O buffers for buffered streams.        
  3279. IS           macro      defs.h       Logical equivalence operator, ==.        
  3280. isalnum      function   isalnum.c    True if arg is alpha or number.          
  3281. ISALNUM      macro      ctype.h      True if arg is alpha or number.          
  3282. isalpha      function   isalpha.c    True if arg is alpha.                    
  3283. ISALPHA      macro      ctype.h      True if arg is alpha.                    
  3284. isascii      function   isascii.c    True if arg is < 128.                    
  3285. ISASCII      macro      ctype.h      True if arg < 128.                       
  3286. iscntrl      function   iscntrl.c    True if arg is control or DEL character. è
  3287.              PORTABLE C LIBRARY SYSTEM-INDEPENDENT ELEMENTS (cont.)
  3288.  
  3289. Element      Type       File                    Description               
  3290.  
  3291. ISCNTRL      macro      ctype.h      True if arg is control or DEL character. 
  3292. isdigit      function   isdigit.c    True if arg is decimal digit.            
  3293. ISDIGIT      macro      ctype.h      True if arg is decimal digit.            
  3294. ishex        function   ishex.c      Returns TRUE if argument is hex number.  
  3295. islower      function   islower.c    True if arg is lower-case alpha.         
  3296. ISLOWER      macro      ctype.h      True if arg is lower case alpha.         
  3297. ISNT         macro      defs.h       Logical non-equivalence operator, !=.    
  3298. ISOCTAL      macro      ctype.h      True if arg is octal character.          
  3299. isoctal      function   isoctal.c    Returns TRUE if argument is octal digit. 
  3300. isok         function   isok.c       Prompts and accepts y/n answer.          
  3301. isprint      function   isprint.c    True if arg is printable character.      
  3302. ISPRINT      macro      ctype.h      True if arg is printable character.      
  3303. ispunct      function   ispunct.c    True if arg is punctuation.              
  3304. ISPUNCT      macro      ctype.h      True if arg is not cntrl or alphanum.    
  3305. isspace      function   isspace.c    True if arg is space, tab, or newline.   
  3306. ISSPACE      macro      ctype.h      True if arg is space, tab, or newline.   
  3307. isupper      function   isupper.c    True if arg is upper-case alpha.         
  3308. ISUPPER      macro      ctype        True if arg is upper case alpha.         
  3309. itoa         function   itoa.c       Integer-to-Ascii conversion.             
  3310. itoab        function   itoa.c       Based int-ASCII conversion.              
  3311. labs         function   labs.c       Absolute value function, long.           
  3312. LBITS        typedef    stdtyp.h     Long used only for bit manipulation.     
  3313. liberate     function   malloc.c     free() without header overhead.          
  3314. lmax         function   lminmax.c    Maximum of a, b: long.                   
  3315. lmin         function   lminmax.c    Minimum of a, b: long.                   
  3316. log          function   log.c        Natural logarithm, double.               
  3317. log10        function   log10.c      Common logarithm, double.                
  3318. LOG10e       constant   mathcons.h   Log of e base 10.                        
  3319. LOG10two     constant   mathcons.h   log of 2 base 10.                        
  3320. log2         function   log2.c       Logarithm, base 2, double.               
  3321. LOG2         constant   mathcons.h   Natural log of 2.                        
  3322. LOG2e        constant   mathcons.h   Log of e base 2.                         
  3323. LOGe10       constant   mathcons.h   log of 10 base e.                        
  3324. ltoa         function   ltoa.c       Long-to-ASCII conversion.                
  3325. ltoab        function   ltoa.c       Long to base conversion.                 
  3326. LURSHIFT     macro      defs.h       Long Unsigned Right Shift long n, b bits 
  3327. malloc       function   malloc.c     Storage allocator: get memory from OS.   
  3328. max          function   max.c        Maximum of two integers.                 
  3329. MAX          macro      defs.h       Maximum value of any two numbers.        
  3330. MAXANGLE     constant   mathcons.h   Maximum trigonometric angle, pi * 2^25.  
  3331. METACHAR     typedef    stdtyp.h     Augmented char to include EOF value.     
  3332. min          function   min.c        Minimum of two integer values.           
  3333. MIN          macro      defs.h       Minimum value of any two numeric values. 
  3334. modf         function   modf.c       Fraction and integer parts, double.      
  3335. NO           constant   defs.h       Standard NOt true value.                 
  3336. normscrn     function   scrnio.c     Return terminal to normal intensity.     
  3337. NOT          macro      defs.h       Logical negation operator, !.            
  3338. nprob        function   nprob.c      Normal probability function.             
  3339. nprobc       function   nprob.c      Normal probability tail function, double 
  3340. NULL         constant   defs.h       Standard NULL pointer value.             è
  3341.              PORTABLE C LIBRARY SYSTEM-INDEPENDENT ELEMENTS (cont.)
  3342.  
  3343. Element      Type       File                    Description               
  3344.  
  3345. OR           macro      defs.h       Logical inclusive-or operator, ||.       
  3346. ORIGIN       constant   stdio.h      Beginning of file seek designator.       
  3347. outcol       int array  global.h     Global variable, output column for chan. 
  3348. outrow       int array  global.h     Global variable, output row for channel. 
  3349. PI           constant   mathcons.h   pi                                       
  3350. PIover2      constant   mathcons.h   pi / 2                                   
  3351. PIover3      constant   mathcons.h   pi / 3                                   
  3352. PIover4      constant   mathcons.h   pi / 4                                   
  3353. PIover6      constant   mathcons.h   pi / 6                                   
  3354. pow          function   pow.c        Power: raise x to y power, double.       
  3355. printf       function   printf.c     Formatted print to stdout.               
  3356. progname     TEXT       global.h     Standard global string to hold prog name 
  3357. putc         function   putc.c       Buffered char output to stream.          
  3358. putca        function   putc.c       Buffered ASCII character output.         
  3359. putchar      macro      stdio.h      Put car out to stdout.                   
  3360. puts         function   puts.c       Put string out to stdout.                
  3361. putscrn      function   scrnio.c     Put character directly to screen, unbuff 
  3362. qsort        function   qsort.c      Quicksort an array.                      
  3363. randexp      function   randexp.c    Random number, double, exponential dist. 
  3364. randize      function   random.c     Seed the random number generator.        
  3365. randnorm     function   randnorm.c   Random number, double, normal distrib.   
  3366. random       function   random.c     Random number, double, uniform distrib.  
  3367. ratfun       function   ratfun.c     Rational function evaluation, double.    
  3368. realloc      function   realloc.c    Change storage allocator block size.     
  3369. redirbuf     function   redirbuf.c   Set redirected i/o buffer size.          
  3370. rewind       function   rewind.c     Rewind buffered i/o medium to beginning. 
  3371. rindex       function   rindex.c     Find last occurrence of char in string.  
  3372. rknstep      function   rknstep.c    4-th order Runge-Kutta n-th order DE.    
  3373. rkstep       function   rkstep.c     4-th order Runge-Kutta 1-st order DE.    
  3374. ROOTHALF     constant   mathcons.h   sqrt(0.5)                                
  3375. ROOTTWO      constant   mathcons.h   sqrt(2.0)                                
  3376. round        function   round.c      Round to nearest integer, double.        
  3377. scanf        function   scanf.c      Formatted scan input from stdin.         
  3378. setbuf       function   setbuf.c     Assign memory buffer to i/o stream.      
  3379. SGN          macro      defs.h       Sign value: +1, 0, -1, any numeric type. 
  3380. sgn          function   sgn.c        Sign function: +1, 0, -1, double.        
  3381. simpson      function   simpson.c    Integration by Simpson's modified rule.  
  3382. sin          function   sin.c        Sine function, double.                   
  3383. sinh         function   sinh.c       Hyperbolic sine, double.                 
  3384. sortB        function   sortB.c      Bubble-sort array in memory, in-place.   
  3385. sortH        function   sortH.c      Heapsort an array, in-place in memory.   
  3386. sortQ        function   sortQ.c      Quicksort memory array, in place.        
  3387. sortS        function   sortS.c      Shell-sort memory array, in-place.       
  3388. sprintf      function   sprintf.c    Formatted output to string buffer.       
  3389. sqrt         function   sqrt.c       Square-root function, double.            
  3390. SQRT3        constant   mathcons.h   sqrt(3)                                  
  3391. SQRT3m1      constant   mathcons.h   sqrt(3.0) - 1.0                          
  3392. sscanf       function   sscanf.c     Formated scan input from string.         
  3393. STDERR       constant   stdio.h      Standard error output device number.     
  3394. stderr       macro      stdio.h      Standard buffered i/o error stream.      è
  3395.              PORTABLE C LIBRARY SYSTEM-INDEPENDENT ELEMENTS (cont.) 
  3396.  
  3397. Element      Type       File                    Description               
  3398.  
  3399. STDIN        constant   stdio.h      Standard input device number.            
  3400. stdin        macro      stdio.h      Standard buffered input stream.          
  3401. STDOUT       constant   stdio.h      Standard output device number.           
  3402. stdout       macro      stdio.h      Standard buffered output stream.         
  3403. stradd       function   stradd.c     Multiple string concatenation.           
  3404. strcat       function   strcat.c     Concatenate two strings.                 
  3405. strcmp       function   strcmp.c     Compare two strings lexicographically.   
  3406. strcpy       function   strcpy.c     copy one string to another.              
  3407. streql       function   streql.c     Returns TRUE if strings are equal.       
  3408. strindex     function   strindex.c   Locate one string in another.            
  3409. STRING       typedef    stdtyp.h     Used only for pointers to strings.       
  3410. strlen       function   strlen.c     Compute length of string.                
  3411. strncat      function   strncat      Concatenate strings up to n chars.       
  3412. strncmp      function   strncmp.c    Compare strings up to n chars.           
  3413. strncpy      function   strncpy.c    Copy one string to another, up to n char 
  3414. strsave      function   strsave.c    Save (copy) a string to heap storage.    
  3415. SUCCESS      constant   defs.h       Standard non-FAIL value.                 
  3416. TABSTOP      macro      stdio.h      Number of spaces per tab stop.           
  3417. tan          function   tan.c        Tangent function, double.                
  3418. tanh         function   tanh.c       Hyperbolic tangent, double.              
  3419. TEXT         typedef    stdtyp.h     Used only for ASCII printable characters 
  3420. tiny         typedef    stdtyp.h     A char used for signed int work.         
  3421. tolower      function   tolower.c    Convert arg to lower-case, if upper.     
  3422. TOLOWER      macro      ctype.h      Convert arg to lower-case, if upper.     
  3423. toupper      function   toupper.c    Convert to upper case, if lower.         
  3424. TOUPPER      macro      ctype.h      Convert arg to upper case, if lower.     
  3425. TRUE         constant   defs.h       Standard truth value.                    
  3426. TWOLOG2e     constant   mathcons.h   2 * log2(e)                              
  3427. TWOmSQRT3    constant   mathcons.h   2 - sqrt(3)                              
  3428. TWOoverPI    constant   mathcons.h   2.0 / pi                                 
  3429. unformat     function   unformat.c   Basic scan function, arbitrary medium.   
  3430. ungetc       function   ungetc.c     Put char back into input stream.         
  3431. uniscrn      function   scrnio.c     Uninitialize terminal screen.            
  3432. urandom      function   random.c     Random number, unsigned, uniform distrib 
  3433. URSHIFT      macro      defs.h       Unsigned Right Shift, unsigned n, b bits 
  3434. utiny        typedef    stdtyp.h     A char used for unsigned int work.       
  3435. utoa         function   utoa.c       Unsigned to ASCII conversion.            
  3436. VOID         typedef    stdtyp.h     Used for function returning no value.    
  3437. YES          constant   defs.h       Standard truth value.                    
  3438. _ALLBUFF     constant   stdio.h      Allocated buffer flag mask.              
  3439. _BUSY        constant   stdio.h      File open (busy) flag mask.              
  3440. _EOF         constant   stdio.h      Buffered  stream end-of-file flag mask.  
  3441. _IOERR       constant   stdio.h      Buffered stream i/o error mask.          
  3442. _RDONLY      constant   stdio.h      File open signal to read only.           
  3443. _RDWRIT      constant   stdio.h      File open signal for read and write.     
  3444. _WRONLY      constant   stdio.h      File open signal for write-only access.  
  3445. .paè.po6
  3446.                       Table 5-4: PORTABLE C LIBRARY ELEMENTS
  3447.  
  3448. Element      Type       File      Portable                 Description               
  3449.  
  3450. ABS          macro      defs.h       yes        Absolute value of any numeric type.      
  3451. abs          function   abs.c        yes        Absolute value function, int.            
  3452. acos         function   asin.c       yes        arc cosine, double.                      
  3453. ALIGN        typedef    stdtyp.h     customize  K & R storage allocation header aligner. 
  3454. allot        function   malloc.c     yes        malloc() without header overhead.         
  3455. altscrn      function   scrnio.c     yes        Set terminal to alternate intensity.     
  3456. ALTSCRN      TEXT       scrnio.h     customize  Terminal into alternate intensity string 
  3457. AND          macro      defs.h       yes        Logical "and" operator, &&.              
  3458. asin         function   asin.c       yes        Arc sine function, double.               
  3459. astof        function   atof.c       customize  ASCII number to (double) float. Pointer. 
  3460. astoi        function   atoi.c       yes        ASCII int to int. Also returns pointer.  
  3461. astol        function   atol         yes        ASCII to long. Also returns pointer.     
  3462. atan         function   atan.c       yes        Arc tangent, double.                     
  3463. atan2        function   atan.c       yes        Two-argument arc tangent, double.        
  3464. atof         function   atof.c       yes        ASCII to (double) float.                 
  3465. atoi         function   atoi.c       yes        ASCII to int.                            
  3466. atol         function   atol.c       yes        ASCII to long.                           
  3467. BIG10X       constant   mathcons.h   customize  Largest 10^(2^(BIG10X -1)) < INFINITY    
  3468. BIGX         constant   mathcons.h   customize  16 * log2(INFINITY) - 1                  
  3469. bitcount     function   bitcount.c   yes        K & R function counts bits in argument.  
  3470. BITS         typedef    stdtyp.h     yes        Short used only for bit manipulation.    
  3471. BOOL         typedef    stdtyp.h     yes        Int used only for boolean.               
  3472. BUFFER       typedef    stdtyp.h     yes        Used only for pointers to char buffers.  
  3473. BUFSIZ       constant   stdio.h      customize  I/O stream buffer size.                  
  3474. calloc       function   malloc.c     yes        C allocation for arrays.                 
  3475. CB4L         TBOOL      scrnio.h     customize  Column-before-row boolean.               
  3476. cbrt         function   cbrt.c       yes        Cube root function, double.              
  3477. CBRTFOUR     constant   mathcons.h   yes        Cube root of 4.                          
  3478. CBRTTWO      constant   mathcons.h   yes        Cube root of 2.                          
  3479. ceil         function   floor.c      yes        Ceiling function of double.              
  3480. chrstc       function   chrstc.c     customize  Return int characteristic of double.     
  3481. clearerr     macro      stdio.h      yes        Reset error indicator on file stream.    
  3482. CLEARSCREEN  TEXT       scrnio.h     customize  Terminal clear-screen string.            
  3483. close        function   csys.lib     system     Close file OS interface.                 
  3484. clrscrn      function   scrnio.c     yes        Clear terminal screen.                   
  3485. COFFSET      tiny       scrnio.c     customize  Cursor lead-in column offset value.      
  3486. cos          function   sin.c        yes        Cosine function, double.                 
  3487. cosh         function   cosh.c       yes        Hyperbolic cosine, double.               
  3488. cotan        function   tan.c        yes        Cotangent function, double.              
  3489. creat        function   csys.lib     system     Create file function, OS interface.      
  3490. CRINSUP      constant   stdio.h      customize  Set TRUE to suppress CR text input.      
  3491. CROUTADD     constant   stdio.h      customize  Set true to echo '\n' with CR.           
  3492. CURPOS       constant   stdio.h      yes        Current file position seek indicator.    
  3493. cursor       function   scrnio.c     yes        Position terminal cursor at row, column. 
  3494. DPRECISION   constant   mathcons.h   customize  (int) PRECISION                          
  3495. EDOM         constant   errno.h      yes        Function argument not in defined domain. 
  3496. EOF          constant   defs.h       yes        Standard End-of-File value.              
  3497. eprintf      function   eprintf.c    yes        Formatted print to stderr.               
  3498. eputc        macro      stdio.c      yes        Put character out to stderr.             
  3499. eputs        function   eputs.c      yes        Put string out to stderr.                
  3500. eraeol       function   scrnio.c     yes        Erase terminal screen to end of line.    è
  3501.                        PORTABLE C LIBRARY ELEMENTS (cont.)
  3502.  
  3503. Element      Type       File      Portable                 Description
  3504.  
  3505. ERAEOLN      TEXT       scrnio.c     customize  Terminal Erase-to-End-of-Line string.    
  3506. eraeop       function   scrnio.c     yes        Erase terminal screen to end of page.    
  3507. ERAEOPG      TEXT       scrnio.h     customize  Terminal erase-to-end-of-page string.    
  3508. ERANGE       constant   errno.h      yes        Computed math value out of range.        
  3509. erf          function   erf.c        yes        Error function, double.                  
  3510. erfc         function   erf.c        yes        Complimentary error function, double.    
  3511. errno        short      global.h     yes        Standard error variable.                 
  3512. exit         function   csys.lib     system     Close all files and terminate program.   
  3513. exp          function   exp.c        yes        Exponential function, double.            
  3514. fabs         function   fabs.c       yes        Absolute value function, double.         
  3515. FADEOUT      constant   mathcons.h   yes        Magnitude of washout term in Taylor ser. 
  3516. FAIL         constant   defs.h       yes        Standard Failure value.                  
  3517. FALSE        constant   defs.h       yes        Standard False value.                    
  3518. FAST         macro      stdtyp.h     customize  Pseudo storage class (register).         
  3519. fclosall     function   putc.c       yes        Close all buffered i/o streams.          
  3520. fclose       function   fopen.c      yes        Close file using descriptor.             
  3521. feof         macro      stdio.h      yes        Evaluate end-of-file status, int.        
  3522. ferror       macro      stdio.h      yes        Boolean for file i/o error.              
  3523. fflush       function   fopen.c      yes        Flush file buffers to the medium.        
  3524. fgets        function   fgets.c      yes        Get string from file (buffered).         
  3525. FILE         typedef    stdio.h      yes        Standard file type declaration.          
  3526. FILEND       constant   stdio.h      yes        File end seek position designator.       
  3527. fileno       macro      stdio.h      yes        Return file descriptor of stream.        
  3528. fint         function   fint.c       customize  Float (double) INTeger-part function.    
  3529. floor        function   floor.c      yes        Floor function, double.                  
  3530. flush        function   putc.c       yes        Flush output buffer when char overflow.  
  3531. fmax         function   fminmax.c    yes        Maximum of a, b, double.                 
  3532. fmin         function   fminmax.c    yes        Minimum of a, b, double.                 
  3533. fopen        function   fopen.c      yes        Open file for buffered operation.        
  3534. FOREVER      macro      defs.h       yes        Same as "for (::)".                      
  3535. format       function   format.c     yes        Basic output format utility.             
  3536. FOURTHLOG2   constant   mathcons.h   yes        log(2) / 4                               
  3537. fprintf      function   fprintf.c    yes        Formatted output to file.                
  3538. fputs        function   fputs.c      yes        Put string out to file, unformatted.     
  3539. frac         function   frac.c       yes        Fractional-part function, double.        
  3540. fread        function   fread.c      yes        Buffered read from file.                 
  3541. free         function   malloc.c     yes        Free previously allocated storage.       
  3542. frexp        function   frexp.c      yes        Fraction (mantissa) and exponent, double 
  3543. fscanf       function   fscanf.c     yes        Formatted scan inputs from file.         
  3544. fseek        function   fseek.c      yes        Buffered file reposition function.       
  3545. ftell        function   ftell.c      yes        Return current file offset from origin.  
  3546. ftoa         function   ftoa.c       customize  Float (double) to ASCII conversion.      
  3547. fwrite       function   fwrite.c     yes        Buffered write to file.                  
  3548. getbuf       function   getbuf.c     yes        Get an i/o buffer from allot().          
  3549. getc         function   getc.c       yes        Get character from file.                 
  3550. getca        function   getc.c       yes        Get ASCII char from buffered i/o stream. 
  3551. getchar      macro      stdio.c      yes        Get character from stdin.                
  3552. getf         function   getf.c       yes        Prompt and get double from stdin.        
  3553. geti         function   geti.c       yes        Prompt and get integer from stdin.       
  3554. getl         function   getl.c       yes        Prompt and get long from stdin.          è
  3555.                        PORTABLE C LIBRARY ELEMENTS (cont.)
  3556.  
  3557. Element      Type       File      Portable                 Description
  3558.  
  3559. getns        function   getns.c      yes        Prompt and get string from stdin.        
  3560. gets         function   gets.c       yes        Get string from stdin.                   
  3561. GLOBAL       macro      stdtyp.h     yes        Pseudo storage class (extern) for port.  
  3562. GZ           macro      defs.h       yes        Greater than Zero, GZ(x) = (x>0? x : 0)  
  3563. HALFLOG2e    constant   mathcons.h   yes        log2(e) / 4                              
  3564. HEADER       typedef    stdtyp.h     yes        K & R storage allocation block type.     
  3565. HEIGHT       tiny       scrnio.h     customize  Terminal height, number of lines.        
  3566. home         function   scrnio.c     yes        Home the terminal cursor.                
  3567. HOME         string     scrnio.h     customize  Terminal cursor-to-home (0,0) string.    
  3568. hypot        function   hypot.c      yes        Compute hypotenuse of right triangle.    
  3569. index        function   index.c      yes        Find position of char in string arg.     
  3570. INFINITY     constant   mathcons.h   customize  Largest double value on this machine.    
  3571. INFINLEG     constant   math.cons    customize  INFINITY / ROOTTWO.                      
  3572. iniscrn      function   scrnio.c     yes        Initialize terminal screen output.       
  3573. inverf       function   inverf.c     yes        Inverse of error function, erf, double.  
  3574. inverfc      function   inverf.c     yes        Inverse of complementart error function. 
  3575. INVPI        constant   mathcons.h   yes        1.0 / pi                                 
  3576. IObuffs      buffers    stdio.h      yes        I/O buffers for buffered streams.        
  3577. IS           macro      defs.h       yes        Logical equivalence operator, ==.        
  3578. isalnum      function   isalnum.c    yes        True if arg is alpha or number.          
  3579. ISALNUM      macro      ctype.h      yes        True if arg is alpha or number.          
  3580. isalpha      function   isalpha.c    yes        True if arg is alpha.                    
  3581. ISALPHA      macro      ctype.h      yes        True if arg is alpha.                    
  3582. isascii      function   isascii.c    yes        True if arg is < 128.                    
  3583. ISASCII      macro      ctype.h      yes        True if arg < 128.                       
  3584. iscntrl      function   iscntrl.c    yes        True if arg is control or DEL character. 
  3585. ISCNTRL      macro      ctype.h      yes        True if arg is control or DEL character. 
  3586. isdigit      function   isdigit.c    yes        True if arg is decimal digit.            
  3587. ISDIGIT      macro      ctype.h      yes        True if arg is decimal digit.            
  3588. ishex        function   ishex.c      yes        Returns TRUE if argument is hex number.  
  3589. islower      function   islower.c    yes        True if arg is lower-case alpha.         
  3590. ISLOWER      macro      ctype.h      yes        True if arg is lower case alpha.         
  3591. ISNT         macro      defs.h       yes        Logical non-equivalence operator, !=.    
  3592. ISOCTAL      macro      ctype.h      yes        True if arg is octal character.          
  3593. isoctal      function   isoctal.c    yes        Returns TRUE if argument is octal digit. 
  3594. isok         function   isok.c       yes        Prompts and accepts y/n answer.          
  3595. isprint      function   isprint.c    yes        True if arg is printable character.      
  3596. ISPRINT      macro      ctype.h      yes        True if arg is printable character.      
  3597. ispunct      function   ispunct.c    yes        True if arg is punctuation.              
  3598. ISPUNCT      macro      ctype.h      yes        True if arg is not cntrl or alphanum.    
  3599. isspace      function   isspace.c    yes        True if arg is space, tab, or newline.   
  3600. ISSPACE      macro      ctype.h      yes        True if arg is space, tab, or newline.   
  3601. isupper      function   isupper.c    yes        True if arg is upper-case alpha.         
  3602. ISUPPER      macro      ctype        yes        True if arg is upper case alpha.         
  3603. itoa         function   itoa.c       yes        Integer-to-Ascii conversion.             
  3604. itoab        function   itoa.c       yes        Based int-ASCII conversion.              
  3605. labs         function   labs.c       yes        Absolute value function, long.           
  3606. LBITS        typedef    stdtyp.h     yes        Long used only for bit manipulation.     
  3607. ldexp        function   frexp.c      customize  Load exponent (multiply by power of 2).  
  3608. LEADIN       TEXT       scrnio.h     customize  Cursor lead-in sequence.                 è
  3609.                        PORTABLE C LIBRARY ELEMENTS (cont.)
  3610.  
  3611. Element      Type       File      Portable                 Description
  3612.  
  3613. LEAST        constant   mathcons.h   customize  Least double representable in machine.   
  3614. liberate     function   malloc.c     yes        free() without header overhead.          
  3615. LINDELETE    TEXT       scrnio.c     customize  Terminal line-delete string.             
  3616. LININSERT    TEXT       scrnio.h     customize  Terminal line-delete string.             
  3617. lmax         function   lminmax.c    yes        Maximum of a, b: long.                   
  3618. lmin         function   lminmax.c    yes        Minimum of a, b: long.                   
  3619. LOCAL        macro      stdtyp.h     customize  Pseudo storage class (static) for port.  
  3620. log          function   log.c        yes        Natural logarithm, double.               
  3621. log10        function   log10.c      yes        Common logarithm, double.                
  3622. LOG10e       constant   mathcons.h   yes        Log of e base 10.                        
  3623. LOG10two     constant   mathcons.h   yes        log of 2 base 10.                        
  3624. log2         function   log2.c       yes        Logarithm, base 2, double.               
  3625. LOG2         constant   mathcons.h   yes        Natural log of 2.                        
  3626. LOG2e        constant   mathcons.h   yes        Log of e base 2.                         
  3627. LOGe10       constant   mathcons.h   yes        log of 10 base e.                        
  3628. LOGINFINITY  constant   mathcons.h   customize  Largest argument of log function.        
  3629. LOGLEAST     constant   mathcons.h   customize  Log of smallest machine number           
  3630. lseek        function   csys.lib     system     Move file position using arg as offset.  
  3631. ltoa         function   ltoa.c       yes        Long-to-ASCII conversion.                
  3632. ltoab        function   ltoa.c       yes        Long to base conversion.                 
  3633. LURSHIFT     macro      defs.h       yes        Long Unsigned Right Shift long n, b bits 
  3634. malloc       function   malloc.c     yes        Storage allocator: get memory from OS.   
  3635. max          function   max.c        yes        Maximum of two integers.                 
  3636. MAX          macro      defs.h       yes        Maximum value of any two numbers.        
  3637. MAXANGLE     constant   mathcons.h   yes        Maximum trigonometric angle, pi * 2^25.  
  3638. MAXCHANNELS  constant   global.h     customize  Maximum number of i/o channels at once.  
  3639. MAXEXP       constant   mathcons.h   customize  Largest numeric characteristic.          
  3640. MAXEXPG      constant   mathcons.h   customize  MAXEXP - 3 guard bits.                   
  3641. MAXLINE      constant   stdio.h      customize  Maximum no. of chars. on input line.     
  3642. MAXSTREAM    constant   stdio.h      customize  Maximum number of buffered i/o streams.  
  3643. METACHAR     typedef    stdtyp.h     yes        Augmented char to include EOF value.     
  3644. min          function   min.c        yes        Minimum of two integer values.           
  3645. MIN          macro      defs.h       yes        Minimum value of any two numeric values. 
  3646. MINEXP       constant   mathcons.h   customize  Characteristic of least machine double.  
  3647. MINEXPG      constant   mathcons.h   customize  MINEXP + 3 guard bits.                   
  3648. modf         function   modf.c       yes        Fraction and integer parts, double.      
  3649. NALLOC       constant   stdtyp.h     customize  No. of HEADER units for malloc().         
  3650. NO           constant   defs.h       yes        Standard NOt true value.                 
  3651. normscrn     function   scrnio.c     yes        Return terminal to normal intensity.     
  3652. NORMSCRN     TEXT       scrnio.h     customize  Terminal string, return normal intensity 
  3653. NOT          macro      defs.h       yes        Logical negation operator, !.            
  3654. nprob        function   nprob.c      yes        Normal probability function.             
  3655. nprobc       function   nprob.c      yes        Normal probability tail function, double 
  3656. NULL         constant   defs.h       yes        Standard NULL pointer value.             
  3657. open         function   csys.lib     system     Open file for operation, OS interface.   
  3658. OR           macro      defs.h       yes        Logical inclusive-or operator, ||.       
  3659. ORIGIN       constant   stdio.h      yes        Beginning of file seek designator.       
  3660. outcol       int array  global.h     yes        Global variable, output column for chan. 
  3661. outrow       int array  global.h     yes        Global variable, output row for channel. 
  3662. PI           constant   mathcons.h   yes        pi                                       è
  3663.                        PORTABLE C LIBRARY ELEMENTS (cont.)
  3664.  
  3665. Element      Type       File      Portable                 Description
  3666.  
  3667. PIover2      constant   mathcons.h   yes        pi / 2                                   
  3668. PIover3      constant   mathcons.h   yes        pi / 3                                   
  3669. PIover4      constant   mathcons.h   yes        pi / 4                                   
  3670. PIover6      constant   mathcons.h   yes        pi / 6                                   
  3671. PMODE        constant   stdio.h      customize  fopen() protection mode (for UNIX).      
  3672. pow          function   pow.c        yes        Power: raise x to y power, double.       
  3673. PRECISION    constant   mathcons.h   customize  -log10(WASHOUT).                         
  3674. printf       function   printf.c     yes        Formatted print to stdout.               
  3675. progname     TEXT       global.h     yes        Standard global string to hold prog name 
  3676. putc         function   putc.c       yes        Buffered char output to stream.          
  3677. putca        function   putc.c       yes        Buffered ASCII character output.         
  3678. putchar      macro      stdio.h      yes        Put car out to stdout.                   
  3679. puts         function   puts.c       yes        Put string out to stdout.                
  3680. putscrn      function   scrnio.c     yes        Put character directly to screen, unbuff 
  3681. qsort        function   qsort.c      yes        Quicksort an array.                      
  3682. randexp      function   randexp.c    yes        Random number, double, exponential dist. 
  3683. randize      function   random.c     yes        Seed the random number generator.        
  3684. randnorm     function   randnorm.c   yes        Random number, double, normal distrib.   
  3685. random       function   random.c     yes        Random number, double, uniform distrib.  
  3686. ratfun       function   ratfun.c     yes        Rational function evaluation, double.    
  3687. RCENDER      TEXT       scrnio.h     customize  Row-column lead-in terminator.           
  3688. RCSEPARATOR  TEXT       scrnio.h     customize  Cursor row, column separator string.     
  3689. read         function   csys.lib     system     Read from stream into buffer: OS interfc 
  3690. realloc      function   realloc.c    yes        Change storage allocator block size.     
  3691. redirbuf     function   redirbuf.c   yes        Set redirected i/o buffer size.          
  3692. rename       function   csys.lib     customize  Rename a file: OS interface.             
  3693. rewind       function   rewind.c     yes        Rewind buffered i/o medium to beginning. 
  3694. rindex       function   rindex.c     yes        Find last occurrence of char in string.  
  3695. rknstep      function   rknstep.c    yes        4-th order Runge-Kutta n-th order DE.    
  3696. rkstep       function   rkstep.c     yes        4-th order Runge-Kutta 1-st order DE.    
  3697. ROFFSET      tiny       scrnio.h     customize  Cursor lead-in row offset value.         
  3698. ROOTHALF     constant   mathcons.h   yes        sqrt(0.5)                                
  3699. ROOTTWO      constant   mathcons.h   yes        sqrt(2.0)                                
  3700. round        function   round.c      yes        Round to nearest integer, double.        
  3701. RTHLFINF     constant   mathcons.h   customize  sqrt(INFINITY / 2).                      
  3702. sbrk         function   csys.lib     system     Set pointer to available memory: OS i/f. 
  3703. scanf        function   scanf.c      yes        Formatted scan input from stdin.         
  3704. SCRNINI      TEXT       scrnio.h     customize  Initialize-terminal string.              
  3705. SCRNUNI      TEXT       scrnio.h     customize  Terminal un-initialize string.           
  3706. SCRNWRAP     TBOOL      scrnio.h     customize  Signal for auto terminal wrap-around.    
  3707. setbuf       function   setbuf.c     yes        Assign memory buffer to i/o stream.      
  3708. SGN          macro      defs.h       yes        Sign value: +1, 0, -1, any numeric type. 
  3709. sgn          function   sgn.c        yes        Sign function: +1, 0, -1, double.        
  3710. simpson      function   simpson.c    yes        Integration by Simpson's modified rule.  
  3711. sin          function   sin.c        yes        Sine function, double.                   
  3712. sinh         function   sinh.c       yes        Hyperbolic sine, double.                 
  3713. SMALLX       constant   mathcons.h   customize  16 * log2(LEAST) + 1.0                   
  3714. sortB        function   sortB.c      yes        Bubble-sort array in memory, in-place.   
  3715. sortH        function   sortH.c      yes        Heapsort an array, in-place in memory.   
  3716. sortQ        function   sortQ.c      yes        Quicksort memory array, in place.        è
  3717.                        PORTABLE C LIBRARY ELEMENTS (cont.)
  3718.  
  3719. Element      Type       File      Portable                 Description
  3720.  
  3721. sortS        function   sortS.c      yes        Shell-sort memory array, in-place.       
  3722. sprintf      function   sprintf.c    yes        Formatted output to string buffer.       
  3723. sqrt         function   sqrt.c       yes        Square-root function, double.            
  3724. SQRT3        constant   mathcons.h   yes        sqrt(3)                                  
  3725. SQRT3m1      constant   mathcons.h   yes        sqrt(3.0) - 1.0                          
  3726. sscanf       function   sscanf.c     yes        Formated scan input from string.         
  3727. STDERR       constant   stdio.h      yes        Standard error output device number.     
  3728. stderr       macro      stdio.h      yes        Standard buffered i/o error stream.      
  3729. STDIN        constant   stdio.h      yes        Standard input device number.            
  3730. stdin        macro      stdio.h      yes        Standard buffered input stream.          
  3731. STDOUT       constant   stdio.h      yes        Standard output device number.           
  3732. stdout       macro      stdio.h      yes        Standard buffered output stream.         
  3733. stradd       function   stradd.c     yes        Multiple string concatenation.           
  3734. strcat       function   strcat.c     yes        Concatenate two strings.                 
  3735. strcmp       function   strcmp.c     yes        Compare two strings lexicographically.   
  3736. strcpy       function   strcpy.c     yes        copy one string to another.              
  3737. streql       function   streql.c     yes        Returns TRUE if strings are equal.       
  3738. strindex     function   strindex.c   yes        Locate one string in another.            
  3739. STRING       typedef    stdtyp.h     yes        Used only for pointers to strings.       
  3740. strlen       function   strlen.c     yes        Compute length of string.                
  3741. strncat      function   strncat      yes        Concatenate strings up to n chars.       
  3742. strncmp      function   strncmp.c    yes        Compare strings up to n chars.           
  3743. strncpy      function   strncpy.c    yes        Copy one string to another, up to n char 
  3744. strsave      function   strsave.c    yes        Save (copy) a string to heap storage.    
  3745. SUCCESS      constant   defs.h       yes        Standard non-FAIL value.                 
  3746. SYMLEAST     constant   mathcons.h   customize  Symmetric Least value (1/SYMLEAST) exist 
  3747. SYS_EOF      macro      stdio.h      customize  System end-of-file marker, if any.       
  3748. TABSTOP      macro      stdio.h      yes        Number of spaces per tab stop.           
  3749. tan          function   tan.c        yes        Tangent function, double.                
  3750. tanh         function   tanh.c       yes        Hyperbolic tangent, double.              
  3751. TANHXBIG     constant   mathcons     customize  (No. sig bits + 2) * log(2) / 2          
  3752. TBITS        typedef    stdtyp.h     customize  Tiny (8 char min) for bit manipulation.  
  3753. TBOOL        typedef    stdtyp.h     customize  Tiny (8 char min) used tor boolean.      
  3754. TERMINAL     TEXT       scrnio.h     customize  Terminal identification string.          
  3755. TEXT         typedef    stdtyp.h     yes        Used only for ASCII printable characters 
  3756. tiny         typedef    stdtyp.h     yes        A char used for signed int work.         
  3757. TINY         macro      stdtyp.h     customize  rvalue for tiny.                         
  3758. tolower      function   tolower.c    yes        Convert arg to lower-case, if upper.     
  3759. TOLOWER      macro      ctype.h      yes        Convert arg to lower-case, if upper.     
  3760. toupper      function   toupper.c    yes        Convert to upper case, if lower.         
  3761. TOUPPER      macro      ctype.h      yes        Convert arg to upper case, if lower.     
  3762. TRUE         constant   defs.h       yes        Standard truth value.                    
  3763. TWOLOG2e     constant   mathcons.h   yes        2 * log2(e)                              
  3764. TWOmSQRT3    constant   mathcons.h   yes        2 - sqrt(3)                              
  3765. TWOoverPI    constant   mathcons.h   yes        2.0 / pi                                 
  3766. unformat     function   unformat.c   yes        Basic scan function, arbitrary medium.   
  3767. ungetc       function   ungetc.c     yes        Put char back into input stream.         
  3768. uniscrn      function   scrnio.c     yes        Uninitialize terminal screen.            
  3769. unlink       function   csys.lib     system     Unlink a file name from a file (delete). 
  3770. urandom      function   random.c     yes        Random number, unsigned, uniform distrib è
  3771.                        PORTABLE C LIBRARY ELEMENTS (cont.)
  3772.  
  3773. Element      Type       File      Portable                 Description
  3774.  
  3775. URSHIFT      macro      defs.h       yes        Unsigned Right Shift, unsigned n, b bits 
  3776. USELAST      TBOOL      scrnio.h     customize  Signal to use final terminal column.     
  3777. utiny        typedef    stdtyp.h     yes        A char used for unsigned int work.       
  3778. UTINY        macro      stdtyp.h     customize  rvalue for utiny.                        
  3779. utoa         function   utoa.c       yes        Unsigned to ASCII conversion.            
  3780. VOID         typedef    stdtyp.h     yes        Used for function returning no value.    
  3781. WASHOUT      constant   mathcons.h   customize  1.0 + (x < WASHOUT) = 1.0 to precision.  
  3782. WIDTH        tiny       scrnio.h     customize  Terminal width, number of characters.    
  3783. write        function   csys.lib     system     File write OS interface.                 
  3784. XLT2ASCII    TBOOL      scrnio.h     customize  Translate-to-ASCII boolean.              
  3785. YES          constant   defs.h       yes        Standard truth value.                    
  3786. _ALLBUFF     constant   stdio.h      yes        Allocated buffer flag mask.              
  3787. _BUSY        constant   stdio.h      yes        File open (busy) flag mask.              
  3788. _EOF         constant   stdio.h      yes        Buffered  stream end-of-file flag mask.  
  3789. _exit        function   csys.lib     system     Immediate termination of program.        
  3790. _IOERR       constant   stdio.h      yes        Buffered stream i/o error mask.          
  3791. _RDONLY      constant   stdio.h      yes        File open signal to read only.           
  3792. _RDWRIT      constant   stdio.h      yes        File open signal for read and write.     
  3793. _WRONLY      constant   stdio.h      yes        File open signal for write-only access.  
  3794. .po 17
  3795.  
  3796.  
  3797. Customization Procedure
  3798.  
  3799.      T∩á customizσ anΣ instal∞ thσ ├ languagσ portablσ subroutinσ ì
  3800. (function⌐á librar∙ oε ß ne≈ host¼á thσ procedurσ i≤á roughl∙á a≤ ì
  3801. follows:
  3802.  
  3803. ááááá1.ááDeterminσá thσá exten⌠ t∩ whicΦ thσ 1░ systeφá function≤ ì
  3804. ááááááááágiveεá iεá Tablσ 5-▒ (i.e.¼á al∞ bu⌠ rename⌐á exis⌠á anΣ ì
  3805. ááááááááásatisf∙á thσá interfacσ specification≤ iε Sectioεá │á oµ ì
  3806. áááááááááthi≤á manual«á  Determinσá thσá systeφá run-time-suppor⌠ ì
  3807. áááááááááinterfacσá requirement≤á withiεá thσá supplieΣáá librar∙ ì
  3808. áááááááááfile(s).
  3809.  
  3810. ááááá2.ááPrograφá ß renameé functioε anΣ conver⌠ i⌠ t∩ relocatablσ ì
  3811. áááááááááforφáá suitablσá fo≥á thσáá linkinτáá loader«áá  Modify¼ ì
  3812. áááááááááreprogram¼á o≥ creatσ an∙ oµ thσ 1░ systeφ function≤ anΣ ì
  3813. ááááááááábasiπá runtime-suppor⌠ function≤ t∩ makσ theφ conforφ t∩ ì
  3814. áááááááááthσ interface¼ anΣ similarl∙ conver⌠ theφ t∩ relocatablσ ì
  3815. áááááááááform«áá  Iµáá redirecteΣá i/∩á i≤á handleΣá withiεáá thσ ì
  3816. áááááááááaccessiblσ systeφ functions¼á alte≥ thesσ a≤ appropriatσ ì
  3817. ááááááááát∩á cal∞á redirbuféá t∩ expanΣá stdiεá o≥á stdou⌠á streaφ ì
  3818. ááááááááábuffer≤á t∩á BUFSIZ╗á otherwisσá redirecteΣ i/∩á ma∙á bσ ì
  3819. áááááááááconsiderably slower.
  3820.  
  3821. ááááá3.ááExtrac⌠á thσ remaininτ (conformant⌐ systeφ function≤á iε ì
  3822. áááááááááTablσ 5-▒ anΣ al∞ systeφ run-time-suppor⌠ function≤ froφ ì
  3823. áááááááááthσ existinτ hos⌠ ├ functioε library¼á anΣ inser⌠ al∞ oµ ì
  3824. áááááááááthσ systeφ interfacσ function≤ int∩ ß librar∙ o≥ archivσ ì
  3825. áááááááááfilσ usinτ thσ hos⌠ librar∙ maintenancσ program¼ cal∞ i⌠ ìèááááááááácsys.liΓáá (o≥áá csys.a¼áá etc.¼áá dependinτáá oεáá hos⌠ ì
  3826. ááááááááárestrictions)«á  Observσ topologica∞ sortinτ precedence≤ ì
  3827. áááááááááimposed by the system.
  3828.  
  3829. ááááá4.ááCustomizσá thσ function≤ anΣ parameter≤ listeΣ iεá Tablσ ì
  3830. ááááááááá5-2¼á anΣá recompilσá al∞ function≤ iεá thσá portablσá ├ ì
  3831. ááááááááálibrary¼á usinτá thσá hos⌠á ├ compiler¼á int∩á thσá forφ ì
  3832. áááááááááexpecteΣá b∙á thσ linkinτ loader«á  Combinσá thesσá witΦ ì
  3833. ááááááááácsys.liΓáá functions¼ááá observinτáá topologica∞ááá sor⌠ ì
  3834. áááááááááprecedences¼á int∩ ß ne≈ librar∙ file¼á cal∞ i⌠ lib0.liΓ ì
  3835. ááááááááá(or other, depending on host restrictions).
  3836.  
  3837.      Iµá thσá origina∞á hos⌠ ├ librar∙á contain≤á function≤á tha⌠ ì
  3838. satisf∙á thσ functiona∞ description≤ hereiε giveεá exactly¼á theε ì
  3839. the∙á ma∙á bσá extracteΣá froφ thi≤á librar∙á anΣá includeΣá int∩ ì
  3840. lib0.lib in lieu of the portable-source version, if desired.
  3841.  
  3842.  
  3843. Customization Example
  3844.  
  3845.      Thσá procedurσá outlineΣá iεá thσá precedinτá paragraph≤á i≤ ì
  3846. perhap≤ bes⌠ detaileΣ b∙ illustration«á  Thσ followinτ step≤ werσ ì
  3847. takeεá t∩á instal∞ thσ portablσ ├ librar∙ function≤ int∩á ßá filσ ì
  3848. acceptablσá fo≥á thσá AZTEC-I╔á (Versioεá 1.50¼áá copyrigh⌠á Man° ì
  3849. Softwarσ Systems¼á Shrewsbury¼á NJ⌐ ├ compile≥ oε ß microcompute≥ ì
  3850. witΦ CP/═ (ß trademarδ oµ Digita∞ Research¼á Inc.¼ Pacifiπ Grove¼ ì
  3851. CA⌐á operatinτá system«á  Thσ ├ librar∙ filσ delivereΣá witΦá thσ ì
  3852. compiler was named libc.lib.
  3853.  
  3854. ááááá1.ááStudy of existing system:
  3855.  
  3856. áááááááááa«  Iε extractinτ thσ systeφ interfacσ froφ libc.lib¼ i⌠ ì
  3857. áááááááááwa≤á noteΣ tha⌠ _exité wa≤ absent¼á bu⌠ al∞ othe≥á systeφ ì
  3858. áááááááááfunctions were present.
  3859.  
  3860. áááááááááb«á  Thσá sbrké functioε (anΣ aε internally-useΣá callcpφ ì
  3861. áááááááááfunction) did not function properly.
  3862.  
  3863. ááááááááác«á  Thσá STDI╬ readé functioε alway≤ buffereΣ character≤ ì
  3864. áááááááááuntil a newline was received.
  3865.  
  3866. ááááááááád«á  RedirecteΣ outpu⌠ wa≤ handleΣ withiε thσ ├á system¼ ì
  3867. áááááááááanΣ iµ redirecteΣ t∩ ß file¼á wa≤ ver∙ slow¼ onσ writteε ì
  3868. ááááááááácharacter per disk access.
  3869.  
  3870. áááááááááe«á  Thσá ├á run-timσá systeφá invokeΣá strcpy¼á strcat¼ ì
  3871. ááááááááástrcmp,éá anΣá strlenéá function≤ withiεá thσá portablσá ├ ì
  3872. ááááááááálibrary being installed.
  3873.  
  3874. áááááááááf«á  Thσ systeφ invokeΣ ß functioε closall_é t∩ flusΦ al∞ ì
  3875. áááááááááopeε stream≤ anΣ closσ al∞ files¼ anΣ ß functioε putterré ì
  3876. áááááááááto output a character to STDERR.
  3877.  
  3878. ááááá2.ááCorrective system actions:
  3879. èáááááááááa«á  renameéá wa≤ presen⌠ anΣ correc⌠ withiε thσ supplieΣ ì
  3880. ááááááááásystem, thus not reprogrammed.
  3881.  
  3882. áááááááááb«á  Thσá functioεá puterr(c)é wa≤á made¼á equivalen⌠á t∩ ì
  3883. áááááááááwrite(STDERR, &c, 1).
  3884.  
  3885. ááááááááác«á  Thσ _exité functioε wa≤ programmeΣ a≤ ß direc⌠á jum≡ ì
  3886. áááááááááto the reboot function of the CP/M operating system.
  3887.  
  3888. ááááááááád«á  ┴ correctl∙ functioninτ versioε oµ sbrké anΣ callcpφ ì
  3889. áááááááááwerσá availablσá iε sourcσ forφ oεá thσá vendor-supplieΣ ì
  3890. ááááááááádiskettes╗á thesσá werσ compileΣ anΣ substituteΣ fo≥ thσ ì
  3891. áááááááááfunctions extracted from libc.lib.
  3892.  
  3893. áááááááááe«á ┴ closeall_é functioε wa≤ programmeΣ t∩ cal∞ fclosallé ì
  3894. ááááááááá(ßá functioεá withiε putc)╗á  wheneve≥á buffereΣá outpu⌠ ì
  3895. áááááááááfunction≤á arσ used¼á outpu⌠ stream≤ arσá thu≤á properl∙ ì
  3896. áááááááááflusheΣá anΣ closeΣ b∙ exit«á  ┴ dumm∙ fclosallé functioε ì
  3897. áááááááááfilσ wa≤ provideΣ merel∙ t∩ closσ al∞ opeε file≤ iεá thσ ì
  3898. áááááááááevent output is unbuffered (putc not used).
  3899.  
  3900. áááááááááf«  Fortunately¼ thσ sourcσ codσ wa≤ availablσ fo≥ read¼ ì
  3901. ááááááááás∩á i⌠á wa≤ modifieΣ t∩ delive≥á single-characte≥á inpu⌠ ì
  3902. áááááááááimmediately, without waiting for a newline.
  3903.  
  3904. ááááááááág«á  Sincσ sourcσ codσ wa≤ available¼ i⌠ wa≤ possiblσ t∩ ì
  3905. áááááááááalte≥á thσá systeφ crooté functioε t∩ cal∞ redirbuféá wheε ì
  3906. áááááááááinpu⌠ o≥ outpu⌠ i≤ redirecteΣ t∩ ß file.  Notσ tha⌠ botΦ ì
  3907. ááááááááágetcéá anΣá putcéá contaiεá unreachablσá codσá t∩áá invokσ ì
  3908. áááááááááredirbuf╗  wheε STDI╬ o≥ STDOU╘ i≤ redirecteΣ t∩ ß file¼ ì
  3909. áááááááááit≤ streaφ buffe≥ i≤ thu≤ expandeΣ froφ ▒ t∩ BUFSIZ«á  ┴ ì
  3910. áááááááááfile¼á dredir.c¼á containinτ ß do-nothinτ dumm∙ redirbufé ì
  3911. áááááááááwa≤á supplieΣá fo≥ loadinτ wheε stdio.Φ stream≤ arσá no⌠ ì
  3912. áááááááááused.
  3913.  
  3914.      3.  Create system interface library.
  3915.  
  3916.      Al∞á systeφ function≤ werσ archiveΣ b∙ thσá librar∙á manage≥ ì
  3917. functioεá int∩á thσ ├ systeφ interfacσá library¼á csys.lib«á  Thσ ì
  3918. contents and order of functions in the file are:
  3919.  
  3920.      supp8080  fsubs     puterr    uexit     callcpm   croot
  3921.      closall   dfclose   open      read      write     lseek
  3922.      blkio     rename    unlink    block     lsubs     sbrk
  3923.      dredir    strlen    strcpy    strcmp    strcat    stradd
  3924.  
  3925. Notσá tha⌠á i⌠ wa≤ necessar∙ t∩ includσ strlené anΣá othe≥á strinτ ì
  3926. function≤á iεá thi≤ file¼á becausσ the∙ werσ invokeΣá withiεá thσ ì
  3927. system functions (actually, croot).
  3928.  
  3929.      4.  Customize, compile, and form function library.
  3930.  
  3931.      Constants¼ floating-poin⌠ numbe≥ formats¼ anΣ othe≥ element≤ ì
  3932. t∩ bσ customizeΣ werσ madσ t∩ conforφ witΦ thσ AZTEC-I╔á compile≥ ì
  3933. specifications.  See the following files for details:è
  3934.      atof.c    chrstc.c  defs.h    errno.h   fint.c    frexp.c
  3935.      ftoa.c    global.h  mathcons.h          scrnio.h  stdio.h
  3936.      stdtyp.h
  3937.  
  3938.      Al∞á non-matΦ librar∙ function≤ werσ compileΣ anΣá collecteΣ ì
  3939. into the file lib0.lib in the following order:
  3940.  
  3941.      random    getf      geti      getl      isok      getns
  3942.      sortB     sortH     sortS     bitcount  scrnio    printf
  3943.      eprintf   fprintf   sprintf   fscanf    format    eputs
  3944.      sscanf    scanf     fwrite    unformat  fputs     ftoa
  3945.      fgets     puts      putc      fopen     rewind    qsort
  3946.      fseek     fread     gets      getc      redirbuf  getbuf
  3947.      atof      strsave   realloc   sortq     atoi      setbuf
  3948.      isupper   islower   ispunct   isoctal   ishex     isprint
  3949.      iscntrl   isascii   isalnum   atol      malloc    rindex
  3950.      min       max       lminmax   labs      itoa      ftell
  3951.      ungetc    index     ltoa      isdigit   isspace   isalpha
  3952.      abs       utoa      tolower   toupper   strncmp   strncal
  3953.      strindex  streql    strncpy
  3954.  
  3955.      ┴á separatσ librar∙ file¼á mathlib¼á wa≤ madσ t∩ contaiε thσ ì
  3956. mathematical functions:
  3957.  
  3958.      asin      randnorm  randexp   hypot     cosh      cbrt
  3959.      sqrt      tanh      tan       sinh      sin       nprob
  3960.      inverf    erf       rkstep    rknstep   pow       floor
  3961.      exp       log2      log10     log       frexp     sgn
  3962.      ratfun    fminmax   modf      chrstc    round     frac
  3963.      fint      fabs      atan      simpson
  3964.  
  3965.      Duσ t∩ thσ fac⌠ tha⌠ thσ vendo≥ linkagσ edito≥ wa≤ incapablσ ì
  3966. oµ workinτ witΦ file≤ large≥ tha⌠ 64K¼á i⌠ wa≤ necessar∙ t∩ leavσ ì
  3967. the library in these three segments.
  3968. .pa oè.heappendix                                                 appendix
  3969. .PN 1
  3970. .FO                                A-#
  3971.                        A. R E F E R E N C E S 
  3972.  
  3973.  
  3974. 1.áááUNI╪ Programmer'≤ Manual¼ Bel∞ Telephonσ Laboratories¼ Inc.¼ ì
  3975. áááááMurra∙ Hill¼ Ne≈ Jersey¼ 1983.
  3976.  
  3977. 2. ááKernighan¼áá Briaεá W.¼áá anΣá Ritchie¼á Denni≤á M.¼á Thσá ├ ì
  3978. áááááProgrammingô Language¼ Prentice-Hall¼ Inc.¼ EnglewooΣ Cliffs¼ ì
  3979. áááááNe≈ Jersey¼ 1978.
  3980.  
  3981. 3.áá Handbooδá oµá Mathematica∞á Functions¼á Nationa∞á Burea⌡á oµ ì
  3982. áááááStandard≤á ApplieΣ Mathematic≤ Serie≤ #55¼á U.S«á Governmen⌠ ì
  3983. áááááPrintinτ Office¼ Washington¼ D.C.¼ 1964.
  3984.  
  3985. 4.á  Plum¼áá Thomas¼á ├á Programminτá Standard≤á anΣá Guidelines¼ ì
  3986. áááááVersioε ╒ (UNI╪ anΣ offspring)¼á Pluφ Hall¼á Inc.¼á Cardiff¼ ì
  3987. áááááNe≈ Jersey¼ 1982.
  3988.  
  3989. 5. ááCoty¼á Williaφ J.¼á Jr.¼ anΣ Waite¼ William¼ Softwarσ Manua∞ ì
  3990. áááááfo≥á thσá Elementar∙á Functions¼áá Prentice-Hal∞á Serie≤á iε ì
  3991. áááááComputationa∞ Mathematics¼á Prentice-Hall¼á Inc.¼á InglewooΣ ì
  3992. áááááCliffs¼ Ne≈ Jersey¼ 1980.
  3993.  
  3994. 6.á  J«á F« Hart¼ E« W« Cheney¼ C« L« Lawson¼ H« J« Maehly¼ C« K« ì
  3995. áááááMesztenyi¼á J« R« Rice¼ H« C« Thacher¼ Jr.¼ anΣ C« Witzgall¼ ì
  3996. áááááCompute≥ Approximations¼á Johε Wile∙ ª Sons¼ Inc.¼ Ne≈ York¼ ì
  3997. áááááNe≈ York¼ 1968.
  3998.  
  3999. 7.á  Schonfelder¼á J«á L.¼ Mathematic≤ oµ Computation¼ Volumσ 32¼ ì
  4000. áááááNo. 144¼ October¼ 1978, pp. 1232-1240.
  4001.  
  4002. 8.  áBlair¼á J«á M.¼á et« al.¼ "Rationa∞ Chebyshe÷ Approximation≤ ì
  4003. áááááfo≥ thσ Inversσ Erro≥ Function"¼ Mathematic≤ oµ Computation¼ ì
  4004. áááááVolumσ 30¼ No. 136¼ October¼ 1976.
  4005.  
  4006. 9.á  Wirth¼á Nicklaus¼á Algorithm≤á ½ Datß Structure≤ ╜ Programs¼ ì
  4007. áááááPrentice-Hall¼ Inc.¼ EnglewooΣ Cliffs¼ Ne≈ Jersey¼ 1976« 
  4008.  
  4009. 10.á Aho¼á AlfreΣ v.¼  Hopcroft¼ Johε E.¼ anΣ Ullman¼ Jeffre∙ D.¼ ì
  4010. áááááThσá Desigεá anΣ Analysi≤ oµ Compute≥á Algorithms¼á Addison-ì
  4011. áááááWesle∙ Publishinτ Company¼ Reading¼ Massachusetts¼ 1975¼ pp« ì
  4012. ááááá87-92.
  4013.  
  4014. 11.á Knuth¼á DonalΣá E.¼á Ar⌠ oµ Compute≥á Programming¼á Vol«á 2¼ ì
  4015. áááááSemi-Numerica∞áá Algorithms¼ááá Addison-Wesle∙ááá Publishinτ ì
  4016. áááááCompany¼ Reading¼ Massachusetts¼ 1973.
  4017.  
  4018. 12.ááTausworthe¼á R«á C.¼á "Randoφá number≤á generateΣ b∙á linea≥       ì
  4019. ááááárecurrencσ modul∩ two"¼á Mathematic≤ oµ Computation¼á Volumσ       ì
  4020. ááááá19¼ 1965¼ pp« 201-209.
  4021.  
  4022. 13.ááPurdom¼áá Jack¼á Thσá ├á Programmer'≤á Library¼á Quσá Corp.¼ ì
  4023. áááááIndianapolis, 1984.
  4024.  
  4025. è14.ááThσ ├ User'≤ Grou≡ Newsletters¼á McPhereson¼á K« S.¼ Vol« I¼ ì
  4026. áááááNo« 1¼ June¼ 1981¼ througΦ Vol« II¼ No« 6¼ March¼ 1985.
  4027.  
  4028. 15.ááPortablσá ├ Subroutinσá Library¼á Vol«á II¼á Je⌠á Propulsioε ì
  4029. áááááLaboratory, 1985.
  4030. .pß oè.PN 1
  4031. .FO                                B-#
  4032.                            B. I N D E X 
  4033. .FI B:USEGUIDE.IDX
  4034.