File: 04-use_move.diff

package info (click to toggle)
textdraw 0.2%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 260 kB
  • sloc: ansic: 4,705; makefile: 8
file content (93 lines) | stat: -rw-r--r-- 2,778 bytes parent folder | download
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
Author: Wolfram Sang <wsa@kernel.org>
Last-Update: 2026-02-22
Description: Generated with a sed-script. Fixes multiple:
 warning: zero-length gnu_printf format string [-Wformat-zero-length]
---
 td.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Index: textdraw-0.2+ds/td.c
===================================================================
--- textdraw-0.2+ds.orig/td.c
+++ textdraw-0.2+ds/td.c
@@ -80,7 +80,7 @@ void comment_error(char *where)
 void curpos()	//position cursor with printing coordinates
 {	mvprintw(menrow,maxcol-10,"          ");
 	mvprintw(menrow,maxcol-10,"x=%d y=%d",x,y);
-	mvprintw(y,x,"");
+	move(y,x);
 }
 
 void cursor()	// move cursor to a new position
@@ -337,7 +337,7 @@ void draw()	// draws chart-array on scre
 	drawell();
 	drawtxt();
 
-	mvprintw(0,0,"");
+	move(0,0);
 	for(i=0;i<=maxrow;i++) printw("%s",chart[i]);
 	curpos();
 	refresh();
@@ -370,7 +370,7 @@ void lineinput()	// inputs line-object-p
 {	lin[lastlin].x1=x; lin[lastlin].y1=y; 
 	curpos();
 	comment("mark end of line");
-	mvprintw(y,x,"");
+	move(y,x);
 
 	cursor();
 
@@ -386,7 +386,7 @@ void recinput()		// inputs rectangle-obj
 {	rec[lastrec].x1=x; rec[lastrec].y1=y;
 
 	comment("mark 2nd point of rectangle");
-	mvprintw(y,x,"");
+	move(y,x);
 
 	cursor();
 
@@ -401,7 +401,7 @@ void ellinput()		// inputs ellipse-objec
 {	ell[lastell].x1=x; ell[lastell].y1=y;
 
 	comment("mark 2nd point of ellipse");
-	mvprintw(y,x,"");
+	move(y,x);
 
 	cursor();
 
@@ -436,7 +436,7 @@ void moving()		// moves marked objekt to
 
 	markobj();
 	if(mark.a=='t')
-	{	mvprintw(txt[mark.nr].x,txt[mark.nr].y,"");
+	{	move(txt[mark.nr].x,txt[mark.nr].y);
 		comment("move text to");
 		curpos(); cursor(); clearcomment();
 		dx=x-txt[mark.nr].x; dy=y-txt[mark.nr].y;
@@ -444,7 +444,7 @@ void moving()		// moves marked objekt to
 		txt[mark.nr].y=txt[mark.nr].y+dy;
 	}
 	if(mark.a=='e')
-	{	mvprintw(ell[mark.nr].x1,ell[mark.nr].y1,"");
+	{	move(ell[mark.nr].x1,ell[mark.nr].y1);
 		comment("move ellipse to");
 		curpos(); cursor(); clearcomment();
 		dx=x-ell[mark.nr].x1; dy=y-ell[mark.nr].y1;
@@ -454,7 +454,7 @@ void moving()		// moves marked objekt to
 		ell[mark.nr].y2=ell[mark.nr].y2+dy;
 	}
 	if(mark.a=='r')
-	{	mvprintw(rec[mark.nr].x1,rec[mark.nr].y1,"");
+	{	move(rec[mark.nr].x1,rec[mark.nr].y1);
 		comment("move rectangle to");
 		curpos(); cursor(); clearcomment();
 		dx=x-rec[mark.nr].x1; dy=y-rec[mark.nr].y1;
@@ -464,7 +464,7 @@ void moving()		// moves marked objekt to
 		rec[mark.nr].y2=rec[mark.nr].y2+dy;
 	}
 	if(mark.a=='l')
-	{	mvprintw(lin[mark.nr].x1,lin[mark.nr].y1,"");
+	{	move(lin[mark.nr].x1,lin[mark.nr].y1);
 		comment("move line to");
 		curpos(); cursor(); clearcomment();
 		dx=x-lin[mark.nr].x1; dy=y-lin[mark.nr].y1;