/* This file is part of the Zebra server.
- Copyright (C) 1995-2008 Index Data
+ Copyright (C) 1994-2009 Index Data
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
return 0;
}
+const char *res_get_named(Res r, const char *resName, const char *name)
+{
+ //This part relies on dynamic stack allocation cus I'm lazy
+ //resName.name = strlen(resName) + 1 + strlen(name) + (space for \0)
+ unsigned int resLen = strlen(resName) + strlen(name) + 2;
+ char wholeName[resLen];
+ memset(wholeName, NULL, resLen);
+
+ strcat(wholeName, resName);
+ strcat(wholeName, ".");
+ strcat(wholeName, name);
+
+ const char *nr = res_get(r, wholeName);
+ return nr;
+}
+
void res_set(Res r, const char *name, const char *value)
{
struct res_entry *re;
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab