1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2024-11-14 01:45:35 +00:00

MAX_PATH_LENGTH is now a global macro

This commit is contained in:
Antonin Portelli 2014-02-12 18:33:33 +00:00
parent 4659cdb607
commit 05ec53c1bb
2 changed files with 4 additions and 3 deletions

View File

@ -34,6 +34,9 @@
#define __dumb #define __dumb
#endif #endif
// max length for paths
#define MAX_PATH_LENGTH 512
BEGIN_NAMESPACE BEGIN_NAMESPACE
// Environment // Environment

View File

@ -91,13 +91,11 @@ Plot & Plot::operator<<(const PlotCommand &command)
} }
// find gnuplot //////////////////////////////////////////////////////////////// // find gnuplot ////////////////////////////////////////////////////////////////
#define PATH_MAX_SIZE 4096
void Plot::getProgramPath(void) void Plot::getProgramPath(void)
{ {
int i, j, lg; int i, j, lg;
char *path; char *path;
static char buf[PATH_MAX_SIZE]; static char buf[MAX_PATH_LENGTH];
/* Trivial case: try in CWD */ /* Trivial case: try in CWD */
sprintf(buf,"./%s", gnuplotBin_.c_str()) ; sprintf(buf,"./%s", gnuplotBin_.c_str()) ;