Diff

Differences From Artifact [774f54baad]:

To Artifact [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) {