(path)
| 168 | } |
| 169 | |
| 170 | long |
| 171 | freediskspace(path) |
| 172 | char *path; |
| 173 | { |
| 174 | int drive = 0; |
| 175 | struct { |
| 176 | long freal; /*free allocation units*/ |
| 177 | long total; /*total number of allocation units*/ |
| 178 | long bps; /*bytes per sector*/ |
| 179 | long pspal; /*physical sectors per allocation unit*/ |
| 180 | } freespace; |
| 181 | if (path[0] && path[1] == ':') |
| 182 | drive = (toupper(path[0]) - 'A') + 1; |
| 183 | if (Dfree(&freespace, drive) < 0) |
| 184 | return -1; |
| 185 | return freespace.freal * freespace.bps * freespace.pspal; |
| 186 | } |
| 187 | |
| 188 | /* |
| 189 | * Functions to get filenames using wildcards |
nothing calls this directly
no outgoing calls
no test coverage detected