sg2s+@andrew.cmu.edu (Sean Michael Goller) (09/24/90)
Small question for everyone in netland: I'm using my mac to write unix programs, then move the code there and do final compilation. The problem is this: Think C mentions a function ccommand() with should be called like so: argc = ccommand(&argv); which should simulate command-line parameters in unix. However, they don't detail where this function is....they say it's in the console library, but it's not on the disks with the package! I have both ANSI and unix packages loaded, and Think C just barfs on ccommand...... I've got Version 4.0.0. Sean.
brian%cirrusl@oliveb.ATC.olivetti.com (Brian Feinberg) (09/28/90)
In <AazI82O00Uh_81z45e@andrew.cmu.edu> sg2s+@andrew.cmu.edu (Sean Michael Goller) writes: >I'm using my mac to write unix programs, then move the code there and do >final compilation. The problem is this: Think C mentions a function >ccommand() with should be called like so: >argc = ccommand(&argv); >which should simulate command-line parameters in unix. However, they >don't detail where this function is....they say it's in the console >library, but it's not on the disks with the package! (etc) Have you included <console.h>? -- Brian Feinberg -- Brian Feinberg <brian%cirrusl@oliveb.ATC.olivetti.com> UUCP: oliveb!cirrusl!brian -- Brian Feinberg <brian%cirrusl@oliveb.ATC.olivetti.com> UUCP: oliveb!cirrusl!brian
sg2s+@andrew.cmu.edu (Sean Michael Goller) (09/28/90)
Ok. I forgot to mention that yes, I had included console.h The error results when I try to Run it...everything compiles fine. Based on email response, I think it's the fact that I didn't have MacTraps included on the library level.... Sean.
tim@maths.tcd.ie (Timothy Murphy) (09/28/90)
In <AazI82O00Uh_81z45e@andrew.cmu.edu> sg2s+@andrew.cmu.edu (Sean Michael Goller) writes: >Small question for everyone in netland: >I'm using my mac to write unix programs, then move the code there and do >final compilation. The problem is this: Think C mentions a function >ccommand() with should be called like so: >argc = ccommand(&argv); >which should simulate command-line parameters in unix. However, they >don't detail where this function is....they say it's in the console >library, but it's not on the disks with the package! I have both ANSI >and unix packages loaded, and Think C just barfs on ccommand...... Have you tried #include <console.h> The function ccommand is mentioned in my THINK C 'Standard Libraries' manual. It is in a section called 'console'. I imagine that is there used to be a 'console' library, which is now included in the ANSI library. I do find this 'ccommand' business a nuisance. It means that virtually every C program has to be modified on porting to the Mac. I assume the reason is that one 'ought' to use the Mac interface, but life is too short ... -- Timothy Murphy e-mail: tim@maths.tcd.ie