diff options
author | Louie S <louie@example.com> | 2023-06-30 10:57:04 -0700 |
---|---|---|
committer | Louie S <louie@example.com> | 2023-06-30 10:57:04 -0700 |
commit | 33e27b2c2796aa98fb7e48079187b01a2e59d72a (patch) | |
tree | d93fec7bc0e0c84716792217de456137901205f9 /src | |
parent | 4333cd2b11cc32fe75fa1ef31627c667bcc71327 (diff) |
draw skeleton
Diffstat (limited to 'src')
-rw-r--r-- | src/.deps/draw.Po | 132 | ||||
-rw-r--r-- | src/.deps/entry.Po | 30 | ||||
-rw-r--r-- | src/.deps/group.Po | 30 | ||||
-rw-r--r-- | src/.deps/main.Po | 3 | ||||
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/Makefile.in | 104 | ||||
-rw-r--r-- | src/draw.c | 23 | ||||
-rw-r--r-- | src/draw.h | 10 | ||||
-rw-r--r-- | src/entry.h | 5 | ||||
-rw-r--r-- | src/group.h | 5 | ||||
-rw-r--r-- | src/main.c | 3 |
11 files changed, 333 insertions, 16 deletions
diff --git a/src/.deps/draw.Po b/src/.deps/draw.Po new file mode 100644 index 0000000..a6b43e7 --- /dev/null +++ b/src/.deps/draw.Po @@ -0,0 +1,132 @@ +draw.o: draw.c /usr/include/stdc-predef.h /usr/include/curses.h \ + /usr/include/ncurses_dll.h \ + /usr/lib/gcc/x86_64-linux-gnu/12/include/stdint.h /usr/include/stdint.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/time64.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-intn.h \ + /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h /usr/include/stdio.h \ + /usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h \ + /usr/lib/gcc/x86_64-linux-gnu/12/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/floatn.h \ + /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/lib/gcc/x86_64-linux-gnu/12/include/stdbool.h /usr/include/unctrl.h \ + /usr/include/signal.h \ + /usr/include/x86_64-linux-gnu/bits/signum-generic.h \ + /usr/include/x86_64-linux-gnu/bits/signum-arch.h \ + /usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endianness.h \ + /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-arch.h \ + /usr/include/x86_64-linux-gnu/bits/siginfo-consts.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigval_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h \ + /usr/include/x86_64-linux-gnu/bits/sigevent-consts.h \ + /usr/include/x86_64-linux-gnu/bits/sigaction.h \ + /usr/include/x86_64-linux-gnu/bits/sigcontext.h \ + /usr/include/x86_64-linux-gnu/bits/types/stack_t.h \ + /usr/include/x86_64-linux-gnu/sys/ucontext.h \ + /usr/include/x86_64-linux-gnu/bits/sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/sigstksz.h \ + /usr/include/x86_64-linux-gnu/bits/ss_flags.h \ + /usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/x86_64-linux-gnu/bits/sigthread.h \ + /usr/include/x86_64-linux-gnu/bits/signal_ext.h draw.h +/usr/include/stdc-predef.h: +/usr/include/curses.h: +/usr/include/ncurses_dll.h: +/usr/lib/gcc/x86_64-linux-gnu/12/include/stdint.h: +/usr/include/stdint.h: +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: +/usr/include/features.h: +/usr/include/features-time64.h: +/usr/include/x86_64-linux-gnu/bits/wordsize.h: +/usr/include/x86_64-linux-gnu/bits/timesize.h: +/usr/include/x86_64-linux-gnu/sys/cdefs.h: +/usr/include/x86_64-linux-gnu/bits/long-double.h: +/usr/include/x86_64-linux-gnu/gnu/stubs.h: +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: +/usr/include/x86_64-linux-gnu/bits/types.h: +/usr/include/x86_64-linux-gnu/bits/typesizes.h: +/usr/include/x86_64-linux-gnu/bits/time64.h: +/usr/include/x86_64-linux-gnu/bits/wchar.h: +/usr/include/x86_64-linux-gnu/bits/stdint-intn.h: +/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h: +/usr/include/stdio.h: +/usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h: +/usr/lib/gcc/x86_64-linux-gnu/12/include/stdarg.h: +/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: +/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: +/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: +/usr/include/x86_64-linux-gnu/bits/types/__FILE.h: +/usr/include/x86_64-linux-gnu/bits/types/FILE.h: +/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: +/usr/include/x86_64-linux-gnu/bits/floatn.h: +/usr/include/x86_64-linux-gnu/bits/floatn-common.h: +/usr/include/x86_64-linux-gnu/bits/stdio.h: +/usr/lib/gcc/x86_64-linux-gnu/12/include/stdbool.h: +/usr/include/unctrl.h: +/usr/include/signal.h: +/usr/include/x86_64-linux-gnu/bits/signum-generic.h: +/usr/include/x86_64-linux-gnu/bits/signum-arch.h: +/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h: +/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: +/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: +/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: +/usr/include/x86_64-linux-gnu/bits/endian.h: +/usr/include/x86_64-linux-gnu/bits/endianness.h: +/usr/include/x86_64-linux-gnu/bits/types/time_t.h: +/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h: +/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h: +/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h: +/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h: +/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h: +/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h: +/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h: +/usr/include/x86_64-linux-gnu/bits/sigaction.h: +/usr/include/x86_64-linux-gnu/bits/sigcontext.h: +/usr/include/x86_64-linux-gnu/bits/types/stack_t.h: +/usr/include/x86_64-linux-gnu/sys/ucontext.h: +/usr/include/x86_64-linux-gnu/bits/sigstack.h: +/usr/include/x86_64-linux-gnu/bits/sigstksz.h: +/usr/include/x86_64-linux-gnu/bits/ss_flags.h: +/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h: +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: +/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: +/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: +/usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h: +/usr/include/x86_64-linux-gnu/bits/struct_mutex.h: +/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: +/usr/include/x86_64-linux-gnu/bits/sigthread.h: +/usr/include/x86_64-linux-gnu/bits/signal_ext.h: +draw.h: diff --git a/src/.deps/entry.Po b/src/.deps/entry.Po new file mode 100644 index 0000000..9ab842f --- /dev/null +++ b/src/.deps/entry.Po @@ -0,0 +1,30 @@ +entry.o: entry.c /usr/include/stdc-predef.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h entry.h ../config.h +/usr/include/stdc-predef.h: +/usr/include/string.h: +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: +/usr/include/features.h: +/usr/include/features-time64.h: +/usr/include/x86_64-linux-gnu/bits/wordsize.h: +/usr/include/x86_64-linux-gnu/bits/timesize.h: +/usr/include/x86_64-linux-gnu/sys/cdefs.h: +/usr/include/x86_64-linux-gnu/bits/long-double.h: +/usr/include/x86_64-linux-gnu/gnu/stubs.h: +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: +/usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h: +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: +/usr/include/strings.h: +entry.h: +../config.h: diff --git a/src/.deps/group.Po b/src/.deps/group.Po new file mode 100644 index 0000000..d0b5f54 --- /dev/null +++ b/src/.deps/group.Po @@ -0,0 +1,30 @@ +group.o: group.c /usr/include/stdc-predef.h /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/bits/timesize.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/long-double.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h \ + /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ + /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/strings.h group.h ../config.h +/usr/include/stdc-predef.h: +/usr/include/string.h: +/usr/include/x86_64-linux-gnu/bits/libc-header-start.h: +/usr/include/features.h: +/usr/include/features-time64.h: +/usr/include/x86_64-linux-gnu/bits/wordsize.h: +/usr/include/x86_64-linux-gnu/bits/timesize.h: +/usr/include/x86_64-linux-gnu/sys/cdefs.h: +/usr/include/x86_64-linux-gnu/bits/long-double.h: +/usr/include/x86_64-linux-gnu/gnu/stubs.h: +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: +/usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h: +/usr/include/x86_64-linux-gnu/bits/types/locale_t.h: +/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: +/usr/include/strings.h: +group.h: +../config.h: diff --git a/src/.deps/main.Po b/src/.deps/main.Po new file mode 100644 index 0000000..6fcf694 --- /dev/null +++ b/src/.deps/main.Po @@ -0,0 +1,3 @@ +main.o: main.c /usr/include/stdc-predef.h draw.h +/usr/include/stdc-predef.h: +draw.h: diff --git a/src/Makefile.am b/src/Makefile.am index cbf841f..f4e5a8b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,2 +1,4 @@ bin_PROGRAMS = assignment-list-tui -assignment_list_tui_SOURCES = main.c entry.c entry.h group.c group.h +assignment_list_tui_SOURCES = main.c draw.c draw.h entry.c entry.h group.c group.h +assignment_list_tui_LDADD = @CURSES_LIBS@ +assignment_list_tui_CPPFLAGS = @CURSES_CFLAGS@ diff --git a/src/Makefile.in b/src/Makefile.in index ec350d5..0646952 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -99,10 +99,12 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) -am_assignment_list_tui_OBJECTS = main.$(OBJEXT) entry.$(OBJEXT) \ - group.$(OBJEXT) +am_assignment_list_tui_OBJECTS = assignment_list_tui-main.$(OBJEXT) \ + assignment_list_tui-draw.$(OBJEXT) \ + assignment_list_tui-entry.$(OBJEXT) \ + assignment_list_tui-group.$(OBJEXT) assignment_list_tui_OBJECTS = $(am_assignment_list_tui_OBJECTS) -assignment_list_tui_LDADD = $(LDADD) +assignment_list_tui_DEPENDENCIES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -118,9 +120,15 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/entry.Po ./$(DEPDIR)/group.Po \ - ./$(DEPDIR)/main.Po +am__depfiles_remade = ./$(DEPDIR)/assignment_list_tui-draw.Po \ + ./$(DEPDIR)/assignment_list_tui-entry.Po \ + ./$(DEPDIR)/assignment_list_tui-group.Po \ + ./$(DEPDIR)/assignment_list_tui-main.Po am__mv = mv -f +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) @@ -172,6 +180,8 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ +CURSES_CFLAGS = @CURSES_CFLAGS@ +CURSES_LIBS = @CURSES_LIBS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -200,6 +210,9 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -247,7 +260,9 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -assignment_list_tui_SOURCES = main.c entry.c entry.h group.c group.h +assignment_list_tui_SOURCES = main.c draw.c draw.h entry.c entry.h group.c group.h +assignment_list_tui_LDADD = @CURSES_LIBS@ +assignment_list_tui_CPPFLAGS = @CURSES_CFLAGS@ all: all-am .SUFFIXES: @@ -334,9 +349,10 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entry.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/group.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assignment_list_tui-draw.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assignment_list_tui-entry.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assignment_list_tui-group.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assignment_list_tui-main.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @@ -358,6 +374,62 @@ am--depfiles: $(am__depfiles_remade) @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +assignment_list_tui-main.o: main.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(assignment_list_tui_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assignment_list_tui-main.o -MD -MP -MF $(DEPDIR)/assignment_list_tui-main.Tpo -c -o assignment_list_tui-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/assignment_list_tui-main.Tpo $(DEPDIR)/assignment_list_tui-main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='assignment_list_tui-main.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(assignment_list_tui_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assignment_list_tui-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c + +assignment_list_tui-main.obj: main.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(assignment_list_tui_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assignment_list_tui-main.obj -MD -MP -MF $(DEPDIR)/assignment_list_tui-main.Tpo -c -o assignment_list_tui-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/assignment_list_tui-main.Tpo $(DEPDIR)/assignment_list_tui-main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='assignment_list_tui-main.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(assignment_list_tui_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assignment_list_tui-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` + +assignment_list_tui-draw.o: draw.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(assignment_list_tui_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assignment_list_tui-draw.o -MD -MP -MF $(DEPDIR)/assignment_list_tui-draw.Tpo -c -o assignment_list_tui-draw.o `test -f 'draw.c' || echo '$(srcdir)/'`draw.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/assignment_list_tui-draw.Tpo $(DEPDIR)/assignment_list_tui-draw.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='draw.c' object='assignment_list_tui-draw.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(assignment_list_tui_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assignment_list_tui-draw.o `test -f 'draw.c' || echo '$(srcdir)/'`draw.c + +assignment_list_tui-draw.obj: draw.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(assignment_list_tui_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assignment_list_tui-draw.obj -MD -MP -MF $(DEPDIR)/assignment_list_tui-draw.Tpo -c -o assignment_list_tui-draw.obj `if test -f 'draw.c'; then $(CYGPATH_W) 'draw.c'; else $(CYGPATH_W) '$(srcdir)/draw.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/assignment_list_tui-draw.Tpo $(DEPDIR)/assignment_list_tui-draw.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='draw.c' object='assignment_list_tui-draw.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(assignment_list_tui_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assignment_list_tui-draw.obj `if test -f 'draw.c'; then $(CYGPATH_W) 'draw.c'; else $(CYGPATH_W) '$(srcdir)/draw.c'; fi` + +assignment_list_tui-entry.o: entry.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(assignment_list_tui_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assignment_list_tui-entry.o -MD -MP -MF $(DEPDIR)/assignment_list_tui-entry.Tpo -c -o assignment_list_tui-entry.o `test -f 'entry.c' || echo '$(srcdir)/'`entry.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/assignment_list_tui-entry.Tpo $(DEPDIR)/assignment_list_tui-entry.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='entry.c' object='assignment_list_tui-entry.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(assignment_list_tui_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assignment_list_tui-entry.o `test -f 'entry.c' || echo '$(srcdir)/'`entry.c + +assignment_list_tui-entry.obj: entry.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(assignment_list_tui_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assignment_list_tui-entry.obj -MD -MP -MF $(DEPDIR)/assignment_list_tui-entry.Tpo -c -o assignment_list_tui-entry.obj `if test -f 'entry.c'; then $(CYGPATH_W) 'entry.c'; else $(CYGPATH_W) '$(srcdir)/entry.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/assignment_list_tui-entry.Tpo $(DEPDIR)/assignment_list_tui-entry.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='entry.c' object='assignment_list_tui-entry.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(assignment_list_tui_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assignment_list_tui-entry.obj `if test -f 'entry.c'; then $(CYGPATH_W) 'entry.c'; else $(CYGPATH_W) '$(srcdir)/entry.c'; fi` + +assignment_list_tui-group.o: group.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(assignment_list_tui_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assignment_list_tui-group.o -MD -MP -MF $(DEPDIR)/assignment_list_tui-group.Tpo -c -o assignment_list_tui-group.o `test -f 'group.c' || echo '$(srcdir)/'`group.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/assignment_list_tui-group.Tpo $(DEPDIR)/assignment_list_tui-group.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='group.c' object='assignment_list_tui-group.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(assignment_list_tui_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assignment_list_tui-group.o `test -f 'group.c' || echo '$(srcdir)/'`group.c + +assignment_list_tui-group.obj: group.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(assignment_list_tui_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assignment_list_tui-group.obj -MD -MP -MF $(DEPDIR)/assignment_list_tui-group.Tpo -c -o assignment_list_tui-group.obj `if test -f 'group.c'; then $(CYGPATH_W) 'group.c'; else $(CYGPATH_W) '$(srcdir)/group.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/assignment_list_tui-group.Tpo $(DEPDIR)/assignment_list_tui-group.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='group.c' object='assignment_list_tui-group.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(assignment_list_tui_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assignment_list_tui-group.obj `if test -f 'group.c'; then $(CYGPATH_W) 'group.c'; else $(CYGPATH_W) '$(srcdir)/group.c'; fi` + ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am @@ -484,9 +556,10 @@ clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am - -rm -f ./$(DEPDIR)/entry.Po - -rm -f ./$(DEPDIR)/group.Po - -rm -f ./$(DEPDIR)/main.Po + -rm -f ./$(DEPDIR)/assignment_list_tui-draw.Po + -rm -f ./$(DEPDIR)/assignment_list_tui-entry.Po + -rm -f ./$(DEPDIR)/assignment_list_tui-group.Po + -rm -f ./$(DEPDIR)/assignment_list_tui-main.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -532,9 +605,10 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -f ./$(DEPDIR)/entry.Po - -rm -f ./$(DEPDIR)/group.Po - -rm -f ./$(DEPDIR)/main.Po + -rm -f ./$(DEPDIR)/assignment_list_tui-draw.Po + -rm -f ./$(DEPDIR)/assignment_list_tui-entry.Po + -rm -f ./$(DEPDIR)/assignment_list_tui-group.Po + -rm -f ./$(DEPDIR)/assignment_list_tui-main.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic diff --git a/src/draw.c b/src/draw.c new file mode 100644 index 0000000..75d4dbe --- /dev/null +++ b/src/draw.c @@ -0,0 +1,23 @@ +#include <curses.h> +#include <signal.h> + +#include "draw.h" + +void tui_init() { + int input; // capture user input + + // set an interrupt to end cleanly + signal(SIGINT, tui_end); + + // init and set options + initscr(); + keypad(stdscr, TRUE); // enable arrow keys and other function keys + cbreak(); // set for interactive curses applications + + input = getch(); + tui_end(); +} + +void tui_end() { + endwin(); +} diff --git a/src/draw.h b/src/draw.h new file mode 100644 index 0000000..8a39605 --- /dev/null +++ b/src/draw.h @@ -0,0 +1,10 @@ +#ifndef DRAW_H +#define DRAW_H + +// initialize the tui +void tui_init(); + +// destroy the tui +void tui_end(); + +#endif diff --git a/src/entry.h b/src/entry.h index eb3d88e..2a9f38b 100644 --- a/src/entry.h +++ b/src/entry.h @@ -1,3 +1,6 @@ +#ifndef ENTRY_H +#define ENTRY_H + #include "../config.h" // a group/category for entries to be put in @@ -23,3 +26,5 @@ void entry_set_title(Entry *e, char *title); void entry_set_color(Entry *e, char *color); void entry_set_highlight(Entry *e, char *highlight); void entry_set_url(Entry *e, char *url); + +#endif diff --git a/src/group.h b/src/group.h index 1178edd..2d626b7 100644 --- a/src/group.h +++ b/src/group.h @@ -1,3 +1,6 @@ +#ifndef GROUP_H +#define GROUP_H + #include "../config.h" // a group/category for entries to be put in @@ -17,3 +20,5 @@ char *group_get_url(Group *g); void group_set_name(Group *g, char *name); void group_set_desc(Group *g, char *desc); void group_set_url(Group *g, char *url); + +#endif @@ -1,4 +1,7 @@ +#include "draw.h" int main() { + tui_init(); + return 0; } |