#include "Unfrag.h"
#include "DriveVolume.h"
#include "Mutex.h"
Go to the source code of this file.
◆ DefragReport
◆ FitName()
Definition at line 9 of file Defragment.cpp.
16 wchar_t fmtStrPath[20]=
L"";
17 wchar_t fmtStrFile[20]=
L"";
18 wchar_t fmtString[40]=
L"";
29 if (!(totalWidth % 2))
30 halfTotLen=totalWidth / 2;
32 halfTotLen=(totalWidth-1) / 2;
36 if ( (pathLen >= halfTotLen) && (fnLen < halfTotLen) )
39 len4path = (totalWidth - len4fn);
42 if ( (pathLen < halfTotLen) && (fnLen < halfTotLen) )
48 if ( (pathLen >= halfTotLen) && (fnLen >= halfTotLen) )
51 len4path = halfTotLen;
54 if ( (pathLen < halfTotLen) && (fnLen >= halfTotLen) )
57 len4fn = (totalWidth - len4path);
63 if (halfTotLen < (totalWidth/2)) len4path++;
65 if (pathLen > len4path)
swprintf (fmtStrPath,
L"%%.%ds...\\", len4path-4);
69 if (fnLen > len4fn)
swprintf (fmtStrFile,
L"%%.%ds...", len4fn-3);
73 wcscpy (fmtString, fmtStrPath);
74 wcscat (fmtString, fmtStrFile);
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
int _cdecl swprintf(const WCHAR *,...)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
Referenced by Defragment::Start().