Changeset 5482:ba865ae62928 in roaraudio
- Timestamp:
- 04/25/12 09:46:25 (11 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r5481 r5482 16 16 * Work around bugs in win32 while using stdvios (pr0). 17 17 * Added support to load plugins on win32 (pr0). 18 * Added support for quotes strings to kv split and 19 roardl para argument splitting (pr0). 18 20 19 21 v. 1.0beta0 - Fri Mar 16 2012 19:39 CET -
libroar/keyval.c
r5381 r5482 65 65 } 66 66 67 static inline void skip_char(char * str) { 68 memmove(str, str+1, roar_mm_strlen(str)); 69 } 70 67 71 ssize_t roar_keyval_split (struct roar_keyval ** kv, char * str, const char * fdel, const char * kdel, int quotes) { 68 72 struct roar_keyval * kvs; … … 75 79 if ( kv == NULL || str == NULL ) { 76 80 roar_err_set(ROAR_ERROR_FAULT); 77 return -1;78 }79 80 // we currently do not support quotes81 if ( quotes ) {82 roar_err_set(ROAR_ERROR_NOTSUP);83 81 return -1; 84 82 } … … 95 93 if ( *sp == quote ) 96 94 quote = 0; 95 } else if ( quotes && (*sp == '\'' || *sp == '\"') ) { 96 quote = *sp; 97 97 } else { 98 98 if ( last_was_seg ) { … … 122 122 123 123 for (sp = str; *sp != 0; sp++) { 124 if ( quote ) { 125 if ( *sp == quote ) { 126 skip_char(sp); 127 quote = 0; 128 } else { 129 continue; 130 } 131 } else if ( quotes && (*sp == '\'' || *sp == '\"') ) { 132 quote = *sp; 133 skip_char(sp); 134 continue; 135 } 136 124 137 if ( last_was_seg ) { 125 138 if ( is_in(*sp, fdel) ) { … … 128 141 } else { 129 142 last_was_seg = 1; 130 if ( is_in(*sp, kdel) ) {143 if ( kvs[pos].value == NULL && is_in(*sp, kdel) ) { 131 144 *sp = 0; 132 145 kvs[pos].value = sp+1; -
libroar/roardl.c
r5481 r5482 95 95 } 96 96 97 argc = roar_keyval_split(&(ret->argv), ret->args_store, NULL, NULL, 0);97 argc = roar_keyval_split(&(ret->argv), ret->args_store, NULL, NULL, 1); 98 98 if ( argc == -1 ) { 99 99 err = roar_error; -
roard/hwmixer.c
r5381 r5482 132 132 133 133 if ( subnames != NULL ) { 134 subnamekvlen = roar_keyval_split(&subnamekv, subnames, ",;", "=:", 0);134 subnamekvlen = roar_keyval_split(&subnamekv, subnames, ",;", NULL, 1); 135 135 } 136 136
Note: See TracChangeset
for help on using the changeset viewer.