From 7abf9911d997b241f1e6b58805140fbfe1f2771d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 6 Feb 2004 14:49:41 +0000 Subject: * Refactoring. --- src/nix-env/names.hh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/nix-env/names.hh (limited to 'src/nix-env/names.hh') diff --git a/src/nix-env/names.hh b/src/nix-env/names.hh new file mode 100644 index 000000000000..0fc9b57d0741 --- /dev/null +++ b/src/nix-env/names.hh @@ -0,0 +1,29 @@ +#ifndef __NAMES_H +#define __NAMES_H + +#include +#include + +#include "util.hh" + + +struct DrvName +{ + string fullName; + string name; + string version; + unsigned int hits; + + DrvName(const string & s); + bool matches(DrvName & n); +}; + + +typedef list DrvNames; + + +int compareVersions(const string & v1, const string & v2); +DrvNames drvNamesFromArgs(const Strings & opArgs); + + +#endif /* !__NAMES_H */ -- cgit 1.4.1