void ft_tmp_to_chain(t_printf *s, int count) { int i; i = 0; // if ((s->prec == 1 && s->prec_valor > 0) || s->prec == 0) // { if (s->tmp[0] == '0' && (s->tmp[1] == 'x' || s->tmp[1] == 'X') && s->O == 1) { s->chaine[s->j++] = s->tmp[i++]; s->chaine[s->j++] = s->tmp[i++]; } while (count > 0 && s->under != 1) { ft_complete(s); count--; } while (s->tmp[i] && ((s->prec == 1 && s->prec_valor > 0) || s->prec == 0)) s->chaine[s->j++] = s->tmp[i++]; while (s->tmp[i++] && s->width != 0) s->chaine[s->j++] = ' '; while (count > 0 && s->under == 1) { ft_complete(s); count--; } // } }
/* Process an abort from no longer being in 3270 mode. */ static void ft_in3270(bool ignored _is_unused) { if (!IN_3270 && ft_state != FT_NONE) { ft_complete(get_message("ftNot3270")); } }
/* Process a disconnect abort. */ static void ft_connected(bool ignored _is_unused) { if (!CONNECTED && ft_state != FT_NONE) { ft_complete(get_message("ftDisconnected")); } }
/* * Cancel a file transfer. * * Returns true if the transfer if the cancellation is complete, false if it * is pending (because it must be coordinated with the host). */ bool ft_do_cancel(void) { if (ft_state == FT_RUNNING) { ft_state = FT_ABORT_WAIT; return false; } else { if (ft_state != FT_NONE) { ft_complete(get_message("ftUserCancel")); } return true; } }
/* Timeout function for stalled transfers. */ static void ft_didnt_start(ioid_t id _is_unused) { ft_start_id = NULL_IOID; if (fts.local_file != NULL) { fclose(fts.local_file); fts.local_file = NULL; if (ftc->receive_flag && !ftc->append_flag) { unlink(ftc->local_filename); } } ft_complete(get_message("ftStartTimeout")); }