term

Check-in [fcd1d60102]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Make the logging of the stream binary-clean
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:fcd1d60102d5ddb77fefc5ce933443afe6a4d17f516c525d4ecf0bfe3914d4fd
User & Date: ajv-899-334-8894@vsta.org 2018-01-18 01:15:47
Context
2018-02-16
14:47
"If a thing can be done adequately by means of one, it is superfluous to do it by means of several; for we observe that nature does not employ two instruments [if] one suffices." Thomas Aquinas Leaf check-in: 03737b864c user: ajv-899-334-8894@vsta.org tags: master, trunk
2018-01-18
01:15
Make the logging of the stream binary-clean check-in: fcd1d60102 user: ajv-899-334-8894@vsta.org tags: master, trunk
2018-01-17
20:39
Merge pull request #1 from thanegill/patch-1 Add Makefile check-in: 89f652f3d5 user: noreply@github.com tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to term.c.

292
293
294
295
296
297
298



299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314

	    if ((x = read(rs232, buf, sizeof(buf))) < 0) {
		if (errno == EINTR)
		    continue;
		perror("child");
		exit(1);
	    }



	    p = buf; 
	    q = buf+x;
	    while (p < q) {
		*p++ &= 0x7F;
	    }
	    write(ttyfd, buf, x);
	    if (logfp) {
		fwrite(buf, sizeof(char), x, logfp);
	    }
	}
    }

    if (child < 0) {
	perror("child fork");
	exit(1);
    }







>
>
>






<
<
<







292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307



308
309
310
311
312
313
314

	    if ((x = read(rs232, buf, sizeof(buf))) < 0) {
		if (errno == EINTR)
		    continue;
		perror("child");
		exit(1);
	    }
	    if (logfp) {
		fwrite(buf, sizeof(char), x, logfp);
	    }
	    p = buf; 
	    q = buf+x;
	    while (p < q) {
		*p++ &= 0x7F;
	    }
	    write(ttyfd, buf, x);



	}
    }

    if (child < 0) {
	perror("child fork");
	exit(1);
    }