@file dictionary.c
@author N. Devillard
@date Sep 2007
- @version $Revision: 1.27 $
@brief Implements a dictionary for string variables.
This module implements a simple dictionary object, i.e. a list
/*--------------------------------------------------------------------------*/
/*
- $Id: dictionary.c,v 1.27 2007-11-23 21:39:18 ndevilla Exp $
- $Revision: 1.27 $
*/
/*---------------------------------------------------------------------------
Includes
---------------------------------------------------------------------------*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif /* HAVE_CONFIG_H */
+
#include <atalk/dictionary.h>
#include <atalk/compat.h>
dictionary object, you should not try to free it or modify it.
*/
/*--------------------------------------------------------------------------*/
-char * dictionary_get(dictionary * d, char *section, char * key, char * def)
+const char * dictionary_get(const dictionary * d, const char *section, const char * key, const char * def)
{
unsigned hash ;
int i ;
int i ;
unsigned hash ;
- if (d==NULL || key==NULL) return -1 ;
+ if (d==NULL || section==NULL) return -1 ;
/* Compute hash for this key */
hash = dictionary_hash(makekey(section, key));