| 104 | |
| 105 | |
| 106 | int IniSectionGetInt ( |
| 107 | LPCWSTR lpCachedIniSection, |
| 108 | LPCWSTR lpName, |
| 109 | int iDefault ) |
| 110 | { |
| 111 | WCHAR *p = ( WCHAR * ) lpCachedIniSection; |
| 112 | WCHAR tch[256]; |
| 113 | int ich; |
| 114 | int i; |
| 115 | if ( p ) { |
| 116 | lstrcpy ( tch, lpName ); |
| 117 | lstrcat ( tch, L"=" ); |
| 118 | ich = lstrlen ( tch ); |
| 119 | while ( *p ) { |
| 120 | if ( StrCmpNI ( p, tch, ich ) == 0 ) { |
| 121 | if ( swscanf ( p + ich, L"%i", &i ) == 1 ) { |
| 122 | return ( i ); |
| 123 | } else { |
| 124 | return ( iDefault ); |
| 125 | } |
| 126 | } else { |
| 127 | p = StrEnd ( p ) + 1; |
| 128 | } |
| 129 | } |
| 130 | } |
| 131 | return ( iDefault ); |
| 132 | } |
| 133 | |
| 134 | |
| 135 | BOOL IniSectionSetString ( LPWSTR lpCachedIniSection, LPCWSTR lpName, LPCWSTR lpString ) |
no outgoing calls
no test coverage detected