Check-in [ee22fadb48]
Overview
SHA1:ee22fadb48f2704a15a829b4f5bdd965973d1433
Date: 2014-10-29 18:14:38
User: rkeene
Comment:Removed skipping of "size" request
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2014-10-30
15:52
[b37f8d7df9] Added some basic UNIX commands (user: rkeene, tags: trunk)
2014-10-29
18:14
[ee22fadb48] Removed skipping of "size" request (user: rkeene, tags: trunk)
18:09
[a7c3ea759b] Added basic support for "stty" (user: rkeene, tags: trunk)
Changes

Modified tuapi.c from [774f54baad] to [f152339f63].

1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
....
1910
1911
1912
1913
1914
1915
1916

1917
1918
1919
1920
1921
1922
1923

	fd = STDIN_FILENO;

	for (idx = 1; idx < objc; idx++) {
		obj = objv[idx];
		obj_hash = tuapi_internal_simplehash_obj(obj);

		if (obj_hash == 0xe7a7d65) { /* size */
			continue;
		}

		switch (obj_hash) {
			case 0xe7a7d65: /* size */
				ioctl_ret = ioctl(fd, TIOCGWINSZ, &terminal_size);
				if (ioctl_ret != 0) {
					Tcl_SetObjResult(interp, Tcl_NewStringObj("ioctl failed", -1));

					return(TCL_ERROR);
................................................................................

				if (retobj == NULL) {
					retobj = Tcl_NewObj();
				}

				Tcl_ListObjAppendElement(interp, retobj, Tcl_NewLongObj(terminal_size.ws_row));
				Tcl_ListObjAppendElement(interp, retobj, Tcl_NewLongObj(terminal_size.ws_col));

				break;
			case 0x5bcb0f7: /* -raw */
			case 0x1cb0f7: /* raw */
			case 0xdcb8f56f: /* -echo */
			case 0xcb8f46f: /* echo */
				ioctl_ret = ioctl(fd, TCGETS, &terminal_information);
				if (ioctl_ret != 0) {







<
<
<
<







 







>







1891
1892
1893
1894
1895
1896
1897




1898
1899
1900
1901
1902
1903
1904
....
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920

	fd = STDIN_FILENO;

	for (idx = 1; idx < objc; idx++) {
		obj = objv[idx];
		obj_hash = tuapi_internal_simplehash_obj(obj);





		switch (obj_hash) {
			case 0xe7a7d65: /* size */
				ioctl_ret = ioctl(fd, TIOCGWINSZ, &terminal_size);
				if (ioctl_ret != 0) {
					Tcl_SetObjResult(interp, Tcl_NewStringObj("ioctl failed", -1));

					return(TCL_ERROR);
................................................................................

				if (retobj == NULL) {
					retobj = Tcl_NewObj();
				}

				Tcl_ListObjAppendElement(interp, retobj, Tcl_NewLongObj(terminal_size.ws_row));
				Tcl_ListObjAppendElement(interp, retobj, Tcl_NewLongObj(terminal_size.ws_col));

				break;
			case 0x5bcb0f7: /* -raw */
			case 0x1cb0f7: /* raw */
			case 0xdcb8f56f: /* -echo */
			case 0xcb8f46f: /* echo */
				ioctl_ret = ioctl(fd, TCGETS, &terminal_information);
				if (ioctl_ret != 0) {