/ This function returns size catalog information. */ /
| 217 | /* This function returns size catalog information. */ |
| 218 | /***********************************************************************/ |
| 219 | int RELDEF::GetSizeCatInfo(PCSZ what, PCSZ sdef) |
| 220 | { |
| 221 | char c; |
| 222 | PCSZ s; |
| 223 | int i, n= 0; |
| 224 | |
| 225 | if (!(s= Hc->GetStringOption(what))) |
| 226 | s= sdef; |
| 227 | |
| 228 | if ((i= sscanf(s, " %d %c ", &n, &c)) == 2) |
| 229 | switch (toupper(c)) { |
| 230 | case 'M': |
| 231 | n *= 1024; |
| 232 | // fall through |
| 233 | case 'K': |
| 234 | n *= 1024; |
| 235 | } // endswitch c |
| 236 | |
| 237 | return n; |
| 238 | } // end of GetSizeCatInfo |
| 239 | |
| 240 | /***********************************************************************/ |
| 241 | /* This function sets char table information in buf. */ |
nothing calls this directly
no test coverage detected