aboutsummaryrefslogtreecommitdiff
blob: 0e00a01e0cd4415ba18b625c6d21d97651d71f62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
--- newt-0.52.2/newt.h.screensize	2005-09-21 11:32:01.000000000 +0200
+++ newt-0.52.2/newt.h	2006-05-31 15:09:39.000000000 +0200
@@ -115,7 +115,7 @@
 void newtClearKeyBuffer(void);
 void newtDelay(unsigned int usecs);
 /* top, left are *not* counting the border */
-int newtOpenWindow(unsigned int left,unsigned int top, 
+int newtOpenWindow(int left,int top, 
 		   unsigned int width,unsigned  int height, 
  		  const char * title);
 int newtCenteredWindow(unsigned int width,unsigned int height, const char * title);
--- newt-0.52.2/newt.c.screensize	2005-09-30 16:13:16.000000000 +0200
+++ newt-0.52.2/newt.c	2006-05-31 15:12:48.000000000 +0200
@@ -610,14 +610,14 @@
 
 /**
  * Open a new window.
- * @param left. unsigned int Size; _not_ including border
- * @param top: unsigned int size, _not_ including border
+ * @param left. int Size; _not_ including border
+ * @param top: int size, _not_ including border
  * @param width unsigned int
  * @param height unsigned int
  * @param title - title string
  * @return zero on success (currently no errors reported)
  */
-int newtOpenWindow(unsigned int left, unsigned int top, 
+int newtOpenWindow(int left, int top, 
                    unsigned int width, unsigned int height,
 			  const char * title) {
     int j, row, col;
@@ -708,14 +708,14 @@
  */
 int newtCenteredWindow(unsigned int width,unsigned int height, 
                        const char * title) {
-    unsigned int top, left;
+    int top, left;
 
-    top = (SLtt_Screen_Rows - height) / 2;
+    top = (int)(SLtt_Screen_Rows - height) / 2;
 
     /* I don't know why, but this seems to look better */
     if ((SLtt_Screen_Rows % 2) && (top % 2)) top--;
 
-    left = (SLtt_Screen_Cols - width) / 2;
+    left = (int)(SLtt_Screen_Cols - width) / 2;
 
     newtOpenWindow(left, top, width, height, title);