home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 13056 < prev    next >
Encoding:
Text File  |  1992-07-27  |  1.5 KB  |  46 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.iastate.edu!niko
  3. From: niko@iastate.edu (Nikolaus E Schuessler)
  4. Subject: Re: THINK C 5.0 Code overflow
  5. Message-ID: <1992Jul27.172249.17584@news.iastate.edu>
  6. Keywords: error,C programming, THINK C 5.0, Mac
  7. Sender: news@news.iastate.edu (USENET News System)
  8. Organization: Iowa State University, Ames, IA
  9. References: <1992Jul27.160800.18222@cs.few.eur.nl>
  10. Date: Mon, 27 Jul 1992 17:22:49 GMT
  11. Lines: 33
  12.  
  13. In article <1992Jul27.160800.18222@cs.few.eur.nl> christ@cs.few.eur.nl (Christ Leijtens) writes:
  14.  
  15. >         Question: Is there *any* way to get around this  bound  for
  16. >   the  code and data, so we can continue porting the program to the
  17. >   Macintosh? We would like any information on porting programs from
  18. >   other implementation of the C-language to Macintosh THINK C 5.0.
  19. >
  20.  
  21. Yes, there is... You have to declare all arrays as pointers to arrays
  22. and malloc them in a routine at the start of your program... A * real *
  23. pain ...
  24.  
  25. char x[1000];
  26.  
  27. to char *x;
  28.  
  29. ...
  30.  
  31. x = (char *) malloc(1000 * sizeof(char))
  32.  
  33. >-- 
  34. >    e-mail:    christ@cs.few.eur.nl          _(.~\  ____
  35. >           christ@sus.eur.nl         /_|  /_/\/\/\__ 
  36. >                                                > _/\/\/\/\/
  37.  
  38.  
  39. Like your turtle ...
  40.  
  41. -- 
  42. Niko Schuessler               
  43. Project Vincent Systems Manager              email: niko@iastate.edu
  44. Iowa State University Computation Center     voice: (515) 294-1672
  45. Ames IA 50010                                snail: 272 Durham 
  46.