|
lftp
4.4.6
About: lftp is a command line ftp client (FTP, HTTP, ssl support, background transfer, reget, reput, ...)
Fossies Dox: lftp-4.4.6.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation) ![]() |


Go to the source code of this file.
Classes | |
| struct | subst_t |
Macros | |
| #define | find_char(buf, len, ch) ((const char *)memchr(buf,ch,len)) |
| #define | ListAdd(type, chain, this, next) |
| #define | ListScan(type, chain, next) for(type *scan=chain; scan; scan=scan->next) |
| #define | ListScanPtr(type, chain, next) for(type **scan=&chain; *scan; scan=&scan[0]->next) |
| #define | ListDel(type, chain, this, next) |
Functions | |
| const char * | expand_home_relative (const char *) |
| const char * | basename_ptr (const char *) |
| const char * | dir_file (const char *dir, const char *file) |
| const char * | url_file (const char *url, const char *file) |
| const char * | output_file_name (const char *src, const char *dst, bool dst_local, const char *dst_base, bool make_dirs) |
| const char * | squeeze_file_name (const char *name, int w) |
| int | create_directories (char *) |
| void | truncate_file_tree (const char *dir) |
| int | fd_width (int fd) |
| bool | in_foreground_pgrp () |
| char * | xgetcwd () |
| int | percent (off_t offset, off_t size) |
| int | parse_month (const char *) |
| int | parse_perms (const char *) |
| const char * | format_perms (int p) |
| int | parse_year_or_time (const char *year_or_time, int *year, int *hour, int *minute) |
| int | guess_year (int month, int day, int hour, int minute) |
| time_t | mktime_from_utc (const struct tm *) |
| time_t | mktime_from_tz (struct tm *, const char *tz) |
| bool | re_match (const char *line, const char *a, int flags=0) |
| char * | Subst (const char *txt, const subst_t *s) |
| void | xgettimeofday (time_t *sec, int *usec) |
| char * | xstrftime (const char *format, const struct tm *tm) |
| void | strip_trailing_slashes (xstring &fn) |
| xstring & | dirname_modify (xstring &fn) |
| xstring & | dirname (const char *path) |
| char | last_char (const char *str) |
| int | base64_length (int len) |
| void | base64_encode (const char *s, char *store, int length) |
| bool | temporary_network_error (int e) |
| CDECL const char * | get_home () |
| CDECL const char * | get_lftp_config_dir () |
| CDECL const char * | get_lftp_data_dir () |
| CDECL const char * | get_lftp_cache_dir () |
| const char * | memrchr (const char *buf, char c, size_t len) |
| const xstring & | shell_encode (const char *) |
| void | remove_tags (char *buf) |
| void | rtrim (char *s) |
| void | random_init () |
| double | random01 () |
| const char * | get_nodename () |
Variables | |
| const char | month_names [][4] |
| #define find_char | ( | buf, | |
| len, | |||
| ch | |||
| ) | ((const char *)memchr(buf,ch,len)) |
Definition at line 72 of file misc.h.
Referenced by FtpDirList::Do(), SSH_Access::HandleSSHMessage(), SSH_Access::LogSSHMessage(), and ParseFtpLongList_EPLF().
| #define ListAdd | ( | type, | |
| chain, | |||
| this, | |||
| next | |||
| ) |
Definition at line 133 of file misc.h.
Referenced by ResClient::ResClient().
| #define ListDel | ( | type, | |
| chain, | |||
| this, | |||
| next | |||
| ) |
Definition at line 145 of file misc.h.
Referenced by Job::PrepareToDie(), FileAccess::~FileAccess(), and ResClient::~ResClient().
| #define ListScan | ( | type, | |
| chain, | |||
| next | |||
| ) | for(type *scan=chain; scan; scan=scan->next) |
Definition at line 139 of file misc.h.
Referenced by Job::AllocJobno(), Job::BuryDoneJobs(), Job::Cleanup(), Job::FindAnyChild(), Job::FindJob(), Job::FindWhoWaitsFor(), Job::FormatJobs(), Job::KillAll(), Job::lftpMovesToBackground_ToAll(), Job::ListDoneJobs(), Job::NumberOfJobs(), Job::PrepareToDie(), ResClient::ReconfigAll(), and Job::WaitForAllChildren().
| #define ListScanPtr | ( | type, | |
| chain, | |||
| next | |||
| ) | for(type **scan=&chain; *scan; scan=&scan[0]->next) |
| void base64_encode | ( | const char * | s, |
| char * | store, | ||
| int | length | ||
| ) |
| const char* basename_ptr | ( | const char * | ) |
Definition at line 149 of file misc.cc.
Referenced by FileAccess::Path::Change(), CMD(), SysCmdJob::Do(), GetFileInfo::Do(), clsJob::Do(), ResMgr::FileCreatable(), GetFileInfo::GetFileInfo(), LsCache::IsDirectory(), mvJob::mvJob(), output_file_name(), FileSetOutput::print(), squeeze_file_name(), and CopyJob::SqueezeName().
| int create_directories | ( | char * | ) |
Definition at line 188 of file misc.cc.
References strchr, and strerror().
| const char* dir_file | ( | const char * | dir, |
| const char * | file | ||
| ) |
Definition at line 54 of file misc.cc.
References xstring::get_tmp(), NULL, xstring::set(), and xstring::vset().
Referenced by LsCache::Changed(), CMD(), LocalAccess::Do(), GenericGlob::Do(), MirrorJob::Do(), FileCopyPeerFDStream::Do(), LocalListInfo::Do(), ResMgr::FileAccessible(), ResMgr::FileCreatable(), FileStream::FileStream(), FinderJob::FormatStatus(), FileAccess::GetFileURL(), FileSet::LocalChmod(), FileSet::LocalChown(), FileSet::LocalUtime(), FileCopy::LogTransfer(), main(), ParsedURL::parse(), FileSet::PrependPath(), FinderJob_List::ProcessFile(), FinderJob::ShowRunStatus(), LocalAccess::StoreStatus(), url_file(), and FileCopyPeerFA::WantSize().
| xstring& dirname | ( | const char * | path) |
Definition at line 683 of file misc.cc.
References dirname_modify(), and xstring::get_tmp().
Referenced by GetFileInfo::Do(), FileCopyPeerFDStream::Do(), ResMgr::FileCreatable(), and glob().
Definition at line 671 of file misc.cc.
References strip_trailing_slashes(), strrchr, and xstring::truncate().
Referenced by FileAccess::Path::Change(), LsCache::Changed(), and dirname().
| const char* expand_home_relative | ( | const char * | ) |
Definition at line 159 of file misc.cc.
References xstring::get_tmp(), NULL, s, strchr, and xstring::vset().
Referenced by CmdExec::builtin_lcd(), CMD(), mgetJob::Do(), ResMgr::FileAccessible(), and output_file_name().
| int fd_width | ( | int | fd) |
Definition at line 251 of file misc.cc.
Referenced by OutputJob::OutputJob(), and CmdExec::print_cmd_index().
| const char* format_perms | ( | int | p) |
| CDECL const char* get_home | ( | ) |
Definition at line 771 of file misc.cc.
References NULL.
Referenced by get_lftp_dir(), and get_lftp_home_nocreate().
| CDECL const char* get_lftp_cache_dir | ( | ) |
Definition at line 862 of file misc.cc.
References get_lftp_dir().
| CDECL const char* get_lftp_config_dir | ( | ) |
| CDECL const char* get_lftp_data_dir | ( | ) |
Definition at line 857 of file misc.cc.
References get_lftp_dir().
| const char* get_nodename | ( | ) |
Definition at line 985 of file misc.cc.
Referenced by AcceptTermFD::get_sock_path().
| int guess_year | ( | int | month, |
| int | day, | ||
| int | hour, | ||
| int | minute | ||
| ) |
Definition at line 409 of file misc.cc.
References now, SMTask::now, and tm.
Referenced by FileInfo::parse_ls_line().
| bool in_foreground_pgrp | ( | ) |
Definition at line 953 of file misc.cc.
References open().
Referenced by CmdExec::Done(), and ReadlineFeeder::NextCmd().
| char last_char | ( | const char * | str) |
Definition at line 688 of file misc.cc.
Referenced by CmdExec::builtin_cd(), CmdExec::builtin_open(), FileAccess::Path::Change(), CMD(), GetFileInfo::Do(), Http::Do(), CmdExec::Do(), ReadlineFeeder::NextCmd(), and QueueFeeder::QueueCmd().
| const char* memrchr | ( | const char * | buf, |
| char | c, | ||
| size_t | len | ||
| ) |
Definition at line 868 of file misc.cc.
Referenced by FileCopy::Do().
| time_t mktime_from_tz | ( | struct tm * | , |
| const char * | tz | ||
| ) |
Definition at line 522 of file misc.cc.
References mktime(), mktime_from_utc(), snprintf(), strcasecmp(), and string_alloca.
Referenced by FileInfo::parse_ls_line().
| time_t mktime_from_utc | ( | const struct tm * | ) |
Definition at line 464 of file misc.cc.
References memcpy, mktime(), and tm.
Referenced by Http::atotm(), Ftp::ConvertFtpDate(), and mktime_from_tz().
| const char* output_file_name | ( | const char * | src, |
| const char * | dst, | ||
| bool | dst_local, | ||
| const char * | dst_base, | ||
| bool | make_dirs | ||
| ) |
Definition at line 100 of file misc.cc.
References basename_ptr(), expand_home_relative(), ParsedURL::path, ParsedURL::proto, S_ISDIR, src, strchr, url_file(), and xstrlen().
Referenced by CMD(), and mgetJob::Do().
| int parse_month | ( | const char * | ) |
Definition at line 385 of file misc.cc.
References month_names, and strcasecmp().
Referenced by FileInfo::parse_ls_line().
| int parse_perms | ( | const char * | ) |
| int parse_year_or_time | ( | const char * | year_or_time, |
| int * | year, | ||
| int * | hour, | ||
| int * | minute | ||
| ) |
| int percent | ( | off_t | offset, |
| off_t | size | ||
| ) |
Definition at line 418 of file misc.cc.
Referenced by FileCopy::GetPercentDone().
| double random01 | ( | ) |
Definition at line 979 of file misc.cc.
Referenced by Range::Random().
| void random_init | ( | ) |
| bool re_match | ( | const char * | line, |
| const char * | a, | ||
| int | flags = 0 |
||
| ) |
| void remove_tags | ( | char * | buf) |
| const xstring& shell_encode | ( | const char * | ) |
Definition at line 877 of file misc.cc.
References c, xstring0::get_non_const(), xstring::get_space(), xstring::null, r, s, and xstring::set_length().
Referenced by LocalAccess::Do(), and Fish::Do().
| const char* squeeze_file_name | ( | const char * | name, |
| int | w | ||
| ) |
Definition at line 426 of file misc.cc.
References xstring::append(), b, basename_ptr(), mbsnwidth(), mbswidth, NULL, url::remove_password(), xstring::set(), and xstring::vset().
Referenced by mkdirJob::ShowRunStatus(), MirrorJob::ShowRunStatus(), CmdExec::ShowRunStatus(), TorrentJob::ShowRunStatus(), and CopyJob::SqueezeName().
| void strip_trailing_slashes | ( | xstring & | fn) |
Definition at line 661 of file misc.cc.
References xstring::length(), and xstring::truncate().
Referenced by FileAccess::Path::Change(), and dirname_modify().
| char* Subst | ( | const char * | txt, |
| const subst_t * | s | ||
| ) |
Definition at line 554 of file misc.cc.
References xstring::append(), xstring::borrow(), subst_t::from, NULL, and subst_t::to.
Referenced by CmdExec::FormatPrompt(), and StatusLine::WriteTitle().
| bool temporary_network_error | ( | int | e) |
Definition at line 739 of file misc.cc.
References ECONNABORTED, and ENETRESET.
Referenced by SMTask::TemporaryNetworkError().
| void truncate_file_tree | ( | const char * | dir) |
Definition at line 228 of file misc.cc.
References SignalHook::Ignore(), and NULL.
| const char* url_file | ( | const char * | url, |
| const char * | file | ||
| ) |
Definition at line 74 of file misc.cc.
References alloca_strdup, ParsedURL::Combine(), dir_file(), ParsedURL::path, ParsedURL::proto, xstring::set(), xstring::set_allocated(), and u.
Referenced by GlobURL::GetResult(), output_file_name(), and ParsedURL::parse().
| char* xgetcwd | ( | ) |
Definition at line 268 of file misc.cc.
References xmalloc_register_block().
Referenced by CMD(), CopyJobEnv::CopyJobEnv(), ResMgr::FileAccessible(), ResMgr::FileCreatable(), FileStream::FileStream(), LocalAccess::LocalAccess(), and LocalDirectory::SetFromCWD().
| void xgettimeofday | ( | time_t * | sec, |
| int * | usec | ||
| ) |
Definition at line 619 of file misc.cc.
References gettimeofday(), timeval::tv_sec, and timeval::tv_usec.
Referenced by Time::SetToCurrentTime().
| char* xstrftime | ( | const char * | format, |
| const struct tm * | tm | ||
| ) |
Definition at line 632 of file misc.cc.
References NULL, and xrealloc().
Referenced by FileSetOutput::print().
| const char month_names[][4] |
Definition at line 380 of file misc.cc.
Referenced by parse_month().