comparison eval.c @ 9879:d54ba41c7e48 libavcodec

Cosmetics: rename 'name' av_strtod() param to 'numstr'. The new name is more expressive.
author stefano
date Sun, 21 Jun 2009 21:37:05 +0000
parents e9d9d946f213
children e934c5f8f4a9
comparison
equal deleted inserted replaced
9878:05a510cd1e3b 9879:d54ba41c7e48
84 84
85 /** strtod() function extended with 'k', 'M', 'G', 'ki', 'Mi', 'Gi' and 'B' 85 /** strtod() function extended with 'k', 'M', 'G', 'ki', 'Mi', 'Gi' and 'B'
86 * postfixes. This allows using f.e. kB, MiB, G and B as a postfix. This 86 * postfixes. This allows using f.e. kB, MiB, G and B as a postfix. This
87 * function assumes that the unit of numbers is bits not bytes. 87 * function assumes that the unit of numbers is bits not bytes.
88 */ 88 */
89 static double av_strtod(const char *name, char **tail) { 89 static double av_strtod(const char *numstr, char **tail) {
90 double d; 90 double d;
91 char *next; 91 char *next;
92 d = strtod(name, &next); 92 d = strtod(numstr, &next);
93 /* if parsing succeeded, check for and interpret postfixes */ 93 /* if parsing succeeded, check for and interpret postfixes */
94 if (next!=name) { 94 if (next!=numstr) {
95 95
96 if(*next >= 'E' && *next <= 'z'){ 96 if(*next >= 'E' && *next <= 'z'){
97 int e= si_prefixes[*next - 'E']; 97 int e= si_prefixes[*next - 'E'];
98 if(e){ 98 if(e){
99 if(next[1] == 'i'){ 99 if(next[1] == 'i'){