Debian Codegraph @

mac.c

raw
1 #if defined(MAC)
2
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <time.h>
6 #include "mac.h"
7
8 int stat( char *fn, struct stat *buf )
9 {
10 buf = buf; /* keep compiler happy */
11 fprintf(stderr,"trying to stat(): %s\n", fn );
12 return 0;
13 }
14
15 int fstat( int fd, struct stat *buf )
16 {
17 buf = buf; /* keep compiler happy */
18 fprintf(stderr,"trying to stat(): %d\n", fd );
19 return 0;
20 }
21
22 int sleep( int sec )
23 {
24 fprintf(stderr,"trying to sleep(): %d\n", sec );
25 return 0;
26 }
27
28 char * getcwd( char *buf, size_t size )
29 {
30 size = size; /* keep compiler happy */
31 fprintf(stderr,"trying to getcwd()\n" );
32 strcpy( buf, "junk" );
33 return buf;
34 }
35
36 int chdir( char *buf )
37 {
38 fprintf(stderr,"trying to chdir(): %buf\n", buf );
39 return 0;
40 }
41
42 int isatty( int fd )
43 {
44 fd = fd; /* keep compiler happy */
45 return 0;
46 }
47
48 #endif