home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-08 | 1.4 KB | 63 lines | [TEXT/KAHL] |
- //
- // This is a hack which makes usagelogger compile under
- // both the old and the universal headers.
- //
- #if !NEW_HEADERS_AVAILABLE
- #define AEEventHandlerUPP EventHandlerProcPtr
- #endif
-
- typedef struct TimeStampInfo
- {
- unsigned long starting_time;
- OSType theType;
- short theFile;
- } TimeStampInfo;
-
- typedef struct config
- {
- OSType prefsFolderType;
- OSType logFileCreator;
- } config;
-
- typedef pascal OSErr AEventHandler(
- AppleEvent *theAppleEvent, AppleEvent *replyAppleEvent, long refCon);
-
- AEventHandler DoAEOpenApplication;
- AEventHandler UnhandledAEvent;
- AEventHandler DoAEQuitApplication;
- AEventHandler DoAEFlushLog;
- AEventHandler DoAELogText;
-
- #define DoAEOpenDocuments UnhandledAEvent
- #define DoAEPrintDocuments UnhandledAEvent
-
- OSErr InitAppleEventsStuff( Boolean *quitFlag, long foundVRefnum, short theFile);
-
- void main( void);
-
- void basicTimeStamp( short theFile, OSType theType, long now);
- void TimeStamp( short theFile, OSType theType);
-
- void NotifyUserAndQuit( const short messageno);
-
- pascal void myResponse( NMRecPtr theNMRec);
-
- OSErr writeChar( short defile, char theletter);
-
- #define writeATab(theFile) (void)writeChar( theFile, '\t')
- #define writeAReturn(theFile) (void)writeChar( theFile, '\n')
- #define writeASpace(theFile) (void)writeChar( theFile, ' ')
-
- OSErr writePString( short theFile, StringPtr string);
- //
- // 'STR ' resource numbers:
- //
- enum
- {
- needsAppleEvents = 128,
- handlerInstallFailed,
- couldNotSetDirectory,
- outputFileOpenError,
- logFileName
- };
-