This repository has been archived by the owner on Jun 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
libtest.h
60 lines (54 loc) · 2.02 KB
/
libtest.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#pragma once
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef int (*CallbackType)(unsigned, const char*, unsigned[1]);
typedef int (*CallbackType2)(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long);
struct testStruct
{
unsigned long fieldLong;
const char* fieldString;
unsigned int fieldBool;
char fieldFixedArr[8];
int (*fieldFnPtr)(unsigned, const char*, unsigned[1]);
struct unknownClass* fieldUnknownPtr;
void* voidPtr;
CallbackType fnArray[4];
};
struct frozenStruct
{
int normalField;
int fieldForFreeze;
struct frozenStructTest* next;
};
struct pointersStruct
{
char* firstPointer;
char* pointerArray[4];
char* lastPointer;
};
unsigned long simpleAddNoPrintTest(unsigned long a, unsigned long b);
double simpleDivideTest(double a, double b);
int simpleAddTest(int a, int b);
size_t simpleStrLenTest(const char* str);
int simpleCallbackTest(unsigned a, const char* b, CallbackType callback);
int simpleWriteToFileTest(FILE* file, const char* str);
char* simpleEchoTest(char * str);
float simpleFloatAddTest(const float a, const float b);
double simpleDoubleAddTest(const double a, const double b);
unsigned long simpleLongAddTest(unsigned long a, unsigned long b);
struct testStruct simpleTestStructVal();
struct testStruct* simpleTestStructPtr();
struct testStruct simpleTestStructValBadPtr();
struct testStruct* simpleTestStructPtrBadPtr();
int* echoPointer(int* pointer);
double simplePointerValAddTest(double* ptr, double val);
struct pointersStruct initializePointerStruct(char* initVal);
struct pointersStruct* initializePointerStructPtr(char* initVal);
int internalCallback(unsigned, const char*, unsigned[1]);
void simplePointerWrite(int* ptr, int val);
int simpleCallbackTest2(unsigned long startVal, CallbackType2 cb);
#ifdef __cplusplus
}
#endif