Grant's CGI Framework
Version History
Important: When updating your code from a previous
version of the framework, you definitly need to make sure that you
update your copy of the file "MyConfiguration.h" to include all the new
configuration options. If you don't, various bits of code simply won't
be compiled/included in your application!
Also make sure you add new files
(where appropriate) in the release to your project files! Otherwise you
may be missing crucial resources or functions.
Version 2
- Implemented the W*API part of 'CGIGetServerFSSpec' (CGI support is on the to do list).
- Tested with 'Spotlight' from Onyx Technology
(it passed!).
- Appearance Manager is now optional. New conifguration option (in "MyConfiguration.h")
'kCompileWithAppearanceManager'. Turn it off if you don't have the Appearance Manager
SDK files, or if you don't want to support the Appearance Manager
(you'll need to remove the "AppearanceLib" from the "Libraries" group in the "Files"
view in the project window).
- Changed WSAPI 68K target to use A4 libraries, and CGI 68K to use non-A4 libraries.
- Added preliminary OpenTransport support (thouroughly untested).
Reworked the internals in the TCP module. Moved the MacTCP code to a separate sub-module.
- Moved memory access to new file "CGIMemory.c". New documentation file "CGI Memory Handling"
- Implemented 'CGIGetParameterInfo', 'CGISendFileData'.
- Did some real testing of the code. Found and stomped a bunch of bugs.
- New function: 'DateGetDaysFromNow' in "WWWUtil.c".
- first public release of version 2 series.
- only minor code changes and updates to the documentation
- first private release of version 2 series.
- Mostly new API for the framework.
- W*API 1.2 support
- TCP networking support
- New custom window model (based on W*API)
- Dropped support for ListSTAR, Symantec, MOS API,...
- Reduced configuration clutter (moved some of it to function calls like CGIGetParameter)
- Working Send Partial support.
- Better separation of API calls from the Framework's internal functions.
- Codewarrior Pro support (single project file for both CGI and W*API targets)
Version 1
Version 1 never reached the post-beta stage. It was scrapped in favor of the cleaner
API design introduced in version 2.
- Help
- New file "balloon-help.bh" contains balloon help definitions for some of the interface elements (Menus, preferences dialog)
- CGI
- New function 'CGISendData' (I think I implemented this in 1.0d15 but forgot to mention it...) This function can be used by both CGI applications (uses Send Partial) and web server plugins. Read it's header comment in the source file for full details. Be warned Send Partial support is still buggy. Fixing this is very high on my list of priorities.
- Various fixes and additions to make the code more friendly for C++ compiling. (Thanks again, Greg.)
- New function 'CGIIsSecurePath' will test a path string for known security problems, including strings that begin with or contain "//", "::" or "..".
- Added a semaphore to the 'CGIWSAPIUseMyResFile' and 'CGIWSAPIResetResFile' functions to prevent the saved res file from getting messed up.
- Changed 'cgiWSAPIDebugMessage' to actually only compile when debugging mode is on.
- Made "CGI.c" the '__MainSegment__' when compiling as a plug-in.
- Now properly set the current resource fork before calling 'CustomStartup', when compiling as a WebSTAR plug-in.
- Menus
- If you change your menus from the defaults supplied with the framework, you will need to modify the file "balloon-help.bh".
- Preferences
- New configuration options:
- 'kCompileWithPreferences': support preference handling
- 'kCompileWithPreferencesDialog': include the preferences dialog
- 'kCompileWithPreferencesFile': use an external prefs file rather than the application or plug-in's resource fork.
- "balloon-help.bh" includes balloon help for the preferences dialog. You will want to change it if you modify the dialog.
- Added (invisible) balloon help item to preferences dialog DITL in "MyInterface.rsrc".
- Cleaned up the dialog so it will be readable when displayed in Chicago 12 point.
- Fixed the dialog's "Idle time until quit" text field to actually be in seconds.
- Preference resources are now being properly released by the the framework (allowing the prefs file to close).
- String Handling
- New function 'StringNCompareNoCase' - same as strncmp except that it's case-insensitive.
- Symantec Project Manager
- Symantec users should note that I'm now using release 5 of the Symantec CD series (SPM 8.1).
- You need to make sure there's an alias to the 'grantscgi' folder in your project folder.
- TPM users are going to have lots of fun trying to get this all happening well (I recommend upgrading to SPM if you can). Most importantly, you have to move the 'grantscgi' folder into your project folder (which makes things weird when building more than one cgi). I've moved the TPM project file into the "old" subfolder within the "Projects" folder to indicate that it's not well supported now.
- For some reason the clickable url in the about box isn't working from the SPM compile. Please let me know if you figure out how to fix this.
- Modified Files
CGI.c, MyConfiguration.h, MyInterface.rsrc, StringUtil.c, StringUtil.h
- New Files
balloon-help.bh
- CGI
- New function 'CGIHostNameDifferent'. Compares the "Host:" field of the 'full_request' against a given hostname string. Note that not all servers supply the 'full_request' and not all browsers supply the 'Host:'.
- Logging
- New function 'LogWriteDebugEntry'. This call should generally be used in the form:
theErr = LogWriteDebugEntry ( theCGIHdl, "some message", __FILE__, __LINE__ );
- Menus
- New menu "Options" provides user access to application settings.
- New configuration option 'kCompileWithMenuOptions' determines whether to include the Options menu (which is required if you're using the preferences dialog). Note that if you turn this off, you'll need to modify MBAR 128 in "Menus.rsrc" to not include Menu res ID 131. You will also want to delete MENU 131.
- Changed function 'startupMenus' in "Startup.c" to 'MenuStartup' in "MenuFunc.c"
- Preferences
- New configuration option: 'kCompileWithPreferencesFile'.
- New resources (type 'Pref') store preference values.
- A Preferences file (named in STR# 10001, in "MyCustom.rsrc") is now generated when user changes a setting.
- The Options menu links to the new Preferences dialog.
- If you want to add non-numeric text fields to the prefs dialog, you'll need to modify the function 'prefDialogEventFilter' to NOT trap non-numeric characters. I put the trapping in as an easy (read: lazy) way to avoid problems with users entering invalid characters.
- Note that you must set 'kCompileWithProcessFileSpec' (in "MyConfiguration.h") to 1 if you are compiling with preferences file support.
- TCP Networking
- Added basic TCP stream functions. Currently these functions only work when compiling as a WebSTAR plug-in. The plan is to also make them work using OpenTransport and MacTCP when compiling as an application. These functions can currently only be called from functions that have a valid CGIHdl (IE. those in the "MyCGIProcess.c" file).
- New configuration option 'kCompileWithTCPCode'.
- Misc
- New global variable 'gAppFileRef' is a file reference to the application resource fork.
- Modified Files
CGI.c, LogUtil.c, LogUtil.h, MenuFunc.c, MenuFunc.h, Menus.rsrc, MyConfiguration.h, MyInterface.rsrc, ProcessUtil.c, ProcessUtil.h, Startup.c
- New Files
MenuOption.c, MenuOption.h, PrefDialog.c, PrefDialog.h, PrefUtil.c, PrefUtil.h, TCPUtil.c, TCPUtil.h
Note: This is still a potentially unstable version - the next beta should be out within a week or two of this release.
Note: Be sure to read the notes for version 1.0 development 15 which follow immediately after these notes for 1.0 alpha 15.
Note: The Symantec project files have not been updated to support the new code yet. That update should happen in time for the 1.0 beta 15 release. My apologies for any inconvenience. In any case, the Symantec support for the WSAPI isn't available from StarNine yet.
- About Box
- Added a second param text ("^1") that is passed the 'kTargetPString' string constant which specifies the code type of the application ("PPC" or "68K").
- CGI Utilities
- Added string constant for "CONDITIONAL_GET" HTTP method. Updated the functions 'cgiWSAPIGetParamHTTPMethod' and 'cgiAEGetParamHTTPMethod'.
- Improvements to handling of Preprocessor state.
- New field in the CGIRecord (theCGIHdl): 'role'. If you include the 'action' field in your CGI (kCompileWithCGIActionSupport) the role field will be set by the new private (read: don't use this) function 'cgiSetRole'. It provides an easy way to determine what type of processing your CGI should do (CGI, PreProcessor, PostProcessor, etc.).
- Event Handling
- Modified 'doMouseDown' to handle custom dialogs better. It references the new custom function 'CustomDialogMouseDown'.
- Logging
!!! Big changes here:
- Added WSAPI support. The function 'LogWriteEntry' is now the only log call that you can use when compiling as a WSAPI plug-in. It will put a newline character at the end of the string passed to it.
- New function 'DisplayString' displays a string to the status window (of the server if using WSAPI). Currently it does nothing when compiling as a CGI.
- QC support
More rigorous testing can be performed when QC is installed. To turn on the extra tests in the framework, do the following:
- Add the appropriate QCAPI library file(s) to your project(s).
- Make sure the "QCAPI.h" header is in your system (compiler) search/access path.
- Turn on (set to 1) 'kCompileWithExtraQC' in the "MyConfiguration.h" header.
As with assertions, make sure you turn off the extra QC testing for your distribution compiles.
- Startup
- Modified function 'CustomStartup' - you should look at this again and modify your current CustomStartup functions to match the changes.
- Got rid of functions 'CustomCGIStartup' and 'CustomListSTARStartup' since their functionality is covered by 'CustomStartup'. You can keep your existing versions of these functions - just make sure that you have prototypes defined for them where needed.
- WebSTAR API (WSAPI) (these functions apply ONLY when compiling as a plug-in)
- Corrected the PPC project file to use 68K struct alignment.
- A pair of new functions: 'CGIWSAPIUseMyResFile' and 'CGIWSAPIResetResFile'. If you need to access resources in the plug-in file's resource fork, you must first call 'CGIWSAPIUseMyResFile'. You must make certain that before you return from a custom function, or make a call to ProcessGiveTime, that you call 'CGIWSAPIResetResFile'. See the section on 'Resources' in chapter 2 of the WSAPI documentation for further explanation.
- Lots of other bits were modified in "CGI.c" to accommodate the WSAPI.
- Misc
- Added 'kTargetPString' to "compiler_stuff.h". It's a pascal format string that provides a string indicating the platform of the code.
- New function "SaveJPEGFromQuickCam" grabs a QuickCam framew to a JPEG file.
- Modified Files
AboutBox.c, CGI.c, CGI.h, compiler_stuff.h, CustomHandlers.h, EventUtil.c, MyCGIProcess.c, MyCustom.rsrc, MyHandlers.c, MyInterface.rsrc, MyListSTARProcess.c, Startup.c
- New Files
VideoUtil.c, VideoUtil.h
WARNING: This is a development (not well-tested, probably crash-prone) release. You should not rely on the code in this release for final product. It is being released for testing purposes, and to allow users of the framework to know what changes are being made to the framework. All usual warnings about backing-up and the potential hazards of using the software go triple for this release. "Danger Will Robinson!"
- CGI Utilities
- 'CGIActionIsCGIorACGI' function should now work correctly when the CGI is used by servers other than WebSTAR.
- The function prototypes for 'CGIFormFieldsDispose' and 'CGIAESearchDoc' have been moved from "CGI.h" to "CGI.c" since they shouldn't be called outside that module.
- New configuration option 'kCompileWithCGIcontent_length'. Used for the 'content_length' parameter. New constant 'kCGIcontent_length' maps to 'CLen'. New field in the CGIRecord structure 'content_length'.
- New field in CGIRecord: 'dataSent'. Used with SendPartial (and when you send data from within custom code when using the WSAPI). Set this Boolean value to true if you return data on the connection from within your custom code.
- New configuration options ' kCompileWithCGIfileMIMEType', 'kCompileWithCGIserverField', 'kCompileWithCGIserverDirectoryPath', 'kCompileWithCGIurlPhysicalPath', 'kCompileWithCGIifModifiedSince' and 'kCompileWithCGIcurrentRealm'. These correspond to new fields in CGIRecord. These fields are only available if compiling as a WSAPI plug-in.
- New configuration option 'kMyCGIName'. Must be a unique ID for your CGI/plug-in. A good rule is to put your personal or company name followed by a dash, then the name of the CGI. For example: "GRANTNEUFELD-GRANTSCGI". This constant must not exceed 31 characters.
- Cleaned up "CGI.c" a bit. Moved most of the public functions to the top of the file, leaving the private functions at the bottom. Renamed a couple of the private functions to now have lower case beginings to better indicate that they are not really public functions.
- New configuration option: 'kCompileWithCGINoDataHTTPError'. If this is option is set, the framework will not generate an http error header if you do not set responseData in the CGIHdl. This is really only useful if you want to build a Preprocessor CGI which will need to return no data if it wishes to indicate to the server that the preprocessor did not handle the cgi event, and that that event should be passed along to normal processing.
- See the new CGI Memory functions listed in the Memory section below.
- Renamed 'cgiDisposeHandle' to 'cgiDisposeRecord' to reduce confusion.
- The functions: 'CGIFormFieldsFromArgs', 'CGIFormFieldsDispose' and 'CGIEncodeURLChars' have been changed to take a CGIHdl as their first parameter.
- Custom Functions
- All the prototypes for the custom functions (in "MyHandlers.c", "MyCGIProcess.c" and "MyListSTARProcess.c") have been moved from the various headers they were scattered amongst ("AEHandlers.h", "CGI.h", "EventUtil.h", "ListSTAR.h", "ProcessUtil.h", "Quit.h", "Startup.h" and "WindowInt.h") to the new file "CustomHandlers.h".
- 'CustomStartup' has been modified to take the wsapi 'commandPtr' when compiling under wsapi.
- Memory
- New functions 'MemoryDisposeHandle' and 'MemoryDisposePtr'. These should be used in place of the system calls 'DisposeHandle' and 'DisposePtr'.
- New functions 'CGINewHandle', 'CGINewHandleClear', 'CGINewPtr', 'CGINewPtrClear', 'CGIDisposeHandle' and 'CGIDisposePtr'. These MUST be used (instead of the MemoryNew and MemoryDispose functions) in custom cgi functions (any function that is passed a CGIHdl).
- Process
- 'ProcessIsMoreBusy' and 'ProcessIsLessBusy' will now compile correctly if 'kCompileWithDeferredTask' is not on.
- Modified 'ProcessGiveTime' to take additional parameters 'useWNE' and 'theCGIHdl' (see "ProcessUtil.c" for details). It will now use the 'WSAPI_YieldTime' call when compiling for wsapi. You should always use 'ProcessGiveTime' instead of 'YieldToAnyThread' or other such functions. It will ensure that time is properly allocated to other threads and processes.
- New function 'ProcessPeriodicTask'. This will call the new custom periodic task function 'CustomPeriodicTask'.
- New configuration option: 'kCompileWithPeriodicTask' . Allows you to have tasks processed, outside of CGI events, on a periodic basis.
- New configuration option: 'kSleepTimeForPeriodicTask'. Specifies the amount of time (in ticks) to suggest for inbetween periodic tasks.
- Project Files
- I've separated the 'custom' files from the main 'grantscgi' folder. All the modifiable files are now kept in the "grantscgi projects" folder.
- Quitting
- New function 'QuitWSAPI' handles quitting for WSAPI plug-ins.
- Resources
- The new WebSTAR API (wsapi) reserves all resource numbers between 128 and 9999 inclusive. So, all resources that need to be included in wsapi plug-ins need to be 10000 or higher. Things like dialogs and other interface elements are not affected since they won't be included in plug-ins. Additionally, I'm Grant's CGI Framework reserves resource numbers in the 10000 to 10099 range, leaving users of the framework with numbers from 10100 up.
- The following from "MyCustom.rsrc" changed:
| ResType | Old ID | Name | New ID |
| STR# | 3000 | "HTTP Headers" | 10000 |
| 3001 | "File Names" | 10001 |
| 3002 | "URLs" | 10002 |
| TNAM | 3002 | "LogFileCreator" | 10002 |
- Moved all custom interface related resources (not used for WSAPI plug-ins) from "MyCustom.rsrc" to the new file "MyInterface.rsrc"
- Startup
- New function 'StartupWSAPI' takes the place of 'StartupApplication' when compiling as a WSAPI plug-in.
- Strings
- New functions 'StringCompareNoCase' and 'CharMakeUpper'.
- Windows
- New custom function 'CustomWindowIdle' in "MyHandlers.h" call by 'doIdle' when a custom application window is frontmost.
- 'WindowGrow' has been updated so it now calls the function 'CustomGrowWindow' for any application windows. You can just use the new 'WindowGrowHandler' function from 'CustomGrowWindow' if you want - but if you need custom handling you can now do it.
- Misc
- Fixed the configuration settings in the 'QuitPrepare' function so that thread quitting will compile properly if no threads are preallocated for the application.
- New function 'CustomEmergencyHandler'. Called if some sort of emergency has arisen. What you're basically being asked to do is release any memory, resources, files, etc. that you can.
- By request, "compiler_stuff.h" is now only referenced from within "MyConfiguration.h".
- Added "#pragma unused ()" to functions where appropriate. So, now the "Unused Arguments" warning is turned on in the Codewarrior projects.
- Modified Files
AEFunc.c, AEHandlers.c, AEHandlers.h, CGI.c, CGI.h, compiler_stuff.h, constants.h, EventUtil.c, EventUtil.h, ListSTAR.c, ListSTAR.h, LogUtil.c, MemoryUtil.c, MemoryUtil.h, MenuApple.C, MenuEdit.c, MyConfiguration.h, MyCustom.rsrc, MyHandlers.c, ProcessUtil.c, ProcessUtil.h, Quit.c, Quit.h, Startup.c, Startup.h, StringUtil.c, StringUtil.h, WindowInt.c, WindowInt.h
- New Files
CustomHandlers.h, grants-application.h, grants-wsapi.h, MyInterface.rsrc
1.0 beta 14 - Friday, April 12, 1996
IMPORTANT: Many of you are going to wonder what 'p_export' means. I'm
using it to export functions using Pascal calling format - only when the
framework is being compiled with Pascal support. If you have not turned
on Pascal support in "MyConfiguration.h" 'p_export' will be #defined to
be nothing - absolutely no effect (as if it didn't exist) - so please
just ignore it's presence since it will mean absolutely nothing to the
majority of you framework users. (further details on Pascal support are
in the version notes below).
I've made numerous little fixes throughout the source files, some of
which I forgot to document here (but those are insignificant little
changes which won't affect the code's compiling).
- CGI Utilities
- Renamed 'CGIDecodeSpecialChars' and 'CGIEncodeSpecialChars' to 'CGIDecodeURLChars' and 'CGIEncodeURLChars'.
- 'CGIEncodeURLChars' now takes a 'const char *' instead of a 'char *'. A new 'OSErr *' parameter may be NULL if you don't want the err result (from memory allocation). The function has been heavily rewritten to allocate exactly the right amount of space for the new string, instead of growing and shrinking the pointer as it goes along. It also uses pointers instead of offsets. These changes should dramatically improve its performance and stability. (I hope ;-)
- New function: 'CGICharWillHex' returns true if theChar will be converted to hex when encoding as an URL string. With this, I've changed what qualifies as a non-hex encoding character from just alpha-numeric to include the characters: ?, @, -, ., /, :, ", #, $, &, ', and =. (commas are still hex encoded).
- Fixed some bad handle locking in 'cgiAEComplete'.
- Took out the Yield call at the end of 'CGIAESearchDoc'.
- New function 'CustomCGIPostProcess' in "MyCGIProcess.c". Allows for further processing of a CGI event after the result has been returned to the server.
- Switched a bunch of the string parameters in the CGI Record structure to use their max values rather than having to allocate string pointers.
- got rid of the version in the CGI Record structure since it isn't actually a parameter of the CGI event.
- Logging
Note that the logging files were just quickly thrown together. A number of additional functions need to be added, as well as cleaning up of the existing functions. Top on this list is producing MacHTTP/WebSTAR style log entries (date, time, etc.).
- New files "LogUtil.c" & "LogUtil.h"
- Added needed log file management calls to 'StartupApplication' and 'doIdle' ("EventUtil.c")
- New configuration option 'kCompileWithDebugLogging'. Will activate a number of calls to 'LogStringDebug' which may be helpful for debugging purposes. This includes listing the parameters received for a CGI event, and the start and finish times for the CGI event (in ticks).
- New configuration option 'kCompileWithErrorLogging'. When this is on, error messages will be logged (ErrorSystem, ErrorStartup).
- 'my_assert' now calls 'LogStringDebug' if debug logging is on.
- The resource TNAM #3002 "Log File Creator" determines the creator type of the log file. If the resource is not present, the creator type will default to 'ttxt' - SimpleText. This resource should eventually be moved to a preferences file (hopefully within the next beta or two).
- Files
- New files "FileUtil.c" & "FileUtil.h"
- New function 'ResolveAliasFileMountOption' allows the resolving of Finder alias files while preventing the appearance of the 'mount remote volume' interface that can lock up the machine. Use this function instead of the toolbox call 'ResolveAliasFile'.
- Process
- New functions: 'ProcessSleepDefault' and 'ProcessSleepBusy'. Changes the amount of time given to other applications during 'WaitNextEvent' calls and such. These functions change gSleepTicks. You can use these if you want to provide a user preference to change the sleep ticks (such a preference is in the long term plans for the cgi framework preferences interface).
- New functions: 'ProcessSleepSetDefault' and 'ProcessSleepSetBusy'. Used to set the amount of time allocated when 'ProcessSleepDefault' and 'ProcessSleepBusy' are called. Theses functions do not change gSleepTicks.
- New local variables 'vSleepTicksDefault' and 'vSleepTicksBusy' (replaces 'gSleepTicksBusy' from "globals.h"). Don't touch these variables - use the 'ProcessSleep...' accessor functions instead.
- Moved process related code from 'StartupApplication' to new function 'ProcessStartup'.
- New function 'ProcessGiveTime'. Calling this will give time for other processes (both internal to the app and other applications) to run. If thread manager is available, it will just call ThreadYield, otherwise it will call WNE to give time to other applications. You will generally want to call this instead of ThreadYield.
- New constant 'ProcessIsBackgroundOnly'. Will tell you whether the application is a background-only application (faceless).
- Fixed 'ProcessWaitUntilFront' and 'ProcessIsFront' to immediately return false when application is compiled as background only.
- New functions 'ProcessIsMoreBusy' and 'ProcessIsLessBusy'. These set the 'busy' level of the application, which affects how much time it will try to grab for processing.
- Threading
- Added 'WaitNextEvent' call to 'ThreadFinishAllSubThreads' when giving time for other threads to complete.
- New function: 'ThreadYield' should be called in place of 'YieldToAnyThread'. Calls to 'YieldToAnyThread' in the framework have been replaced.
- Moved 'startupThreads' from "Startup.c" to 'ThreadStartup' in "ProcessUtil.c".
- New global variable 'gThreadQuit' is set true when threads should try to quit.
- Deferred Tasks
- New configuration option 'kCompileWithDeferredTask'. Must be set on if you want to use deferred tasks.
- New custom function (one you modify) 'CustomDeferredTask' in "MyHandlers.c" (prototype is in "ProcessUtil.h").
- If you are using Deferred Tasks, 'kStartupThreadsPreallocate' MUST be greater than or equal to one since the deferred task thread uses one preallocated thread. Take this into account when deciding how many threads to preallocate if you preallocate threads for other purposes. Keep in mind that each thread adds about 24k to the application's memory requirements.
- Function Name Changes
Most of the 'My...' functions were renamed at the request of users of the framework. If you want to just use the new names, please ensure that you have set 'kCompileWithout_MY_Names' on (1) in "MyConfiguration.h". If you want to continue to use the old names, set 'kCompileWithout_MY_Names' off (0).
This list has the old name followed by the new name.
- 'MyGotRequiredParams' 'AEFuncGotRequiredParams'
- 'MyAEIdleFunc' 'AEFuncAEIdleFunc'
- 'MyOpenDocument' 'CustomOpenDocument'
- 'MyCGIProcess' 'CustomCGIProcess'
- 'MyCGIStartup' 'CustomCGIStartup'
- 'MyCGIQuit' 'CustomCGIQuit'
- 'MyKeyPress' 'CustomKeyPress'
- 'MyDoStartDrag' 'CustomDoStartDrag'
- 'MyListSTARProcess' 'CustomListSTARProcess'
- 'MyListSTARStartup' 'CustomListSTARStartup'
- 'MyNewHandle' 'MemoryNewHandle'
- 'MyNewHandleClear' 'MemoryNewHandleClear'
- 'MyNewPtr' 'MemoryNewPtr'
- 'MyNewPtrClear' 'MemoryNewPtrClear'
- 'MyGrowZone' 'memoryGrowZone' (now a local-only function in "MemoryUtil.c")
- 'MyNewThreadFromPool' 'ThreadNewThreadFromPool'
- 'myThreadTermination' 'threadTermination'
- 'MyQuit' 'CustomQuit'
- 'MyStartup' 'CustomStartup'
- 'MyCloseWindow' 'CustomCloseWindow'
- 'MyActivateWindow' 'CustomActivateWindow'
- 'MyUpdateWindow' 'CustomUpdateWindow'
- 'MyClickInWindow' 'CustomClickInWindow'
- Configuration
- New option 'kCompileWithout_MY_Names'. If you don't want to support the old function names that began with 'My', then turn this option on. The names were changed because people were wanting to keep the 'My' namespace for their custom code.
- Symantec Support
- Defined 'qd' in "globals.h" for Symantec Project Manager PowerPC compiler only since 'qd' is not defined automatically with that compiler.
- Codewarrior Support
- Add "console.stubs.c" to Codewarrior 8 projects.
- Moved profiler code from "main.c" to "CGI.c"
- Memory Handling
- new constant in "MemoryUtil.h": 'kMemoryHandleLockedFlag' used with HGetState to determine if a Handle is already locked. Does anyone know of an already defined variable in the Universal Headers that means the same thing? I looked in Memory.h, but couldn't find anything like it.
- Some new assertions in front of calls to HLock (& HLockHi) to ensure the Handle isn't already locked.
- About Box (InternetConfig clickable URL)
- New configuration option 'kCompileWithAboutURL'. When set on, the about box will contain a 'clickable-url' for your cgi home-page (or whatever you set it to be). Use the first string in 'STR#' 3002 "URLs" to set the url to use. This requires InternetConfig 1.1 or later. The 'kCompileWithModelessDialogs' configuration option must be on for this to work.
- You will probably want to move the "InternetConfig" folder into your Development tools folder (I keep it in my third-party APIs folder). You will then need to set your access paths for your project to include the path to the "InternetConfig" folder.
- Pascal Support
The begining of support for customizing the framework using Pascal is now in place. If you want to use Pascal for the custom functions, you will have to create the equivelants of the files: "MyHandlers.c", "MyCGIProcess.c" and "MyListSTARProcess.c" (the last two are only required if you are creating a CGI or ListSTAR event handler). Currently, you have to mix C and Pascal source files in a project.
In order to be able to be able to call C functions from Pascal source, I've defined the 'p_export' keyword (in "compiler_stuff.h") which will cause many of the C functions to use pascal calling conventions. The Pascal interfaces files are not yet ready (but should be by mid to late April). If you are mixing Pascal and C source files, you need to set on the new configuration option: 'kCompileWithPascalSupport'.
- Scripting
- corrected the "cgi test.txt" sample AppleScript file.
- Modified Files
AboutBox.c, AEFunc.c, AEFunc.h, AEHandlers.c, AEHandlers.h, CGI.c, CGI.h, cgi test.txt, compiler_stuff.h, constants.h, DebugUtil.c, DebugUtil.h, DialogFunc.c, ErrorInt.c, ErrorUtil.c, ErrorUtil.h, EventUtil.c, EventUtil.h, globals.h, ListSTAR.c, ListSTAR.h, main.c, MemoryUtil.c, MemoryUtil.h, MyCGIProcess.c, MyConfiguration.h, MyCustom.rsrc, MyHandlers.c, MyListSTARProcess.c, ProcessUtil.c, ProcessUtil.h, Quit.c, Quit.h, Startup.c, Startup.h, StringUtil.c, StringUtil.h, WindowInt.c, WindowInt.h
- New Files
FileUtil.c, FileUtil.h, LogUtil.c, LogUtil.h, and the InternetConfig support files.
- Removed Files
debug.rsrc.
1.0 beta 13 - Friday, January 26, 1996
Important: The CGIRecord (CGIHdl) structure has been changed! The
responseData field is no longer a 'char *' (Ptr) - it is now a
'Handle'. You must 'MyCGIProcess'. . This change to the framework can
be reverted (to support old code) if you turn the
'kCompileWithCGIResponseDataAsHandle' configuration flag off (in
"MyConfiguration.h").
- CGI Support
- Added auto decoding, to the script_name parameter, in
'cgiAESearchDocProcess'.
- New function 'CGIPathToMacPath'. Converts a '/' delimited path to a
':' delimited one, and makes sure there's at least one ':' at the
start if the path includes folders. The path string passed to this
function MUST have an extra byte after its terminating null byte.
- New function 'CGIActionIsCGIorACGI'. Returns true if the action
parameter is either CGI or ACGI.
- Fixed sample html string in the 'MyCGIProcess' function. The
closing TITLE element was missing the '/' (</TITLE>). Had to add one
to the number of the size of the string used for allocating space for
the string (was 141, now is 142). Thanks to Scott Taylor for pointing
this out.
- New field in the CGIRecord (CGIHdl) structure: 'suspended'. It's a
Boolean which indicates whether the AppleEvent, that the CGIRecord is
being used for, has been suspended.
- 'CGIAESearchDoc' sets the new 'suspended' field to true if the
AESuspendTheCurrentEvent call is successful. It also yields directly
to the new thread if the thread is successfully created. (only used if
threading)
- Changed the test in 'cgiAESearchDocProcess' (to determine whether
to resume the AppleEvent - almost at the end of the function) for
whether the cgi is processing in a sub thread to whether the cgi is
processing in a suspended AppleEvent.
- I commented out the 'thread' field in the CGIRecord structure since
it's not currently being used. It may come back again in the future if
there is a need for it.
- Changed CGIrecord (CGIHdl) responseData from 'char *' (Ptr) to
'Handle'. Affected functions: 'cgiAEComplete', 'cgiDisposeHandle' and
'MyCGIProcess'. This can be reverted (to support old code) if you turn
the 'kCompileWithCGIResponseDataAsHandle' configuration flag off.
- Fixed bug in 'CGIFormFieldsFindRecord' where it would crash if
(*theCGIHdl)->formFields was nil.
Thanks for spotting this bug go to Frank Leahy.
- Added an optional (long) 'refCon' field to the CGIrecord (CGIHdl).
To use it, you must set 'kCompileWithCGIRefCon' on in
"MyConfiguration.h". If you want to link your own data into the
CGIHdl, use the 'refCon' field to store it (or a reference to it).
Currently, I don't touch it, so you're responsible for disposal of any
memory you allocate for the 'refCon' field.
- New function 'CGIFormFieldsFindValue' returns a pointer to the
string value of a field. This is basically a wrapper function for
'CGIFormFieldsFindRecord'.
- Added vNullString initialization to 'InitCGIUtil'.
- Menus
- Moved menu constant declarations into the individual "Menu___.h"
files.
- Updated 'Customizing the Menus' section of the documentation.
- Added support for the Window_Application window type to the
'adjust___Menu' functions for each menu. This should be improved in a
future version to call custom user functions so the default menu files
don't have to be modified if you need to do something special with
your menus & application windows.
- Commented out (redundant?) call to 'adjustMenus' in
'mainEventLoop'.
- Configuration
- New additions to "MyConfiguration.h" are now indicated by "*new*"
(without the quotes and where '*' is a bullet character option-8)
in the comments above each addition. This should
make it easier to update your configuration files.
- 'kIdleTimeToQuit' specifies the default amount of idle time before
the application self quits if 'kCompileWithQuitOnLongIdle' is on.
- Moved 'kStartupThreadsPreallocate' from "Startup.c" to
"MyConfiguration.h".
- Fixed missing 'kCompileWithThreadedAppleEvents' in CGI AppleEvent
handler.
- Moved 'kSleepTicks' from "constants.h" to "MyConfiguration.h"
- 'kCompileWithCGIResponseDataAsHandle' is for backward compatibility
with old code.
- 'kCompileWithCGIRefCon' adds the 'refCon' field to CGIRecord
(CGIHdl).
- Windows
- Changed the 'dataHdl' member of the 'windowInfo' struct to be a
long instead of a Handle. It has also been renamed to 'data', to
reflect the change. The reason for this change is because you can
store a Handle as a long integer, but you can't store a long as a
Handle and I want to be able to do that. Affected functions:
WindowNewSetInfo and WindowNewInfoHdl. The new function
'WindowGetData' should be used in place of 'WindowGetDataHdl' (which
works the same as before).
- Changed 'AboutBoxOpen' to use 'WindowNewSetInfo'.
- Resources
- New resource file ":Resources:Menus.rsrc" contains the menu
resources that were previously in "essential.rsrc".
- Moved the Assertion alert resources from the "essential.rsrc" file
into the new "debug.rsrc"
- Threading
- New global variables 'gThreadSleeper' and 'gThreadSleeperIndex'
(initialized in 'startupThreads')
- Changed 'MyNewThreadFromPool' and 'myThreadTermination' to put the
current thread to sleep (instead of doing a while loop using
YieldToAnyThread) if there aren't enough sub-threads to allocate.
- New function 'EventSpawnAEDispatcherThread' called by 'startupAE'.
- Symantec Project Manager
- Added "ThreadsLib.xcoff" file for PPC compiling. Still getting a
link error on the 'qd' global - but I've sent a message to Symatec
Tech Support to find out how to fix that. We're almost there!
- Make sure you're using Universal Headers 2.0.1 or later!
- Startup
- Fixed a bug in 'startupTrapAvailable'.
Identified by Scott Taylor.
- Added some additional error checking to 'StartupApplication'.
- Added some new error strings to 'STR#' 301 'Startup Error Strings'
in "essential.rsrc"
- Miscellaneous
- New function 'StringConvertCharToChar'
- New function 'ProcessWaitUntilFront'
- New constant 'kSleepTicksWhenBusy' in "MyConfiguration.h". Used for
reducing sleep time when multiple threads are processing. Modified
functions 'MyNewThreadFromPool' and 'myThreadTermination' in
"ProcessUtil.c".
- Removed unused local variable 'theThread' from 'doHighLevelEvent'
in "EventUtil.c"
- 'doMenu' and a few of the functions in "EventUtil.c" now use
'ResetQuitIdleTimer'
- New mailing list: grantcgi-announce@arpp.carleton.ca
- Modified Files
AboutBox.c, CGI.c, CGI.h, constants.h, Documentation, essential.rsrc,
EventUtil.c, globals.h, MenuApple.h, MenuEdit.c, MenuEdit.h,
MenuFile.c, MenuFile.h, MenuFunc.c, MenuFunc.h, MyCGIProcess.c,
MyConfiguration.h, ProcessUtil.c, ProcessUtil.h, Read Me, Startup.c,
StringUtil.c, StringUtil.h, WindowInt.c, WindowInt.h.
And all the project files.
- New Files
debug.rsrc, Menus.rsrc
1.0 beta 12 - Saturday, December 10, 1995
- AppleEvents and Threading
It turns out (as pointed out by the knowledgeable and observant Wayne K. Walrath - Thanks Wayne!) that my implementation of threading of AppleEvents was bad :-( Since AEProcessAppleEvent is not reentrant, it can't be set up as multi-threaded where it might be called more than once. So, I finally broke down and figured out how to use AESuspendTheCurrentEvent (which is not at all adequately explained in IM:IAC).
- 'CGIAESearchDoc' now has 4 companion functions: 'CGIAESearchDocProcessThread', 'cgiAESearchDocProcess', 'cgiAEComplete' and 'CGIAEResumeComplete'. You shouldn't actually need to worry about any of these since they are internal to the CGI framework code and not meant to be called by custom functions.
- 'theAppleEvent' parameter in 'cgiAEGetParamHTTPMethod', 'AEGetParamString', 'AEGetParamStringNoAlloc', 'AEGetParamShort' and 'AEGetParamLong' is now defined as const (as the universal headers say it should be).
- Removed threading from 'doHighLevelEvent' in "EventUtil.c". This was an invalid operation and has been replaced with (hopefully) correct usage in the CGI AppleEvent handler.
- The CGIRecord structure now includes pointers to the AppleEvent and the Reply AE. Also added more comments to the structure.
- Added the local variable vCGIAEResumeCompleteUPP to "CGI.c"
- Symantec Support
- Now working for 68K projects!!!
- Added THINK Project Manager and Symantec Project Manager project files. The PowerPC project is still not working - I'm in contact with Symantec about this.
- Added #include <Types.h> to "Startup.c" for compiling with Symantec/THINK compilers.
- Added 'StringChar' function to "StringUtil.c" to make up for the non-standard behaviour of TPM's strchr library function. I've set the header file in such a way that other compilers will use the library function, but TPM/SPM will use the custom one.
- Added 'kCompiling_For_Symantec' to compiler_stuff.h
- Metrowerks Support
- Added CodeWarrior 7 project files.
- Changed creator type of most of the source files to 'CWIE' the CodeWarrior IDE (cw7)
- Interface
- added new function 'MyActivateWindow' to "MyHandlers.c".
- changed 'WindowActivate' to support 'MyActivateWindow'.
- Added 'Window_dlgModeless' to the 'window_type' enumeration in "WindowInt.h"
- Added some more "#if kCompileWithApplicationWindows" lines to "WindowInt.c"
- Resources
- Renamed "Customize.rsrc" to "MyCustom.rsrc". Changed in "CGI.[mu]" as well.
- Miscellaneous
- Added platform specific variation to MyAssert ("DebugUtil.c")
- 'MyCGIQuit' was missing the name of the Boolean parameter ('allowUserInteract'). I don't know why it compiled in CodeWarrior without the parameter being named, I wish it wouldn't.
- Added 'static' modifier to all local only functions. (CGI.c, ErrorUtil.c, EventUtil.c, ListSTAR.c, Main.c, Startup.c, WindowInt.c) (don't ask why this wasn't done before - probably just slothfulness on my part)
- New function 'ResetQuitIdleTimer' in "Quit.c". This needs to be called at the begining and end of any event which should reset the 'quit on idle time' timer.
- Corrected error handling during field allocation to set the name and value pointers of the current field to nil before trying to allocate memory for them. Then, if the alloc fails, the code won't try to deallocate them.
- Now using custom function StringChar instead of strchr (which is actually a macro that just uses strchr in the case of non-Symantec compilers - if that's not confusing enough for you ;-)
- Modified Files
AEFunc.c, AEFunc.h, CGI.c, CGI.h, compiler_stuff.h, Customize.rsrc, DebugUtil.c, ErrorUtil.c, EventUtil.c, ListSTAR.c, Main.c, MyCGIProcess.c, MyCustom.rsrc, MyHandlers.c, Quit.c, Quit.h, Startup.c, StringUtil.c, StringUtil.h, WindowInt.c, WindowInt.h (and the project files)
- Modified Documents
Read Me
- New Documents
CGI Parameters, Documentation, References (where to find more info), Royalties (what and how to pay for this) cgi_params.html (by Chuck Shotton, included with permission)
- Deleted Documents
"CGI Documentation" and "How To" (their contents are now in "CGI Parameters" and "Documentation")
1.0 beta 11 - Sunday, October 29, 1995
- EventUtil:
- Moved most of the update event code from 'doUpdateEvent' to 'WindowUpdate'
- 'doKeyPress' now calls 'MyKeyPress'
- 'doMouseDown' can now call 'MyDoStartDrag' if 'kCompileWithDragNDrop' configuration option is set.
- New external custom functions: 'MyKeyPress' and 'MyDoStartDrag'
- WindowInt:
- Added support for Window_Application window type. Any windows that have the WindowInfoHdl as their RefCon that have this type specified, will be passed to a custom close function ('MyCloseWindow' in "MyHandlers.c") that will allow the custom application to do any special clean-up that is required when a window is closed.
- Note: I really need to document the WindowInfoHdl stuff since this is the mechanism I use to track windows other than non-movable modal-dialogs. I'll just say for now that you should pay particular attention to the functions 'WindowNewSetInfo', 'WindowGetDataHdl', and 'WindowDisposeInfoHdl'.
- Added error detection to 'windowHasScrollBars'
- New functions: 'WindowNewSetInfo', 'WindowSetInfoHdl', 'WindowGetInfoHdl', 'WindowDisposeInfoHdl', 'WindowGetDataHdl', 'WindowUpdate'
- Modified functions: 'WindowClose', 'WindowCloseAll', 'WindowContentClick'
- MyHandlers.c:
- New functions: 'MyCloseWindow', 'MyUpdateWindow', 'MyKeyPress'
- Configuration:
- 'kCompileWithDragNDrop', 'kCompileWithApplicationWindows', 'kCompileWithKeyboardEvents'
- Misc:
- Modified "AboutBox.c" to not lose memory in the PPC code when allocating the UPP for the Icon drawing user item function. Affected functions: 'AboutBoxInit' and 'AboutBoxOpen'.
- Added comment to 'AEInstallHandlers'
- Added file type constants to "constants.h"
- New global: gHasDragNDrop
- Added 'startupDrag' (Drag Manager initialization) to "Startup.c"
- Modified Files:
- "AboutBox.c", "AEHandlers.h", "constants.h", "EventUtil.c", "EventUtil.h", "globals.h", "MyConfiguration.h", "MyHandlers.c", "Startup.c", "WindowInt.c", "WindowInt.h"
1.0 beta 10 - Sunday, October 1, 1995
- New Functions: 'MyStartup', 'MyQuit', 'MyOpenDocument',
'MyCGIQuit'
- Renamed 'myInstallAEHandlers' 'AEInstallHandlers' to avoid
confusion.
- Moved the calls to 'MyCGIStartup' and 'MyListSTARStartup'
from "Startup.c" to "MyHandlers.c".
- Rearranged the project files to have all the custom and
optional sources / resource-files in one group called
"Customize".
- New utility function 'ProcessGetMyFSSpec' in
"ProcessUtil.c". Fills out an FSSpec with the application's
location. Thanks go to Greg S. Combs.
- New optional (via "MyConfiguration.h") global variable
'gProcessFSSpec' that will automatically be filled in at
startup with the location of the cgi application. Suggested by
GSC.
- Changed some calls to 'HLockHi' to plain 'HLock' because
moving the handle high in the heap - in those cases - was
unnecessary and a waste of time.
- Added 'AEGetParamStringNoAlloc' function. "AEFunc.c"
- Configuration option for turning off AppleEvents being
handled through spawning new threads. If you do turn this off,
you are on your own for threading event handling.
- Moved the constant 'kProfileNameStr' from
"compiler_stuff.h" to "MyConfiguration.h".
- Created configuration option for turning assertions on/off
in "MyConfiguration.h". Modified "DebugUtil.h" so that you
don't have to change it to determine whether assertions are
on/off.
- Fixed bug in 'CGIDecodeSpecialChars'. Was accessing the
wrong byte of theString in the second 'else if' line of
determining the low order byte. 'theString[read+1]' has been
corrected to 'theString[read+2]' in the two occurrances on that
line. Big thanks to Stefan Strand of "Teknik i Media AB" for
identifying my error.
- Modified Files
- AEFunc.c, AEFunc.h, AEHandlers.c, AEHandlers.h, CGI.c, CGI.h, compiler_stuff.h, DebugUtil.c, DebugUtil.h, ErrorUtil.c, globals.h, MyConfiguration.h, ProcessUtil.c, ProcessUtil.h, Quit.c, Quit.h, Startup.c, Startup.h
- New Files
- MyHandlers.c
1.0 beta 9 - Saturday, September 23, 1995
- Threads Configuration
You will want to put a #if wrapper around any references you may have to gHasThreadMgr as in:
#if kCompileWithThreadsOptional
if ( gHasThreadMgr )
#endif
(be sure to include #include "MyConfiguration.h" in any such files)
This will work, even in cases like if (gHasThreadMgr) { some code } where you wrap it as #if kCompileWithThreadsOptional if ( gHasThreadMgr ) #endif { some code } because the stuff in {} will be treated as a block statement which (to my knowledge) will not affect compilation under C.
- A tonne of new configuration options. Located and explained in "MyConfiguration.h".
- Removed the storing of the AppleEvent Record and Reply Record in the CGIHdl since they weren't being used. The relevant lines (in CGI.h and CGIAESearchDoc) were just commented out, so can easily be replaced if you really want them.
- Now using global variable 'gIdleTimeToQuit' instead of constant 'kIdleTimeToQuit' to check the idle time. 'gIdleTimeToQuit' is initialized to 'kIdleTimeToQuit' on startup, but can be changed at any time you want to after that (IE. your initialization code or on an interface call).
- Added global 'gDoIdleQuitOnOpenApp' which starts off set to the 'kCompileWithIdleQuitOnOpenApp' configuration option. This is basically a flag which tells whether the application will quit after the idle time even if the application was just opened ordinarily (OpenApplication AppleEvent - not CGI launch).
- Moved the memory constants to "MyConfiguration.h" from "MemoryUtil.h" to make changing them more convenient.
- Added new stuff to the "How To" document, including: Modifying/adding menus and menu items. New document (incomplete) describing the CGIRecord/CGIHdl data structure and how it works.
- Increased 'kCGIParamMaxSize' to hold the actual maximum parameter size.
- QuitPrepare now checks event queue for any outstanding high level events (Apple Events) and processes them before quitting. This will hopefully prevent, or at least reduce, lost events if a CGI call is made to the CGI as it is preparing to quit.
- Modified Files:
AEHandlers.c, CGI.c, CGI.h, constants.h, globals.h, EventUtil.c, MemoryUtil.h, MyConfiguration.h, Quit.c, Startup.c
1.0 beta 8 - Monday, September 11, 1995
- Added Send Partial AppleEvent support (Warning: untested)
- New AppleEvent parameters:
- 'Pvrs' - 'version' - version number of the http server.
- 'Kcid' - 'connection' - connection ID used by send partial events.
- New CodeWarrior Profiler support.
- Additions to "Compiler_Stuff.h", "Globals.h" and 'main' in "Main.c".
- Rearranged resource files:
- "essential.rsrc" must be included.
- "Customize.rsrc" should be modified to meet the individual application's need.
- "ListSTAR.rsrc" must be included in projects that support the ListSTAR events.
- "CGI aete.rsrc" is the AppleScript resource for applications that only support CGI events.
- "ListSTAR aete.rsrc" is the AppleScript resource for applications that only support ListSTAR events.
- "CGI and ListSTAR aete.rsrc" is the AppleScript resource for applications that support both CGI and ListSTAR events.
- New Compiling Configuration Options. (These help with optimization)
- See the new file "MyConfiguration.h" for details.
- One of the new configuration options is to compile as a background-only application.
- Miscellaneous
- Added string to http headers 'STR#' resource for multipart server push response.
- Added 'kAEMyTimeoutInTicks' constant to the "AEFunc.h" header.
- Added code to 'doMenu' in "MenuFunc.c", to reset the self-quit timer on menu events.
- Removed unused code in main event loop (cursor adjustment)
- Changed 'ErrorStartup' to use 'ExitToShell' (removed extraneous 'ExitToShell' calls from "Startup.c".
- Moved modeless dialog support from main event loop to mouse up/down handlers.
- Changed 'ProcessIsFront' to take a ProcessSerialNumber instead of a long.
- Increased 'kSleepTicks' to 2 seconds to allow other processes to have more time.
1.0 beta 7 - Saturday, August 12, 1995
- Added code to quit after given period of no activity
(
kIdleTimeToQuit in "Constants.c"). Affected
functions 'doIdle', 'doAEOpenApp',
'StartupApplication' and 'CGIAESearchDoc'.
- Rearranged the source folders a bit and moved the rsrc files into
their own folder.
- Corrected ListSTAREvent '
aete' to have the correct class.
- Changed '
triggerValue' field of
'ListSTARRecord' to be a 'long *' so it can
be properly added to the AppleEvent reply.
1.0 beta 6 - Friday, August 11, 1995
- Fixed AboutBox to use UniversalProcPtr for the Icon user item.
- Finally tracked down the "losing pointers" problem with the
threaded code! I wasn't properly recycling the threads.
- Now checking for missed required params in CGI Apple Event.
1.0 beta 5 - Tuesday, August 8, 1995
- Added '
MyCGIStartup' function to "MyCGI.c". Allows for easily adding to
the startup sequence without having to modify the framework.
- Fixed '
cgiDisposeHandle' to actually dispose the handle
(ouch, what a memory leak!) as well as a few other leaks in
"CGI.c". That's why it's been called a beta version so far!
- Moved '
cgiAEGetParamString' and 'cgiAEGetParamShort' from "CGI.c" to
'AEGetParamString' and 'AEGetParamShort' in "AEFunc.c".
- Removed unneccessary 'actualType' variable from '
CGIAESearchDoc'.
- Added more assertions to various functions.
- Moved calls to cgi initialization code from '
main'
function to 'StartupApplication'.
- Moved code to install CGI AppleEvent to the '
InitCGIUtil' function.
- Added basic support for ListSTAR trigger and action events. (easy to not
include if you don't want this, see the section on
"ListSTAR Event Stuff" in the How To documentation).
- Added two new '
aete' resources to support the ListSTAR event
or both CGI and ListSTAR events. Be sure to use only one of
the included 'aete' resources.
- Corrected original '
aete' resource #0 to use
'TEXT' instead of 'char' for parameter types.
- Now disposing of window info handle when about box closes.
All about box memory leaks fixed.
- Now, I ask you, why would I be HLocking a DialogPtr in
'
aboutBoxAppIcon' ??? (fixed)
- Added '
gQuit = true;' line to 'MyCGIProcess'
so that the cgi will quit after it finishes processing cgi events. This
is a kludgy hack that will go away once I get around to writing a
proper quit timer.
1.0 beta 4 - Sunday, August 6, 1995
- '
CGIFormFieldsFindRecord' now takes a CGIHdl as it's first
parameter, rather than a CGIFormField*. See the function's
comments for instructions.
- Updated and expanded the documentation.
- Added "
compiler_stuff.h" (#included in every source file)
to help deal with differences between compiler environments.
- Added code to "
mainEventLoop" to yield more often if there
is more than one sub-thread.
- Split "
cgi.rsrc" into two files
("cgi.rsrc" and "MyCGI.rsrc"). The
"MyCGI.rsrc" is for resources that may need to change for
individual cgi applications. "cgi.rsrc" is for resources
that shouldn't need to change.
- Changed "
Events.c" to "EventUtil.c".
1.0 beta 3 - Friday, August 4, 1995
Hopefully last beta before first golden release...
[boy was I ever optimistic when I wrote that!]
- Added MW/PPC project file.
- Moved 'MyCGIProcess' out of "main.c" and into it's own file,
"MyCGIProcess.c"
- Changed thread code to use pre-allocated pool of threads.
Maximum number of 5 sub-threads at any one time
(change the constant '
kStartupThreadsPreallocate' in
"Startup.c"
to have a different number).
This will improve performance, especially on very busy systems.
- Added thread support in "
ProcessUtil.c",
"AEFunc.c", "AEHandlers.c",
"CGI.c", "WindowInt.c", "main.c"
and "Quit.c"
- Fixed bug in dialog event filter "
DialogUtil.c"
1.0 beta 2 - Tuesday, August 1, 1995
PowerPC code fix. The following files were updated:
- ErrorInt.c
- Added use of
NewModalFilterProc in ErrorAlertSystemString and ErrorAlertStartupString functions.
- main.c
- Corrected documentation comment for
MyCGIProcess function.
- MemoryUtil.c
- Added use of
NewGrowZoneProc in InitializeEmergencyMemory function.
- Startup.c
- Commented out troublesome line in
startupThreads function.
/* ( (Ptr)NewThread != kUnresolvedSymbolAddress ) && */
Any suggestions for how to fix this would be most welcome.
1.0 beta 1 - Sunday, July 9, 1995
First release. Distributed on Apprentice CD and Info-Mac ftp archives.
- 68K code only
- AppleScript 'aete' resource
- Basic thread support
Privacy Statement,
Legal Notices
Copyright ©1995-1998 Grant Neufeld. All rights reserved.
abc