home *** CD-ROM | disk | FTP | other *** search
- /* Fudge unix isatty and fileno for RISCOS */
-
- #include "h.unixstuff"
- #include <math.h>
- #include "h.osfile"
-
- int fileno(FILE *f)
- { return (int)f;
- }
-
- int isatty(int fn)
- { return (fn==fileno(stdin));
- }
-
- bits unixtime(bits ld,bits ex)
- { ld&=0xFF;
- ld-=51;
- if(ex<1855548004U) ld--;
- ex-=1855548004U;
- return ex/100+42949672*ld+(95*ld)/100;
- }
-
- long PyOS_GetLastModificationTime(char *name)
- { int obj;
- bits la,ea,ftype;
- if(xosfile_read_stamped_no_path(name,&obj,&la,&ea,0,0,&ftype)) return -1;
- if(obj!=osfile_IS_FILE) return -1;
- if(ftype==osfile_TYPE_UNTYPED) return -1;
- return (long)unixtime(la,ea);
- }
-
- int unlink(char *fname)
- { remove(fname);
- return 0;
- }
-
- double hypot(double x,double y)
- { return sqrt(x*x+y*y);
- }
-
-
-