Sys_File_Paths_Equal
parent
0a6c851788
commit
d676f5f0b8
|
@ -31,6 +31,9 @@ typedef Sys_File_Time_Stamp_Sig(System_File_Time_Stamp);
|
|||
#define Sys_Set_File_List_Sig(name) void name(File_List *file_list, String directory)
|
||||
typedef Sys_Set_File_List_Sig(System_Set_File_List);
|
||||
|
||||
#define Sys_File_Paths_Equal_Sig(name) b32 name(char *path_a, char *path_b)
|
||||
typedef Sys_File_Paths_Equal_Sig(System_File_Paths_Equal);
|
||||
|
||||
#define Sys_Post_Clipboard_Sig(name) void name(String str)
|
||||
typedef Sys_Post_Clipboard_Sig(System_Post_Clipboard);
|
||||
|
||||
|
|
|
@ -369,6 +369,22 @@ Sys_Set_File_List_Sig(system_set_file_list){
|
|||
}
|
||||
}
|
||||
|
||||
Sys_File_Paths_Equal_Sig(system_file_paths_equal){
|
||||
b32 result = 0;
|
||||
|
||||
char* real_a = realpath(path_a, NULL);
|
||||
char* real_b = realpath(path_b, NULL);
|
||||
|
||||
if(real_a && real_b){
|
||||
result = strcmp(real_a, real_b);
|
||||
|
||||
free(real_a);
|
||||
free(real_b);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Sys_Post_Clipboard_Sig(system_post_clipboard){
|
||||
LinuxStringDup(&linuxvars.clipboard_outgoing, str.str, str.size);
|
||||
XSetSelectionOwner(linuxvars.XDisplay, linuxvars.atom_CLIPBOARD, linuxvars.XWindow, CurrentTime);
|
||||
|
|
|
@ -495,6 +495,17 @@ DIRECTORY_CD_SIG(system_directory_cd){
|
|||
return(result);
|
||||
}
|
||||
|
||||
Sys_File_Paths_Equal_Sig(system_file_paths_equal){
|
||||
b32 result = 0;
|
||||
|
||||
// TODO(someone who knows windows): implement me
|
||||
|
||||
AllowLocal(path_a);
|
||||
AllowLocal(path_b);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
internal
|
||||
Sys_Post_Clipboard_Sig(system_post_clipboard){
|
||||
if (OpenClipboard(win32vars.window_handle)){
|
||||
|
|
Loading…
Reference in New Issue