Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/utils/more rename a global variable so that it doesn...



details:   https://anonhg.NetBSD.org/src/rev/a4cb81d8a613
branches:  trunk
changeset: 569716:a4cb81d8a613
user:      chs <chs%NetBSD.org@localhost>
date:      Wed Sep 01 01:46:56 2004 +0000

description:
rename a global variable so that it doesn't collide with a libcurses function
when both are present in a crunched static binary.  part of PR 26458.

diffstat:

 distrib/utils/more/command.c |  14 +++++++-------
 distrib/utils/more/extern.h  |   4 ++--
 distrib/utils/more/main.c    |   6 +++---
 distrib/utils/more/signal.c  |   6 +++---
 4 files changed, 15 insertions(+), 15 deletions(-)

diffs (118 lines):

diff -r e3e27eed1aaa -r a4cb81d8a613 distrib/utils/more/command.c
--- a/distrib/utils/more/command.c      Wed Sep 01 01:46:28 2004 +0000
+++ b/distrib/utils/more/command.c      Wed Sep 01 01:46:56 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: command.c,v 1.10 2003/10/21 12:02:32 agc Exp $ */
+/*     $NetBSD: command.c,v 1.11 2004/09/01 01:46:56 chs Exp $ */
 
 /*
  * Copyright (c) 1988 Mark Nudelman
@@ -35,7 +35,7 @@
 #if 0
 static char sccsid[] = "@(#)command.c  8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: command.c,v 1.10 2003/10/21 12:02:32 agc Exp $");
+__RCSID("$NetBSD: command.c,v 1.11 2004/09/01 01:46:56 chs Exp $");
 #endif
 #endif /* not lint */
 
@@ -335,7 +335,7 @@
        int action;
 
        last_mca = 0;
-       scroll = (sc_height + 1) / 2;
+       scroll_lines = (sc_height + 1) / 2;
 
        for (;;) {
                mca = 0;
@@ -418,14 +418,14 @@
                case A_F_SCROLL:        /* forward N lines */
                        CMD_EXEC;
                        if (number > 0)
-                               scroll = number;
-                       forward(scroll, 0);
+                               scroll_lines = number;
+                       forward(scroll_lines, 0);
                        break;
                case A_B_SCROLL:        /* backward N lines */
                        CMD_EXEC;
                        if (number > 0)
-                               scroll = number;
-                       backward(scroll, 0);
+                               scroll_lines = number;
+                       backward(scroll_lines, 0);
                        break;
                case A_FREPAINT:        /* flush buffers and repaint */
                        if (!ispipe) {
diff -r e3e27eed1aaa -r a4cb81d8a613 distrib/utils/more/extern.h
--- a/distrib/utils/more/extern.h       Wed Sep 01 01:46:28 2004 +0000
+++ b/distrib/utils/more/extern.h       Wed Sep 01 01:46:56 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extern.h,v 1.2 1999/10/18 20:28:32 pk Exp $     */
+/*     $NetBSD: extern.h,v 1.3 2004/09/01 01:46:56 chs Exp $    */
 
 /*
  * Copyright (c) 1997 Christos Zoulas. All rights reserved.
@@ -189,7 +189,7 @@
 extern int sc_width;
 extern int sc_window;
 extern int screen_trashed;
-extern int scroll;
+extern int scroll_lines;
 extern int se_width;
 extern int short_file;
 extern int sigs;
diff -r e3e27eed1aaa -r a4cb81d8a613 distrib/utils/more/main.c
--- a/distrib/utils/more/main.c Wed Sep 01 01:46:28 2004 +0000
+++ b/distrib/utils/more/main.c Wed Sep 01 01:46:56 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.8 2003/10/13 14:34:25 agc Exp $     */
+/*     $NetBSD: main.c,v 1.9 2004/09/01 01:46:56 chs Exp $     */
 
 /*
  * Copyright (c) 1988 Mark Nudelman
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.1 (Berkeley) 6/7/93";
 #else
-__RCSID("$NetBSD: main.c,v 1.8 2003/10/13 14:34:25 agc Exp $");
+__RCSID("$NetBSD: main.c,v 1.9 2004/09/01 01:46:56 chs Exp $");
 #endif
 #endif /* not lint */
 
@@ -67,7 +67,7 @@
 char   *current_file, *previous_file, *current_name, *next_name;
 off_t  prev_pos;
 int    any_display;
-int    scroll;
+int    scroll_lines;
 int    ac;
 char   **av;
 int    curr_ac;
diff -r e3e27eed1aaa -r a4cb81d8a613 distrib/utils/more/signal.c
--- a/distrib/utils/more/signal.c       Wed Sep 01 01:46:28 2004 +0000
+++ b/distrib/utils/more/signal.c       Wed Sep 01 01:46:56 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: signal.c,v 1.5 2003/10/13 14:34:25 agc Exp $   */
+/*     $NetBSD: signal.c,v 1.6 2004/09/01 01:46:56 chs Exp $   */
 
 /*
  * Copyright (c) 1988 Mark Nudelman
@@ -35,7 +35,7 @@
 #if 0
 static char sccsid[] = "@(#)signal.c   8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: signal.c,v 1.5 2003/10/13 14:34:25 agc Exp $");
+__RCSID("$NetBSD: signal.c,v 1.6 2004/09/01 01:46:56 chs Exp $");
 #endif
 #endif /* not lint */
 
@@ -189,7 +189,7 @@
                get_term();
                if (sc_width != old_width || sc_height != old_height)
                {
-                       scroll = (sc_height + 1) / 2;
+                       scroll_lines = (sc_height + 1) / 2;
                        screen_trashed = 1;
                }
        }



Home | Main Index | Thread Index | Old Index