diff --git a/docs/spice_style.txt b/docs/spice_style.txt index 7de4a439..b042d794 100644 --- a/docs/spice_style.txt +++ b/docs/spice_style.txt @@ -307,3 +307,36 @@ char *array[] = { "item_2", "item_3", }; + +Header inclusion +---------------- + +Headers should be included in this order + +[source,c] +---- +#include +#include +#include +#include + +#include "spice_server.h" +---- + +(note the empty line between no spice-server and spice-server headers) + +Also in source (no header) files you must include `config.h` at the beginning so should start (beside comments and copyright) with + +[source,c] +---- +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#include + +#include "spice_server.h" +----