shithub: orca

Download patch

ref: 1bf43eacb929e0651f854f038fba83feced2a9e9
author: cancel <cancel@cancel.fm>
date: Sat Nov 24 03:13:49 EST 2018

Init with basic test

--- /dev/null
+++ b/.clang-format
@@ -1,0 +1,2 @@
+BasedOnStyle: LLVM
+PointerAlignment: Left
--- /dev/null
+++ b/.gitignore
@@ -1,0 +1,46 @@
+# Prerequisites
+*.d
+
+# Object files
+*.o
+*.ko
+*.obj
+*.elf
+
+# Linker output
+*.ilk
+*.map
+*.exp
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Libraries
+*.lib
+*.a
+*.la
+*.lo
+
+# Shared objects (inc. Windows DLLs)
+*.dll
+*.so
+*.so.*
+*.dylib
+
+# Executables
+*.exe
+*.out
+*.app
+*.i*86
+*.x86_64
+*.hex
+
+# Debug files
+*.dSYM/
+*.su
+*.idb
+*.pdb
+
+# Default build dir
+build/
--- /dev/null
+++ b/Makefile
@@ -1,0 +1,20 @@
+basic_flags := -std=c99 -Wall -Wpedantic -Wextra
+debug_flags := -DDEBUG -O0 -ggdb -feliminate-unused-debug-symbols
+library_flags := -lncurses
+source_files := main.c
+
+all: debug
+
+build:
+	mkdir $@
+
+build/debug build/release: | build
+	mkdir $@
+
+.PHONY: debug
+debug: | build/debug
+	cc $(basic_flags) $(debug_flags) $(source_files) -o build/debug/acro $(library_flags)
+
+.PHONY: clean
+clean:
+	rm -rf build
--- /dev/null
+++ b/README.md
@@ -1,0 +1,1 @@
+A basic starting point for an ncurses C99 program.
--- /dev/null
+++ b/main.c
@@ -1,0 +1,23 @@
+#include <ncurses.h>
+
+int main() {
+  initscr();            // Initialize ncurses
+  raw();                // Receive keyboard input immediately
+  noecho();             // Don't echo keyboard input
+  keypad(stdscr, TRUE); // Also receive arrow keys, etc.
+  curs_set(0);          // Hide the terminal cursor
+
+  printw("Type any character to see it in bold\n");
+  refresh();
+  int ch = getch();
+  printw("Your character:\n");
+  attron(A_BOLD);
+  printw("  %c\n", ch);
+  attroff(A_BOLD);
+  printw("Press any key to exit");
+  attroff(A_BOLD);
+  refresh();
+  getch();
+  endwin();
+  return 0;
+}