home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.pen
- Path: sparky!uunet!gatech!paladin.american.edu!howland.reston.ans.net!wupost!eclnews!usenet
- From: dale@manet.wustl.edu (Dale Frye)
- Subject: Smallest PenPoint App (code size)
- Message-ID: <1992Dec24.165438.407@wuecl.wustl.edu>
- Sender: usenet@wuecl.wustl.edu (News Administrator)
- Nntp-Posting-Host: degas
- Reply-To: dale@manet.wustl.edu
- Organization: Washington University, School of Engineering, St. Louis MO
- Date: Thu, 24 Dec 1992 16:54:38 GMT
- Lines: 38
-
- My boss asked me to come up with the minimum size PenPoint app. I took
- EmptyApp and cut out everything I felt not needed. I threw out the
- method.tbl (not needed if not handling any messages) and stripped out
- everything not needed. My question: Is there anything else that can be
- stripped out? I did compile and run the code.
-
- Dale Frye
- Washington University in St. Louis
-
- ----------------------------------------------------------
- /********* emptyapp.c *************/
- #include <app.h>
- #include <appmgr.h> // for AppMgr startup
- stuff
- #define clsEmptyApp wknGDTa
- STATUS ClsEmptyAppInit (void)
- {
- APP_MGR_NEW new;
- ObjectCall(msgNewDefaults, clsAppMgr, &new);
- new.object.uid = clsEmptyApp;
- new.cls.ancestor = clsApp;
- new.cls.newArgsSize = SizeOf(APP_NEW);
- ObjectCall(msgNew, clsAppMgr, &new);
- return stsOK;
- } /* ClsEmptyAppInit */
- void CDECL main (
- int argc,
- char * argv[],
- U16 processCount)
- {
- if (processCount == 0) {
- ClsEmptyAppInit();
- AppMonitorMain(clsEmptyApp, objNull);
- } else {
- AppMain();
- }
- Unused(argc); Unused(argv);} /* main */
-
-