← Commit list

3e61b59ef

Ron Yorston
Ron Yorston
2019-04-03
SUCCESS Duration: 153s

Subject

vi: avoid build failure in non-default case

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

editors/vi.c+16 -16
@@ -722,6 +722,22 @@ static void screen_erase(void)
memset(screen, ' ', screensize); // clear new screen
}
+static char *new_screen(int ro, int co)
+{
+ int li;
+
+ free(screen);
+ screensize = ro * co + 8;
+ screen = xmalloc(screensize);
+ // initialize the new screen. assume this will be a empty file.
+ screen_erase();
+ // non-existent text[] lines start with a tilde (~).
+ for (li = 1; li < ro - 1; li++) {
+ screen[(li * co) + 0] = '~';
+ }
+ return screen;
+}
+
//----- Synchronize the cursor to Dot --------------------------
static NOINLINE void sync_cursor(char *d, int *row, int *col)
{
@@ -2882,22 +2898,6 @@ static void colon(char *buf)
// TAB NEWLINE VT FF RETURN SPACE
// DO NOT COUNT NEWLINE AS WHITESPACE
-static char *new_screen(int ro, int co)
-{
- int li;
-
- free(screen);
- screensize = ro * co + 8;
- screen = xmalloc(screensize);
- // initialize the new screen. assume this will be a empty file.
- screen_erase();
- // non-existent text[] lines start with a tilde (~).
- for (li = 1; li < ro - 1; li++) {
- screen[(li * co) + 0] = '~';
- }
- return screen;
-}
-
static int st_test(char *p, int type, int dir, char *tested)
{
char c, c0, ci;