* ** DELETE THE GENERATED COMMENTS! **
*/
+#include <stdint.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"
#include <stdio.h>
-#if defined(linux) || defined(CSRG_BASED)
-#include <strstream>
-#else
-#include <strstream.h>
-#endif
+#include <sstream>
#include <Xm/TextF.h>
#include <Xm/List.h>
XmTextFieldSetString( instance->chooserText, 0 );
XtVaSetValues( instance->chooser, XmNtitle, title, NULL );
- std::ostrstream valuesStream;
+ std::ostringstream valuesStream;
valuesStream << itemCount << " " << valuesLabel;
if (itemCount != 1) valuesStream << "s";
valuesStream << ends;
- DtTtSetLabel( instance->chooserList_label, valuesStream.str() );
- delete valuesStream.str();
+ DtTtSetLabel( instance->chooserList_label, valuesStream.str().c_str() );
// Remember dialog mode, entity
XtVaSetValues( instance->chooserOkButton, XmNuserData, choice, NULL );
break;
}
void *entity = DtTtNth( type, info->item_position - 1 );
- std::ostrstream entityName;
+ std::ostringstream entityName;
if (isString) {
entityName << (char *)entity << ends;
} else {
entityName << entity << ends;
}
- XmTextFieldSetString( instance->chooserText, entityName.str() );
- delete entityName.str();
+ XmTextFieldSetString( instance->chooserText, const_cast<char *>(entityName.str().c_str()) );
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
}
ival = 0;
sscanf( text, "%i", &ival );
- msg = (Tt_message)ival;
+ msg = (Tt_message) (intptr_t) ival;
if (DtTtIndex( DTTT_MESSAGE, msg ) < 0) {
return;
}
}
ival = 0;
sscanf( text, "%i", &ival );
- pat = (Tt_pattern)ival;
+ pat = (Tt_pattern) (intptr_t) ival;
if (DtTtIndex( DTTT_PATTERN, pat ) < 0) {
return;
}
}
ival = 0;
sscanf( text, "%i", &ival );
- pats = (Tt_pattern *)ival;
+ pats = (Tt_pattern *) (intptr_t) ival;
if (DtTtIndex( DTTT_DTSESSION, pats ) < 0) {
return;
}
}
ival = 0;
sscanf( text, "%i", &ival );
- pats = (Tt_pattern *)ival;
+ pats = (Tt_pattern *) (intptr_t) ival;
if (DtTtIndex( DTTT_DTFILE, pats ) < 0) {
return;
}