annotate Python/getmtime.c @ 16829:6732905686d4 legacy-trunk

Comment typos.
author Tim Peters <tim.peters@gmail.com>
date Wed, 28 Feb 2001 05:56:18 +0000
parents 24dafbb0db58
children 2dea40e40d9d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1449
ae93ec4dd556 New files.
Guido van Rossum <guido@python.org>
parents:
diff changeset
1
ae93ec4dd556 New files.
Guido van Rossum <guido@python.org>
parents:
diff changeset
2 /* Subroutine to get the last modification time of a file */
ae93ec4dd556 New files.
Guido van Rossum <guido@python.org>
parents:
diff changeset
3
ae93ec4dd556 New files.
Guido van Rossum <guido@python.org>
parents:
diff changeset
4 /* (A separate file because this may be OS dependent) */
ae93ec4dd556 New files.
Guido van Rossum <guido@python.org>
parents:
diff changeset
5
13226
12437deb0680 Trent Mick <trentm@activestate.com>:
Fred Drake <fdrake@acm.org>
parents: 6243
diff changeset
6 #include "Python.h"
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1449
diff changeset
7 #include "config.h"
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1449
diff changeset
8
13226
12437deb0680 Trent Mick <trentm@activestate.com>:
Fred Drake <fdrake@acm.org>
parents: 6243
diff changeset
9 time_t
13658
f79434ee41fa Mass ANSIfication of function definitions. Doesn't cover all 'extern'
Thomas Wouters <thomas@python.org>
parents: 13267
diff changeset
10 PyOS_GetLastModificationTime(char *path, FILE *fp)
1449
ae93ec4dd556 New files.
Guido van Rossum <guido@python.org>
parents:
diff changeset
11 {
ae93ec4dd556 New files.
Guido van Rossum <guido@python.org>
parents:
diff changeset
12 struct stat st;
6243
4279f4eb210a First part of package support.
Guido van Rossum <guido@python.org>
parents: 5440
diff changeset
13 if (fstat(fileno(fp), &st) != 0)
1449
ae93ec4dd556 New files.
Guido van Rossum <guido@python.org>
parents:
diff changeset
14 return -1;
ae93ec4dd556 New files.
Guido van Rossum <guido@python.org>
parents:
diff changeset
15 else
ae93ec4dd556 New files.
Guido van Rossum <guido@python.org>
parents:
diff changeset
16 return st.st_mtime;
ae93ec4dd556 New files.
Guido van Rossum <guido@python.org>
parents:
diff changeset
17 }