Skip to content

LINES and COLS are not defined #10

@aaronw2

Description

@aaronw2

I am unable to build with OpenSUSE Leap 15.6 due to LINES and COLS not being defined anywhere in the code. Shouldn't these be defined in window.c?
...
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: main.o: in function showtemp': /home/aaronw/programming/minicom/src/main.c:846:(.text+0x1e7a): undefined reference to LINES'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/aaronw/programming/minicom/src/main.c:846:(.text+0x1e99): undefined reference to COLS' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: file.o: in function init_filedir':
/home/aaronw/programming/minicom/src/file.c:491:(.text+0xdd6): undefined reference to COLS' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/aaronw/programming/minicom/src/file.c:493:(.text+0xe07): undefined reference to LINES'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/aaronw/programming/minicom/src/file.c:495:(.text+0xe34): undefined reference to `LINES'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:458: minicom] Error 1
make[2]: Leaving directory '/fast2/aaronw/programming/minicom/src'
make[1]: *** [Makefile:398: all-recursive] Error 1
make[1]: Leaving directory '/fast2/aaronw/programming/minicom'
make: *** [Makefile:337: all] Error 2

It looks like LINES and COLS are not defined. Adding the following to window.c fixes it:

diff --git a/src/window.c b/src/window.c
index f2cba36..b8bd48a 100644
--- a/src/window.c
+++ b/src/window.c
@@ -100,6 +100,7 @@ static int _mv_standout = 0;
static ELM oldc;
static int sflag = 0;

+int LINES, COLS;
int useattr = 1;
int dirflush = 1;
int usecolor = 0;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions