FrontierMacMain.c

Go to the documentation of this file.
00001 
00002 /*  $Id: FrontierMacMain.c 355 2005-01-11 22:48:55Z andreradke $    */
00003 
00004 /******************************************************************************
00005 
00006     UserLand Frontier(tm) -- High performance Web content management,
00007     object database, system-level and Internet scripting environment,
00008     including source code editing and debugging.
00009 
00010     Copyright (C) 1992-2004 UserLand Software, Inc.
00011 
00012     This program is free software; you can redistribute it and/or modify
00013     it under the terms of the GNU General Public License as published by
00014     the Free Software Foundation; either version 2 of the License, or
00015     (at your option) any later version.
00016 
00017     This program is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020     GNU General Public License for more details.
00021 
00022     You should have received a copy of the GNU General Public License
00023     along with this program; if not, write to the Free Software
00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 
00026 ******************************************************************************/
00027 
00028 #include <standard.h>
00029 #include "config.h"
00030 #include "dialogs.h"
00031 #include "file.h"
00032 #include "strings.h"
00033 #include "db.h" /*stats*/
00034 #include "shell.h"
00035 #include "lang.h"
00036 #include "langinternal.h"
00037 #include "langexternal.h"
00038 #include "tableverbs.h"
00039 #include "opverbs.h"
00040 #include "scripts.h"
00041 #include "menuverbs.h"
00042 #include "pictverbs.h"
00043 #include "wpverbs.h"
00044 #include "cancoon.h"
00045 #include "command.h"
00046 #ifdef flcomponent
00047     #include "osacomponent.h"
00048 #endif
00049 #include "odbinternal.h"
00050 #include "kernelverbs.h"
00051 #include "kernelverbdefs.h"
00052 #ifdef fliowa
00053     #include "iowaverbs.h" /*3/18/92 dmb*/
00054 #endif
00055 
00056 
00057 static boolean ccstart (void) {
00058     
00059     tyfilespec fs;
00060     hdlfilenum fnum;
00061     odbref odb;
00062     
00063     fs.vRefNum = 0;
00064     fs.parID = 0;
00065     copystring ("\podbTester.root", fs.name);
00066     
00067     if (!fileopenorcreate  (&fs, 'CLNG', 'ROOT', &fnum)) {
00068         
00069         alertdialog ("\pError creating file.\n");
00070         
00071         goto error;
00072         }
00073 
00074     if (!odbNewFile (fnum)) {
00075     
00076         alertdialog ("\pError creating new database\n");
00077         
00078         goto error;
00079         }
00080     
00081     if (!odbOpenFile (fnum, &odb)) {
00082     
00083         alertdialog ("\pError opening database\n");
00084         
00085         goto error;
00086         }
00087     
00088     return true;
00089     
00090     error:
00091         return false;
00092     } /*ccstart*/
00093 
00094 
00095 void main (void) {
00096     
00097     /*
00098     3.0.4b6 dmb: call osacomponentstart from here, after the shell
00099     is more thoroughly initialized.
00100     */
00101     
00102     iddefaultconfig = idscriptconfig;
00103     
00104     Debugger ();
00105     
00106     assert (sizeof (tyvaluerecord) == 8);
00107     
00108     assert (sizeof (tyhashnode) == 18);
00109     
00110     if (!shellstart ())
00111         return;
00112     
00113     if (!opstart ())
00114         shellquit ();
00115     
00116     /*
00117     if (!menustart ())
00118         shellquit ();
00119     
00120     if (!tablestart ())
00121         shellquit ();
00122     
00123     if (!scriptstart ())
00124         shellquit ();
00125     
00126     if (!wpstart ())
00127         shellquit ();
00128     
00129     if (!cmdstart ())
00130         shellquit ();
00131     
00132     if (!langdialogstart ())
00133         shellquit ();
00134     
00135     if (!langerrorstart ())
00136         shellquit ();
00137     
00138     #ifdef iowaRuntime
00139     
00140     if (!langcardstart ())
00141         shellquit ();
00142     
00143     #endif
00144         
00145     if (!statsstart ())
00146         shellquit (); 
00147         
00148     if (!pictstart ())
00149         shellquit ();
00150     */
00151 
00152     if (!ccstart ())
00153         shellquit ();
00154     
00155     #ifdef flcomponent
00156     
00157     if (!osacomponentstart ())
00158         ;   // don't quit if this doesn't work
00159     
00160     #endif
00161     
00162     shellmaineventloop ();
00163     } /*main*/
00164 

Generated on Wed May 31 18:19:47 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6