23#if defined(WIN32) || defined(_WINDOWS)
29# define DisposeWinsock(a)
75 (
void)
fprintf(fp,
"\nUsage: ncftp [flags] [<host> | <directory URL to browse>]\n");
77 -u XX Use username XX instead of anonymous.\n\
78 -p XX Use password XX with the username.\n\
79 -P XX Use port number XX instead of the default FTP service port (21).\n\
80 -j XX Use account XX with the username (rarely needed).\n\
81 -F Dump a sample $HOME/.ncftp/firewall prefs file to stdout and exit.\n");
88 (
void)
fprintf(fp,
"\nThis is a freeware program by Mike Gleason (ncftp@ncftp.com).\n");
89 (
void)
fprintf(fp,
"Use ncftpget and ncftpput for command-line FTP.\n\n");
213 if (urlfile[0] !=
'\0') {
271#if defined(WIN32) || defined(_WINDOWS)
282#if defined(WIN32) || defined(_WINDOWS)
298#if defined(WIN32) || defined(_WINDOWS)
337 Trace(0,
"Fw: %s Type: %d User: %s Pass: %s Port: %u\n",
346 Trace(0,
"NOTE: Your domain name could not be detected.\n");
348 Trace(0,
" Make sure you manually add your domain name to firewall-exception-list.\n");
360#if defined(WIN32) || defined(_WINDOWS)
364 (
void)
printf(
"\n\n\n\tThank you for using NcFTP Client.\n\tAsk your system administrator to try NcFTPd Server!\n\thttp://www.ncftpd.com\n\n\n\n");
char * strchr(const char *String, int ch)
#define STRNCPY(dst, src, n)
void SetBookmarkDefaults(BookmarkPtr bmp)
int GetBookmark(const char *const bmabbr, Bookmark *bmp)
DWORD WINAPI GetTickCount(VOID)
INT WINAPI WSAStartup(IN WORD wVersionRequested, OUT LPWSADATA lpWSAData)
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
void __cdecl srand(_In_ unsigned int _Seed)
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
void InitLineList(LineListPtr list)
int FTPGetCWD(const FTPCIPtr cip, char *const newCwd, const size_t newCwdSize)
int FTPChdir(const FTPCIPtr cip, const char *const cdCwd)
void FTPPerror(const FTPCIPtr cip, const int err, const int eerr, const char *const s1, const char *const s2)
const char * FTPStrError(int e)
char gLibNcFTPVersion[64]
void SaveUnsavedBookmark(void)
int Getopt(int nargc, const char **const nargv, const char *const ostr)
int gTransferTypeInitialized
unsigned int gFirewallPort
void InitConnectionInfo(void)
static void OpenURL(void)
static void PreInit(void)
LineList gStartupURLCdList
char gFirewallExceptionList[]
FTPProgressMeterProc gProgressMeter
#define DisposeWinsock(a)
static void DumpFirewallPrefsTemplate(void)
static void SetStartupURL(const char *const urlgiven)
static void PostInit(void)
static void PostShell(void)
int gStartupUrlParameterGiven
void InitCommandList(void)
int MayUseFirewall(const char *const hn, int firewallType, const char *const firewallExceptionList)
int DecodeDirectoryURL(const FTPCIPtr cip, char *url, LineListPtr cdlist, char *fn, size_t fnsize)
void AbbrevStr(char *dst, const char *src, size_t max, int mode)
#define kDefaultFTPBufSize
#define kFirewallNotInUse
char * FTPGetLocalCWD(char *buf, size_t size)
int FTPCloseHost(const FTPCIPtr cip)
int FTPInitConnectionInfo(const FTPLIPtr lip, const FTPCIPtr cip, size_t bufsize)
int FTPInitLibrary(const FTPLIPtr lip)
void(* FTPProgressMeterProc)(const FTPCIPtr, int)
void CheckForNewV3User(void)
void LoadFirewallPrefs(int)
void WriteDefaultFirewallPrefs(FILE *)
void DisposeReadline(void)
void SetXtermTitle(const char *const fmt,...)
void PrintStartupBanner(void)
void GetScreenColumns(void)
void RunBatchIfNeeded(const FTPCIPtr cip)
unsigned int firewallPort
size_t dataSocketRBufSize
FTPProgressMeterProc progress
const char * asciiFilenameExtensions
size_t dataSocketSBufSize
int PASCAL FAR WSACleanup(void)