diff --git a/README b/README index 8dcc782..1e4340b 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ README file for - Bywater BASIC Interpreter/Shell, version 2.50 + Bywater BASIC Interpreter/Shell, version 2.60 --------------------------------------------- Copyright (c) 1993, Ted A. Campbell @@ -27,6 +27,9 @@ Version 2.50 modifications by Paul Edwards, 4 June 2009 + Version 2.60 modifications by Paul Edwards, + 6 November 2012 + @@ -200,6 +203,13 @@ CHANGE HISTORY +CHANGES FROM 2.50 to 2.60 + + * New maths functions and append mode support from Edmond Orignac + + * Bug fixes + + CHANGES FROM 2.40 to 2.50 * Bug fixes diff --git a/bwb_dio.c b/bwb_dio.c index 7110c30..d9b6860 100644 --- a/bwb_dio.c +++ b/bwb_dio.c @@ -74,7 +74,7 @@ static int dio_flush(); DESCRIPTION: This function implements the BASIC OPEN command to open a stream for device input/output. - SYNTAX: 1. OPEN "I"|"O"|"R", [#]n, filename [,rlen] + SYNTAX: 1. OPEN "I"|"O"|"R"|"A", [#]n, filename [,rlen] 2. OPEN filename [FOR INPUT|OUTPUT|APPEND|] AS [#]n [LEN=n] ***************************************************************/ @@ -239,8 +239,14 @@ bwb_open( l ) mode = DEVMODE_RANDOM; } - /* error: none of the appropriate modes found */ + /* Added by EO: open file for sequential APPEND (GW-Basic, Burroughs B20)*/ + + else if ( ( first[ 0 ] == 'a' ) || ( first[ 0 ] == 'A' )) + { + mode = DEVMODE_APPEND; + } + /* error: none of the appropriate modes found */ else { #if PROG_ERRORS @@ -294,7 +300,7 @@ bwb_open( l ) } else if ( strcmp( atbuf, "APPEND" ) == 0 ) { - mode = DEVMODE_RANDOM; + mode = DEVMODE_APPEND; } else { @@ -429,7 +435,9 @@ bwb_open( l ) return bwb_zline( l ); } - if ( dev_table[ req_devnumber ].mode == DEVMODE_CLOSED ) + if ( ( dev_table[ req_devnumber ].mode == DEVMODE_CLOSED ) && + /* PE: JBV mod to close requires this open check */ + ( dev_table[ req_devnumber ].buffer != NULL ) ) { #if INTENSIVE_DEBUG sprintf( bwb_ebuf, "in bwb_open(): using previously closed file (and buffer)" ); diff --git a/bwb_mth.c b/bwb_mth.c index 7da1764..ee97ab9 100644 --- a/bwb_mth.c +++ b/bwb_mth.c @@ -2042,4 +2042,720 @@ round_int( x ) } } +/*************************************************************** + + FUNCTION: fnc_cosh() + + DESCRIPTION: This C function implements the BASIC + predefined COSH function, returning the + hyperbolic cosine of the argument. + + SYNTAX: COSH( number ) + +***************************************************************/ + +#if ANSI_C +struct bwb_variable * +fnc_cosh( int argc, struct bwb_variable *argv, int unique_id ) +#else +struct bwb_variable * +fnc_cosh( argc, argv, unique_id ) + int argc; + struct bwb_variable *argv; + int unique_id; +#endif + { + static struct bwb_variable nvar; + static int init = FALSE; + + /* initialize the variable if necessary */ + + if ( init == FALSE ) + { + init = TRUE; + var_make( &nvar, NUMBER ); + } + +#if INTENSIVE_DEBUG + sprintf( bwb_ebuf, "in fnc_cosh(): received f_arg <%f> ", + var_getnval( &( argv[ 0 ] ) ) ); + bwb_debug( bwb_ebuf ); +#endif + +#if PROG_ERRORS + if ( argc < 1 ) + { + sprintf( bwb_ebuf, "Not enough parameters (%d) to function COSH().", + argc ); + bwb_error( bwb_ebuf ); + return NULL; + } + else if ( argc > 1 ) + { + sprintf( bwb_ebuf, "Too many parameters (%d) to function COSH().", + argc ); + bwb_error( bwb_ebuf ); + return NULL; + } +#else + if ( fnc_checkargs( argc, argv, 1, 1 ) == FALSE ) + { + return NULL; + } +#endif + + /* assign values */ + + * var_findnval( &nvar, nvar.array_pos ) + = (bnumber) cosh( (double) var_getnval( &( argv[ 0 ] ) ) ); + + return &nvar; + + } + + +/*************************************************************** + + FUNCTION: fnc_sinh() + + DESCRIPTION: This C function implements the BASIC + predefined SINH function, returning the + hyperbolic sine of the argument. + + SYNTAX: SINH( number ) + +***************************************************************/ + +#if ANSI_C +struct bwb_variable * +fnc_sinh( int argc, struct bwb_variable *argv, int unique_id ) +#else +struct bwb_variable * +fnc_sinh( argc, argv, unique_id ) + int argc; + struct bwb_variable *argv; + int unique_id; +#endif + { + static struct bwb_variable nvar; + static int init = FALSE; + + /* initialize the variable if necessary */ + + if ( init == FALSE ) + { + init = TRUE; + var_make( &nvar, NUMBER ); + } + +#if INTENSIVE_DEBUG + sprintf( bwb_ebuf, "in fnc_sinh(): received f_arg <%f> ", + var_getnval( &( argv[ 0 ] ) ) ); + bwb_debug( bwb_ebuf ); +#endif + +#if PROG_ERRORS + if ( argc < 1 ) + { + sprintf( bwb_ebuf, "Not enough parameters (%d) to function SINH().", + argc ); + bwb_error( bwb_ebuf ); + return NULL; + } + else if ( argc > 1 ) + { + sprintf( bwb_ebuf, "Too many parameters (%d) to function SINH().", + argc ); + bwb_error( bwb_ebuf ); + return NULL; + } +#else + if ( fnc_checkargs( argc, argv, 1, 1 ) == FALSE ) + { + return NULL; + } +#endif + + /* assign values */ + + * var_findnval( &nvar, nvar.array_pos ) + = (bnumber) sinh( (double) var_getnval( &( argv[ 0 ] ) ) ); + + return &nvar; + + } + +/*************************************************************** + + FUNCTION: fnc_tanh() + + DESCRIPTION: This C function implements the BASIC + predefined TANH function, returning the + hyperbolic tangent of the argument. + + SYNTAX: TANH( number ) + +***************************************************************/ + +#if ANSI_C +struct bwb_variable * +fnc_tanh( int argc, struct bwb_variable *argv, int unique_id ) +#else +struct bwb_variable * +fnc_tanh( argc, argv, unique_id ) + int argc; + struct bwb_variable *argv; + int unique_id; +#endif + { + static struct bwb_variable nvar; + static int init = FALSE; + + /* initialize the variable if necessary */ + + if ( init == FALSE ) + { + init = TRUE; + var_make( &nvar, NUMBER ); + } + +#if INTENSIVE_DEBUG + sprintf( bwb_ebuf, "in fnc_tanh(): received f_arg <%f> ", + var_getnval( &( argv[ 0 ] ) ) ); + bwb_debug( bwb_ebuf ); +#endif + +#if PROG_ERRORS + if ( argc < 1 ) + { + sprintf( bwb_ebuf, "Not enough parameters (%d) to function TANH().", + argc ); + bwb_error( bwb_ebuf ); + return NULL; + } + else if ( argc > 1 ) + { + sprintf( bwb_ebuf, "Too many parameters (%d) to function TANH().", + argc ); + bwb_error( bwb_ebuf ); + return NULL; + } +#else + if ( fnc_checkargs( argc, argv, 1, 1 ) == FALSE ) + { + return NULL; + } +#endif + + /* assign values */ + + * var_findnval( &nvar, nvar.array_pos ) + = (bnumber) tanh( (double) var_getnval( &( argv[ 0 ] ) ) ); + + return &nvar; + + } + + + + +/*************************************************************** + + FUNCTION: fnc_log10() + + DESCRIPTION: This C function implements the BASIC + predefined LOG10 function, returning the + decimal logarithm of the argument. + + SYNTAX: LOG10( number ) + +***************************************************************/ + +#if ANSI_C +struct bwb_variable * +fnc_log10( int argc, struct bwb_variable *argv, int unique_id ) +#else +struct bwb_variable * +fnc_log10( argc, argv, unique_id ) + int argc; + struct bwb_variable *argv; + int unique_id; +#endif + { + static struct bwb_variable nvar; + static int init = FALSE; + + /* initialize the variable if necessary */ + + if ( init == FALSE ) + { + init = TRUE; + var_make( &nvar, NUMBER ); + } + +#if INTENSIVE_DEBUG + sprintf( bwb_ebuf, "in fnc_log10(): received f_arg <%f> ", + var_getnval( &( argv[ 0 ] ) ) ); + bwb_debug( bwb_ebuf ); +#endif + +#if PROG_ERRORS + if ( argc < 1 ) + { + sprintf( bwb_ebuf, "Not enough parameters (%d) to function LOG10().", + argc ); + bwb_error( bwb_ebuf ); + return NULL; + } + else if ( argc > 1 ) + { + sprintf( bwb_ebuf, "Too many parameters (%d) to function LOG10().", + argc ); + bwb_error( bwb_ebuf ); + return NULL; + } +#else + if ( fnc_checkargs( argc, argv, 1, 1 ) == FALSE ) + { + return NULL; + } +#endif + + /* assign values */ + + * var_findnval( &nvar, nvar.array_pos ) + = (bnumber) log10( (double) var_getnval( &( argv[ 0 ] ) ) ); + + return &nvar; + + } + + + + +/*************************************************************** + + FUNCTION: fnc_log2() + + DESCRIPTION: This C function implements the BASIC + predefined LOG2 function, returning the + base 2 logarithm of the argument. + + SYNTAX: LOG2( number ) + +***************************************************************/ + +#if ANSI_C +struct bwb_variable * +fnc_log2( int argc, struct bwb_variable *argv, int unique_id ) +#else +struct bwb_variable * +fnc_log2( argc, argv, unique_id ) + int argc; + struct bwb_variable *argv; + int unique_id; +#endif + { + static struct bwb_variable nvar; + static int init = FALSE; + + /* initialize the variable if necessary */ + + if ( init == FALSE ) + { + init = TRUE; + var_make( &nvar, NUMBER ); + } + +#if INTENSIVE_DEBUG + sprintf( bwb_ebuf, "in fnc_log2(): received f_arg <%f> ", + var_getnval( &( argv[ 0 ] ) ) ); + bwb_debug( bwb_ebuf ); +#endif + +#if PROG_ERRORS + if ( argc < 1 ) + { + sprintf( bwb_ebuf, "Not enough parameters (%d) to function LOG2().", + argc ); + bwb_error( bwb_ebuf ); + return NULL; + } + else if ( argc > 1 ) + { + sprintf( bwb_ebuf, "Too many parameters (%d) to function LOG2().", + argc ); + bwb_error( bwb_ebuf ); + return NULL; + } +#else + if ( fnc_checkargs( argc, argv, 1, 1 ) == FALSE ) + { + return NULL; + } +#endif + + /* assign values */ + + * var_findnval( &nvar, nvar.array_pos ) + = (bnumber) log( (double) var_getnval( &( argv[ 0 ] ) ) )/log(2.0); + + return &nvar; + + } + + +/*************************************************************** + + FUNCTION: fnc_acos() + + DESCRIPTION: This C function implements the BASIC + predefined ACOS function, returning the + arccosine of the argument. + + SYNTAX: ACOS( number ) + +***************************************************************/ + +#if ANSI_C +struct bwb_variable * +fnc_acos( int argc, struct bwb_variable *argv, int unique_id ) +#else +struct bwb_variable * +fnc_acos( argc, argv, unique_id ) + int argc; + struct bwb_variable *argv; + int unique_id; +#endif + { + static struct bwb_variable nvar; + static int init = FALSE; + + /* initialize the variable if necessary */ + + if ( init == FALSE ) + { + init = TRUE; + var_make( &nvar, NUMBER ); + } + +#if INTENSIVE_DEBUG + sprintf( bwb_ebuf, "in fnc_acos(): received f_arg <%f> ", + var_getnval( &( argv[ 0 ] ) ) ); + bwb_debug( bwb_ebuf ); +#endif + +#if PROG_ERRORS + if ( argc < 1 ) + { + sprintf( bwb_ebuf, "Not enough parameters (%d) to function ACOS().", + argc ); + bwb_error( bwb_ebuf ); + return NULL; + } + else if ( argc > 1 ) + { + sprintf( bwb_ebuf, "Too many parameters (%d) to function ACOS().", + argc ); + bwb_error( bwb_ebuf ); + return NULL; + } +#else + if ( fnc_checkargs( argc, argv, 1, 1 ) == FALSE ) + { + return NULL; + } +#endif + + /* assign values */ + + * var_findnval( &nvar, nvar.array_pos ) + = (bnumber) acos( (double) var_getnval( &( argv[ 0 ] ) ) ); + + return &nvar; + + } +/*************************************************************** + + FUNCTION: fnc_asin() + + DESCRIPTION: This C function implements the BASIC + predefined ASIN function, returning the + arc sine of the argument. + + SYNTAX: ASIN( number ) + +***************************************************************/ + +#if ANSI_C +struct bwb_variable * +fnc_asin( int argc, struct bwb_variable *argv, int unique_id ) +#else +struct bwb_variable * +fnc_asin( argc, argv, unique_id ) + int argc; + struct bwb_variable *argv; + int unique_id; +#endif + { + static struct bwb_variable nvar; + static int init = FALSE; + + /* initialize the variable if necessary */ + + if ( init == FALSE ) + { + init = TRUE; + var_make( &nvar, NUMBER ); + } + +#if INTENSIVE_DEBUG + sprintf( bwb_ebuf, "in fnc_asin(): received f_arg <%f> ", + var_getnval( &( argv[ 0 ] ) ) ); + bwb_debug( bwb_ebuf ); +#endif + +#if PROG_ERRORS + if ( argc < 1 ) + { + sprintf( bwb_ebuf, "Not enough parameters (%d) to function ASIN().", + argc ); + bwb_error( bwb_ebuf ); + return NULL; + } + else if ( argc > 1 ) + { + sprintf( bwb_ebuf, "Too many parameters (%d) to function ASIN().", + argc ); + bwb_error( bwb_ebuf ); + return NULL; + } +#else + if ( fnc_checkargs( argc, argv, 1, 1 ) == FALSE ) + { + return NULL; + } +#endif + + /* assign values */ + + * var_findnval( &nvar, nvar.array_pos ) + = (bnumber) asin( (double) var_getnval( &( argv[ 0 ] ) ) ); + + return &nvar; + + } + +/*************************************************************** + + FUNCTION: fnc_cotan() + + DESCRIPTION: This C function implements the BASIC + predefined COT function, returning the + cotangent of the argument. + + SYNTAX: COT( number ) + +***************************************************************/ + +#if ANSI_C +struct bwb_variable * +fnc_cotan( int argc, struct bwb_variable *argv, int unique_id ) +#else +struct bwb_variable * +fnc_cotan( argc, argv, unique_id ) + int argc; + struct bwb_variable *argv; + int unique_id; +#endif + { + static struct bwb_variable nvar; + static int init = FALSE; + + /* initialize the variable if necessary */ + + if ( init == FALSE ) + { + init = TRUE; + var_make( &nvar, NUMBER ); + } + +#if INTENSIVE_DEBUG + sprintf( bwb_ebuf, "in fnc_cotan(): received f_arg <%f> ", + var_getnval( &( argv[ 0 ] ) ) ); + bwb_debug( bwb_ebuf ); +#endif + +#if PROG_ERRORS + if ( argc < 1 ) + { + sprintf( bwb_ebuf, "Not enough parameters (%d) to function COT().", + argc ); + bwb_error( bwb_ebuf ); + return NULL; + } + else if ( argc > 1 ) + { + sprintf( bwb_ebuf, "Too many parameters (%d) to function COT().", + argc ); + bwb_error( bwb_ebuf ); + return NULL; + } +#else + if ( fnc_checkargs( argc, argv, 1, 1 ) == FALSE ) + { + return NULL; + } +#endif + + /* assign values */ + * var_findnval( &nvar, nvar.array_pos ) + = (bnumber) 1.0/tan( (double) var_getnval( &( argv[ 0 ] ) ) ); + + return &nvar; + + } + +/*************************************************************** + + FUNCTION: fnc_cosecant() + + DESCRIPTION: This C function implements the BASIC + predefined CSC function, returning the + cosecant(=1/sin) of the argument. + + SYNTAX: CSC( number ) + +***************************************************************/ + +#if ANSI_C +struct bwb_variable * +fnc_cosecant( int argc, struct bwb_variable *argv, int unique_id ) +#else +struct bwb_variable * +fnc_cosecant( argc, argv, unique_id ) + int argc; + struct bwb_variable *argv; + int unique_id; +#endif + { + static struct bwb_variable nvar; + static int init = FALSE; + + /* initialize the variable if necessary */ + + if ( init == FALSE ) + { + init = TRUE; + var_make( &nvar, NUMBER ); + } + +#if INTENSIVE_DEBUG + sprintf( bwb_ebuf, "in fnc_cosecant(): received f_arg <%f> ", + var_getnval( &( argv[ 0 ] ) ) ); + bwb_debug( bwb_ebuf ); +#endif + +#if PROG_ERRORS + if ( argc < 1 ) + { + sprintf( bwb_ebuf, "Not enough parameters (%d) to function CSC().", + argc ); + bwb_error( bwb_ebuf ); + return NULL; + } + else if ( argc > 1 ) + { + sprintf( bwb_ebuf, "Too many parameters (%d) to function CSC().", + argc ); + bwb_error( bwb_ebuf ); + return NULL; + } +#else + if ( fnc_checkargs( argc, argv, 1, 1 ) == FALSE ) + { + return NULL; + } +#endif + + /* assign values */ + + * var_findnval( &nvar, nvar.array_pos ) + = (bnumber) 1.0/sin( (double) var_getnval( &( argv[ 0 ] ) ) ); + + return &nvar; + + } + + +/*************************************************************** + + FUNCTION: fnc_secant() + + DESCRIPTION: This C function implements the BASIC + predefined LOG2 function, returning the + secant(=1/cos) of the argument. + + SYNTAX: SEC( number ) + +***************************************************************/ + +#if ANSI_C +struct bwb_variable * +fnc_secant( int argc, struct bwb_variable *argv, int unique_id ) +#else +struct bwb_variable * +fnc_secant( argc, argv, unique_id ) + int argc; + struct bwb_variable *argv; + int unique_id; +#endif + { + static struct bwb_variable nvar; + static int init = FALSE; + + /* initialize the variable if necessary */ + + if ( init == FALSE ) + { + init = TRUE; + var_make( &nvar, NUMBER ); + } + +#if INTENSIVE_DEBUG + sprintf( bwb_ebuf, "in fnc_secant(): received f_arg <%f> ", + var_getnval( &( argv[ 0 ] ) ) ); + bwb_debug( bwb_ebuf ); +#endif + +#if PROG_ERRORS + if ( argc < 1 ) + { + sprintf( bwb_ebuf, "Not enough parameters (%d) to function SEC().", + argc ); + bwb_error( bwb_ebuf ); + return NULL; + } + else if ( argc > 1 ) + { + sprintf( bwb_ebuf, "Too many parameters (%d) to function SEC().", + argc ); + bwb_error( bwb_ebuf ); + return NULL; + } +#else + if ( fnc_checkargs( argc, argv, 1, 1 ) == FALSE ) + { + return NULL; + } +#endif + + /* assign values */ + + * var_findnval( &nvar, nvar.array_pos ) + = (bnumber) 1.0/cos( (double) var_getnval( &( argv[ 0 ] ) ) ); + + return &nvar; + + } diff --git a/bwb_prn.c b/bwb_prn.c index d97c56e..c92bd44 100644 --- a/bwb_prn.c +++ b/bwb_prn.c @@ -171,8 +171,8 @@ bwb_print( l ) return bwb_zline( l ); } - - if ( dev_table[ req_devnumber ].mode != DEVMODE_OUTPUT ) +/* Append Mode must also be taken into account (EO) */ + if ( dev_table[ req_devnumber ].mode != DEVMODE_OUTPUT && dev_table[ req_devnumber ].mode != DEVMODE_APPEND ) { #if PROG_ERRORS bwb_error( "in bwb_print(): Requested device is not open for OUTPUT." ); diff --git a/bwb_tbl.c b/bwb_tbl.c index 1d5b8ca..c92c4f3 100644 --- a/bwb_tbl.c +++ b/bwb_tbl.c @@ -210,6 +210,16 @@ struct bwb_function bwb_prefuncs[ FUNCTIONS ] = #endif #if ANSI_FUNCS /* Functions required for ANSI Full BASIC */ + { "COSH", NUMBER, 1, fnc_cosh, (struct bwb_function *) NULL, 0}, + { "SINH", NUMBER, 1, fnc_sinh, (struct bwb_function *) NULL, 0}, + { "TANH", NUMBER, 1, fnc_tanh, (struct bwb_function *) NULL, 0}, + { "LOG10", NUMBER, 1, fnc_log10, (struct bwb_function *) NULL, 0}, + { "LOG2", NUMBER, 1, fnc_log2, (struct bwb_function *) NULL, 0}, +{ "ACOS", NUMBER, 1, fnc_acos, (struct bwb_function *) NULL, 0}, +{ "ASIN", NUMBER, 1, fnc_asin, (struct bwb_function *) NULL, 0}, +{ "COT", NUMBER, 1, fnc_cotan, (struct bwb_function *) NULL, 0}, +{ "CSC", NUMBER, 1, fnc_cosecant, (struct bwb_function *) NULL, 0}, +{ "SEC", NUMBER, 1, fnc_secant, (struct bwb_function *) NULL, 0}, #endif /* The remainder are core functions defined for ANSI Minimal BASIC */ diff --git a/bwbasic.doc b/bwbasic.doc index 934691c..41aec78 100644 --- a/bwbasic.doc +++ b/bwbasic.doc @@ -1786,19 +1786,19 @@ CONTENTS: remain unimplemented are: ACCESS - ANGLE + ANGLE (angle of the vector (X,Y) with the X axis in anticlockwise sense in ECMA-116) AREA ARITHMETIC ARRAY ASK BSTR BVAL - CEIL + CEIL smallest integer >=X CELLS CLIP COLLATE CONNECT - COSH + ! COSH DATUM DEBUG DECIMAL @@ -1818,8 +1818,8 @@ CONTENTS: KEY LCASE LINES - LOG10 - LOG2 + ! LOG10 + ! LOG2 MAT MIX MULTIPOINT @@ -1839,8 +1839,8 @@ CONTENTS: SEIZE SEND SHIFT - SINH - TANH + ! SINH + ! TANH TIMEOUT TRACE TRANSFORM diff --git a/bwbasic.h b/bwbasic.h index c6cc59c..8b5f43a 100644 --- a/bwbasic.h +++ b/bwbasic.h @@ -41,7 +41,7 @@ /* Version number */ -#define VERSION "2.50" /* Current version number */ +#define VERSION "2.60" /* Current version number */ /*************************************************************** @@ -419,7 +419,7 @@ #define FUNCS_COMMON 0 #endif #if ANSI_FUNCS -#define FUNCS_ANSI 0 +#define FUNCS_ANSI 10 #else #define FUNCS_ANSI 0 #endif @@ -1160,6 +1160,16 @@ extern struct bwb_variable * fnc_csng( int argc, struct bwb_variable *argv, int extern struct bwb_variable * fnc_instr( int argc, struct bwb_variable *argv, int unique_id ); extern struct bwb_variable * fnc_str( int argc, struct bwb_variable *argv, int unique_id ); extern struct bwb_variable * fnc_inkey( int argc, struct bwb_variable *argv, int unique_id ); +extern struct bwb_variable *fnc_cosh( int argc, struct bwb_variable *argv, int unique_id ); +extern struct bwb_variable *fnc_sinh( int argc, struct bwb_variable *argv, int unique_id ); +extern struct bwb_variable *fnc_tanh( int argc, struct bwb_variable *argv, int unique_id ); +extern struct bwb_variable *fnc_log10( int argc, struct bwb_variable *argv, int unique_id ); +extern struct bwb_variable *fnc_log2( int argc, struct bwb_variable *argv, int unique_id ); +extern struct bwb_variable *fnc_acos( int argc, struct bwb_variable *argv, int unique_id ); +extern struct bwb_variable *fnc_asin( int argc, struct bwb_variable *argv, int unique_id ); +extern struct bwb_variable *fnc_cotan( int argc, struct bwb_variable *argv, int unique_id ); +extern struct bwb_variable *fnc_secant( int argc, struct bwb_variable *argv, int unique_id ); +extern struct bwb_variable *fnc_cosecant( int argc, struct bwb_variable *argv, int unique_id ); extern bnumber trnc_int( bnumber x ); extern int fnc_checkargs( int argc, struct bwb_variable *argv, diff --git a/bwbasic2.jcl b/bwbasic2.jcl index aa4d6c2..38a44b3 100644 --- a/bwbasic2.jcl +++ b/bwbasic2.jcl @@ -28,7 +28,7 @@ // SPACE=(6144,(70,70,44)),UNIT=SYSALLDA //DD5 DD DSN=&BWBPREF..JCL,DISP=(,CATLG), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=6080), -// SPACE=(6080,(17,17,44)),UNIT=SYSALLDA +// SPACE=(6080,(60,60,44)),UNIT=SYSALLDA // PEND //* //S1 EXEC CREATE diff --git a/bwbasic4.jcl b/bwbasic4.jcl index 90701a3..01b1227 100644 --- a/bwbasic4.jcl +++ b/bwbasic4.jcl @@ -11,8 +11,8 @@ //INPUT DD DSN=&BWBPREF..ALLZIPS,DISP=SHR //OUTPUT DD DSN=&&ZIPS,DISP=(OLD,PASS) //SYSIN DD DUMMY -//SYSPRINT DD SYSOUT=*,DCB=(RECFM=F,LRECL=132,BLKSIZE=132) -//SYSTERM DD SYSOUT=*,DCB=(RECFM=F,LRECL=132,BLKSIZE=132) +//SYSPRINT DD SYSOUT=* +//SYSTERM DD SYSOUT=* // PEND //* //UNZIP2 PROC IN=,OUT=,MINPREF='MINIZIP',BWBPREF='BWBASIC' @@ -21,8 +21,8 @@ //INPUT DD DSN=&&ZIPS(&IN),DISP=(OLD,PASS) //OUTPUT DD DSN=&BWBPREF..&OUT,DISP=SHR //SYSIN DD DUMMY -//SYSPRINT DD SYSOUT=*,DCB=(RECFM=F,LRECL=132,BLKSIZE=132) -//SYSTERM DD SYSOUT=*,DCB=(RECFM=F,LRECL=132,BLKSIZE=132) +//SYSPRINT DD SYSOUT=* +//SYSTERM DD SYSOUT=* // PEND //* //S1 EXEC UNZIP1 diff --git a/bwbasic5.jcl b/bwbasic5.jcl index b71278f..f4e7674 100644 --- a/bwbasic5.jcl +++ b/bwbasic5.jcl @@ -16,10 +16,10 @@ //OUT DD DSN=&&TEMP1,DISP=(,PASS),UNIT=SYSALLDA, // DCB=(LRECL=80,BLKSIZE=6080,RECFM=FB), // SPACE=(6080,(500,500)) -//SYSPRINT DD SYSOUT=*,DCB=(RECFM=F,LRECL=132,BLKSIZE=132) -//SYSTERM DD SYSOUT=*,DCB=(RECFM=F,LRECL=132,BLKSIZE=132) +//SYSPRINT DD SYSOUT=* +//SYSTERM DD SYSOUT=* //* -//ASM EXEC PGM=ASMBLR, +//ASM EXEC PGM=ASMA90, // PARM='DECK,NOLIST', // COND=(4,LT,COMP) //SYSLIB DD DSN=SYS1.MACLIB,DISP=SHR diff --git a/bwbasic7.jcl b/bwbasic7.jcl index 34fa5d4..0bf7871 100644 --- a/bwbasic7.jcl +++ b/bwbasic7.jcl @@ -4,8 +4,8 @@ //BWBASIC EXEC PGM=BWBASIC,PARM='DD:INPUT' //STEPLIB DD DSN=&BWBPREF..LINKLIB,DISP=SHR //SYSIN DD DUMMY -//SYSPRINT DD SYSOUT=*,DCB=(RECFM=F,LRECL=132,BLKSIZE=132) -//SYSTERM DD SYSOUT=*,DCB=(RECFM=F,LRECL=132,BLKSIZE=132) +//SYSPRINT DD SYSOUT=* +//SYSTERM DD SYSOUT=* // PEND //* //CLEAN PROC BWBPREF='BWBASIC' diff --git a/compile.bat b/compile.bat index deb2e0e..917916b 100644 --- a/compile.bat +++ b/compile.bat @@ -21,5 +21,5 @@ call stdcomp bwb_stc.c call stdcomp bwx_tty.c call stdcomp unixio.c -rem gcc -o bwbasic.exe *.o +gcc -mno-cygwin -s -o bwbasic.exe *.o rem bcc32 -ebwbasic.exe *.obj diff --git a/stdcomp.bat b/stdcomp.bat index 514f10a..13c2122 100644 --- a/stdcomp.bat +++ b/stdcomp.bat @@ -1,3 +1,3 @@ -rem gcc -w -c -ansi -I . %1 %2 %3 %4 %5 %6 %7 %8 %9 +gcc -w -c -ansi -mno-cygwin -I . %1 %2 %3 %4 %5 %6 %7 %8 %9 rem bcc32 -w- -A -c -I. %1 %2 %3 %4 %5 %6 %7 %8 %9 -gccmvs -Os -S -ansi -nostdinc -I ../pdos/pdpclib -I . %1 %2 %3 %4 %5 %6 %7 %8 %9 +rem gccmvs -Os -S -ansi -nostdinc -I ../pdos/pdpclib -I . %1 %2 %3 %4 %5 %6 %7 %8 %9 diff --git a/zipcms.bat b/zipcms.bat index 5bc907f..6ad5530 100644 --- a/zipcms.bat +++ b/zipcms.bat @@ -1,2 +1,2 @@ del all.zip -zip -0 -X -ll -j all *.c *.h *.exec *.bas *.parm README COPYING +zip -0 -X -ll -j all *.c *.h *.exec *.bas *.parm README COPYING bwbasic.doc diff --git a/zipmvs.bat b/zipmvs.bat index d9b4e12..1508bc5 100644 --- a/zipmvs.bat +++ b/zipmvs.bat @@ -5,5 +5,5 @@ del all.zip del alljcl.jcl zip -9 -X -ll -j bwbsrc.zip *.c zip -9 -X -ll -j bwbinc.zip *.h -zip -9 -X -ll -j bwbjcl.zip *.jcl README COPYING +zip -9 -X -ll -j bwbjcl.zip *.jcl README COPYING bwbasic.doc zip -9 -X all *.zip