Changeset 5811:28f6eed531d7 in roaraudio for roarclients/roar-config.c


Ignore:
Timestamp:
01/05/13 01:29:03 (11 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

improved roar_env_render_path_r() and added support for it to roar-config

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roar-config.c

    r5810 r5811  
    142142} 
    143143 
     144void print_renderpath(const char * path) { 
     145 char buf[1024]; 
     146 
     147 if ( roar_env_render_path_r(buf, sizeof(buf), path) != 0 ) { 
     148  fprintf(stderr, "Error: Can not render path: %s: %s\n", path, roar_errorstring); 
     149  return; 
     150 } 
     151 printf("%s\n", buf); 
     152} 
     153 
    144154void usage (void) { 
    145155 printf("Usage: roar-config --version\n" 
    146156        "       roar-config --compare-versions VERSIONA OPERATOR VERSIONB\n" 
    147157        "       roar-config [{--output-pc|--output-normal}] [--libs] [--cflags] [LIB]\n" 
    148         "       roar-config [--product PRODUCT] [--provider PROVIDER] [--universal] --path PATH\n"); 
     158        "       roar-config [--product PRODUCT] [--provider PROVIDER] [--universal] --path PATH\n" 
     159        "       roar-config --render-path PATH\n"); 
    149160 
    150161 printf("\nOptions:\n\n"); 
     
    158169        "  --provider PROVIDER - Provider string for --path\n" 
    159170        "  --universal         - Use universal path for --path\n" 
     171        "  --render-path PATH  - Print a rendered path\n" 
    160172        "  --libs              - Show linker flags (-lxxx) needed to link library\n" 
    161173        "  --cflags            - Show compiler flags needed to link library\n" 
     
    199211  } else if ( !strcmp(argv[i], "--path") ) { 
    200212   print_path(argv[++i], null_as_universal, product, provider); 
     213  } else if ( !strcmp(argv[i], "--render-path") ) { 
     214   print_renderpath(argv[++i]); 
    201215  } else if ( !strcmp(argv[i], "--libs") ) { 
    202216   libs   = 1; 
Note: See TracChangeset for help on using the changeset viewer.