Changeset 5833:b08528d5bfa0 in roaraudio


Ignore:
Timestamp:
01/06/13 16:25:14 (8 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

strip double slashes to prettify paths

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/config.c

    r5832 r5833  
    623623} 
    624624 
     625void __strip_double_slashes(char * p) { 
     626 const char * in = p; 
     627 
     628 for (; *in; in++, p++) { 
     629  *p = *in; 
     630  if ( *in == '/' ) 
     631   for (; in[1] == '/'; in++); 
     632 } 
     633 
     634 *p = 0; 
     635} 
     636 
    625637char * roar_libroar_get_path(const char * name, int null_as_universal, const char * product, const char * provider) { 
    626638 const struct pathinfo * path; 
     
    667679 *p = 0; 
    668680 
     681 __strip_double_slashes(ret); 
     682 
    669683 return ret; 
    670684} 
Note: See TracChangeset for help on using the changeset viewer.