source: lib/json_util.h @ d7969a1

Last change on this file since d7969a1 was 5ebff60, checked in by dequis <dx@…>, at 2015-02-20T22:50:54Z

Reindent everything to K&R style with tabs

Used uncrustify, with the configuration file in ./doc/uncrustify.cfg

Commit author set to "Indent <please@…>" so that it's easier to
skip while doing git blame.

  • Property mode set to 100644
File size: 2.1 KB
RevLine 
[c08d201]1/***************************************************************************\
2*                                                                           *
3*  BitlBee - An IRC to IM gateway                                           *
4*  Helper functions for json.c                                              *
5*                                                                           *
[0e788f5]6*  Copyright 2012-2012 Wilmer van der Gaast <wilmer@gaast.net>              *
[c08d201]7*                                                                           *
[4f7255d]8*  This program is free software; you can redistribute it and/or modify     *
9*  it under the terms of the GNU General Public License as published by     *
10*  the Free Software Foundation; either version 2 of the License, or        *
11*  (at your option) any later version.                                      *
[c08d201]12*                                                                           *
[4f7255d]13*  This program is distributed in the hope that it will be useful,          *
[c08d201]14*  but WITHOUT ANY WARRANTY; without even the implied warranty of           *
[4f7255d]15*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            *
16*  GNU General Public License for more details.                             *
[c08d201]17*                                                                           *
[4f7255d]18*  You should have received a copy of the GNU General Public License along  *
19*  with this program; if not, write to the Free Software Foundation, Inc.,  *
20*  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.              *
[c08d201]21*                                                                           *
22****************************************************************************/
23
24#include "json.h"
25
[8e3b7ac]26#define JSON_O_FOREACH(o, k, v) \
27        char *k; json_value *v; int __i; \
[5ebff60]28        for (__i = 0; (__i < (o)->u.object.length) && \
29             (k = (o)->u.object.values[__i].name) && \
30             (v = (o)->u.object.values[__i].value); \
31             __i ++)
[8e3b7ac]32
[5ebff60]33json_value *json_o_get(const json_value *obj, const json_char *name);
34const char *json_o_str(const json_value *obj, const json_char *name);
35char *json_o_strdup(const json_value *obj, const json_char *name);
Note: See TracBrowser for help on using the repository browser.