Skip to content

Commit

Permalink
CAppDevKit v1.7
Browse files Browse the repository at this point in the history
LinuxUsersLinuxMint authored Dec 11, 2023
1 parent 1b4d4cc commit 159a5c6
Showing 10 changed files with 220 additions and 56 deletions.
4 changes: 2 additions & 2 deletions CAppDevKitInfoLib/cappdevkitinfo.h
Original file line number Diff line number Diff line change
@@ -6,9 +6,9 @@

#define C_LIB_NAME "CAppDevKit"
#define C_APP_DEV_KIT "CAppDevKit (C App Developer Kit)"
#define CAppDevKit_Ver 1.5
#define CAppDevKit_Ver 1.7
#define CAppDevKit_RS_Date "11/24/2023"
#define CAppDevKit_LAST_UPDATED_DATE "11/28/2023"
#define CAppDevKit_LAST_UPDATED_DATE "12/02/2023"
#define CAppDevKit_Developer_Name "@LinuxUsersLinuxMint"
#define CAppDevKit_Developer_website "https://linuxuserslinuxmint.github.io"

7 changes: 4 additions & 3 deletions CAppDevKitLib/appvoid.h
Original file line number Diff line number Diff line change
@@ -2,10 +2,11 @@
#define _APP_VOID_H_

#include "appcustomvar.h"
#include "../Lib/forc/cdefined.h"
#include "../CAppDevKitInfoLib/cappdevkitinfo.h"
#include "../Lib/customdefine.h"

afunc appinfo(app_name appname, app_ver_t appver, app_rs_date apprs, app_lsup_date applsdate, app_developer_name appdevname, app_developer_website appdevwsite)
appfunc appinfo(app_name appname, app_ver_t appver, app_rs_date apprs, app_lsup_date applsdate, app_developer_name appdevname, app_developer_website appdevwsite)
{
printf("AppName: %s\n", appname);
printf("AppVersion: %f\n", appver);
@@ -15,7 +16,7 @@ afunc appinfo(app_name appname, app_ver_t appver, app_rs_date apprs, app_lsup_da
printf("AppDevWebSite: %s\n", appdevwsite);
}

afunc cappdevkit_info()
appfunc cappdevkit_info()
{
st CAppDevKitInfo CAppDevKitI;
CAppDevKitI.clibname = C_LIB_NAME;
@@ -35,7 +36,7 @@ afunc cappdevkit_info()
printf("CAppDevKitWebSite: %s\n", CAppDevKitI.appdevswebsite);
}

afunc app_exit()
appfunc app_exit()
{
exit(0);
}
131 changes: 131 additions & 0 deletions FastVar/cppfastvar.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
#ifndef _CPP_FAST_VAR_HPP_
#define _CPP_FAST_VAR_HPP_

#define MAX_NUMBERS_SIZE 11
#define MAX_EN_LETTERS_SIZE 26
#define MAX_TR_LETTERS_SIZE 29

#include <iostream>
#include "../ForCpp/cppdefined.hpp"
uns

_i numbers[MAX_NUMBERS_SIZE] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
_cc tr_letters[MAX_TR_LETTERS_SIZE] = {'A', 'B', 'C', 'Ç', 'D', 'E', 'F', 'G', 'Ğ', 'H', 'I', 'İ', 'J', 'K', 'L', 'M', 'N', 'O', 'Ö', 'P', 'R', 'S', 'Ş', 'T', 'U', 'Ü', 'V', 'Y', 'Z'};
_cc en_letters[MAX_EN_LETTERS_SIZE] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I' , 'J', 'K', 'L' , 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'};

_cc lower_tr_letters[MAX_TR_LETTERS_SIZE] = {'a', 'b', 'c', 'ç', 'd', 'e', 'f', 'g', 'ğ', 'h', 'ı', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'ö', 'p', 'r', 's', 'ş', 't', 'u', 'ü', 'v', 'y', 'z'};
_cc lower_en_letters[MAX_EN_LETTERS_SIZE] = {'a' , 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'ı', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};

// List of BIOS Color Attributes
// link: https://en.wikipedia.org/wiki/BIOS_color_attributes

#define VGA_COLOR_BLACK 0x0
#define VGA_COLOR_BLUE 0x1
#define VGA_COLOR_GREEN 0x2
#define VGA_COLOR_CYAN 0x3
#define VGA_COLOR_RED 0x4
#define VGA_COLOR_MAGENTA 0x5
#define VGA_COLOR_BROWN 0x6
#define VGA_COLOR_LIGHT_GRAY 0x7
#define VGA_COLOR_DARK_GRAY 0x8
#define VGA_COLOR_LIGHT_BLUE 0x9
#define VGA_COLOR_LIGHT_GREEN 0xA
#define VGA_COLOR_LIGHT_CYAN 0xB
#define VGA_COLOR_LIGHT_RED 0xC
#define VGA_COLOR_LIGHT_MAGENTA 0xD
#define VGA_COLOR_YELLOW 0xE
#define VGA_COLOR_WHITE 0xF

// structures

struct vcl // vga color list
{
_i vcb; // black
_i vcbl; // blue
_i vcg; // green
_i vcc; // cyan
_i vcr; // red
_i vcm; // magenta
_i vcbrw; // brown
_i vclg; // light gray
_i vcdg; // dark gray
_i vclbl; // light blue
_i vclgre; // light green
_i vclcy; // light cyan
_i vclr; // light red
_i vclmg; // light magenta
_i vcy; // light yellow
_i vcwh; // white
} vclist;

st vcl vclist;

// enum

en vgcl
{
BLACK,
BLUE,
GREEN,
CYAN,
RED,
MAGENTA,
BROWN,
LIGHTGRAY,
DARKGRAY,
LIGHTBLUE,
LIGHTGREEN,
LIGHTCYAN,
LIGHTRED,
LIGHTMAGENTA,
YELLOW,
WHITE
} vgclist;

en vgcl vgclist;

// List Of 16-bit computer color palettes
// link: https://en.wikipedia.org/wiki/List_of_16-bit_computer_color_palettes

// 12-Bit/15-bit 4096-color palette

namespace vga_color_palette
{
#define VGA_COLOR_PALETTE_0 0x00
#define VGA_COLOR_PALETTE_1 0x01
#define VGA_COLOR_PALETTE_2 0x02
#define VGA_COLOR_PALETTE_3 0x03
#define VGA_COLOR_PALETTE_4 0x04
#define VGA_COLOR_PALETTE_5 0x05
#define VGA_COLOR_PALETTE_6 0x06
#define VGA_COLOR_PALETTE_7 0x07
#define VGA_COLOR_PALETTE_8 0x08
#define VGA_COLOR_PALETTE_9 0x09
#define VGA_COLOR_PALETTE_A 0x0A
#define VGA_COLOR_PALETTE_B 0x0B
#define VGA_COLOR_PALETTE_C 0x0C
#define VGA_COLOR_PALETTE_D 0x0D
#define VGA_COLOR_PALETTE_E 0x0E
#define VGA_COLOR_PALETTE_F 0x0F

// 15-bit

#define VGA_COLOR_PALETTE_10 0x10
#define VGA_COLOR_PALETTE_11 0x11
#define VGA_COLOR_PALETTE_12 0x12
#define VGA_COLOR_PALETTE_13 0x13
#define VGA_COLOR_PALETTE_14 0x14
#define VGA_COLOR_PALETTE_15 0x15
#define VGA_COLOR_PALETTE_16 0x16
#define VGA_COLOR_PALETTE_17 0x17
#define VGA_COLOR_PALETTE_18 0x18
#define VGA_COLOR_PALETTE_19 0x19
#define VGA_COLOR_PALETTE_1A 0x1A
#define VGA_COLOR_PALETTE_1B 0x1B
#define VGA_COLOR_PALETTE_1C 0x1C
#define VGA_COLOR_PALETTE_1D 0x1D
#define VGA_COLOR_PALETTE_1E 0x1E
#define VGA_COLOR_PALETTE_1F 0x1F
}

#endif
30 changes: 30 additions & 0 deletions ForCpp/cppdefined.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#ifndef _CPP_DEFINED_HPP_
#define _CPP_DEFINED_HPP_
#include <iostream>
#include <string>
using namespace std;

#define use using
#define nsp namespace
#define cl class
#define pb public:
#define pr private:
#define ptc protected:
#define uns using namespace std;
#define ct cout
#define cn cin
#define ed endl
#define st struct
#define en enum
#define ui union

#define _i int
#define _si short int
#define _li long int
#define _d double
#define _f float
#define _c char
#define _cc const char
#define _co const

#endif
33 changes: 0 additions & 33 deletions Lib/customdefine.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef _CUSTOM_DEFINE_H_
#define _CUSTOM_DEFINE_H_

#include "../CAppDevKitLib/appcustomvar.h"

// return keywords

#define r return
@@ -15,7 +13,6 @@
#define func void
#define fun void
#define def void
#define afunc void

// Data Types keywords

@@ -38,34 +35,4 @@
#define en enum
#define ui union

// print func

afunc print(char *str)
{
printf("%s", str);
}

afunc println(char *str)
{
printf("%s", str);
}

afunc p(char *str)
{
printf("%s", str);
}

// for cpp (C++)

#define use using
#define nsp namespace
#define cl class
#define pb public:
#define pr private:
#define ptc protected:
#define uns using namespace std;
#define ct cout
#define cn cin
#define ed endl

#endif
33 changes: 33 additions & 0 deletions Lib/forc/cdefined.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#ifndef _C_DEFINED_H_
#define _C_DEFINED_H_

#include "../../CAppDevKitLib/appcustomvar.h"

#define appfunc app_func
#define afunc void

appfunc print(char *str)
{
printf("%s", str);
}

appfunc println(char *str)
{
printf("%s", str);
}

appfunc p(char *str)
{
printf("%s", str);
}

st cdefine
{
#define clib_define_name "cdefined"
#define clib_file_ext ".h"
#define clib_ver "1.5"
} cdef;

st cdefine cdef;

#endif
18 changes: 2 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# CAppDevKit
# CAppDevKit-Insiders

(TR / Türkçe)

* C programlama dilinde komut satırı uygulama geliştirmek için bir geliştirme kiti
* Grafik Kullanıcı Arayüzü (GUI) Geliştirmesi yapılamaz / veya Kullanıcı Arayüzü (UI) geliştirmesi yapılamaz

Önemli Uyarılar:
* CAppDevKit ile Uygulama geliştirirken cappdevkit_info() fonksiyonu program içinde kullanılmalı ve bu programın "CAppDevKit" kullanılarak yazılmıştır ibaresi eklenmelidir. (CAppDevKit proje linki verilmesi zorunludur)

(EN / English)

* A development kit for developing command line applications in the C programming language
* Graphical User Interface (GUI) Development cannot be done / or User Interface (UI) development cannot be done

Important Notices:
* When developing an application with CAppDevKit, the cappdevkit_info() function should be used in the program and the statement that this program was written using "CAppDevKit" should be added. (CAppDevKit project link is mandatory)
* The project started after CAppDevKit's constantly updated CADK v1.5. Includes CADK preview versions.
2 changes: 1 addition & 1 deletion exampleapp.c
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ _i main()

if (process == 1)
{
appinfo("ExampleCAppDevKitProject",1.5,"11/24/2023","11/28/2023","@LinuxUsersLinuxMint","https://linuxuserslinuxmint.github.io");
appinfo("ExampleCAppDevKitProject",1.7,"11/24/2023","12/02/2023","@LinuxUsersLinuxMint","https://linuxuserslinuxmint.github.io");
}
else if (process == 2)
{
15 changes: 14 additions & 1 deletion setup_copy_files.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
#!/usr/bin/sh
cp exampleapp.c CAppDevKit/
chmod a+x CAppDevKit/

cp CAppDevKitInfoLib/cappdevkitinfo.h CAppDevKit/CAppDevKitInfoLib/
chmod a+x CAppDevKit/CAppDevKitInfoLib/cappdevkitinfo.h

cp CAppDevKitLib/appcustomvar.h CAppDevKit/CAppDevKitLib/
chmod a+x CAppDevKit/CAppDevKitLib/appcustomvar.h

cp CAppDevKitLib/appvoid.h CAppDevKit/CAppDevKitLib/
chmod a+x CAppDevKit/CAppDevKitLib/appvoid.h

cp Lib/customdefine.h CAppDevKit/Lib/
chmod a+x CAppDevKit/Lib/customdefine.h
chmod a+x CAppDevKit/Lib/customdefine.h

cp Lib/forc/cdefined.h CAppDevKit/Lib/forc/
chmod a+x CAppDevKit/Lib/forc/cdefined.h

cp FastVar/cppfastvar.hpp CAppDevKit/FastVar/
chmod a+x CAppDevKit/FastVar/cppfastvar.hpp

cp ForCpp/cppdefined.hpp CAppDevKit/ForCpp/
chmod a+x CAppDevKit/ForCpp/cppdefined.hpp
3 changes: 3 additions & 0 deletions setup_create_dir.sh
Original file line number Diff line number Diff line change
@@ -3,4 +3,7 @@ mkdir CAppDevKit
mkdir CAppDevKit/CAppDevKitInfoLib
mkdir CAppDevKit/CAppDevKitLib
mkdir CAppDevKit/Lib
mkdir CAppDevKit/FastVar
mkdir CAppDevKit/ForCpp
mdkir CAppDevKit/Lib/forc
chmod a+x CAppDevKit

0 comments on commit 159a5c6

Please sign in to comment.