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
49#include "ulib_machine.h"49#include "ulib_machine.h"
50#include "ulib_math.h"50#include "ulib_math.h"
51#include "ulib_std.h"51#include "ulib_std.h"
52#include "util_string.h"
52 53
53#ifndef __DISABLE_NETWORK__54#ifndef __DISABLE_NETWORK__
54#include "ulib_opsc.h"55#include "ulib_opsc.h"
@@ -786,22 +787,6 @@ t_CKBOOL load_external_module_at_path( Chuck_Compiler * compiler, · 731 unmodified lines
786 787
787 788
788 789
789//-----------------------------------------------------------------------------
790// name: extension_matches()
791// desc: ...
792//-----------------------------------------------------------------------------
793static 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
805//-----------------------------------------------------------------------------790//-----------------------------------------------------------------------------
806// name: load_external_modules_in_directory()791// name: load_external_modules_in_directory()
807// desc: ...792// 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