home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_09_03 / 9n03076b < prev    next >
Text File  |  1991-01-17  |  890b  |  30 lines

  1.  
  2. /*************************************************/
  3. /*                                               */
  4. /*              puts.c                           */
  5. /*                                               */
  6. /* Put a string to console. Uses stdio.h putchar */
  7. /* macro for operating system interface. Outputs */
  8. /* a newline after the string                    */
  9. /*                                               */
  10. /*          Copyright (c) 1990                   */
  11. /*          Pasquale J. Villani                  */
  12. /*          All Rights Reserved                  */
  13. /*                                               */
  14. /*                                               */
  15. /*************************************************/
  16.  
  17. #include <stdio.h>
  18.  
  19. puts(s)
  20. const char *s;
  21. {
  22.     int c;
  23.  
  24.     while ((c = *s++) != '\0')
  25.         putchar(c);
  26.     putchar('\n');
  27. }
  28.  
  29.  
  30.