]> git.mdlowis.com Git - projs/tide.git/commitdiff
tweaked doxygen page layout
authorMichael D. Lowis <mike.lowis@gentex.com>
Wed, 18 Dec 2019 18:31:18 +0000 (13:31 -0500)
committerMichael D. Lowis <mike.lowis@gentex.com>
Wed, 18 Dec 2019 18:31:18 +0000 (13:31 -0500)
30 files changed:
.gitignore
Doxyfile
DoxygenLayout.xml [new file with mode: 0644]
README.md
TODO.md
bin/pfind [deleted file]
bin/rctags [deleted file]
bin/trim [deleted file]
bin/xman [deleted file]
docs/c_scripts.md [new file with mode: 0644]
docs/debugging.md [new file with mode: 0644]
docs/edit_scripts.md [new file with mode: 0644]
docs/pick_scripts.md [new file with mode: 0644]
docs/sys_design.md [new file with mode: 0644]
inc/stdc.h
src/anvil.c
src/edit.c
src/edit.md [new file with mode: 0644]
src/fetch.c
src/fetch.md [new file with mode: 0644]
src/fetchsel.c
src/fetchsel.md [new file with mode: 0644]
src/lib/buf.c
src/pick.c
src/pick.md [new file with mode: 0644]
src/registrar.c
src/registrar.md [new file with mode: 0644]
src/tide.c
src/tide.md [new file with mode: 0644]
src/tsed.c

index 87035ea20862779530d4b7a2683907abd2080c0d..a4b4381ba598d66d2d5b62d192c6a77a3300ec88 100644 (file)
@@ -57,4 +57,4 @@ bin/anvil
 build/
 bin/fetchsel
 pick
-tide
\ No newline at end of file
+tidehtml/
index 4298901b72ea3c9d94516189095abaa48e1b492a..fcc7c213d079c6c3fc09ebaa940e44d3362c6044 100644 (file)
--- a/Doxyfile
+++ b/Doxyfile
@@ -741,7 +741,7 @@ FILE_VERSION_FILTER    =
 # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
 # tag is left empty.
 
-LAYOUT_FILE            =
+LAYOUT_FILE            = DoxygenLayout.xml
 
 # The CITE_BIB_FILES tag can be used to specify one or more bib files containing
 # the reference definitions. This must be a list of .bib files. The .bib
diff --git a/DoxygenLayout.xml b/DoxygenLayout.xml
new file mode 100644 (file)
index 0000000..e2da3f2
--- /dev/null
@@ -0,0 +1,226 @@
+<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>
index 2f9031f0ec7bb2f8cc104134c9c359d3c3eaa75b..40c3505a4b431f03e89b910c0a756d09875b1e93 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1 +1,67 @@
-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           |
+
diff --git a/TODO.md b/TODO.md
index a2c134f15cccf2161b8483ea52a72b6415800a4b..0144b707653ab4d5d9fb03d0c1edd901997b7eff 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -1,8 +1,8 @@
 # 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
@@ -12,7 +12,7 @@
 * 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
@@ -50,12 +50,15 @@ Maybe think about addressing these later:
 * 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                |
diff --git a/bin/pfind b/bin/pfind
deleted file mode 100755 (executable)
index 5f4a64a..0000000
--- a/bin/pfind
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-path="$PWD"
-while [ "$path" != "" ]; do
-    find "$path" -maxdepth 1 -mindepth 1 "$@"
-    path="${path%/*}"
-done
diff --git a/bin/rctags b/bin/rctags
deleted file mode 100755 (executable)
index 73709a7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-ctags -R --exclude="mock*" --exclude="test_*"
diff --git a/bin/trim b/bin/trim
deleted file mode 100755 (executable)
index 4857571..0000000
--- a/bin/trim
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-sed 's/[       ]*$//g' "$@"
diff --git a/bin/xman b/bin/xman
deleted file mode 100755 (executable)
index 38677b7..0000000
--- a/bin/xman
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-mandir=$(mktemp -d "${TMPDIR:-/tmp/}man.XXXXXXXXXXXX")
-man -Pcat "$1" > "$mandir/$1"
-{
-    tide "$mandir/$1" & disown
-} &> /dev/null
-
diff --git a/docs/c_scripts.md b/docs/c_scripts.md
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/docs/debugging.md b/docs/debugging.md
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/docs/edit_scripts.md b/docs/edit_scripts.md
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/docs/pick_scripts.md b/docs/pick_scripts.md
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/docs/sys_design.md b/docs/sys_design.md
new file mode 100644 (file)
index 0000000..5a41b48
--- /dev/null
@@ -0,0 +1 @@
+# Tide System Design
\ No newline at end of file
index ad1c752246e03ccdb17db843d05c223e85ce6f03..8630a4a026305ec0b2519daac2999bd280240c13 100644 (file)
@@ -142,31 +142,6 @@ static inline char* _getopt_(int* p_argc, char*** p_argv) {
 #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
@@ -179,20 +154,6 @@ static inline char* _getopt_(int* p_argc, char*** p_argv) {
         ((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))
@@ -203,4 +164,7 @@ static inline char* _getopt_(int* p_argc, char*** p_argv) {
         ((x) > (y) ? (x) : (y))
 #endif
 
+#define UNITTEST(name) \
+    void unittest_##name(void)
+
 #pragma GCC diagnostic pop
index 3db6ffeccc2785b5cb767da9aa0e3363dbdc862f..6a1b2eba8e84c85b1fc3302da4e893c907d9f8b7 100644 (file)
@@ -1,4 +1,7 @@
-/** @file */
+/**
+    @file
+    @ingroup anvil
+*/
 #include <stdc.h>
 #include <utf.h>
 #include <edit.h>
index 6b070ac81a671dafb056f7a922feb8aca4f2e700..098bee1cd55e746663bba9220a5d72196b5772ec 100644 (file)
@@ -1,4 +1,7 @@
-/** @file */
+/**
+    @file
+    @ingroup edit
+*/
 #include <stdc.h>
 #include <x11.h>
 
diff --git a/src/edit.md b/src/edit.md
new file mode 100644 (file)
index 0000000..3c63c70
--- /dev/null
@@ -0,0 +1 @@
+@defgroup edit
index 28426ba02c624908c32fc8820f03b58457c07b30..322a0af5d1fdc45f5f3f31ac65850e6fecd29b7e 100644 (file)
@@ -1,4 +1,7 @@
-/** @file */
+/**
+    @file
+    @ingroup fetch
+*/
 #include <stdc.h>
 #include <io.h>
 #include <regex.h>
diff --git a/src/fetch.md b/src/fetch.md
new file mode 100644 (file)
index 0000000..fcc5664
--- /dev/null
@@ -0,0 +1 @@
+@defgroup fetch
index 5784b211964f7b7472a260345382556a80908d32..5cd4576472351a884326fc9383ae8d10479a94e8 100644 (file)
@@ -1,4 +1,7 @@
-/** @file */
+/**
+    @file
+    @ingroup fetch
+*/
 #include <stdc.h>
 #include <x11.h>
 
diff --git a/src/fetchsel.md b/src/fetchsel.md
new file mode 100644 (file)
index 0000000..bb77c33
--- /dev/null
@@ -0,0 +1 @@
+@addtogroup fetch
index 017e49ae5a2f55c651b77b86c275dcb9ba4dc338..e7853f8a8452191fd7314f506fa803daf5336997 100644 (file)
@@ -9,6 +9,11 @@
 #include <sys/stat.h>
 #include "config.h"
 
+UNITTEST(foo)
+{
+
+}
+
 #ifndef NDEBUG
 static bool buf_valid(Buf* buf)
 {
index b6dccb8d641c756ad0cf06b0cba12b5ddbbd02fa..4db071a87feae4f052154425a85c4cc757311c63 100644 (file)
@@ -1,4 +1,7 @@
-/** @file */
+/**
+    @file
+    @ingroup pick
+*/
 #include <stdc.h>
 #include <vec.h>
 #include <x11.h>
diff --git a/src/pick.md b/src/pick.md
new file mode 100644 (file)
index 0000000..bae68eb
--- /dev/null
@@ -0,0 +1,3 @@
+@defgroup pick
+
+# PICK COMMAND
\ No newline at end of file
index 43ff8a21bd028678f2f6eb6781c523db0b858a79..4629b55c78af7e319ca57b8c45f3fe57af5fcc85 100644 (file)
@@ -1,4 +1,7 @@
-/** @file */
+/**
+    @file
+    @ingroup registrar
+*/
 #include <stdc.h>
 #include <x11.h>
 #include <io.h>
diff --git a/src/registrar.md b/src/registrar.md
new file mode 100644 (file)
index 0000000..3c769bd
--- /dev/null
@@ -0,0 +1 @@
+@defgroup registrar
index d17b9a53b967b27c32120bf7c8d3fff1cb960f36..40274be45f6bef08dc401e8ef4ea98bf1d8c429b 100644 (file)
@@ -1,4 +1,7 @@
-/** @file */
+/**
+    @file
+    @ingroup tide
+*/
 #include <stdc.h>
 #include <dbc.h>
 #include <utf.h>
@@ -16,6 +19,7 @@ typedef struct {
     char* tag;
     void (*action)(char*);
 } Tag;
+
 void exec_init(Tag* p_tags);
 void exec_cmd(char* cmd);
 void exec_cmdwarg(char* cmd, char* arg);
diff --git a/src/tide.md b/src/tide.md
new file mode 100644 (file)
index 0000000..7b15c10
--- /dev/null
@@ -0,0 +1,2 @@
+@defgroup tide
+HI2!
index 604c70aa7c46e65a3177566e3efc92f51742f164..5af4780bedc045a39e69085bbda44e8c217899a8 100644 (file)
@@ -1,4 +1,7 @@
-/** @file */
+/**
+    @file
+    @ingroup tsed
+*/
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>