home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / hp / 14631 < prev    next >
Encoding:
Internet Message Format  |  1993-01-07  |  3.7 KB

  1. Path: sparky!uunet!olivea!spool.mu.edu!think.com!sdd.hp.com!hpscit.sc.hp.com!hplextra!hpfcso!hpcss01!hpcuhe!dhandly
  2. From: dhandly@hpcuhe.cup.hp.com (Dennis Handly)
  3. Newsgroups: comp.sys.hp
  4. Subject: Re: Bad escape codes on 9000/720?
  5. Message-ID: <31480307@hpcuhe.cup.hp.com>
  6. Date: 7 Jan 93 04:00:05 GMT
  7. References: <1993Jan5.170026.16862@brtph560.bnr.ca>
  8. Organization: Hewlett-Packard Cal Language Lab
  9. Lines: 79
  10.  
  11. >From: rjohns@brtph46.BNR.CA (Richard Johns P205)
  12. >Ok, some more investigation and I find that there's a Pascal include file,
  13. >/usr/include/pasesc.ph, that maps these "huge numbers" to reasonable numbers.
  14. >For example, escape code 39321792 maps to error PasErr_600, which means I can 
  15. >look up error 600 in /usr/lib/paserrs.  SO, NOW:
  16.  
  17. >1.  What's with these funny escape codes?  What good are they?
  18.  
  19. They uniquely indicate that these are Pascal runtime errors vs. some other
  20. runtime library.  And on MPE/iX they indicate which part of the OS the
  21. error occurs, i.e. which Subsystem.
  22.  
  23. >2.  What's the recommended way of translating the constant PasErr_600 (which is
  24. >    39321792) to 600 so I can look it up in the error message file?  Do I have 
  25. >    to write a giant case statement?
  26.  
  27. You mean you didn't try to do a linear curve fit?  :-)
  28.  
  29. You just do:  x div hex('10000');  Provided that x mod hex('10000') = 192.
  30.  
  31. >3.  Is there anything useful I can do with the error message catalog,
  32. >    /usr/lib/nls/$LANG/pc_msgs.cat?
  33.  
  34. The file /usr/lib/paserrs is an ascii version of that file.  It states that:
  35. $  categories:
  36. $    600-799   (4)   run-time errors
  37.  
  38. Which means that message set 4 contains the errors.
  39.  
  40. >4.  Why isn't any of this explained in the 700 series HP Pascal Reference or 
  41. >    HP Pascal Programmer's guide?  One would think it'd be mentioned with the 
  42. >    escape code stuff, at least.  Or under "Error Messages", or something.
  43.  
  44. This is documented in the Pascal Programmer's Guide in Chapter 11 under
  45. ESCAPECODE Function and again under XLIBTRAP intrinsic.  The later
  46. show the use of one of these escapecode/errorcodes.
  47.  
  48. (Both at least mention the name of the file and what it contains.)
  49.  
  50. The detailed mapping of the fields is documented in the MPE/iX intrinsic
  51. manual and in the Trap Handling Programmer's Guide, 32650-90026 chapter 5.
  52. (This manual is mentioned in the Pascal PG, though it's addressed for
  53. the MPE/iX audience.)
  54.  
  55. At one time I was going to change the pasesc.ph file to be more obvious:
  56.  
  57.  pascal_subsystem = 192;
  58.  PasErr_600       = 600 * hex('10000') + pascal_subsystem;
  59.  PasErr_HeapExhausted = paserr_600;
  60.  
  61. Would that be documentation enough?????
  62.  
  63. --------------
  64. >// shankar@sgi.com (Shankar Unni) /  1:52 pm  Jan  5, 1993 /
  65. >> 2.  What's the recommended way of translating the constant PasErr_600?
  66. >The exact encoding is an artifact of the system error encoding in the
  67. >MPE/iX operating system, where the *lower* half (16 bits) is a
  68. >"subsystem number", and the *upper* half is the error number.  Seems
  69. >a**-backward, and I never got a good explanation from anyone why it
  70. >was done that way.
  71.  
  72. Because the upper half is a signed number and this allows you to look
  73. at the 32 bit value and quickly determine if there is no error, 0,
  74. an error (negative) or a warning (positive).
  75. NOTE: Pascal's errors are positive only.  Only MPE/iX uses the sign
  76. notation.
  77.  
  78. This all has to do with MPE/iX's fancy Error management subsystem.
  79.  
  80. >> 3.  Is there anything useful I can do with the error message catalog,
  81. >>     /usr/lib/nls/$LANG/pc_msgs.cat?
  82.  
  83. >If I remember right, the /usr/lib/nls/$LANG/pc_msgs.cat catalog has
  84. >the text for the errors in pasesc.ph. If you know how to read a
  85. >message catalog, you can retrieve the text for these messages from
  86. >there.  I *think* the message set number (for catread/catgetmsg et. al.)
  87. >is "5".
  88.  
  89. No, 4.
  90.