|
From: Tim R. <row...@us...> - 2002-04-23 22:08:50
|
Update of /cvsroot/squeak/squeak/platforms/RiscOS/plugins/FilePlugin
In directory usw-pr-cvs1:/tmp/cvs-serv9597/platforms/RiscOS/plugins/FilePlugin
Modified Files:
sqRPCDirectory.c
Log Message:
updating includes to handle new OSLib release
Index: sqRPCDirectory.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/RiscOS/plugins/FilePlugin/sqRPCDirectory.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** sqRPCDirectory.c 24 Oct 2001 23:14:01 -0000 1.1.1.1
--- sqRPCDirectory.c 23 Apr 2002 22:08:47 -0000 1.2
***************
*** 7,19 ****
/* Directory reading etc */
/**************************************************************************/
! #include "os.h"
! #include "osbyte.h"
! #include "osgbpb.h"
! #include "osfile.h"
! #include "osfscontrol.h"
! #include "scsifs.h"
! #include "adfs.h"
! #include "ramfs.h"
! #include "cdfs.h"
#include "sq.h"
#include <kernel.h>
--- 7,19 ----
/* Directory reading etc */
/**************************************************************************/
! #include "oslib/os.h"
! #include "oslib/osbyte.h"
! #include "oslib/osgbpb.h"
! #include "oslib/osfile.h"
! #include "oslib/osfscontrol.h"
! #include "oslib/scsifs.h"
! #include "oslib/adfs.h"
! #include "oslib/ramfs.h"
! #include "oslib/cdfs.h"
#include "sq.h"
#include <kernel.h>
***************
*** 28,34 ****
#define DELIMITOR '.'
! extern int ImageVersionNumber;
! extern struct VirtualMachine * interpreterProxy;
/*** Functions ***/
int convertToSqueakTime(os_date_and_time fileTime);
--- 28,50 ----
#define DELIMITOR '.'
! /* debugging stuff; can probably be deleted */
! //#define DEBUG
!
! #ifdef DEBUG
! #define FPRINTF(s)\
! {\
! extern os_error privateErr;\
! extern void platReportError( os_error * e);\
! privateErr.errnum = (bits)0;\
! sprintf s;\
! platReportError((os_error *)&privateErr);\
! };
! #else
! # define FPRINTF(X)
! #endif
+
+ extern struct VirtualMachine * interpreterProxy;
+ extern void sqStringFromFilename( int sqString, char*fileName, int sqSize);
/*** Functions ***/
int convertToSqueakTime(os_date_and_time fileTime);
***************
*** 72,76 ****
int dir_Delete(char *pathString, int pathStringLength) {
/* Delete the existing directory with the given path. */
! /* For now replicate the normal sqFileDeleteNameSize, since that appears to be adequate */
char cFileName[MAXDIRNAMELENGTH];
int err;
--- 88,92 ----
int dir_Delete(char *pathString, int pathStringLength) {
/* Delete the existing directory with the given path. */
! /* For now replicate the normal sqFileDeleteNameSize, since that appears to be adequate, except for returning true if all is well - essential ! */
char cFileName[MAXDIRNAMELENGTH];
int err;
***************
*** 82,90 ****
/* copy the file name into a null-terminated C string */
sqFilenameFromString(cFileName, (int)pathString, pathStringLength);
!
! err = remove(cFileName);
! if (err) {
return interpreterProxy->success(false);
}
}
--- 98,106 ----
/* copy the file name into a null-terminated C string */
sqFilenameFromString(cFileName, (int)pathString, pathStringLength);
! if (remove(cFileName) != 0) {
! FPRINTF((privateErr.errmess, "dir delete error %d\n", err));
return interpreterProxy->success(false);
}
+ return true;
}
|