ReactOS  0.4.15-dev-1177-g6cb3b62
main.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void InitConnectionInfo (void)
 
void CloseHost (void)
 
int main (int, const char **const)
 

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;
162  (void) FTPCloseHost(&gConn);
163 } /* CloseHost */
unsigned int ctrlTimeout
Definition: ncftp.h:143
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
FTPConnectionInfo gConn
Definition: main.c:37
void SaveUnsavedBookmark(void)
Definition: cmds.c:270
int FTPCloseHost(const FTPCIPtr cip)
Definition: open.c:523
void RunBatchIfNeeded(const FTPCIPtr cip)
Definition: spool.c:482

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

◆ 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 
119  gConn.debugLog = NULL;
120  gConn.errLog = stderr;
121  SetDebug(gDebug);
122  UseTrace();
123  (void) STRNCPY(gConn.user, "anonymous");
124  gConn.host[0] = '\0';
125  gConn.progress = NULL;
128  gConn.leavePass = 1; /* Don't let the lib zap it. */
133  gConn.maxDials = (-1); /* Dial forever, until they hit ^C. */
134  gUnprocessedJobs = 0;
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 */
unsigned int ctrlTimeout
Definition: ncftp.h:143
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
const char * asciiFilenameExtensions
Definition: ncftp.h:246
void SetDebug(int i)
Definition: trace.c:88
int gUnprocessedJobs
Definition: spool.c:19
int gCtrlTimeout
Definition: pref.c:24
int gRedialDelay
Definition: pref.c:44
char user[64]
Definition: ncftp.h:137
#define STRNCPY(dst, src, n)
Definition: rdesktop.h:168
FTPProgressMeterProc progress
Definition: ncftp.h:198
#define ISTREQ(a, b)
Definition: util.h:33
size_t dataSocketSBufSize
Definition: ncftp.h:231
FTPConnectionInfo gConn
Definition: main.c:37
int gTransferType
Definition: main.c:40
int gDebug
Definition: trace.c:19
char host[64]
Definition: ncftp.h:136
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
char gPrevRemoteCWD[512]
Definition: cmds.c:38
int gConnTimeout
Definition: pref.c:24
FILE * errLog
Definition: ncftp.h:146
smooth NULL
Definition: ftsmooth.c:416
int gSOBufsize
Definition: pref.c:50
#define kDefaultFTPBufSize
Definition: ncftp.h:314
FTPLibraryInfo gLib
Definition: main.c:36
int gDataPortMode
Definition: preffw.c:26
#define kTypeBinary
Definition: ncftp.h:354
int gTransferTypeInitialized
Definition: main.c:39
const char * FTPStrError(int e)
Definition: errno.c:114
unsigned int xferTimeout
Definition: ncftp.h:141
FILE * debugLog
Definition: ncftp.h:145
size_t dataSocketRBufSize
Definition: ncftp.h:230
void UseTrace(void)
Definition: trace.c:97
FILE * stderr
char gAutoAscii[]
Definition: pref.c:56
void exit(int exitcode)
Definition: _exit.c:33
GLuint64EXT * result
Definition: glext.h:11304
unsigned int connTimeout
Definition: ncftp.h:142
int FTPInitConnectionInfo(const FTPLIPtr lip, const FTPCIPtr cip, size_t bufsize)
Definition: open.c:984
int dataPortMode
Definition: ncftp.h:152
int gXferTimeout
Definition: pref.c:24

Referenced by OpenCmd(), and PreInit().

◆ main()

int main ( int  ,
const char ** const   
)