home *** CD-ROM | disk | FTP | other *** search
- From: dnebing@andy.bgsu.edu (Dave Nebinger)
- Subject: Log file routines
-
- Here's a nice little, tiny, documented chunk of code for handling
- the creation and use of log files in your project. It works great
- for those hard to debug items like bg-apps, inits, etc.
-
- There are actually two different items here. The first is a bugfix
- for the LogLib library that came out earlier. The second item is
- new. It is a component which implements the logging functions.
-
- For those of you that don't know what a component is, here's a quick
- and dirty explanation. Components are tiny extensions which the
- Component Manager takes care of. All you, as a programmer, have to
- do is open the component and by using the value returned by the
- Component Manager you can use the library just like it was part of
- your application, yet the code doesn't exist in your app. The
- Component Manager is part of QuickTime, AppleScript, and (supposedly)
- System 7.1 and up.
-
- The code for the component and a test application showing how to use
- the component is included. Also included are compiled versions of
- both so you can see how the component works (drop the component in
- the extension folder and restart before using the application).
-
- The component is a full component which handles all of the Component
- Manager functions. It also will draw it's own icon at startup time
- (Wow, cool! ;)
-
- As part of the test application, there is also files called
- "Libsprintf.c/h" which are a standalone sprintf code (no ANSI/ANSI-small
- libs necessary!). Read the beginning of the file for more info.
-
- The code was written/compiled using Think C 7.0.3 with both the old headers
- and the new universal headers. I took advantage of the fact that in
- "Mac #includes.c" for the universal headers there is a constant defined as
- NEW_HEADERS_AVAILABLE. If you are using the universal headers with a
- different compiler that doesn't define this constant, just add the following
- line somewhere: #define NEW_HEADERS_AVAILABLE 1. If you don't have
- the universal headers, you don't have anything to worry about.
-
- This is all copyrighted to me (Dave Nebinger). Feel free to email me with
- your questions and comments. Also drop me a line if you plan to use
- the routines (I am just curious ;-)
-
- Dave Nebinger.
-
-