25#ifdef FEATURE_UNIX_FILENAME_COMPLETION
45 count = charcount - 1;
53 if (
str[step] ==
_T(
'"'))
85 if (curplace >= 0 &&
directory[curplace] ==
_T(
'"'))
90 while (curplace >= 0 &&
directory[curplace] !=
_T(
'\\') &&
132 if (!maxmatch[0] && perfectmatch)
142 perfectmatch =
FALSE;
148 if (maxmatch[
count] ==
_T(
'\0') &&
150 perfectmatch =
FALSE;
180 for (cmds_ptr =
cmds; cmds_ptr->
name; cmds_ptr++)
213 count = charcount - 1;
241 if (curplace >= 0 &&
directory[curplace] ==
_T(
'"'))
246 while (curplace >= 0 &&
275 UINT longestfname = 0;
318 if (
count >= (screenwidth / longestfname))
322 if (
count * longestfname != (
UINT)screenwidth)
345#ifdef FEATURE_4NT_FILENAME_COMPLETION
372 szPrefix[0] =
_T(
'\0');
373 szSuffix[0] =
_T(
'\0');
386 if (nQuotes % 2 && nQuotes >= 1)
398 if ((szSearch2 !=
NULL) && (szSearch1 < szSearch2))
399 szSearch = szSearch2;
400 else if ((szSearch3 !=
NULL) && (szSearch1 < szSearch3))
401 szSearch = szSearch3;
403 szSearch = szSearch1;
406 szSearch[0] =
_T(
'\0');
421 szSearch[0] =
_T(
'\0');
426 szPrefix[0] =
_T(
'\0');
443 if ((szSearch2 !=
NULL) && (szSearch1 < szSearch2))
444 szSearch = szSearch2;
445 else if ((szSearch3 !=
NULL) && (szSearch1 < szSearch3))
446 szSearch = szSearch3;
448 szSearch = szSearch1;
450 szSearch[0] =
_T(
'\0');
462 if (
str[
i] ==
_T(
' ') && !bInside)
464 if ((
str[
i] ==
_T(
' ') ||
str[
i] ==
_T(
'\\')) && !bInside)
469 _tcscpy(szSuffix,&strIN[SBreak]);
470 strIN[PBreak] =
_T(
'\0');
472 if (szPrefix[
_tcslen(szPrefix) - 2] ==
_T(
'\"') &&
473 szPrefix[
_tcslen(szPrefix) - 1] !=
_T(
' '))
517 if ((chr ==
_T(
' ')) ||
568 INT FileListSize = 0;
579 strOut[0] =
_T(
'\0');
592 str[cusor] =
_T(
'\0');
607 szBaseWord[0] =
_T(
'\0');
608 szPrefix[0] =
_T(
'\0');
618 if (szBaseWord[
i] ==
_T(
'\"'))
625 memset(szSearchPath, 0,
sizeof(szSearchPath));
631 if (szSearchPath[0] ==
_T(
'\\') && szSearchPath[1] ==
_T(
'\\') &&
632 szSearchPath[2] ==
_T(
'.') && szSearchPath[3] ==
_T(
'\\'))
636 _tcscat(szSearchPath, szBaseWord);
643 _tcscpy(LastSearch,szSearchPath);
648 _tcscpy(szSearchPath, LastSearch);
699 if (FileListSize == 0)
715 if (FileListSize - 1 == Sel)
723 Sel = FileListSize - 1;
734 strOut[0] =
_T(
'\0');
748 if (szPrefix[
i] ==
_T(
'\"'))
750 if (szPrefix[
i] ==
_T(
' ') && !bInside)
755 if (szPrefix[LastSpace + 1] !=
_T(
'\"') && LastSpace != -1)
757 memmove ( &szPrefix[LastSpace+1], &szPrefix[LastSpace], (
_tcslen(szPrefix)-LastSpace+1) *
sizeof(
TCHAR) );
763 szPrefix[LastSpace + 1] =
_T(
'\"');
765 else if (LastSpace == -1)
768 if (szPrefix[0] !=
_T(
'\"'))
785 if (strOut[
i] ==
_T(
'\"'))
786 NeededQuote = !NeededQuote;
790 if (NeededQuote || (
_tcslen(szPrefix) && szPrefix[
_tcslen(szPrefix) - 1] ==
_T(
'\"')))
vector< FileInfo > FileList
VOID GetScreenSize(PSHORT maxx, PSHORT maxy)
#define ConOutPrintf(szStr,...)
#define cmd_realloc(ptr, size)
#define INVALID_HANDLE_VALUE
BOOL WINAPI FindClose(HANDLE hFindFile)
BOOL FileNameContainsSpecialCharacters(LPTSTR pszFileName)
VOID FindPrefixAndSuffix(LPTSTR strIN, LPTSTR szPrefix, LPTSTR szSuffix)
struct _FileName FileName
VOID CompleteFilename(LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
GLuint GLuint GLsizei count
GLuint GLuint GLuint GLuint arg1
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
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
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
#define FILE_ATTRIBUTE_DIRECTORY
#define ConOutFormatMessage(MessageId,...)
void __cdecl qsort(_Inout_updates_bytes_(_NumOfElements *_SizeOfElements) void *_Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int(__cdecl *_PtFuncCompare)(const void *, const void *))
WORD WORD PSZ PSZ pszFileName
#define INVALID_FILE_ATTRIBUTES
DWORD WINAPI GetLastError(void)
#define GetCurrentDirectory
BOOL WINAPI MessageBeep(_In_ UINT uType)