|
From: Brenda L. <asp...@us...> - 2003-05-12 07:39:38
|
Update of /cvsroot/squeak/squeak/platforms/unix/plugins/FilePlugin
In directory sc8-pr-cvs1:/tmp/cvs-serv6251/plugins/FilePlugin
Modified Files:
sqUnixFile.c
Log Message:
Ian Piumarta's release 3.4.1
Index: sqUnixFile.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/plugins/FilePlugin/sqUnixFile.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** sqUnixFile.c 29 Mar 2002 11:44:50 -0000 1.5
--- sqUnixFile.c 12 May 2003 07:39:03 -0000 1.6
***************
*** 1,6 ****
/* sqUnixFile.c -- directory operations for Unix
*
! * Copyright (C) 1996 1997 1998 1999 2000 2001 Ian Piumarta and individual
! * authors/contributors listed elsewhere in this file.
* All rights reserved.
*
--- 1,6 ----
/* sqUnixFile.c -- directory operations for Unix
*
! * Copyright (C) 1996-2002 Ian Piumarta and other authors/contributors
! * as listed elsewhere in this file.
* All rights reserved.
*
***************
*** 21,41 ****
* would be appreciated but is not required.
*
! * 2. This notice may not be removed or altered in any source distribution.
*
! * Using or modifying this file for use in any context other than Squeak
! * changes these copyright conditions. Read the file `COPYING' in the base
! * of the distribution before proceeding with any such use.
*
! * You are STRONGLY DISCOURAGED from distributing a modified version of
! * this file under its original name without permission. If you must
! * change it, rename it first.
*/
/* Author: Ian...@IN...
*
! * Last edited: Fri 29 Mar 2002 12:39:53 by bert on balloon
*/
#include "sq.h"
#ifdef HAVE_DIRENT_H
--- 21,42 ----
* would be appreciated but is not required.
*
! * 2. This notice must not be removed or altered in any source distribution.
*
! * Using (or modifying this file for use) in any context other than Squeak
! * changes these copyright conditions. Read the file `COPYING' in the
! * directory `platforms/unix/doc' before proceeding with any such use.
*
! * You are not allowed to distribute a modified version of this file
! * under its original name without explicit permission to do so. If
! * you change it, rename it.
*/
/* Author: Ian...@IN...
*
! * Last edited: 2003-02-06 16:29:22 by piumarta on emilia.local.
*/
#include "sq.h"
+ #include "FilePlugin.h"
#ifdef HAVE_DIRENT_H
***************
*** 62,69 ****
#include <time.h>
- #include <sys/param.h>
- #include <sys/stat.h>
#include <errno.h>
#include <string.h>
/***
--- 63,70 ----
#include <time.h>
#include <errno.h>
#include <string.h>
+ #include <sys/param.h>
+ #include <sys/stat.h>
/***
***************
*** 91,98 ****
/*** Functions ***/
extern time_t convertToSqueakTime(time_t unixTime);
- int equalsLastPath(char *pathString, int pathStringLength);
- int recordPath(char *pathString, int pathStringLength, int refNum, int volNum);
int maybeOpenDir(char *unixPath);
--- 92,98 ----
/*** Functions ***/
+
extern time_t convertToSqueakTime(time_t unixTime);
int maybeOpenDir(char *unixPath);
***************
*** 118,124 ****
if (pathStringLength >= MAXPATHLEN)
return false;
! for (i = 0; i < pathStringLength; i++)
! name[i] = pathString[i];
! name[i] = 0; /* string terminator */
return rmdir(name) == 0;
}
--- 118,126 ----
if (pathStringLength >= MAXPATHLEN)
return false;
! for (i= 0; i < pathStringLength; ++i)
! name[i]= pathString[i];
! if (!strcmp(lastPath, name))
! lastPathValid= false;
! name[i]= '\0'; /* string terminator */
return rmdir(name) == 0;
}
***************
*** 131,135 ****
int dir_Lookup(char *pathString, int pathStringLength, int index,
/* outputs: */ char *name, int *nameLength, int *creationDate, int *modificationDate,
! int *isDirectory, int *sizeIfFile)
{
/* Lookup the index-th entry of the directory with the given path, starting
--- 133,137 ----
int dir_Lookup(char *pathString, int pathStringLength, int index,
/* outputs: */ char *name, int *nameLength, int *creationDate, int *modificationDate,
! int *isDirectory, squeakFileOffsetType *sizeIfFile)
{
/* Lookup the index-th entry of the directory with the given path, starting
***************
*** 181,194 ****
{
nextEntry:
! do {
! errno= 0;
! dirEntry= readdir(openDir);
! } while(dirEntry==0 && errno==EINTR);
if (!dirEntry)
! {
! return NO_MORE_ENTRIES;
! }
nameLen= NAMLEN(dirEntry);
/* ignore '.' and '..' (these are not *guaranteed* to be first) */
if (nameLen < 3 && dirEntry->d_name[0] == '.')
--- 183,198 ----
{
nextEntry:
! do
! {
! errno= 0;
! dirEntry= readdir(openDir);
! }
! while ((dirEntry == 0) && (errno == EINTR));
if (!dirEntry)
! return NO_MORE_ENTRIES;
!
nameLen= NAMLEN(dirEntry);
+
/* ignore '.' and '..' (these are not *guaranteed* to be first) */
if (nameLen < 3 && dirEntry->d_name[0] == '.')
***************
*** 261,263 ****
return true;
}
-
--- 265,266 ----
|