annotate Mac/Compat/sync.c @ 5817:48b94de85bf3 legacy-trunk

Extensive changes by AMK.
author Guido van Rossum <guido@python.org>
date Thu, 17 Jul 1997 16:29:42 +0000
parents fa8bbd09f2e6
children db963a615bc9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1795
fa8bbd09f2e6 Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff changeset
1 /* The equivalent of the Unix 'sync' system call: FlushVol.
fa8bbd09f2e6 Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff changeset
2 Public domain by Guido van Rossum, CWI, Amsterdam (July 1987).
fa8bbd09f2e6 Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff changeset
3 For now, we only flush the default volume
fa8bbd09f2e6 Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff changeset
4 (since that's the only volume written to by MacB). */
fa8bbd09f2e6 Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff changeset
5
fa8bbd09f2e6 Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff changeset
6 #include "macdefs.h"
fa8bbd09f2e6 Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff changeset
7
fa8bbd09f2e6 Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff changeset
8 int
fa8bbd09f2e6 Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff changeset
9 sync()
fa8bbd09f2e6 Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff changeset
10 {
fa8bbd09f2e6 Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff changeset
11 if (FlushVol((StringPtr)0, 0) == noErr)
fa8bbd09f2e6 Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff changeset
12 return 0;
fa8bbd09f2e6 Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff changeset
13 else {
fa8bbd09f2e6 Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff changeset
14 errno= ENODEV;
fa8bbd09f2e6 Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff changeset
15 return -1;
fa8bbd09f2e6 Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff changeset
16 }
fa8bbd09f2e6 Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff changeset
17 }