mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
RISCOS files by dschwertberger
This commit is contained in:
parent
c92cdf7aa7
commit
228d80736c
16 changed files with 3089 additions and 0 deletions
20
RISCOS/Python/getmtime_riscos.c
Normal file
20
RISCOS/Python/getmtime_riscos.c
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#define __swi
|
||||
#include "osfile.h"
|
||||
|
||||
long PyOS_GetLastModificationTime(char *path, FILE *fp)
|
||||
{
|
||||
int obj;
|
||||
bits load, exec, ftype;
|
||||
|
||||
if (xosfile_read_stamped_no_path(path, &obj, &load, &exec, 0, 0, &ftype)) return -1;
|
||||
if (obj != osfile_IS_FILE) return -1;
|
||||
if (ftype == osfile_TYPE_UNTYPED) return -1;
|
||||
|
||||
load &= 0xFF;
|
||||
load -= 51;
|
||||
if (exec < 1855548004U) load--;
|
||||
exec -= 1855548004U;
|
||||
return exec/100+42949672*load+(95*load)/100;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue