--- /dev/null
+<doxygenlayout version="1.0">
+ <!-- Generated by doxygen 1.8.16 -->
+ <!-- Navigation index tabs for HTML output -->
+ <navindex>
+ <tab type="mainpage" visible="yes" title="Home"/>
+<!-- <tab type="pages" visible="yes" title="" intro=""/> -->
+ <tab type="modules" visible="yes" title="" intro=""/>
+ <tab type="namespaces" visible="yes" title="">
+ <tab type="namespacelist" visible="yes" title="" intro=""/>
+ <tab type="namespacemembers" visible="yes" title="" intro=""/>
+ </tab>
+ <tab type="interfaces" visible="yes" title="">
+ <tab type="interfacelist" visible="yes" title="" intro=""/>
+ <tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/>
+ <tab type="interfacehierarchy" visible="yes" title="" intro=""/>
+ </tab>
+ <tab type="classes" visible="yes" title="">
+ <tab type="classlist" visible="yes" title="" intro=""/>
+ <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
+ <tab type="hierarchy" visible="yes" title="" intro=""/>
+ <tab type="classmembers" visible="yes" title="" intro=""/>
+ </tab>
+ <tab type="structs" visible="yes" title="">
+ <tab type="structlist" visible="yes" title="" intro=""/>
+ <tab type="structindex" visible="$ALPHABETICAL_INDEX" title=""/>
+ </tab>
+ <tab type="exceptions" visible="yes" title="">
+ <tab type="exceptionlist" visible="yes" title="" intro=""/>
+ <tab type="exceptionindex" visible="$ALPHABETICAL_INDEX" title=""/>
+ <tab type="exceptionhierarchy" visible="yes" title="" intro=""/>
+ </tab>
+ <tab type="files" visible="yes" title="">
+ <tab type="filelist" visible="yes" title="" intro=""/>
+ <tab type="globals" visible="yes" title="" intro=""/>
+ </tab>
+ <tab type="examples" visible="yes" title="" intro=""/>
+ </navindex>
+
+ <!-- Layout definition for a class page -->
+ <class>
+ <briefdescription visible="yes"/>
+ <includes visible="$SHOW_INCLUDE_FILES"/>
+ <inheritancegraph visible="$CLASS_GRAPH"/>
+ <collaborationgraph visible="$COLLABORATION_GRAPH"/>
+ <memberdecl>
+ <nestedclasses visible="yes" title=""/>
+ <publictypes title=""/>
+ <services title=""/>
+ <interfaces title=""/>
+ <publicslots title=""/>
+ <signals title=""/>
+ <publicmethods title=""/>
+ <publicstaticmethods title=""/>
+ <publicattributes title=""/>
+ <publicstaticattributes title=""/>
+ <protectedtypes title=""/>
+ <protectedslots title=""/>
+ <protectedmethods title=""/>
+ <protectedstaticmethods title=""/>
+ <protectedattributes title=""/>
+ <protectedstaticattributes title=""/>
+ <packagetypes title=""/>
+ <packagemethods title=""/>
+ <packagestaticmethods title=""/>
+ <packageattributes title=""/>
+ <packagestaticattributes title=""/>
+ <properties title=""/>
+ <events title=""/>
+ <privatetypes title=""/>
+ <privateslots title=""/>
+ <privatemethods title=""/>
+ <privatestaticmethods title=""/>
+ <privateattributes title=""/>
+ <privatestaticattributes title=""/>
+ <friends title=""/>
+ <related title="" subtitle=""/>
+ <membergroups visible="yes"/>
+ </memberdecl>
+ <detaileddescription title=""/>
+ <memberdef>
+ <inlineclasses title=""/>
+ <typedefs title=""/>
+ <enums title=""/>
+ <services title=""/>
+ <interfaces title=""/>
+ <constructors title=""/>
+ <functions title=""/>
+ <related title=""/>
+ <variables title=""/>
+ <properties title=""/>
+ <events title=""/>
+ </memberdef>
+ <allmemberslink visible="yes"/>
+ <usedfiles visible="$SHOW_USED_FILES"/>
+ <authorsection visible="yes"/>
+ </class>
+
+ <!-- Layout definition for a namespace page -->
+ <namespace>
+ <briefdescription visible="yes"/>
+ <memberdecl>
+ <nestednamespaces visible="yes" title=""/>
+ <constantgroups visible="yes" title=""/>
+ <interfaces visible="yes" title=""/>
+ <classes visible="yes" title=""/>
+ <structs visible="yes" title=""/>
+ <exceptions visible="yes" title=""/>
+ <typedefs title=""/>
+ <sequences title=""/>
+ <dictionaries title=""/>
+ <enums title=""/>
+ <functions title=""/>
+ <variables title=""/>
+ <membergroups visible="yes"/>
+ </memberdecl>
+ <detaileddescription title=""/>
+ <memberdef>
+ <inlineclasses title=""/>
+ <typedefs title=""/>
+ <sequences title=""/>
+ <dictionaries title=""/>
+ <enums title=""/>
+ <functions title=""/>
+ <variables title=""/>
+ </memberdef>
+ <authorsection visible="yes"/>
+ </namespace>
+
+ <!-- Layout definition for a file page -->
+ <file>
+ <briefdescription visible="yes"/>
+ <includes visible="$SHOW_INCLUDE_FILES"/>
+ <includegraph visible="$INCLUDE_GRAPH"/>
+ <includedbygraph visible="$INCLUDED_BY_GRAPH"/>
+ <sourcelink visible="yes"/>
+ <memberdecl>
+ <interfaces visible="yes" title=""/>
+ <classes visible="yes" title=""/>
+ <structs visible="yes" title=""/>
+ <exceptions visible="yes" title=""/>
+ <namespaces visible="yes" title=""/>
+ <constantgroups visible="yes" title=""/>
+ <defines title=""/>
+ <typedefs title=""/>
+ <sequences title=""/>
+ <dictionaries title=""/>
+ <enums title=""/>
+ <functions title=""/>
+ <variables title=""/>
+ <membergroups visible="yes"/>
+ </memberdecl>
+ <detaileddescription title=""/>
+ <memberdef>
+ <inlineclasses title=""/>
+ <defines title=""/>
+ <typedefs title=""/>
+ <sequences title=""/>
+ <dictionaries title=""/>
+ <enums title=""/>
+ <functions title=""/>
+ <variables title=""/>
+ </memberdef>
+ <authorsection/>
+ </file>
+
+ <!-- Layout definition for a group page -->
+ <group>
+ <briefdescription visible="yes"/>
+ <groupgraph visible="$GROUP_GRAPHS"/>
+ <memberdecl>
+ <nestedgroups visible="yes" title=""/>
+ <dirs visible="yes" title=""/>
+ <files visible="yes" title=""/>
+ <namespaces visible="yes" title=""/>
+ <classes visible="yes" title=""/>
+ <defines title=""/>
+ <typedefs title=""/>
+ <sequences title=""/>
+ <dictionaries title=""/>
+ <enums title=""/>
+ <enumvalues title=""/>
+ <functions title=""/>
+ <variables title=""/>
+ <signals title=""/>
+ <publicslots title=""/>
+ <protectedslots title=""/>
+ <privateslots title=""/>
+ <events title=""/>
+ <properties title=""/>
+ <friends title=""/>
+ <membergroups visible="yes"/>
+ </memberdecl>
+ <detaileddescription title=""/>
+ <memberdef>
+ <pagedocs/>
+ <inlineclasses title=""/>
+ <defines title=""/>
+ <typedefs title=""/>
+ <sequences title=""/>
+ <dictionaries title=""/>
+ <enums title=""/>
+ <enumvalues title=""/>
+ <functions title=""/>
+ <variables title=""/>
+ <signals title=""/>
+ <publicslots title=""/>
+ <protectedslots title=""/>
+ <privateslots title=""/>
+ <events title=""/>
+ <properties title=""/>
+ <friends title=""/>
+ </memberdef>
+ <authorsection visible="yes"/>
+ </group>
+
+ <!-- Layout definition for a directory page -->
+ <directory>
+ <briefdescription visible="yes"/>
+ <directorygraph visible="yes"/>
+ <memberdecl>
+ <dirs visible="yes"/>
+ <files visible="yes"/>
+ </memberdecl>
+ <detaileddescription title=""/>
+ </directory>
+</doxygenlayout>
-Hi!
\ No newline at end of file
+# Tide Text Editor
+
+A minimal text editor inspired by the Acme text editor from Plan 9.
+
+## Building
+
+**Build Prerequisites:**
+
+* A Unix-like environment
+* Ruby 2.5.1 or greater
+
+Execute the following command to produce all of the binaries into bin/:
+
+ make
+
+
+## Installation
+
+ # optionally set the prefix for where it will be installed (*Default:* /usr/local/)
+ export PREFIX=$HOME
+
+ # build and install
+ make install
+
+## Usage
+
+ edit file1 file 2 file3
+
+## System Overview
+
+* [System Design Document](docs/sys_design.md)
+* [Software Architecture Document](google.com)
+
+## Executable Overview
+
+### Compiled Executables
+
+| Executable | Description |
+|-----------------------|--------------------------------------------------|
+| @ref edit | Main executable used to open files for editing |
+| @ref fetch | Executes pattern matching rules on input text |
+| @ref fetch "Fetchsel" | Executes pattern matching rules on selected text |
+| @ref pick | Performs fuzzy search on a set of strings |
+| @ref registrar | Tracks open windows and the files they contain |
+| @ref tide | The main tide editor executable |
+
+### Helper Scripts
+
+| Executable | Description |
+|-----------------------------------|----------------------------------------------------------------|
+| [E-S and S-E](docs/c_scripts.md) | Convert C functions between static and extern scoping |
+| [c+ and c-](docs/edit_scripts.md) | Comment and uncomment selected text |
+| [fcomplete](docs/pick_scripts.md) | Uses @ref pick to complete a file or directory path |
+| [findall](docs/edit_scripts.md) | Find all occurrences of a string in the project or directory |
+| [grepn](docs/edit_scripts.md) | Executes grep -n on input and outputs to a new window |
+| [i+ and i-](docs/edit_scripts.md) | Indent or deindent input text |
+| [jmpsrc](docs/c_scripts.md) | Jump between related C source and header files |
+| [lang](docs/edit_scripts.md) | Determine by extension the programming language of source file |
+| [no-c++](docs/c_scripts.md) | Convert all C++ style comments to C style comments |
+| [pickexec](docs/pick_scripts.md) | Uses @ref pick to find and execute an command in $PATH |
+| [pickfile](docs/pick_scripts.md) | Uses @ref pick to find and open a file for editing |
+| [picktag](docs/pick_scripts.md) | Uses @ref pick to jump to a symbol using CTags index file |
+| [term](docs/edit_scripts.md) | Executes command shell in @ref tide in pseudo-terminal mode |
+| [tofn](docs/c_scripts.md) | Converts C function prototypes to function definitions |
+| [view-telem](docs/debugging.md) | Prints @ref tide telemetry data to stdout for debugging |
+| [w+ and x+](docs/edit_scripts.md) | Marks the current file as writable and/or executable |
+
# Issue List
-## VERIFYING
+### VERIFYING
-## STAGING
+### STAGING
* tide: point should be added to editlog to ensure undo/redo behave appropriately
* picktag: reimplement in C using binary search
* all: eliminate multiple return statements and other lint
* tide: byrune, byword, byline functions should be hidden in buf.c
-## BACKLOG
+### BACKLOG
* tide: commands unadorned by a sigil should direct output to new scratch window
* tide: gap buffer does not handle UTF-8 currently
* right click negative numbers should jump to that many lines from the end of file
Mouse Chords:
-1P Move the cursor
-1P 1R 1P Select clicked on word
-1P 1R 1P 1R 1P Select whole non whitespace thing
-2P 2R Execute clicked word
-2P 1P 2R Execute clicked word with argument
-3P 3R Fetch clicked word
-3P 1P 3R ?? Go to definition ??
-1P 2P 2R Cut the selected text
-1P 3P 3R Paste the selection
+
+| Sequence | Action |
+|----------------|------------------------------------|
+| 1P | Move the cursor |
+| 1P 1R 1P | Select clicked on word |
+| 1P 1R 1P 1R 1P | Select whole non whitespace thing |
+| 2P 2R | Execute clicked word |
+| 2P 1P 2R | Execute clicked word with argument |
+| 3P 3R | Fetch clicked word |
+| 3P 1P 3R | ?? Go to definition ?? |
+| 1P 2P 2R | Cut the selected text |
+| 1P 3P 3R | Paste the selection |
#define OPTLONG \
case '-'
-/* Error Handling
- *****************************************************************************/
-#define trace() \
- fprintf(stderr, "%s:%d\n", __FILE__, __LINE__)
-
-#ifdef NDEBUG
- #define debug(msg, ...) \
- ((void)0)
-#else
- #define debug(msg, ...) \
- fprintf(stderr, "DEBUG %s:%d: " msg "\n", __FILE__, __LINE__, ##__VA_ARGS__)
-#endif
-
-#define errnostr() \
- (errno == 0 ? "None" : strerror(errno))
-
-#define print_error(msg, ...) \
- fprintf(stderr, "[ERROR] (%s:%d: errno: %s) " msg "\n", __FILE__, __LINE__, errnostr(), ##__VA_ARGS__)
-
-#define check(expr, msg, ...) \
- if(!(expr)) { print_error(msg, ##__VA_ARGS__); errno=0; goto error; }
-
-#define sentinel(msg, ...) \
- { print_error(msg, ##__VA_ARGS__); errno=0; goto error; }
-
/* Miscellaneous
*****************************************************************************/
#ifndef nelem
((type*)((uintptr_t)obj - offsetof(type, member)))
#endif
-#define concat(a,b) \
- a##b
-
-#define ident(a) \
- concat(id, a)
-
-#define unique_id \
- ident(__LINE__)
-
-#ifndef static_assert
- #define static_assert(expr) \
- typedef char unique_id[( expr )?1:-1]
-#endif
-
#ifndef min
#define min(x,y) \
((x) < (y) ? (x) : (y))
((x) > (y) ? (x) : (y))
#endif
+#define UNITTEST(name) \
+ void unittest_##name(void)
+
#pragma GCC diagnostic pop