- Timestamp:
- May 5, 2008, 1:23:46 AM (17 years ago)
- Location:
- trunk/ab5.0/abdev/BasicCompiler_Common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/MakeExe.cpp
r545 r554 4 4 5 5 #include "common.h" 6 #include <ver.h> 6 7 7 8 void StepCompileProgress(void){ … … 65 66 compiler.GetObjectModule().SetCurrentSourceIndex( (int)compiler.GetObjectModule().GetSources().size() ); 66 67 compiler.GetObjectModule().GetSources().push_back( BasicSource() ); 67 if( !compiler.GetObjectModule().GetCurrentSource().ReadFile( program.GetSourceFilePath() ) ){ 68 bool result = compiler.GetObjectModule().GetCurrentSource().ReadFile( 69 program.GetSourceFilePath(), 70 compiler.IsDebug(), 71 compiler.IsDll(), 72 compiler.IsUnicode(), 73 MAJOR_VER 74 ); 75 if( !result ){ 68 76 compiler.errorMessenger.Output(201,program.GetSourceFilePath(),-1); 69 77 goto EndCompile; -
trunk/ab5.0/abdev/BasicCompiler_Common/include/Source.h
r553 r554 229 229 void SetBuffer( const char *buffer ); 230 230 231 bool ReadFile( const std::string &filePath );231 bool ReadFile( const std::string &filePath, bool isDebug, bool isDll, bool isUnicode, int majorVer ); 232 232 233 233 void Addition( const char *buffer ); -
trunk/ab5.0/abdev/BasicCompiler_Common/src/Source.cpp
r553 r554 7 7 std::vector<std::string> names; 8 8 public: 9 CDefine( int majorVer );10 ~CDefine();11 9 void Free(); 12 void Init( int majorVer );10 void Init( bool isDebug, bool isDll, bool isUnicode, int majorVer ); 13 11 14 12 BOOL add(char *name); … … 18 16 void DirectiveIfdef(char *buffer); 19 17 }; 20 // TODO: バージョン番号の識別子defineが未完成 21 CDefine objDefine(0); 18 CDefine objDefine; 22 19 23 20 … … 92 89 ////////////////////////////////////// 93 90 94 CDefine::CDefine( int majorVer ) 95 { 96 Init( majorVer ); 97 } 98 CDefine::~CDefine() 99 { 100 } 101 void CDefine::Init( int majorVer ) 91 void CDefine::Init( bool isDebug, bool isDll, bool isUnicode, int majorVer ) 102 92 { 103 93 names.clear(); 104 94 105 if( compiler.IsDebug())95 if( isDebug ) 106 96 { 107 97 add("_DEBUG"); … … 112 102 #endif 113 103 114 if( compiler.IsDll())104 if( isDll ) 115 105 { 116 106 add("_DLL"); 117 107 } 118 108 119 if( compiler.IsUnicode())109 if( isUnicode ) 120 110 { 121 111 add( "UNICODE" ); … … 854 844 } 855 845 856 bool BasicSource::ReadFile( const std::string &filePath ){846 bool BasicSource::ReadFile( const std::string &filePath, bool isDebug, bool isDll, bool isUnicode, int majorVer ){ 857 847 if( !Text::ReadFile( filePath ) ){ 858 848 return false; … … 871 861 // #defineと#requireを初期化 872 862 // TODO: バージョン番号の識別子defineが未完成 873 objDefine.Init( 0);863 objDefine.Init( isDebug, isDll, isUnicode, majorVer ); 874 864 requireFiles.clear(); 875 865
Note:
See TracChangeset
for help on using the changeset viewer.