Unified · Split
| @@ -740,12 +740,8 @@ void ChucK::probeChugins() · 739 unmodified lines | ||
| 740 | 740 | // list of individually named chug-ins (added 1.3.0.0) |
| 741 | 741 | std::list<std::string> named_dls = getParamStringList( CHUCK_PARAM_USER_CHUGINS ); |
| 742 | 742 | |
| 743 | − //--------------------------------------------------------------------- | |
| 744 | − // set origin hint | 1.5.0.0 (ge) added | |
| 745 | − m_carrier->compiler->m_originHint = te_originChugin; | |
| 746 | − //--------------------------------------------------------------------- | |
| 747 | 743 | // log |
| 748 | − EM_log( CK_LOG_SYSTEM, "loading chugins..." ); | |
| 744 | + EM_log( CK_LOG_SYSTEM, "probing chugins..." ); | |
| 749 | 745 | // push indent level |
| 750 | 746 | EM_pushlog(); |
| 751 | 747 | // load external libs |
| @@ -759,18 +755,14 @@ void ChucK::probeChugins() · 7 unmodified lines | ||
| 759 | 755 | // pop log |
| 760 | 756 | EM_poplog(); |
| 761 | 757 | |
| 762 | − //--------------------------------------------------------------------- | |
| 763 | − // set origin hint | 1.5.0.0 (ge) added | |
| 764 | − m_carrier->compiler->m_originHint = te_originImport; | |
| 765 | − //--------------------------------------------------------------------- | |
| 766 | 758 | // log |
| 767 | − EM_log( CK_LOG_SYSTEM, "pre-loading ChucK libs..." ); | |
| 759 | + EM_log( CK_LOG_SYSTEM, "probing pre-loading ChucK libs..." ); | |
| 768 | 760 | EM_pushlog(); |
| 769 | 761 | |
| 770 | 762 | // iterate over list of ck files that the compiler found |
| 771 | − for(std::list<std::string>::iterator j = | |
| 772 | − compiler()->m_cklibs_to_preload.begin(); | |
| 773 | − j != compiler()->m_cklibs_to_preload.end(); j++) | |
| 763 | + for( std::list<std::string>::iterator j = | |
| 764 | + compiler()->m_cklibs_to_preload.begin(); | |
| 765 | + j != compiler()->m_cklibs_to_preload.end(); j++ ) | |
| 774 | 766 | { |
| 775 | 767 | // the filename |
| 776 | 768 | std::string filename = *j; |
| @@ -49,6 +49,7 @@ · 48 unmodified lines | ||
| 49 | 49 | #include "ulib_machine.h" |
| 50 | 50 | #include "ulib_math.h" |
| 51 | 51 | #include "ulib_std.h" |
| 52 | +#include "util_string.h" | |
| 52 | 53 | |
| 53 | 54 | #ifndef __DISABLE_NETWORK__ |
| 54 | 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 | −//----------------------------------------------------------------------------- | |
| 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 | − | |
| 805 | 790 | //----------------------------------------------------------------------------- |
| 806 | 791 | // name: load_external_modules_in_directory() |
| 807 | 792 | // desc: ... |
| @@ -723,3 +723,19 @@ t_CKBOOL is_absolute_path( const std::string & path ) · 722 unmodified lines | ||
| 723 | 723 | return( path.length() != 0 && path[0] == '/' ); |
| 724 | 724 | #endif |
| 725 | 725 | } |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | +//----------------------------------------------------------------------------- | |
| 731 | +// name: extension_matches() | |
| 732 | +// desc: check whether a filename matches a particular extension | |
| 733 | +//----------------------------------------------------------------------------- | |
| 734 | +t_CKBOOL extension_matches( const char * filename, const char * extension ) | |
| 735 | +{ | |
| 736 | + t_CKUINT extension_length = strlen( extension ); | |
| 737 | + t_CKUINT filename_length = strlen( filename ); | |
| 738 | + | |
| 739 | + return strncmp( extension, filename+(filename_length-extension_length), | |
| 740 | + extension_length ) == 0; | |
| 741 | +} | |
| @@ -83,12 +83,12 @@ t_CKBOOL str_endsin(const char *str, const char *end); · 82 unmodified lines | ||
| 83 | 83 | // check if path is absolute on the underlying platform |
| 84 | 84 | t_CKBOOL is_absolute_path( const std::string & path ); |
| 85 | 85 | |
| 86 | −//----------------------------------------------------------------------------- | |
| 87 | −// name: parse_path_list() | |
| 88 | −// desc: split "x:y:z"-style path list into {"x","y","z"} | |
| 89 | −//----------------------------------------------------------------------------- | |
| 86 | +// split "x:y:z"-style path list into {"x","y","z"} | |
| 90 | 87 | void parse_path_list( std::string & str, std::list<std::string> & lst ); |
| 91 | 88 | |
| 89 | +// check whether a filename matches a particular extension | |
| 90 | +t_CKBOOL extension_matches( const char * filename, const char * extension ); | |
| 91 | + | |
| 92 | 92 | |
| 93 | 93 | |
| 94 | 94 | |