#include <stdio.h>#include <string.h>#include <ctype.h>#include <math.h>#include <stdlib.h>#include <unistd.h>#include "marcmd.h"#include "config.h"#include "marglobals.h"#include "esd.h"#include "command.h"
Go to the source code of this file.
Defines | |
| #define | TOUPPER(a) for (j=strlen(a), i=0;i<j;i++ ) a[i] = toupper( a[i] ) |
| #define | TOLOWER(a) for (j=strlen(a), i=0;i<j;i++ ) a[i] = tolower( a[i] ) |
Functions | |
| float | GetDiskSpace (char *) |
| void | RemoveBlanks (char *) |
Variables | |
| char | scan_in_progress |
| static float | dfree |
| static float | disk |
| static int | first = 1 |
Definition at line 39 of file command.cpp.
Definition at line 38 of file command.cpp.
Referenced by Command::exec_command().
| float GetDiskSpace | ( | char * | dir | ) |
Definition at line 90 of file mardisk.c.
Referenced by Command::exec_command(), and MarHW::NotEnoughDiskSpace().
{
float free= 999999.0 ;
if (strlen(dir) < 1 ) return( free );
#ifdef __sgi
if(statfs(dir, &disk, sizeof disk, 0) != 0) return( free );
#elif (__linux__ || __hpux || __DARWIN__)
if(statfs(dir, &disk) != 0) return( free );
#elif ( SUN )
if(statvfs(dir, &disk) != 0) return( free );
#elif __osf__
if(statfs(dir, &disk, sizeof disk ) != 0 )return( free );
#endif
#ifdef __osf__
free = (float)disk.f_bavail * (float)disk.f_fsize / 1024000.;
#else
if(disk.f_blocks > 0)
free = (float)disk.f_bfree * (float)disk.f_bsize / 1024000. ;
#endif
return( free );
}
| void RemoveBlanks | ( | char * | ) |
Definition at line 113 of file utils.c.
Referenced by Command::BadInput(), GetConfig(), Getmar345Header(), GetmarNBHeader(), and Command::TestDirectory().
float dfree [static] |
Definition at line 48 of file command.cpp.
Referenced by Command::exec_command(), and MarHW::NotEnoughDiskSpace().
| float disk |
Definition at line 48 of file command.cpp.
Referenced by Command::exec_command(), GetDiskSpace(), IsNFS(), and MarHW::NotEnoughDiskSpace().
int first = 1 [static] |
Definition at line 59 of file command.cpp.
Referenced by cbf_write_category(), and Command::exec_command().
| char scan_in_progress |
Definition at line 56 of file marxf.cpp.
Referenced by Command::exec_command(), MarHW::get_status(), MarHW::mar_progress(), MarXF::mar_start_scan_readout(), MarHW::marTask(), MarNet::net_data(), MarXF::output_image(), and MarXF::Transform().
1.7.3