Compile before commit, compile before commit, compile......
This commit is contained in:
@@ -14,6 +14,7 @@ using namespace std;
|
|||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
#include <cstring>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include "StdString.h"
|
#include "StdString.h"
|
||||||
@@ -52,13 +53,14 @@ const CString GetPath(const CString& ID)
|
|||||||
char cwd[MAXPATHLEN];
|
char cwd[MAXPATHLEN];
|
||||||
char path[MAXPATHLEN];
|
char path[MAXPATHLEN];
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
size_t temp;
|
||||||
|
|
||||||
getwd(cwd);
|
getwd(cwd);
|
||||||
printf("Enter a path (relative or absolute) to the install files\n"
|
printf("Enter a path (relative or absolute) to the install files\n"
|
||||||
"The current working directory is: %s\n"
|
"The current working directory is: %s\n"
|
||||||
"> ", cwd);
|
"> ", cwd);
|
||||||
ptr = fgets(path, path, stdin);
|
ptr = fgets(path, MAXPATHLEN, stdin);
|
||||||
if ((size_t temp = strlen(path)))
|
if ((temp = strlen(path)))
|
||||||
{
|
{
|
||||||
if (path[temp - 1] == '\n')
|
if (path[temp - 1] == '\n')
|
||||||
path[temp - 1] = '\000';
|
path[temp - 1] = '\000';
|
||||||
|
|||||||
Reference in New Issue
Block a user