summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarc <devnull@localhost>1995-12-14 16:42:39 +0000
committermarc <devnull@localhost>1995-12-14 16:42:39 +0000
commit1b6a9c93751802377ef23df97226e8fc5cc92b0e (patch)
tree3126261aabd662f415fb4e2972ae4fd2789d81b7
parent9780fddd5eb31d1b0c252015191549a802c877f2 (diff)
downloadrpm-1b6a9c93751802377ef23df97226e8fc5cc92b0e.tar.gz
rpm-1b6a9c93751802377ef23df97226e8fc5cc92b0e.tar.bz2
rpm-1b6a9c93751802377ef23df97226e8fc5cc92b0e.zip
Initial revision
CVS patchset: 45 CVS date: 1995/12/14 16:42:39
-rw-r--r--lib/var.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/var.c b/lib/var.c
new file mode 100644
index 000000000..a233a97e6
--- /dev/null
+++ b/lib/var.c
@@ -0,0 +1,28 @@
+#include <stdlib.h>
+#include "var.h"
+
+static char *topdir = "/usr/src";
+static char *sourcedir = "/usr/src/SOURCES";
+static char *builddir = "/usr/src/BUILD";
+static char *specdir = "/usr/src/SPECS";
+static char *docdir = "/usr/doc";
+static char *optflags = "-O2 -m486";
+
+char *getVar(int var)
+{
+ switch (var) {
+ case RPMVAR_SOURCEDIR:
+ return sourcedir;
+ case RPMVAR_BUILDDIR:
+ return builddir;
+ case RPMVAR_DOCDIR:
+ return docdir;
+ case RPMVAR_TOPDIR:
+ return topdir;
+ case RPMVAR_SPECDIR:
+ return specdir;
+ case RPMVAR_OPTFLAGS:
+ return optflags;
+ }
+ return NULL;
+}