built out the feature list and roadmap pages some more, lots of progress formalizing the document writer
parent
9154ec552f
commit
4398a4e0b6
34
TODO.txt
34
TODO.txt
|
@ -77,6 +77,7 @@
|
|||
; [X] make panel resizing not whacky with child panels
|
||||
; [X] visual studio file saves aren't picked up by the file track system
|
||||
; [X] findstr format not quite working
|
||||
; [X] over left-shifting the view?
|
||||
;
|
||||
; [] indication on failure to save
|
||||
; [] history is broken, revist the entire system
|
||||
|
@ -86,7 +87,6 @@
|
|||
; [] view fails to follow cursor when the view is shrunk
|
||||
; [] view fails to follow cursor after deleting long line
|
||||
;
|
||||
; [] over left-shifting the view?
|
||||
;
|
||||
|
||||
; BEFORE I SHIP
|
||||
|
@ -190,8 +190,8 @@
|
|||
; [X] get the navigation working correctly around multi-glyph characters
|
||||
; [] provide full cursor positioning in buffers
|
||||
; [] provide cursor positioning system that does columns correctly
|
||||
; [] binary buffer mode
|
||||
; [] unicode buffer mode
|
||||
; [] binary buffer mode
|
||||
; [] support full length unicode file names
|
||||
|
||||
; [] user file bar string
|
||||
|
@ -224,20 +224,17 @@
|
|||
|
||||
; meta programming system
|
||||
; [X] condense system into single meta compiler
|
||||
; [X] formalize the documentation writer so the TOC can be better and so it's easier to shoot off other docs
|
||||
; [] formalize the rewriter for the 4coder_string.h so it can be used for other single header libs
|
||||
; [] formalize the documentation writer so the TOC can be better and so it's easier to shoot off other docs
|
||||
; [] profile and optimize the current metagen system
|
||||
; [] expand the use of 4coder_types.h to also allow static variable and function declarations
|
||||
; [] get more of the helper functions going through the documentation system
|
||||
; [] method of pulling the documentation line from another item rather than copy-pasting the text.
|
||||
; [] method of virtually pulling the documentation line from another item rather than copy-pasting the text.
|
||||
;
|
||||
|
||||
; GUI related tech
|
||||
; [X] consolidate all GUI code properly
|
||||
; [X] rewrite GUI
|
||||
; [X] arrow navigation of GUIs
|
||||
; [] scroll bar position and size options
|
||||
; [] GUI API
|
||||
; [] scroll bar options
|
||||
; [] buffer driven GUI experiment
|
||||
;
|
||||
|
||||
; search related tech
|
||||
|
@ -251,16 +248,11 @@
|
|||
;
|
||||
|
||||
; theme related business
|
||||
; [] fix the versioning system for themes
|
||||
; [] theme switch per panel?
|
||||
; [] allow multiple font faces with effects
|
||||
;
|
||||
|
||||
; control schemes
|
||||
; [] emacs style sub-maps
|
||||
; [] vim style modes
|
||||
; [] vim keys
|
||||
; [] sublime style editing
|
||||
; [] "tap typing"
|
||||
; [] command meta data
|
||||
; [] macros
|
||||
;
|
||||
|
@ -281,7 +273,7 @@
|
|||
; [] fancy code presentation mode
|
||||
;
|
||||
|
||||
; [] switch based word complete
|
||||
; [] switch-case-enum based word complete
|
||||
; [] keep copy of unedited orignal maybe? (compressed? restore by history?)
|
||||
;
|
||||
; [] diff
|
||||
|
@ -291,7 +283,6 @@
|
|||
; [] polish for hot directories
|
||||
;
|
||||
; [] tutorials
|
||||
; [] 4edT thing
|
||||
; [] console emulator
|
||||
;
|
||||
; [] 10 GB text file
|
||||
|
@ -303,6 +294,7 @@
|
|||
; [X] change job canceling to a polling based thing
|
||||
; [] hashed string pool for clipboard/filenames/etc
|
||||
; [] new profiling/debugging system
|
||||
; [] new testing system
|
||||
;
|
||||
|
||||
; EASY TODOS
|
||||
|
@ -354,10 +346,10 @@
|
|||
; [] file drag and drop
|
||||
; [] allow for multiple clipboards
|
||||
; [] OS X port
|
||||
; [] 4coder code compiling
|
||||
; [] opengl window up
|
||||
; [] basic versions of system functions
|
||||
; [] get 4coder to render to window
|
||||
; [X] 4coder code compiling
|
||||
; [X] opengl window up
|
||||
; [X] basic versions of system functions
|
||||
; [X] get 4coder to render to window
|
||||
; [] keyboard and mouse input
|
||||
; [] file exchange
|
||||
; [] clipboard
|
||||
|
|
73
build.cpp
73
build.cpp
|
@ -115,11 +115,17 @@ typedef union _LARGE_INTEGER {
|
|||
# define WINAPI
|
||||
#endif
|
||||
|
||||
extern "C" DWORD WINAPI GetCurrentDirectoryA(_In_ DWORD nBufferLength, _Out_ LPTSTR lpBuffer);
|
||||
extern "C" BOOL WINAPI QueryPerformanceCounter(_Out_ LARGE_INTEGER *lpPerformanceCount);
|
||||
extern "C" BOOL WINAPI QueryPerformanceFrequency(_Out_ LARGE_INTEGER *lpFrequency);
|
||||
extern "C" BOOL WINAPI CreateDirectoryA(_In_ LPCTSTR lpPathName, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes);
|
||||
extern "C" BOOL WINAPI CopyFileA(_In_ LPCTSTR lpExistingFileName, _In_ LPCTSTR lpNewFileName, _In_ BOOL bFailIfExists);
|
||||
extern "C"{
|
||||
DWORD WINAPI GetCurrentDirectoryA(_In_ DWORD nBufferLength, _Out_ LPTSTR lpBuffer);
|
||||
|
||||
BOOL WINAPI QueryPerformanceCounter(_Out_ LARGE_INTEGER *lpPerformanceCount);
|
||||
|
||||
BOOL WINAPI QueryPerformanceFrequency(_Out_ LARGE_INTEGER *lpFrequency);
|
||||
|
||||
BOOL WINAPI CreateDirectoryA(_In_ LPCTSTR lpPathName, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes);
|
||||
|
||||
BOOL WINAPI CopyFileA(_In_ LPCTSTR lpExistingFileName, _In_ LPCTSTR lpNewFileName, _In_ BOOL bFailIfExists);
|
||||
}
|
||||
|
||||
static uint64_t perf_frequency;
|
||||
|
||||
|
@ -157,12 +163,14 @@ get_current_directory(char *buffer, int32_t max){
|
|||
static void
|
||||
execute(char *dir, char *str, char *args){
|
||||
if (dir){
|
||||
Temp_Dir temp = pushdir(dir);
|
||||
if (args){
|
||||
systemf("pushd %s & call \"%s\" %s", dir, str, args);
|
||||
systemf("call \"%s\" %s", str, args);
|
||||
}
|
||||
else{
|
||||
systemf("pushd %s & call \"%s\"", dir, str);
|
||||
systemf("call \"%s\"", str);
|
||||
}
|
||||
popdir(temp);
|
||||
}
|
||||
else{
|
||||
if (args){
|
||||
|
@ -266,7 +274,10 @@ zip(char *parent, char *folder, char *dest){
|
|||
slash_fix(parent);
|
||||
slash_fix(dest);
|
||||
|
||||
systemf("pushd %s & %s\\zip %s\\4tech_gobble.zip", parent, cdir, cdir);
|
||||
Temp_Dir temp = pushdir(parent);
|
||||
systemf("%s\\zip %s\\4tech_gobble.zip", cdir, cdir);
|
||||
popdir(temp);
|
||||
|
||||
systemf("copy %s\\4tech_gobble.zip %s & del %s\\4tech_gobble.zip", cdir, dest, cdir);
|
||||
}
|
||||
|
||||
|
@ -281,7 +292,7 @@ pushdir(char *dir){
|
|||
char *result = getcwd(temp.dir, sizeof(temp.dir));
|
||||
int32_t chresult = chdir(dir);
|
||||
if (result == 0 || chresult != 0){
|
||||
printf("trying pushd %s\n", dir);
|
||||
printf("trying pushdir %s\n", dir);
|
||||
assert(result != 0);
|
||||
assert(chresult == 0);
|
||||
}
|
||||
|
@ -512,23 +523,21 @@ init_build_line(Build_Line *line){
|
|||
"/wd4127 /wd4510 /wd4512 /wd4610 /wd4390 /WX " \
|
||||
"/GR- /EHa- /nologo /FC"
|
||||
|
||||
#define CL_INCLUDES \
|
||||
"/I..\\foreign /I..\\foreign\\freetype2"
|
||||
#define CL_INCLUDES "/I..\\foreign /I..\\foreign\\freetype2"
|
||||
|
||||
#define CL_SITE_INCLUDES \
|
||||
"/I..\\..\\code"
|
||||
#define CL_SITE_INCLUDES "/I..\\..\\code"
|
||||
|
||||
#define CL_LIBS \
|
||||
"user32.lib winmm.lib gdi32.lib opengl32.lib " \
|
||||
"..\\foreign\\freetype.lib"
|
||||
|
||||
#define CL_ICON \
|
||||
"..\\res\\icon.res"
|
||||
#define CL_ICON "..\\res\\icon.res"
|
||||
|
||||
static void
|
||||
build_cl(uint32_t flags, char *code_path, char *code_file, char *out_path, char *out_file, char *exports){
|
||||
slash_fix(out_path);
|
||||
slash_fix(code_path);
|
||||
slash_fix(code_file);
|
||||
|
||||
Build_Line line;
|
||||
init_build_line(&line);
|
||||
|
@ -588,7 +597,9 @@ build_cl(uint32_t flags, char *code_path, char *code_file, char *out_path, char
|
|||
snprintf(link_options, sizeof(link_options), "/NODEFAULTLIB:library");
|
||||
}
|
||||
|
||||
systemf("pushd %s & cl %s %s\\%s /Fe%s /link /DEBUG /INCREMENTAL:NO %s", out_path, line.build_options, code_path, code_file, out_file, link_options);
|
||||
Temp_Dir temp = pushdir(out_path);
|
||||
systemf("cl %s %s\\%s /Fe%s /link /DEBUG /INCREMENTAL:NO %s", line.build_options, code_path, code_file, out_file, link_options);
|
||||
popdir(temp);
|
||||
}
|
||||
|
||||
|
||||
|
@ -596,11 +607,9 @@ build_cl(uint32_t flags, char *code_path, char *code_file, char *out_path, char
|
|||
"-Wno-write-strings -D_GNU_SOURCE -fPIC " \
|
||||
"-fno-threadsafe-statics -pthread"
|
||||
|
||||
#define GCC_INCLUDES \
|
||||
"-I../foreign -I../code"
|
||||
#define GCC_INCLUDES "-I../foreign -I../code"
|
||||
|
||||
#define GCC_SITE_INCLUDES \
|
||||
"-I../../code"
|
||||
#define GCC_SITE_INCLUDES "-I../../code"
|
||||
|
||||
#define GCC_LIBS \
|
||||
"-L/usr/local/lib -lX11 -lpthread -lm -lrt " \
|
||||
|
@ -686,34 +695,32 @@ build(uint32_t flags, char *code_path, char *code_file, char *out_path, char *ou
|
|||
|
||||
static void
|
||||
buildsuper(char *code_path, char *out_path, char *filename){
|
||||
Temp_Dir temp = pushdir(out_path);
|
||||
|
||||
#if defined(IS_CL)
|
||||
slash_fix(filename);
|
||||
slash_fix(out_path);
|
||||
slash_fix(code_path);
|
||||
|
||||
systemf("pushd %s & call \"%s\\buildsuper.bat\" %s",
|
||||
out_path, code_path, filename);
|
||||
systemf("call \"%s\\buildsuper.bat\" %s", code_path, filename);
|
||||
|
||||
#elif defined(IS_GCC)
|
||||
|
||||
Temp_Dir temp = pushdir(out_path);
|
||||
|
||||
systemf("\"%s/buildsuper.sh\" %s",
|
||||
code_path, filename);
|
||||
|
||||
popdir(temp);
|
||||
systemf("\"%s/buildsuper.sh\" %s", code_path, filename);
|
||||
|
||||
#else
|
||||
#error The build rule for this compiler is not ready
|
||||
#endif
|
||||
|
||||
popdir(temp);
|
||||
}
|
||||
|
||||
#define D_META_DIR "../meta"
|
||||
#define D_META_FSM_DIR "../meta/fsmgen"
|
||||
#define D_META_GEN_DIR "../meta/metagen"
|
||||
#define D_BUILD_DIR "../build"
|
||||
#define D_BUILD_SITE_DIR "../../build/site"
|
||||
#define D_SITE_GEN_DIR "../../build/site/sitegen"
|
||||
#define D_BUILD_SITE_DIR "../build/site"
|
||||
#define D_SITE_GEN_DIR "../build/site/sitegen"
|
||||
|
||||
#define D_SITE_DIR "../site"
|
||||
#define D_PACK_DIR "../distributions"
|
||||
|
@ -916,7 +923,7 @@ static void
|
|||
site_build(char *cdir, uint32_t flags){
|
||||
{
|
||||
BEGIN_TIME_SECTION();
|
||||
build(OPTS | SITE_INCLUDES | flags, cdir, "sitegen.cpp", BUILD_SITE_DIR, "sitegen", 0);
|
||||
build(OPTS | SITE_INCLUDES | flags, cdir, "site/sitegen.cpp", BUILD_SITE_DIR, "sitegen", 0);
|
||||
END_TIME_SECTION("build sitegen");
|
||||
}
|
||||
|
||||
|
@ -924,9 +931,9 @@ site_build(char *cdir, uint32_t flags){
|
|||
BEGIN_TIME_SECTION();
|
||||
|
||||
#if defined(IS_WINDOWS)
|
||||
systemf("..\\..\\build\\site\\sitegen .. source_material ..\\..\\site");
|
||||
systemf("..\\build\\site\\sitegen . site\\source_material ..\\site");
|
||||
#else
|
||||
systemf("../../build/site/sitegen .. source_material ../../site");
|
||||
systemf("../build/site/sitegen . site/source_material ../site");
|
||||
#endif
|
||||
|
||||
END_TIME_SECTION("run sitegen");
|
||||
|
|
|
@ -47,14 +47,14 @@ enum{
|
|||
Doc_Table_Of_Contents
|
||||
};
|
||||
|
||||
typedef struct Alternate_Name{
|
||||
struct Alternate_Name{
|
||||
String macro;
|
||||
String public_name;
|
||||
} Alternate_Name;
|
||||
};
|
||||
|
||||
typedef struct Alternate_Names_Array{
|
||||
struct Alternate_Names_Array{
|
||||
Alternate_Name *names;
|
||||
} Alternate_Names_Array;
|
||||
};
|
||||
|
||||
enum{
|
||||
AltName_Standard,
|
||||
|
@ -99,6 +99,74 @@ struct Abstract_Document{
|
|||
};
|
||||
static Abstract_Document null_abstract_document = {0};
|
||||
|
||||
struct Document_Node{
|
||||
Abstract_Document doc;
|
||||
Document_Node *next;
|
||||
};
|
||||
|
||||
struct Document_System{
|
||||
Document_Node *head;
|
||||
Document_Node *tail;
|
||||
|
||||
Partition *part;
|
||||
};
|
||||
|
||||
static Document_System
|
||||
create_document_system(Partition *part){
|
||||
Document_System system = {0};
|
||||
system.part = part;
|
||||
return(system);
|
||||
}
|
||||
|
||||
static Abstract_Document*
|
||||
create_document(Document_System *system, char *name){
|
||||
int32_t is_new_name = 1;
|
||||
|
||||
for (Document_Node *node = system->head;
|
||||
node != 0;
|
||||
node = node->next){
|
||||
if (match_cc(node->doc.name, name)){
|
||||
is_new_name = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Abstract_Document *result = 0;
|
||||
if (is_new_name){
|
||||
Document_Node *node = push_struct(system->part, Document_Node);
|
||||
memset(node, 0, sizeof(*node));
|
||||
assert(node != 0);
|
||||
|
||||
result = &node->doc;
|
||||
node->next = 0;
|
||||
if (system->head == 0){
|
||||
system->head = node;
|
||||
system->tail = node;
|
||||
}
|
||||
else{
|
||||
system->tail->next = node;
|
||||
system->tail = node;
|
||||
}
|
||||
}
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
static Abstract_Document*
|
||||
get_document_by_name(Document_System *system, String name){
|
||||
Abstract_Document *result = 0;
|
||||
|
||||
for (Document_Node *node = system->head;
|
||||
node != 0;
|
||||
node = node->next){
|
||||
if (match_cs(node->doc.name, name)){
|
||||
result = &node->doc;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
static void
|
||||
set_section_name(Partition *part, Document_Item *item, char *name){
|
||||
int32_t name_len = str_size(name);
|
||||
|
@ -133,6 +201,16 @@ set_document_name(Abstract_Document *doc, char *name){
|
|||
doc->name = name;
|
||||
}
|
||||
|
||||
static Abstract_Document*
|
||||
begin_document_description(Document_System *system, char *title, char *name){
|
||||
Abstract_Document *doc = create_document(system, name);
|
||||
if (doc){
|
||||
begin_document_description(doc, system->part, title);
|
||||
}
|
||||
set_document_name(doc, name);
|
||||
return(doc);
|
||||
}
|
||||
|
||||
static void
|
||||
end_document_description(Abstract_Document *doc){
|
||||
Assert(doc->section_top == 0);
|
||||
|
@ -257,7 +335,7 @@ add_enriched_text(Abstract_Document *doc, Enriched_Text *text){
|
|||
append_child(parent, item);
|
||||
}
|
||||
|
||||
// Document Generation
|
||||
// HTML Document Generation
|
||||
|
||||
#define HTML_BACK_COLOR "#FAFAFA"
|
||||
#define HTML_TEXT_COLOR "#0D0D0D"
|
||||
|
@ -301,6 +379,15 @@ struct Section_Counter{
|
|||
int32_t nest_level;
|
||||
};
|
||||
|
||||
static int32_t
|
||||
doc_get_link_string(Abstract_Document *doc, char *space, int32_t capacity){
|
||||
String str = make_string_cap(space, 0, capacity);
|
||||
append_sc(&str, doc->name);
|
||||
append_sc(&str, ".html");
|
||||
int32_t result = terminate_with_null(&str);
|
||||
return(result);
|
||||
}
|
||||
|
||||
static void
|
||||
append_section_number_reduced(String *out, Section_Counter *section_counter, int32_t reduce){
|
||||
int32_t level = section_counter->nest_level-reduce;
|
||||
|
@ -398,11 +485,13 @@ html_render_section_header(String *out, String section_name, String section_id,
|
|||
}
|
||||
|
||||
static void
|
||||
write_enriched_text_html(String *out, Enriched_Text *text, Section_Counter *section_counter){
|
||||
write_enriched_text_html(String *out, Enriched_Text *text, Document_System *doc_system, Section_Counter *section_counter){
|
||||
String source = text->source;
|
||||
|
||||
append_sc(out, "<div>");
|
||||
|
||||
int32_t item_counter = 0;
|
||||
|
||||
for (String line = get_first_double_line(source);
|
||||
line.str;
|
||||
line = get_next_double_line(source, line)){
|
||||
|
@ -498,7 +587,7 @@ write_enriched_text_html(String *out, Enriched_Text *text, Section_Counter *sect
|
|||
|
||||
case Cmd_BeginList:
|
||||
{
|
||||
append_sc(out, "<ul style='margin-left: 5mm;'>");
|
||||
append_sc(out,"<ul style='margin-top: 5mm; margin-left: 1mm;'>");
|
||||
}break;
|
||||
|
||||
case Cmd_EndList:
|
||||
|
@ -508,7 +597,14 @@ write_enriched_text_html(String *out, Enriched_Text *text, Section_Counter *sect
|
|||
|
||||
case Cmd_BeginItem:
|
||||
{
|
||||
append_sc(out, "<li>");
|
||||
if (item_counter == 0){
|
||||
append_sc(out, "<li style='font-size: 95%; background: #EFEFDF;'>");
|
||||
++item_counter;
|
||||
}
|
||||
else{
|
||||
append_sc(out, "<li style='font-size: 95%;'>");
|
||||
item_counter = 0;
|
||||
}
|
||||
}break;
|
||||
|
||||
case Cmd_EndItem:
|
||||
|
@ -518,6 +614,7 @@ write_enriched_text_html(String *out, Enriched_Text *text, Section_Counter *sect
|
|||
|
||||
case Cmd_Section:
|
||||
{
|
||||
// TODO(allen): undo the duplication of this body extraction code.
|
||||
int32_t body_start = 0, body_end = 0;
|
||||
int32_t has_body = extract_command_body(out, l, &i, &body_start, &body_end, command_string);
|
||||
if (has_body){
|
||||
|
@ -525,6 +622,7 @@ write_enriched_text_html(String *out, Enriched_Text *text, Section_Counter *sect
|
|||
|
||||
html_render_section_header(out, body_text, null_string, section_counter);
|
||||
++section_counter->counter[section_counter->nest_level];
|
||||
item_counter = 0;
|
||||
}
|
||||
}break;
|
||||
|
||||
|
@ -535,8 +633,24 @@ write_enriched_text_html(String *out, Enriched_Text *text, Section_Counter *sect
|
|||
if (has_body){
|
||||
String body_text = substr(l, body_start, body_end - body_start);
|
||||
|
||||
append_sc(out, "<a href='>");
|
||||
append_ss(out, body_text);
|
||||
append_sc(out, "<a target='_blank'href='");
|
||||
|
||||
if (match_part_sc(body_text, "document:")){
|
||||
String doc_name = substr_tail(body_text, sizeof("document:")-1);
|
||||
Abstract_Document *doc_lookup = get_document_by_name(doc_system, doc_name);
|
||||
if (doc_lookup){
|
||||
char space[256];
|
||||
if (doc_get_link_string(doc_lookup, space, sizeof(space))){
|
||||
append_sc(out, space);
|
||||
}
|
||||
else{
|
||||
NotImplemented;
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
append_ss(out, body_text);
|
||||
}
|
||||
append_sc(out, "'>");
|
||||
}
|
||||
}break;
|
||||
|
@ -1173,7 +1287,7 @@ write_enriched_text_html(String *out, Enriched_Text *text, Section_Counter *sect
|
|||
}
|
||||
|
||||
static void
|
||||
doc_item_head_html(String *out, Partition *part, Used_Links *used_links, Document_Item *item, Section_Counter *section_counter){
|
||||
doc_item_head_html(String *out, Partition *part, Document_System *doc_system, Used_Links *used_links, Document_Item *item, Section_Counter *section_counter){
|
||||
switch (item->type){
|
||||
case Doc_Root:
|
||||
{
|
||||
|
@ -1254,7 +1368,7 @@ static void
|
|||
|
||||
case Doc_Enriched_Text:
|
||||
{
|
||||
write_enriched_text_html(out, item->text.text, section_counter);
|
||||
write_enriched_text_html(out, item->text.text, doc_system, section_counter);
|
||||
}break;
|
||||
|
||||
case Doc_Element_List:
|
||||
|
@ -1347,7 +1461,7 @@ static void
|
|||
}
|
||||
|
||||
static void
|
||||
doc_item_foot_html(String *out, Partition *part, Used_Links *used_links, Document_Item *item, Section_Counter *section_counter){
|
||||
doc_item_foot_html(String *out, Partition *part, Document_System *doc_system, Used_Links *used_links, Document_Item *item, Section_Counter *section_counter){
|
||||
switch (item->type){
|
||||
case Doc_Root:
|
||||
{
|
||||
|
@ -1361,8 +1475,8 @@ doc_item_foot_html(String *out, Partition *part, Used_Links *used_links, Documen
|
|||
}
|
||||
|
||||
static void
|
||||
generate_item_html(String *out, Partition *part, Used_Links *used_links, Document_Item *item, Section_Counter *section_counter){
|
||||
doc_item_head_html(out, part, used_links, item, section_counter);
|
||||
generate_item_html(String *out, Partition *part, Document_System *doc_system, Used_Links *used_links, Document_Item *item, Section_Counter *section_counter){
|
||||
doc_item_head_html(out, part, doc_system, used_links, item, section_counter);
|
||||
|
||||
if (item->type == Doc_Root || item->type == Doc_Section){
|
||||
int32_t level = ++section_counter->nest_level;
|
||||
|
@ -1370,23 +1484,23 @@ generate_item_html(String *out, Partition *part, Used_Links *used_links, Documen
|
|||
for (Document_Item *m = item->section.first_child;
|
||||
m != 0;
|
||||
m = m->next){
|
||||
generate_item_html(out, part, used_links, m, section_counter);
|
||||
generate_item_html(out, part, doc_system, used_links, m, section_counter);
|
||||
}
|
||||
--section_counter->nest_level;
|
||||
++section_counter->counter[section_counter->nest_level];
|
||||
}
|
||||
|
||||
doc_item_foot_html(out, part, used_links, item, section_counter);
|
||||
doc_item_foot_html(out, part, doc_system, used_links, item, section_counter);
|
||||
}
|
||||
|
||||
static void
|
||||
generate_document_html(String *out, Partition *part, Abstract_Document *doc){
|
||||
generate_document_html(String *out, Partition *part, Document_System *doc_system, Abstract_Document *doc){
|
||||
Used_Links used_links = {0};
|
||||
init_used_links(part, &used_links, 4000);
|
||||
|
||||
Section_Counter section_counter = {0};
|
||||
section_counter.counter[section_counter.nest_level] = 1;
|
||||
generate_item_html(out, part, &used_links, doc->root_item, §ion_counter);
|
||||
generate_item_html(out, part, doc_system, &used_links, doc->root_item, §ion_counter);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -12,7 +12,9 @@ cl %OPTS% ..\code\build.cpp /Zi /Febuild /DSITE_BUILD
|
|||
if %ERRORLEVEL% neq 0 (set FirstError=1)
|
||||
popd
|
||||
|
||||
..\..\build\build
|
||||
pushd ..
|
||||
..\build\build
|
||||
if %ERRORLEVEL% neq 0 (set FirstError=1)
|
||||
popd
|
||||
|
||||
call "ctime" -end 4ed_site.ctm %FirstError%
|
|
@ -6,5 +6,5 @@ FLAGS="-D_GNU_SOURCE -fPIC -fpermissive -DSITE_BUILD"
|
|||
pushd ..
|
||||
BASEDIR="$PWD"
|
||||
g++ $WARNINGS $FLAGS $BASEDIR/build.cpp -g -o ../build/build
|
||||
../build/build
|
||||
popd
|
||||
../../build/build
|
||||
|
|
|
@ -151,8 +151,30 @@ assert_files_are_equal(char *directory, char *filename1, char *filename2){
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
do_html_output(Document_System *doc_system, Partition *part, char *dst_directory, Abstract_Document *doc){
|
||||
// NOTE(allen): Output
|
||||
Temp_Memory temp = begin_temp_memory(part);
|
||||
String out = str_alloc(part, 10 << 20);
|
||||
Out_Context context = {0};
|
||||
set_context_directory(&context, dst_directory);
|
||||
|
||||
// Output Docs
|
||||
char space[256];
|
||||
if (doc_get_link_string(doc, space, sizeof(space))){
|
||||
if (begin_file_out(&context, space, &out)){
|
||||
generate_document_html(&out, part, doc_system, doc);
|
||||
end_file_out(context);
|
||||
}
|
||||
else{
|
||||
fprintf(stderr, "Failed to open %s", space);
|
||||
}
|
||||
}
|
||||
end_temp_memory(temp);
|
||||
}
|
||||
|
||||
static Abstract_Document*
|
||||
generate_4coder_API(Partition *part, char *code_directory, char *src_directory, char *dst_directory){
|
||||
generate_4coder_API(Document_System *doc_system, Partition *part, char *code_directory, char *src_directory, char *dst_directory){
|
||||
static Meta_Keywords meta_keywords[] = {
|
||||
{make_lit_string("API_EXPORT") , Item_Function } ,
|
||||
{make_lit_string("API_EXPORT_INLINE") , Item_Function } ,
|
||||
|
@ -177,8 +199,6 @@ assert_files_are_equal(char *directory, char *filename1, char *filename2){
|
|||
Enriched_Text *introduction = push_struct(part, Enriched_Text);
|
||||
Enriched_Text *lexer_introduction = push_struct(part, Enriched_Text);
|
||||
|
||||
Abstract_Document *doc = push_struct(part, Abstract_Document);
|
||||
|
||||
// NOTE(allen): Parse the important code.
|
||||
*custom_types_unit = compile_meta_unit(part, code_directory, "4coder_types.h", ExpandArray(meta_keywords));
|
||||
|
||||
|
@ -220,9 +240,7 @@ assert_files_are_equal(char *directory, char *filename1, char *filename2){
|
|||
*lexer_introduction = load_enriched_text(part, src_directory, "lexer_introduction.txt");
|
||||
|
||||
// NOTE(allen): Put together the abstract document
|
||||
memset(doc, 0, sizeof(*doc));
|
||||
begin_document_description(doc, part, "4coder API Docs");
|
||||
set_document_name(doc, "custom_API.html");
|
||||
Abstract_Document *doc = begin_document_description(doc_system, "4coder API Docs", "custom_API");
|
||||
|
||||
add_table_of_contents(doc);
|
||||
|
||||
|
@ -287,60 +305,33 @@ assert_files_are_equal(char *directory, char *filename1, char *filename2){
|
|||
|
||||
end_document_description(doc);
|
||||
|
||||
// NOTE(allen): Output
|
||||
Temp_Memory temp = begin_temp_memory(part);
|
||||
String out = str_alloc(part, 10 << 20);
|
||||
Out_Context context = {0};
|
||||
set_context_directory(&context, dst_directory);
|
||||
|
||||
// Output Docs
|
||||
if (begin_file_out(&context, doc->name, &out)){
|
||||
generate_document_html(&out, part, doc);
|
||||
end_file_out(context);
|
||||
}
|
||||
else{
|
||||
fprintf(stderr, "Failed to open %s", doc->name);
|
||||
}
|
||||
end_temp_memory(temp);
|
||||
|
||||
return(doc);
|
||||
}
|
||||
|
||||
static Abstract_Document*
|
||||
generate_feature_list(Partition *part, char *src_directory, char *dst_directory){
|
||||
generate_feature_list(Document_System *doc_system, Partition *part, char *src_directory, char *dst_directory){
|
||||
Enriched_Text *feature_list = push_struct(part, Enriched_Text);
|
||||
Abstract_Document *doc = push_struct(part, Abstract_Document);
|
||||
|
||||
*feature_list = load_enriched_text(part, src_directory, "feature_list.txt");
|
||||
|
||||
// NOTE(allen): Put together the abstract document
|
||||
memset(doc, 0, sizeof(*doc));
|
||||
begin_document_description(doc, part, "4coder Feature List");
|
||||
set_document_name(doc, "features.html");
|
||||
|
||||
Abstract_Document *doc = begin_document_description(doc_system, "4coder Feature List", "features");
|
||||
add_enriched_text(doc, feature_list);
|
||||
|
||||
end_document_description(doc);
|
||||
|
||||
// NOTE(allen): Output
|
||||
Temp_Memory temp = begin_temp_memory(part);
|
||||
String out = str_alloc(part, 10 << 20);
|
||||
Out_Context context = {0};
|
||||
set_context_directory(&context, dst_directory);
|
||||
|
||||
// Output Docs
|
||||
if (begin_file_out(&context, doc->name, &out)){
|
||||
generate_document_html(&out, part, doc);
|
||||
end_file_out(context);
|
||||
}
|
||||
else{
|
||||
fprintf(stderr, "Failed to open %s", doc->name);
|
||||
}
|
||||
end_temp_memory(temp);
|
||||
|
||||
return(doc);
|
||||
}
|
||||
|
||||
static Abstract_Document*
|
||||
generate_roadmap(Document_System *doc_system, Partition *part, char *src_directory, char *dst_directory){
|
||||
Enriched_Text *roadmap = push_struct(part, Enriched_Text);
|
||||
*roadmap = load_enriched_text(part, src_directory, "roadmap.txt");
|
||||
|
||||
Abstract_Document *doc = begin_document_description(doc_system, "4coder Roadmap", "roadmap");
|
||||
add_enriched_text(doc, roadmap);
|
||||
end_document_description(doc);
|
||||
|
||||
return(doc);
|
||||
}
|
||||
|
||||
static void
|
||||
generate_site(char *code_directory, char *src_directory, char *dst_directory){
|
||||
int32_t size = (512 << 20);
|
||||
|
@ -350,10 +341,17 @@ generate_site(char *code_directory, char *src_directory, char *dst_directory){
|
|||
Partition part_ = make_part(mem, size);
|
||||
Partition *part = &part_;
|
||||
|
||||
Abstract_Document *api_document = generate_4coder_API(part, code_directory, src_directory, dst_directory);
|
||||
Document_System doc_system = create_document_system(part);
|
||||
|
||||
Abstract_Document *feature_list = generate_feature_list(part, src_directory, dst_directory);
|
||||
Abstract_Document *api_document = generate_4coder_API(&doc_system, part, code_directory, src_directory, dst_directory);
|
||||
|
||||
Abstract_Document *feature_list = generate_feature_list(&doc_system, part, src_directory, dst_directory);
|
||||
|
||||
Abstract_Document *roadmap = generate_roadmap(&doc_system, part, src_directory, dst_directory);
|
||||
|
||||
do_html_output(&doc_system, part, dst_directory, api_document);
|
||||
do_html_output(&doc_system, part, dst_directory, feature_list);
|
||||
do_html_output(&doc_system, part, dst_directory, roadmap);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv){
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
This page is meant to provide a list of available features for anyone trying to decide whether 4coder is the right editor for them. If a feature is missing here you should check out the \LINK_BEGIN{roadmap.html} roadmap \LINK_END page to see what is coming in the future. If the feature you want is on neither, you should contact \CODE_STYLE{editor@4coder.net}. Some features that are already in 4coder might be missing from this list, and they will be added as they are discovered.
|
||||
This page provides a list of 4coder features for anyone trying to determine whether 4coder is the right editor for them. If a feature is missing here you should check out the \BEGIN_LINK{document:roadmap} roadmap \END_LINK page to see what is coming in the future. If the feature you want is on neither, you should contact \CODE_STYLE{editor@4coder.net}. Some features that are already in 4coder might be missing from this list, if you want to be sure you should contact \CODE_STYLE{editor@4coder.net}.
|
||||
|
||||
\SECTION{Text Editing}
|
||||
\BEGIN_LIST
|
||||
\BEGIN_ITEM Cursor and mark editing paradigm \END_ITEM
|
||||
\BEGIN_ITEM Cursor-Mark editing paradigm \END_ITEM
|
||||
\BEGIN_ITEM Navigation by characters, words, tokens, lines, and blank lines \END_ITEM
|
||||
\BEGIN_ITEM Modern style undo and redo \END_ITEM
|
||||
\BEGIN_ITEM Word complete with matching words in open files \END_ITEM
|
||||
|
@ -46,4 +46,8 @@ This page is meant to provide a list of available features for anyone trying to
|
|||
4coder's current setup and editing paradigm is modeled after emacs, so it is very natural to transition to 4coder from emacs for many users. 4coder customization is quite different from emacs though, so anyone who wants to keep their current keybinds will have to take the time to rewrite the keybinding code. Once the initial transition is done, any user who prefers C++ to Lisp will have a much better time in their 4coder configuration code.
|
||||
|
||||
\SECTION{Transition From Vim}
|
||||
Many vim users are resistant to any transition because of how unique the vim editing paradigm is. For them the
|
||||
For vim users the built-in editing paradigm will not line up with editing habits. Thanks to the open customization model, a vim paradigm and default vim key bindings can be used in 4coder. The vim customization \BEGIN_LINK{https://github.com/Chronister/4vim} here \END_LINK is an early example of this with many basic vim systems up and running.
|
||||
|
||||
Right now 4coder is admittedly not great for vim users, but the transition path exists so keep your eyes on 4coder as better vim emulation is still on the way.
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
|
||||
This page provides an outline of planned 4coder features roughly sorted by priority. If a feature is missing here it may be on the \BEGIN_LINK{document:features} features \END_LINK page which means it is already in 4coder. If a feature is missing from both lists and you would like to recommend it for consideration, send your recommendation to \CODE_STYLE{editor@4coder.net}. If you believe the priority sorting of the items should be tweaked because certain items are more important than others, that recommendation can also be sent to the same 4coder email as any other recommendation.
|
||||
|
||||
Each section represents one major type of todo item, within each section the items are roughly sorted by priority with respect to other items in that section. The sections are also sorted by a rough priority, but more than one section might receive attention at a time.
|
||||
|
||||
\SECTION{General Editing}
|
||||
\BEGIN_LIST
|
||||
\BEGIN_ITEM Unicode buffer formats \END_ITEM
|
||||
\END_LIST
|
||||
|
||||
\SECTION{Code Layout}
|
||||
\BEGIN_LIST
|
||||
\END_LIST
|
||||
|
||||
\SECTION{Buffer Driven GUI}
|
||||
\BEGIN_LIST
|
||||
\END_LIST
|
||||
|
||||
\SECTION{Code Intelligence}
|
||||
\BEGIN_LIST
|
||||
\END_LIST
|
||||
|
||||
\SECTION{API "Main" Upgrade}
|
||||
\BEGIN_LIST
|
||||
\END_LIST
|
||||
|
||||
\SECTION{API Miscellanea}
|
||||
\BEGIN_LIST
|
||||
\BEGIN_ITEM Expose the file bar string \END_ITEM
|
||||
\BEGIN_ITEM Expose the binding of initial files to views such as *messages* \END_ITEM
|
||||
\END_LIST
|
||||
|
||||
\SECTION{Cross OS Miscellanea}
|
||||
\BEGIN_LIST
|
||||
\BEGIN_ITEM Support for the concept of multiple keyboards \END_ITEM
|
||||
\BEGIN_ITEM Support for OS fonts \END_ITEM
|
||||
\BEGIN_ITEM Support for double click opening new files in an existing window \END_ITEM
|
||||
\BEGIN_ITEM Support for multi-window single process \END_ITEM
|
||||
\END_LIST
|
||||
|
||||
|
Loading…
Reference in New Issue