32#if (defined(WIN32) || defined(_WINDOWS)) && defined(_CONSOLE)
33 char gSavedConsoleTitle[64];
57#if defined(WIN32) || defined(_WINDOWS)
67 char ncftpbookmarks[256];
85 memset(&felix, 0,
sizeof(felix));
86 if (
ioctl(0, TIOCGWINSZ, &felix) == 0) {
87 columns = felix.ws_col;
117 STRNCPY(ncftpbookmarks, BINDIR);
119 STRNCAT(ncftpbookmarks,
"ncftpbookmarks");
124 STRNCAT(ncftpbookmarks,
" --dimensions-terse");
127 infp =
popen(ncftpbookmarks,
"r");
150#if (defined(WIN32) || defined(_WINDOWS)) && defined(_CONSOLE)
159 gTerm =
"MS-DOS Prompt";
182 (
ISTRCMP(term,
"scoterm") == 0)
188 (
strcmp(term,
"vt100") == 0) ||
189 (
strcmp(term,
"linux") == 0) ||
190 (
strcmp(term,
"vt220") == 0) ||
191 (
strcmp(term,
"vt102") == 0)
230 }
else if ((*scp ==
'"') || (*scp ==
'\'')) {
236 }
else if (*scp ==
'\\') {
241 }
else if (*scp == qc) {
248 }
else if (*scp ==
'\\') {
253 }
else if ((*scp ==
';') || (*scp ==
'\n')) {
305 const char *textbasename;
316 if (textbasename ==
NULL) {
320 textdirlen = (
int) (textbasename -
text);
323 tbnlen =
strlen(textbasename);
326 if (
text[0] ==
'\0') {
338 }
else if (cp2 == rpath) {
349 diritemv = filp->
vec;
350 if (diritemv ==
NULL)
357 diritemp = diritemv[
i];
358 if (diritemp ==
NULL)
363 if ((fTypeFilter == 0) || (fType == fTypeFilter) || (fType ==
'l')) {
366 if (textdirlen < 0) {
373 mlen = textdirlen + 1 + flen + 2;
378 cp[textdirlen] =
'/';
526 for (
cp = cmdstart; *
cp !=
'\0';
cp++) {
549 if (cmdstart ==
NULL)
559 (
int) (
sizeof(ai.
cargv) /
sizeof(
char *)),
625 for (esc = 0,
cp =
src; *
cp !=
'\0';
cp++) {
633 return ((
size_t) (
cp -
src) - (esc * 4));
673 char *linecopy, *
line, *
cp;
725#if (defined(WIN32) || defined(_WINDOWS)) && defined(_CONSOLE)
736 buf[
sizeof(
buf) - 1] =
'\0';
742 if (
buf[0] !=
'\0') {
743#if (defined(WIN32) || defined(_WINDOWS)) && defined(_CONSOLE)
778#if defined(BETA) && (BETA > 0)
779 (
void)
fprintf(
stdout,
"%s%.11s beta %d%s%s by Mike Gleason (ncftp@ncftp.com).\n",
char * Strncat(char *const, const char *const, const size_t)
char * Strncpy(char *const, const char *const, const size_t)
int strcmp(const char *String1, const char *String2)
char * strstr(char *String1, char *String2)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
char * strcpy(char *DstString, const char *SrcString)
char * strchr(const char *String, int ch)
#define STRNCPY(dst, src, n)
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
BOOL WINAPI GetConsoleScreenBufferInfo(IN HANDLE hConsoleOutput, OUT PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo)
int LoadBookmarkTable(void)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
int gl_completion_exact_match_extra_char
gl_tab_completion_proc gl_completion_proc
void gl_histsavefile(const char *const path)
void gl_histadd(char *buf)
char * gl_local_filename_completion_proc(const char *start, int idx)
int gl_filename_quoting_desired
void gl_histloadfile(const char *const path)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLint GLboolean GLint GLenum access
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_ _CRTIMP int __cdecl getc(_Inout_ FILE *_File)
_Check_return_ _CRTIMP int __cdecl fscanf(_Inout_ FILE *_File, _In_z_ _Scanf_format_string_ const char *_Format,...)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
_Check_return_opt_ _CRTIMP char *__cdecl fgets(_Out_writes_z_(_MaxCount) char *_Buf, _In_ int _MaxCount, _Inout_ FILE *_File)
int __cdecl vsprintf(char *_Dest, const char *_Format, va_list _Args)
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
_Check_return_ char *__cdecl getenv(_In_z_ const char *_VarName)
void SortFileInfoList(FileInfoListPtr list, int sortKey, int sortOrder)
void Ls(const char *const item, int listmode, const char *const options, FILE *stream)
int LsCacheLookup(const char *const itempath)
#define memcpy(s1, s2, n)
int MakeArgv(char *line, int *cargc, const char **cargv, int cargcmax, char *dbuf, size_t dbufsize, int *noglobargv, int readlineHacks)
CommandPtr GetCommandByName(const char *const name, int wantExactMatch)
CommandPtr GetCommandByIndex(const int i)
void AbbrevStr(char *dst, const char *src, size_t max, int mode)
char * OurDirectoryPath(char *const dst, const size_t siz, const char *const fname)
void PathCat(char *const dst, const size_t dsize, const char *const cwd, const char *const src)
volatile sigproc_t vsigproc_t
static char * RemoteFileCompletionFunction(const char *text, int state)
char gCurXtermTitleStr[256]
static char * PrefOptCompletionFunction(const char *text, int state)
BookmarkPtr gBookmarkTable
static char * CommandCompletionFunction(const char *text, int state)
const char * tcap_reverse
static int HaveCommandNameOnly(char *cmdstart)
static char * FindStartOfCurrentCommand(void)
void AddHistory(char *line)
LsCacheItem gLsCache[kLsCacheSize]
void ReCacheBookmarks(void)
char * Readline(char *prompt)
void DisposeReadline(void)
static char * RemoteDirCompletionFunction(const char *text, int state)
static size_t Vt100VisibleStrlen(const char *src)
const char * tcap_underline
static FileInfoListPtr GetLsCacheFileList(const char *const item)
static char * BookmarkCompletionFunction(const char *text, int state)
void SetXtermTitle(const char *const fmt,...)
const char * tcap_boldface
void MakePrompt(char *dst, size_t dsize)
void PrintStartupBanner(void)
static char * RemoteCompletionFunction(const char *text, int state, int fTypeFilter)
void GetScreenColumns(void)
_Check_return_ _CRTIMP int __cdecl _chmod(_In_z_ const char *_Filename, _In_ int _Mode)
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
#define kCompleteRemoteDir
#define kCompleteRemoteFile
#define kAmbiguousCommand
#define kCompleteLocalDir
#define kCompleteLocalFile
#define kCompleteBookmark
#define STD_OUTPUT_HANDLE
void int int ULONGLONG int va_list * ap
_In_ UCHAR _In_ POWER_STATE _In_opt_ PREQUEST_POWER_COMPLETE CompletionFunction