[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Axiom-developer] axiom.silver
From: |
Bill Page |
Subject: |
RE: [Axiom-developer] axiom.silver |
Date: |
Fri, 15 Sep 2006 11:45:47 -0400 |
Camm,
On September 15, 2006 11:31 AM you wrote:
>
> Can we finalize this stat bit please? I'm trying to get 2.6.8
> out ...
>
Great!
> In addition to knowing whether enough information is provided,
> I need to know if it works on windows, macosx, and any other
> proprietary system of interest.
>
I think your proposal for the si::stat function is perfect.
I hope that it meets approval with other GCL users.
I will try your patch on Windows tonight and report results
tomorrow morning.
Regards,
Bill Page.
>
> Camm Maguire <address@hidden> writes:
> ...
> > How about this:
> >
> > Index: unixfsys.c
> > ======================================================
> > RCS file: /cvsroot/gcl/gcl/o/unixfsys.c,v
> > retrieving revision 1.28
> > diff -u -r1.28 unixfsys.c
> > --- unixfsys.c 24 Aug 2006 16:53:28 -0000 1.28
> > +++ unixfsys.c 12 Sep 2006 16:35:56 -0000
> > @@ -23,6 +23,7 @@
> > #include <stdlib.h>
> > #include <unistd.h>
> > #include <errno.h>
> > +#include <time.h>
> >
> > #define IN_UNIXFSYS
> > #include "include.h"
> > @@ -490,6 +491,34 @@
> > }
> >
> >
> > +DEF_ORDINARY("DIRECTORY",sKdirectory,KEYWORD,"");
> > +DEF_ORDINARY("LINK",sKlink,KEYWORD,"");
> > +DEF_ORDINARY("FILE",sKfile,KEYWORD,"");
> > +
> >
> +DEFUN_NEW("STAT",object,fSstat,SI,1,1,NONE,OO,OO,OO,OO,
> (object path),"") {
> > +
> > + char filename[4096];
> > + struct stat ss;
> > +
> > +
> > + bzero(filename,sizeof(filename));
> > + coerce_to_filename(path,filename);
> > + if (lstat(filename,&ss))
> > + RETURN1(Cnil);
> > + else {
> > + int j;
> > + ctime_r(&ss.st_ctime,filename);
> > + j=strlen(filename);
> > + if (isspace(filename[j-1]))
> > + filename[j-1]=0;
> > + RETURN1(list(3,S_ISDIR(ss.st_mode) ? sKdirectory :
> > + (S_ISLNK(ss.st_mode) ? sKlink : sKfile),
> > + make_fixnum(ss.st_size),make_simple_string(filename)));
> > + }
> > +}
> > +
> > +
> > +
> > DEFUN_NEW("SETENV",object,fSsetenv,SI,2,2,NONE,OO,OO,
> OO,OO,(object variable,object value),"Set environment VARIABLE
> to VALUE")
> >
> > {
> >
> >
> > >(si::stat "/tmp/ff1.h")
> >
> > (:LINK 9 "Tue Sep 12 12:32:58 2006")
> >
> > >(si::stat "/tmp/ff.h")
> >
> > (:FILE 0 "Mon Dec 5 13:52:23 2005")
> >
> > >(si::stat "/tmp/")
> >
> > (:DIRECTORY 81920 "Tue Sep 12 12:34:53 2006")
> >
> > >(si::stat "/tmp")
> >
> > (:DIRECTORY 81920 "Tue Sep 12 12:34:53 2006")
> >
> > >(si::stat "/tmp1")
> >
> > NIL
> >
> > >
> >
> >
> > If we can agree on the interface, and on the Windows and Mac
> > equivalents, I can get this into 2.6.8 before release.
> >
> >
- Re: [Axiom-developer] axiom.silver, (continued)
- Re: [Axiom-developer] axiom.silver, Ralf Hemmecke, 2006/09/12
- Re: [Axiom-developer] axiom.silver, Gabriel Dos Reis, 2006/09/12
- Re: [Axiom-developer] axiom.silver, root, 2006/09/12
- RE: [Axiom-developer] axiom.silver, Gabriel Dos Reis, 2006/09/11
- Re: [Axiom-developer] axiom.silver, Camm Maguire, 2006/09/12
- Re: [Axiom-developer] axiom.silver, Gabriel Dos Reis, 2006/09/12
- Re: [Axiom-developer] axiom.silver, Camm Maguire, 2006/09/15
- RE: [Axiom-developer] axiom.silver,
Bill Page <=
- Re: [Axiom-developer] axiom.silver, Gabriel Dos Reis, 2006/09/17
- Re: [Axiom-developer] axiom.silver, Gabriel Dos Reis, 2006/09/17
- RE: [Axiom-developer] axiom.silver, Page, Bill, 2006/09/20
- Re: [Axiom-developer] axiom.silver, Camm Maguire, 2006/09/25