thermferm/lcd-buffer.c

changeset 667
bba6ca418e09
parent 614
389097dc665d
equal deleted inserted replaced
666:48cc8868f9f4 667:bba6ca418e09
1 /***************************************************************************** 1 /*****************************************************************************
2 * Copyright (C) 2014-2022 2 * Copyright (C) 2014-2024
3 * 3 *
4 * Michiel Broek <mbroek at mbse dot eu> 4 * Michiel Broek <mbroek at mbse dot eu>
5 * 5 *
6 * This file is part of the mbsePi-apps 6 * This file is part of the mbsePi-apps
7 * 7 *
73 * Check if the line in row is allocated. If not, do it 73 * Check if the line in row is allocated. If not, do it
74 * and make sure the chain is valid. 74 * and make sure the chain is valid.
75 */ 75 */
76 while (row > current_lines) { 76 while (row > current_lines) {
77 77
78 syslog(LOG_NOTICE, "lcd_buf_write(%d, ...) allocate new row", row);
79 newrow = (lcd_rows *)malloc(sizeof(lcd_rows)); 78 newrow = (lcd_rows *)malloc(sizeof(lcd_rows));
80 newrow->next = NULL; 79 newrow->next = NULL;
81 snprintf(newrow->row, (Config.lcd_cols + 1) * sizeof(char), " "); 80 snprintf(newrow->row, (Config.lcd_cols + 1) * sizeof(char), " ");
82 81
83 if (my_lcd_rows == NULL) { 82 if (my_lcd_rows == NULL) {

mercurial