[brlcad-commits] SF.net SVN: brlcad:[50138] brlcad/trunk
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <br...@us...> - 2012-04-17 18:08:37
|
Revision: 50138 http://brlcad.svn.sourceforge.net/brlcad/?rev=50138&view=rev Author: brlcad Date: 2012-04-17 18:08:26 +0000 (Tue, 17 Apr 2012) Log Message: ----------- the 'syn' sine synthesis tool is incurring a maintenance cost with no expressed benefit, remove it as obsolete. overflow/underflow issues in coverity, crashes on simple testing, tainted inputs, and more Modified Paths: -------------- brlcad/trunk/NEWS brlcad/trunk/src/sig/CMakeLists.txt brlcad/trunk/src/sig/Makefile.am Removed Paths: ------------- brlcad/trunk/src/sig/syn.c Modified: brlcad/trunk/NEWS =================================================================== --- brlcad/trunk/NEWS 2012-04-17 17:48:20 UTC (rev 50137) +++ brlcad/trunk/NEWS 2012-04-17 18:08:26 UTC (rev 50138) @@ -13,6 +13,7 @@ --- 2012-04-XX Release 7.21.X --- ---------------------------------------------------------------------- +* removed obsolete 'syn' multi sine synthesis tool - Sean Morrison * fixed memory corruption in vegetation generator tool - Sean Morrison * fixed ARS bounding box size affecting overlap handling - Cliff Yapp * fixed bug in fast4-g importer handling HOLE/WALL cards - Nick Reed Modified: brlcad/trunk/src/sig/CMakeLists.txt =================================================================== --- brlcad/trunk/src/sig/CMakeLists.txt 2012-04-17 17:48:20 UTC (rev 50137) +++ brlcad/trunk/src/sig/CMakeLists.txt 2012-04-17 18:08:26 UTC (rev 50138) @@ -35,7 +35,6 @@ BRLCAD_ADDEXEC(imod imod.c "libbu;${M_LIBRARY}") BRLCAD_ADDEXEC(istats istats.c "libbu;${M_LIBRARY}") BRLCAD_ADDEXEC(smod smod.c "libbu;${M_LIBRARY}") -BRLCAD_ADDEXEC(syn syn.c "libbu;${M_LIBRARY}") BRLCAD_ADDEXEC(u-a u-a.c libbu) BRLCAD_ADDEXEC(u-bw u-bw.c libbu) BRLCAD_ADDEXEC(u-d u-d.c libbu) Modified: brlcad/trunk/src/sig/Makefile.am =================================================================== --- brlcad/trunk/src/sig/Makefile.am 2012-04-17 17:48:20 UTC (rev 50137) +++ brlcad/trunk/src/sig/Makefile.am 2012-04-17 18:08:26 UTC (rev 50138) @@ -30,7 +30,6 @@ imod \ istats \ smod \ - syn \ u-a \ u-bw \ u-d \ @@ -143,9 +142,6 @@ dpeak_SOURCES = dpeak.c dpeak_LDADD = ${BU} -syn_SOURCES = syn.c -syn_LDADD = ${BU} ${LIBM} - damdf_SOURCES = damdf.c damdf_LDADD = ${BU} @@ -192,7 +188,6 @@ $(imod_OBJECTS) \ $(istats_OBJECTS) \ $(smod_OBJECTS) \ - $(syn_OBJECTS) \ $(u_a_OBJECTS) \ $(u_bw_OBJECTS) \ $(u_d_OBJECTS) \ Deleted: brlcad/trunk/src/sig/syn.c =================================================================== --- brlcad/trunk/src/sig/syn.c 2012-04-17 17:48:20 UTC (rev 50137) +++ brlcad/trunk/src/sig/syn.c 2012-04-17 18:08:26 UTC (rev 50138) @@ -1,103 +0,0 @@ -/* S Y N . C - * BRL-CAD - * - * Copyright (c) 2004-2012 United States Government as represented by - * the U.S. Army Research Laboratory. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * version 2.1 as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this file; see the file named COPYING for more - * information. - */ -/** @file syn.c - * - * Multi Sine Synthesis - * - */ - -#include "common.h" - -#include <stdlib.h> -#include <math.h> -#include "bio.h" - -#include "vmath.h" - -#define TABSIZE 512 -double sintab[TABSIZE]; - - -void -makesintab(void) -{ - int i; - double theta; - - for (i = 0; i < TABSIZE; i ++) { - theta = i / (double)TABSIZE * 2 * M_PI; - sintab[i] = sin(theta); - } -} - - -int -main(int argc, char *argv[]) -{ - int i; - double d; - double period, stepsize, findex; - int setsize; - size_t ret; - - static const char usage[] = "\ -Usage: syn samples_per_set [ratio] > doubles\n"; - - if (isatty(fileno(stdout)) || argc < 2) { - bu_exit(1, "%s", usage); - } - - makesintab(); - fprintf(stderr, "init done\n"); - - setsize = atoi(argv[1]); - if (setsize < 0) - setsize = 0; - if (setsize > INT_MAX-1) - setsize = INT_MAX-1; - - findex = 0; - stepsize = 0; - while (fread(&period, sizeof(period), 1, stdin) == 1) { - if (period > 0 && period < INT_MAX-1) - stepsize = TABSIZE / period; - for (i = setsize; i > 0; i--) { - d = sintab[(int)findex]; - d *= 0.4; - ret = fwrite(&d, sizeof(d), 1, stdout); - if (ret != 1) - perror("fwrite"); - findex += stepsize; - if ((int)findex > TABSIZE) - findex -= (double)TABSIZE; - } - } - return 0; -} - -/* - * Local Variables: - * mode: C - * tab-width: 8 - * indent-tabs-mode: t - * c-file-style: "stroustrup" - * End: - * ex: shiftwidth=4 tabstop=8 - */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |