OSDN Git Service

Added rudimentory error handling to HB. Instead of using hb_log() use hb_error()...
[handbrake-jp/handbrake-jp-git.git] / macosx / main.mm
1 /* $Id: main.mm,v 1.3 2005/11/25 15:04:35 titer Exp $
2
3    This file is part of the HandBrake source code.
4    Homepage: <http://handbrake.m0k.org/>.
5    It may be used under the terms of the GNU General Public License. */
6
7 #include <Cocoa/Cocoa.h>
8
9 void SigHandler( int signal )
10 {
11     [NSApp terminate: NULL];
12
13
14 /****************************************************************************
15  * hb_error_handler
16  * 
17  * Change this to display a dialog box - and maybe move it somewhere else,
18  * this is the only place I could find that looked like C :)
19 ****************************************************************************/
20 extern "C" {
21 void hb_error_handler( const char *errmsg )
22 {
23     fprintf(stderr, "ERROR: %s\n", errmsg );
24 }
25 }
26
27 int main( int argc, const char ** argv )
28 {
29     signal( SIGINT, SigHandler );
30     return NSApplicationMain( argc, argv );
31 }