Rev 161 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 161 | Rev 192 | ||
|---|---|---|---|
| Line 1036... | Line 1036... | ||
| 1036 | continue; // skip empty slots | 1036 | continue; // skip empty slots | 
| 1037 | 1037 | ||
| 1038 |          // does this key belong to the section we want ? if so, dump it | 1038 |          // does this key belong to the section we want ? if so, dump it | 
| 1039 | if ((wcsncmp (entry->key, section_name, length) == 0) && (entry->key[length] == INI_SECTION_SEPARATOR)) | 1039 | if ((wcsncmp (entry->key, section_name, length) == 0) && (entry->key[length] == INI_SECTION_SEPARATOR)) | 
| 1040 |          { | 1040 |          { | 
| 1041 |             // if  | 1041 |             // if value starts or ends with a space, enclose it between quotes, else don't | 
| 1042 | if ((entry->value[0] != 0) | 1042 | if ((entry->value[0] != 0) | 
| 1043 | && (iswspace (entry->value[0]) || iswspace (entry->value[wcslen (entry->value) - 1]))) | 1043 | && (iswspace (entry->value[0]) || iswspace (entry->value[wcslen (entry->value) - 1]))) | 
| 1044 | fwprintf (fp, L"%s = \"%s\"\n", &entry->key[length + 1], entry->value); | 1044 | fwprintf (fp, L"%s = \"%s\"\n", &entry->key[length + 1], entry->value); | 
| 1045 |             else | 1045 |             else | 
| 1046 | fwprintf (fp, L"%s = %s\n", &entry->key[length + 1], entry->value); | 1046 | fwprintf (fp, L"%s = %s\n", &entry->key[length + 1], entry->value); |