~malept/ubuntu/lucid/python2.6/dev-dependency-fix

« back to all changes in this revision

Viewing changes to RISCOS/Python/getmtime_riscos.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-02-13 12:51:00 UTC
  • Revision ID: james.westby@ubuntu.com-20090213125100-uufgcb9yeqzujpqw
Tags: upstream-2.6.1
ImportĀ upstreamĀ versionĀ 2.6.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <stdio.h>
 
2
 
 
3
#define __swi
 
4
#include "oslib/osfile.h"
 
5
 
 
6
long PyOS_GetLastModificationTime(char *path, FILE *fp)
 
7
{
 
8
  int obj;
 
9
  bits load, exec, ftype;
 
10
 
 
11
  if (xosfile_read_stamped_no_path(path, &obj, &load, &exec, 0, 0, &ftype)) return -1;
 
12
  if (obj != osfile_IS_FILE) return -1;
 
13
  if (ftype == osfile_TYPE_UNTYPED) return -1;
 
14
 
 
15
  load &= 0xFF;
 
16
  load -= 51;
 
17
  if (exec < 1855548004U) load--;
 
18
  exec -= 1855548004U;
 
19
  return exec/100+42949672*load+(95*load)/100;
 
20
}