Merge branch 'master' of https://bitbucket.org/4coder/4coder
commit
b4974fee0a
|
@ -93,9 +93,7 @@ CUSTOM_COMMAND_SIG(rewrite_as_single_caps){
|
|||
|
||||
buffer_replace_range(app, &buffer, range.min, range.max, string.str, string.size);
|
||||
|
||||
view_set_cursor(app, &view,
|
||||
seek_line_char(cursor.line+1, cursor.character),
|
||||
true);
|
||||
view_set_cursor(app, &view, seek_line_char(cursor.line+1, cursor.character), true);
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(open_my_files){
|
||||
|
@ -107,11 +105,7 @@ CUSTOM_COMMAND_SIG(open_my_files){
|
|||
CUSTOM_COMMAND_SIG(build_at_launch_location){
|
||||
uint32_t access = AccessAll;
|
||||
View_Summary view = get_active_view(app, access);
|
||||
exec_system_command(app, &view,
|
||||
buffer_identifier(literal("*compilation*")),
|
||||
literal("."),
|
||||
literal("build"),
|
||||
CLI_OverlapWithConflict);
|
||||
exec_system_command(app, &view, buffer_identifier(literal("*compilation*")),literal("."), literal("build"), CLI_OverlapWithConflict);
|
||||
}
|
||||
|
||||
CUSTOM_COMMAND_SIG(seek_whitespace_up_end_line){
|
||||
|
@ -405,7 +399,9 @@ default_keys(Bind_Helper *context){
|
|||
bind(context, key_left, MDFR_NONE, move_left);
|
||||
bind(context, key_right, MDFR_NONE, move_right);
|
||||
bind(context, key_del, MDFR_NONE, delete_char);
|
||||
bind(context, key_del, MDFR_SHIFT, delete_char);
|
||||
bind(context, key_back, MDFR_NONE, backspace_char);
|
||||
bind(context, key_back, MDFR_SHIFT, backspace_char);
|
||||
bind(context, key_up, MDFR_NONE, move_up);
|
||||
bind(context, key_down, MDFR_NONE, move_down);
|
||||
bind(context, key_end, MDFR_NONE, seek_end_of_line);
|
||||
|
|
34
build.cpp
34
build.cpp
|
@ -454,7 +454,6 @@ enum{
|
|||
OPTIMIZATION = 0x100,
|
||||
KEEP_ASSERT = 0x200,
|
||||
SITE_INCLUDES = 0x400,
|
||||
NORMAL_SELF_INCLUDES = 0x800,
|
||||
};
|
||||
|
||||
|
||||
|
@ -591,9 +590,6 @@ build_cl(uint32_t flags, char *code_path, char *code_file, char *out_path, char
|
|||
#define GCC_INCLUDES \
|
||||
"-I../foreign"
|
||||
|
||||
#define GCC_NORMAL_SELF_INCLUDES \
|
||||
"-I../code"
|
||||
|
||||
#define GCC_SITE_INCLUDES \
|
||||
"-I../../code"
|
||||
|
||||
|
@ -627,10 +623,6 @@ build_gcc(uint32_t flags, char *code_path, char *code_file, char *out_path, char
|
|||
#endif
|
||||
}
|
||||
|
||||
if (flags & NORMAL_SELF_INCLUDES){
|
||||
build_ap(line, GCC_NORMAL_SELF_INCLUDES);
|
||||
}
|
||||
|
||||
if (flags & SITE_INCLUDES){
|
||||
build_ap(line, GCC_SITE_INCLUDES);
|
||||
}
|
||||
|
@ -717,6 +709,7 @@ buildsuper(char *code_path, char *out_path, char *filename){
|
|||
#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"
|
||||
#define D_PACK_DATA_DIR "../data/dist_files"
|
||||
#define D_DATA_DIR "../data/test"
|
||||
|
@ -735,6 +728,7 @@ static char *META_GEN_DIR = 0;
|
|||
static char *BUILD_DIR = 0;
|
||||
static char *BUILD_SITE_DIR = 0;
|
||||
static char *SITE_GEN_DIR = 0;
|
||||
static char *SITE_DIR = 0;
|
||||
static char *PACK_DIR = 0;
|
||||
static char *PACK_DATA_DIR = 0;
|
||||
static char *DATA_DIR = 0;
|
||||
|
@ -752,11 +746,10 @@ get_head(String builder){
|
|||
|
||||
static void
|
||||
init_global_strings(){
|
||||
int32_t size = 1024;
|
||||
int32_t size = (1 << 12);
|
||||
char *base = (char*)malloc(size);
|
||||
char term_space[1] = {0};
|
||||
String builder = make_string_cap(base, 0, size);
|
||||
String term = make_string_cap(term_space, 1, 1);
|
||||
String term = make_string("\0", 1);
|
||||
|
||||
META_DIR = get_head(builder);
|
||||
append_sc(&builder, D_META_DIR);
|
||||
|
@ -782,6 +775,10 @@ init_global_strings(){
|
|||
append_sc(&builder, D_SITE_GEN_DIR);
|
||||
append_ss(&builder, term);
|
||||
|
||||
SITE_DIR = get_head(builder);
|
||||
append_sc(&builder, D_SITE_DIR);
|
||||
append_ss(&builder, term);
|
||||
|
||||
PACK_DIR = get_head(builder);
|
||||
append_sc(&builder, D_PACK_DIR);
|
||||
append_ss(&builder, term);
|
||||
|
@ -847,7 +844,7 @@ static void
|
|||
metagen(char *cdir){
|
||||
{
|
||||
BEGIN_TIME_SECTION();
|
||||
build(OPTS | DEBUG_INFO | NORMAL_SELF_INCLUDES, cdir, "4ed_metagen.cpp", META_DIR, "metagen", 0);
|
||||
build(OPTS | DEBUG_INFO, cdir, "4ed_metagen.cpp", META_DIR, "metagen", 0);
|
||||
END_TIME_SECTION("build metagen");
|
||||
}
|
||||
|
||||
|
@ -923,16 +920,7 @@ site_build(char *cdir, uint32_t flags){
|
|||
#if defined(IS_WINDOWS)
|
||||
systemf("pushd %s\\site & ..\\..\\build\\site\\sitegen .. source_material ..\\..\\site", cdir);
|
||||
#else
|
||||
char space[512];
|
||||
String str = make_fixed_width_string(space);
|
||||
append_sc(&str, cdir);
|
||||
append_sc(&str, "/");
|
||||
append_sc(&str, "site");
|
||||
terminate_with_null(&str);
|
||||
|
||||
Temp_Dir temp = linux_pushd(str.str);
|
||||
systemf("../../build/site/sitegen .. source_material ../../site");
|
||||
linux_popd(temp);
|
||||
systemf("pushd %s/site & ../../build/site/sitegen .. source_material ../../site", cdir);
|
||||
#endif
|
||||
|
||||
END_TIME_SECTION("run sitegen");
|
||||
|
@ -1025,7 +1013,7 @@ package(char *cdir){
|
|||
|
||||
get_4coder_dist_name(&str, 0, "API", "html");
|
||||
str2 = front_of_directory(str);
|
||||
copy_file(0, "4coder_API.html", PACK_DIR, "super-docs", str2.str);
|
||||
copy_file(SITE_DIR, "4coder_API.html", PACK_DIR, "super-docs", str2.str);
|
||||
|
||||
get_4coder_dist_name(&str, 1, "super", "zip");
|
||||
zip(PACK_SUPER_PAR_DIR, "4coder", str.str);
|
||||
|
|
Binary file not shown.
|
@ -4,19 +4,17 @@ call "ctime" -begin 4ed_site.ctm
|
|||
|
||||
SET OPTS=/W4 /wd4310 /wd4100 /wd4201 /wd4505 /wd4996 /wd4127 /wd4510 /wd4512 /wd4610 /wd4390 /WX
|
||||
SET OPTS=%OPTS% /GR- /EHa- /nologo /FC
|
||||
SET OPTS=%OPTS% /I..\\..\\code
|
||||
|
||||
|
||||
SET FirstError=0
|
||||
|
||||
pushd ..\..\build\site
|
||||
cl %OPTS% ..\..\code\site\sitegen.cpp /Zi /Fesitegen
|
||||
pushd ..\..\build
|
||||
cl %OPTS% ..\code\build.cpp /Zi /Febuild /DSITE_BUILD
|
||||
if %ERRORLEVEL% neq 0 (set FirstError=1)
|
||||
popd
|
||||
|
||||
if %FirstError% neq 1 (
|
||||
..\..\build\site\sitegen.exe .. source_material ..\..\site
|
||||
)
|
||||
pushd ..
|
||||
..\build\build
|
||||
popd
|
||||
if %ERRORLEVEL% neq 0 (set FirstError=1)
|
||||
|
||||
call "ctime" -end 4ed_site.ctm %FirstError%
|
Loading…
Reference in New Issue