• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

The MinGW.org Installation Manager Tool


Commit MetaInfo

Revisiond957741a049b565f3928c15405242c30c947ff54 (tree)
Time2012-10-18 22:08:05
AuthorKeith Marshall <keithmarshall@user...>
CommiterKeith Marshall

Log Message

Fix Diagnostic Message Handler initialisation logic.

Change Summary

Incremental Difference

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
1+2012-10-18 Keith Marshall <keithmarshall@users.sourceforge.net>
2+
3+ Fix Diagnostic Message Handler initialisation logic.
4+
5+ * src/dmh.cpp (dmh_init) [DMH_SUBSYSTEM_GUI]: Correct a logic error;
6+ it previously fell through after any successful initialisation of the
7+ DMH_SUBSYSTEM_GUI handler, replacing it with a DMH_SUBSYSTEM_TTY type
8+ handler. Also, assign a heap copy of the passed "progname" string
9+ resource, which is volatile, to ensure that the handler retains a
10+ valid reference.
11+
112 2012-10-11 Keith Marshall <keithmarshall@users.sourceforge.net>
213
314 Implement preliminary GUI mode data sheet compiler.
--- a/src/dmh.cpp
+++ b/src/dmh.cpp
@@ -104,16 +104,17 @@ EXTERN_C void dmh_init( const dmh_class subsystem, const char *progname )
104104 /* No message handler has yet been initialised;
105105 * passing the specified program name, select...
106106 */
107- if( (subsystem == DMH_SUBSYSTEM_GUI)
107+ if( subsystem == DMH_SUBSYSTEM_GUI )
108+ {
108109 /*
109110 * ...a GUI class handler on demand...
110111 */
111- && ((dmh = dmh_init_gui( progname )) == NULL) )
112- /*
113- * ...but bail out, if this cannot be initialised...
114- */
115- throw dmh_exception( "DMH subsystem initialisation failed" );
116-
112+ if( (dmh = dmh_init_gui( strdup( progname ))) == NULL )
113+ /*
114+ * ...but bail out, if this cannot be initialised...
115+ */
116+ throw dmh_exception( "DMH subsystem initialisation failed" );
117+ }
117118 else
118119 /* ...otherwise, a console class handler by default.
119120 */