From efdc8c16591aec148ef8541a8eab3be5b1cb7bdf Mon Sep 17 00:00:00 2001 From: wiz Date: Thu, 29 Sep 2011 18:20:13 +0000 Subject: Fix build on NetBSD-current by renaming getline() to get_line(). --- converters/ja-dvi2tty/distinfo | 3 +- converters/ja-dvi2tty/patches/patch-dvistuff.c | 78 ++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 converters/ja-dvi2tty/patches/patch-dvistuff.c (limited to 'converters') diff --git a/converters/ja-dvi2tty/distinfo b/converters/ja-dvi2tty/distinfo index 29b0aa5c8a9..8ea2b9ec6c5 100644 --- a/converters/ja-dvi2tty/distinfo +++ b/converters/ja-dvi2tty/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.2 2005/02/23 16:12:34 agc Exp $ +$NetBSD: distinfo,v 1.3 2011/09/29 18:20:13 wiz Exp $ SHA1 (ja-dvi2tty/dvi2tty5.0.tar.gz) = c7476e80626736dc9575fcd9ed25c705bce2addc RMD160 (ja-dvi2tty/dvi2tty5.0.tar.gz) = 0f1af2eec8f2d5134c1c5345f8dfb32aeeb0f571 @@ -9,3 +9,4 @@ Size (ja-dvi2tty/dvi2tty-ascii-jtex-patch) = 10270 bytes SHA1 (ja-dvi2tty/dvi2tty.c-patch) = a7c54cccc98dacc8d699f63ae99755d8e9e1b871 RMD160 (ja-dvi2tty/dvi2tty.c-patch) = 6fa7f746347d515a80d51494d2e679d810d6c3dc Size (ja-dvi2tty/dvi2tty.c-patch) = 898 bytes +SHA1 (patch-dvistuff.c) = 5c4a98380f569a7a96f2969ab84ff6dbace11370 diff --git a/converters/ja-dvi2tty/patches/patch-dvistuff.c b/converters/ja-dvi2tty/patches/patch-dvistuff.c new file mode 100644 index 00000000000..7b3bdf986fd --- /dev/null +++ b/converters/ja-dvi2tty/patches/patch-dvistuff.c @@ -0,0 +1,78 @@ +$NetBSD: patch-dvistuff.c,v 1.1 2011/09/29 18:20:13 wiz Exp $ + +Fix conflict with POSIX getline(). + +--- dvistuff.c.orig 2011-09-29 18:17:16.000000000 +0000 ++++ dvistuff.c +@@ -162,7 +162,7 @@ void rule (bool, l + void ruleaux (long, long, char); + long horizontalmove (long); + int skipnops (void); +-linetype * getline (void); ++linetype * get_line (void); + linetype * findline (void); + unsigned long num (int); + long snum (int); +@@ -188,7 +188,7 @@ void rule (); + void ruleaux (); + long horizontalmove (); + int skipnops (); +-linetype * getline (); ++linetype * get_line (); + linetype * findline (); + unsigned long num (); + long snum (); +@@ -347,7 +347,7 @@ void initpage() + h = 0L; v = 0L; /* initialize coordinates */ + x = 0L; w = 0L; y = 0L; z = 0L; /* initialize amounts */ + sptr = 0; /* initialize stack */ +- currentline = getline(); /* initialize list of lines */ ++ currentline = get_line(); /* initialize list of lines */ + currentline->vv = 0L; + firstline = currentline; + lastline = currentline; +@@ -810,7 +810,7 @@ int skipnops() + * GETLINE -- Returns an initialized line-object + */ + +-linetype *getline() ++linetype *get_line() + { + register int i; + register linetype *temp; +@@ -826,7 +826,7 @@ linetype *getline() + + return temp; + +-} /* getline */ ++} /* get_line */ + + + +@@ -842,7 +842,7 @@ linetype *findline() + + if (v <= firstline->vv) { /* above first line */ + if (firstline->vv - v > lineheight) { +- temp = getline(); ++ temp = get_line(); + temp->next = firstline; + firstline->prev = temp; + temp->vv = v; +@@ -853,7 +853,7 @@ linetype *findline() + + if (v >= lastline->vv) { /* below last line */ + if (v - lastline->vv > lineheight) { +- temp = getline(); ++ temp = get_line(); + temp->prev = lastline; + lastline->next = temp; + temp->vv = v; +@@ -876,7 +876,7 @@ linetype *findline() + return temp->next; + + /* no line fits suitable, generate a new one */ +- currentline = getline(); ++ currentline = get_line(); + currentline->next = temp->next; + currentline->prev = temp; + temp->next->prev = currentline; -- cgit v1.2.3