🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
7 messages
7 total messages Started by root Tue, 05 May 1998 00:00
Real-Mode Dos and Windows 3 problem in porting slrn
#40606
Author: root
Date: Tue, 05 May 1998 00:00
6 lines
664 bytes
Functions like SLmemcpy need to use huge pointers to avoid erratic
operation of slrn when a memory boundary is crossed.


Re: Real-Mode Dos and Windows 3 problem in porting slrn
#40604
Author: root
Date: Tue, 05 May 1998 00:00
27 lines
1936 bytes
On 5 May 1998 06:58:07 GMT, root <vtailor@gte.net-nospam> wrote:
>Functions like SLmemcpy need to use huge pointers to avoid erratic
>operation of slrn when a memory boundary is crossed.
>
The real problem with porting slrn to Dos or 16-bit Windows is that
it uses libslang, and libslang declares a number of large static
arrays.

These declarations exhaust the 64 KB segment that also is used for
the runtime program stack in the static library version.  (The
DLL version is almost impossible to compile with compilers like
Borland and MSVC.)  With DOS16_BIT defined in the libslang compile,
there is just enough room for an 8 KB runtime stack.  As a consequence,
you get a stack overflow exception after the first line of the slrn
signon is printed on the screen.

The way to eliminate this problem is to increase runtime stack size.
To do this, _all_ of the slang static arrays have to be turne into
pointers that are intialized using malloc operating on the far Dos
or Windows heap.  If the slang author is willing to make this change
in upcoming releases of the slang code, I will be happy to continue
the work of porting, e. g., slrn, to 16-bit Windows.  Barring this,
however, it is an exercise in futility for me to continue the project
of porting future slrn versions to 16-bit Windows or Dos.

Re: Real-Mode Dos and Windows 3 problem in porting slrn
#40609
Author: John E. Davis
Date: Tue, 05 May 1998 00:00
35 lines
2344 bytes
On 5 May 1998 17:23:25 GMT, root <root@ibm.net>
wrote:
>The real problem with porting slrn to Dos or 16-bit Windows is that
>it uses libslang, and libslang declares a number of large static
>arrays.

For about 6 years I supported slang on 16 bit systems and made sure
that it worked well with the 16 bit applications that I wrote, e.g.,
JED.  But when I began to think about releasing version 1.0, and to
think of the direction that I wanted the library to go, I made the
decision to discontinue catering to the limitations the 16 bit
version, which limited the capabilities of the library.  I believe
that most would agree that version 1.0 of the library is far superior
to the 0.99 version, and that is a consequence of not allowing the 64
Kilobyte barrier to stop me from adding features, or improving
existing features.

Nevertheless, the library is still usable on the 16 bit MSDOS via
using a 32bit DOS extender such as DJGPP.  Therefore, my decison to
drop 16 bit support meant that one would not be able to use the
library with pre-386 PCs, or with Windows 3.1 GUI applications (since
it is still possible to run a 32bit version in a DOS window).

With that said, if you find any *non-initialized* global structures,
then I could probably make the necessary changes to malloc those at
run-time.  Although I think that you will find that most of the global
structures are initialized during compile time, there may be a few
that are not.
-- 
John E. Davis                   Center for Space Research/AXAF Science Center
617-258-8119                    One Hampshire St., Building NE80-6019
http://space.mit.edu/~davis     Cambridge, MA  02139-4307

Re: Real-Mode Dos and Windows 3 problem in porting slrn
#40617
Author: root
Date: Tue, 05 May 1998 00:00
36 lines
2265 bytes
If you want to try out the last beta port of slrn to Windows 3,
I uploaded it to alt.binaries.news-server-comparison.  Typing
`slrn --help' shows what works.  Starting it up with your own
slrn.rc file shows what doesn't work.


In article <6inhud$e61$1@gte1.gte.net>, root@ibm.net says...
>
>On 5 May 1998 06:58:07 GMT, root <vtailor@gte.net-nospam> wrote:
>>Functions like SLmemcpy need to use huge pointers to avoid erratic
>>operation of slrn when a memory boundary is crossed.
>>
>The real problem with porting slrn to Dos or 16-bit Windows is that
>it uses libslang, and libslang declares a number of large static
>arrays.
>
>These declarations exhaust the 64 KB segment that also is used for
>the runtime program stack in the static library version.  (The
>DLL version is almost impossible to compile with compilers like
>Borland and MSVC.)  With DOS16_BIT defined in the libslang compile,
>there is just enough room for an 8 KB runtime stack.  As a consequence,
>you get a stack overflow exception after the first line of the slrn
>signon is printed on the screen.
>
>The way to eliminate this problem is to increase runtime stack size.
>To do this, _all_ of the slang static arrays have to be turne into
>pointers that are intialized using malloc operating on the far Dos
>or Windows heap.  If the slang author is willing to make this change
>in upcoming releases of the slang code, I will be happy to continue
>the work of porting, e. g., slrn, to 16-bit Windows.  Barring this,
>however, it is an exercise in futility for me to continue the project
>of porting future slrn versions to 16-bit Windows or Dos.


Re: Real-Mode Dos and Windows 3 problem in porting slrn
#40688
Author: root
Date: Sun, 10 May 1998 00:00
32 lines
2136 bytes
On 5 May 1998 20:17:06 GMT, John E. Davis <davis@space.mit.edu> wrote:
>On 5 May 1998 17:23:25 GMT, root <root@ibm.net>
>wrote:
>>The real problem with porting slrn to Dos or 16-bit Windows is that
>>it uses libslang, and libslang declares a number of large static
>>arrays.
>
>For about 6 years I supported slang on 16 bit systems and made sure
>that it worked well with the 16 bit applications that I wrote, e.g.,
>JED.

No argument there.  I also agree that later releases are an improvement.
You do initialize pointers to malloced arrays here and there in your
current-release source code, but the practise isn't a consistent one.

The truth is that the inadequacy is not in your code, but in the 16-bit
compilers.  I know of _one_ 16-bit Dos compiler that automatically
generates farmalloc initialization code for all static arrays declared in
programs.  For the MIX C compiler, there is rarely, if ever, a problem
of DGROUP overflow in large programs.  But Borland and Microsoft simply
plunk the static arrays directly into the near heap.

Unfortunately, I don't go along with the DJGPP wave, and I think it is
possible with some recoding to get slang/slrn to work with 16-bit Windows.
I already demonstrated that slang/slrn can be ported to Win16 with the
16-bit worm.exe and the partly working 16-bit slrn.exe that I posted to
one or another binaries group and announced in this forum and elsewhere.

release

Re: Real-Mode Dos and Windows 3 problem in porting slrn
#40706
Author: root
Date: Mon, 11 May 1998 00:00
36 lines
2115 bytes
In article <6j5srm$6o5$1@gte1.gte.net>, vtailor@gte.net-nospam says...
>
>I
>>In article <6inhud$e61$1@gte1.gte.net>, root@ibm.net says...
>>>
>>>On 5 May 1998 06:58:07 GMT, root <vtailor@gte.net-nospam> wrote:
>>>>Functions like SLmemcpy need to use huge pointers to avoid erratic
>>>>operation of slrn when a memory boundary is crossed.
>>>>
>>>The real problem with porting slrn to Dos or 16-bit Windows is that
>>>it uses libslang, and libslang declares a number of large static
>>>arrays.
>>>
>>>These declarations exhaust the 64 KB segment that also is used for
>>>the runtime program stack in the static library version.  (The
>>>DLL version is almost impossible to compile with compilers like
>>>Borland and MSVC.)  With DOS16_BIT defined in the libslang compile,
>>>there is just enough room for an 8 KB runtime stack.  As a consequence,
>>>you get a stack overflow exception after the first line of the slrn
>>>signon is printed on the screen.
>>>
>I found the `store heap data in the far
>heap' switch in Borland's bc45 compiler, and I have slrn.exe partly
>running at the moment.
>

For anyone who is interested, this is the trouble you face backward-
porting a WIN32 application to WIN16.  The filenames used internally
don't take into account the 8_3 limitation of Dos and WIN16.  I have
posted a 2kb .bmp.gz file showing the Dos/slrn window's error message
to alt.binaries.news-server-comparison.



Re: Real-Mode Dos and Windows 3 problem in porting slrn
#40718
Author: root
Date: Mon, 11 May 1998 00:00
31 lines
2042 bytes
I
>In article <6inhud$e61$1@gte1.gte.net>, root@ibm.net says...
>>
>>On 5 May 1998 06:58:07 GMT, root <vtailor@gte.net-nospam> wrote:
>>>Functions like SLmemcpy need to use huge pointers to avoid erratic
>>>operation of slrn when a memory boundary is crossed.
>>>
>>The real problem with porting slrn to Dos or 16-bit Windows is that
>>it uses libslang, and libslang declares a number of large static
>>arrays.
>>
>>These declarations exhaust the 64 KB segment that also is used for
>>the runtime program stack in the static library version.  (The
>>DLL version is almost impossible to compile with compilers like
>>Borland and MSVC.)  With DOS16_BIT defined in the libslang compile,
>>there is just enough room for an 8 KB runtime stack.  As a consequence,
>>you get a stack overflow exception after the first line of the slrn
>>signon is printed on the screen.
>>
I have to apologize this time.  I found the `store heap data in the far
heap' switch in Borland's bc45 compiler, and I have slrn.exe partly
running at the moment.  It gets as far as connecting to my news server,
then crashes.  Could be the news server's fault, and I will continue
the debugging, since the most recent bugs appear to be the fault of my
Dos window's stdio file code, and not of slrn or slang.  I repeat.  I
have a full-size libslang and slrn minus the slang interpreter code up
and walking.


Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads