summaryrefslogtreecommitdiff
path: root/dviware/quicspool/src/profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'dviware/quicspool/src/profile.c')
-rw-r--r--dviware/quicspool/src/profile.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/dviware/quicspool/src/profile.c b/dviware/quicspool/src/profile.c
new file mode 100644
index 0000000000..7f6440c539
--- /dev/null
+++ b/dviware/quicspool/src/profile.c
@@ -0,0 +1,40 @@
+#ifndef lint
+static char *rcs = "$Header: profile.c,v 1.1 88/01/15 13:05:09 simpson Rel $";
+#endif
+/*
+$Log: profile.c,v $
+ * Revision 1.1 88/01/15 13:05:09 simpson
+ * initial release
+ *
+ * Revision 0.1 87/12/11 18:31:15 simpson
+ * beta test
+ *
+*/
+/* Profile(3) related routines */
+
+#include <stdio.h>
+#include <local/profile.h>
+
+/* Returns the value of a binding in the configuration stanza with the key
+ * equal to the formal parameter name. It returns NULL if unsuccessful.
+ */
+PROFILE_VALUE *getbindingvalue(key)
+char *key;
+{
+ FILE *config;
+ static PROFILE_STANZA *s;
+ PROFILE_BINDING *b;
+
+ if (!s)
+ if (config = fopen("configuration", "r")) {
+ if (!(s = profile_read_stanza(config))) {
+ (void)fclose(config);
+ return NULL;
+ }
+ (void)fclose(config);
+ } else
+ return NULL;
+ if (b = profile_has_binding(s, key))
+ return b->value;
+ return NULL;
+}