🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by meissner Wed, 04 Nov 1992 09:04
Patch to silence a GCC warning
#23
Author: meissner
Date: Wed, 04 Nov 1992 09:04
27 lines
1417 bytes
Wed Nov  4 13:55:47 1992  Michael Meissner  (meissner@osf.org)

	* buffer.h (is_control_char, is_meta_char): Use unsigned test for
	doing ranges, which is faster, and causes GCC not to warn about
	'test is always true due to limited range' when given an unsigned
	argument in indent.c and xdispepoch.c.

*** buffer.h.orig	Wed Nov  4 13:43:00 1992
--- buffer.h	Wed Nov  4 13:46:34 1992
***************
*** 284,290 ****
  
  #define BufferSafeFloor(n) (BEGV <= GPT && GPT <= (n) ? GPT : BEGV)
  
! #define is_control_char(c)   (((c) >= 0 && (c) < 040) || (c) == 0177)
! #define is_meta_char(c) ((c) > 0240 && (c) <= 0377)
  
  extern void reset_buffer ();
--- 284,291 ----
  
  #define BufferSafeFloor(n) (BEGV <= GPT && GPT <= (n) ? GPT : BEGV)
  
! #define is_in_range(c,l,h) ((unsigned)((c) - (l)) > (unsigned)((c) - (h)))
! #define is_control_char(c)   (is_in_range (c, 0, 037) || (c) == 0177)
! #define is_meta_char(c) is_in_range (c, 0241, 0377)
  
  extern void reset_buffer ();
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads