Skip to content

Commit

Permalink
BB1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
editeodoro committed Oct 6, 2016
1 parent 7f2be64 commit c8fb01a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
12 changes: 1 addition & 11 deletions src/Utilities/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,13 @@
#include <wcslib/wcs.h>
#include <sys/stat.h>
#include <errno.h>
#include <libproc.h>
#include <sys/types.h>
#include <unistd.h>

std::string get_selfpath() {
std::string path = "";
char pathbuf[PROC_PIDPATHINFO_MAXSIZE];
pid_t pid = getpid();
int ret = proc_pidpath (pid, pathbuf, sizeof(pathbuf));
if (ret <= 0) std::cerr << "Could not find the current PID \n";
else path = pathbuf;
return path;
}

std::string get_currentpath() {
std::string path = "";
char pathbuf[1024];
char pathbuf[2048];
if (getcwd(pathbuf, sizeof(pathbuf))==NULL) std::cerr << "Could not find the current PID \n";
else path = pathbuf;
return path;
Expand Down
1 change: 0 additions & 1 deletion src/Utilities/utils.hh
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ template <class T> T Pbcor (PixelInfo::Voxel<T> &v, Header &h);
template <class T> void Pbcor(long x, long y, long z, T &flux, Header &h);

// Function to obtain a linear scale from an angular scale.
std::string get_selfpath();
std::string get_currentpath();
// d is in Mpc and the returned value is in Kpc/arc.
double KpcPerArc(double d);
Expand Down

0 comments on commit c8fb01a

Please sign in to comment.