Re-ran indent on all .c & .h source code files
Like so --
find . -name "*.c" -or -name "*.h" -exec indent -nbfda -npcs -npsl -bli0 --no-tabs {} \;
The `indent` invocation differs from the last one noted in
CHANGES.txt (from 2006!?), in that I've added "--no-tabs",
to ensure indents are all space-based.
This commit is contained in:
parent
09f332367f
commit
cc05925d9e
99 changed files with 31659 additions and 27102 deletions
|
|
@ -1,23 +1,26 @@
|
|||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
|
||||
int MoveFileToRecycleBin(const TCHAR *fullPathName);
|
||||
int MoveFileToRecycleBin(const TCHAR * fullPathName);
|
||||
int win32_trash(const char *path);
|
||||
|
||||
int MoveFileToRecycleBin(const TCHAR *fullPathName)
|
||||
int MoveFileToRecycleBin(const TCHAR * fullPathName)
|
||||
{
|
||||
SHFILEOPSTRUCT fileOp;
|
||||
const TCHAR *src = fullPathName;
|
||||
TCHAR *dest;
|
||||
|
||||
fileOp.pFrom = dest = alloca(sizeof(*dest) * (_tcslen(fullPathName) + 2));
|
||||
while((*dest++ = *src++) != _T('\0')) {}
|
||||
while ((*dest++ = *src++) != _T('\0'))
|
||||
{
|
||||
}
|
||||
*dest = _T('\0');
|
||||
|
||||
fileOp.hwnd = NULL;
|
||||
fileOp.wFunc = FO_DELETE;
|
||||
fileOp.pTo = NULL;
|
||||
fileOp.fFlags = FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_SILENT | FOF_ALLOWUNDO;
|
||||
fileOp.fFlags =
|
||||
FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_SILENT | FOF_ALLOWUNDO;
|
||||
return SHFileOperation(&fileOp);
|
||||
}
|
||||
|
||||
|
|
@ -26,8 +29,10 @@ int win32_trash(const char *path)
|
|||
char *p, *src;
|
||||
|
||||
src = p = strdup(path);
|
||||
while(*p != '\0'){
|
||||
if (*p == '/') *p = '\\';
|
||||
while (*p != '\0')
|
||||
{
|
||||
if (*p == '/')
|
||||
*p = '\\';
|
||||
p++;
|
||||
}
|
||||
return MoveFileToRecycleBin(src);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue