Skip to content

Commit 51e3322

Browse files
CAppDevKit
CAppDevKit
1 parent 301e70e commit 51e3322

File tree

4 files changed

+99
-0
lines changed

4 files changed

+99
-0
lines changed

CAppDevKitInfoLib/cappdevkitinfo.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#ifndef _C_APP_DEV_KIT_INFO_H_
2+
#define _C_APP_DEV_KIT_INFO_H_
3+
4+
#include "../CAppDevKitLib/appcustomvar.h"
5+
6+
#define C_LIB_NAME "CAppDevKit"
7+
#define C_APP_DEV_KIT "CAppDevKit (C App Developer Kit)"
8+
#define CAppDevKit_Ver 1.0
9+
#define CAppDevKit_Developer_Name "@LinuxUsersLinuxMint"
10+
#define CAppDevKit_Developer_website "https://linuxuserslinuxmint.github.io"
11+
12+
struct CAppDevKitInfo
13+
{
14+
app_name clibname;
15+
app_name cappdevkit;
16+
app_ver_t cappdevkitver;
17+
app_developer_name appdevsname;
18+
app_developer_website appdevswebsite;
19+
} CAppDevKitI;
20+
21+
#endif

CAppDevKitLib/appcustomvar.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#ifndef _APP_CUSTOM_VAR_H_
2+
#define _APP_CUSTOM_VAR_H_
3+
4+
#include <stdio.h>
5+
#include <stdlib.h>
6+
7+
typedef int app_ver;
8+
typedef float app_ver_t;
9+
typedef const char *app_name;
10+
typedef const char *app_developer_name;
11+
typedef const char *app_developer_website;
12+
13+
// typedef void customv
14+
15+
typedef void app_func;
16+
17+
#endif

CAppDevKitLib/appvoid.h

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#ifndef _APP_VOID_H_
2+
#define _APP_VOID_H_
3+
4+
#include "appcustomvar.h"
5+
#include "../CAppDevKitInfoLib/cappdevkitinfo.h"
6+
7+
app_func appinfo(app_name appname, app_ver_t appver, app_developer_name appdevname, app_developer_website appdevwsite)
8+
{
9+
printf("AppName: %s\n", appname);
10+
printf("AppVersion: %f\n", appver);
11+
printf("AppDeveloper: %s\n", appdevname);
12+
printf("AppDevWebSite: %s\n", appdevwsite);
13+
}
14+
15+
app_func cappdevkit_info()
16+
{
17+
struct CAppDevKitInfo CAppDevKitI;
18+
CAppDevKitI.clibname = C_LIB_NAME;
19+
CAppDevKitI.cappdevkit = C_APP_DEV_KIT;
20+
CAppDevKitI.cappdevkitver = CAppDevKit_Ver;
21+
CAppDevKitI.appdevsname = CAppDevKit_Developer_Name;
22+
CAppDevKitI.appdevswebsite = CAppDevKit_Developer_website;
23+
24+
printf("CAppDevKitName: %s\n", CAppDevKitI.clibname);
25+
printf("CAppDevKit: %s\n", CAppDevKitI.cappdevkit);
26+
printf("CAppDevKitVer: %f\n", CAppDevKitI.cappdevkitver);
27+
printf("CAppDevName: %s\n", CAppDevKitI.appdevsname);
28+
printf("CAppDevKitWebSite: %s\n", CAppDevKitI.appdevswebsite);
29+
}
30+
31+
app_func app_exit()
32+
{
33+
exit(0);
34+
}
35+
36+
#endif

exampleapp.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#include "CAppDevKitInfoLib/cappdevkitinfo.h"
2+
#include "CAppDevKitLib/appcustomvar.h"
3+
#include "CAppDevKitLib/appvoid.h"
4+
5+
int main()
6+
{
7+
int process;
8+
9+
printf("CAppDevKit Process (appinfo (1) / cappdevkitinfo (2) / appexit (3)): ");
10+
scanf("%d", &process);
11+
12+
if (process == 1)
13+
{
14+
appinfo("ExampleCAppDevKitProject",1.0,"@LinuxUsersLinuxMint","https://linuxuserslinuxmint.github.io");
15+
}
16+
if (process == 2)
17+
{
18+
cappdevkit_info();
19+
}
20+
if (process == 3)
21+
{
22+
app_exit();
23+
}
24+
return 0;
25+
}

0 commit comments

Comments
 (0)