Hacker News new | past | comments | ask | show | jobs | submit login

That 4 byte lookup's useful. I needed to do it recently and had assumed it wasn't possible.

If memory serves, CodeWarrior for Mac (and possibly other classic Mac compilers) had syntactic sugar mapping single-quoted four-character strings to the ubiquitous OSType. Something like:

    OSType creatorCode = 'TTXT';
where OSType was typedef'd to uint32.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: