Commit 9f401be1 authored by Arnaud Blanchard's avatar Arnaud Blanchard
Browse files

Remove ARG_MAX

Which is not defined in Ubuntu 18 anymore. It is replaced by LINE_MAX.
parent 96eeb4e9
......@@ -95,7 +95,7 @@ static void *refresh_history_cb(void *history_pt){
void create_history_graph(blc_channel *input, char const *title, int history_length, int refresh_period, int sampling_period, float min, float max, char const *verbatim){
char const *gnuplot_format=NULL;
char command[ARG_MAX];
char command[LINE_MAX];
char code;
int i, offset, columns_nb=0;
......@@ -147,7 +147,7 @@ void create_history_graph(blc_channel *input, char const *title, int history_len
else if (i==62) code='[';
else if (i==63) code=']';
else EXIT_ON_ERROR("Too many columns. You have '%d' max is 64", columns_nb);
offset+=snprintf(command+offset, ARG_MAX-offset, ", '-' binary format='%s' record=%d u ($0*%f):1 t '%c' w %s", gnuplot_format, history_length, sampling_period/1000000.f, code, with_option);
offset+=snprintf(command+offset, LINE_MAX-offset, ", '-' binary format='%s' record=%d u ($0*%f):1 t '%c' w %s", gnuplot_format, history_length, sampling_period/1000000.f, code, with_option);
}
history.init(input->type, input->format, 2, columns_nb, history_length);
......
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