History

refactor extension matching

Ge Wang committed 3 years ago

Commit dcebc361 parent 5a68b864 files · +26 −33Browse files

Showing the changes to src/core/chuck_compile.cpp (1 of 4 files). Show all

Unified · Split

src/core/chuck_compile.cpp+1−16
@@ -49,6 +49,7 @@ · 48 unmodified lines
4949 #include "ulib_machine.h"
5050 #include "ulib_math.h"
5151 #include "ulib_std.h"
52+#include "util_string.h"
5253
5354 #ifndef __DISABLE_NETWORK__
5455 #include "ulib_opsc.h"
@@ -786,22 +787,6 @@ t_CKBOOL load_external_module_at_path( Chuck_Compiler * compiler, · 731 unmodified lines
786787
787788
788789
789−//-----------------------------------------------------------------------------
790−// name: extension_matches()
791−// desc: ...
792−//-----------------------------------------------------------------------------
793−static t_CKBOOL extension_matches( const char * filename, const char * extension )
794−{
795− t_CKUINT extension_length = strlen(extension);
796− t_CKUINT filename_length = strlen(filename);
797−
798− return strncmp( extension, filename+(filename_length-extension_length),
799− extension_length) == 0;
800−}
801−
802−
803−
804−
805790 //-----------------------------------------------------------------------------
806791 // name: load_external_modules_in_directory()
807792 // desc: ...

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t