21 void XString::set_length(
size_t len) {
22 if (number_found && x_string_len<len) freenull(number_found);
31 int len = ali_length+1;
33 memset(x_string,
'.', len);
43 size_t xlen = ali_length+1;
45 sec_assert(saved_length == strlen(saved_x_string));
46 sec_assert(saved_length == xlen || saved_length == xlen-1);
49 memcpy(x_string, saved_x_string, saved_length+1);
51 if (saved_length == xlen-1) {
52 x_string[xlen-1] =
'.';
66 while (
char c = x_string[len]) {
74 if (x_count<x) freenull(abspos);
80 if (!number_found)
ARB_alloc(number_found, x_string_len);
87 while (
char c = x_string[pos]) {
88 number_found[pos] = x;
109 size_t pos = abspos[x];
117 int x = number_found[pos];
126 static size_t copy_alloc = 0;
128 size_t bufsize = x_string_len+1;
130 if (!copy || copy_alloc<bufsize) {
131 freeset(copy, ARB_alloc<char>(bufsize));
132 copy_alloc = bufsize;
135 memcpy(copy, x_string, x_string_len+1);
137 int add_pos = x_string_len-1;
139 if (copy[add_pos] ==
'.') {
int getXleftOf(size_t abspos) const
TYPE * ARB_alloc(size_t nelem)
const char * get_x_string() const
size_t getAbsPos(int x) const
static void copy(double **i, double **j)
XString(size_t ali_length)