home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / a / armbob / !ArmBob / progs / h / string / io < prev    next >
Text File  |  1994-06-06  |  327b  |  21 lines

  1. /*  GCW  06/06/94             */
  2. /* String input/output        */
  3.  
  4. /* Read a ctrl-char terminated string from file */
  5. gets(file)
  6. {
  7.  local s, c;
  8.  s = "";
  9.  while ((c = getc(file)) != EOF && c > 31)
  10.    s += c;
  11.  return s;
  12. }
  13.  
  14. /* Write a string to a file */
  15. puts(s,file)
  16. {
  17.  local i;
  18.  for (i=0;i<sizeof(s);i++)
  19.     putc(s[i],file);
  20. }
  21.