home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / c / 20070 < prev    next >
Encoding:
Text File  |  1993-01-22  |  1.4 KB  |  37 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!mcsun!news.funet.fi!hydra!klaava!wirzeniu
  3. From: wirzeniu@klaava.Helsinki.FI (Lars Wirzenius)
  4. Subject: Re: HALLOC and HUGE ptrs in Microsoft C
  5. Message-ID: <1993Jan22.144653.24939@klaava.Helsinki.FI>
  6. Organization: University of Helsinki
  7. References: <1993Jan21.175608.4279@arizona.edu>
  8. Distribution: world,local
  9. Date: Fri, 22 Jan 1993 14:46:53 GMT
  10. Lines: 25
  11.  
  12. jjr@ace.ece.arizona.edu (Jeffrey J. Rodriguez) writes, about using
  13. arrays larger than 64 kB under MS-DOS (notoriously an awkward
  14. problem):
  15.  
  16. >This sure seems cumbersome.  It also seems that a program written for
  17. >PC-DOS using halloc and huge ptrs would not run on a Sun running
  18. >UNIX.  So much for portable C.
  19.  
  20. Quite.  The approaches I have followed are (more or less in the order
  21. of preference):
  22.  
  23. a) forget about DOS machines and write the code under Unix
  24. b) use a compiler under DOS that doesn't require halloc or other
  25.    monstrosities for >64 kB arrays (djgpp is my choice)
  26. c) don't use >64 kB arrays
  27.  
  28. I avoid halloc and huge pointers and other compiler-specific methods
  29. like the plague they are.  Not only are they non-portable, they would
  30. require me to learn and understand them first (lazy, ain't I?), and to
  31. have to rely on the compiler to get things right while I'm not very
  32. certain that I have understood things correctly.
  33.  
  34. --
  35. Lars.Wirzenius@helsinki.fi  (finger wirzeniu@klaava.helsinki.fi)
  36.    MS-DOS, you can't live with it, you can live without it.
  37.