home *** CD-ROM | disk | FTP | other *** search
/ ftp.muug.mb.ca / 2014.06.ftp.muug.mb.ca.tar / ftp.muug.mb.ca / pub / src / gopher / gopher1.01 / object / compatibility.c < prev    next >
C/C++ Source or Header  |  1992-06-11  |  674b  |  45 lines

  1. /*
  2.  * Some functions that aren't implemented on every machine on the net
  3.  */
  4.  
  5. #include <string.h>
  6. #include <Malloc.h>  /*** For NULL ***/
  7.  
  8. /*** For machines that don't have strstr ***/
  9.  
  10. #if defined(NOSTRSTR) || defined(mips) || defined(sequent) || defined(n16)
  11.  
  12. char *
  13. strstr(host_name, cp)
  14.   char host_name[256];
  15.   char *cp;
  16. {
  17.      int i, j;
  18.  
  19.      for (i = 0; i < strlen(host_name); i++) {
  20.           j = strncmp(host_name+i, cp, strlen(cp));
  21.           if (j == 0)
  22.                return(host_name+i);
  23.      }
  24.      return(NULL);
  25. }
  26. #endif
  27.  
  28. #if defined(sequent)
  29.  
  30. #include <varargs.h>
  31. vsprintf(va_alist)
  32.   va_dcl
  33. {
  34.         ;
  35. }
  36.  
  37. vfprintf(va_alist)
  38.   va_dcl
  39. {
  40.         ;
  41. }
  42.  
  43.  
  44. #endif
  45.