home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tcp30tkt.zip / PGMG1.ZIP / SAMPLES / SAMPDLL / MYPROG.C next >
Text File  |  1995-12-04  |  371b  |  25 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. char * s_gethostbyname(char *);
  5.  
  6. main(argc, argv)
  7.    int argc;
  8.    char *argv[];
  9.  
  10. {
  11.  
  12.     char  *hostnm;
  13.  
  14.     if (argc != 2)
  15.     {
  16.         fprintf(stderr, "Usage: %s hostname \n", argv[0]);
  17.         exit(1);
  18.     }
  19.  
  20.     hostnm = s_gethostbyname(argv[1]);
  21.  
  22.     printf(" Internet address is : %s\n", hostnm);
  23.  
  24. }
  25.