Search results

  1. Crutch

    ThinkC [Study Group 2] - Events & Menu Management

    No AppleEvent in System 6. MultiFinder makes applications quit by trickily faking a mouse click in the menubar, then a MenuSelect patch that tricks the application into thinking “Quit” was chosen. So under MultiFinder your normal “Quit” code should get triggered when the system is trying to...
  2. Crutch

    Strive not to be a success, but rather to be of value.

    Thanks for that thoughtful post JDW. However - am I’m just a new guy here, with zero axe to find whatsoever! - as a matter of principle, democracy only works if there is transparency regarding the people for whom one is or isn’t voting. Mr. F has alleged pretty bad behavior by some nameless...
  3. Crutch

    ThinkC [Study Group 2] - Events & Menu Management

    This works for me in THINK C 6 under 7.5.5 — I see the menu bar flash, then the stdio runtime does make me press Return before quitting. Don’t forget to set ”Accepts High-Level Events” in Set Project Type —> Flags.
  4. Crutch

    ThinkC [Study Group 2] - Events & Menu Management

    Got it. Theory: the THINK C console runtime is eating your AppleEvent. What happens if you instead build a test app that doesn’t use stdio?
  5. Crutch

    ThinkC [Study Group 2] - Events & Menu Management

    I’m a little confused by what you are looking for Eric. To my reading, if working correctly, and you are running your app while you shut down the computer or quit the app, it will printf(“got hle”) then immediately quit. Are you sure you are letting it run long enough post-shutdown to visually...
  6. Crutch

    ThinkC [Study Group 2] - Events & Menu Management

    Right, I would probably just do if (noErr != Gestalt(gestaltAppleEventsAttr, &feature) || !(feature & (kGestaltMask << gestaltAppleEventsPresent))) { // show error, can't use AppleEvents } If Gestalt won’t let you ask about a thing, it’s safe to assume that thing doesn’t exist. In...
  7. Crutch

    ThinkC [Study Group 2] - Events & Menu Management

    Yeah I‘m assuming the assert function pops up a fatal death error then calls ExitToShell if the first parameter is false.
  8. Crutch

    ThinkC [Study Group 2] - Events & Menu Management

    Wow, was I wrong about the smart linker? How was sprintf() taking 6K of code? Regarding quickie string cat’ing, here’s how I would do it (not tested…. I know I know … and I think totally equivalent to yours) void StringCat(Str255 a, Str255 b) // append b onto a { assert(a[0] + b[0] <...
  9. Crutch

    ThinkC [Study Group 2] - Events & Menu Management

    This is such a cool idea, I am excited to try it out. Some possibly useful info: 3. Your smart linker should rip out everything in ANSI-small except sprintf() so this shouldn’t actually cost you much space. But yes, I would do it differently. Either create a dummy string (Str255 s =...
  10. Crutch

    ThinkC [Study Group 1] Drawing on the Macintosh

    Just checked this in the 2nd edition of Knaster’s Macintosh Programming Secrets and he confirmed my suspicions. You could use _NewGWorld etc. under System 6 (maybe even earlier), you just needed the 32-bit “Color QuickDraw” INIT in your System Folder. System 7 just made these routines...
  11. Crutch

    ThinkC [Study Group 1] Drawing on the Macintosh

    Try &qd.thePort (and, if calling _FillRect, &qd.black)
  12. Crutch

    ThinkC [Study Group 1] Drawing on the Macintosh

    I am not sure but actually think NewGWorld etc. was added in (maybe certain versions of?) System 6. I’d love to find out. Edit: I mean of course I could just try it with every system version. But that’s tiresome ….
  13. Crutch

    MicroMac 68030 in a Mac 128K?

    You can get up to 2MB on a MonsterMac. But (purist alert maybe, sorry!) I would argue then you are no longer accelerating a 128K. The only thing that distinguishes a 128K from a 512K Mac is how much (or little) memory it has. If you add memory to a 128K Mac so it has half a meg of RAM then...
  14. Crutch

    MicroMac 68030 in a Mac 128K?

    I love the Monster Mac. I think I toasted mine somehow. Have wanted to get my hands on a second board forever. The 128K Mac can’t use the 128K ROM without a memory upgrade. There isn’t enough room for HFS, IIRC. So your only way to use that MicroMac accelerator with 128K ROMs in a 128K Mac...
  15. Crutch

    MicroMac 68030 in a Mac 128K?

    That’s one of these https://www.micromac.com/products/performer.html I doubt it works in a 128K. It’s listed on the manufacturer’s website as needing at least a Plus. I nonspecifically recall that the 64K ROMs can’t support an 030. I have a Total Systems Gemini in my 128K and it wouldn’t run at...
  16. Crutch

    ThinkC Equivalent to "dir *.PICT"

    Use PBGetCatInfo(). Pass in a volume reference number you get from GetVol(), this will be the working directory your application is in. Pass in ioFDirIndex = 1 and then increment from there until you get an error (if you run out of files, you will get an fnfErr back from PBGetCatInfo). Each...
  17. Crutch

    ThinkC Think C 6 and System 7.6.1...

    Totally agree w/ @eric , but would add don’t use Basilisk for 68K coding. It can’t run Macsbug, which is essential if you’re sufficiently serious. Mini vMac is your best bet in my experience. THINK C 6 is extremely solid on Mini vMac emulating a 4MB Mac II.
  18. Crutch

    ThinkC Dividing two unsigned long int to double?

    My money is on compiler error. Trying it with 0 + 0 ….. And by the way, if I enable “generate 68881 code” in Compiler Options it works fine, so I think something is wrong with the way THINK 6 is calling SANE.
  19. Crutch

    ThinkC Dividing two unsigned long int to double?

    Well I don’t really know how the _FP68K package works absent reading the Apple Numerics Guide or something, but the disassembly is pretty opaque. It’s pushing pointers to the params, then pushing an opcode and calling _FP68K (twice, in the first ‘d1’ example … presumably the first time to...
  20. Crutch

    ThinkC Dividing two unsigned long int to double?

    I have no idea what’s up here but I think THINK C 6 is having trouble adding a double to an unsigned long. Look: