🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #3543

Sozobon C in MT C-Shell

#3543
From: Jack L Forester
Date: Thu, 31 Aug 1989 14:48
24 lines
1521 bytes
Recently I was having problems using Sozobon C with Beckemeyer's MT C-shell.
The information I am going to present here should help anyone with similar
problems correct them.

The problem:  Running the Sozobon programs caused a bus error.

Background:  The Initargs function in dLibs is called very early in the
  execution of the program to set up the values passed to main().  This 
  function works fine when programs are run from the desktop, but causes the
  bus error when run from MT C-shell.  Specifically, the bus error occurs
  when Initargs tries to get a pointer to the program name for argv[0].

The fix:  In the environment variables passed to the program, there are two
  of concern here:  ARGC and ARGV.  The ARGC variable will always contain the
  number of arguments passed to the program, and ARGV contains the starting
  address of an array of pointers to the arguments.  You will have to replace
  the Initargs function in dLibs with one of your own that searches the
  environment for these two variables and puts their values into _argc and
  _argv.

I hope this helps.

Jack Forester, Jr.
jlf@a.cs.wvu.wvnet.edu
Technical Details
Message-ID: <428@h.cs.wvu.wvnet.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!h.cs.wvu.wvnet.edu!a.cs.wvu.wvnet.edu!jlf

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!h.cs.wvu.wvnet.edu!a.cs.wvu.wvnet.edu!jlf
From: jlf@a.cs.wvu.wvnet.edu (Jack L Forester)
Newsgroups: comp.sys.atari.st
Subject: Sozobon C in MT C-Shell
Keywords: Sozobon
Message-ID: <428@h.cs.wvu.wvnet.edu>
Date: 31 Aug 89 14:48:27 GMT
Sender: news@h.cs.wvu.wvnet.edu
Lines: 24