char buf[40]; sprintf(buf, "C%04o %lu ", modes, size); back->send(buf, strlen(buf)); back->send(name, strlen(name)); back->send("\n", 1); return response();
if (using_sftp) { char *fullname; if (scp_sftp_targetisdir) { fullname = dupcat(scp_sftp_remotepath, "/", name, NULL); } else { fullname = dupstr(scp_sftp_remotepath); } scp_sftp_filehandle = fxp_open(fullname, SSH_FXF_WRITE | SSH_FXF_CREAT | SSH_FXF_TRUNC); if (!scp_sftp_filehandle) { tell_user(stderr, "pscp: unable to open %s: %s", fullname, fxp_error()); errs++; return 1; } scp_sftp_fileoffset = uint64_make(0, 0); sfree(fullname); return 0; } else { char buf[40]; sprintf(buf, "C%04o %lu ", modes, size); back->send(buf, strlen(buf)); back->send(name, strlen(name)); back->send("\n", 1); return response(); }
int scp_send_filename(char *name, unsigned long size, int modes){    char buf[40];    sprintf(buf, "C%04o %lu ", modes, size);    back->send(buf, strlen(buf));    back->send(name, strlen(name));    back->send("\n", 1);    return response();}