From: MX%"[email-masked]" 24-NOV-1992 11:53:52.99
To: LEDERMAN

From: <[email-masked]>
Subject: Re: More comments on BYBASIC to VMS
To: [email-masked]
Date: Tue, 24 Nov 92 11:20:43 EST

You are the first to report a problem with indented #if etc. and
my understanding was that allowing indented #if statements etc.
was one of the changes from the older K&R standard to the ANSI
standard.  We've run into a couple of problems like this involving
the ANSI standard, and I wish I had a copy iof the standard itself.

Thanks very much for sending along the other comments.  The "return NULL"
statements in an int function or "return 0" in a pointer function
are clearly incorrect and I'm surprised that my compilers allowed them.

If you haven't seen it, I pass along the attached:

bwBASIC Notice #001      6 November 1992
----------------------------------------

If you don't want to receive notices about Bywater BASIC (bwBASIC),
please send an email message to me ([email-masked]).

Release of Version 1.10:
-----------------------

Version 1.10 of Bywater BASIC was released for the public on Tuesday
27 October 1992.  It is available for anonymous ftp download from
site duke.cs.duke.edu. Sources and PC binaries have been posted to
SIMTEL20, the source code has appeared in comp.sources.misc, and
the PC binaries have been submitted to comp.binaries.ibm.pc.

Messages indicate that the program has been successfully compiled
on a wide range of machines throughout the world, but I have received
some very helpful feedback about problems and suggested enhancements.

The remainder of this message details problems and suggested fixes
for them.

Some Systems Fail to Find Constants SEEK_SET and RAND_MAX:
---------------------------------------------------------

As I understand it, SEEK_SET (used in bwb_dio.c) should be defined
in stdio.h and RAND_MAX (used in bwb_fnc.c) should be defined in
stdlib.h.  A number of users have reported, however, that their
systems (primarily these are versions of gcc) have failed to find
either or both of these constants.  I suggest the following temporary
work-around solutions:

in bwb_dio.c, add after #include directives:

#ifndef SEEK_SET
#include <unistd.h>
#endif

and in bwb_fnc.c, add after #include directives:

#ifndef RAND_MAX
#define RAND_MAX	32767
#endif

Some Systems Object to Prototyped Functions with "static" When
the Function Declarations Themselves Do Not have "static"
--------------------------------------------------------------

At least one user has reported this problem.  The only solution
(which I shall implement in the next version) is to include
"static" in the function definitions themselves.

Some int Functions Return NULL:
------------------------------

This is strictly wrong and I'm quite surprised that my three compilers
let me get away with it, but in several int functions there appears
"return NULL"; this should be changed to "return 0".

Unix Systems Can Hang Up When ^D is Entered at the Command Line:
---------------------------------------------------------------

The solution here is fairly simple.  In the main() function in file
bwbasic.c, change

	while( TRUE )

to

	while( !feof( stdin ))

and I'm told (haven't tried it myself) that this will screen out
the hang-up.

Many Versions of mkdir() Require Two Arguments:
----------------------------------------------

When DIRECTORY_CMDS is set to TRUE the program calls three subroutines
which are prototyped in bwbasic.h.  The prototype for mkdir() conflicts
with many systems which require a second argument describing the
permissions set for the new file.  As it stands, even on those systems
where mkdir() will work, the new directories created will have per-
missions of 0, which doesn't really help.  Thus, MKDIR only really
works under DOS where permissions aren't utilized.  The second parameter
will have to be added, setting appropriate access privileges.

Bywater Software:
----------------

Some objected that I should not have posted the release notice to
newsgroups, since it was a commercial notice.  I'd like to note
that "Bywater Software" is simply the name I place on the software
that I write (for fun), and that I have never been paid for any
software released under the "Bywater" name.  Still, if it was
inappropriate to post the release annoucement to the net, then
I apologize.

Communications:
--------------

Ted A. Campbell
Bywater Software
P. O. Box 4023
Duke Station
Durham, NC  27706
USA
email: [email-masked]