[cig-commits] [commit] pluggable: No need for undef, eps. (65cbb76)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Apr 9 08:55:30 PDT 2014


Repository : ssh://geoshell/specfem3d_globe

On branch  : pluggable
Link       : https://github.com/geodynamics/specfem3d_globe/compare/64e1b38f0c5ebb4056cce0b15d41c0b9f94ab6e5...099a4d330d5b173b21e51ad441f9f429e5d37842

>---------------------------------------------------------------

commit 65cbb760710cddf3108702dc5c9d286f4264a5c5
Author: Leif Strand <leif at geodynamics.org>
Date:   Wed May 6 03:39:40 2009 +0000

    No need for undef, eps.


>---------------------------------------------------------------

65cbb760710cddf3108702dc5c9d286f4264a5c5
 UTILS/seis_process/convolve_stf.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/UTILS/seis_process/convolve_stf.c b/UTILS/seis_process/convolve_stf.c
index eecd4b6..ed63f0a 100644
--- a/UTILS/seis_process/convolve_stf.c
+++ b/UTILS/seis_process/convolve_stf.c
@@ -104,14 +104,12 @@ main(int argc, char *argv[])
     float hdur, *data;
     int errno, j, datasize, len_fn;
     const int min_nhdur = 10;
-    const float undef = -12345.0;
-    const float eps = 1e-3;
 
 
     if(argc < 4) {
         fprintf(stderr,
-                "Usage: %s g[|t] hdur sacfiles\n"
-                "  This program convolves sacfiles with gaussion(|triangle)\n"
+                "Usage: %s g[|t] HDUR FILE...\n"
+                "  This program convolves SAC files with gaussian(|triangle)\n"
                 "  source time function of given half duration\n",
                 argv[0]);
         return -1;
@@ -184,7 +182,7 @@ main(int argc, char *argv[])
         /* get additional info */
         getfhv("delta", &dt, &nerr, strlen("delta"));
         getfhv("o", &origin, &nerr, strlen("o"));
-        if(fabs(origin - undef) < eps) {
+        if(nerr) {
             fprintf(stderr,"No origin time is defined for the sac file\n");
             return -1;
         }



More information about the CIG-COMMITS mailing list