~ubuntu-branches/ubuntu/lucid/graphviz/lucid-security

« back to all changes in this revision

Viewing changes to tools/ast/pathbin.c

  • Committer: Bazaar Package Importer
  • Author(s): Stephen M Moraco
  • Date: 2002-02-05 18:52:12 UTC
  • Revision ID: james.westby@ubuntu.com-20020205185212-8i04c70te00rc40y
Tags: upstream-1.7.16
ImportĀ upstreamĀ versionĀ 1.7.16

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#pragma prototyped
 
2
/*
 
3
 * Glenn Fowler
 
4
 * AT&T Bell Laboratories
 
5
 *
 
6
 * return current PATH
 
7
 */
 
8
 
 
9
#include <ast.h>
 
10
 
 
11
char*
 
12
pathbin(void)
 
13
{
 
14
        register char*  bin;
 
15
 
 
16
        static char*    val;
 
17
 
 
18
        if ((!(bin = getenv("PATH")) || !*bin) && !(bin = val))
 
19
        {
 
20
                bin = "/bin:/usr/bin:/usr/local/bin";
 
21
                val = bin;
 
22
        }
 
23
        return bin;
 
24
}