Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions bbp/src/sdsu/bbtoolbox/ray3DJHfor.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ if I don't answer the e-mail (our computers are in a state of flux). */
#include <math.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>

#define PI 3.141592654
#define SQR2 1.414213562
Expand Down Expand Up @@ -202,8 +204,8 @@ void raytracing_(hypo,grid,step,PS_flag)
/*timefile[80], file in which travel times appear at the end */
wallfile[80]; /* file containing input wall values of traveltimes */

char *velfile=malloc(11);
char *timefile=malloc(12);
char *velfile=malloc(80);
char *timefile=malloc(80);
FILE *vfint, *tfint;

/* ARRAY TO ORDER SIDE FOR SOLUTION IN THE RIGHT ORDER */
Expand Down Expand Up @@ -1701,7 +1703,7 @@ void raytracing_(hypo,grid,step,PS_flag)

/* -------------------------------------------------------------------------- */

compar(a,b)
int compar(a,b)
struct sorted *a, *b;
{
if(a->time > b->time) return(1);
Expand Down
18 changes: 9 additions & 9 deletions bbp/tests/test_python_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,29 +52,29 @@ def test_execute_platform_bbp(self):
Run Broadband Plotform to make sure we can start it
"""
self.install = InstallCfg()
cmd = ("python3 %s -v >/dev/null" %
(os.path.join(self.install.A_COMP_DIR,
"run_bbp.py")))
cmd = ("%s %s -v >/dev/null" %
(sys.executable, os.path.join(self.install.A_COMP_DIR,
"run_bbp.py")))
self.assertFalse(bband_utils.runprog(cmd, False) != 0,
"Cannot start Broadband plotform!")

def test_python_code_comps(self):
"""
Run Python with -tt flag to detect mix of tabs and spaces in the code
Run Python compileall to detect mix of tabs and spaces in the code
"""
self.install = InstallCfg()
cmd = ("python3 -tt -m compileall -f -q -l %s" %
(self.install.A_COMP_DIR))
cmd = ("%s -m compileall -f -q -l %s" %
(sys.executable, self.install.A_COMP_DIR))
self.assertFalse(bband_utils.runprog(cmd, False) != 0,
"Python code in comps directory mixes tabs and spaces!")

def test_python_code_tests(self):
"""
Run Python with -tt flag to detect mix of tabs and spaces in the code
Run Python compileall to detect mix of tabs and spaces in the code
"""
self.install = InstallCfg()
cmd = ("python -tt -m compileall -f -q -l %s" %
(self.install.A_TEST_DIR))
cmd = ("%s -m compileall -f -q -l %s" %
(sys.executable, self.install.A_TEST_DIR))
self.assertFalse(bband_utils.runprog(cmd, False) != 0,
"Python code in test directory mixes tabs and spaces!")

Expand Down
Loading