[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Dxreaddir (2/2)
diff -c ..\mint/dos.c ./dos.c
*** ..\mint/dos.c Fri Feb 11 10:34:28 1994
--- ./dos.c Sun Apr 24 22:27:32 1994
***************
*** 8,14 ****
#include "mint.h"
! #define DOS_MAX 0x140
Func dos_tab[DOS_MAX];
short dos_max = DOS_MAX;
--- 8,14 ----
#include "mint.h"
! #define DOS_MAX 0x150
Func dos_tab[DOS_MAX];
short dos_max = DOS_MAX;
***************
*** 602,605 ****
--- 602,606 ----
dos_tab[0x13b] = d_getcwd;
dos_tab[0x13c] = s_alert;
dos_tab[0x13d] = t_malarm;
+ dos_tab[0x142] = d_xreaddir;
}
diff -c ..\mint/dosdir.c ./dosdir.c
*** ..\mint/dosdir.c Fri Feb 11 10:27:00 1994
--- ./dosdir.c Sun Apr 24 22:50:12 1994
***************
*** 959,965 ****
--- 959,993 ----
return r;
}
+ /* jr: just as d_readdir, but also returns XATTR structure (not
+ following links). Note that the return value reflects the
+ result of the Dreaddir operation, the result of the Fxattr
+ operation is stored in long *xret */
+
long ARGS_ON_STACK
+ d_xreaddir(len, handle, buf, xattr, xret)
+ int len;
+ long handle;
+ char *buf;
+ XATTR *xattr;
+ long *xret;
+ {
+ DIR *dirh = (DIR *)handle;
+ fcookie fc;
+ long r;
+
+ if (!dirh->fc.fs) return EIHNDL;
+ r = (*dirh->fc.fs->readdir)(dirh, buf, len, &fc);
+ if (r != E_OK) return r;
+
+ *xret = (*fc.fs->getxattr)(&fc, xattr);
+
+ release_cookie(&fc);
+ return r;
+ }
+
+
+ long ARGS_ON_STACK
d_rewind(handle)
long handle;
{
diff -c ..\mint/proto.h ./proto.h
*** ..\mint/proto.h Fri Feb 11 10:35:00 1994
--- ./proto.h Sun Apr 24 22:27:50 1994
***************
*** 109,114 ****
--- 109,115 ----
long ARGS_ON_STACK d_pathconf P_((const char *name, int which));
long ARGS_ON_STACK d_opendir P_((const char *path, int flags));
long ARGS_ON_STACK d_readdir P_((int len, long handle, char *buf));
+ long ARGS_ON_STACK d_xreaddir P_((int len, long handle, char *buf, XATTR *xattr, long *xret));
long ARGS_ON_STACK d_rewind P_((long handle));
long ARGS_ON_STACK d_closedir P_((long handle));
long ARGS_ON_STACK f_xattr P_((int flag, const char *name, XATTR *xattr));
--
---------------------------------------------------
Julian F. Reschke, Hensenstr. 142, D-48161 Muenster
eMail: reschke@math.uni-muenster.de jr@ms.maus.de
___________________________________________________