You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
989 B

  1. /* LINTLIBRARY */
  2. #ifdef LACK_SYS5
  3. char *
  4. memcpy(s1, s2, n)
  5. char *s1, *s2;
  6. int n;
  7. {
  8. extern bcopy();
  9. bcopy(s2, s1, n);
  10. return s1;
  11. }
  12. char *
  13. memset(s, c, n)
  14. char *s;
  15. int c;
  16. int n;
  17. {
  18. extern bzero();
  19. register int i;
  20. if (c == 0) {
  21. bzero(s, n);
  22. } else {
  23. for(i = n-1; i >= 0; i--) {
  24. *s++ = c;
  25. }
  26. }
  27. return s;
  28. }
  29. char *
  30. strchr(s, c)
  31. char *s;
  32. int c;
  33. {
  34. extern char *index();
  35. return index(s, c);
  36. }
  37. char *
  38. strrchr(s, c)
  39. char *s;
  40. int c;
  41. {
  42. extern char *rindex();
  43. return rindex(s, c);
  44. }
  45. #endif
  46. #ifndef UNIX
  47. #include <stdio.h>
  48. FILE *
  49. popen(string, mode)
  50. const char *string;
  51. const char *mode;
  52. {
  53. (void) fprintf(stderr, "popen not supported on your operating system\n");
  54. return NULL;
  55. }
  56. int
  57. pclose(fp)
  58. FILE *fp;
  59. {
  60. (void) fprintf(stderr, "pclose not supported on your operating system\n");
  61. return -1;
  62. }
  63. #endif
  64. /* put something here in case some compilers abort on empty files ... */
  65. int
  66. util_do_nothing()
  67. {
  68. return 1;
  69. }