Logo Search packages:      
Sourcecode: cbmlink version File versions  Download package

int qdisk_read ( const struct comm comm,
FILE *  file,
char *  buf 
)

fast read a disk

Parameters:
comm the communication primitives
file output file for disk image
buf work area
Returns:
zero on success, nonzero on error

Definition at line 265 of file qdisk.c.

References comm::comm_read, comm::comm_sr, comm::comm_write, and workbuf.

Referenced by main().

{
#if 0
  char track;
  for (track = 1; track <= 35; track++) {
    unsigned char sectors;
    /* read this track */
    if ((*comm->comm_write) (&track, 1))
      return 3;
    (*comm->comm_sr) ();
    if ((*comm->comm_read) (&sectors, 1))
      return 3;
fprintf (stderr, "qdisk: track %u, sectors 0..%u\n", track, sectors);
    for (sectors++; sectors--; ) {
      if ((*comm->comm_read) (workbuf, 257))
      return 3;
      /* to do: write the data */
    }
  }
#else
  fputs ("-qr not yet implemented\n", stderr);
#endif
  return 0;
}


Generated by  Doxygen 1.6.0   Back to index