Fix string bug in project command lister

master
Allen Webster 2018-12-09 14:20:00 -08:00
parent 6d193225f9
commit cb85505390
6 changed files with 2580 additions and 170 deletions

File diff suppressed because it is too large Load Diff

View File

@ -133,7 +133,9 @@ add_listener(File_Track_System *system, Partition *scratch, u8 *filename){
u8 dir_name[1024];
internal_get_parent_name(dir_name, ArrayCount(dir_name), filename);
HANDLE dir = CreateFile_utf8(dir_name, FILE_LIST_DIRECTORY, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, 0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, 0);
HANDLE dir = CreateFile_utf8(dir_name, FILE_LIST_DIRECTORY,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, 0);
if (dir != INVALID_HANDLE_VALUE){
BY_HANDLE_FILE_INFORMATION dir_info = {};

2436
string/4coder_string.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
1
0
117
119

View File

@ -194,7 +194,7 @@ int main(){
}
// NOTE(allen): String Library
String out = str_alloc(part, 10 << 20);
String out = string_push(part, 10 << 20);
Cpp_Token *token = 0;
i32 start = 0;

View File

@ -2145,6 +2145,7 @@ DOC_RETURN(If successfull returns a string copy of str, otherwise returns a nul
if (result.str != 0){
result.memory_size = str.size + 1;
copy(&result, str);
result.str[result.size] = 0;
}
return(result);
}