aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-06-21 01:15:36 +0000
committerlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-06-21 01:15:36 +0000
commitf9621936df1d7abd15b49d066f3028e553496bac (patch)
tree28ca58744237179b5ab254249658570ba340d47c
parentf196eed050909293181dd0854295473a6fcb74f7 (diff)
downloadbusybox-w32-f9621936df1d7abd15b49d066f3028e553496bac.tar.gz
busybox-w32-f9621936df1d7abd15b49d066f3028e553496bac.tar.bz2
busybox-w32-f9621936df1d7abd15b49d066f3028e553496bac.zip
Remove pointless "inline" wrapper around get_terminal_width_height().
git-svn-id: svn://busybox.net/trunk/busybox@15452 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--editors/vi.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/editors/vi.c b/editors/vi.c
index 3937675b1..660c01c3c 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -1,4 +1,4 @@
1/* vi: set sw=8 ts=8: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * tiny vi.c: A small 'vi' clone 3 * tiny vi.c: A small 'vi' clone
4 * Copyright (C) 2000, 2001 Sterling Huxley <sterling@europa.com> 4 * Copyright (C) 2000, 2001 Sterling Huxley <sterling@europa.com>
@@ -253,9 +253,6 @@ static void end_cmd_q(void); // stop saving input chars
253#else /* CONFIG_FEATURE_VI_DOT_CMD */ 253#else /* CONFIG_FEATURE_VI_DOT_CMD */
254#define end_cmd_q() 254#define end_cmd_q()
255#endif /* CONFIG_FEATURE_VI_DOT_CMD */ 255#endif /* CONFIG_FEATURE_VI_DOT_CMD */
256#ifdef CONFIG_FEATURE_VI_WIN_RESIZE
257static void window_size_get(int); // find out what size the window is
258#endif /* CONFIG_FEATURE_VI_WIN_RESIZE */
259#ifdef CONFIG_FEATURE_VI_SETOPTS 256#ifdef CONFIG_FEATURE_VI_SETOPTS
260static void showmatching(Byte *); // show the matching pair () [] {} 257static void showmatching(Byte *); // show the matching pair () [] {}
261#endif /* CONFIG_FEATURE_VI_SETOPTS */ 258#endif /* CONFIG_FEATURE_VI_SETOPTS */
@@ -362,14 +359,6 @@ int vi_main(int argc, char **argv)
362 return (0); 359 return (0);
363} 360}
364 361
365#ifdef CONFIG_FEATURE_VI_WIN_RESIZE
366//----- See what the window size currently is --------------------
367static inline void window_size_get(int fd)
368{
369 get_terminal_width_height(fd, &columns, &rows);
370}
371#endif /* CONFIG_FEATURE_VI_WIN_RESIZE */
372
373static void edit_file(Byte * fn) 362static void edit_file(Byte * fn)
374{ 363{
375 Byte c; 364 Byte c;
@@ -386,9 +375,8 @@ static void edit_file(Byte * fn)
386 rows = 24; 375 rows = 24;
387 columns = 80; 376 columns = 80;
388 ch= -1; 377 ch= -1;
389#ifdef CONFIG_FEATURE_VI_WIN_RESIZE 378 if (ENABLE_FEATURE_VI_WIN_RESIZE)
390 window_size_get(0); 379 get_terminal_width_height(0, &columns, &rows);
391#endif /* CONFIG_FEATURE_VI_WIN_RESIZE */
392 new_screen(rows, columns); // get memory for virtual screen 380 new_screen(rows, columns); // get memory for virtual screen
393 381
394 cnt = file_size(fn); // file size 382 cnt = file_size(fn); // file size
@@ -2069,9 +2057,8 @@ static void cookmode(void)
2069static void winch_sig(int sig ATTRIBUTE_UNUSED) 2057static void winch_sig(int sig ATTRIBUTE_UNUSED)
2070{ 2058{
2071 signal(SIGWINCH, winch_sig); 2059 signal(SIGWINCH, winch_sig);
2072#ifdef CONFIG_FEATURE_VI_WIN_RESIZE 2060 if (ENABLE_FEATURE_VI_WIN_RESIZE)
2073 window_size_get(0); 2061 get_terminal_width_height(0, &columns, &rows);
2074#endif /* CONFIG_FEATURE_VI_WIN_RESIZE */
2075 new_screen(rows, columns); // get memory for virtual screen 2062 new_screen(rows, columns); // get memory for virtual screen
2076 redraw(TRUE); // re-draw the screen 2063 redraw(TRUE); // re-draw the screen
2077} 2064}
@@ -2765,9 +2752,8 @@ static void refresh(int full_screen)
2765 int last_li= -2; // last line that changed- for optimizing cursor movement 2752 int last_li= -2; // last line that changed- for optimizing cursor movement
2766#endif /* CONFIG_FEATURE_VI_OPTIMIZE_CURSOR */ 2753#endif /* CONFIG_FEATURE_VI_OPTIMIZE_CURSOR */
2767 2754
2768#ifdef CONFIG_FEATURE_VI_WIN_RESIZE 2755 if (ENABLE_FEATURE_VI_WIN_RESIZE)
2769 window_size_get(0); 2756 get_terminal_width_height(0, &columns, &rows);
2770#endif /* CONFIG_FEATURE_VI_WIN_RESIZE */
2771 sync_cursor(dot, &crow, &ccol); // where cursor will be (on "dot") 2757 sync_cursor(dot, &crow, &ccol); // where cursor will be (on "dot")
2772 tp = screenbegin; // index into text[] of top line 2758 tp = screenbegin; // index into text[] of top line
2773 2759