Mercurial > cpython-lru_cache-weakref
annotate Mac/Python/macgetmtime.c @ 10072:ecebcd84df37 legacy-trunk
put the preferences file in a folder called "Python" inside the prefs folder, just like the IDE does -- jvr
| author | Just van Rossum <just@lettererror.com> |
|---|---|
| date | Tue, 02 Feb 1999 15:49:03 +0000 |
| parents | d6b292a33cfe |
| children |
| rev | line source |
|---|---|
|
5079
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
1 /*********************************************************** |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
2 Copyright 1991-1997 by Stichting Mathematisch Centrum, Amsterdam, |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
3 The Netherlands. |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
4 |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
5 All Rights Reserved |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
6 |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
7 Permission to use, copy, modify, and distribute this software and its |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
8 documentation for any purpose and without fee is hereby granted, |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
9 provided that the above copyright notice appear in all copies and that |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
10 both that copyright notice and this permission notice appear in |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
11 supporting documentation, and that the names of Stichting Mathematisch |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
12 Centrum or CWI or Corporation for National Research Initiatives or |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
13 CNRI not be used in advertising or publicity pertaining to |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
14 distribution of the software without specific, written prior |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
15 permission. |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
16 |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
17 While CWI is the initial source for this software, a modified version |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
18 is made available by the Corporation for National Research Initiatives |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
19 (CNRI) at the Internet address ftp://ftp.python.org. |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
20 |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
21 STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
22 REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
23 MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
24 CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
25 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
26 PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
27 TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
28 PERFORMANCE OF THIS SOFTWARE. |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
29 |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
30 ******************************************************************/ |
|
d6b292a33cfe
Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents:
2136
diff
changeset
|
31 |
|
1822
76d0f2b3b9ee
Completed (hopefully) the unification of THINK 6.0 and MPW 3.2
Guido van Rossum <guido@python.org>
parents:
1795
diff
changeset
|
32 #include "macstat.h" |
| 2136 | 33 #include "rename2.h" |
| 1495 | 34 |
| 35 /* Interfaced used by import.c */ | |
| 36 | |
| 37 long | |
| 38 getmtime(path) | |
| 39 char *path; | |
| 40 { | |
|
1822
76d0f2b3b9ee
Completed (hopefully) the unification of THINK 6.0 and MPW 3.2
Guido van Rossum <guido@python.org>
parents:
1795
diff
changeset
|
41 struct macstat st; |
|
76d0f2b3b9ee
Completed (hopefully) the unification of THINK 6.0 and MPW 3.2
Guido van Rossum <guido@python.org>
parents:
1795
diff
changeset
|
42 if (macstat(path, &st) != 0) |
| 1495 | 43 return -1L; |
| 44 return st.st_mtime; | |
| 45 } |
