[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff-commit] groff ./ChangeLog doc/Makefile.in src/include/l...
From: |
Werner LEMBERG |
Subject: |
[Groff-commit] groff ./ChangeLog doc/Makefile.in src/include/l... |
Date: |
Thu, 17 Mar 2005 03:29:16 -0500 |
CVSROOT: /cvsroot/groff
Module name: groff
Branch:
Changes by: Werner LEMBERG <address@hidden> 05/03/17 08:29:15
Modified files:
. : ChangeLog
doc : Makefile.in
src/include : lib.h
src/libs/libgroff: Makefile.sub
src/preproc/grn: hgraph.cpp
src/preproc/pic: object.cpp pic.h
Added files:
src/libs/libgroff: hypot.c
Log message:
Add workaround for broken hypot() on Interix.
* src/libs/libgroff/hypot.c: New wrapper file for `hypot'.
* src/libs/libgroff/Makefile.sub (OBJS): Add `hypot.o'.
(CSRCS): Add `hypot.c'.
* src/include/lib.h: Declare `groff_hypot'.
* src/preproc/grn/hgraph.cpp: Don't declare `hypot'.
Use `groff_hypot'.
* src/preproc/pic/pic.h: Don't declare `hypot'.
* src/preproc/pic/object.cpp (hypot): Use `groff_hypot'.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/ChangeLog.diff?tr1=1.799&tr2=1.800&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/doc/Makefile.in.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/include/lib.h.diff?tr1=1.34&tr2=1.35&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/libs/libgroff/hypot.c?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/libs/libgroff/Makefile.sub.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/preproc/grn/hgraph.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/preproc/pic/object.cpp.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/src/preproc/pic/pic.h.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
Patches:
Index: groff/ChangeLog
diff -u groff/ChangeLog:1.799 groff/ChangeLog:1.800
--- groff/ChangeLog:1.799 Tue Mar 15 22:07:45 2005
+++ groff/ChangeLog Thu Mar 17 08:29:14 2005
@@ -1,3 +1,21 @@
+2005-03-16 Werner LEMBERG <address@hidden>
+
+ Add workaround for broken hypot() on Interix.
+
+ * src/libs/libgroff/hypot.c: New wrapper file for `hypot'.
+
+ * src/libs/libgroff/Makefile.sub (OBJS): Add `hypot.o'.
+ (CSRCS): Add `hypot.c'.
+
+ * src/include/lib.h: Declare `groff_hypot'.
+
+ * src/preproc/grn/hgraph.cpp: Don't declare `hypot'.
+ Use `groff_hypot'.
+
+ * src/preproc/pic/pic.h: Don't declare `hypot'.
+
+ * src/preproc/pic/object.cpp (hypot): Use `groff_hypot'.
+
2005-03-15 Gaius Mulley <address@hidden>
* src/devices/grohtml/post-html.cpp
Index: groff/doc/Makefile.in
diff -u groff/doc/Makefile.in:1.13 groff/doc/Makefile.in:1.14
--- groff/doc/Makefile.in:1.13 Tue Mar 15 10:14:15 2005
+++ groff/doc/Makefile.in Thu Mar 17 08:29:15 2005
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# Written by Werner Lemberg <address@hidden>
#
# This file is part of groff.
Index: groff/src/include/lib.h
diff -u groff/src/include/lib.h:1.34 groff/src/include/lib.h:1.35
--- groff/src/include/lib.h:1.34 Thu Nov 13 08:34:58 2003
+++ groff/src/include/lib.h Thu Mar 17 08:29:15 2005
@@ -1,5 +1,6 @@
// -*- C++ -*-
-/* Copyright (C) 1989-2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2000, 2001, 2002, 2003, 2005
+ Free Software Foundation, Inc.
Written by James Clark (address@hidden)
This file is part of groff.
@@ -29,6 +30,7 @@
const char *i_to_a(int);
const char *ui_to_a(unsigned int);
const char *if_to_a(int, int);
+ double groff_hypot(double, double);
}
/* stdio.h on IRIX, OSF/1, emx, UWIN, and MinGW include getopt.h */
Index: groff/src/libs/libgroff/Makefile.sub
diff -u groff/src/libs/libgroff/Makefile.sub:1.20
groff/src/libs/libgroff/Makefile.sub:1.21
--- groff/src/libs/libgroff/Makefile.sub:1.20 Sun Feb 22 09:00:35 2004
+++ groff/src/libs/libgroff/Makefile.sub Thu Mar 17 08:29:15 2005
@@ -17,6 +17,7 @@
getopt1.$(OBJEXT) \
glyphuni.$(OBJEXT) \
htmlhint.$(OBJEXT) \
+ hypot.$(OBJEXT) \
iftoa.$(OBJEXT) \
invalid.$(OBJEXT) \
itoa.$(OBJEXT) \
@@ -88,6 +89,7 @@
$(srcdir)/getcwd.c \
$(srcdir)/getopt.c \
$(srcdir)/getopt1.c \
+ $(srcdir)/hypot.c \
$(srcdir)/iftoa.c \
$(srcdir)/itoa.c \
$(srcdir)/matherr.c \
Index: groff/src/preproc/grn/hgraph.cpp
diff -u groff/src/preproc/grn/hgraph.cpp:1.3
groff/src/preproc/grn/hgraph.cpp:1.4
--- groff/src/preproc/grn/hgraph.cpp:1.3 Sat Apr 17 06:41:49 2004
+++ groff/src/preproc/grn/hgraph.cpp Thu Mar 17 08:29:15 2005
@@ -8,19 +8,13 @@
#include "gprint.h"
-#ifdef NEED_DECLARATION_HYPOT
-extern "C" {
- double hypot(double, double);
-}
-#endif /* NEED_DECLARATION_HYPOT */
-
#define MAXVECT 40
#define MAXPOINTS 200
#define LINELENGTH 1
#define PointsPerInterval 64
#define pi 3.14159265358979324
#define twopi (2.0 * pi)
-#define len(a, b) hypot((double)(b.x-a.x), (double)(b.y-a.y))
+#define len(a, b) groff_hypot((double)(b.x-a.x), (double)(b.y-a.y))
extern int dotshifter; /* for the length of dotted curves */
@@ -600,7 +594,7 @@
length = 0;
- resolution = (1.0 + hypot(xs, ys) / res) * PointsPerInterval;
+ resolution = (1.0 + groff_hypot(xs, ys) / res) * PointsPerInterval;
/* mask = (1 << (int) log10(resolution + 1.0)) - 1; */
(void) frexp(resolution, &m); /* A bit more elegant than
log10 */
for (mask = 1; mask < m; mask = mask << 1);
@@ -671,13 +665,13 @@
for (; npts--; x++, y++) { /* traverse the line segments */
xp = x[0] - x[1];
yp = y[0] - y[1];
- nseg = (int) hypot((double) xp, (double) yp);
+ nseg = (int) groff_hypot((double) xp, (double) yp);
xp = x[1] - x[2];
yp = y[1] - y[2];
/* `nseg' is the number of line */
/* segments that will be drawn for */
/* each curve segment. */
- nseg = (int) ((double) (nseg + (int) hypot((double) xp, (double) yp)) /
+ nseg = (int) ((double) (nseg + (int) groff_hypot((double) xp, (double)
yp)) /
res * PointsPerInterval);
for (i = 1; i < nseg; i++) {
@@ -795,7 +789,7 @@
dy = y[j + 1] - y[j];
/* Here was overflowing, so I changed it. */
/* u[i] += sqrt ((double) (dx * dx + dy * dy)); */
- u[i] += hypot((double) dx, (double) dy);
+ u[i] += groff_hypot((double) dx, (double) dy);
}
}
for (i = 1; i < n; ++i)
Index: groff/src/preproc/pic/object.cpp
diff -u groff/src/preproc/pic/object.cpp:1.4
groff/src/preproc/pic/object.cpp:1.5
--- groff/src/preproc/pic/object.cpp:1.4 Tue Jul 6 07:45:23 2004
+++ groff/src/preproc/pic/object.cpp Thu Mar 17 08:29:15 2005
@@ -1,5 +1,5 @@
// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004
+/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by James Clark (address@hidden)
@@ -202,7 +202,7 @@
double hypot(const position &a)
{
- return hypot(a.x, a.y);
+ return groff_hypot(a.x, a.y);
}
struct arrow_head_type {
Index: groff/src/preproc/pic/pic.h
diff -u groff/src/preproc/pic/pic.h:1.6 groff/src/preproc/pic/pic.h:1.7
--- groff/src/preproc/pic/pic.h:1.6 Mon Apr 21 13:33:09 2003
+++ groff/src/preproc/pic/pic.h Thu Mar 17 08:29:15 2005
@@ -1,5 +1,5 @@
// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2003
+/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2003, 2005
Free Software Foundation, Inc.
Written by James Clark (address@hidden)
@@ -25,12 +25,6 @@
#include <stdlib.h>
#include <errno.h>
-#ifdef NEED_DECLARATION_HYPOT
-extern "C" {
- double hypot(double, double);
-}
-#endif /* NEED_DECLARATION_HYPOT */
-
#ifdef NEED_DECLARATION_RAND
#undef rand
extern "C" {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff-commit] groff ./ChangeLog doc/Makefile.in src/include/l...,
Werner LEMBERG <=