Compare commits
6 Commits
9348ae668a
..
lisp
| Author | SHA1 | Date | |
|---|---|---|---|
| ce94e9fb87 | |||
| 29a92ce904 | |||
| 72178adebb | |||
| 7a98f89531 | |||
| 3e562c1071 | |||
| bff3f84ecd |
@@ -4,17 +4,17 @@ Beluga is a project of CLI text editor that will fit perfectly with your azerty
|
||||
|
||||
## Requirements
|
||||
|
||||
You will only need **make** or **gcc** to compile the editor.
|
||||
You will only need **cmake** and **clang** to compile the editor.
|
||||
|
||||
## Installation
|
||||
|
||||
Here is the installation line :
|
||||
Here is the installation line for development version:
|
||||
|
||||
```git clone --branch V1.0 --single-branch https://github.com/le-cocotier/beluga.git ~/.beluga && cd ~/.beluga && make build```
|
||||
```git clone --recurse-submodules https://github.com/le-cocotier/beluga.git ~/.beluga && cd ~/.beluga && mkdir build && cd build && cmake ../ && make beluga```
|
||||
|
||||
The executable file will be in `bin/beluga`. Feel free to add it to your path.
|
||||
|
||||
You can either run `make all` if you're interested by the doxygen documentation.
|
||||
You can either run `make all` or `make doc_doxygen` if you're interested by the doxygen documentation.
|
||||
|
||||
## Getting start
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ struct editorConfig {
|
||||
|
||||
struct keyBind_t* key_binds;
|
||||
int number_of_keybinds;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -82,4 +83,5 @@ struct abuf {
|
||||
|
||||
extern struct editorConfig E;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -24,6 +24,6 @@ enum editorKey {
|
||||
|
||||
#define ABUF_INIT {NULL, 0}
|
||||
|
||||
#define BELUGA_VERSION "1.0"
|
||||
#define BELUGA_VERSION "1.1"
|
||||
|
||||
#endif // DEFINE_H_
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef INIT_H_
|
||||
#define INIT_H_
|
||||
|
||||
#include "builtins.h"
|
||||
#include "data.h"
|
||||
#include "terminal.h"
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "define.h"
|
||||
#include "output.h"
|
||||
#include "terminal.h"
|
||||
#include "builtins.h"
|
||||
#include <unistd.h>
|
||||
|
||||
// KEYS keycode
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
* interactions. \version 0.1 \date 21 septembre 2024
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define _DEFAULT_SOURCE
|
||||
#define _BSD_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
@@ -32,6 +33,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
editorSetStatusMessage("HELP: Ctrl-S = save | Ctrl-Q = quit");
|
||||
|
||||
|
||||
while (1) {
|
||||
editorRefreshScreen();
|
||||
editorProcessKeypress();
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
project('beluga', 'c',
|
||||
version : '1.0.0',
|
||||
version : '1.1',
|
||||
default_options : [
|
||||
'c_std=none',
|
||||
]
|
||||
|
||||
+1
-1
@@ -49,7 +49,6 @@ void editorCloseFile(void) {
|
||||
E.filename = NULL;
|
||||
E.status_msg[0] = '\0';
|
||||
E.status_msg_time = 0;
|
||||
|
||||
}
|
||||
|
||||
void editorOpen(char *filename) {
|
||||
@@ -58,6 +57,7 @@ void editorOpen(char *filename) {
|
||||
// Test if a file is already open
|
||||
if (E.filename != NULL) {
|
||||
editorCloseFile();
|
||||
E.state = READ_AND_WRITE;
|
||||
}
|
||||
|
||||
free(E.filename);
|
||||
|
||||
Reference in New Issue
Block a user