home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / math / oleo_tar.z / oleo_tar / oleo / linux.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-25  |  626 b   |  36 lines

  1. #include <stddef.h>
  2. #include <string.h>
  3. #include <stdlib.h>
  4. #include <stdio.h>
  5. #include <termios.h>
  6. #include <curses.h>
  7. #include <fcntl.h>
  8.  
  9.  
  10. int
  11. bcmp(const void* s1, const void* s2, size_t len)
  12. {return (len > 0 ? memcmp(s1, s2, (size_t) len) : 0);}
  13.  
  14. char*
  15. index(const char* s, int c)
  16. { return strchr(s, c); }
  17.  
  18. char*
  19. rindex(const char* s, int c)
  20. { return strrchr(s, c); }
  21.  
  22. void
  23. bcopy(const void* s, void* d, size_t n) 
  24. { if (n > 0) memmove (d, s, (size_t) n); }
  25.  
  26. void
  27. bzero(void* s, size_t l)
  28. { if (l > 0) memset(s, 0, (size_t) l); }
  29.  
  30.  
  31. void nodelay(WINDOW *win, bool flag)
  32. {
  33.     fcntl(0,F_SETFL,(flag?O_NONBLOCK:~O_NONBLOCK));
  34. }
  35.  
  36.