Appease the LSP server (#73)

* newline conversions

* formatting changes and lsp appeasement
This commit is contained in:
Levi Neely 2024-11-26 18:36:49 +00:00 committed by GitHub
parent 53f785ac1f
commit ca80afd658
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
17 changed files with 988 additions and 969 deletions

View File

@ -39,6 +39,8 @@ Dependencies:
extern "C" {
#endif
#include <stddef.h>
typedef enum _pCloud_FileState {
FileStateInSync = 0,
FileStateNoSync,

View File

@ -31,8 +31,6 @@
#ifndef _PSYNC_COMPAT_H
#define _PSYNC_COMPAT_H
#include "pcompiler.h"
#define P_OS_LINUX
#define P_OS_ID 7 // linux
#ifndef _GNU_SOURCE
@ -72,6 +70,8 @@ typedef unsigned long psync_uint_t;
#include <sys/time.h>
#include <unistd.h>
#include "pcompiler.h"
#define P_PRI_U64 PRIu64
#define P_PRI_D64 PRId64

View File

@ -32,9 +32,10 @@
#ifndef _PSYNC_DATABASE_H
#define _PSYNC_DATABASE_H
#include "pcompat.h"
#include <sqlite3.h>
#include "pcompat.h"
#if defined(SQLITE_VERSION_NUMBER) && SQLITE_VERSION_NUMBER >= 3008002
#define P_SQL_WOWROWID "WITHOUT ROWID"
#else

View File

@ -28,6 +28,11 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
*/
#include <libudev.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "plibs.h"
#include "psynclib.h"
@ -35,11 +40,6 @@
#include "pdevice_monitor.h"
#include "plocalscan.h"
#include "ptimer.h"
#include <libudev.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define DEV_MONITOR_ACTIVITY_TIMER_INT 20

View File

@ -37,7 +37,7 @@
#include "psettings.h"
#include "psynclib.h"
#define PSYNC_INVALID_FOLDERID ((psync_folderid_t)-1)
#define PSYNC_INVALID_FOLDERID ((psync_folderid_t) - 1)
#define PSYNC_INVALID_PATH NULL
static inline uint64_t psync_get_permissions(const binresult *meta) {

View File

@ -35,7 +35,7 @@
#include "pcompiler.h"
#include "psynclib.h"
#define PSYNC_INVALID_FOLDERID ((psync_folderid_t)-1)
#define PSYNC_INVALID_FOLDERID ((psync_folderid_t) - 1)
#define PSYNC_INVALID_PATH NULL
#define PSYNC_FOLDER_FLAG_ENCRYPTED 1

View File

@ -32,6 +32,8 @@
#ifndef _PSYNC_FS_H
#define _PSYNC_FS_H
#include <pthread.h>
#include "papi.h"
#include "pcompat.h"
#include "pcrc32c.h"
@ -44,7 +46,6 @@
#include "psynclib.h"
#include "ptimer.h"
#include "ptree.h"
#include <pthread.h>
#define psync_fs_need_per_folder_refresh() psync_fs_need_per_folder_refresh_f()
#define psync_fs_need_per_folder_refresh_const() 1

View File

@ -32,13 +32,14 @@
#ifndef _PSYNC_FSTASKS_H
#define _PSYNC_FSTASKS_H
#include <stddef.h>
#include <string.h>
#include <time.h>
#include "pfsfolder.h"
#include "plibs.h"
#include "psynclib.h"
#include "ptree.h"
#include <stddef.h>
#include <string.h>
#include <time.h>
#define PSYNC_FS_TASK_MKDIR 1
#define PSYNC_FS_TASK_RMDIR 2

View File

@ -42,6 +42,7 @@
#endif
#include "psynclib.h"
#include "poverlay_protocol.h"
extern int overlays_running;
extern int callbacks_running;

View File

@ -1,9 +1,16 @@
// defines the messaging protocol for pclsync
#ifndef __POVERLAY_PROTOCOL_H
#define __POVERLAY_PROTOCOL_H
#include <stddef.h>
#include <stdint.h>
#ifndef POVERLAY_SOCK_PATH
#define POVERLAY_SOCK_PATH "/tmp/pcloud_unix_soc.sock"
#endif
typedef struct _message {
uint32_t type;
uint64_t length;
@ -20,3 +27,5 @@ typedef struct {
size_t payloadsz; // size of payload
message *msg; // API response message
} response_message;
#endif

View File

@ -29,6 +29,8 @@
DAMAGE.
*/
#include <stdint.h>
#define PSYNC_SCAN_EXTENSIONS_CNT 166
#define PSYNC_SCAN_TYPES_CNT 5

View File

@ -29,20 +29,18 @@
DAMAGE.
*/
/*
Dependencies:
- pcompat.h
- pcompiler.h
- <mbedtls/aes.h>
- <mbedtls/rsa.h>
- <mbedtls/mbedtls_sha1.h>
- <mbedtls/mbedtls_sha256.h>
- <mbedtls/mbedtls_sha512.h>
*/
#ifndef _PSYNC_SSL_H
#define _PSYNC_SSL_H
#include <mbedtls/aes.h>
#include <mbedtls/rsa.h>
#include <mbedtls/sha1.h>
#include <mbedtls/sha256.h>
#include <mbedtls/sha512.h>
#include "pcompat.h"
#include "pcompiler.h"
#define PSYNC_AES256_BLOCK_SIZE 16
#define PSYNC_AES256_KEY_SIZE 32

View File

@ -37,12 +37,13 @@
* success and -1 for failure.
*/
#include "paccountevents.h"
#include "ptools.h"
#include <stdint.h>
#include <stdlib.h>
#include <time.h>
#include "paccountevents.h"
#include "ptools.h"
typedef uint64_t psync_folderid_t;
typedef uint64_t psync_fileid_t;
typedef uint64_t psync_fileorfolderid_t;

View File

@ -32,11 +32,12 @@
#ifndef _PSYNC_TIMER_H
#define _PSYNC_TIMER_H
#include "plist.h"
#include <stdint.h>
#include <stdlib.h>
#include <time.h>
#include "plist.h"
#define PSYNC_INVALID_TIMER NULL
extern time_t psync_current_time;

View File

@ -29,7 +29,9 @@
#ifndef _PSYNC_TYPES_H
#define _PSYNC_TYPES_H
#include "papi.h"
typedef void (*result_visitor)(int i, const binresult *result, void *param);
#endif