File: mac.c

package info (click to toggle)
regina 2.2-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,332 kB
  • ctags: 4,775
  • sloc: ansic: 38,518; sh: 2,552; lex: 1,878; yacc: 1,028; makefile: 771
file content (48 lines) | stat: -rw-r--r-- 828 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#if defined(MAC)

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "mac.h"

int stat( char *fn, struct stat *buf )
{
   buf = buf; /* keep compiler happy */
   fprintf(stderr,"trying to stat(): %s\n", fn );
   return 0;
}

int fstat( int fd, struct stat *buf )
{
   buf = buf; /* keep compiler happy */
   fprintf(stderr,"trying to stat(): %d\n", fd );
   return 0;
}

int sleep( int sec )
{
   fprintf(stderr,"trying to sleep(): %d\n", sec );
   return 0;
}

char * getcwd( char *buf, size_t size )
{
   size = size; /* keep compiler happy */
   fprintf(stderr,"trying to getcwd()\n" );
   strcpy( buf, "junk" );
   return buf;
}

int chdir( char *buf )
{
   fprintf(stderr,"trying to chdir(): %buf\n", buf );
   return 0;
}

int isatty( int fd )
{
   fd = fd; /* keep compiler happy */
   return 0;
}

#endif