From f3b50e643d4c89f53f3d0a4114f7bac83ee9d823 Mon Sep 17 00:00:00 2001 From: joerg Date: Sat, 2 Mar 2013 18:09:30 +0000 Subject: Consistently return values in non-void functions. Fix return types. Fix main prototype. --- graphics/geomview/distinfo | 8 +- graphics/geomview/patches/patch-af | 105 ++++++++++++++++++++- .../geomview/patches/patch-src_bin_animate_glob.c | 12 +++ .../patch-src_bin_geomutil_plutil_polymerge.c | 63 +++++++++++++ .../patches/patch-src_bin_geomutil_ucd_anytoucd.c | 13 +++ .../patches/patch-src_bin_geomview_x11_gvmain.c | 15 +++ 6 files changed, 211 insertions(+), 5 deletions(-) create mode 100644 graphics/geomview/patches/patch-src_bin_animate_glob.c create mode 100644 graphics/geomview/patches/patch-src_bin_geomutil_plutil_polymerge.c create mode 100644 graphics/geomview/patches/patch-src_bin_geomutil_ucd_anytoucd.c create mode 100644 graphics/geomview/patches/patch-src_bin_geomview_x11_gvmain.c (limited to 'graphics/geomview') diff --git a/graphics/geomview/distinfo b/graphics/geomview/distinfo index 393c4765b76..69e35708e93 100644 --- a/graphics/geomview/distinfo +++ b/graphics/geomview/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.7 2011/11/27 14:20:42 drochner Exp $ +$NetBSD: distinfo,v 1.8 2013/03/02 18:09:30 joerg Exp $ SHA1 (geomview-1.8.1.tar.gz) = 026a22ecba471f7d55c407de4fc409213d166477 RMD160 (geomview-1.8.1.tar.gz) = 4c42b928376517115e1bba16c978b80ff41b7b45 @@ -8,9 +8,13 @@ SHA1 (patch-ab) = 706b10ccfb3ba02baa48b461123707cdd9cbfdff SHA1 (patch-ac) = 55d2297e8a31203fc5f21b2800f4a2948ee07f9c SHA1 (patch-ad) = 9db6fb9ffae5939f80bfcae8aa5da389437d627c SHA1 (patch-ae) = f9b721883520a701ae66ab28f4e4b7e6e307fea7 -SHA1 (patch-af) = a9eab9b45dfaed20d08472b56d1b1fb880081a0e +SHA1 (patch-af) = c4fce66c7dd58c3990770919633221b1097bed65 SHA1 (patch-ag) = 427d9d114d581b0bcbfbba9ca1122bd384aa79a6 SHA1 (patch-ah) = 458e2e764acf83309104c74fcfbf3dfba8251d29 SHA1 (patch-ai) = 44b8fe3c228d5761cc1578c0418c358101ec3adc SHA1 (patch-aj) = 8c04229693165b471228c8bcb0b092afcdd6d890 SHA1 (patch-ak) = 8d62f3a0da7c03567ef0ab5bc30b95d97c4e7254 +SHA1 (patch-src_bin_animate_glob.c) = b4f72c1bf1f7af6dce97bfb74f24a4a8f2033ca7 +SHA1 (patch-src_bin_geomutil_plutil_polymerge.c) = ec6bcd207d990f0eaf63af520787bb7cfb9ddd03 +SHA1 (patch-src_bin_geomutil_ucd_anytoucd.c) = be50bb45536e0791ac6f14bd347e205e66a4b906 +SHA1 (patch-src_bin_geomview_x11_gvmain.c) = b58d8da8695dea6c26a9684903662bc81e8a02a1 diff --git a/graphics/geomview/patches/patch-af b/graphics/geomview/patches/patch-af index 0ea1d74580f..751da5ddf90 100644 --- a/graphics/geomview/patches/patch-af +++ b/graphics/geomview/patches/patch-af @@ -1,8 +1,8 @@ -$NetBSD: patch-af,v 1.1.1.1 2001/02/09 03:27:02 jtb Exp $ +$NetBSD: patch-af,v 1.2 2013/03/02 18:09:30 joerg Exp $ ---- src/bin/geomutil/math2oogl/math2oogl.c.orig Fri Feb 9 02:22:10 2001 +--- src/bin/geomutil/math2oogl/math2oogl.c.orig 2001-02-27 19:44:08.000000000 +0000 +++ src/bin/geomutil/math2oogl/math2oogl.c -@@ -55,6 +55,7 @@ +@@ -55,6 +55,7 @@ Copyright (C) 1998-2000 Stuart Levy, Tam #include #include #include @@ -10,3 +10,102 @@ $NetBSD: patch-af,v 1.1.1.1 2001/02/09 03:27:02 jtb Exp $ #endif #include #include +@@ -401,7 +402,7 @@ int main(int ac,char **av) + ok = 0; + if (!ok) { + fprintf(stderr, "can't read mesh dimensions!\n"); +- return; ++ return 1; + } + if (globline->token == MESHRANGE) { + globline=globline->next; +@@ -413,7 +414,7 @@ int main(int ac,char **av) + } else ok = 0; + if (!ok) { + fprintf(stderr, "can't read mesh range!\n"); +- return; ++ return 1; + } + + /* +@@ -451,7 +452,7 @@ int main(int ac,char **av) + } + if (!ok) { + fprintf(stderr, "can't read mesh color array!\n"); +- return; ++ return 1; + } + } + /* Each number we get is just the z coordinate. +@@ -490,7 +491,7 @@ int main(int ac,char **av) + } + if (!ok) { + fprintf(stderr, "can't read mesh points array!\n"); +- return; ++ return 1; + } else + printf("} #end of MESH\n"); + break; +@@ -506,7 +507,7 @@ int main(int ac,char **av) + ok = 0; + if (!ok) { + fprintf(stderr, "can't read mesh dimensions!\n"); +- return; ++ return 1; + } + + /* +@@ -544,7 +545,7 @@ int main(int ac,char **av) + } + if (!ok) { + fprintf(stderr, "can't read mesh color array!\n"); +- return; ++ return 1; + } + } + /* Each number we get is just the x,y or z coordinate. +@@ -588,7 +589,7 @@ int main(int ac,char **av) + } + if (!ok) { + fprintf(stderr, "can't read mesh points array!\n"); +- return; ++ return 1; + } else + printf("} #end of MESH\n"); + break; +@@ -604,7 +605,7 @@ int main(int ac,char **av) + ok = 0; + if (!ok) { + fprintf(stderr, "can't read Bezier patch dimensions!\n"); +- return; ++ return 1; + } + + /* +@@ -640,7 +641,7 @@ int main(int ac,char **av) + } + if (!ok) { + fprintf(stderr, "can't read mesh color array!\n"); +- return; ++ return 1; + } + } + /* Each number we get is just the x,y or z coordinate. */ +@@ -677,7 +678,7 @@ int main(int ac,char **av) + } + if (!ok) { + fprintf(stderr, "can't read control points array!\n"); +- return; ++ return 1; + } else + printf("} #end of BEZ\n"); + break; +@@ -874,7 +875,7 @@ int main(int ac,char **av) + } + globline = curline; + break; +- default: fprintf(stderr, "math2oogl: unexpected data: %s\n", globline->data); return; ++ default: fprintf(stderr, "math2oogl: unexpected data: %s\n", globline->data); return 1; + } /* end switch (globline->token) */ + } + printf ("\n} #end of LIST\n"); diff --git a/graphics/geomview/patches/patch-src_bin_animate_glob.c b/graphics/geomview/patches/patch-src_bin_animate_glob.c new file mode 100644 index 00000000000..d36fdf2ecdd --- /dev/null +++ b/graphics/geomview/patches/patch-src_bin_animate_glob.c @@ -0,0 +1,12 @@ +$NetBSD: patch-src_bin_animate_glob.c,v 1.1 2013/03/02 18:09:30 joerg Exp $ + +--- src/bin/animate/glob.c.orig 2013-03-01 21:51:25.000000000 +0000 ++++ src/bin/animate/glob.c +@@ -38,6 +38,7 @@ static char sccsid[] = "@(#)glob.c 5.7 ( + #include + #include + #include ++#include + + #if !defined(dirfd) && !defined(__GLIBC__) && !defined(__linux__) && !defined(__FreeBSD__) + #define dirfd(dirp) ((dirp)->dd_fd) diff --git a/graphics/geomview/patches/patch-src_bin_geomutil_plutil_polymerge.c b/graphics/geomview/patches/patch-src_bin_geomutil_plutil_polymerge.c new file mode 100644 index 00000000000..6f92c9c0059 --- /dev/null +++ b/graphics/geomview/patches/patch-src_bin_geomutil_plutil_polymerge.c @@ -0,0 +1,63 @@ +$NetBSD: patch-src_bin_geomutil_plutil_polymerge.c,v 1.1 2013/03/02 18:09:30 joerg Exp $ + +--- src/bin/geomutil/plutil/polymerge.c.orig 2013-03-01 21:44:20.000000000 +0000 ++++ src/bin/geomutil/plutil/polymerge.c +@@ -73,6 +73,9 @@ typedef struct point { + float x, y, z, w; + } P; + ++static void deface(F *f); ++static void normal_ize(F *f); ++static void femerge(Fe *fe1, Fe *fe2); + + struct vertex { + P p; +@@ -617,8 +620,7 @@ unfedge(fe) + * Merge two faces + * We delete these face-edges from both faces + */ +-femerge(fe1, fe2) +- register Fe *fe1, *fe2; ++static void femerge(Fe *fe1, Fe *fe2) + { + F *f1, *f2; + register Fe *tfe; +@@ -681,8 +683,7 @@ femerge(fe1, fe2) + + #define PRETTY(x) ((int)(x) - 0x10000000) + +-fecheck(fe) +- Fe *fe; ++static void fecheck(Fe *fe) + { + register Fe *fee; + int ne; +@@ -739,8 +740,7 @@ echeck(v0, v1) + + + +-normal_ize(f) +- F *f; ++static void normal_ize(F *f) + { + register Fe *fe; + +@@ -801,8 +801,7 @@ normal_ize(f) + /* + * Delete a face, erasing all edges. + */ +-deface(f) +- F *f; ++static void deface(F *f) + { + register Fe *fe, *fee; + +@@ -913,7 +912,7 @@ and faceno is the integer index of the f + /* Generate 3x3 rotation matrix which takes va -> vb + * Assumes va and vb both unit vectors. + */ +-rotation(P *va, P *vb, float T[3][3]) ++static void rotation(P *va, P *vb, float T[3][3]) + { + float adotb = VDOT(va, vb); + float ab_1 = adotb - 1; diff --git a/graphics/geomview/patches/patch-src_bin_geomutil_ucd_anytoucd.c b/graphics/geomview/patches/patch-src_bin_geomutil_ucd_anytoucd.c new file mode 100644 index 00000000000..9a8441c1533 --- /dev/null +++ b/graphics/geomview/patches/patch-src_bin_geomutil_ucd_anytoucd.c @@ -0,0 +1,13 @@ +$NetBSD: patch-src_bin_geomutil_ucd_anytoucd.c,v 1.1 2013/03/02 18:09:30 joerg Exp $ + +--- src/bin/geomutil/ucd/anytoucd.c.orig 2013-03-01 21:50:46.000000000 +0000 ++++ src/bin/geomutil/ucd/anytoucd.c +@@ -402,7 +402,7 @@ main(argc, argv) int argc; char **argv; + else if (n==3) fprintf(fp,"tri "); + else if (n==4) fprintf(fp, "quad "); + /* else signal error */ +- else return; ++ else return 1; + for(vp = p->v; --n >= 0; vp++) + fprintf(fp, "%d ", (*vp) - thispl->vl + 1); + fprintf(fp,"\n"); diff --git a/graphics/geomview/patches/patch-src_bin_geomview_x11_gvmain.c b/graphics/geomview/patches/patch-src_bin_geomview_x11_gvmain.c new file mode 100644 index 00000000000..4ce22cccd50 --- /dev/null +++ b/graphics/geomview/patches/patch-src_bin_geomview_x11_gvmain.c @@ -0,0 +1,15 @@ +$NetBSD: patch-src_bin_geomview_x11_gvmain.c,v 1.1 2013/03/02 18:09:30 joerg Exp $ + +--- src/bin/geomview/x11/gvmain.c.orig 2013-03-01 21:43:19.000000000 +0000 ++++ src/bin/geomview/x11/gvmain.c +@@ -67,9 +67,7 @@ static void env_usage(); + + /*****************************************************************************/ + +-int main(argc, argv) +-unsigned int argc; +-char **argv; ++int main(int argc, char **argv) + { + int i; + CameraStruct cs; -- cgit v1.2.3