21#define ACCESS(path,mode) _access((path),(mode))
22#define MKDIR(path) _mkdir((path))
26#define ACCESS(path,mode) access((path),(mode))
27#define MKDIR(path) mkdir((path), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH)
36void DispPro(
const double pro,
const int step)
39 for (j = 0; j < 77; j++)
41 for (j = 0; j < lround(pro/2); j++)
43 for (j = 1; j <= 50-lround(pro/2); j++)
45 fprintf(stdout,
" %6.2f%% STEP=%-8d", pro, step);
59 if(0 == ACCESS(pPath,2))
62 const char* pCur = pPath;
63 char tmpPath[FILENAME_MAX+40];
64 memset(tmpPath,0,
sizeof(tmpPath));
69 tmpPath[pos++] = *(pCur-1);
71 if(*pCur==
'/' || *pCur==
'\0')
73 if(0!=ACCESS(tmpPath,0) && strlen(tmpPath)>0)
79 if(0 == ACCESS(pPath,2))
int CreateDir(const char *pPath)
This is a function that recursively creates folders.
void DispPro(const double pro, const int step)
This function print a progress bar on one line of standard output.