Group :: Ferramentas de Arquivo
RPM: clex
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: clex-4.6.6-alt1.patch
Download
Download
src/inout.c | 10 ++--------
src/kbd-test.c | 7 +++----
2 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/src/inout.c b/src/inout.c
index f195590..fda49bf 100644
--- a/src/inout.c
+++ b/src/inout.c
@@ -866,19 +866,13 @@ putstr_trunc(const char *str, int maxwidth, int options)
static int
putwcs_trunc_col(const wchar_t *str, int endcol, int options)
{
- int y, x;
-
- getyx(stdscr,y,x);
- return putwcs_trunc(str,endcol - x,options);
+ return putwcs_trunc(str,endcol - getcurx(stdscr),options);
}
static int
putstr_trunc_col(const char *str, int endcol, int options)
{
- int y, x;
-
- getyx(stdscr,y,x);
- return putstr_trunc(str,endcol - x,options);
+ return putstr_trunc(str,endcol - getcurx(stdscr),options);
}
void
diff --git a/src/kbd-test.c b/src/kbd-test.c
index 6129a14..6e63483 100644
--- a/src/kbd-test.c
+++ b/src/kbd-test.c
@@ -33,7 +33,7 @@
int
main(void)
{
- int type, y, x, ymax, xmax, ctrlc;
+ int type, ymax, ctrlc;
const char *term;
wint_t key;
wchar_t keystr[2];
@@ -48,7 +48,7 @@ main(void)
keypad(stdscr,TRUE);
raw();
scrollok(stdscr,FALSE);
- getmaxyx(stdscr,ymax,xmax);
+ ymax = getmaxy(stdscr);
clear();
move(0,0);
@@ -106,8 +106,7 @@ main(void)
addch('\n');
refresh();
- getyx(stdscr,y,x);
- if (y >= ymax - 2)
+ if (getcury(stdscr) >= ymax - 2)
last = 0;
}