40 lines
1.4 KiB
Diff
40 lines
1.4 KiB
Diff
|
|
From 531ccec45f63b61e1df6f9401515fc0f342fdd71 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Mark Nudelman <markn@greenwoodsoftware.com>
|
||
|
|
Date: Tue, 4 Oct 2022 23:02:17 -0700
|
||
|
|
Subject: [PATCH] Compile fixes (?)
|
||
|
|
|
||
|
|
---
|
||
|
|
lesstest/lesstest.h | 2 +-
|
||
|
|
lesstest/term.c | 2 +-
|
||
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/lesstest/lesstest.h b/lesstest/lesstest.h
|
||
|
|
index 5192702..062b241 100644
|
||
|
|
--- a/lesstest/lesstest.h
|
||
|
|
+++ b/lesstest/lesstest.h
|
||
|
|
@@ -73,7 +73,7 @@ void free_test_setup(TestSetup* setup);
|
||
|
|
TestSetup* read_test_setup(FILE* fd, char const* less);
|
||
|
|
int read_zline(FILE* fd, char* line, int line_len);
|
||
|
|
void raw_mode(int tty, int on);
|
||
|
|
-int setup_term(void);
|
||
|
|
+int setup_term(char* const* envp);
|
||
|
|
void display_screen(const byte* img, int imglen, int screen_width, int screen_height, int move_cursor);
|
||
|
|
const char* get_envp(char* const* envp, const char* name);
|
||
|
|
int run_interactive(char* const* argv, int argc, char* const* envp);
|
||
|
|
diff --git a/lesstest/term.c b/lesstest/term.c
|
||
|
|
index 22c2b2e..cfd4b4a 100644
|
||
|
|
--- a/lesstest/term.c
|
||
|
|
+++ b/lesstest/term.c
|
||
|
|
@@ -55,7 +55,7 @@ int setup_term(char* const* envp) {
|
||
|
|
static char termbuf[4096];
|
||
|
|
static char sbuf[4096];
|
||
|
|
///char* term = getenv("TERM");
|
||
|
|
- char* term = get_envp(envp, "TERM");
|
||
|
|
+ char const* term = get_envp(envp, "TERM");
|
||
|
|
if (term == NULL) term = "dumb";
|
||
|
|
if (tgetent(termbuf, term) <= 0) {
|
||
|
|
fprintf(stderr, "cannot setup terminal %s\n", term);
|
||
|
|
--
|
||
|
|
2.27.0
|
||
|
|
|