nightmaremail

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

hostname.c (303B)


      1 #include "substdio.h"
      2 #include "subfd.h"
      3 #include "readwrite.h"
      4 
      5 char host[256];
      6 
      7 int main(void)
      8 {
      9  host[0] = 0; /* sigh */
     10  gethostname(host,sizeof(host));
     11  host[sizeof(host) - 1] = 0;
     12  substdio_puts(subfdoutsmall,host);
     13  substdio_puts(subfdoutsmall,"\n");
     14  substdio_flush(subfdoutsmall);
     15  return 0;
     16 }