Commit 98aac0a0 authored by LAMBERT Jean-charles's avatar LAMBERT Jean-charles

Merge branch 'with_test' of https://gitlab.lam.fr/jclamber/unsio into with_test

parents 7f8e46b3 b8eb5821
...@@ -64,7 +64,7 @@ string root(string filename) ...@@ -64,7 +64,7 @@ string root(string filename)
if (dotpos != NULL && strchr(dotpos, DIR_SEP) != NULL) if (dotpos != NULL && strchr(dotpos, DIR_SEP) != NULL)
dotpos = NULL; dotpos = NULL;
if (dotpos == NULL) if (dotpos == NULL)
return (scopy(filename)); return (__nemo_scopy(filename));
else else
return (substr(filename, 0, (dotpos - filename) - 1)); return (substr(filename, 0, (dotpos - filename) - 1));
} }
...@@ -79,7 +79,7 @@ string extension(string filename) ...@@ -79,7 +79,7 @@ string extension(string filename)
if (dotpos == NULL) if (dotpos == NULL)
return (""); return ("");
else else
return (scopy(dotpos + 1)); return (__nemo_scopy(dotpos + 1));
} }
string head(string filename) string head(string filename)
...@@ -99,9 +99,9 @@ string tail(string filename) ...@@ -99,9 +99,9 @@ string tail(string filename)
slashpos = strrchr(filename, DIR_SEP); slashpos = strrchr(filename, DIR_SEP);
if (slashpos == NULL) if (slashpos == NULL)
return (scopy(filename)); return (__nemo_scopy(filename));
else else
return (scopy(slashpos + 1)); return (__nemo_scopy(slashpos + 1));
} }
...@@ -121,7 +121,7 @@ string fullname(string filename) ...@@ -121,7 +121,7 @@ string fullname(string filename)
char *outname; char *outname;
if (*filename == DIR_SEP) if (*filename == DIR_SEP)
return scopy(filename); return __nemo_scopy(filename);
if (getcwd(pathname,MAXPATHLEN) == 0) if (getcwd(pathname,MAXPATHLEN) == 0)
error("Directory name too long (MAXPATHLEN=%d)",MAXPATHLEN); error("Directory name too long (MAXPATHLEN=%d)",MAXPATHLEN);
n1 = strlen(pathname) + 1; n1 = strlen(pathname) + 1;
...@@ -130,7 +130,7 @@ string fullname(string filename) ...@@ -130,7 +130,7 @@ string fullname(string filename)
if (n1+n2 < MAXPATHLEN) { if (n1+n2 < MAXPATHLEN) {
strcat(pathname,pathsep); strcat(pathname,pathsep);
strcat(pathname,filename); strcat(pathname,filename);
return scopy(pathname); return __nemo_scopy(pathname);
} else { } else {
outname = (char *) allocate(n1+n2+1); outname = (char *) allocate(n1+n2+1);
sprintf(outname,"%s%c%s",pathname,DIR_SEP,filename); sprintf(outname,"%s%c%s",pathname,DIR_SEP,filename);
...@@ -180,7 +180,7 @@ string defext(string filename, string ext) ...@@ -180,7 +180,7 @@ string defext(string filename, string ext)
if (forceext) if (forceext)
return (sconc(substr(filename, 0, xp-filename-1), ext)); return (sconc(substr(filename, 0, xp-filename-1), ext));
else else
return (scopy(filename)); return (__nemo_scopy(filename));
} }
......
...@@ -1035,7 +1035,7 @@ local itemptr readitem(stream str, itemptr first) ...@@ -1035,7 +1035,7 @@ local itemptr readitem(stream str, itemptr first)
*bufp++ = readitem(str, np); /* read next component */ *bufp++ = readitem(str, np); /* read next component */
} }
*bufp = NULL; /* terminate item vector */ *bufp = NULL; /* terminate item vector */
res = makeitem(scopy(SetType), scopy(ItemTag(ip)), res = makeitem(__nemo_scopy(SetType), __nemo_scopy(ItemTag(ip)),
copxstr(ibuf, sizeof(itemptr)), NULL); copxstr(ibuf, sizeof(itemptr)), NULL);
/* construct compound item */ /* construct compound item */
freeitem(ip, TRUE); /* reclaim orig. header */ freeitem(ip, TRUE); /* reclaim orig. header */
......
...@@ -454,9 +454,9 @@ void initparam(string argv[], string defv[]) ...@@ -454,9 +454,9 @@ void initparam(string argv[], string defv[])
maxkeys = nkeys - 1; maxkeys = nkeys - 1;
keys[0].keyval = argv[0]; keys[0].keyval = argv[0];
keys[0].key = scopy("argv0"); keys[0].key = __nemo_scopy("argv0");
keys[0].val = progname = tail(argv[0]); keys[0].val = progname = tail(argv[0]);
keys[0].help = scopy("Program name"); keys[0].help = __nemo_scopy("Program name");
keys[0].count = 0; keys[0].count = 0;
keys[0].upd = 0; keys[0].upd = 0;
nzeno = (*defv[0] == ';'); nzeno = (*defv[0] == ';');
...@@ -480,12 +480,12 @@ void initparam(string argv[], string defv[]) ...@@ -480,12 +480,12 @@ void initparam(string argv[], string defv[])
} }
keys[i].keyval = defv[j]; keys[i].keyval = defv[j];
keys[i].key = scopy(parname(defv[j])); keys[i].key = __nemo_scopy(parname(defv[j]));
keys[i].val = scopy(parvalue(defv[j])); keys[i].val = __nemo_scopy(parvalue(defv[j]));
if (nzeno) if (nzeno)
keys[i].help = scopy(defv[j+1] + 1); keys[i].help = __nemo_scopy(defv[j+1] + 1);
else else
keys[i].help = scopy(parhelp(defv[j])); keys[i].help = __nemo_scopy(parhelp(defv[j]));
keys[i].count = 0; keys[i].count = 0;
keys[i].upd = 1; keys[i].upd = 1;
if (keys[i].key[strlen(keys[i].key)-1] == '#') if (keys[i].key[strlen(keys[i].key)-1] == '#')
...@@ -494,7 +494,7 @@ void initparam(string argv[], string defv[]) ...@@ -494,7 +494,7 @@ void initparam(string argv[], string defv[])
keys[i].indexed = -2; /* not indexed */ keys[i].indexed = -2; /* not indexed */
keys[i].next = NULL; keys[i].next = NULL;
if (streq(keys[i].key,"VERSION")) { /* special (last?) keyword */ if (streq(keys[i].key,"VERSION")) { /* special (last?) keyword */
version_i = scopy(keys[i].val); version_i = __nemo_scopy(keys[i].val);
keys[i].upd = 0; keys[i].upd = 0;
maxkeys--; maxkeys--;
} }
...@@ -532,7 +532,7 @@ void initparam(string argv[], string defv[]) ...@@ -532,7 +532,7 @@ void initparam(string argv[], string defv[])
if (keys[i].indexed >= -1) if (keys[i].indexed >= -1)
error("Cannot match indexed keywords by position"); error("Cannot match indexed keywords by position");
free(keys[i].val); free(keys[i].val);
keys[i].val = scopy(argv[i]); keys[i].val = __nemo_scopy(argv[i]);
keys[i].count++; keys[i].count++;
} }
} else { /* match by name? */ } else { /* match by name? */
...@@ -544,7 +544,7 @@ void initparam(string argv[], string defv[]) ...@@ -544,7 +544,7 @@ void initparam(string argv[], string defv[])
if (keys[j].count) if (keys[j].count)
error("Parameter \"%s\" duplicated", name); error("Parameter \"%s\" duplicated", name);
free(keys[j].val); free(keys[j].val);
keys[j].val = scopy(parvalue(argv[i])); /* get value */ keys[j].val = __nemo_scopy(parvalue(argv[i])); /* get value */
keys[j].count++; keys[j].count++;
} else if (j=set_indexed(name,&idx)) { /* enter indexed keywords */ } else if (j=set_indexed(name,&idx)) { /* enter indexed keywords */
// process this indexed keyword // process this indexed keyword
...@@ -561,9 +561,9 @@ void initparam(string argv[], string defv[]) ...@@ -561,9 +561,9 @@ void initparam(string argv[], string defv[])
} }
kw->next = (keyword *) allocate(sizeof(keyword)); kw->next = (keyword *) allocate(sizeof(keyword));
kw = kw->next; kw = kw->next;
kw->keyval = scopy(argv[i]); kw->keyval = __nemo_scopy(argv[i]);
kw->key = scopy(parname(argv[i])); kw->key = __nemo_scopy(parname(argv[i]));
kw->val = scopy(parvalue(argv[i])); kw->val = __nemo_scopy(parvalue(argv[i]));
kw->help = 0; kw->help = 0;
kw->count = 1; // indexed keywords are never 'original' kw->count = 1; // indexed keywords are never 'original'
kw->upd = 0; kw->upd = 0;
...@@ -647,7 +647,7 @@ void initparam(string argv[], string defv[]) ...@@ -647,7 +647,7 @@ void initparam(string argv[], string defv[])
((val == NULL || streq(val, "")) && defflag) ); ((val == NULL || streq(val, "")) && defflag) );
if (!streq(keys[i].val,val)) { if (!streq(keys[i].val,val)) {
free(keys[i].val); free(keys[i].val);
keys[i].val = scopy(val); keys[i].val = __nemo_scopy(val);
keys[i].count++; keys[i].count++;
} }
if (go) break; if (go) break;
...@@ -1397,7 +1397,7 @@ local void eval_keys(void) ...@@ -1397,7 +1397,7 @@ local void eval_keys(void)
*c2 = 0; *c2 = 0;
dprintf(3,"eval_keys: Modifying %s\n",keys[i].val); dprintf(3,"eval_keys: Modifying %s\n",keys[i].val);
free(keys[i].val); free(keys[i].val);
keys[i].val = scopy(newval); keys[i].val = __nemo_scopy(newval);
/* keys[i].count++; */ /* keys[i].count++; */
} }
} }
...@@ -1828,7 +1828,7 @@ local void setparam (string par, string val, string prompt) ...@@ -1828,7 +1828,7 @@ local void setparam (string par, string val, string prompt)
#endif #endif
val = line; val = line;
} }
kw->val = scopy(val); kw->val = __nemo_scopy(val);
kw->upd = 2; /* mark it as being updated */ kw->upd = 2; /* mark it as being updated */
#else #else
error("setparam: not compiled into getparam.c"); error("setparam: not compiled into getparam.c");
...@@ -2254,9 +2254,9 @@ local int addindexed(int i, string keyval, int idx) ...@@ -2254,9 +2254,9 @@ local int addindexed(int i, string keyval, int idx)
} }
kw->next = (keyword *) allocate(sizeof(keyword)); kw->next = (keyword *) allocate(sizeof(keyword));
kw = kw->next; kw = kw->next;
kw->keyval = scopy(keyval); kw->keyval = __nemo_scopy(keyval);
kw->key = scopy(parname(keyval)); kw->key = __nemo_scopy(parname(keyval));
kw->val = scopy(parvalue(keyval)); kw->val = __nemo_scopy(parvalue(keyval));
kw->help = 0; kw->help = 0;
kw->count = 1; kw->count = 1;
kw->upd = 0; kw->upd = 0;
...@@ -2363,7 +2363,7 @@ local void readkeys(string mesg, bool first) ...@@ -2363,7 +2363,7 @@ local void readkeys(string mesg, bool first)
} else { } else {
if (!streq(keys[i].val,parvalue(keybuf))) { /* if different */ if (!streq(keys[i].val,parvalue(keybuf))) { /* if different */
free(keys[i].val); /* free old */ free(keys[i].val); /* free old */
keys[i].val = scopy(parvalue(keybuf)); /* and patch in */ keys[i].val = __nemo_scopy(parvalue(keybuf)); /* and patch in */
} }
} }
} }
...@@ -2863,7 +2863,7 @@ local void set_help(string arg) ...@@ -2863,7 +2863,7 @@ local void set_help(string arg)
{ {
char *cp; char *cp;
help_string = scopy(arg); help_string = __nemo_scopy(arg);
if ((cp = strpbrk(help_string,"0123456789"))!=NULL) /* isnum? */ if ((cp = strpbrk(help_string,"0123456789"))!=NULL) /* isnum? */
help_level = atoi(cp); /* if so, change help_level */ help_level = atoi(cp); /* if so, change help_level */
} }
...@@ -2909,7 +2909,7 @@ local void set_debug(string arg) ...@@ -2909,7 +2909,7 @@ local void set_debug(string arg)
local void set_yapp(string arg) local void set_yapp(string arg)
{ {
yapp_string = scopy(arg); yapp_string = __nemo_scopy(arg);
yapp_dev = atoi(yapp_string); yapp_dev = atoi(yapp_string);
} }
......
...@@ -133,7 +133,7 @@ int app_history(string s) ...@@ -133,7 +133,7 @@ int app_history(string s)
dprintf(1, "app_history: null history string\n"); dprintf(1, "app_history: null history string\n");
return nhist; return nhist;
} }
histbuf[nhist] = scopy(s); histbuf[nhist] = __nemo_scopy(s);
freeup[nhist] = TRUE; freeup[nhist] = TRUE;
dprintf(9,"app_history: histbuf[%d] = %s\n", nhist, s); dprintf(9,"app_history: histbuf[%d] = %s\n", nhist, s);
nhist++; nhist++;
...@@ -162,7 +162,7 @@ void reset_history() ...@@ -162,7 +162,7 @@ void reset_history()
void set_headline(string s) void set_headline(string s)
{ {
headline = scopy(s); headline = __nemo_scopy(s);
} }
/* /*
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
/* Contents: */ /* Contents: */
/* */ /* */
/* getmem(nbytes) malloc with error checking */ /* getmem(nbytes) malloc with error checking */
/* scopy(source) returns a copy of source */ /* __nemo_scopy(source) returns a copy of source */
/* sconc(s1,s2) concatenates its arguments */ /* sconc(s1,s2) concatenates its arguments */
/* substr(s, p1, p2) returns substring from p1-p2 */ /* substr(s, p1, p2) returns substring from p1-p2 */
/* findstr(text, pat) finds index of pat in text */ /* findstr(text, pat) finds index of pat in text */
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#define _strlib_h #define _strlib_h
extern char *getmem ( int nbytes ); extern char *getmem ( int nbytes );
extern string scopy ( const char *s ); extern string __nemo_scopy ( const char *s );
extern string sconc ( char *s1, char *s2 ); extern string sconc ( char *s1, char *s2 );
extern string substr ( char *s, int p1, int p2 ); extern string substr ( char *s, int p1, int p2 );
extern int findstr ( char *text, char *pat ); extern int findstr ( char *text, char *pat );
......
This diff is collapsed.
This diff is collapsed.
...@@ -55,12 +55,12 @@ ...@@ -55,12 +55,12 @@
/* Variables used for reading operations */ /* Variables used for reading operations */
char * io_in[MAXIO]; char * io_in[MAXIO];
FILE * instr[MAXIO]; FILE * __io_instr[MAXIO];
bool read_one[MAXIO]; bool read_one[MAXIO];
/* Variables used for writing operations */ /* Variables used for writing operations */
char * io_out[MAXIO]; char * io_out[MAXIO];
FILE * outstr[MAXIO]; FILE * __io_outstr[MAXIO];
bool save_one[MAXIO]; bool save_one[MAXIO];
/* variables used to keep track of history (EXPORTED) */ /* variables used to keep track of history (EXPORTED) */
...@@ -102,7 +102,6 @@ int io_nemo(char * iofile, ...@@ -102,7 +102,6 @@ int io_nemo(char * iofile,
/* control */ /* control */
static bool first=TRUE; static bool first=TRUE;
/* init flag */ /* init flag */
init_flag_io(); init_flag_io();
...@@ -234,7 +233,7 @@ int io_nemo(char * iofile, ...@@ -234,7 +233,7 @@ int io_nemo(char * iofile,
code=close_io_nemo(iofile); code=close_io_nemo(iofile);
else { else {
if (io_op) { /* operation on snaphot is reading */ 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 pointers */
/*reajust_ptr();*/ /*reajust_ptr();*/
if (N_io) *(ion->nbody_p) = ion->nbody; if (N_io) *(ion->nbody_p) = ion->nbody;
...@@ -260,7 +259,7 @@ int io_nemo(char * iofile, ...@@ -260,7 +259,7 @@ int io_nemo(char * iofile,
"in the field parameter for SAVE operation \n"); "in the field parameter for SAVE operation \n");
exit(1); 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); free ((t_ion_data *) ion);
...@@ -276,8 +275,8 @@ int close_io_nemo(char * iofile) ...@@ -276,8 +275,8 @@ int close_io_nemo(char * iofile)
int no_io,code; int no_io,code;
/* check if the file is already open */ /* 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_in,read_one,__io_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_out,save_one,__io_outstr,MAXIO)) < 0) {
fprintf(stderr, fprintf(stderr,
"WARNING!! snapshot [%s] not OPEN, unable to close it\n", "WARNING!! snapshot [%s] not OPEN, unable to close it\n",
iofile); iofile);
...@@ -285,7 +284,7 @@ int close_io_nemo(char * iofile) ...@@ -285,7 +284,7 @@ int close_io_nemo(char * iofile)
} }
else { else {
/* close the file open for writing */ /* close the file open for writing */
strclose(outstr[no_io]); strclose(__io_outstr[no_io]);
/* RAZ variables */ /* RAZ variables */
save_one[no_io] = FALSE; save_one[no_io] = FALSE;
...@@ -297,7 +296,7 @@ int close_io_nemo(char * iofile) ...@@ -297,7 +296,7 @@ int close_io_nemo(char * iofile)
} }
else { else {
/* close the file open for reading */ /* close the file open for reading */
strclose(instr[no_io]); strclose(__io_instr[no_io]);
/* RAZ variables */ /* RAZ variables */
read_one[no_io] = FALSE; read_one[no_io] = FALSE;
......
...@@ -61,12 +61,12 @@ ...@@ -61,12 +61,12 @@
/* variables for reading */ /* variables for reading */
extern char * io_in[MAXIO]; extern char * io_in[MAXIO];
extern FILE * instr[MAXIO]; extern FILE * __io_instr[MAXIO];
extern bool read_one[MAXIO]; extern bool read_one[MAXIO];
/* variables for writing */ /* variables for writing */
extern char * io_out[MAXIO]; extern char * io_out[MAXIO];
extern FILE * outstr[MAXIO]; extern FILE * __io_outstr[MAXIO];
extern bool save_one[MAXIO]; extern bool save_one[MAXIO];
/* variables used to keep track of history (EXPORTED) */ /* variables used to keep track of history (EXPORTED) */
...@@ -227,7 +227,7 @@ int IO_NEMO_F(char * iofile, ...@@ -227,7 +227,7 @@ int IO_NEMO_F(char * iofile,
va_end(pa); va_end(pa);
if (io_op) { /* operation on snaphot is reading */ 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 { else {
if (!N_io) { if (!N_io) {
...@@ -237,7 +237,7 @@ int IO_NEMO_F(char * iofile, ...@@ -237,7 +237,7 @@ int IO_NEMO_F(char * iofile,
"You must specify \"nbody\" in the field parameter for SAVE operation \n"); "You must specify \"nbody\" in the field parameter for SAVE operation \n");
exit(1); 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; return code;
} }
...@@ -255,8 +255,8 @@ int CLOSE_IO_NEMO_F(char * iofile,int * lg) ...@@ -255,8 +255,8 @@ int CLOSE_IO_NEMO_F(char * iofile,int * lg)
iofile = (char *) f_ch_to_c(iofile,*lg); iofile = (char *) f_ch_to_c(iofile,*lg);
/* check if the file is already open */ /* 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_in,read_one,__io_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_out,save_one,__io_outstr,MAXIO)) < 0) {
fprintf(stderr, fprintf(stderr,
"WARNING!! snapshot [%s] not OPEN, unable to close it\n", "WARNING!! snapshot [%s] not OPEN, unable to close it\n",
iofile); iofile);
...@@ -264,7 +264,7 @@ int CLOSE_IO_NEMO_F(char * iofile,int * lg) ...@@ -264,7 +264,7 @@ int CLOSE_IO_NEMO_F(char * iofile,int * lg)
} }
else { else {
/* close the file open for writing */ /* close the file open for writing */
strclose(outstr[no_io]); strclose(__io_outstr[no_io]);
/* RAZ variables */ /* RAZ variables */
save_one[no_io] = FALSE; save_one[no_io] = FALSE;
...@@ -274,7 +274,7 @@ int CLOSE_IO_NEMO_F(char * iofile,int * lg) ...@@ -274,7 +274,7 @@ int CLOSE_IO_NEMO_F(char * iofile,int * lg)
} }
else { else {
/* close the file open for reading */ /* close the file open for reading */
strclose(instr[no_io]); strclose(__io_instr[no_io]);
/* RAZ variables */ /* RAZ variables */
read_one[no_io] = FALSE; read_one[no_io] = FALSE;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
/* The following routines are defined by strlib: */ /* The following routines are defined by strlib: */
/* */ /* */
/* getmem(nbytes) malloc with error checking */ /* getmem(nbytes) malloc with error checking */
/* scopy(source) returns a copy of source */ /* __nemo_scopy(source) returns a copy of source */
/* sconc(s1,s2) concatenates its arguments */ /* sconc(s1,s2) concatenates its arguments */
/* substr(s, p1, p2) returns substring from p1-p2 */ /* substr(s, p1, p2) returns substring from p1-p2 */
/* findstr(text, pat) finds index of pat in text */ /* findstr(text, pat) finds index of pat in text */
...@@ -47,13 +47,13 @@ char *getmem(int nbytes) ...@@ -47,13 +47,13 @@ char *getmem(int nbytes)
/***************************************************************/ /***************************************************************/
/* s = scopy(t); */ /* s = __nemo_scopy(t); */
/* */ /* */
/* Copies the string t into dynamically-allocated storage. */ /* Copies the string t into dynamically-allocated storage. */
/* see also: strdup() */ /* see also: strdup() */
/***************************************************************/ /***************************************************************/
string scopy(const_string s) string __nemo_scopy(const_string s)
{ {
string result; string result;
......
...@@ -137,7 +137,7 @@ stream stropen(const_string name, string mode) ...@@ -137,7 +137,7 @@ stream stropen(const_string name, string mode)
fe = (fentry*) allocate(sizeof(fentry)); fe = (fentry*) allocate(sizeof(fentry));
fe->next = flist; fe->next = flist;
flist = fe; /* hook into the list */ flist = fe; /* hook into the list */
fe->name = scopy(name); fe->name = __nemo_scopy(name);
fe->str = res; fe->str = res;
fe->scratch = FALSE; fe->scratch = FALSE;
fe->seek = FALSE; fe->seek = FALSE;
...@@ -203,7 +203,7 @@ stream stropen(const_string name, string mode) ...@@ -203,7 +203,7 @@ stream stropen(const_string name, string mode)
fe = (fentry*) allocate(sizeof(fentry)); fe = (fentry*) allocate(sizeof(fentry));
fe->next = flist; fe->next = flist;
flist = fe; /* hook into the list */ flist = fe; /* hook into the list */
fe->name = scopy(tempname); fe->name = __nemo_scopy(tempname);
fe->str = res; fe->str = res;
fe->scratch = streq(mode,"s"); fe->scratch = streq(mode,"s");
fe->seek = canSeek; fe->seek = canSeek;
......
...@@ -10,4 +10,4 @@ except: ...@@ -10,4 +10,4 @@ except:
#from . import test, csnapshot #from . import test, csnapshot
#from .csnapshot import * #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 ...@@ -44,7 +44,10 @@ UNSIO comes with an integrated sqlite3 database which can be used to retrieve au
class build_py(_build_py): class build_py(_build_py):
def run(self): def run(self):
self.run_command("build_ext") self.run_command("build_ext")
return super().run() if pyversion=="": # python2
return super().run()