[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/engine lib_dir.c,1.12,1.13
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/engine lib_dir.c,1.12,1.13 |
Date: |
Sun, 15 Dec 2002 20:32:32 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv19922/engine
Modified Files:
lib_dir.c
Log Message:
Shift the system-specific parts of "DirMethods.GetPathInfo"
into the "support" directory.
Index: lib_dir.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_dir.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** lib_dir.c 15 Dec 2002 13:22:36 -0000 1.12
--- lib_dir.c 16 Dec 2002 01:32:30 -0000 1.13
***************
*** 54,70 ****
void _IL_DirMethods_GetPathInfo(ILExecThread *thread, void *result)
{
Platform_PathInfo *info = (Platform_PathInfo *)result;
System_Array *charArray;
ILUInt16 *invalidPathCharsBuf;
! /* Allocate the "invalidPathChars" array */
! #if defined(_WIN32) || defined(WIN32)
! charArray = (System_Array *)ILExecThreadNew(thread, "[c", "(Ti)V",
!
(ILVaInt)6);
! #else
! charArray = (System_Array *)ILExecThreadNew(thread, "[c", "(Ti)V",
!
(ILVaInt)2);
! #endif
if(!charArray)
{
--- 54,69 ----
void _IL_DirMethods_GetPathInfo(ILExecThread *thread, void *result)
{
+ ILPathInfo sysInfo;
Platform_PathInfo *info = (Platform_PathInfo *)result;
System_Array *charArray;
ILUInt16 *invalidPathCharsBuf;
+ int posn;
! /* Get the path information from the system layer */
! ILGetPathInfo(&sysInfo);
+ /* Allocate the "invalidPathChars" array */
+ charArray = (System_Array *)ILExecThreadNew
+ (thread, "[c", "(Ti)V", (ILVaInt)(strlen(sysInfo.invalidPathChars) +
1));
if(!charArray)
{
***************
*** 77,102 ****
/* Fill the "invalidPathChars" array with the invalid characters */
invalidPathCharsBuf = (ILUInt16 *)(ArrayToBuffer(charArray));
! #if defined(_WIN32) || defined(WIN32)
! /* ... write the 16-bit characters to buf ... */
! *(invalidPathCharsBuf++) = '\"';
! *(invalidPathCharsBuf++) = '<';
! *(invalidPathCharsBuf++) = '>';
! *(invalidPathCharsBuf++) = '|';
! #endif
! *(invalidPathCharsBuf++) = '\0';
! *(invalidPathCharsBuf++) = '\n';
!
! #if defined(_WIN32) || defined(WIN32)
! info->dirSeparator = '\\';
! info->altDirSeparator = '/';
! info->volumeSeparator = ':';
! info->pathSeparator = ';';
! #else
! info->dirSeparator = '/';
! info->altDirSeparator = 0;
! info->volumeSeparator = 0;
! info->pathSeparator = ':';
! #endif
}
--- 76,92 ----
/* Fill the "invalidPathChars" array with the invalid characters */
invalidPathCharsBuf = (ILUInt16 *)(ArrayToBuffer(charArray));
+ posn = 0;
+ while(sysInfo.invalidPathChars[posn] != '\0')
+ {
+ invalidPathCharsBuf[posn] =
(ILUInt16)(sysInfo.invalidPathChars[posn]);
+ ++posn;
+ }
+ invalidPathCharsBuf[posn] = (ILUInt16)0;
! /* Copy across the rest of the information */
! info->dirSeparator = sysInfo.dirSep;
! info->altDirSeparator = sysInfo.altDirSep;
! info->volumeSeparator = sysInfo.volumeSep;
! info->pathSeparator = sysInfo.pathSep;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/engine lib_dir.c,1.12,1.13,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.1992,1.1993
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnet/image Makefile.am,1.13,1.14 link.c,1.16,1.17
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.1992,1.1993
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnet/image Makefile.am,1.13,1.14 link.c,1.16,1.17
- Index(es):