mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 07:03:06 +00:00
fix formatting
svn path=/trunk/; revision=39327
This commit is contained in:
parent
a9d8af1af6
commit
8517038812
12 changed files with 2637 additions and 2632 deletions
|
@ -1,30 +1,30 @@
|
|||
/*
|
||||
* ReactOS kernel
|
||||
* Copyright (C) 2002, 2004 ReactOS Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
* ReactOS kernel
|
||||
* Copyright (C) 2002, 2004 ReactOS Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id$
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* FILE: services/fs/cdfs/misc.c
|
||||
* PURPOSE: CDROM (ISO 9660) filesystem driver
|
||||
* PROGRAMMER: Eric Kohl
|
||||
* UPDATE HISTORY:
|
||||
*/
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* FILE: services/fs/cdfs/misc.c
|
||||
* PURPOSE: CDROM (ISO 9660) filesystem driver
|
||||
* PROGRAMMER: Eric Kohl
|
||||
* UPDATE HISTORY:
|
||||
*/
|
||||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
|
@ -37,62 +37,62 @@
|
|||
|
||||
VOID
|
||||
CdfsSwapString(PWCHAR Out,
|
||||
PUCHAR In,
|
||||
ULONG Count)
|
||||
PUCHAR In,
|
||||
ULONG Count)
|
||||
{
|
||||
PUCHAR t = (PUCHAR)Out;
|
||||
ULONG i;
|
||||
PUCHAR t = (PUCHAR)Out;
|
||||
ULONG i;
|
||||
|
||||
for (i = 0; i < Count; i += 2)
|
||||
for (i = 0; i < Count; i += 2)
|
||||
{
|
||||
t[i] = In[i+1];
|
||||
t[i+1] = In[i];
|
||||
if (t[i+1] == 0 && t[i] == ';')
|
||||
break;
|
||||
t[i] = In[i+1];
|
||||
t[i+1] = In[i];
|
||||
if (t[i+1] == 0 && t[i] == ';')
|
||||
break;
|
||||
}
|
||||
if ((i>2)&&(t[i-2] == '.'))
|
||||
{
|
||||
t[i-2] = 0;
|
||||
t[i-1] = 0;
|
||||
}
|
||||
t[i] = 0;
|
||||
t[i+1] = 0;
|
||||
if ((i>2)&&(t[i-2] == '.'))
|
||||
{
|
||||
t[i-2] = 0;
|
||||
t[i-1] = 0;
|
||||
}
|
||||
t[i] = 0;
|
||||
t[i+1] = 0;
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
CdfsDateTimeToSystemTime(PFCB Fcb,
|
||||
PLARGE_INTEGER SystemTime)
|
||||
PLARGE_INTEGER SystemTime)
|
||||
{
|
||||
TIME_FIELDS TimeFields;
|
||||
LARGE_INTEGER LocalTime;
|
||||
TIME_FIELDS TimeFields;
|
||||
LARGE_INTEGER LocalTime;
|
||||
|
||||
TimeFields.Milliseconds = 0;
|
||||
TimeFields.Second = Fcb->Entry.Second;
|
||||
TimeFields.Minute = Fcb->Entry.Minute;
|
||||
TimeFields.Hour = Fcb->Entry.Hour;
|
||||
TimeFields.Milliseconds = 0;
|
||||
TimeFields.Second = Fcb->Entry.Second;
|
||||
TimeFields.Minute = Fcb->Entry.Minute;
|
||||
TimeFields.Hour = Fcb->Entry.Hour;
|
||||
|
||||
TimeFields.Day = Fcb->Entry.Day;
|
||||
TimeFields.Month = Fcb->Entry.Month;
|
||||
TimeFields.Year = Fcb->Entry.Year + 1900;
|
||||
TimeFields.Day = Fcb->Entry.Day;
|
||||
TimeFields.Month = Fcb->Entry.Month;
|
||||
TimeFields.Year = Fcb->Entry.Year + 1900;
|
||||
|
||||
RtlTimeFieldsToTime(&TimeFields,
|
||||
&LocalTime);
|
||||
ExLocalTimeToSystemTime(&LocalTime, SystemTime);
|
||||
RtlTimeFieldsToTime(&TimeFields,
|
||||
&LocalTime);
|
||||
ExLocalTimeToSystemTime(&LocalTime, SystemTime);
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
CdfsFileFlagsToAttributes(PFCB Fcb,
|
||||
PULONG FileAttributes)
|
||||
PULONG FileAttributes)
|
||||
{
|
||||
/* FIXME: Fix attributes */
|
||||
/* FIXME: Fix attributes */
|
||||
|
||||
*FileAttributes = // FILE_ATTRIBUTE_READONLY |
|
||||
((Fcb->Entry.FileFlags & FILE_FLAG_HIDDEN) ? FILE_ATTRIBUTE_HIDDEN : 0) |
|
||||
((Fcb->Entry.FileFlags & FILE_FLAG_DIRECTORY) ? FILE_ATTRIBUTE_DIRECTORY : 0) |
|
||||
((Fcb->Entry.FileFlags & FILE_FLAG_SYSTEM) ? FILE_ATTRIBUTE_SYSTEM : 0) |
|
||||
((Fcb->Entry.FileFlags & FILE_FLAG_READONLY) ? FILE_ATTRIBUTE_READONLY : 0);
|
||||
*FileAttributes = // FILE_ATTRIBUTE_READONLY |
|
||||
((Fcb->Entry.FileFlags & FILE_FLAG_HIDDEN) ? FILE_ATTRIBUTE_HIDDEN : 0) |
|
||||
((Fcb->Entry.FileFlags & FILE_FLAG_DIRECTORY) ? FILE_ATTRIBUTE_DIRECTORY : 0) |
|
||||
((Fcb->Entry.FileFlags & FILE_FLAG_SYSTEM) ? FILE_ATTRIBUTE_SYSTEM : 0) |
|
||||
((Fcb->Entry.FileFlags & FILE_FLAG_READONLY) ? FILE_ATTRIBUTE_READONLY : 0);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue