Made update interval, scroll length and scroll step
settable at runtime.
Renamed meta to state, changed its structure.
Optimizations to print_status:
- Calculate full_label and padded_label (and their lengths) only when the
song changes, rather than doing multiple sprintf's and strlen's each
call
- Only allocate space for the printed label when doing scrolling,
otherwise just update the label pointer directly to the full_label
Other minor changes.
Connection to mpd is no longer left open when invalid
input received.
Segmentation fault was a result of passing getline
an uninitialized pointer.
Also make sure to free the pointer after.