Skip to content

Commit

Permalink
feat: 0.1.19 add kls_print_title() (#20)
Browse files Browse the repository at this point in the history
* feat: add kls_print_title()

* fix: void declaration

* chore: bump static/amboso.h
  • Loading branch information
jgabaut committed Sep 4, 2023
1 parent 9a950ef commit ae060c6
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 7 deletions.
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ clean:
@echo -en "Cleaning build artifacts: "
rm $(TARGET)
rm src/*.o
rm static/*.o
@echo -e "\033[1;33mDone.\e[0m"

cleanob:
Expand Down
1 change: 1 addition & 0 deletions bin/stego.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ tests# tests folder name
0.1.16# add KLS_PUSH_T_TYPED()
0.1.17# add kls_type_usage()
0.1.18# kls_push_zero_typed() expects int
0.1.19# add kls_print_title()
4 changes: 4 additions & 0 deletions bin/v0.1.19/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#amboso compliant version folder, will ignore everything inside BUT the gitignore, to keep the clean dir
*
!.gitignore
!static
1 change: 1 addition & 0 deletions bin/v0.1.19/static
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Define the package name and version
AC_INIT([koliseo], [0.1.18], [jgabaut@github.com])
AC_INIT([koliseo], [0.1.19], [jgabaut@github.com])

# Verify automake version and enable foreign option
AM_INIT_AUTOMAKE([foreign -Wall])
Expand All @@ -24,7 +24,7 @@ fi
# Set a default version number if not specified externally
AC_ARG_VAR([VERSION], [Version number])
if test -z "$VERSION"; then
VERSION="0.1.18"
VERSION="0.1.19"
fi

# Output variables to the config.h header
Expand Down
2 changes: 1 addition & 1 deletion docs/koliseo.doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PROJECT_NAME = "koliseo"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "0.1.18"
PROJECT_NUMBER = "0.1.19"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
55 changes: 55 additions & 0 deletions src/koliseo.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,67 @@ int KOLISEO_DEBUG = 0;
int KOLISEO_AUTOSET_REGIONS = 1;
FILE* KOLISEO_DEBUG_FP = NULL;

/**
* Defines titlescreen.
*/
char* kls_title[KLS_TITLEROWS+1] = {
" .',,,. ",
" ...''',,;;:cl;. ",
" ..''''''.... .co, ",
" .'',,,'.. 'ol. ",
" ..''''.. .co. ",
" ..'.. cl. ",
" ..'... . . .:'... . . .. ..... ... ",
" .... . ..:c,'. .oc .ll. :dddxo. ld. 'x: .cxddx; :kxodo, .lddxx; ",
" .,.. .cl,.. .cxd:.. ;Ol;do. :Ol. c0c .kx. lO; ;0d..:: .xk' .xx' 'kx. ",
" .,.. 'dOl. .''......lKOkc. .kx. ;0l ;0l .xk. 'xk; 'Ok;'. l0; .xk. ",
" ''.;, .,;;............. .xKKO' ;0c c0: lO; 'Od. .lko. :0koo:. .xk. 'Od. ",
" ',.'c;. ....... 'Oo:ko. c0; .xk. .xx. :0c . ;Od. .oO, 'Od. c0: ",
" ,; ....... .::. :O; lO; :0l..okc. 'Od... .oO' .ld'.:Od. 'kk,... .kk,.:kd. ",
" ;xc,... . 'd: .:d; ;l. .l: .:dool''c. 'ddolc. .cc. 'ldooc. 'dxoll:. 'odoo:. ",
" .lx;. . ,d; .ll. .''. ;l:' ",
" :o. ;, cc .. . ,cc:::c, ",
" .c; .. .' ....',,;;;;;;;;;;,,,,,,,,,,;;;ox;........'cddoollcc:;,,'.. ",
" ,: ...',:clodxkO0KKXXXXXXKKK000000KKKKXXXXKKKXXXKKKKKKKKKXNNNNNNNNNNNXXKOxoc;'. ",
" .:. ..';cldkOKXXXXK0Okxxdolc::;,''.','......';clc::cloONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNK0xl;. ",
" :xxxOKKK0kxoddl;,';od;. 'cl, .ckko. ,d00Ol. .xXNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNKkl;. ",
".lKX0xoc,';;. .ll. ;xO; .oX0, ,ONXl ,0NNNK; .lKNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNX0o' ",
".xk;. . .;. .:, .dc 'OK; .dNNo. ;0NNNXc ;kXNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNk.",
" :c .. .. .l, .k0, .xXXo ;0XNNXc .l0NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNO'",
" :; .'. .;:. .,cl;....,loddo;.. 'dKNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN0,",
".c, ....',;;:cclllooddddddddddodxxxxxxxdddddddolllccccc:cxXNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNK;",
".l:',:cloxxkkkOkkxxdollcc::;,,'''.............................',cONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNXc",
":00OOxdoc:;,'... .. .. . .oNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNXl",
":o,..',. .. ';. .co' ;d, 'oOk; .o00kd; .oOkd, :KNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNXl",
":; ,o' .. .l: ;0o .dXo. 'xNNk. 'ONNNNO' :KNNNd. cKNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNXo",
"c; .. .. '; 'ko. 'ONo. .kNNO' ,0NNNNK; :KNNXd. :0NNNNNNNNNNNNNNNNNNNNNNNNNNNNNXo",
"l, .. 'ko 'OXl ,0NNO' 'ONNNNK; ;KNNXl. ;ONNNNNNNNNNNNNNNNNNNNNNNNNNNNXl",
"cc.............';'...;do'...:k0c....:0XX0:...'xXXXX0c...:0XK0l.......c0NNNNNNNNNNNNNNNNNNNNXXXXXXKO,",
".;:;;;;;;:::::::::cc:::::::::c:;;;;,;ccc:;,,,,:cccc:;;;;;ccc:;,,,,,;;;clloooooooooooooooooollcc:;,. "
};

void kls_print_title_2file(FILE* fp) {
if (fp == NULL) {
fprintf(stderr,"[KLS] kls_print_title_2file(): Passed file pointer was NULL.\n");
abort();
}
for (int i = 0; i < KLS_TITLEROWS; i++) {
fprintf(fp,"%s\n",kls_title[i]);
}
}

void kls_print_title(void) {
kls_print_title_2file(stdout);
}

/**
* Returns the constant string representing current version for Koliseo.
* @return A constant string in MAJOR-MINOR-PATCH format for current Koliseo version.
*/
const char* string_koliseo_version(void) {
return KOLISEO_API_VERSION_STRING;
}

/**
* Returns the constant int representing current version for Koliseo.
* @return A constant int in numeric format for current Koliseo version.
Expand All @@ -19,6 +73,7 @@ const int int_koliseo_version(void) {
return KOLISEO_API_VERSION_INT;
}


/**
* Returns the current offset (position of pointer bumper) for the passed Koliseo.
* @param kls The Koliseo at hand.
Expand Down
10 changes: 8 additions & 2 deletions src/koliseo.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#define KLS_MAJOR 0 /**< Represents current major release.*/
#define KLS_MINOR 1 /**< Represents current minor release.*/
#define KLS_PATCH 18 /**< Represents current patch release.*/
#define KLS_PATCH 19 /**< Represents current patch release.*/

/**
* Global variable for debug flag.
Expand All @@ -28,12 +28,18 @@ extern int KOLISEO_AUTOSET_REGIONS;
extern FILE* KOLISEO_DEBUG_FP;

static const int KOLISEO_API_VERSION_INT = (KLS_MAJOR*1000000+KLS_MINOR*10000+KLS_PATCH*100); /**< Represents current version with numeric format.*/
static const char KOLISEO_API_VERSION_STRING[] = "0.1.18"; /**< Represents current version with MAJOR.MINOR.PATCH format.*/
static const char KOLISEO_API_VERSION_STRING[] = "0.1.19"; /**< Represents current version with MAJOR.MINOR.PATCH format.*/

const char* string_koliseo_version(void);

const int int_koliseo_version(void);

#define KLS_TITLEROWS 33
extern char* kls_title[KLS_TITLEROWS+1];

void kls_print_title_2file(FILE* fp);
void kls_print_title(void);

void kls_log(const char* tag, const char* format, ...);

#define KLS_DEFAULT_SIZE (16*1024) /**< Represents a simple default size for demo purposes.*/
Expand Down
2 changes: 1 addition & 1 deletion static/amboso.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef AMBOSO_H
#define AMBOSO_H
#define AMBOSO_CV "1.6.0"
#define AMBOSO_CV "1.6.3"
char* getAmbosoVersion(void);
#endif
4 changes: 3 additions & 1 deletion static/demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
#include "../src/koliseo.h"
#include "amboso.h"


int main(void) {
KOLISEO_DEBUG = 1;
KOLISEO_AUTOSET_REGIONS = 1;
printf("Demo for Koliseo, using API lvl [%i], version %s \n", int_koliseo_version(), string_koliseo_version());
kls_print_title();
printf("\n\nDemo for Koliseo, using API lvl [%i], version %s \n", int_koliseo_version(), string_koliseo_version());
printf("Supporting Amboso API version %s\n\n", getAmbosoVersion());
printf("KOLISEO_DEBUG is [%i]\n\n", KOLISEO_DEBUG);
printf("KOLISEO_AUTOSET_REGIONS is [%i]\n\n", KOLISEO_AUTOSET_REGIONS);
Expand Down

0 comments on commit ae060c6

Please sign in to comment.