/ VCT GetFileLength: returns file size in number of bytes. */ This function is here to be accessible by VECFAM and VMPFAM. */ /
| 137 | /* This function is here to be accessible by VECFAM and VMPFAM. */ |
| 138 | /***********************************************************************/ |
| 139 | int VCTFAM::GetFileLength(PGLOBAL g) |
| 140 | { |
| 141 | if (Split) { |
| 142 | // Get the total file length |
| 143 | char filename[_MAX_PATH]; |
| 144 | PCSZ savfile = To_File; |
| 145 | int i, len = 0; |
| 146 | |
| 147 | // Initialize the array of file structures |
| 148 | if (!Colfn) { |
| 149 | // Prepare the column file name pattern and set Ncol |
| 150 | Colfn = (char*)PlugSubAlloc(g, NULL, _MAX_PATH); |
| 151 | Ncol = ((PVCTDEF)Tdbp->GetDef())->MakeFnPattern(Colfn); |
| 152 | } // endif Colfn |
| 153 | |
| 154 | To_File = filename; |
| 155 | |
| 156 | for (i = 0; i < Ncol; i++) { |
| 157 | snprintf(filename, _MAX_PATH, Colfn, i+1); |
| 158 | len += TXTFAM::GetFileLength(g); |
| 159 | } // endfor i |
| 160 | |
| 161 | To_File = savfile; |
| 162 | return len; |
| 163 | } else |
| 164 | return TXTFAM::GetFileLength(g); |
| 165 | |
| 166 | } // end of GetFileLength |
| 167 | |
| 168 | /***********************************************************************/ |
| 169 | /* Reset read/write position values. */ |
nothing calls this directly
no test coverage detected