home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / pub / palmos / pippy-0.6beta-src.tar.gz / pippy-0.6beta-src.tar / pippy-0.6beta-src / src / Palm / libc / fwrite.c < prev    next >
C/C++ Source or Header  |  2000-12-21  |  454b  |  25 lines

  1. /* #include <Common.h> */
  2. /* #include <System/SysAll.h> */
  3. /* #include <UI/UIAll.h> */
  4.  
  5. #include <stdio.h>
  6. #include <sys/types.h>
  7. #include <string.h>
  8. #include <ctype.h>
  9.  
  10. /* write a stream as a string of characters - ignore stream */
  11. size_t fwrite(const void *ptr, size_t size, size_t nitems,
  12.           FILE *stream) {
  13.     
  14.     char *c = (char *)ptr;
  15.     size_t nbytes = size*nitems;
  16.     int j;
  17.  
  18.     for (j=0; j < nbytes; j++) {
  19.         putchar(*c);
  20.         c++;
  21.     }
  22.     return nitems;
  23. }
  24.  
  25.