1 /* === S I N F G =========================================================== */
3 ** \brief Sinfg Studio Entrypoint
5 ** $Id: main.cpp,v 1.2 2005/01/13 18:37:30 darco Exp $
8 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
10 ** This software and associated documentation
11 ** are CONFIDENTIAL and PROPRIETARY property of
12 ** the above-mentioned copyright holder.
14 ** You may not copy, print, publish, or in any
15 ** other way distribute this software without
16 ** a prior written agreement with
17 ** the copyright holder.
20 /* ========================================================================= */
22 /* === H E A D E R S ======================================================= */
38 /* === U S I N G =========================================================== */
42 using namespace sinfg;
43 using namespace studio;
45 /* === M A C R O S ========================================================= */
47 /* === G L O B A L S ======================================================= */
49 /* === P R O C E D U R E S ================================================= */
51 /* === M E T H O D S ======================================================= */
53 /* === E N T R Y P O I N T ================================================= */
55 int main(int argc, char **argv)
58 SmartFILE file(IPC::make_connection());
61 fprintf(file.get(),"F\n");
63 // Hey, another copy of us is open!
64 // don't bother opening us, just go ahead and
65 // tell the other copy to load it all up
68 for(;argc>=1;(argc)--)
69 if((argv)[argc] && (argv)[argc][0]!='-')
71 fprintf(file.get(),"O %s\n",etl::absolute_path((argv)[argc]).c_str());
75 fprintf(file.get(),"F\n");
83 studio::App app(&argc, &argv);
87 catch(sinfg::SoftwareExpired)
89 cerr<<"FATAL: Software Expired"<<endl;
94 std::cerr<<"Application shutdown with errors ("<<ret<<')'<<std::endl;
99 std::cerr<<"Uncaught Exception:string: "<<str<<std::endl;
102 catch(std::exception x)
104 std::cerr<<"Standard Exception: "<<x.what()<<std::endl;
107 catch(Glib::Exception& x)
109 std::cerr<<"GLib Exception: "<<x.what()<<std::endl;
114 std::cerr<<"Uncaught Exception"<<std::endl;
118 std::cerr<<"Application appears to have terminated successfuly"<<std::endl;