aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/process.c b/src/process.c
index ea1129ffbb8..c5e691bf602 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1140,15 +1140,18 @@ See `set-process-sentinel' for more info on sentinels. */)
1140DEFUN ("set-process-window-size", Fset_process_window_size, 1140DEFUN ("set-process-window-size", Fset_process_window_size,
1141 Sset_process_window_size, 3, 3, 0, 1141 Sset_process_window_size, 3, 3, 0,
1142 doc: /* Tell PROCESS that it has logical window size HEIGHT and WIDTH. */) 1142 doc: /* Tell PROCESS that it has logical window size HEIGHT and WIDTH. */)
1143 (register Lisp_Object process, Lisp_Object height, Lisp_Object width) 1143 (Lisp_Object process, Lisp_Object height, Lisp_Object width)
1144{ 1144{
1145 CHECK_PROCESS (process); 1145 CHECK_PROCESS (process);
1146 CHECK_RANGED_INTEGER (height, 0, INT_MAX); 1146
1147 CHECK_RANGED_INTEGER (width, 0, INT_MAX); 1147 /* All known platforms store window sizes as 'unsigned short'. */
1148 CHECK_RANGED_INTEGER (height, 0, USHRT_MAX);
1149 CHECK_RANGED_INTEGER (width, 0, USHRT_MAX);
1148 1150
1149 if (XPROCESS (process)->infd < 0 1151 if (XPROCESS (process)->infd < 0
1150 || set_window_size (XPROCESS (process)->infd, 1152 || (set_window_size (XPROCESS (process)->infd,
1151 XINT (height), XINT (width)) <= 0) 1153 XINT (height), XINT (width))
1154 < 0))
1152 return Qnil; 1155 return Qnil;
1153 else 1156 else
1154 return Qt; 1157 return Qt;