home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.26 / text0035.txt < prev    next >
Encoding:
Text File  |  1992-02-21  |  3.5 KB  |  77 lines

  1. Submitted-by: lewine@cheshirecat.webo.dg.com (Donald Lewine)
  2.  
  3. Look, one of us is being quite dense here and I don't think it is me.
  4. I am open to the possibility that I am grossly misunderstanding you, 
  5. but I doubt it. . .
  6.  
  7. In article <1991Dec2.213327.6156@uunet.uu.net>, jfh@rpp386.cactus.org (John F Haugh II) writes:
  8. |> I did read it again - and the question remains, what if I do (for some
  9. |> God awful reason) specify ISTRIP to my terminal handler?  In an
  10. |> environment where that can't POSSIBLY be a useful action, how should
  11. |> the system react?
  12. The same way the system reacts to any stupid action.  What if (for some
  13. God awful reason), I specify exit() where I mean printf()? Or I type
  14. "rm" when I mean "ls"?  The result is bad, I admit it.  It is less bad
  15. than my stomping on the gas in my car instead of the break.  They are
  16. all errors.  The world provides for countless damage due to user 
  17. errors.  In the grand scheme of things, ISTRIP is far less dangerous
  18. than, say, "I did not know the gun was loaded."
  19.  
  20. |> 
  21. |> >How?  I assure you that ISTRIP (or its equivalent) is not getting
  22. |> >mysteriously turned on on any of the systems I use; my terminal uses
  23. |> >an 8-bit binary packet protocol and I have never seen it broken by a
  24. |> >sudden shift into ISTRIP mode.  If your system has such a bad bug,
  25. |> >you should get the bug fixed rather than rail against the availability
  26. |> >of an often-useful feature.
  27. |> 
  28. |> This has nothing to do with SYSTEM supplied software.  I can control
  29. |> the system software to never ever turn that feature on - that's the
  30. |> easy part.  The hard part is doing the same for the end user.  My
  31. |> claim (read this real carefully) is that the USER is being given a
  32. |> means of shooting themselves in the foot which serves no useful
  33. |> purpose.  For a system which requires 8-bit data, ISTRIP is never
  34. |> an "often-useful feature".  It is a completely meaningless and
  35. |> destructive data transformation. 
  36. As I think about, ISTRIP is one of the more benign ways to screw
  37. up a call to tcsetattr().  There are many ways which will leave you
  38. terminal hung in a state where there is nothing you can do (at least from
  39. that terminal) to fix it.
  40.  
  41. |> It isn't benign like XTABS, or
  42. |> XCASE or even the Model 37 carriage delays (which are completely
  43. |> harmless to all but the impatient).  Transforming 0x81 to 0x01 is
  44. |> WRONG and can't be made "right" somehow.  If you wish to reply,
  45. |> please address that point.
  46. I don't claim there is any way to make it "right."  I claim that 
  47. setting the ISTRIP bit is only one of thousands of errors a user can
  48. make.  I also claim that it is a relatively minor error that is 
  49. fairly easy to debug.
  50.  
  51. It is no worse than the programer writing:
  52.     ch &= 0x7f;
  53. when he ment:
  54.     ch &= 0xff;
  55.  
  56. It is a lot less of a problem than typing "rm" instead of "ls".  I
  57. know of people who have done that.  I know of no one who ever turned
  58. on ISTRIP by accident.
  59.  
  60. NOTE: Calling tcsetattr() with a bad pointer can cause much more
  61.       grief than merely setting ISTRIP.
  62.  
  63. In short, a program can set ISTRIP by mistake and cause incorrect
  64. operation.  This error is not on the top 100 programming errors list
  65. and is not worth the net bandwidth we have already given it!
  66.  
  67. --------------------------------------------------------------------
  68. Donald A. Lewine                (508) 870-9008 Voice
  69. Data General Corporation        (508) 366-0750 FAX
  70. 4400 Computer Drive. MS D112A
  71. Westboro, MA 01580  U.S.A.
  72.  
  73. uucp: uunet!dg!lewine   Internet: lewine@cheshirecat.webo.dg.com
  74.  
  75. Volume-Number: Volume 26, Number 37
  76.  
  77.