Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/runtime/c-libs/posix-filesys/out
ViewVC logotype

View of /sml/trunk/src/runtime/c-libs/posix-filesys/out

Parent Directory Parent Directory | Revision Log Revision Log


Revision 651 - (download) (annotate)
Thu Jun 1 18:34:03 2000 UTC (19 years, 10 months ago) by monnier
File size: 29134 byte(s)
bring revisions from the vendor branch to the trunk
# 1 "rewinddir.c"
 




# 1 "../../include/ml-osdep.h"
 











 









































# 1 "/usr/include/sys/types.h"
 















 
 

 
 
 






# 1 "/usr/include/sgidefs.h"
 



















 















 






 









 







 









 


















 













 











typedef int __int32_t;
typedef unsigned  __uint32_t;














typedef long long __int64_t;
typedef unsigned long long  __uint64_t;

















typedef __int32_t __psint_t;
typedef __uint32_t __psunsigned_t;







 











 
typedef __int32_t __scint_t;
typedef __uint32_t __scunsigned_t;










# 30 "/usr/include/sys/types.h"

 
typedef unsigned char   uchar_t;
typedef unsigned short  ushort_t;
typedef unsigned int    uint_t;
typedef unsigned long   ulong_t;

 
typedef	char *		addr_t;		 
typedef	char *		caddr_t;	 
typedef	long		daddr_t;	 
typedef	long		pgno_t;		 
typedef	__uint32_t	pfn_t;		 
typedef	short		cnt_t;		 

typedef enum { B_FALSE, B_TRUE } boolean_t;


 








typedef long			id_t;	 
					 
					 
					 
					 





 


typedef ulong_t	major_t;	 
typedef ulong_t	minor_t;	 






 










typedef	ushort_t o_mode_t;		 
typedef short	o_dev_t;		 
typedef	ushort_t o_uid_t;		 
typedef	o_uid_t	o_gid_t;		 
typedef	short	o_nlink_t;		 
typedef short	o_pid_t;		 
typedef __uint32_t o_ino_t;		 


typedef	unsigned long	mode_t;		 
typedef	unsigned long	dev_t;		 
typedef	long		uid_t;
typedef	long		gid_t;
typedef unsigned long	nlink_t;	 
typedef long		pid_t;		 
typedef	unsigned long	ino_t;		 











typedef	long		swblk_t;
typedef	long		off_t;		 
typedef	unsigned long	paddr_t;	 
typedef	int		key_t;		 
typedef	unsigned char	use_t;		 
typedef	short		sysid_t;
typedef	short		index_t;
typedef unsigned int	lock_t;		 
typedef	signed char	cpuid_t;	 




typedef unsigned int size_t;









typedef int    ssize_t;








typedef	long		time_t;		 




typedef	long		clock_t;  



 



typedef __scunsigned_t	bitnum_t;	 
typedef __scunsigned_t	bitlen_t;	 


typedef int processorid_t;		 
typedef int toid_t;			 
typedef	long *qaddr_t;		       
typedef __uint32_t inst_t;		 

 


typedef unsigned machreg_t;






 


typedef __uint32_t fpreg_t;






typedef	signed char	int8_t;
typedef	short		int16_t;
typedef	__int32_t	int32_t;
typedef	unsigned char	u_int8_t;
typedef	unsigned short	u_int16_t;
typedef	__uint32_t	u_int32_t;


 













 



typedef	long	hostid_t;

 








 



# 1 "/usr/include/sys/bsd_types.h"
 





















 




typedef	struct { int r[1]; } *	physadr;
typedef	unsigned char	unchar;
typedef	unsigned char	u_char;
typedef	unsigned short	ushort;
typedef	unsigned short	u_short;
typedef	unsigned int	uint;
typedef	unsigned int	u_int;
typedef	unsigned long	ulong;
typedef	unsigned long	u_long;
typedef	struct	_quad { long val[2]; } quad;






# 1 "/usr/include/sys/select.h"
 















 
 
 

 
 
 
 






 














typedef	unsigned long	fd_mask;










typedef	struct fd_set {
	fd_mask	fds_bits[(((1024)+(( (sizeof(fd_mask) * 8))-1))/( (sizeof(fd_mask) * 8))) ];
} fd_set;







# 45 "/usr/include/sys/bsd_types.h"


# 232 "/usr/include/sys/types.h"


 
typedef struct {                 
        __uint32_t sigbits[2];
} k_sigset_t;
typedef __uint32_t k_fltset_t;      

# 308 "/usr/include/sys/types.h"



# 56 "../../include/ml-osdep.h"
# 1 "/usr/include/unistd.h"






 
















 
 

 
 
 



 



















 








 







 




 























 




 




 




















# 1 "/usr/include/sys/types.h"
 















 
 

 
 
 

# 310 "/usr/include/sys/types.h"

# 131 "/usr/include/unistd.h"
# 1 "/usr/include/sys/unistd.h"
 
 

 
 
 

 








 


























 















































# 132 "/usr/include/unistd.h"


struct iovec;
struct timeval;
extern int acct(const char *);
extern int brk(void *);
extern int chroot(const char *);
extern int fattach(int, const char *);
extern int fchdir(int);
extern int fchown(int, uid_t, gid_t);
extern int fdetach(const char *);
extern int fsync(int);
extern int ftruncate(int, off_t);
extern pid_t getpgid(pid_t);
extern char *gettxt(const char *, const char *);
extern pid_t getsid(pid_t);
extern int ioctl(int, int, ...);
extern int lchown(const char *, uid_t, gid_t);
extern int lockf(int, int, long);
extern int mincore(caddr_t, size_t, char *);
extern int nice(int);
extern void profil(unsigned short *, unsigned int, unsigned int, unsigned int);
extern int ptrace(int, pid_t, int, int);
extern char *re_comp(const char *);
extern int re_exec(const char *);
extern int readlink(const char *, void *, int);
extern int readv(int, struct iovec *, int);
extern int rename(const char *, const char *);
extern void *sbrk(int);




extern int setgroups(int, const gid_t *);
extern pid_t    setpgrp(void);

extern int stime(const time_t *);
extern int symlink(const char *, const char *);
extern void sync(void);
extern int truncate(const char *, off_t);
extern int vhangup(void);
extern int writev(int, const struct iovec *, int);



 


extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);


 


extern int access(const char *, int);
extern unsigned alarm(unsigned);
extern int chdir(const char *);
extern int chown(const char *, uid_t, gid_t);
extern int close(int);
extern char *ctermid(char *);
extern char *cuserid(char *);
extern int dup(int);
extern int dup2(int, int);
extern int execl(const char *, const char *, ...);
extern int execle(const char *, const char *, ...);
extern int execlp(const char *, const char *, ...);
extern int execv(const char *, char *const *);
extern int execve(const char *, char *const *, char *const *);
extern int execvp(const char *, char *const *);
extern void exit(int);
extern void _exit(int);
extern pid_t fork(void);
extern long fpathconf(int, int);
extern char *getcwd(char *, size_t);     
extern gid_t getegid(void);
extern uid_t geteuid(void);
extern gid_t getgid(void);



extern int getgroups(int, gid_t *);

extern char *getlogin(void);



extern pid_t getpgrp(void);

extern pid_t getpid(void);
extern pid_t getppid(void);
extern uid_t getuid(void);
extern int isatty(int);
extern int link(const char *, const char *);
extern off_t lseek(int, off_t, int);
extern long pathconf(const char *, int);
extern int pause(void);
extern int pipe(int *);
extern int read(int, void *, unsigned);
extern int rmdir(const char *);
extern int setgid(gid_t);
extern int setpgid(pid_t, pid_t);
extern pid_t setsid(void);
extern int setuid(uid_t);
extern unsigned sleep(unsigned);
extern long sysconf(int);
extern pid_t tcgetpgrp(int);
extern int tcsetpgrp(int, pid_t);
extern char *ttyname(int);
extern int unlink(const char *);
extern int write(int, const void *, unsigned);

 



# 1 "/usr/include/utime.h"






 
















 
 
 

 
 
 
 


# 1 "/usr/include/sys/utime.h"
 
 
 

 
 
 
 




 

# 1 "/usr/include/sys/types.h"
 















 
 

 
 
 

# 310 "/usr/include/sys/types.h"

# 16 "/usr/include/sys/utime.h"

struct utimbuf {
	time_t actime;		 
	time_t modtime;		 
};


# 35 "/usr/include/utime.h"


extern int utime(const char *, const struct utimbuf *);








# 248 "/usr/include/unistd.h"
extern int BSDchown(const char *, uid_t, gid_t);
extern int BSDdup2(int, int);
extern int BSDfchown(int, uid_t, gid_t);
extern int BSDsetpgrp(int, int);
extern int BSDsetgroups(int, int *);
extern int BSDgetgroups(int, int *);

extern void bset(char *, bitnum_t);
extern void bclr(char *, bitnum_t);
extern int btst(char *, bitnum_t);
extern void bfset(char *, bitnum_t, bitlen_t);
extern void bfclr(char *, bitnum_t, bitlen_t);
extern bitlen_t bftstset(char *, bitnum_t, bitlen_t);
extern bitlen_t bftstclr(char *, bitnum_t, bitlen_t);

extern int _daemonize(int, int, int, int);
extern int getdtablesize(void);
extern int getdtablehi(void);
extern int getdomainname(char *, int);
extern long gethostid(void);
extern int gethostname(char *, int);
extern int getpagesize(void);
extern char *_getpty(int *, int, mode_t, int);
extern char *getwd(char *);
extern int mpin(void *, size_t);
extern int munpin(void *, size_t);
extern pid_t pcreatel(const char *, const char *, ...);
extern pid_t pcreatelp(const char *, const char *, ...);
extern pid_t pcreatev(const char *, char *const *);
extern pid_t pcreateve(const char *, char *const *, char *const *);
extern pid_t pcreatevp(const char *, char *const *);
extern int setdomainname(const char *, int);
extern int sethostid(long);
extern int sethostname(const char *, int);
extern int setregid(gid_t, gid_t);
extern int setreuid(uid_t, uid_t);
extern int sgikopt(const char *, char *, int);
extern int sginap(long);


 




extern char *getlogin_r(char *, int);








# 57 "../../include/ml-osdep.h"
# 1 "/usr/include/string.h"






 
















 
 
 

 
 
 
 
















extern void *memcpy(void *, const void *, size_t);
extern void *memmove(void *, const void *, size_t);
extern char *strcpy(char *, const char *);

extern char *strncpy(char *, const char *, size_t);

extern char *strcat(char *, const char *);
extern char *strncat(char *, const char *, size_t);

extern int memcmp(const void *, const void *, size_t);
extern int strcmp(const char *, const char *);
extern int strcoll(const char *, const char *);
extern int strncmp(const char *, const char *, size_t);
extern size_t strxfrm(char *, const char *, size_t);

extern void *memchr(const void *, int, size_t);
extern char *strchr(const char *, int);
extern size_t strcspn(const char *, const char *);
#pragma int_to_unsigned strcspn
extern char *strpbrk(const char *, const char *);
extern char *strrchr(const char *, int);
extern size_t strspn(const char *, const char *);
#pragma int_to_unsigned strspn
extern char *strstr(const char *, const char *);
extern char *strtok(char *, const char *);

extern void *memset(void *, int, size_t);
extern char *strerror(int);
extern size_t strlen(const char *);
#pragma int_to_unsigned strlen



extern void *memccpy(void *, const void *, int, size_t);




extern char *strdup(const char *);
extern int ffs(int);





 
extern int	strcasecmp(const char *, const char *);
extern int	strncasecmp(const char *, const char *, size_t);




extern char *strtok_r(char *, const char *, char **);



 


#pragma intrinsic (strcpy)






# 58 "../../include/ml-osdep.h"
# 1 "/usr/include/errno.h"






 
















 
 

 
 
 



 



# 1 "/usr/include/sys/errno.h"
 
 
 

 
 
 
 






 


























 


















































 










 






















 















 
	 














	 









 
















 




 


 











 
 








 































# 38 "/usr/include/errno.h"




extern int errno;



extern char *   sys_errlist[];
extern int      sys_nerr;

extern int      oserror(void);
extern int      setoserror(int);
extern int      goserror(void);













# 59 "../../include/ml-osdep.h"


 

















































# 172 "../../include/ml-osdep.h"















# 342 "../../include/ml-osdep.h"


 


















 

 
 
 
 









 







# 1 "../../objs/ml-sizes.h"
 



















typedef short Int16_t;
typedef unsigned short Unsigned16_t;
typedef long Int32_t;
typedef unsigned long Unsigned32_t;

typedef unsigned char Byte_t;
typedef Unsigned32_t Word_t;
typedef Unsigned32_t Addr_t;



# 387 "../../include/ml-osdep.h"

















# 7 "rewinddir.c"
# 1 "../../include/ml-base.h"
 








 






 
















 

 


 


 


 







# 1 "/usr/include/stdlib.h"






 
















 
 

 
 
 

# 1 "/usr/include/sgidefs.h"
 










# 185 "/usr/include/sgidefs.h"

# 32 "/usr/include/stdlib.h"





 



 





















typedef	struct {
	 int	quot;
	 int	rem;
	} div_t;

typedef struct {
	 long	quot;
	 long	rem;
	} ldiv_t;


typedef struct {
	 long long	quot;
	 long long	rem;
	} lldiv_t;

























typedef long wchar_t;






extern unsigned char 	__ctype[];	



extern double atof(const char *);
extern int atoi(const char *);
extern long int atol(const char *);
extern double strtod(const char *, char **);
extern long int strtol(const char *, char **, int);
extern unsigned long int strtoul(const char *, char **, int);

extern long long int atoll(const char *);
extern long long int strtoll(const char *, char **, int);
extern unsigned long long int strtoull(const char *, char **, int);


extern int rand(void);
extern void srand(unsigned int);

extern void *calloc(size_t, size_t);
extern void free(void *);
extern void *malloc(size_t);
extern void *realloc(void *, size_t);

extern void abort(void);
extern int atexit(void (*)(void));
extern void exit(int);
extern char *getenv(const char *);
extern int system(const char *);

extern void *bsearch(const void *, const void *, size_t, size_t,
	int (*)(const void *, const void *));
extern void qsort(void *, size_t, size_t,
	int (*)(const void *, const void *));







extern int abs(int);


extern div_t div(int, int);
extern long int labs(long);
extern ldiv_t ldiv(long, long);

extern long long llabs(long long);
extern lldiv_t lldiv(long long, long long);


extern int mbtowc(wchar_t *, const char *, size_t);
extern int mblen(const char *, size_t);
extern int wctomb(char *, wchar_t);

extern size_t mbstowcs(wchar_t *, const char *, size_t);
extern size_t wcstombs(char *, const wchar_t *, size_t);



extern long a64l(const char *);
extern int dup2(int, int);
extern char *ecvt(double, int, int *, int *);
extern char *fcvt(double, int, int *, int *);
extern char *getcwd(char *, size_t);
extern char *getlogin(void);
# 1 "/usr/include/getopt.h"







 



















 





extern int	getopt(int, char *const *, const char *);
extern int	getsubopt(char **, char *const *, char **);

extern char	*optarg;
extern int	opterr;
extern int	optind;
extern int	optopt;






# 178 "/usr/include/stdlib.h"
extern char *getpass(const char *);
extern int getpw(int, char *);
extern char *gcvt(double, int, char *);
extern int isatty(int);
extern void l3tol(long *, const char *, int);
extern char *l64a(long);
extern void ltol3(char *, const long *, int);
extern void * memalign(size_t, size_t);
extern char *mktemp(char *);
extern int putenv(char *);
extern char *realpath(const char *, char *);
extern void swab(const char *, char *, int);
extern char *ttyname(int);
extern int ttyslot(void);
extern void *valloc(size_t);

extern double	drand48(void);
extern double	erand48(unsigned short [3]);
extern long	lrand48(void);
extern long	nrand48(unsigned short [3]);
extern long	mrand48(void);
extern long	jrand48(unsigned short [3]);
extern void	srand48(long);
extern unsigned short * seed48(const unsigned short [3]);
extern void	lcong48(const unsigned short [7]);




extern int rand_r(unsigned int *);
extern char *ttyname_r(int, char *, int);









# 54 "../../include/ml-base.h"



typedef Unsigned32_t bool_t;



typedef Unsigned32_t status_t;



 


 








 







 



 


 



 

 


 



 



typedef struct { Word_t v[1]; } ml_object_t;  
typedef ml_object_t *ml_val_t;

typedef struct ml_state ml_state_t;
typedef struct heap heap_t;

extern void Error (char *, ...);
extern void Exit (int code);
extern void Die (char *, ...);
extern void Syserror (char *, ...);

extern ml_state_t *AllocMLState(int allocSz, int numGens, int cacheGen);
extern void InitMLState (ml_state_t *msp);
extern void SaveCState (ml_state_t *msp, ...);
extern void RestoreCState (ml_state_t *msp, ...);
extern void BootML (const char *bootModule, int allocSz, int numGens, int cacheGen);
extern void LoadML (const char *loadImage, int allocSz, int numGens, int cacheGen);
extern ml_val_t ApplyMLFn (ml_state_t *msp, ml_val_t f, ml_val_t arg, bool_t useCont);
extern void RunML (ml_state_t *msp);
extern void RaiseMLExn (ml_state_t *msp, ml_val_t exn);
extern void InitSignals (ml_state_t *msp);
extern void InitFaultHandlers ();
extern void EnableSignal (ml_state_t *msp, int mlSignal, bool_t enable);
extern void ChooseSignal (ml_state_t *msp);
extern ml_val_t MakeHandlerArg (ml_state_t *msp, ml_val_t resume[]);
extern ml_val_t MakeResumeCont (ml_state_t *msp, ml_val_t resume[]);
extern void LoadSigResumeState (ml_state_t *msp);
extern bool_t GCSignal (ml_state_t *msp);
extern void MaskTimerSigs (ml_state_t *msp, bool_t mask);

 



extern char	**RawArgs;
extern char	**CmdLineArgs;

extern char	*MLCmdName;	 
extern bool_t	SilentLoad;

 
extern ml_state_t	*VProcStates[];
extern int		NumVProcs;





# 8 "rewinddir.c"
# 1 "../../include/ml-values.h"
 


















 	 
















 






















 


 




 





 







# 9 "rewinddir.c"
# 1 "../../include/tags.h"
 


























					 



					 
					 



 





 










 


 
 


 





					 


 



 














 












 








 







# 10 "rewinddir.c"
# 1 "../../include/ml-objects.h"
 


















# 1 "../../include/ml-state.h"
 









# 1 "/usr/include/setjmp.h"
 
















 
 

 
 
 
























# 1 "/usr/include/sgidefs.h"
 










# 185 "/usr/include/sgidefs.h"

# 49 "/usr/include/setjmp.h"


typedef int jmp_buf[28 ];










typedef int sigjmp_buf[128 ];







extern int 	sigsetjmp(sigjmp_buf, int);
extern void 	siglongjmp(sigjmp_buf, int);


extern int 	_setjmp(jmp_buf);
extern void 	_longjmp(jmp_buf, int);
extern int 	setjmp(jmp_buf);
extern void 	longjmp(jmp_buf, int);
















 





































 




# 172 "/usr/include/setjmp.h"








# 12 "../../include/ml-state.h"






# 1 "../../include/ml-signal.h"
 











# 1 "/usr/include/signal.h"






 
















 
 

 
 
 

# 1 "/usr/include/sys/signal.h"
 
 
 

 
 
 










 















 



 
























































 





union sigval {
	int	sival_int;
	void	*sival_ptr;
};








typedef struct sigevent {
	int		sigev_signo;
	union sigval	sigev_value;
} sigevent_t;











 







# 183 "/usr/include/sys/signal.h"


typedef void 	(*SIG_PF) ( );







extern void 	(*signal(int,void  (*)( )))( );



# 1 "/usr/include/sys/types.h"
 















 
 

 
 
 

# 310 "/usr/include/sys/types.h"

# 198 "/usr/include/sys/signal.h"

typedef struct {                 
        __uint32_t sigbits[4];
} sigset_t;

typedef struct sigaction {
	int sa_flags;			 
	void  (*sa_handler)( );	 
	sigset_t sa_mask;		 
					 
	int sa_resv[2];
} sigaction_t;

 













 
 







 


					 

 

					 
					 






 



struct sigaltstack {
	char	*ss_sp;
	int	ss_size;
	int	ss_flags;
};
typedef struct sigaltstack stack_t;

 






 













 





typedef struct sigcontext {
	__uint32_t	sc_regmask;	 
	__uint32_t	sc_status;	 
	__uint64_t	sc_pc;		 
	 


	__uint64_t	sc_regs[32];	 
	 


	__uint64_t	sc_fpregs[32];	 
	__uint32_t	sc_ownedfp;	 
	__uint32_t	sc_fpc_csr;	 
	__uint32_t	sc_fpc_eir;	 
					 
	__uint32_t	sc_ssflags;	 
	__uint64_t	sc_mdhi;	 
	__uint64_t	sc_mdlo;
	 


	__uint64_t	sc_cause;	 
	__uint64_t	sc_badvaddr;	 
	__uint64_t	sc_triggersave;	 
	sigset_t	sc_sigset;	 
	__uint64_t	sc_pad[32];
} sigcontext_t;


 


 


struct sigstack {
	char	*ss_sp;			 
	int	ss_onstack;		 
};
















































# 32 "/usr/include/signal.h"


typedef int 	sig_atomic_t;

extern char *_sys_siglist[];
extern int _sys_nsig;



extern int raise(int);


# 1 "/usr/include/sys/types.h"
 















 
 

 
 
 

# 310 "/usr/include/sys/types.h"

# 45 "/usr/include/signal.h"

extern int kill(pid_t, int);
extern int sigpause(int);
extern int sighold(int);
extern int sigrelse(int);




extern void (*sigset(int, void (*)()))();
extern int (*ssignal(int, int (*)()))();



extern int sigaction(int, const struct sigaction *, struct sigaction *);
extern int sigpending(sigset_t *);
extern int sigprocmask(int, const sigset_t *, sigset_t *);
extern int sigsuspend(const sigset_t *);
extern int sigaddset(sigset_t *, int);
extern int sigdelset(sigset_t *, int);
extern int sigemptyset(sigset_t *);
extern int sigfillset(sigset_t *);
extern int sigismember(const sigset_t *, int);




# 1 "/usr/include/sys/procset.h"
 
 

 
 
 






# 1 "/usr/include/sys/types.h"
 















 
 

 
 
 

# 310 "/usr/include/sys/types.h"

# 14 "/usr/include/sys/procset.h"

 










 




typedef enum idtype {
	P_PID,		 
	P_PPID,		 
	P_PGID,		 
			 
	P_SID,		 
	P_CID,		 
	P_UID,		 
	P_GID,		 
	P_ALL		 
} idtype_t;


 




typedef enum idop {
	POP_DIFF,	 
			 
			 
	POP_AND,	 
			 
			 
	POP_OR,		 
			 
			 
	POP_XOR		 
			 
			 
} idop_t;


 




typedef struct procset {
	idop_t		p_op;	 
				 
				 
				 

	idtype_t	p_lidtype;
				 
				 
	id_t		p_lid;	 

	idtype_t	p_ridtype;
				 
				 
	id_t		p_rid;	 
} procset_t;


 




 
 
 
 
 










# 73 "/usr/include/signal.h"
extern int gsignal(int);
extern int sighold(int);
extern int sigrelse(int);
extern int sigignore(int);
extern int sigaltstack(const stack_t *, stack_t *);
extern int sigsend(idtype_t, id_t, int);
extern int sigsendset(const procset_t *, int);



struct timespec;
struct siginfo;
extern int sigwaitrt(const sigset_t *set, struct siginfo *value);
extern int sigqueue(pid_t , int, const union sigval);
extern int sigtimedwait(const sigset_t *set, struct siginfo *value, struct timespec *ts);



 






 





extern int      sgi_altersigs(int,sigset_t *,int[]);
extern int      sgi_sigffset(sigset_t *,int);
extern int      sgi_dumpset(sigset_t *);













# 14 "../../include/ml-signal.h"

 
























 
typedef int SigState_t;




 




                          		 

 
typedef struct ml_siginfo {
    int		count;			 
    SigState_t	state;			 
} ml_siginfo_t;


# 19 "../../include/ml-state.h"



# 1 "../../include/reg-mask.h"
 














































 
















 














# 23 "../../include/ml-state.h"










 
























































# 182 "../../include/ml-state.h"



 



extern int   ArgRegMap[17 ];

 

    
struct ml_state {
				 
    heap_t	*ml_heap;	     



				 
    ml_val_t	*ml_allocPtr;
    ml_val_t	*ml_limitPtr;
    ml_val_t	ml_storePtr;	     
 



    ml_val_t	ml_roots[21 ];    


























    ml_val_t	ml_pseudoRegs[2 ];


				   
    int		ml_liveRegMask;		 
    bool_t	ml_inMLFlag;		 
    bool_t	ml_handlerPending;	 
    bool_t	ml_inSigHandler;	 
    bool_t	ml_maskSignals;		 
    bool_t	ml_ioWaitFlag;		 
    int		ml_numPendingUnixSigs;	 
    int		ml_numPendingSigs;	 
    int		ml_sigCode;		 
    int		ml_sigCount;		 
    ml_siginfo_t *ml_sigTbl;		 
    sigjmp_buf  ml_syscallEnv;		 





    ml_val_t	ml_faultExn;		 
    struct timeval *ml_gcTime0;		 
					 
    struct timeval *ml_gcTime;		 









};  


 


 
 
 
 

 
 
 
 
 
 
 
 
 






















# 21 "../../include/ml-objects.h"






 






 



 
 
 
 
 
 
 


 



 




 
 



 
 
 
 
 
 
 


 
 
 
 
 
 
 


 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 
 
 
 


 






 



 



 
extern ml_val_t ML_CString (ml_state_t *msp, const char *v);
extern ml_val_t ML_CStringList (ml_state_t *msp, char **strs);
extern ml_val_t ML_AllocString (ml_state_t *msp, int len);
extern ml_val_t ML_AllocCode (ml_state_t *msp, int len);
extern ml_val_t ML_AllocBytearray (ml_state_t *msp, int len);
extern ml_val_t ML_AllocRealdarray (ml_state_t *msp, int len);
extern ml_val_t ML_AllocArray (ml_state_t *msp, int len, ml_val_t initVal);
extern ml_val_t ML_AllocVector (ml_state_t *msp, int len, ml_val_t initVal);

extern bool_t ML_StringEq (ml_val_t a, ml_val_t b);

extern ml_val_t _ML_string0[];
extern ml_val_t _ML_array0[];
extern ml_val_t _ML_bytearray0[];
extern ml_val_t _ML_realarray0[];
extern ml_val_t _ML_vector0[];







# 11 "rewinddir.c"
# 1 "../ml-c.h"
 









# 1 "/usr/include/errno.h"
# 64 "/usr/include/errno.h"

# 12 "../ml-c.h"


# 1 "../../include/ml-globals.h"
 














extern ml_val_t	*CRoots[];
extern int	NumCRoots;

extern ml_val_t	_PervStruct[];		 


extern ml_val_t _MLSignalHandler[];


extern ml_val_t SysError_id0[];


extern ml_val_t CStruct;




extern ml_val_t _Div_e0[];

extern ml_val_t _Overflow_e0[];









extern ml_val_t sigh_resume[];
extern ml_val_t *sigh_return_c;
extern ml_val_t pollh_resume[];
extern ml_val_t *pollh_return_c;
extern ml_val_t callc_v[];
extern ml_val_t handle_v[];
extern ml_val_t *return_c;

extern ml_val_t _MLPollHandler[];


 
extern ml_val_t _PollFreq0[];

extern ml_val_t _PollEvent0[];

extern ml_val_t _ActiveProcs0[];


 
extern void InitCFunList ();
 
extern void RecordGlobals ();
 
extern void AllocGlobals (ml_state_t *msp);
 
extern ml_val_t BindCFun (char *moduleName, char *funName);







# 15 "../ml-c.h"



 

 
 
 

 



 
 
 
 
 

 

 
 
 

 

 

 




 
 
 
 
 

extern int	    errno;

ml_val_t RaiseSysError (ml_state_t *msp, const char *alt_msg);


# 12 "rewinddir.c"
# 1 "./cfun-proto-list.h"
 








# 1 "../c-library.h"
 







 


typedef void (*clib_init_fn_t) (int, char **);

 
typedef ml_val_t (*cfunc_t) (ml_state_t *, ml_val_t);

 
typedef struct {
    const char	    *name;
    cfunc_t	    cfunc;
} cfunc_binding_t;

 
typedef struct {
    const char	    *libName;	 
    const char	    *version;
    const char	    *date;
    clib_init_fn_t  initFn;	 
    cfunc_binding_t *cfuns;	 
				 
} c_library_t;


 

 

 

 

 



# 11 "./cfun-proto-list.h"


 

# 1 "./cfun-list.h"
 












extern ml_val_t  	   _ml_P_FileSys_osval (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t       _ml_P_FileSys_chdir (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t      _ml_P_FileSys_getcwd (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t       _ml_P_FileSys_openf (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t       _ml_P_FileSys_umask (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t        _ml_P_FileSys_link (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t      _ml_P_FileSys_rename (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t     _ml_P_FileSys_symlink (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t       _ml_P_FileSys_mkdir (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t      _ml_P_FileSys_mkfifo (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t      _ml_P_FileSys_unlink (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t       _ml_P_FileSys_rmdir (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t    _ml_P_FileSys_readlink (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t        _ml_P_FileSys_stat (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t       _ml_P_FileSys_lstat (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t       _ml_P_FileSys_fstat (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t      _ml_P_FileSys_access (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t       _ml_P_FileSys_chmod (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t       _ml_P_FileSys_chown (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t      _ml_P_FileSys_fchown (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t       _ml_P_FileSys_utime (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t    _ml_P_FileSys_pathconf (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t   _ml_P_FileSys_fpathconf (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t     _ml_P_FileSys_opendir (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t     _ml_P_FileSys_readdir (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t   _ml_P_FileSys_rewinddir (ml_state_t *msp, ml_val_t arg);  
extern ml_val_t    _ml_P_FileSys_closedir (ml_state_t *msp, ml_val_t arg);  

# 16 "./cfun-proto-list.h"



# 13 "rewinddir.c"
# 1 "/usr/include/sys/types.h"
 















 
 

 
 
 

# 310 "/usr/include/sys/types.h"

# 14 "rewinddir.c"
# 1 "/usr/include/dirent.h"






 
















 
 

 
 
 











typedef struct
	{
	int		dd_fd;		 
	int		dd_loc;		 
	int		dd_size;	 
	char		*dd_buf;	 
	}	DIR;			 



extern DIR		*opendir( const char * );
extern struct dirent	*readdir( DIR * );

extern long		telldir( DIR * );
extern void		seekdir( DIR *, long );


extern int 		scandir(const char *, struct dirent **[],
				int (*)(struct dirent *),
				int (*)(struct dirent **, struct dirent **));
extern int		alphasort(struct dirent **, struct dirent **);

extern void		rewinddir( DIR * );
extern int		closedir( DIR * );


extern struct dirent	*readdir_r(DIR *, struct dirent *);























# 1 "/usr/include/sys/dirent.h"







 
 

 
 
 

 


# 1 "/usr/include/sys/types.h"
 















 
 

 
 
 

# 310 "/usr/include/sys/types.h"

# 19 "/usr/include/sys/dirent.h"

 





struct dirent {				 
	ino_t		d_ino;		 
	off_t		d_off;		 
	unsigned short	d_reclen;	 
	char		d_name[1];	 
};

typedef struct  dirent  dirent_t;



int getdents(int, struct dirent *, unsigned);






 

 



























# 92 "/usr/include/dirent.h"





# 15 "rewinddir.c"

 



ml_val_t _ml_P_FileSys_rewinddir (ml_state_t *msp, ml_val_t arg)
{
    int        sts;
    
    sts = seekdir( ((DIR *)(  arg)), 0L ) ;

    {				if (( sts) == -1)						    return RaiseSysError(msp, ((char *)0) );			else								    return ( ((ml_val_t)(((0) << 1) + 1)));					    }  ;

}  

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0