Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 00833d507b999bfdf858ac8b76d5c5a1fd93ec45 authored by cvs2svn on 13 April 2001, 19:41:28 UTC
This commit was manufactured by cvs2svn to create tag 'r21c1'.
Tip revision: 00833d5
getmtime_riscos.c
#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;
}
back to top