/ Sum up the sizes of all sub-tables. */ /
| 311 | /* Sum up the sizes of all sub-tables. */ |
| 312 | /***********************************************************************/ |
| 313 | int TDBMUL::GetMaxSize(PGLOBAL g) |
| 314 | { |
| 315 | if (MaxSize < 0) { |
| 316 | int i; |
| 317 | int mxsz; |
| 318 | |
| 319 | if (trace(1)) |
| 320 | htrc("TDBMUL::GetMaxSize: Filenames=%p\n", Filenames); |
| 321 | |
| 322 | if (!Filenames && InitFileNames(g)) |
| 323 | return -1; |
| 324 | |
| 325 | if (Use == USE_OPEN) { |
| 326 | strcpy(g->Message, MSG(MAXSIZE_ERROR)); |
| 327 | return -1; |
| 328 | } else |
| 329 | MaxSize = 0; |
| 330 | |
| 331 | for (i = 0; i < NumFiles; i++) { |
| 332 | Tdbp->SetFile(g, Filenames[i]); |
| 333 | Tdbp->ResetSize(); |
| 334 | |
| 335 | if ((mxsz = Tdbp->GetMaxSize(g)) < 0) { |
| 336 | MaxSize = -1; |
| 337 | return mxsz; |
| 338 | } // endif mxsz |
| 339 | |
| 340 | MaxSize += mxsz; |
| 341 | } // endfor i |
| 342 | |
| 343 | } // endif MaxSize |
| 344 | |
| 345 | return MaxSize; |
| 346 | } // end of GetMaxSize |
| 347 | |
| 348 | /***********************************************************************/ |
| 349 | /* Reset read/write position values. */ |
nothing calls this directly
no test coverage detected