gbranden pushed a commit to branch master
in repository groff.

commit 86c24f5489479730c34074c6048d6e5108b86d16
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon May 25 03:20:57 2026 -0500

    [tfmtodit]: Migrate from `PI` to `M_PI`.
    
    * src/utils/tfmtodit/tfmtodit.cpp (main): Use ISO C standard constant
      `M_PI` instead of our own `PI`.
    
    Continues the long process of fixing Savannah #66672.
---
 ChangeLog                       | 7 +++++++
 src/utils/tfmtodit/tfmtodit.cpp | 5 +++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3c6fddd06..a61dbb876 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-05-25  G. Branden Robinson <[email protected]>
+
+       * src/utils/tfmtodit/tfmtodit.cpp (main): Use ISO C standard
+       constant `M_PI` instead of our own `PI`.
+
+       Continues the long process of fixing Savannah #66672.
+
 2026-05-25  G. Branden Robinson <[email protected]>
 
        * src/utils/tfmtodit/tfmtodit.cpp (read2, read4, read_map):
diff --git a/src/utils/tfmtodit/tfmtodit.cpp b/src/utils/tfmtodit/tfmtodit.cpp
index a246d6d2d..c509196ec 100644
--- a/src/utils/tfmtodit/tfmtodit.cpp
+++ b/src/utils/tfmtodit/tfmtodit.cpp
@@ -53,7 +53,7 @@ both be zero. */
 
 #include <assert.h>
 #include <errno.h>
-#include <math.h> // atan2()
+#include <math.h> // atan2(), M_PI
 #include <stdcountof.h>
 #include <stdlib.h> // exit(), EXIT_FAILURE, EXIT_SUCCESS, strtol()
 
@@ -820,7 +820,8 @@ int main(int argc, char **argv)
       printf("spacewidth %d\n", n * MULTIPLIER);
   }
   if (t.get_param(1, &n) && (n != 0))
-    printf("slant %f\n", atan2(n / double(1 << 20), 1.0) * 180.0 / PI);
+    printf("slant %f\n",
+          atan2(n / double(1 << 20), 1.0) * 180.0 / M_PI);
   int xheight;
   if (!t.get_param(5, &xheight))
     xheight = 0;

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to