f354f53435
Including config.h is necessary to get e.g. the _GNU_SOURCE define and any other definitions that autoconf declares. Hence, config.h needs to be included as the first header in each file. This is done either via: 1. Including "common.h" (i3bar) 2. Including "libi3.h" 3. Including "all.h" (i3) 4. Including <config.h> directly Also remove now-unused I3__FILE__, add copyright/license statement where missing and switch include/all.h to #pragma once.
26 lines
787 B
C
26 lines
787 B
C
/*
|
|
* vim:ts=4:sw=4:expandtab
|
|
*
|
|
* i3bar - an xcb-based status- and ws-bar for i3
|
|
* © 2010 Axel Wagner and contributors (see also: LICENSE)
|
|
*
|
|
* parse_json_header.c: Parse the JSON protocol header to determine
|
|
* protocol version and features.
|
|
*
|
|
*/
|
|
#pragma once
|
|
|
|
#include <config.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
/**
|
|
* Parse the JSON protocol header to determine protocol version and features.
|
|
* In case the buffer does not contain a valid header (invalid JSON, or no
|
|
* version field found), the 'correct' field of the returned header is set to
|
|
* false. The amount of bytes consumed by parsing the header is returned in
|
|
* *consumed (if non-NULL).
|
|
*
|
|
*/
|
|
void parse_json_header(i3bar_child *child, const unsigned char *buffer, int length, unsigned int *consumed);
|