Changeset 165 in dev
- Timestamp:
- Jun 17, 2007, 1:45:13 PM (17 years ago)
- Location:
- trunk/abdev
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/BasicCompiler.vcproj
r163 r165 48 48 Name="VCCLCompilerTool" 49 49 Optimization="0" 50 AdditionalIncludeDirectories="..\..\ jenga\include\common;..\..\cpplibs\boost;..\BasicCompiler_Common\include"50 AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;..\BasicCompiler_Common\include" 51 51 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;JPN" 52 52 MinimalRebuild="true" … … 149 149 InlineFunctionExpansion="2" 150 150 FavorSizeOrSpeed="1" 151 AdditionalIncludeDirectories="..\..\ jenga\include\common;..\..\cpplibs\boost;..\BasicCompiler_Common\include"151 AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;..\BasicCompiler_Common\include" 152 152 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;JPN" 153 153 StringPooling="true" … … 1453 1453 > 1454 1454 <File 1455 RelativePath="..\BasicCompiler_Common\include\option.h" 1456 > 1457 </File> 1458 <File 1455 1459 RelativePath="..\BasicCompiler_Common\include\Smoothie.h" 1456 1460 > -
trunk/abdev/BasicCompiler32/MakePeHdr.cpp
r159 r165 1 #include <jenga/include/common/Environment.h> 2 1 3 #include "../BasicCompiler_Common/common.h" 2 4 #include "Opcode.h" … … 342 344 #ifdef _DEBUG 343 345 { 344 ofstream ofs( ( (string)BasicSystemDir + "middle_code.txt" ).c_str() );346 ofstream ofs( ( Jenga::Common::Environment::GetAppDir() + "\\middle_code.txt" ).c_str() ); 345 347 ofs << basbuf << endl; 346 348 ofs.close(); … … 1155 1157 char *DosStubBuffer; 1156 1158 int DosStubSize; 1157 extern char BasicSystemDir[MAX_PATH];1158 sprintf(temporary,"%sSubOperation\\dosstub.pgm",BasicSystemDir);1159 hFile=CreateFile(temporary,GENERIC_READ,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);1159 hFile=CreateFile( 1160 ( Jenga::Common::Environment::GetAppDir() + "\\SubOperation\\dosstub.pgm" ).c_str(), 1161 GENERIC_READ,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); 1160 1162 if(hFile==INVALID_HANDLE_VALUE){ 1161 1163 MessageBox(hOwnerEditor,"dosstub.pgmの読み込みに失敗","error",MB_OK); -
trunk/abdev/BasicCompiler_Common/BasicCompiler.cpp
r140 r165 1 #include <jenga/include/common/logger.h> 2 #include <jenga/include/common/Environment.h> 3 1 4 #include "BasicCompiler.h" 2 5 … … 221 224 } 222 225 223 sprintf(temporary,"%spgm.tmp",BasicSystemDir); 224 hFile=CreateFile(temporary,GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_TEMPORARY,NULL); 226 hFile=CreateFile( 227 ( Jenga::Common::Environment::GetAppDir() + "\\pgm.tmp" ).c_str(), 228 GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_TEMPORARY,NULL); 225 229 WriteFile(hFile,FileName,lstrlen(FileName),&dw,NULL); 226 230 CloseHandle(hFile); … … 750 754 HANDLE hFile; 751 755 DWORD dwAccessBytes; 752 sprintf(temporary,"%spgm.tmp",BasicSystemDir); 753 hFile=CreateFile(temporary,GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); 756 hFile=CreateFile( 757 ( Jenga::Common::Environment::GetAppDir() + "\\pgm.tmp" ).c_str(), 758 GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); 754 759 if(hFile!=INVALID_HANDLE_VALUE){ 755 760 ReadFile(hFile,temporary,MAX_PATH,&dwAccessBytes,NULL); -
trunk/abdev/BasicCompiler_Common/BreakPoint.cpp
r4 r165 1 #include <jenga/include/common/Environment.h> 2 1 3 #include "common.h" 2 4 … … 93 95 num=0; 94 96 95 96 HANDLE hFile;97 char temporary[MAX_PATH];98 GetTempPath(MAX_PATH,temporary);99 if(temporary[lstrlen(temporary)-1]!='\\') lstrcat(temporary,"\\");100 lstrcat(temporary,"ab_breakpoint.tmp");101 102 //未完成103 sprintf(temporary,"%sab_breakpoint.tmp",BasicSystemDir);104 105 97 char *buffer; 106 98 buffer=(char *)HeapAlloc(hHeap,0,65535); 107 99 108 hFile=CreateFile(temporary,GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); 100 HANDLE hFile=CreateFile( 101 ( Jenga::Common::Environment::GetAppDir() + "\\ab_breakpoint.tmp" ).c_str(), 102 GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); 109 103 if(hFile!=INVALID_HANDLE_VALUE){ 110 104 DWORD dwAccBytes; … … 124 118 while(buffer[i]!='\n'&&buffer[i]!='\0'){ 125 119 //行番号 120 char temporary[1024]; 126 121 i=GetOneParameter(buffer,i,temporary); 127 122 i2=atoi(temporary); -
trunk/abdev/BasicCompiler_Common/Debug.cpp
r100 r165 25 25 dwStepRun=2; 26 26 } 27 char *ReadBuffer_NonErrMsg(char *path); 27 28 28 void Debugger_StepCursor(void){ 29 29 char temporary[MAX_PATH]; -
trunk/abdev/BasicCompiler_Common/NonVolatile.cpp
r4 r165 1 #include <jenga/include/common/Environment.h> 2 1 3 #include "../BasicCompiler_Common/common.h" 2 4 3 5 4 char *ReadBuffer_NonErrMsg( char *path){6 char *ReadBuffer_NonErrMsg( const string &path ){ 5 7 extern HANDLE hHeap; 6 8 int i; … … 9 11 HANDLE hFile; 10 12 11 hFile=CreateFile(path ,GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);13 hFile=CreateFile(path.c_str(),GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); 12 14 if(hFile==INVALID_HANDLE_VALUE) return 0; 13 15 i=GetFileSize(hFile,0); … … 18 20 return buffer; 19 21 } 20 _int8 WriteBuffer( char *path,char *buffer,int length){22 _int8 WriteBuffer( const string &path, char *buffer,int length){ 21 23 extern HWND hOwnerEditor; 22 24 HANDLE hFile; 23 25 DWORD dw; 24 hFile=CreateFile(path ,GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);26 hFile=CreateFile(path.c_str(),GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL); 25 27 if(hFile==INVALID_HANDLE_VALUE){ 26 28 char temporary[MAX_PATH]; … … 101 103 extern HANDLE hHeap; 102 104 int i; 103 char temporary[MAX_PATH];104 105 105 106 //開く 106 extern char BasicSystemDir[MAX_PATH]; 107 sprintf(temporary,"%sUserSetting\\compiler.ini",BasicSystemDir); 108 109 buffer=ReadBuffer_NonErrMsg(temporary); 107 buffer=ReadBuffer_NonErrMsg( Jenga::Common::Environment::GetAppDir() + "\\UserSetting\\compiler.ini" ); 110 108 if(!buffer){ 111 109 //レジストリを読み込む … … 137 135 ppWatchStr=(char **)HeapAlloc(hHeap,0,WatchNum*sizeof(char *)+1); 138 136 for(i=0;i<WatchNum;i++){ 137 char temporary[VN_SIZE]; 139 138 sprintf(temporary,"Watch%03d",i); 140 139 … … 248 247 char temporary[MAX_PATH]; 249 248 250 extern char BasicSystemDir[MAX_PATH]; 251 sprintf(temporary,"%sUserSetting",BasicSystemDir); 249 const string userSettingDirPath = Jenga::Common::Environment::GetAppDir() + "\\UserSetting"; 252 250 253 251 HANDLE hFind; 254 252 WIN32_FIND_DATA wfd; 255 hFind=FindFirstFile( temporary,&wfd);253 hFind=FindFirstFile( userSettingDirPath.c_str() ,&wfd); 256 254 if(hFind==INVALID_HANDLE_VALUE){ 257 255 //UserSettingディレクトリを作成 258 if(!CreateDirectory( temporary,NULL)){256 if(!CreateDirectory( userSettingDirPath.c_str() ,NULL)){ 259 257 extern HWND hOwnerEditor; 260 258 MessageBox(hOwnerEditor,"UserSettingディレクトリの作成に失敗","ActiveBasic",MB_OK|MB_ICONEXCLAMATION); … … 287 285 288 286 //保存 289 extern char BasicSystemDir[MAX_PATH];290 sprintf(temporary,"%sUserSetting\\compiler.ini",BasicSystemDir);291 WriteBuffer(temporary,buffer,lstrlen(buffer));287 WriteBuffer( 288 userSettingDirPath + "\\compiler.ini", 289 buffer,lstrlen(buffer)); 292 290 293 291 -
trunk/abdev/BasicCompiler_Common/NonVolatile.h
r4 r165 1 1 2 char *ReadBuffer_NonErrMsg( char *path);2 char *ReadBuffer_NonErrMsg( const string &path ); 3 3 4 4 class CNonVolatile{ -
trunk/abdev/BasicCompiler_Common/ParamImpl.cpp
r140 r165 1 #include <jenga/include/common/logger.h> 2 1 3 #include "common.h" 2 4 -
trunk/abdev/BasicCompiler_Common/common.h
r141 r165 1 1 //#define _CRT_SECURE_NO_DEPRECATE 2 2 #pragma warning(disable : 4996) 3 4 #include <option.h> 3 5 4 6 #include <windows.h> … … 41 43 42 44 43 //バージョン44 #define MAJOR_VER 545 #define MINOR_VER 0046 #define REVISION_VER 0047 48 #ifdef _AMD64_49 #define VER_INFO "(x64) (rev.280)"50 #else51 #define VER_INFO "(rev.280)"52 #endif53 54 45 #if defined(JPN) 55 46 //日本語 … … 153 144 #define EXE_HEADER_SIZE 0x1000 154 145 155 156 // ログ生成を行うためのクラス157 #include <logger.h>158 146 159 147 // クラス管理用のクラス -
trunk/abdev/BasicCompiler_Common/error.cpp
r140 r165 1 #include <jenga/include/common/logger.h> 2 1 3 #include "../BasicCompiler_Common/common.h" 2 4
Note:
See TracChangeset
for help on using the changeset viewer.