moo_app_write_output(); fixed moo_app_output_write
parent
482e85d837
commit
09cfe3a8de
|
@ -644,6 +644,16 @@ moo_app_get_output_pipe_name (G_GNUC_UNUSED MooApp *app)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
moo_app_write_output (const char *data,
|
||||
gssize len)
|
||||
{
|
||||
g_return_if_fail (data != NULL);
|
||||
g_return_if_fail (moo_app_output != NULL);
|
||||
moo_app_output_write (moo_app_output, data, len);
|
||||
}
|
||||
|
||||
|
||||
const char*
|
||||
moo_app_get_rc_file_name (MooApp *app)
|
||||
{
|
||||
|
|
|
@ -93,6 +93,9 @@ const char *moo_app_get_rc_file_name (MooApp *app);
|
|||
const char *moo_app_get_input_pipe_name (MooApp *app);
|
||||
const char *moo_app_get_output_pipe_name (MooApp *app);
|
||||
|
||||
void moo_app_write_output (const char *data,
|
||||
gssize len);
|
||||
|
||||
MooEditor *moo_app_get_editor (MooApp *app);
|
||||
|
||||
void moo_app_prefs_dialog (GtkWidget *parent);
|
||||
|
|
|
@ -39,6 +39,7 @@ typedef enum
|
|||
|
||||
#if defined(WANT_MOO_APP_CMD_STRINGS) || defined(WANT_MOO_APP_CMD_CHARS)
|
||||
|
||||
/* 'g' is taken by ggap */
|
||||
#define CMD_ZERO "\0"
|
||||
#define CMD_PYTHON_STRING "p"
|
||||
#define CMD_PYTHON_FILE "P"
|
||||
|
|
|
@ -203,7 +203,7 @@ moo_app_output_write (MooAppOutput *ch,
|
|||
|
||||
/* XXX make a buffer, and so on */
|
||||
|
||||
while (TRUE)
|
||||
while (len)
|
||||
{
|
||||
gssize result = write (ch->out, data, len);
|
||||
|
||||
|
@ -225,7 +225,7 @@ moo_app_output_write (MooAppOutput *ch,
|
|||
return;
|
||||
}
|
||||
}
|
||||
else if (result < len)
|
||||
else
|
||||
{
|
||||
data += result;
|
||||
len -= result;
|
||||
|
|
Loading…
Reference in New Issue