comparison src/xxd/xxd.c @ 26282:71bdede8afd8 v8.2.3672

patch 8.2.3672: build failure with unsigned char Commit: https://github.com/vim/vim/commit/71b36206be14c3b6334765d44a38d413eca751c7 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Nov 25 13:26:19 2021 +0000 patch 8.2.3672: build failure with unsigned char Problem: Build failure with unsigned char. Solution: Use int instead of char.
author Bram Moolenaar <Bram@vim.org>
date Thu, 25 Nov 2021 14:30:04 +0100
parents 3061c07855ce
children bb58c4530851
comparison
equal deleted inserted replaced
26281:41076712e8c3 26282:71bdede8afd8
251 fprintf(stderr, "%s: %s\n", pname, msg); 251 fprintf(stderr, "%s: %s\n", pname, msg);
252 exit(ret); 252 exit(ret);
253 } 253 }
254 254
255 static void 255 static void
256 exit_on_ferror(char c, FILE *fpi) 256 exit_on_ferror(int c, FILE *fpi)
257 { 257 {
258 if (c == EOF && ferror(fpi)) 258 if (c == EOF && ferror(fpi))
259 perror_exit(2); 259 perror_exit(2);
260 } 260 }
261 261
262 static void 262 static void
263 putc_or_die(char c, FILE *fpo) 263 putc_or_die(int c, FILE *fpo)
264 { 264 {
265 if (putc(c, fpo) == EOF) 265 if (putc(c, fpo) == EOF)
266 perror_exit(3); 266 perror_exit(3);
267 } 267 }
268 268