* Use a proper namespace.

* Optimise header file usage a bit.
* Compile the parser as C++.
This commit is contained in:
Eelco Dolstra 2006-09-04 21:06:23 +00:00
parent aab8812732
commit 75068e7d75
61 changed files with 650 additions and 268 deletions

View file

@ -1,7 +1,14 @@
#include "dotgraph.hh"
#include "util.hh"
#include "store.hh"
#include "db.hh"
#include <iostream>
#include "dotgraph.hh"
#include "build.hh"
using std::cout;
namespace nix {
static string dotQuote(const string & s)
@ -151,3 +158,6 @@ void printDotGraph(const PathSet & roots)
cout << "}\n";
}
}

View file

@ -1,8 +1,12 @@
#ifndef __DOTGRAPH_H
#define __DOTGRAPH_H
#include "util.hh"
#include "types.hh"
namespace nix {
void printDotGraph(const PathSet & roots);
}
#endif /* !__DOTGRAPH_H */

View file

@ -8,9 +8,17 @@
#include "archive.hh"
#include "shared.hh"
#include "dotgraph.hh"
#include "store.hh"
#include "db.hh"
#include "util.hh"
#include "help.txt.hh"
using namespace nix;
using std::cin;
using std::cout;
typedef void (* Operation) (Strings opFlags, Strings opArgs);
@ -528,7 +536,7 @@ static void opGC(Strings opFlags, Strings opArgs)
if (action != gcDeleteDead) {
for (PathSet::iterator i = result.begin(); i != result.end(); ++i)
cout << *i << endl;
cout << *i << std::endl;
}
}