Commit b8eb5821 authored by LAMBERT Jean-charles's avatar LAMBERT Jean-charles

a lot of fixes for MACOS

parent 9a6bb81a
This diff is collapsed.
This diff is collapsed.
......@@ -55,12 +55,12 @@
/* Variables used for reading operations */
char * io_in[MAXIO];
FILE * instr[MAXIO];
FILE * __io_instr[MAXIO];
bool read_one[MAXIO];
/* Variables used for writing operations */
char * io_out[MAXIO];
FILE * outstr[MAXIO];
FILE * __io_outstr[MAXIO];
bool save_one[MAXIO];
/* variables used to keep track of history (EXPORTED) */
......@@ -102,7 +102,6 @@ int io_nemo(char * iofile,
/* control */
static bool first=TRUE;
/* init flag */
init_flag_io();
......@@ -234,7 +233,7 @@ int io_nemo(char * iofile,
code=close_io_nemo(iofile);
else {
if (io_op) { /* operation on snaphot is reading */
code = get_data_select(iofile, rtype, io_in, read_one, instr, MAXIO,ion);
code = get_data_select(iofile, rtype, io_in, read_one, __io_instr, MAXIO,ion);
/* reajust pointers */
/*reajust_ptr();*/
if (N_io) *(ion->nbody_p) = ion->nbody;
......@@ -260,7 +259,7 @@ int io_nemo(char * iofile,
"in the field parameter for SAVE operation \n");
exit(1);
}
code = put_data_select(iofile, rtype, io_out, save_one, outstr, MAXIO,ion);
code = put_data_select(iofile, rtype, io_out, save_one, __io_outstr, MAXIO,ion);
}
}
free ((t_ion_data *) ion);
......@@ -276,8 +275,8 @@ int close_io_nemo(char * iofile)
int no_io,code;
/* check if the file is already open */
if ((no_io = get_old_file(iofile,io_in,read_one,instr,MAXIO)) < 0) {
if ((no_io = get_old_file(iofile,io_out,save_one,outstr,MAXIO)) < 0) {
if ((no_io = get_old_file(iofile,io_in,read_one,__io_instr,MAXIO)) < 0) {
if ((no_io = get_old_file(iofile,io_out,save_one,__io_outstr,MAXIO)) < 0) {
fprintf(stderr,
"WARNING!! snapshot [%s] not OPEN, unable to close it\n",
iofile);
......@@ -285,7 +284,7 @@ int close_io_nemo(char * iofile)
}
else {
/* close the file open for writing */
strclose(outstr[no_io]);
strclose(__io_outstr[no_io]);
/* RAZ variables */
save_one[no_io] = FALSE;
......@@ -297,7 +296,7 @@ int close_io_nemo(char * iofile)
}
else {
/* close the file open for reading */
strclose(instr[no_io]);
strclose(__io_instr[no_io]);
/* RAZ variables */
read_one[no_io] = FALSE;
......
......@@ -61,12 +61,12 @@
/* variables for reading */
extern char * io_in[MAXIO];
extern FILE * instr[MAXIO];
extern FILE * __io_instr[MAXIO];
extern bool read_one[MAXIO];
/* variables for writing */
extern char * io_out[MAXIO];
extern FILE * outstr[MAXIO];
extern FILE * __io_outstr[MAXIO];
extern bool save_one[MAXIO];
/* variables used to keep track of history (EXPORTED) */
......@@ -227,7 +227,7 @@ int IO_NEMO_F(char * iofile,
va_end(pa);
if (io_op) { /* operation on snaphot is reading */
code = get_data_select_f(iofile, size_array, rtype, io_in, read_one, instr, MAXIO);
code = get_data_select_f(iofile, size_array, rtype, io_in, read_one, __io_instr, MAXIO);
}
else {
if (!N_io) {
......@@ -237,7 +237,7 @@ int IO_NEMO_F(char * iofile,
"You must specify \"nbody\" in the field parameter for SAVE operation \n");
exit(1);
}
code = put_data_select_f(iofile, size_array, rtype, io_out, save_one, outstr, MAXIO);
code = put_data_select_f(iofile, size_array, rtype, io_out, save_one, __io_outstr, MAXIO);
}
return code;
}
......@@ -255,8 +255,8 @@ int CLOSE_IO_NEMO_F(char * iofile,int * lg)
iofile = (char *) f_ch_to_c(iofile,*lg);
/* check if the file is already open */
if ((no_io = get_old_file(iofile,io_in,read_one,instr,MAXIO)) < 0) {
if ((no_io = get_old_file(iofile,io_out,save_one,outstr,MAXIO)) < 0) {
if ((no_io = get_old_file(iofile,io_in,read_one,__io_instr,MAXIO)) < 0) {
if ((no_io = get_old_file(iofile,io_out,save_one,__io_outstr,MAXIO)) < 0) {
fprintf(stderr,
"WARNING!! snapshot [%s] not OPEN, unable to close it\n",
iofile);
......@@ -264,7 +264,7 @@ int CLOSE_IO_NEMO_F(char * iofile,int * lg)
}
else {
/* close the file open for writing */
strclose(outstr[no_io]);
strclose(__io_outstr[no_io]);
/* RAZ variables */
save_one[no_io] = FALSE;
......@@ -274,7 +274,7 @@ int CLOSE_IO_NEMO_F(char * iofile,int * lg)
}
else {
/* close the file open for reading */
strclose(instr[no_io]);
strclose(__io_instr[no_io]);
/* RAZ variables */
read_one[no_io] = FALSE;
......
......@@ -10,4 +10,4 @@ except:
#from . import test, csnapshot
#from .csnapshot import *
__version__ = '0.9.2'
......@@ -44,7 +44,10 @@ UNSIO comes with an integrated sqlite3 database which can be used to retrieve au
class build_py(_build_py):
def run(self):
self.run_command("build_ext")
return super().run()
if pyversion=="": # python2
return super().run()
else: # python3
return super().run()
setup(
#name='python'+pyversion+'-unsio',
......
......@@ -19,7 +19,7 @@
#define UNSIO_MAJOR "1"
#define UNSIO_MINOR "2"
#define UNSIO_PATCH "0"
#define UNSIO_EXTRA "-dev-Sep-20-2018"
#define UNSIO_EXTRA "-dev-Sep-21-2018"
#endif // UNS_VERSION_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment