#include #include /* aaaa aa|aa bbbb|bbbb cc|cc cccc */ int uuencode_line(const struct sprog_data *d, char *dst, int *offset, int *checksum) { char srcbuf[64]; unsigned char sum; char *dstd; int b; int i; b = d->size - *offset; if(b>45) b = 45; sum = 0; for(i=0; idata[*offset + i]; sum += srcbuf[i]; *checksum += srcbuf[i]; } for(i=0; i<(b & (4-1)); i++) srcbuf[b+i] = 0; dst[0] = ' ' + b; dstd = &dst[1]; for(i=0; i>2; dstd[1] = srcbuf[i]<<4 | srcbuf[i+1]>>4; dstd[2] = srcbuf[i+1]<<2 | srcbuf[i+2]>>6; dstd[3] = srcbuf[i]; dstd += 4; } dstd[0] = sum; dstd[1] = 0; for(i=0; i= d->size) return 0; *offset += b; return 1; } void uudecode_line(struct sprog_data *d, const char *src, int *checksum) { d = 0; src = 0; checksum = 0; return; }