2016-03-28 11:06:50 +02:00
|
|
|
/*
|
|
|
|
This file is part of actube.
|
|
|
|
|
|
|
|
actube 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 Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
libcapwap is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* @brief Implementation of mavl_create_conststr
|
|
|
|
*/
|
|
|
|
|
2015-05-02 02:02:06 +02:00
|
|
|
|
|
|
|
#include "mavl.h"
|
|
|
|
|
|
|
|
static int cmp(const void *v1,const void*v2)
|
|
|
|
{
|
|
|
|
return strcmp( (char*)v1,(char*)v2);
|
|
|
|
}
|
|
|
|
|
2016-03-28 11:06:50 +02:00
|
|
|
/**
|
|
|
|
* Create a mavl object which holds pointers to strings.
|
|
|
|
* These strings have to be constant. So there is no
|
|
|
|
* free method called, when the mavl object is destroyed
|
|
|
|
* @return The created mavl object or NULL if an error
|
|
|
|
* has occured.
|
|
|
|
*/
|
|
|
|
|
2015-05-02 02:02:06 +02:00
|
|
|
mavl_conststr_t mavl_create_conststr()
|
|
|
|
{
|
|
|
|
return mavl_create(cmp,NULL);
|
|
|
|
}
|