MCPcopy Create free account
hub / github.com/NetHack/NetHack / freediskspace

Function freediskspace

outdated/sys/atari/tos.c:170–186  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

168}
169
170long
171freediskspace(path)
172char *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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected