home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 14 Text / 14-Text.zip / ADVOS2.ZIP / ERRATA.TXT
Text File  |  1989-03-22  |  12KB  |  358 lines

  1.                         Advanced OS/2 Programming 
  2.  
  3.                   Errata and Supplementary Information
  4.  
  5.                              March 21, 1989
  6.  
  7.  
  8. This document lists the known errors in the 1st Printing of Advanced
  9. OS/2 Programming as of March 21, 1989, as well as certain
  10. supplementary information related to OS/2 version 1.1 that was not
  11. known by me at the time the book went to press.
  12.  
  13. You can tell which printing you own by looking at the reverse of the
  14. second title page (the first line on the page is "PUBLISHED BY." 
  15. About two-thirds of the way down the page, just after the line
  16. "Printed and bound in the United States of America," there is a
  17. series of numbers.  The first number on the line is the number of the
  18. printing.  For instance, in the first printing, the line says
  19.  
  20.         1 2 3 4 5 6 7 8 9  FGFG  3 2 1 0 9 8
  21.  
  22. In the second printing, the line will say
  23.  
  24.           2 3 4 5 6 7 8 9  FGFG  3 2 1 0 9 8
  25.  
  26. and so on.
  27.  
  28.  
  29. --------------------------------------------------------------------
  30.  
  31.  
  32. Page 16, 2nd paragraph, 2nd line, "OS2DOS.COM" should be "OS2KRNL"
  33.  
  34.  
  35. Page 24, second from last line on the page, delete the words
  36.  
  37.         "(Figure 2-10)"
  38.  
  39. in that line, they make no sense here since Figure 2-10 is the
  40. memory map for a protected mode-ONLY system.
  41.  
  42.  
  43. Page 36, caption for figure 4-7, "SCLIBC.LIB" should be "SLIBC.LIB"
  44.  
  45.  
  46. Page 74, 5th paragraph (just below the italic paragraph that begins
  47. with "Note"), REMOVE Ctrl-Break from the list in the second sentence.
  48.  
  49.  
  50. Page 81, program listing in figure 5-7, insert the line
  51.  
  52.         kaction dw      0       ; receives DosOpen action
  53.  
  54. after the 2nd line of the listing (i.e. between the declaration of
  55. the 'khandle' and 'oldmode' variables).
  56.  
  57.  
  58. Page 102, under the second full paragraph, art department lost some
  59. stuff here, it should read
  60.  
  61.         <Esc>[s         save cursor position
  62.         <Esc>[u         restore cursor to saved position
  63.  
  64.  
  65. (added 2/6/89)
  66. Page 104, third line under "Miscellaneous Functions" in figure 6-6,
  67. VioScrLock should have a double-dagger, not a single-dagger.
  68.  
  69.  
  70. Page 107, figures 6-9 and 6-10, art department got the two figures
  71. backwards.  The diagram in figure 6-9 belongs to figure 6-10 and vice
  72. versa.
  73.  
  74.  
  75. Page 162, 1st paragraph, 2nd line, delete the words
  76.  
  77.         "and the DUMP.DEF file (Figure 8-13)"
  78.  
  79. because the .DEF file is not needed for the C version of the program.
  80.  
  81.  
  82. Page 195, last line of the paragraph under the heading "Reserved
  83. Area", "page 196" should be "page 192"
  84.  
  85.  
  86. Page 201, the first three words on the page "Fixed Disk Partitions"
  87. are supposed to be the page heading.  This was OK on galleys, don't
  88. know what happened to it!
  89.  
  90.  
  91. Page 202, figure 10-10, the solid line around the byte at 01BFH
  92. should properly also include the byte at 01BEH, since the first
  93. partition entry is bytes 01BEH through 01CDH.
  94.  
  95.  
  96. (added 2/7/89)
  97. Page 215, art for figure 11-6 should be modified as follows:
  98.  
  99.  F  E  D  C  B  A  9  8  7  6  5  4  3  2  1  0 
  100. -------------------------------------------------
  101. |                                   |  |  |  |  |
  102. -------------------------------------------------
  103.                     |                 |  |  |  |
  104.                     |                 |  |  |  |
  105.                     |                 |  |  |  |
  106.                     |                 |  |  |  -- shareable with
  107.                     |                 |  |  |     DosGiveSeg
  108.                     |                 |  |  |
  109.                     |                 |  |  ----- shareable with
  110.                     |                 |  |        DosGetSeg
  111.                     |                 |  |
  112.                     |                 |  -------- discardable
  113.                     |                 |
  114.                     |                 ----------- if shareable, may
  115.                     |                             be reduced in size
  116.                     |                             (version 1.1)
  117.                     |
  118.                     ----------------------------- reserved
  119.  
  120.  
  121. The "may be reduced in size" meaning of bit 3 is the only thing new
  122. here.  This description for bit 3 first turned up in the IBM Tech Ref
  123. for OS/2 1.1.  We didn't have any information about this prior to
  124. receiving the final printed Tech Ref, unfortunately.
  125.  
  126.  
  127. Page 220, 2nd paragraph under the subhead "Discardable Segments", 3rd
  128. sentence: the current versions of OS/2 (1.0 and 1.1) do NOT discard
  129. segments before swapping nondiscardable segments; the two types are
  130. lumped together and discarded or swapped on an LRU basis.  This may
  131. change in future versions however.
  132.  
  133.  
  134. Page 233, last paragraph, 1st sentence, the situation with
  135. DosKillProcess is actually somewhat more complex than the description
  136. here.  A DosKillProcess issued against any SPECIFIC process ID (i.e.
  137. with the "action code" = 1) will work regardless of whether or not
  138. the target process is "orphaned."  However, a DosKillProcess with 
  139. action code = 0 will ignore descendant processes that are orphaned.
  140.  
  141.  
  142. Page 240, 2nd full paragraph (starting with "The pathname must..."),
  143. REPLACE the last two sentences of this paragraph with the following
  144. text:
  145.  
  146.         "In OS/2 version 1.0, the initial process in a session inherits
  147.         an empty environment, and its current disk and directory are
  148.         the root directory of the boot drive.  In OS/2 version 1.1,
  149.         the environment, current disk, and current drive of the first
  150.         process in a new session are under the control of the parent
  151.         process."
  152.  
  153.  
  154. Page 240, last paragraph on the page, first sentence, change "The
  155. other parameters..." to "Other parameters..."
  156.  
  157.  
  158. Page 244, 4th full paragraph on the page, 4th line, change
  159.  
  160.         "... search for EXE, COM, and BAT files..."
  161.  
  162. to
  163.  
  164.         "... search for COM, EXE, and CMD files..."
  165.  
  166.  
  167. Page 288, third bulleted item, change
  168.  
  169.         "Each record in a queue is a separately allocated..."
  170.  
  171. to
  172.  
  173.         "Each record in a queue can be a separately allocated..."
  174.  
  175.  
  176. Page 298, figure 13-14, 5th line of the listing (not counting blank
  177. lines), an important comma got dropped!  The line should look like:
  178.  
  179.  "(unsigned, int), unsigned long far *, unsigned far *, int, int);"
  180.  
  181.  
  182. Page 303, last line on the page, change
  183.  
  184.         "...because they have a special call gate that..."
  185.  
  186. to
  187.  
  188.         "...because they reside in segments with a special 
  189.         attribute that lets..."
  190.  
  191.  
  192.  
  193. Page 320, figure 15-4, 5th line of the listing, 
  194.  
  195.         "cseg" should be "csec"
  196.  
  197. (this doesn't really affect anything in the listing luckily)
  198.  
  199.  
  200. Page 364, figure 17-14, the info for 8" disks (which is for
  201. historical interest only) got all confused here.  It should be
  202.  
  203.         0FDH    8", 2-sided, single-density
  204.  
  205.         0FEH    8", 1-sided, single-density
  206.                 8", 1-sided, double-density
  207.  
  208. Yes, it is strange that they assigned the same medium ID byte to
  209. both single- and double-density 1-sided 8" disks.  But that's the
  210. facts.  The disk driver was expected to try and read a new disk
  211. in double-density first, then fall back to single-density if the
  212. read failed.
  213.  
  214.  
  215. Page 392, last paragraph, if you use the sequence VerifyAccess then
  216. Lock as described here, you must be sure to use the non-blocking form
  217. of the Lock call.  This is because when you use the blocking Lock,
  218. you are explicitly allowing the possibility of a context switch, so
  219. the result of the previous VerifyAccess call could become invalid
  220. before the Lock operation completes.  Alternative strategies would be
  221. either (1) blocking-Lock then VerifyAccess, or (2) VerifyAccess,
  222. blocking-Lock, then reconfirm the VerifyAccess.  
  223.  
  224.  
  225. Page 490, last little grey box on the left, "functions" is misspelled
  226.  
  227.  
  228. (added 2/6/89)
  229. Page 502, entry for DosAllocHuge, in description of the 5th parameter,
  230. replace the line
  231.  
  232.         "3-15   Reserved (0)"
  233.  
  234. with
  235.  
  236.         "3      If segment is shared, it may be reduced in size
  237.                 with DosReallocHuge (version 1.1 and later)
  238.          4-15   Reserved (0)"
  239.  
  240.  
  241. (added 2/6/89)
  242. Page 503, entry for DosAllocSeg, in description of the 3rd parameter,
  243. replace the line
  244.  
  245.         "3-15   Reserved (0)"
  246.  
  247. with
  248.  
  249.         "3      If segment is shared, it may be reduced in size
  250.                 with DosReallocSeg (version 1.1 and later)
  251.          4-15   Reserved (0)"
  252.  
  253.  
  254.  
  255. Page 545, additional info on DosPTrace for OS/2 1.1 became available
  256. to me after the book went to the printer.  
  257.  
  258. In the first bulleted note, add the codes
  259.  
  260.         11H     Thread status
  261.         12H     Map read-only memory alias
  262.         13H     Map read/write memory alias
  263.         14H     Unmap memory alias
  264.  
  265. In the 2nd bulleted note, add the codes
  266.  
  267.         -10     thread termination
  268.         -11     asynchronous stop
  269.         -12     new process
  270.         -13     alias free
  271.  
  272.  
  273. Page 550, entry for DosQHandType, change the description of the 
  274. third parameter to:
  275.  
  276.         "PTR WORD       If handle type = 1 (device), receives the
  277.                         attribute word from the header of the
  278.                         corresponding device driver; if handle type
  279.                         = 2 (pipe), receives pipe type (0 = normal,
  280.                         1 = read-only)"
  281.  
  282.  
  283. Page 551, 3rd parameter for DosQNmPipeInfo, should be
  284.  
  285.         WORD    Length of buffer to receive pipe information
  286.  
  287. i.e. the "PTR WORD" should be "WORD"
  288.  
  289.  
  290. Page 555, entry for DosReallocHuge, add a new bulleted note:
  291.  
  292.         "*  [1.0]  Shared segments can be increased but
  293.             not decreased in size."
  294.  
  295.  
  296. Page 556, first bulleted note at the top of the page (tail end of the
  297. entry for DosReallocSeg) should read
  298.  
  299.         "*  [1.0]  Shared segments can be increased but
  300.             not decreased in size."
  301.  
  302. i.e. add a "[1.0]" icon to the bulleted note.
  303.  
  304.  
  305. Page 569, notes for DosStartSession, first bulleted note on this
  306. page, REPLACE with the following:
  307.  
  308.         "[1.0]  The environment of the initial process in the child
  309.          session is empty; that is, it consists of a pair of zero
  310.          bytes.  The parent's handles, current disk, and current
  311.          directory are not inherited."
  312.  
  313.  
  314. Page 599, entry for VioGetBuf, remove the "[FAPI]" icon from the
  315. function header.  This function is FAPI in OS/2 version 1.0 but not
  316. in version 1.1.
  317.  
  318.  
  319. Page 611, entry for VioScrLock, the "No PM" icon is missing from the
  320. header for this function.
  321.  
  322.  
  323. Page 617, entry for VioShowBuf, remove the "[FAPI]" icon from the
  324. function header.  This function is FAPI in OS/2 version 1.0 but not
  325. in version 1.1.
  326.  
  327.  
  328. Page 672, 2nd bulleted note for Lock, see the discussion above for
  329. page 392.
  330.  
  331.  
  332. Page 692, 1st bulleted note for VerifyAccess, see the discussion
  333. above for page 392.
  334.  
  335.  
  336. Page 723, 2nd table on the page, next to last line, missing left
  337. parenthesis... should look like
  338.  
  339.         "(if bit 15 = 0)"
  340.  
  341.  
  342.  
  343. ----------------------------------------------------------------------
  344.  
  345. I would be grateful if readers would bring any other errors they
  346. notice to my attention so I can add them to this list and fix them in
  347. subsequent printings.                         
  348.                                                 --- Ray Duncan
  349.  
  350. My electronic mail addresses are:
  351.  
  352. CompuServe      72406,1577 or 72241,52
  353. MCI Mail        lmi
  354. BIX             rduncan
  355.  
  356. ----------------------------------------------------------------------
  357.  
  358.