@@ -24,50 +24,52 @@ USEFORM("float_constructor.cpp", frmConstructor);
2424USEFORM (" color.cpp" , AddColorForm);
2525USEFORM (" single_param.cpp" , AddFloatForm);
2626// ---------------------------------------------------------------------------
27- FILE *g_LogFileHandle = NULL ;
27+ FILE *g_LogFileHandle = NULL ;
28+
2829// ---------------------------------------------------------------------------
2930
3031
3132// ---------------------------------------------------------------------------
32- void log_callback (LPCSTR lpString)
33+ void log_callback (LPCSTR lpString)
3334{
3435 if (!g_LogFileHandle)
35- return ;
36- fprintf (g_LogFileHandle, " %s\n " , lpString);
36+ return ;
37+ fprintf (g_LogFileHandle, " %s\n " , lpString);
3738}
3839
3940
4041WINAPI WinMain (HINSTANCE, HINSTANCE, LPSTR, int )
4142{
4243 try
4344 {
44- g_LogFileHandle = fopen (" postprocess.log" , " wt" );
45- Core._initialize (" Postprocess editor" , log_callback, FALSE );
46- FS._initialize (CLocatorAPI::flScanAppRoot, 0 , 0 );
47-
48- Application->Initialize ();
49- Application->CreateForm (__classid (TMainForm), &MainForm);
50- Application->Run ();
51- Core._destroy ();
52- fclose (g_LogFileHandle);
53- }
54- catch (Exception &exception)
45+ g_LogFileHandle = fopen (" postprocess.log" , " wt" );
46+ Core._initialize (" Postprocess editor" , log_callback, FALSE );
47+ FS._initialize (CLocatorAPI::flScanAppRoot, 0 , 0 );
48+
49+ Application->Initialize ();
50+ Application->CreateForm (__classid (TMainForm), &MainForm);
51+ Application->Run ();
52+ Core._destroy ();
53+ fclose (g_LogFileHandle);
54+ } catch (Exception &exception)
5555 {
56- fclose (g_LogFileHandle);
57- Application->ShowException (&exception);
56+ fclose (g_LogFileHandle);
57+ Application->ShowException (&exception);
5858 }
5959 catch (...)
6060 {
61- try
62- {
63- throw Exception (" " );
64- }
65- catch (Exception &exception)
66- {
67- fclose (g_LogFileHandle);
68- Application->ShowException (&exception);
69- }
61+ try
62+ {
63+ throw Exception (" " );
64+ } catch (Exception &exception)
65+ {
66+ fclose (g_LogFileHandle);
67+ Application->ShowException (&exception);
68+ }
7069 }
7170 return 0 ;
7271}
72+
7373// ---------------------------------------------------------------------------
74+
75+
0 commit comments