-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release 0.6.5
- Loading branch information
Showing
19 changed files
with
515 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
*.geany | ||
*.geany | ||
src/*.d | ||
src/*.o | ||
src/kot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# | ||
# Copyright 2019 Rinwasyu | ||
# | ||
# This file is part of kot. | ||
# | ||
# Kot is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# Kot is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
# | ||
|
||
.PHONY: all clean | ||
|
||
PROGNAME := kot | ||
CC := gcc | ||
CFLAGS := -O2 -Wall -W -std=c99 | ||
LDFLAGS := | ||
SRCS := $(wildcard *.c) | ||
OBJS := $(SRCS:%.c=%.o) | ||
DEPS := $(SRCS:%.c=%.d) | ||
|
||
all: $(PROGNAME) | ||
|
||
$(PROGNAME): $(OBJS) | ||
$(CC) $(LDFLAGS) -o $@ $^ | ||
|
||
%.o: %.c | ||
$(CC) $(CFLAGS) -MD -c $< | ||
|
||
clean: | ||
rm -rf *.o *.d | ||
|
||
-include $(DEPS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright 2019 Rinwasyu | ||
* | ||
* This file is part of kot. | ||
* | ||
* Kot is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Kot is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
#ifndef KOT_CURSOR_H | ||
|
||
#define KOT_CURSOR_H | ||
|
||
struct Cursor { | ||
int col; | ||
int row; | ||
void (*currentPos)(struct Cursor *); | ||
void (*right)(struct Cursor *); | ||
void (*left)(struct Cursor *); | ||
void (*up)(struct Cursor *); | ||
void (*down)(struct Cursor *); | ||
void (*end)(struct Cursor *); | ||
void (*home)(struct Cursor *); | ||
}; | ||
|
||
void cursor_currentPos(struct Cursor *cursor); | ||
|
||
void cursor_right(struct Cursor *cursor); | ||
|
||
void cursor_left(struct Cursor *cursor); | ||
|
||
void cursor_up(struct Cursor *cursor); | ||
|
||
void cursor_down(struct Cursor *cursor); | ||
|
||
void cursor_end(struct Cursor *cursor); | ||
|
||
void cursor_home(struct Cursor *cursor); | ||
|
||
struct Cursor cursor; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright 2019 Rinwasyu | ||
* | ||
* This file is part of kot. | ||
* | ||
* Kot is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Kot is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
#ifndef KOT_DOC_H | ||
|
||
#define KOT_DOC_H | ||
|
||
struct Doc { | ||
int rows; | ||
char **buf; | ||
char *file_name; | ||
void (*init)(struct Doc *); | ||
void (*new)(struct Doc *, char *); | ||
void (*open)(struct Doc *, char *); | ||
void (*save)(struct Doc *); | ||
}; | ||
|
||
void doc_init(struct Doc *doc); | ||
|
||
void doc_new(struct Doc *doc, char *file_name); | ||
|
||
void doc_open(struct Doc *doc, char *file_name); | ||
|
||
void doc_save(struct Doc *doc); | ||
|
||
struct Doc doc; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Copyright 2019 Rinwasyu | ||
* | ||
* This file is part of kot. | ||
* | ||
* Kot is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Kot is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
#ifndef KOT_DRAW_H | ||
|
||
#define KOT_DRAW_H | ||
|
||
struct Draw { | ||
void (*init)(); | ||
void (*exit)(); | ||
void (*clear)(); | ||
void (*titlebar)(); | ||
void (*body)(); | ||
void (*repaint)(struct Draw *); | ||
}; | ||
|
||
void draw_init(); | ||
|
||
void draw_exit(); | ||
|
||
void draw_clear(); | ||
|
||
void draw_titlebar(); | ||
|
||
void draw_body(); | ||
|
||
void draw_repaint(struct Draw *draw); | ||
|
||
struct Draw draw; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.