Skip to content
  • Peter Hutterer's avatar
    pw-mon: add support for colored output · 671410b3
    Peter Hutterer authored and Wim Taymans's avatar Wim Taymans committed
    Same CLI as pw-dump, i.e. -N, --no-colors, --color=always etc are
    supported.
    
    This uses a for-loop macro hack to automatically print prefixes and
    suffixes, the with_prefix() macro resolves into the correct printf
    statements to insert either just the marker "*" or the ansi sequences
    for color/reset. Use of the macro is simply:
    ```
       with_prefix(true, stderr) {
    	fprintf(stderr, "this will be prefixed\n");
       }
    ```
    671410b3