Changeset 71

Show
Ignore:
Timestamp:
03/22/07 22:51:37 (20 months ago)
Author:
matthiasm
Message:

Added a Microsoft VisualC V6 project file to compile a standalone command line version of NEWT/0. Cygwin must still be installed on the build system for lex (flex) and yacc (bison). No mayor changes were made to existing files, so I assume that no fixes are required for other platforms.

Location:
NEWT0/trunk
Files:
9 added
7 modified

Legend:

Unmodified
Added
Removed
  • NEWT0/trunk/src/newt_core/NewtBC.c

    r68 r71  
    7373 
    7474 
     75#ifndef _MSC_VER 
    7576#pragma mark - 
    7677#pragma mark ローカル変数 
     78#endif 
     79 
    7780/* ローカル変数 */ 
    7881 
     
    26562659 
    26572660 
     2661#ifndef _MSC_VER 
    26582662#pragma mark - 
     2663#endif 
     2664 
    26592665/*------------------------------------------------------------------------*/ 
    26602666/** エラーメッセージの表示 
  • NEWT0/trunk/src/newt_core/NewtObj.c

    r68 r71  
    1515#include <stdio.h> 
    1616#include <string.h> 
     17 
     18#include "config.h" 
    1719 
    1820#include "NewtCore.h" 
  • NEWT0/trunk/src/newt_core/NewtStr.c

    r68 r71  
    1212/* ヘッダファイル */ 
    1313#include <string.h> 
     14 
     15#include "config.h" 
    1416 
    1517#include "NewtCore.h" 
  • NEWT0/trunk/src/newt_core/NewtVM.c

    r68 r71  
    3939 
    4040 
     41#ifndef _MSC_VER 
    4142#pragma mark - 
     43#endif 
     44 
    4245/* マクロ */ 
    4346 
     
    6568 
    6669 
     70#ifndef _MSC_VER 
    6771#pragma mark - 
     72#endif 
     73 
    6874/* 関数プロトタイプ */ 
    6975 
     
    345351 
    346352 
     353#ifndef _MSC_VER 
    347354#pragma mark - 
     355#endif 
     356 
    348357/*------------------------------------------------------------------------*/ 
    349358/** self を取得 
     
    576585 
    577586 
     587#ifndef _MSC_VER 
    578588#pragma mark - 
     589#endif 
     590 
    579591/*------------------------------------------------------------------------*/ 
    580592/** 関数オブジェクトを現在の実行関数にする 
     
    618630} 
    619631 
    620  
     632#ifndef _MSC_VER 
    621633#pragma mark *** 呼出しスタック 
     634#endif 
    622635/*------------------------------------------------------------------------*/ 
    623636/** レジスタの巻き戻し 
     
    692705 
    693706 
     707#ifndef _MSC_VER 
    694708#pragma mark *** スタック 
     709#endif 
     710 
    695711/*------------------------------------------------------------------------*/ 
    696712/** スタックのポップ 
     
    791807 
    792808 
     809#ifndef _MSC_VER 
    793810#pragma mark *** 例外ハンドラスタック 
     811#endif 
     812 
    794813/*------------------------------------------------------------------------*/ 
    795814/** 例外スタックにプッシュ 
     
    884903 
    885904 
     905#ifndef _MSC_VER 
    886906#pragma mark *** Literals 
     907#endif 
     908 
    887909/*------------------------------------------------------------------------*/ 
    888910/** リテラルを取出す 
     
    906928 
    907929 
     930#ifndef _MSC_VER 
    908931#pragma mark *** Iterator 
     932#endif 
     933 
    909934/*------------------------------------------------------------------------*/ 
    910935/** イテレータオブジェクトを作成する 
     
    10491074 
    10501075 
     1076#ifndef _MSC_VER 
    10511077#pragma mark - 
     1078#endif 
     1079 
    10521080/*------------------------------------------------------------------------*/ 
    10531081/** 引数をスタックから取出して配列にする 
     
    19011929 
    19021930 
     1931#ifndef _MSC_VER 
    19031932#pragma mark - 
    19041933#pragma mark *** Simple instructions 
     1934#endif 
     1935 
    19051936/*------------------------------------------------------------------------*/ 
    19061937/** スタックのポップ 
     
    20162047 
    20172048 
     2049#ifndef _MSC_VER 
    20182050#pragma mark - 
    20192051#pragma mark *** Primitive functions 
     2052#endif 
     2053 
    20202054/*------------------------------------------------------------------------*/ 
    20212055/** 加算 
     
    24642498 
    24652499 
     2500#ifndef _MSC_VER 
    24662501#pragma mark - 
    24672502#pragma mark *** Instructions 
     2503#endif 
     2504 
    24682505/*------------------------------------------------------------------------*/ 
    24692506/** 命令セットテーブル登録用のダミー 
     
    30823119 
    30833120 
     3121#ifndef _MSC_VER 
    30843122#pragma mark *** ダンプ 
     3123#endif 
     3124 
    30853125/*------------------------------------------------------------------------*/ 
    30863126/** 出力ファイルに命令コードの名前をダンプ出力 
     
    33233363 
    33243364 
     3365#ifndef _MSC_VER 
    33253366#pragma mark - 
    33263367#pragma mark *** インタプリタ 
     3368#endif 
     3369 
    33273370/*------------------------------------------------------------------------*/ 
    33283371/** レジスタの初期化  
     
    38063849 
    38073850 
     3851#ifndef _MSC_VER 
    38083852#pragma mark - 
     3853#endif 
     3854 
    38093855/*------------------------------------------------------------------------*/ 
    38103856/** ファイルを読込んでスクリプトを実行 
  • NEWT0/trunk/src/parser/lookup_words.c

    r68 r71  
    1414#include <string.h> 
    1515#include <stdlib.h> 
     16#include "config.h" 
    1617#include "lookup_words.h" 
    1718 
  • NEWT0/trunk/src/parser/newt.l

    r68 r71  
    792792void nps_yyinit(void) 
    793793{ 
    794     static bool inited = false; 
     794    static bool inited = 0; // was "false" 
    795795 
    796796    if (! inited) 
  • NEWT0/trunk/src/utils/endian_utils.c

    r68 r71  
    1414#include <string.h> 
    1515#include "utils/endian_utils.h" 
     16 
     17#if _MSC_VER==1200 
     18# define ULL(a) a 
     19#endif 
     20 
     21#ifndef ULL 
     22# define ULL(a) a##ULL 
     23#endif 
    1624 
    1725 
     
    3139    memcpy(&tmp, &d, sizeof(d)); 
    3240    tmp = (tmp >> 32) | (tmp << 32); 
    33     tmp = ((tmp & 0xff00ff00ff00ff00ULL) >> 8) | ((tmp & 0x00ff00ff00ff00ffULL) << 8); 
    34     tmp = ((tmp & 0xffff0000ffff0000ULL) >> 16) | ((tmp & 0x0000ffff0000ffffULL) << 16); 
     41    tmp = ((tmp & ULL(0xff00ff00ff00ff00)) >> 8) | ((tmp & ULL(0x00ff00ff00ff00ff)) << 8); 
     42    tmp = ((tmp & ULL(0xffff0000ffff0000)) >> 16) | ((tmp & ULL(0x0000ffff0000ffff)) << 16); 
    3543    memcpy(&d, &tmp, sizeof(d)); 
    3644