documentation

This commit is contained in:
Arthur Barraux
2024-09-21 11:54:02 +02:00
parent 74df1685ed
commit e3c7099f64
5 changed files with 2955 additions and 1 deletions
+4
View File
@@ -50,3 +50,7 @@ modules.order
Module.symvers
Mkfile.old
dkms.conf
# documentation
doc/*
+2924
View File
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -1 +1,3 @@
# beluga
# Beluga
Beluga is a project of CLI text editor that will fit perfectly with your azerty keyboard.
+13
View File
@@ -1,3 +1,10 @@
/**
* \file main.c
* \author Arthur Barraux
* \brief Base file of Beluga text editor. Contain fonctions for terminal
* interactions. \version 0.1 \date 21 septembre 2024
*/
#include "main.h"
#include <errno.h>
#include <stdio.h>
@@ -13,6 +20,11 @@ struct termios orig_termios;
/* terminal */
/**
* \fn void die(const char *s)
* \brief Exit program and return s error message.
* \param *s Error string
* */
void die(const char *s) {
wipeScreen();
perror(s);
@@ -70,6 +82,7 @@ void editorProcessKeypress() {
switch (c) {
case CTRL_KEY('q'):
wipeScreen();
exit(0);
break;
}
+11
View File
@@ -1,4 +1,15 @@
#ifndef MAIN_H
#define MAIN_H
/* terminal */
void die(const char *s);
void disableRawMode();
void enableRawMode();
char editorReadKey();
/* output */
void wipeScreen();
/* input */
void editorProcessKeypress();
#endif