X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fgui%2Fwidgets%2FScriptingDock.cxx;h=ce00030473be583013b5fc2eac81a9dbd8ec2591;hp=72ba9b003846328aea57a6cac0b39d3e9141ab5b;hb=ccde95277ce5e3929d09aef387c2f5956592d066;hpb=80e723c9120ba3cf448de3c64b96c59a9c91033d diff --git a/src/gui/widgets/ScriptingDock.cxx b/src/gui/widgets/ScriptingDock.cxx index 72ba9b0..ce00030 100644 --- a/src/gui/widgets/ScriptingDock.cxx +++ b/src/gui/widgets/ScriptingDock.cxx @@ -1,36 +1,36 @@ #include "ScriptingDock.hxx" namespace { - SCM handler (void *data, SCM tag, SCM throw_args) { - scm_handle_by_message_noexit ((void*)"foo", tag, throw_args); - return SCM_BOOL_F; - } + SCM handler (void*, SCM tag, SCM throw_args) { + scm_handle_by_message_noexit ((void*)"foo", tag, throw_args); + return SCM_BOOL_F; + } } void ScriptingDock::doEvaluate() { - QString text = line->text(); - line->clear(); - LOG4CXX_INFO(logger, "Evaluating String \"" << text.toStdString() << "\""); - browser->append(QString("> ") + text); - - SCM result_obj = scm_internal_catch(SCM_BOOL_T, - (SCM (*)(void *))scm_c_eval_string, - (void*)text.toStdString().c_str(), - handler, NULL); - SCM result_str = scm_object_to_string(result_obj, SCM_UNDEFINED); + QString text = line->text(); + line->clear(); + LOG4CXX_INFO(logger, "Evaluating String \"" << text.toStdString() << "\""); + browser->append(QString("> ") + text); - SCM output = scm_get_output_string(guile_output_port); - QString output_q = scm_to_locale_string(output); - if (output_q.endsWith("\n")) output_q.chop(1); - if (output_q != "") browser->append(output_q); + SCM result_obj = scm_internal_catch(SCM_BOOL_T, + (SCM (*)(void *))scm_c_eval_string, + (void*)text.toStdString().c_str(), + handler, NULL); + SCM result_str = scm_object_to_string(result_obj, SCM_UNDEFINED); - output = scm_get_output_string(guile_error_port); - output_q = scm_to_locale_string(output); - if (output_q.endsWith("\n")) output_q.chop(1); - if (output_q != "") browser->append(output_q); + SCM output = scm_get_output_string(guile_output_port); + QString output_q = scm_to_locale_string(output); + if (output_q.endsWith("\n")) output_q.chop(1); + if (output_q != "") browser->append(output_q); - scm_truncate_file(guile_output_port, scm_from_uint16(0)); - scm_truncate_file(guile_error_port, scm_from_uint16(0)); - - browser->append(scm_to_locale_string(result_str)); + output = scm_get_output_string(guile_error_port); + output_q = scm_to_locale_string(output); + if (output_q.endsWith("\n")) output_q.chop(1); + if (output_q != "") browser->append(output_q); + + scm_truncate_file(guile_output_port, scm_from_uint16(0)); + scm_truncate_file(guile_error_port, scm_from_uint16(0)); + + browser->append(scm_to_locale_string(result_str)); }