head 1.2; access; symbols; locks; strict; comment @ * @; 1.2 date 2026.06.28.00.51.58; author gdt; state Exp; branches; next 1.1; commitid Xu5otFB9D8606vLG; 1.1 date 2026.06.28.00.44.25; author gdt; state Exp; branches; next ; commitid krbxq7yUzi8U2vLG; desc @@ 1.2 log @x11/xephem: Grab 3 more files of upstream pull request 126 Files outside of the old WRKSRC were not picked up by mkpatches. Restore patch comments lost in BUILD_DIRS pivot. @ text @$NetBSD: patch-GUI_xephem_sites.c,v 1.1 2026/06/28 00:44:25 gdt Exp $ Fix ctype(3) UB. Cherry-picked from https://github.com/XEphem/XEphem/pull/126 --- GUI/xephem/sites.c.orig 2024-02-13 14:35:36.000000000 +0000 +++ GUI/xephem/sites.c @@@@ -183,9 +183,9 @@@@ int maxn; * n is an index, not a count. */ for (n = fl-1; n >= maxn-4; ) { - while (n > 0 && isalnum(full[n])) + while (n > 0 && isalnum((unsigned char)full[n])) n--; - while (n > 0 && (ispunct(full[n]) || isspace(full[n]))) + while (n > 0 && (ispunct((unsigned char)full[n]) || isspace((unsigned char)full[n]))) n--; } (void) sprintf (ab, "%.*s...", n+1, full); @@@@ -654,7 +654,7 @@@@ read_file (FILE *fp) /* strip trailing blanks off name */ for (l = strlen (name); --l >= 0; ) - if (isspace(name[l])) + if (isspace((unsigned char)name[l])) name[l] = '\0'; else break; @ 1.1 log @x11/xephem: Pivot from WRKSRC to BUILD_DIRS WRKSRC implies that the build does not look outside of it, but that's not true. Instead, make WRKSRC top level, and instead invoke make in (singleton) BUILD_DIRS. This is a huge commit textually, but it's just a pivot in how the subdir is used, adding BUILD_DIRS to paths, and renaming all the patches. NFCI; this should produce the same binary. Works on netbsd-10 amd64 in "look at sky view, didn't crash, not blank" testing. @ text @d1 3 a3 1 $NetBSD$ @