Diff

Differences From Artifact [2cbe9ce55f]:

To Artifact [9e7e6479fe]:


124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
static void c_write (char *buf, int len) {
    if (IS_SCP) {
	if (len > 0 && buf[len-1] == '\n') len--;
	if (len > 0 && buf[len-1] == '\r') len--;
	if (len > 0) { fwrite(buf, len, 1, stderr); fputc('\n', stderr); }
	return;
    }
    while (len--) {
	int new_head = (inbuf_head + 1) & INBUF_MASK;
	if (new_head != inbuf_reap) {
	    inbuf[inbuf_head] = *buf++;
	    inbuf_head = new_head;
	} else {
            term_out();
            if( inbuf_head == inbuf_reap ) len++; else break;
	}
    }
}

struct Packet {
    long length;
    int type;
    unsigned char *data;
    unsigned char *body;







|
<
<
|
<
<
<
<
<
<







124
125
126
127
128
129
130
131


132






133
134
135
136
137
138
139
static void c_write (char *buf, int len) {
    if (IS_SCP) {
	if (len > 0 && buf[len-1] == '\n') len--;
	if (len > 0 && buf[len-1] == '\r') len--;
	if (len > 0) { fwrite(buf, len, 1, stderr); fputc('\n', stderr); }
	return;
    }
    while (len--) 


        c_write1(*buf++);






}

struct Packet {
    long length;
    int type;
    unsigned char *data;
    unsigned char *body;