57 for (
i=0;
i<12;
i++) {
167 Trace(1,
"ls cache add: %s\n", itempath);
192 char *cp1, *cp2, *lim;
196 if (screenColumns > 400)
198 ncol = (screenColumns - 1) / ((
int) dirp->
maxFileLen + 2 + endChars);
201 colw = (screenColumns - 1) / ncol;
207 for (
i=0;
i<(
int)
sizeof(buf2);
i++)
212 for (
j=0;
j<nrow;
j++) {
214 for (
i=0,
k=
j,
l=0;
i<ncol;
i++,
k += nrow,
l += colw) {
224 if (itemp->
type ==
'l') {
230 }
else if (itemp->
type ==
'd') {
235 for (cp1 =
buf +
sizeof(
buf); *--cp1 ==
' '; ) {}
305 diritemv = dirp->
vec;
309 sizeof(plugspec) - 1,
328 diritemp = diritemv[
i];
329 if (diritemp ==
NULL)
398 Trace(0,
"%s %12s %s%s %s%s%s%s%s\n",
429 diritemv = dirp->
vec;
432 diritemp = diritemv[
i];
433 if (diritemp ==
NULL)
494 endChars = (listmode ==
'C') ? 1 : 0;
496 memset(unoptstr, 0,
sizeof(unoptstr));
531 if (unknownOpts < ((
int)
sizeof(unoptstr) - 2))
532 unoptstr[unknownOpts + 1] = opt;
542 if (unknownOpts > 0) {
547 Trace(0,
"ls caching not used because of ls flags: %s\n", unoptstr);
549 optstr[1] = listmode;
562 }
else if ((doNotUseCache != 0) || ((ci =
LsCacheLookup(itempath)) < 0)) {
576 parsed =
UnMlsD(filp, &dirContents);
578 Trace(0,
"UnMlsD: %d\n", parsed);
583 Trace(0,
"UnLslR: %d\n", parsed);
598 Trace(0,
"ls cache hit: %s\n", itempath);
602 Trace(0,
"Remote listing contents {\n");
603 for (linePtr = dirContents.
first;
605 linePtr = nextLinePtr)
607 nextLinePtr = linePtr->
next;
618 else if (listmode ==
'1')
623 if (wasInCache == 0) {
627 for (linePtr = dirContents.
first;
629 linePtr = nextLinePtr)
631 nextLinePtr = linePtr->
next;
642#if defined(WIN32) || defined(_WINDOWS)
671 endChars = (listmode ==
'C') ? 1 : 0;
673 memset(unoptstr, 0,
sizeof(unoptstr));
705 if (unknownOpts < ((
int)
sizeof(unoptstr) - 2))
706 unoptstr[unknownOpts + 1] = opt;
731 for (fip = fil.
first; fip !=
NULL; fip = fip2) {
753 fip->
plug =
StrDup(
"---------- 1 user group");
759 fip->
size = st.st_size;
761 fip->
mdtm = st.st_mtime;
770 else if (listmode ==
'1')
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
char * strpbrk(const char *String, const char *Delimiters)
#define STRNCPY(dst, src, n)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLenum GLuint GLenum GLsizei const GLchar * buf
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
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 GLint GLint j
int UnMlsD(FileInfoListPtr filp, LineListPtr llp)
int UnLslR(FileInfoListPtr filp, LineListPtr llp, int serverType)
int FTPLocalGlob(FTPCIPtr cip, LineListPtr fileList, const char *pattern, int doGlob)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
void InitLineList(LineListPtr list)
FileInfoPtr RemoveFileInfo(FileInfoListPtr list, FileInfoPtr killMe)
void InitFileInfoList(FileInfoListPtr list)
void DisposeFileInfoListContents(FileInfoListPtr list)
void VectorizeFileInfoList(FileInfoListPtr list)
int LineListToFileInfoList(LineListPtr src, FileInfoListPtr dst)
void DisposeLineListContents(LineListPtr list)
void SortFileInfoList(FileInfoListPtr list, int sortKey, int sortOrder)
static void FlushLsCacheItem(int i)
LsCacheItem gLsCache[kLsCacheSize]
void LsL(FileInfoListPtr dirp, int endChars, int linkedTo, FILE *stream)
void Ls(const char *const item, int listmode, const char *const options, FILE *stream)
void Ls1(FileInfoListPtr dirp, int endChars, FILE *stream)
static void LsC(FileInfoListPtr dirp, int endChars, FILE *stream)
void LsDate(char *dstr, time_t ts)
int LsCacheLookup(const char *const itempath)
static void LsCacheAdd(const char *const itempath, FileInfoListPtr files)
#define kLsCacheItemLifetime
void LLs(const char *const, int, const char *const, FILE *)
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
void FTPPerror(const FTPCIPtr cip, const int err, const int eerr, const char *const s1, const char *const s2)
int FTPListToMemory2(const FTPCIPtr cip, const char *const pattern, const LineListPtr llines, const char *const lsflags, const int blankLines, int *const tryMLSD)
void PathCat(char *const dst, const size_t dsize, const char *const cwd, const char *const src)
#define sprintf(buf, format,...)
#define StrRFindLocalPathDelim(a)
_CRTIMP struct tm *__cdecl localtime(const time_t *_Time)
size_t CDECL strftime(char *str, size_t max, const char *format, const struct tm *mstm)