Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
freebsd13:
name: FreeBSD
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
steps:
- uses: vmactions/freebsd-vm@7ca82f79fe3078fecded6d3a2bff094995447bbd
with:
Expand All @@ -20,7 +20,7 @@ jobs:
set -u
set -x
uname -rms
pkg install -y cmake git python3 py311-pytest vim
pkg install -y cmake git python3 devel/py-pytest vim
python3 --version
git clone --no-checkout -- ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} wd
cd wd
Expand All @@ -36,7 +36,7 @@ jobs:

linux:
name: Linux
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
env:
DEBIAN_FRONTEND: noninteractive
CFLAGS: -Werror -g -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=address,undefined
Expand All @@ -56,7 +56,7 @@ jobs:

linux_shared:
name: Linux, shared libraries
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
env:
DEBIAN_FRONTEND: noninteractive
CFLAGS: -Werror -g -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=address,undefined
Expand All @@ -76,7 +76,7 @@ jobs:

linux_release:
name: Linux, release build
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
env:
DEBIAN_FRONTEND: noninteractive
CFLAGS: -Werror -g -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=address,undefined
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:

c_analysis:
name: C analysis
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
steps:
- run: uname -rms
- run: python3 --version
Expand All @@ -141,7 +141,7 @@ jobs:

py_format:
name: Python format
runs-on: ubuntu-22.04
runs-on: ubuntu-26.04
env:
DEBIAN_FRONTEND: noninteractive
steps:
Expand Down
13 changes: 7 additions & 6 deletions libvimcat/src/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,20 @@ static int get_extent(const char *filename, size_t limit, size_t *rows,
// is this a Windows end of line?
if (c == '\r') {
int n = getc(f);
if (n == '\n') {
if (n == EOF) {
++width;
break;
} else if (n == '\n') {
++lines;
if (max_width < width)
max_width = width;
width = 0;
continue;
}

if (n != EOF) {
if (ERROR(ungetc(n, f) == EOF)) {
rc = EIO;
goto done;
}
if (ERROR(ungetc(n, f) == EOF)) {
rc = EIO;
goto done;
}
}

Expand Down