]> granicus.if.org Git - graphviz/commitdiff
API BREAK: remove unused 'MAXSHORT' definition
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 8 Jan 2022 01:49:56 +0000 (17:49 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 9 Jan 2022 23:51:57 +0000 (15:51 -0800)
The last use of this was removed in 580fa88477fa59aca01e405c986c686ceee21b5f.
But its definition was retained in this header as removing it was considered an
API break not worth causing. The upcoming release is projected to bump the major
version number, so we can now remove it.

CHANGELOG.md
lib/common/arith.h

index 28c3b02d75a2dd8afeff4cce264d5a9e8950350e..105e76d3c182236999013ed09f25c19244559f54 100644 (file)
@@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 - **Breaking**: Using Graphviz as a library on Windows now requires the `GVDLL`
   symbol to be set to ensure correct linking.
+- **Breaking**: Graphviz headers no longer define the constant `MAXSHORT`. A
+  drop-in replacement is `SHRT_MAX` in the C standard library’s limits.h.
 - **Breaking**: Graphviz headers no longer (re-)define the C constants `INT_MIN`
   and `INT_MAX`. Replacements can be found in the C standard library’s limits.h.
 - The Ming plugin that produced Shockwave files has been removed. This format
index aca9389c76242de42aa93c854d2fec33e2270c30..264da8e69a58f3e136d4d277ddb585ac889a9cb6 100644 (file)
@@ -39,10 +39,6 @@ extern "C" {
 #define SGN(a)         (((a)<0)? -1 : 1)
 #define CMP(a,b)       (((a)<(b)) ? -1 : (((a)>(b)) ? 1 : 0))
 
-#ifndef MAXSHORT
-#define        MAXSHORT        (0x7fff)
-#endif
-
 #ifndef MAXDOUBLE
 #define MAXDOUBLE      1.7976931348623157e+308
 #endif