Changeset 165 in dev


Ignore:
Timestamp:
Jun 17, 2007, 1:45:13 PM (17 years ago)
Author:
dai_9181
Message:
 
Location:
trunk/abdev
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/abdev/BasicCompiler32/BasicCompiler.vcproj

    r163 r165  
    4848                Name="VCCLCompilerTool"
    4949                Optimization="0"
    50                 AdditionalIncludeDirectories="..\..\jenga\include\common;..\..\cpplibs\boost;..\BasicCompiler_Common\include"
     50                AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;..\BasicCompiler_Common\include"
    5151                PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;JPN"
    5252                MinimalRebuild="true"
     
    149149                InlineFunctionExpansion="2"
    150150                FavorSizeOrSpeed="1"
    151                 AdditionalIncludeDirectories="..\..\jenga\include\common;..\..\cpplibs\boost;..\BasicCompiler_Common\include"
     151                AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;..\BasicCompiler_Common\include"
    152152                PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;JPN"
    153153                StringPooling="true"
     
    14531453                >
    14541454                <File
     1455                    RelativePath="..\BasicCompiler_Common\include\option.h"
     1456                    >
     1457                </File>
     1458                <File
    14551459                    RelativePath="..\BasicCompiler_Common\include\Smoothie.h"
    14561460                    >
  • trunk/abdev/BasicCompiler32/MakePeHdr.cpp

    r159 r165  
     1#include <jenga/include/common/Environment.h>
     2
    13#include "../BasicCompiler_Common/common.h"
    24#include "Opcode.h"
     
    342344#ifdef _DEBUG
    343345    {
    344         ofstream ofs( ( (string)BasicSystemDir + "middle_code.txt" ).c_str() );
     346        ofstream ofs( ( Jenga::Common::Environment::GetAppDir() + "\\middle_code.txt" ).c_str() );
    345347        ofs << basbuf << endl;
    346348        ofs.close();
     
    11551157    char *DosStubBuffer;
    11561158    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);
    11601162    if(hFile==INVALID_HANDLE_VALUE){
    11611163        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
    14#include "BasicCompiler.h"
    25
     
    221224            }
    222225
    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);
    225229            WriteFile(hFile,FileName,lstrlen(FileName),&dw,NULL);
    226230            CloseHandle(hFile);
     
    750754        HANDLE hFile;
    751755        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);
    754759        if(hFile!=INVALID_HANDLE_VALUE){
    755760            ReadFile(hFile,temporary,MAX_PATH,&dwAccessBytes,NULL);
  • trunk/abdev/BasicCompiler_Common/BreakPoint.cpp

    r4 r165  
     1#include <jenga/include/common/Environment.h>
     2
    13#include "common.h"
    24
     
    9395    num=0;
    9496
    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 
    10597    char *buffer;
    10698    buffer=(char *)HeapAlloc(hHeap,0,65535);
    10799
    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);
    109103    if(hFile!=INVALID_HANDLE_VALUE){
    110104        DWORD dwAccBytes;
     
    124118        while(buffer[i]!='\n'&&buffer[i]!='\0'){
    125119            //行番号
     120            char temporary[1024];
    126121            i=GetOneParameter(buffer,i,temporary);
    127122            i2=atoi(temporary);
  • trunk/abdev/BasicCompiler_Common/Debug.cpp

    r100 r165  
    2525    dwStepRun=2;
    2626}
    27 char *ReadBuffer_NonErrMsg(char *path);
     27
    2828void Debugger_StepCursor(void){
    2929    char temporary[MAX_PATH];
  • trunk/abdev/BasicCompiler_Common/NonVolatile.cpp

    r4 r165  
     1#include <jenga/include/common/Environment.h>
     2
    13#include "../BasicCompiler_Common/common.h"
    24
    35
    4 char *ReadBuffer_NonErrMsg(char *path){
     6char *ReadBuffer_NonErrMsg( const string &path ){
    57    extern HANDLE hHeap;
    68    int i;
     
    911    HANDLE hFile;
    1012
    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);
    1214    if(hFile==INVALID_HANDLE_VALUE) return 0;
    1315    i=GetFileSize(hFile,0);
     
    1820    return buffer;
    1921}
    20 _int8 WriteBuffer(char *path,char *buffer,int length){
     22_int8 WriteBuffer( const string &path, char *buffer,int length){
    2123    extern HWND hOwnerEditor;
    2224    HANDLE hFile;
    2325    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);
    2527    if(hFile==INVALID_HANDLE_VALUE){
    2628        char temporary[MAX_PATH];
     
    101103    extern HANDLE hHeap;
    102104    int i;
    103     char temporary[MAX_PATH];
    104105
    105106    //開く
    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" );
    110108    if(!buffer){
    111109        //レジストリを読み込む
     
    137135    ppWatchStr=(char **)HeapAlloc(hHeap,0,WatchNum*sizeof(char *)+1);
    138136    for(i=0;i<WatchNum;i++){
     137        char temporary[VN_SIZE];
    139138        sprintf(temporary,"Watch%03d",i);
    140139
     
    248247    char temporary[MAX_PATH];
    249248
    250     extern char BasicSystemDir[MAX_PATH];
    251     sprintf(temporary,"%sUserSetting",BasicSystemDir);
     249    const string userSettingDirPath = Jenga::Common::Environment::GetAppDir() + "\\UserSetting";
    252250
    253251    HANDLE hFind;
    254252    WIN32_FIND_DATA wfd;
    255     hFind=FindFirstFile(temporary,&wfd);
     253    hFind=FindFirstFile( userSettingDirPath.c_str() ,&wfd);
    256254    if(hFind==INVALID_HANDLE_VALUE){
    257255        //UserSettingディレクトリを作成
    258         if(!CreateDirectory(temporary,NULL)){
     256        if(!CreateDirectory( userSettingDirPath.c_str() ,NULL)){
    259257            extern HWND hOwnerEditor;
    260258            MessageBox(hOwnerEditor,"UserSettingディレクトリの作成に失敗","ActiveBasic",MB_OK|MB_ICONEXCLAMATION);
     
    287285
    288286    //保存
    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));
    292290
    293291
  • trunk/abdev/BasicCompiler_Common/NonVolatile.h

    r4 r165  
    11
    2 char *ReadBuffer_NonErrMsg(char *path);
     2char *ReadBuffer_NonErrMsg( const string &path );
    33
    44class CNonVolatile{
  • trunk/abdev/BasicCompiler_Common/ParamImpl.cpp

    r140 r165  
     1#include <jenga/include/common/logger.h>
     2
    13#include "common.h"
    24
  • trunk/abdev/BasicCompiler_Common/common.h

    r141 r165  
    11//#define _CRT_SECURE_NO_DEPRECATE
    22#pragma warning(disable : 4996)
     3
     4#include <option.h>
    35
    46#include <windows.h>
     
    4143
    4244
    43 //バージョン
    44 #define MAJOR_VER       5
    45 #define MINOR_VER       00
    46 #define REVISION_VER    00
    47 
    48 #ifdef _AMD64_
    49 #define VER_INFO        "(x64) (rev.280)"
    50 #else
    51 #define VER_INFO        "(rev.280)"
    52 #endif
    53 
    5445#if defined(JPN)
    5546//日本語
     
    153144#define EXE_HEADER_SIZE 0x1000
    154145
    155 
    156 // ログ生成を行うためのクラス
    157 #include <logger.h>
    158146
    159147// クラス管理用のクラス
  • trunk/abdev/BasicCompiler_Common/error.cpp

    r140 r165  
     1#include <jenga/include/common/logger.h>
     2
    13#include "../BasicCompiler_Common/common.h"
    24
Note: See TracChangeset for help on using the changeset viewer.