ReactOS 0.4.15-dev-8241-g63935f8
main.c File Reference
#include "syshdrs.h"
#include "ls.h"
#include "bookmark.h"
#include "shell.h"
#include "cmds.h"
#include "main.h"
#include "getopt.h"
#include "progress.h"
#include "pref.h"
#include "readln.h"
#include "trace.h"
#include "log.h"
#include "spool.h"
#include "util.h"
Include dependency graph for main.c:

Go to the source code of this file.

Macros

#define DisposeWinsock(a)
 

Functions

static void Usage (void)
 
static void DumpFirewallPrefsTemplate (void)
 
void InitConnectionInfo (void)
 
void CloseHost (void)
 
static void SetStartupURL (const char *const urlgiven)
 
static void OpenURL (void)
 
static void PreInit (void)
 
static void PostInit (void)
 
static void Plug (void)
 
static void PostShell (void)
 
int main (int argc, const char **const argv)
 

Variables

int gStartupUrlParameterGiven = 0
 
int gIsTTY
 
int gIsTTYr
 
int gScreenColumns
 
FTPLibraryInfo gLib
 
FTPConnectionInfo gConn
 
LineList gStartupURLCdList
 
int gTransferTypeInitialized = 0
 
int gTransferType
 
int gURLMode = 0
 
int gUnprocessedJobs
 
char gLocalCWD [512]
 
char gPrevLocalCWD [512]
 
chargOptArg
 
int gOptInd
 
char gRemoteCWD [512]
 
char gPrevRemoteCWD [512]
 
Bookmark gBm
 
int gLoadedBm
 
int gFirstTimeUser
 
int gFirewallType
 
char gAutoAscii []
 
char gFirewallHost [64]
 
char gFirewallUser [32]
 
char gFirewallPass [32]
 
char gFirewallExceptionList []
 
char gCopyright []
 
char gVersion []
 
unsigned int gFirewallPort
 
int gConnTimeout
 
int gXferTimeout
 
int gCtrlTimeout
 
int gDataPortMode
 
int gRedialDelay
 
int gDebug
 
int gNumProgramRuns
 
int gDoNotDisplayAds
 
int gSOBufsize
 
FTPProgressMeterProc gProgressMeter
 

Macro Definition Documentation

◆ DisposeWinsock

#define DisposeWinsock (   a)

Definition at line 29 of file main.c.

Function Documentation

◆ CloseHost()

void CloseHost ( void  )

Definition at line 153 of file main.c.

154{
155 if (gConn.connected != 0) {
156 if (gConn.loggedIn != 0) {
158 }
160 }
161 gConn.ctrlTimeout = 3;
163} /* CloseHost */
void SaveUnsavedBookmark(void)
Definition: cmds.c:270
FTPConnectionInfo gConn
Definition: main.c:37
int FTPCloseHost(const FTPCIPtr cip)
Definition: open.c:523
void RunBatchIfNeeded(const FTPCIPtr cip)
Definition: spool.c:482
unsigned int ctrlTimeout
Definition: ncftp.h:143

Referenced by CloseCmd(), CommandShell(), OpenCmd(), and PostShell().

◆ DumpFirewallPrefsTemplate()

static void DumpFirewallPrefsTemplate ( void  )
static

Definition at line 97 of file main.c.

98{
100} /* DumpFirewallPrefsTemplate */
#define stdout
Definition: stdio.h:99
void WriteDefaultFirewallPrefs(FILE *)
Definition: preffw.c:39

Referenced by main().

◆ InitConnectionInfo()

void InitConnectionInfo ( void  )

Definition at line 109 of file main.c.

110{
111 int result;
112
114 if (result < 0) {
115 (void) fprintf(stderr, "ncftp: init connection info error %d (%s).\n", result, FTPStrError(result));
116 exit(1);
117 }
118
122 UseTrace();
123 (void) STRNCPY(gConn.user, "anonymous");
124 gConn.host[0] = '\0';
128 gConn.leavePass = 1; /* Don't let the lib zap it. */
133 gConn.maxDials = (-1); /* Dial forever, until they hit ^C. */
135 gPrevRemoteCWD[0] = '\0';
137 if (gRedialDelay >= 10)
139 if ((gAutoAscii[0] == '\0') || (ISTREQ(gAutoAscii, "no")) || (ISTREQ(gAutoAscii, "off")) || (ISTREQ(gAutoAscii, "false"))) {
141 } else {
143 }
144} /* InitConnectionInfo */
#define STRNCPY(dst, src, n)
Definition: rdesktop.h:168
#define NULL
Definition: types.h:112
GLuint64EXT * result
Definition: glext.h:11304
#define stderr
Definition: stdio.h:100
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
const char * FTPStrError(int e)
Definition: errno.c:114
#define ISTREQ(a, b)
Definition: util.h:33
int gSOBufsize
Definition: pref.c:50
int gTransferTypeInitialized
Definition: main.c:39
int gUnprocessedJobs
Definition: spool.c:19
int gTransferType
Definition: main.c:40
int gConnTimeout
Definition: pref.c:24
FTPLibraryInfo gLib
Definition: main.c:36
int gDataPortMode
Definition: preffw.c:26
int gDebug
Definition: ls.c:32
int gXferTimeout
Definition: main.c:59
char gAutoAscii[]
Definition: pref.c:56
int gRedialDelay
Definition: main.c:60
char gPrevRemoteCWD[512]
Definition: main.c:47
int gCtrlTimeout
Definition: main.c:59
void SetDebug(int i)
Definition: trace.c:88
void UseTrace(void)
Definition: trace.c:97
#define kDefaultFTPBufSize
Definition: ncftp.h:314
int FTPInitConnectionInfo(const FTPLIPtr lip, const FTPCIPtr cip, size_t bufsize)
Definition: open.c:984
#define kTypeBinary
Definition: ncftp.h:354
#define exit(n)
Definition: config.h:202
char host[64]
Definition: ncftp.h:136
unsigned int xferTimeout
Definition: ncftp.h:141
unsigned int connTimeout
Definition: ncftp.h:142
size_t dataSocketRBufSize
Definition: ncftp.h:230
int dataPortMode
Definition: ncftp.h:152
FTPProgressMeterProc progress
Definition: ncftp.h:198
const char * asciiFilenameExtensions
Definition: ncftp.h:246
FILE * debugLog
Definition: ncftp.h:145
FILE * errLog
Definition: ncftp.h:146
size_t dataSocketSBufSize
Definition: ncftp.h:231
char user[64]
Definition: ncftp.h:137

Referenced by OpenCmd(), and PreInit().

◆ main()

int main ( int argc  ,
const char **const  argv 
)

Definition at line 390 of file main.c.

391{
392 int c;
393 int n;
394
395 PreInit();
396 while ((c = Getopt(argc, argv, "P:u:p:J:rd:g:FVLD")) > 0) switch(c) {
397 case 'P':
398 case 'u':
399 case 'p':
400 case 'J':
402 break;
403 case 'r':
404 case 'g':
405 case 'd':
406 case 'V':
407 case 'L':
408 case 'D':
409 case 'F':
410 break;
411 default:
412 Usage();
413 }
414
415 if (gOptInd < argc) {
418 } else if (gStartupUrlParameterGiven != 0) {
419 /* One of the flags they specified
420 * requires a URL or hostname to
421 * open.
422 */
423 Usage();
424 }
425
426 GetoptReset();
427 /* Allow command-line parameters to override
428 * bookmark settings.
429 */
430
431 while ((c = Getopt(argc, argv, "P:u:p:j:J:rd:g:FVLD")) > 0) switch(c) {
432 case 'P':
434 break;
435 case 'u':
437 break;
438 case 'p':
439 (void) STRNCPY(gConn.pass, gOptArg); /* Don't recommend doing this! */
440 break;
441 case 'J':
442 case 'j':
444 break;
445 case 'r':
446 /* redial is always on */
447 break;
448 case 'g':
450 break;
451 case 'd':
452 n = atoi(gOptArg);
453 if (n >= 10)
455 break;
456 case 'F':
458 exit(0);
459 /*NOTREACHED*/
460 break;
461 case 'V':
462 /*FALLTHROUGH*/
463 case 'L':
464 /*FALLTHROUGH*/
465 case 'D':
466 /* silently ignore these legacy options */
467 break;
468 default:
469 Usage();
470 }
471
472 PostInit();
473 OpenURL();
474 CommandShell();
475 PostShell();
476 exit(0);
477} /* main */
static int argc
Definition: ServiceArgs.c:12
GLdouble n
Definition: glext.h:7729
const GLubyte * c
Definition: glext.h:8905
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
Definition: hidpi.h:384
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
#define c
Definition: ke_i.h:80
void GetoptReset(void)
Definition: getopt.c:21
int Getopt(int nargc, const char **const nargv, const char *const ostr)
Definition: getopt.c:42
static void OpenURL(void)
Definition: main.c:233
int gOptInd
Definition: getopt.c:14
static void PreInit(void)
Definition: main.c:267
char * gOptArg
Definition: getopt.c:16
static void DumpFirewallPrefsTemplate(void)
Definition: main.c:97
static void SetStartupURL(const char *const urlgiven)
Definition: main.c:172
static void PostInit(void)
Definition: main.c:325
static void PostShell(void)
Definition: main.c:374
int gStartupUrlParameterGiven
Definition: main.c:32
void CommandShell(void)
Definition: shell.c:499
#define argv
Definition: mplay32.c:18
void LoadFirewallPrefs(int)
Definition: preffw.c:268
unsigned int port
Definition: ncftp.h:140
char pass[64]
Definition: ncftp.h:138
char acct[64]
Definition: ncftp.h:139

◆ OpenURL()

static void OpenURL ( void  )
static

Definition at line 233 of file main.c.

234{
235 LinePtr lp;
236 int result;
237
238 if (gURLMode == 1) {
240 if (DoOpen() >= 0) {
241 for (lp = gStartupURLCdList.first; lp != NULL; lp = lp->next) {
242 result = FTPChdir(&gConn, lp->line);
243 if (result != kNoErr) {
244 FTPPerror(&gConn, result, kErrCWDFailed, "Could not chdir to", lp->line);
245 break;
246 }
247 }
249 if (result != kNoErr) {
251 } else {
252 (void) printf("Current remote directory is %s.\n", gRemoteCWD);
253 }
254 }
255 } else if (gURLMode == 2) {
256 (void) DoOpen();
257 }
258} /* OpenURL */
void SetBookmarkDefaults(BookmarkPtr bmp)
Definition: bookmark.c:74
#define printf
Definition: freeldr.h:97
int FTPGetCWD(const FTPCIPtr cip, char *const newCwd, const size_t newCwdSize)
Definition: cmds.c:254
int FTPChdir(const FTPCIPtr cip, const char *const cdCwd)
Definition: cmds.c:11
void FTPPerror(const FTPCIPtr cip, const int err, const int eerr, const char *const s1, const char *const s2)
Definition: errno.c:134
int DoOpen(void)
Definition: cmds.c:2168
int gURLMode
Definition: main.c:41
LineList gStartupURLCdList
Definition: main.c:38
char gRemoteCWD[512]
Definition: cmds.c:33
Bookmark gBm
Definition: bookmark.c:24
#define kNoErr
Definition: ncftp_errno.h:9
#define kErrPWDFailed
Definition: ncftp_errno.h:41
#define kErrCWDFailed
Definition: ncftp_errno.h:42
LinePtr first
Definition: ncftp.h:85
Definition: ncftp.h:79
char * line
Definition: ncftp.h:81
LinePtr next
Definition: ncftp.h:80

Referenced by main().

◆ Plug()

static void Plug ( void  )
static

Definition at line 358 of file main.c.

359{
360#if defined(WIN32) || defined(_WINDOWS)
361 /* NcFTPd hasn't been ported to Windows. */
362#else
363 if ((gDoNotDisplayAds == 0) && ((gNumProgramRuns % 7) == 2)) {
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");
365 }
366#endif
367} /* Plug */
int gNumProgramRuns
Definition: preffw.c:14
int gDoNotDisplayAds
Definition: main.c:62

Referenced by PostShell().

◆ PostInit()

static void PostInit ( void  )
static

Definition at line 325 of file main.c.

326{
328 OpenTrace();
329 InitTermcap();
330 InitReadline();
332 gPrevLocalCWD[0] = '\0';
334 if (gNumProgramRuns <= 1)
335 (void) printf("\n%s\n", gCopyright + 5);
336
337 Trace(0, "Fw: %s Type: %d User: %s Pass: %s Port: %u\n",
341 (gFirewallPass[0] == '\0') ? "(none)" : "********",
343 );
344 Trace(0, "FwExceptions: %s\n", gFirewallExceptionList);
345 if (strchr(gLib.ourHostName, '.') == NULL) {
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");
349 }
350 }
351} /* PostInit */
char * strchr(const char *String, int ch)
Definition: utclib.c:501
#define Trace(x)
Definition: inflate.c:42
#define OpenTrace
Definition: evntrace.h:768
unsigned int gFirewallPort
Definition: preffw.c:22
char gPrevLocalCWD[512]
Definition: main.c:43
char gFirewallHost[64]
Definition: preffw.c:18
char gFirewallExceptionList[]
Definition: preffw.c:21
char gFirewallUser[32]
Definition: preffw.c:19
char gLocalCWD[512]
Definition: main.c:43
char gFirewallPass[32]
Definition: preffw.c:20
int gFirewallType
Definition: preffw.c:17
char gCopyright[]
Definition: version.c:17
#define kFirewallNotInUse
Definition: ncftp.h:388
char * FTPGetLocalCWD(char *buf, size_t size)
Definition: util.c:29
void PostInitPrefs(void)
Definition: pref.c:680
void InitReadline(void)
Definition: readln.c:659
void PrintStartupBanner(void)
Definition: readln.c:759
void InitTermcap(void)
Definition: readln.c:148
int firewallType
Definition: ncftp.h:221
char ourHostName[64]
Definition: ncftp.h:118

Referenced by CTestSpy::Check(), and main().

◆ PostShell()

static void PostShell ( void  )
static

Definition at line 374 of file main.c.

375{
376 SetXtermTitle("RESTORE");
377 CloseHost();
379 CloseTrace();
380 SavePrefs();
381 EndLog();
382 Plug();
384} /* PostShell */
void EndLog(void)
Definition: log.c:65
void CloseHost(void)
Definition: main.c:153
#define DisposeWinsock(a)
Definition: main.c:29
static void Plug(void)
Definition: main.c:358
void CloseTrace(void)
Definition: trace.c:159
void SavePrefs(void)
Definition: pref.c:695
void DisposeReadline(void)
Definition: readln.c:707
void SetXtermTitle(const char *const fmt,...)
Definition: readln.c:718

Referenced by main().

◆ PreInit()

static void PreInit ( void  )
static

Definition at line 267 of file main.c.

268{
269 int result;
270
271#if defined(WIN32) || defined(_WINDOWS)
272 if (WSAStartup(MAKEWORD(1, 1), &wsaData) != 0) {
273 fprintf(stderr, "could not initialize winsock\n");
274 exit(1);
275 }
276 wsaInit++;
277#endif
278
279#ifdef HAVE_SETLOCALE
280 setlocale(LC_ALL, "");
281#endif
282#if defined(WIN32) || defined(_WINDOWS)
283 gIsTTY = 1;
284 gIsTTYr = 1;
285#else
286 gIsTTY = ((isatty(2) != 0) && (getppid() > 1)) ? 1 : 0;
287 gIsTTYr = ((isatty(0) != 0) && (getppid() > 1)) ? 1 : 0;
288#endif
289#ifdef SIGPOLL
290 (void) NcSignal(SIGPOLL, (FTPSigProc) SIG_IGN);
291#endif
292 InitUserInfo();
294 if (result < 0) {
295 (void) fprintf(stderr, "ncftp: init library error %d (%s).\n", result, FTPStrError(result));
296 exit(1);
297 }
298#if defined(WIN32) || defined(_WINDOWS)
299 srand((unsigned int) (GetTickCount() & 0x7FFF));
300#else
301 srand((unsigned int) getpid());
302#endif
305 InitLog();
306 InitPrefs();
308 LoadPrefs();
311 InitLs();
313 GetoptReset();
315} /* PreInit */
#define isatty
Definition: acwin.h:103
#define SIG_IGN
Definition: signal.h:48
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
INT WINAPI WSAStartup(IN WORD wVersionRequested, OUT LPWSADATA lpWSAData)
Definition: startup.c:113
#define LC_ALL
Definition: locale.h:17
void __cdecl srand(_In_ unsigned int _Seed)
void InitLineList(LineListPtr list)
Definition: linelist.c:54
void InitLs(void)
Definition: ls.c:68
void InitLog(void)
Definition: log.c:20
void InitConnectionInfo(void)
Definition: main.c:109
int gIsTTYr
Definition: main.c:33
int gIsTTY
Definition: main.c:33
void InitCommandList(void)
Definition: shell.c:90
void InitUserInfo(void)
Definition: util.c:630
void(* FTPSigProc)(int)
Definition: ncftp.h:76
#define NcSignal
Definition: ncftp.h:604
int FTPInitLibrary(const FTPLIPtr lip)
Definition: open.c:1110
void LoadPrefs(void)
Definition: pref.c:555
void CheckForNewV3User(void)
Definition: pref.c:738
void InitPrefs(void)
Definition: pref.c:616
void GetScreenColumns(void)
Definition: readln.c:55
void TruncBatchLog(void)
Definition: spool.c:30
#define setlocale(n, s)
Definition: locale.h:46
#define MAKEWORD(a, b)
Definition: typedefs.h:248
#define getpid
Definition: wintirpc.h:52

Referenced by CTestSpy::Check(), and main().

◆ SetStartupURL()

static void SetStartupURL ( const char *const  urlgiven)
static

Definition at line 172 of file main.c.

173{
174 int rc;
175 char url[256];
176 char urlfile[128];
177
178 gLoadedBm = 0;
179 (void) STRNCPY(url, urlgiven);
180
181 rc = DecodeDirectoryURL(&gConn, url, &gStartupURLCdList, urlfile, sizeof(urlfile));
182 if (rc == kMalformedURL) {
183 (void) fprintf(stderr, "Malformed URL: %s\n", url);
184 exit(1);
185 } else if (rc == kNotURL) {
186 /* This is what should happen most of the time. */
187 (void) STRNCPY(gConn.host, urlgiven);
188 gURLMode = 2;
189 if (GetBookmark(gConn.host, &gBm) >= 0) {
190 gLoadedBm = 1;
199 gConn.port = gBm.port;
200 } else {
202 }
203
210 }
211 } else {
212 /* URL okay */
213 if (urlfile[0] != '\0') {
214 /* It was obviously not a directory */
215 (void) fprintf(stderr, "Use ncftpget or ncftpput to handle file URLs.\n");
216 exit(1);
217 }
218 gURLMode = 1;
225 }
226 }
227} /* SetStartupURL */
int GetBookmark(const char *const bmabbr, Bookmark *bmp)
Definition: bookmark.c:387
int gLoadedBm
Definition: bookmark.c:25
int MayUseFirewall(const char *const hn, int firewallType, const char *const firewallExceptionList)
Definition: util.c:695
int DecodeDirectoryURL(const FTPCIPtr cip, char *url, LineListPtr cdlist, char *fn, size_t fnsize)
Definition: util.c:1086
static const WCHAR url[]
Definition: encode.c:1432
#define kNotURL
Definition: ncftp.h:384
#define kMalformedURL
Definition: ncftp.h:385
int hasSIZE
Definition: bookmark.h:20
int hasPASV
Definition: bookmark.h:22
int hasUTIME
Definition: bookmark.h:27
char name[64]
Definition: bookmark.h:11
char acct[64]
Definition: bookmark.h:14
int hasMDTM
Definition: bookmark.h:21
unsigned int port
Definition: bookmark.h:18
char user[64]
Definition: bookmark.h:12
char pass[64]
Definition: bookmark.h:13
unsigned int firewallPort
Definition: ncftp.h:220
char firewallPass[64]
Definition: ncftp.h:219
char firewallHost[64]
Definition: ncftp.h:217
char firewallUser[64]
Definition: ncftp.h:218

Referenced by main().

◆ Usage()

static void Usage ( void  )
static

Definition at line 67 of file main.c.

68{
69 FILE *fp;
70#ifdef UNAME
71 char s[80];
72#endif
73
74 fp = stderr;
75 (void) fprintf(fp, "\nUsage: ncftp [flags] [<host> | <directory URL to browse>]\n");
76 (void) fprintf(fp, "\nFlags:\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");
82
83 (void) fprintf(fp, "\nProgram version: %s\nLibrary version: %s\n", gVersion + 5, gLibNcFTPVersion + 5);
84#ifdef UNAME
85 AbbrevStr(s, UNAME, 60, 1);
86 (void) fprintf(fp, "System: %s\n", s);
87#endif
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");
90 exit(2);
91} /* Usage */
GLdouble s
Definition: gl.h:2039
char gLibNcFTPVersion[64]
Definition: ftp.c:11
char gVersion[]
Definition: main.c:57
void AbbrevStr(char *dst, const char *src, size_t max, int mode)
Definition: util.c:451

Variable Documentation

◆ gAutoAscii

char gAutoAscii[]
extern

Definition at line 56 of file pref.c.

Referenced by InitConnectionInfo(), InitPrefs(), and SetAutoAscii().

◆ gBm

Bookmark gBm
extern

Definition at line 24 of file bookmark.c.

Referenced by OpenURL(), and SetStartupURL().

◆ gConn

◆ gConnTimeout

int gConnTimeout
extern

Definition at line 24 of file pref.c.

Referenced by InitConnectionInfo(), InitPrefs(), and SetConnTimeout().

◆ gCopyright

char gCopyright[]
extern

Definition at line 17 of file version.c.

Referenced by PostInit().

◆ gCtrlTimeout

int gCtrlTimeout

Definition at line 59 of file main.c.

Referenced by InitConnectionInfo().

◆ gDataPortMode

int gDataPortMode
extern

Definition at line 26 of file preffw.c.

Referenced by InitConnectionInfo().

◆ gDebug

int gDebug
extern

Definition at line 32 of file ls.c.

Referenced by InitConnectionInfo(), SetDebug(), and Trace().

◆ gDoNotDisplayAds

int gDoNotDisplayAds

Definition at line 62 of file main.c.

Referenced by Plug().

◆ gFirewallExceptionList

char gFirewallExceptionList[]
extern

Definition at line 21 of file preffw.c.

Referenced by LoadFirewallPrefs(), PostInit(), ProcessFirewallPrefFile(), and SetStartupURL().

◆ gFirewallHost

char gFirewallHost[64]
extern

Definition at line 18 of file preffw.c.

Referenced by LoadFirewallPrefs(), PostInit(), ProcessFirewallPrefFile(), and SetStartupURL().

◆ gFirewallPass

char gFirewallPass[32]
extern

Definition at line 20 of file preffw.c.

Referenced by LoadFirewallPrefs(), PostInit(), ProcessFirewallPrefFile(), and SetStartupURL().

◆ gFirewallPort

unsigned int gFirewallPort
extern

Definition at line 22 of file preffw.c.

Referenced by LoadFirewallPrefs(), PostInit(), ProcessFirewallPrefFile(), and SetStartupURL().

◆ gFirewallType

int gFirewallType
extern

Definition at line 17 of file preffw.c.

Referenced by LoadFirewallPrefs(), PostInit(), ProcessFirewallPrefFile(), and SetStartupURL().

◆ gFirewallUser

char gFirewallUser[32]
extern

Definition at line 19 of file preffw.c.

Referenced by LoadFirewallPrefs(), PostInit(), ProcessFirewallPrefFile(), and SetStartupURL().

◆ gFirstTimeUser

int gFirstTimeUser
extern

◆ gIsTTY

int gIsTTY

Definition at line 33 of file main.c.

Referenced by PreInit().

◆ gIsTTYr

int gIsTTYr

Definition at line 33 of file main.c.

Referenced by PreInit(), and Readline().

◆ gLib

◆ gLoadedBm

int gLoadedBm
extern

Definition at line 25 of file bookmark.c.

Referenced by SetStartupURL().

◆ gLocalCWD

char gLocalCWD[512]

Definition at line 43 of file main.c.

Referenced by DoOpen(), LocalChdirCmd(), LocalPwdCmd(), and PostInit().

◆ gNumProgramRuns

int gNumProgramRuns
extern

Definition at line 14 of file preffw.c.

Referenced by Plug(), and PostInit().

◆ gOptArg

char* gOptArg
extern

Definition at line 16 of file getopt.c.

Referenced by Getopt(), and main().

◆ gOptInd

int gOptInd
extern

Definition at line 14 of file getopt.c.

Referenced by Getopt(), GetoptReset(), and main().

◆ gPrevLocalCWD

char gPrevLocalCWD[512]

Definition at line 43 of file main.c.

Referenced by PostInit().

◆ gPrevRemoteCWD

char gPrevRemoteCWD[512]

Definition at line 47 of file main.c.

Referenced by InitConnectionInfo().

◆ gProgressMeter

FTPProgressMeterProc gProgressMeter
extern

Referenced by InitPrefs().

◆ gRedialDelay

int gRedialDelay

Definition at line 60 of file main.c.

Referenced by InitConnectionInfo().

◆ gRemoteCWD

char gRemoteCWD[512]
extern

Definition at line 33 of file cmds.c.

Referenced by OpenURL().

◆ gScreenColumns

int gScreenColumns

Definition at line 34 of file main.c.

Referenced by GetScreenColumns(), InitReadline(), LsC(), and PrPhilBar().

◆ gSOBufsize

int gSOBufsize
extern

Definition at line 50 of file pref.c.

Referenced by InitConnectionInfo(), InitPrefs(), and SetSOBufsize().

◆ gStartupURLCdList

LineList gStartupURLCdList

Definition at line 38 of file main.c.

Referenced by OpenURL(), PreInit(), and SetStartupURL().

◆ gStartupUrlParameterGiven

int gStartupUrlParameterGiven = 0

Definition at line 32 of file main.c.

Referenced by main().

◆ gTransferType

int gTransferType

Definition at line 40 of file main.c.

Referenced by InitConnectionInfo().

◆ gTransferTypeInitialized

int gTransferTypeInitialized = 0

Definition at line 39 of file main.c.

Referenced by InitConnectionInfo().

◆ gUnprocessedJobs

int gUnprocessedJobs
extern

Definition at line 19 of file spool.c.

Referenced by InitConnectionInfo(), RunBatchIfNeeded(), and SpoolX().

◆ gURLMode

int gURLMode = 0

Definition at line 41 of file main.c.

Referenced by OpenURL(), and SetStartupURL().

◆ gVersion

char gVersion[]

Definition at line 57 of file main.c.

Referenced by main(), PrintUsage(), and Usage().

◆ gXferTimeout

int gXferTimeout

Definition at line 59 of file main.c.

Referenced by InitConnectionInfo().