Skip to content

Commit

Permalink
liboconfig: Relicensed to MIT license.
Browse files Browse the repository at this point in the history
Florian Forster relicensed the code in collectd's Git commit
633c3966f770e4d46651a2fe219a18d8a9907a9f.

<collectd/collectd@633c396>
  • Loading branch information
tokkee committed Jul 29, 2014
1 parent 0e369b5 commit a075de6
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 438 deletions.
357 changes: 17 additions & 340 deletions src/liboconfig/COPYING

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/liboconfig/aux_types.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef AUX_TYPES_H
#define AUX_TYPES_H 1
#ifndef SDB_OCONFIG_AUX_TYPES_H
#define SDB_OCONFIG_AUX_TYPES_H 1

struct statement_list_s
{
Expand All @@ -15,4 +15,4 @@ struct argument_list_s
};
typedef struct argument_list_s argument_list_t;

#endif /* AUX_TYPES_H */
#endif /* SDB_OCONFIG_AUX_TYPES_H */
30 changes: 18 additions & 12 deletions src/liboconfig/oconfig.c
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
/**
* oconfig - src/oconfig.c
* Copyright (C) 2006,2007 Florian octo Forster <octo at verplant.org>
* SysDB - src/liboconfig/oconfig.c
* Based on collectd's liboconfig, <http://collectd.org>
* Copyright (C) 2006,2007 Florian Forster
*
* This program 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; only version 2 of the License is applicable.
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* This program 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.
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/

#if HAVE_CONFIG_H
Expand Down
42 changes: 24 additions & 18 deletions src/liboconfig/oconfig.h
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
#ifndef OCONFIG_H
#define OCONFIG_H 1

#include <stdio.h>

/**
* oconfig - src/oconfig.h
* Copyright (C) 2006-2009 Florian octo Forster <octo at verplant.org>
* SysDB - src/liboconfig/oconfig.h
* Based on collectd's oconfig, <http://collectd.org>
* Copyright (C) 2006-2009 Florian Forster
*
* This program 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; only version 2 of the License is applicable.
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* This program 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.
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/

#ifndef SDB_OCONFIG_OCONFIG_H
#define SDB_OCONFIG_OCONFIG_H 1

#include <stdio.h>

/*
* Types
*/
Expand Down Expand Up @@ -66,4 +72,4 @@ void oconfig_free (oconfig_item_t *ci);
/*
* vim: shiftwidth=2:tabstop=8:softtabstop=2
*/
#endif /* OCONFIG_H */
#endif /* SDB_OCONFIG_OCONFIG_H */
30 changes: 18 additions & 12 deletions src/liboconfig/parser.y
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
/**
* oconfig - src/parser.y
* Copyright (C) 2007,2008 Florian octo Forster <octo at verplant.org>
* SysDB - src/liboconfig/parser.y
* Based on collectd's oconfig, <http://collectd.org>
* Copyright (C) 2007,2008 Florian Forster
*
* This program 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; only version 2 of the License is applicable.
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* This program 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.
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/

%{
Expand Down
32 changes: 19 additions & 13 deletions src/liboconfig/scanner.l
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
/**
* oconfig - src/scanner.l
* Copyright (C) 2007 Florian octo Forster <octo at verplant.org>
* Copyright (C) 2008 Sebastian tokkee Harl <sh at tokkee.org>
* SysDB - src/liboconfig/scanner.l
* Based on collectd's liboconfig, <http://collectd.org>
* Copyright (C) 2007 Florian Forster
* Copyright (C) 2008 Sebastian Harl
*
* This program 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; only version 2 of the License is applicable.
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* This program 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.
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/

%{
Expand Down
42 changes: 17 additions & 25 deletions src/liboconfig/utils.c
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
/**
* oconfig - src/utils.h
* Copyright (C) 2012 2012 Sebastian 'tokkee' Harl <sh@tokkee.org>
* SysDB - src/liboconfig/utils.c
* Copyright (C) 2012 Sebastian 'tokkee' Harl <sh@tokkee.org>
*
* This program 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; only version 2 of the License is applicable.
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* This program 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.
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/

#ifndef OCONFIG_UTILS_H
#define OCONFIG_UTILS_H 1

#include "oconfig.h"

#ifdef __cplusplus
extern "C" {
#endif

int
oconfig_get_string(oconfig_item_t *ci, char **value)
{
Expand Down Expand Up @@ -67,11 +65,5 @@ oconfig_get_boolean(oconfig_item_t *ci, _Bool *value)
return 0;
} /* oconfig_get_boolean */

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /* OCONFIG_UTILS_H */

/* vim: set tw=78 sw=4 ts=4 noexpandtab : */

35 changes: 20 additions & 15 deletions src/liboconfig/utils.h
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
/**
* oconfig - src/utils.h
* Copyright (C) 2012 2012 Sebastian 'tokkee' Harl <sh@tokkee.org>
* SysDB - src/liboconfig/utils.h
* Copyright (C) 2012 Sebastian 'tokkee' Harl <sh@tokkee.org>
*
* This program 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; only version 2 of the License is applicable.
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* This program 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.
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/

#ifndef OCONFIG_UTILS_H
#define OCONFIG_UTILS_H 1
#ifndef SDB_OCONFIG_UTILS_H
#define SDB_OCONFIG_UTILS_H 1

#include "oconfig.h"

Expand All @@ -44,7 +49,7 @@ oconfig_get_boolean(oconfig_item_t *ci, _Bool *value);
} /* extern "C" */
#endif

#endif /* OCONFIG_UTILS_H */
#endif /* SDB_OCONFIG_UTILS_H */

/* vim: set tw=78 sw=4 ts=4 noexpandtab : */

0 comments on commit a075de6

Please sign in to comment.