Changeset 5828:d981716ace28 in roaraudio for libroar


Ignore:
Timestamp:
01/06/13 14:53:12 (11 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added a way to list all known paths

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/config.c

    r5823 r5828  
    608608} 
    609609 
     610ssize_t roar_libroar_list_path(const char ** list, size_t len, size_t offset) { 
     611 size_t i; 
     612 ssize_t idx = 0; 
     613 
     614 if ( list == NULL ) { 
     615  roar_err_set(ROAR_ERROR_FAULT); 
     616  return -1; 
     617 } 
     618 
     619 if ( len == 0 ) 
     620  return 0; 
     621 
     622 if ( offset >= (sizeof(__paths)/sizeof(*__paths)) ) 
     623  return 0; 
     624 
     625 for (i = offset; i < (sizeof(__paths)/sizeof(*__paths)); i++) { 
     626  list[idx++] = __paths[i].name; 
     627 } 
     628 
     629 return idx; 
     630} 
     631 
    610632//ll 
Note: See TracChangeset for help on using the changeset viewer.