mirror of
https://github.com/EnergyMech/energymech.git
synced 2025-12-17 07:26:21 +00:00
support for more table_buffer columns
This commit is contained in:
parent
1d116d7942
commit
53442cff3f
@ -293,9 +293,10 @@ void table_send(const char *from, const int space)
|
||||
char message[MAXLEN];
|
||||
Strp *sp,*next;
|
||||
char *src,*o,*end;
|
||||
int i,u,g,x,z[6];
|
||||
int i,u,g,x,tabs[16];
|
||||
|
||||
memset(tabs,0,sizeof(tabs));
|
||||
|
||||
z[0] = z[1] = z[2] = z[3] = z[4] = z[5] = 0;
|
||||
for(sp=e_table;sp;sp=sp->next)
|
||||
{
|
||||
u = i = 0;
|
||||
@ -307,8 +308,8 @@ void table_send(const char *from, const int space)
|
||||
if (*src == '\t' || *src == '\r')
|
||||
{
|
||||
x = (src - o) - u;
|
||||
if (x > z[i])
|
||||
z[i] = x;
|
||||
if (x > tabs[i])
|
||||
tabs[i] = x;
|
||||
i++;
|
||||
o = src+1;
|
||||
u = 0;
|
||||
@ -340,9 +341,9 @@ void table_send(const char *from, const int space)
|
||||
if (*src == '\t' || *src == '\r')
|
||||
{
|
||||
if (*src == '\r')
|
||||
g = z[i+1];
|
||||
g = tabs[i+1];
|
||||
src++;
|
||||
x += (z[i++] + space);
|
||||
x += (tabs[i++] + space);
|
||||
while(o < (message + x))
|
||||
*(o++) = ' ';
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user