55 * Check if the line in row is allocated. If not, do it |
55 * Check if the line in row is allocated. If not, do it |
56 * and make sure the chain is valid. |
56 * and make sure the chain is valid. |
57 */ |
57 */ |
58 while (row > current_lines) { |
58 while (row > current_lines) { |
59 |
59 |
|
60 syslog(LOG_NOTICE, "lcd_buf_write(%d, ...) allowcate new row", row); |
60 newrow = (lcd_rows *)malloc(sizeof(lcd_rows)); |
61 newrow = (lcd_rows *)malloc(sizeof(lcd_rows)); |
61 newrow->next = NULL; |
62 newrow->next = NULL; |
62 snprintf(newrow->row, (Config.lcd_cols + 1) * sizeof(char), " "); |
63 snprintf(newrow->row, (Config.lcd_cols + 1) * sizeof(char), " "); |
63 |
64 |
64 if (my_lcd_rows == NULL) { |
65 if (my_lcd_rows == NULL) { |
79 */ |
80 */ |
80 for (tmp = my_lcd_rows; tmp; tmp = tmp->next) { |
81 for (tmp = my_lcd_rows; tmp; tmp = tmp->next) { |
81 i++; |
82 i++; |
82 if (i == row) { |
83 if (i == row) { |
83 snprintf(tmp->row, Config.lcd_cols + 1, "%s", buf); |
84 snprintf(tmp->row, Config.lcd_cols + 1, "%s", buf); |
84 break; |
85 return; |
85 } |
86 } |
86 } |
87 } |
|
88 syslog(LOG_NOTICE, "lcd_buf_write(%d, ...) could not find row, i=%d", row, i); |
87 } |
89 } |
88 |
90 |
89 |
91 |
90 |
92 |
91 void lcd_buf_step(int key) |
93 void lcd_buf_step(int key) |