emergency commit
[cl-cudd.git] / distr / util / stub.c
blob93f57e67f4d8bae72e96229f4b52f5aab6b613e3
1 /* LINTLIBRARY */
3 #ifdef LACK_SYS5
5 char *
6 memcpy(s1, s2, n)
7 char *s1, *s2;
8 int n;
10 extern bcopy();
11 bcopy(s2, s1, n);
12 return s1;
15 char *
16 memset(s, c, n)
17 char *s;
18 int c;
19 int n;
21 extern bzero();
22 register int i;
24 if (c == 0) {
25 bzero(s, n);
26 } else {
27 for(i = n-1; i >= 0; i--) {
28 *s++ = c;
31 return s;
34 char *
35 strchr(s, c)
36 char *s;
37 int c;
39 extern char *index();
40 return index(s, c);
43 char *
44 strrchr(s, c)
45 char *s;
46 int c;
48 extern char *rindex();
49 return rindex(s, c);
53 #endif
55 #ifndef UNIX
56 #include <stdio.h>
58 FILE *
59 popen(string, mode)
60 const char *string;
61 const char *mode;
63 (void) fprintf(stderr, "popen not supported on your operating system\n");
64 return NULL;
68 int
69 pclose(fp)
70 FILE *fp;
72 (void) fprintf(stderr, "pclose not supported on your operating system\n");
73 return -1;
75 #endif
77 /* put something here in case some compilers abort on empty files ... */
78 int
79 util_do_nothing()
81 return 1;