/* XMODEM support for GDB, the GNU debugger.
- Copyright 1995 Free Software Foundation, Inc.
+ Copyright 1995, 2000, 2001 Free Software Foundation, Inc.
This file is part of GDB.
static int crcflag; /* Sez we are using CRC's instead of cksums */
static int
-readchar (desc, timeout)
- serial_t desc;
- int timeout;
+readchar (serial_t desc, int timeout)
{
int c;
/* Call this to init the fast CRC-16 calculation table. */
static void
-crcinit ()
+crcinit (void)
{
static int crctab_inited = 0;
int val;
/* Calculate a CRC-16 for the LEN byte message pointed at by P. */
static unsigned short
-docrc (p, len)
- unsigned char *p;
- int len;
+docrc (unsigned char *p, int len)
{
unsigned short crc = 0;
send NAK or CRC request. */
int
-xmodem_init_xfer (desc)
- serial_t desc;
+xmodem_init_xfer (serial_t desc)
{
int c;
int i;
*/
void
-xmodem_send_packet (desc, packet, len, hashmark)
- serial_t desc;
- unsigned char *packet;
- int len;
- int hashmark;
+xmodem_send_packet (serial_t desc, unsigned char *packet, int len, int hashmark)
{
int i;
int retries;
datasize = XMODEM_1KDATASIZE;
}
else
- abort (); /* Packet way too large */
+ internal_error (__FILE__, __LINE__, "failed internal consistency check"); /* Packet way too large */
/* Add ^Z padding if packet < 128 (or 1024) bytes */
/* Finish off the transfer. Send out the EOT, and wait for an ACK. */
void
-xmodem_finish_xfer (desc)
- serial_t desc;
+xmodem_finish_xfer (serial_t desc)
{
int retries;