Various import fixes caused by clang-format

Added format protection block to avoid re-ordering of header files
according to formatting rules.
This commit is contained in:
icex2
2019-10-22 21:04:45 +02:00
parent c3bc8782f4
commit b6e588116d
53 changed files with 211 additions and 64 deletions
+2
View File
@@ -1,6 +1,8 @@
#ifndef IMPORTS_AVS_EA3_H #ifndef IMPORTS_AVS_EA3_H
#define IMPORTS_AVS_EA3_H #define IMPORTS_AVS_EA3_H
#include "imports/avs.h"
void ea3_boot(struct property_node *conf); void ea3_boot(struct property_node *conf);
void ea3_shutdown(void); void ea3_shutdown(void);
+4 -1
View File
@@ -1,8 +1,11 @@
#include <windows.h> /* Usermode API */ #include <windows.h> /* Usermode API */
// clang-format off
// Don't format because the order is important here
#include <ntdef.h>
#include <devioctl.h> #include <devioctl.h>
#include <ntddser.h> #include <ntddser.h>
#include <ntdef.h> /* Kernel-mode API for ioctls */ // clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
+4 -2
View File
@@ -1,8 +1,10 @@
// clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <ntdef.h>
#include <devioctl.h> #include <devioctl.h>
#include <ntddser.h> #include <ntddser.h>
#include <ntdef.h> // clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
+4 -1
View File
@@ -1,8 +1,11 @@
#include <windows.h> #include <windows.h>
// clang-format off
// Don't format because the order is important here
#include <ntdef.h>
#include <devioctl.h> #include <devioctl.h>
#include <ntddser.h> #include <ntddser.h>
#include <ntdef.h> // clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
+4 -1
View File
@@ -1,5 +1,8 @@
#include <commctrl.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <commctrl.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
+3
View File
@@ -1,5 +1,8 @@
// clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <windowsx.h> #include <windowsx.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
+4 -1
View File
@@ -1,6 +1,9 @@
// clang-format off
// Don't format because the order is important here
#include <windows.h>
#include <commctrl.h> #include <commctrl.h>
#include <wchar.h> #include <wchar.h>
#include <windows.h> // clang-format on
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
+4 -1
View File
@@ -1,6 +1,9 @@
// clang-format off
// Don't format because the order is important here
#include <windows.h>
#include <commctrl.h> #include <commctrl.h>
#include <commdlg.h> #include <commdlg.h>
#include <windows.h> // clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
+4 -1
View File
@@ -1,7 +1,10 @@
// clang-format off
// Don't format because the order is important here
#include <windows.h>
#include <commctrl.h> #include <commctrl.h>
#include <wchar.h> #include <wchar.h>
#include <windows.h>
#include <windowsx.h> #include <windowsx.h>
// clang-format on
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
+4 -1
View File
@@ -1,5 +1,8 @@
#include <commctrl.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <commctrl.h>
// clang-format on
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
+4 -2
View File
@@ -1,8 +1,10 @@
// clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <devioctl.h> #include <devioctl.h>
#include <ntddser.h>
#include <ntdef.h> #include <ntdef.h>
#include <ntddser.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
+4 -2
View File
@@ -1,8 +1,10 @@
// clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <devioctl.h> #include <devioctl.h>
#include <ntddser.h>
#include <ntdef.h> #include <ntdef.h>
#include <ntddser.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
+4 -1
View File
@@ -1,5 +1,8 @@
#include <setupapi.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <setupapi.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <wchar.h> #include <wchar.h>
+4 -2
View File
@@ -1,10 +1,12 @@
#define LOG_MODULE "spike" #define LOG_MODULE "spike"
// clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <devioctl.h> #include <devioctl.h>
#include <ntddser.h>
#include <ntdef.h> #include <ntdef.h>
#include <ntddser.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
+4 -2
View File
@@ -1,10 +1,12 @@
#define LOG_MODULE "usbmem" #define LOG_MODULE "usbmem"
// clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <devioctl.h> #include <devioctl.h>
#include <ntddser.h>
#include <ntdef.h> #include <ntdef.h>
#include <ntddser.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <string.h> #include <string.h>
+4 -1
View File
@@ -1,5 +1,8 @@
#include <dbt.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <dbt.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
+4 -1
View File
@@ -1,5 +1,8 @@
#include <dbt.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <dbt.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
+4 -1
View File
@@ -1,8 +1,11 @@
#define LOG_MODULE "ezusb-emu-device" #define LOG_MODULE "ezusb-emu-device"
// clang-format off
// Don't format because the order is important here
#include <windows.h>
#include <setupapi.h> #include <setupapi.h>
#include <usb100.h> #include <usb100.h>
#include <windows.h> // clang-format on
#include <string.h> #include <string.h>
+4 -1
View File
@@ -1,5 +1,8 @@
#include <setupapi.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <setupapi.h>
// clang-format on
#include "ezusb/ezusb.h" #include "ezusb/ezusb.h"
#include "ezusb/ezusbsys2.h" #include "ezusb/ezusbsys2.h"
+4 -1
View File
@@ -1,7 +1,10 @@
#define LOG_MODULE "ezusb2-dbg" #define LOG_MODULE "ezusb2-dbg"
#include <usb100.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <usb100.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdio.h> #include <stdio.h>
+4 -1
View File
@@ -1,8 +1,11 @@
#define LOG_MODULE "ezusb2-emu-device" #define LOG_MODULE "ezusb2-emu-device"
// clang-format off
// Don't format because the order is important here
#include <windows.h>
#include <setupapi.h> #include <setupapi.h>
#include <usb100.h> #include <usb100.h>
#include <windows.h> // clang-format on
#include <string.h> #include <string.h>
+4 -1
View File
@@ -1,5 +1,8 @@
#include <setupapi.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <setupapi.h>
// clang-format on
#include "ezusb/ezusb.h" #include "ezusb/ezusb.h"
+5 -2
View File
@@ -1,6 +1,9 @@
#include <hidsdi.h> // clang-format off
#include <setupapi.h> // Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <setupapi.h>
#include <hidsdi.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
+4 -1
View File
@@ -1,8 +1,11 @@
#ifndef GENINPUT_DEV_LIST_H #ifndef GENINPUT_DEV_LIST_H
#define GENINPUT_DEV_LIST_H #define GENINPUT_DEV_LIST_H
#include <setupapi.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <setupapi.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <wchar.h> #include <wchar.h>
+4 -1
View File
@@ -1,5 +1,8 @@
#include <hidsdi.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <hidsdi.h>
// clang-format on
#include <stdlib.h> #include <stdlib.h>
+4 -1
View File
@@ -6,8 +6,11 @@
#include <string.h> #include <string.h>
#include <wchar.h> #include <wchar.h>
#include <hidsdi.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <hidsdi.h>
// clang-format on
#include "geninput/hid-generic-strings.h" #include "geninput/hid-generic-strings.h"
#include "geninput/hid-generic.h" #include "geninput/hid-generic.h"
+4 -1
View File
@@ -1,7 +1,10 @@
#define LOG_MODULE "hid-generic" #define LOG_MODULE "hid-generic"
#include <hidsdi.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <hidsdi.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
+4 -1
View File
@@ -1,7 +1,10 @@
#define LOG_MODULE "hid-generic" #define LOG_MODULE "hid-generic"
#include <hidsdi.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <hidsdi.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h> #include <stddef.h>
+4 -1
View File
@@ -1,7 +1,10 @@
#define LOG_MODULE "hid-generic" #define LOG_MODULE "hid-generic"
#include <hidsdi.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <hidsdi.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
+4 -1
View File
@@ -1,7 +1,10 @@
#define LOG_MODULE "hid-generic" #define LOG_MODULE "hid-generic"
#include <hidsdi.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <hidsdi.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
+4 -1
View File
@@ -1,5 +1,8 @@
#include <dbt.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <dbt.h>
// clang-format on
#include <string.h> #include <string.h>
+4 -1
View File
@@ -1,8 +1,11 @@
#define LOG_MODULE "kbd" #define LOG_MODULE "kbd"
// clang-format off
// Don't format because the order is important here
#include <windows.h>
#include <hidsdi.h> #include <hidsdi.h>
#include <initguid.h> #include <initguid.h>
#include <windows.h> // clang-format on
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
+4 -1
View File
@@ -1,7 +1,10 @@
#define LOG_MODULE "mouse" #define LOG_MODULE "mouse"
#include <initguid.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <initguid.h>
// clang-format on
#include <malloc.h> #include <malloc.h>
#include <stddef.h> #include <stddef.h>
+4 -1
View File
@@ -1,5 +1,8 @@
#include <dbt.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <dbt.h>
// clang-format on
#include <stdint.h> #include <stdint.h>
+4 -1
View File
@@ -1,7 +1,10 @@
#define LOG_MODULE "pacdrive" #define LOG_MODULE "pacdrive"
#include <hidsdi.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <hidsdi.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
+7
View File
@@ -1,5 +1,12 @@
#include <windows.h> /* Usermode API */ #include <windows.h> /* Usermode API */
// clang-format off
// Don't format because the order is important here
#include <ntdef.h>
#include <devioctl.h>
#include <ntddser.h>
// clang-format on
#include <devioctl.h> #include <devioctl.h>
#include <ntddser.h> #include <ntddser.h>
#include <ntdef.h> /* Kernel-mode API for ioctls */ #include <ntdef.h> /* Kernel-mode API for ioctls */
+4 -1
View File
@@ -1,8 +1,11 @@
#ifndef HOOKLIB_SETUPAPI_H #ifndef HOOKLIB_SETUPAPI_H
#define HOOKLIB_SETUPAPI_H #define HOOKLIB_SETUPAPI_H
#include <setupapi.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <setupapi.h>
// clang-format on
struct hook_setupapi_data { struct hook_setupapi_data {
GUID device_guid; GUID device_guid;
+4 -1
View File
@@ -1,5 +1,8 @@
#include <usb100.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <usb100.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdio.h> #include <stdio.h>
+4 -1
View File
@@ -1,5 +1,8 @@
#include <usb100.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <usb100.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdio.h> #include <stdio.h>
+4 -2
View File
@@ -1,8 +1,10 @@
// clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <devioctl.h> #include <devioctl.h>
#include <ntddser.h>
#include <ntdef.h> #include <ntdef.h>
#include <ntddser.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
+1 -1
View File
@@ -124,7 +124,7 @@ static void iidxhook_util_d3d9_patch_gpu_vid_pid(struct hook_d3d9_irp *irp)
if (iidxhook_util_d3d9_config.pci_vid > 0 && if (iidxhook_util_d3d9_config.pci_vid > 0 &&
iidxhook_util_d3d9_config.pci_pid > 0) { iidxhook_util_d3d9_config.pci_pid > 0) {
str_format( str_format(
pci_id, pci_id,
sizeof(pci_id), sizeof(pci_id),
+5 -3
View File
@@ -1,7 +1,10 @@
#define LOG_MODULE "cam-hook" #define LOG_MODULE "cam-hook"
#include <initguid.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <initguid.h>
// clang-format on
#include <mfapi.h> #include <mfapi.h>
#include <mfidl.h> #include <mfidl.h>
@@ -513,8 +516,7 @@ char *grab_next_camera_id(char *buffer, size_t bsz)
pAttributes, pAttributes,
&MY_MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE, &MY_MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE,
&MY_MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_GUID); &MY_MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_GUID);
i f(FAILED(hr)) if (FAILED(hr)) {
{
log_info("SetGUID failed: %ld", hr); log_info("SetGUID failed: %ld", hr);
goto done; goto done;
} }
+4 -1
View File
@@ -1,5 +1,8 @@
#include <mmsystem.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <mmsystem.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
+4 -1
View File
@@ -8,8 +8,11 @@
the "bemanitools" header files included by this source file for detailed the "bemanitools" header files included by this source file for detailed
information about the API you'll need to implement. */ information about the API you'll need to implement. */
#include <mmsystem.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <mmsystem.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
+4 -2
View File
@@ -1,8 +1,10 @@
// clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <ntdef.h>
#include <devioctl.h> #include <devioctl.h>
#include <ntddser.h> #include <ntddser.h>
#include <ntdef.h> // clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
+4 -2
View File
@@ -1,8 +1,10 @@
// clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <ntdef.h>
#include <devioctl.h> #include <devioctl.h>
#include <ntddser.h> #include <ntddser.h>
#include <ntdef.h> // clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
+4 -1
View File
@@ -8,8 +8,11 @@
the "bemanitools" header files included by this source file for detailed the "bemanitools" header files included by this source file for detailed
information about the API you'll need to implement. */ information about the API you'll need to implement. */
#include <mmsystem.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <mmsystem.h>
// clang-format on
#include "bemanitools/input.h" #include "bemanitools/input.h"
#include "bemanitools/jbio.h" #include "bemanitools/jbio.h"
+4 -1
View File
@@ -1,5 +1,8 @@
#include <setupapi.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <setupapi.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <string.h> #include <string.h>
+4 -2
View File
@@ -1,10 +1,12 @@
#define LOG_MODULE "p3ioemu-uart" #define LOG_MODULE "p3ioemu-uart"
// clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <devioctl.h> #include <devioctl.h>
#include <ntddser.h>
#include <ntdef.h> #include <ntdef.h>
#include <ntddser.h>
// clang-format on
#include <string.h> #include <string.h>
+4 -2
View File
@@ -1,8 +1,10 @@
// clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <ntdef.h>
#include <devioctl.h> #include <devioctl.h>
#include <ntddser.h> #include <ntddser.h>
#include <ntdef.h> // clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
+4 -2
View File
@@ -1,10 +1,12 @@
#define LOG_MODULE "lcd" #define LOG_MODULE "lcd"
// clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <ntdef.h>
#include <devioctl.h> #include <devioctl.h>
#include <ntddser.h> #include <ntddser.h>
#include <ntdef.h> // clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <string.h> #include <string.h>
+4 -1
View File
@@ -1,8 +1,11 @@
#ifndef UTIL_CRYPTO_H #ifndef UTIL_CRYPTO_H
#define UTIL_CRYPTO_H #define UTIL_CRYPTO_H
#include <wincrypt.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <wincrypt.h>
// clang-format on
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
+4 -1
View File
@@ -9,8 +9,11 @@
provides all of the inputs for IIDX then you should replace IIDXIO.DLL provides all of the inputs for IIDX then you should replace IIDXIO.DLL
instead and not call into this DLL at all. */ instead and not call into this DLL at all. */
#include <mmsystem.h> // clang-format off
// Don't format because the order is important here
#include <windows.h> #include <windows.h>
#include <mmsystem.h>
// clang-format on
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>