Switch to unified view

a/src/utils/pathut.cpp b/src/utils/pathut.cpp
1
#ifndef lint
1
#ifndef lint
2
static char rcsid[] = "@(#$Id: pathut.cpp,v 1.21 2008-07-01 08:26:08 dockes Exp $ (C) 2004 J.F.Dockes";
2
static char rcsid[] = "@(#$Id: pathut.cpp,v 1.22 2008-07-01 11:51:51 dockes Exp $ (C) 2004 J.F.Dockes";
3
#endif
3
#endif
4
/*
4
/*
5
 *   This program is free software; you can redistribute it and/or modify
5
 *   This program is free software; you can redistribute it and/or modify
6
 *   it under the terms of the GNU General Public License as published by
6
 *   it under the terms of the GNU General Public License as published by
7
 *   the Free Software Foundation; either version 2 of the License, or
7
 *   the Free Software Foundation; either version 2 of the License, or
...
...
271
    return is;
271
    return is;
272
    string s = is;
272
    string s = is;
273
    if (s[0] != '/') {
273
    if (s[0] != '/') {
274
    char buf[MAXPATHLEN];
274
    char buf[MAXPATHLEN];
275
    if (!getcwd(buf, MAXPATHLEN)) {
275
    if (!getcwd(buf, MAXPATHLEN)) {
276
      return "";
276
      return string();
277
    }
277
    }
278
    s = path_cat(string(buf), s); 
278
    s = path_cat(string(buf), s); 
279
    }
279
    }
280
    return s;
280
    return s;
281
}
281
}
...
...
287
    return is;
287
    return is;
288
    string s = is;
288
    string s = is;
289
    if (s[0] != '/') {
289
    if (s[0] != '/') {
290
    char buf[MAXPATHLEN];
290
    char buf[MAXPATHLEN];
291
    if (!getcwd(buf, MAXPATHLEN)) {
291
    if (!getcwd(buf, MAXPATHLEN)) {
292
      return "";
292
      return string();
293
    }
293
    }
294
    s = path_cat(string(buf), s); 
294
    s = path_cat(string(buf), s); 
295
    }
295
    }
296
    list<string>elems;
296
    list<string>elems;
297
    stringToTokens(s, elems, "/");
297
    stringToTokens(s, elems, "/");