home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume11 / syslog.sysv / sendlog.c < prev    next >
Encoding:
C/C++ Source or Header  |  1987-09-15  |  370 b   |  24 lines

  1. static char SCCS_id[] = "@(#)@ sendlog    1.2 - syslog interface";
  2.  
  3. #include <stdio.h>
  4. #include <sys/syslog.h>
  5.  
  6. main (argc, argv)
  7. int argc;
  8. char *argv[];
  9. {
  10.     char buf [512];
  11.     char *cp = buf;
  12.     while (argc-- > 1) {
  13.         char *cq = *++argv;
  14.         while (*cp++ = *cq++);
  15.         cp[-1] = ' ';
  16.     }
  17.     cp[-1] = '\n';
  18.     cp[0] = '\0';
  19.     openlog ("sendlog");
  20.     syslog (LOG_INFO, buf);
  21.     closelog ();
  22. }
  23.  
  24.