minor rewrites
This commit is contained in:
parent
f30f96a4c7
commit
411c6fc8c3
|
|
@ -1,3 +1,10 @@
|
|||
2010-11-04 Robert Larice
|
||||
* src/frontend/com_compose.c ,
|
||||
* src/frontend/postcoms.c ,
|
||||
* src/misc/util.c :
|
||||
minor rewrites
|
||||
in postcoms.c, drop an overwritten |= VF_PERMANENT assignment
|
||||
|
||||
2010-11-04 Robert Larice
|
||||
* src/main.c ,
|
||||
* src/ngsconvert.c ,
|
||||
|
|
|
|||
|
|
@ -466,11 +466,13 @@ com_compose(wordlist *wl)
|
|||
ZERO(result, struct dvec);
|
||||
result->v_name = copy(resname);
|
||||
result->v_type = type;
|
||||
result->v_flags = (realflag ? VF_REAL : VF_COMPLEX) | VF_PERMANENT;
|
||||
if (realflag)
|
||||
if (realflag) {
|
||||
result->v_flags = VF_REAL | VF_PERMANENT;
|
||||
result->v_realdata = data;
|
||||
else
|
||||
} else {
|
||||
result->v_flags = VF_COMPLEX | VF_PERMANENT;
|
||||
result->v_compdata = cdata;
|
||||
}
|
||||
result->v_length = length;
|
||||
result->v_numdims = 1;
|
||||
result->v_dims[0] = length;
|
||||
|
|
|
|||
|
|
@ -742,13 +742,15 @@ com_cross(wordlist *wl)
|
|||
v->v_name = copy(newvec);
|
||||
v->v_type = vecs ? vecs->v_type : SV_NOTYPE;
|
||||
v->v_length = i;
|
||||
v->v_flags |= VF_PERMANENT;
|
||||
v->v_flags = comp ? VF_COMPLEX : VF_REAL;
|
||||
if (comp)
|
||||
|
||||
if (comp) {
|
||||
v->v_flags = VF_COMPLEX;
|
||||
v->v_compdata = TMALLOC(ngcomplex_t, i);
|
||||
else
|
||||
} else {
|
||||
v->v_flags = VF_REAL;
|
||||
v->v_realdata = TMALLOC(double, i);
|
||||
|
||||
}
|
||||
|
||||
/* Now copy the ind'ths elements into this one. */
|
||||
for (n = vecs, i = 0; n; n = n->v_link2, i++)
|
||||
if (n->v_length > ind) {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,9 @@ canonicalize_pathname(char *path)
|
|||
/* The result cannot be larger than the input PATH. */
|
||||
result = copy(path);
|
||||
|
||||
stub_char = (*path == '/') ? '/' : '.';
|
||||
stub_char = '.';
|
||||
if(*path == '/')
|
||||
stub_char = '/';
|
||||
|
||||
/* Walk along RESULT looking for things to compact. */
|
||||
i = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue