dal@stag.UUCP (Dale Schumacher) (03/03/88)
<wes@obie.UUCP (Barnacle Wes)> writes... > software for $100. Oh, yah, since their software is now MWC, it's not > brain-dead, it's just that everyone who is very serious about C on the > ST already HAS MWC, right? WRONG! I won't bother with "compiler wars", but there is quite a bit of serious C programming going on in other dialects of C for the ST. I use Alcyon v4.14, which has it's problems, but the COMPILER is pretty good. The major problem with Alcyon/DRI C was the standard libraries. My solution to that problem was to write my own, called dLibs. These routines are not only useful to Alcyon users, but to users of MWC, MM, Latice or any other dialect because they implement many function which are not provided in those libraries, and/or implement more robust or otherwise improved version. The libraries are public domain (not shareware, though I don't turn down donations) and come with full source code. If requested, I could post the binaries to the net, but they're not small. So far I've been distributing them on disk for a fee of $3 to cover the disk and postage. Send requests to: Dale Schumacher 399 Beacon Ave. St. Paul MN 55104 United States of America <juancho@dgp.toronto.edu (John Buchanan)> writes... > 1) I just finished porting a 12K line program from our unix > system to a 1040 using MWC 2.1.7. The system() calls simply print > no shell when the program is running under gulam. I know that > setting the SHELL environment variable to GULAM will fix that. The > problem is that other mark william tools seem to be able to run > shell commands with out the SHELL variable being set, and if the > environment variable is set then a new copy of the shell is started up > for each cc in a make. ... > 3) How reliable are the malloc() and free() functions > provided with MWC. The system() call in dLibs supports use of the _shell_p system variable for accessing sub-shells (does Gulam set this?). In addition, if the _shell_p value is not good, it uses the environment variable SHELL to find the shell somewhere on the PATH, and as a last resort it tries to find the program specified by the first argument and passes the rest as a command tail. This should work with just about ANY shell (including the desktop). As for malloc() and free(), I can't comment on MWC's reliability, but I'm pretty sure that they allocate memory from the stack/heap area, which means that your program must ALWAYS reserve the maxiumum amount of memory that you ever will want to allocate. The dLibs version allocates memory by requesting heaps through the system Malloc() call (carefully avoiding the bugs therein) and parcels out memory from those heaps with only 4-bytes overhead per call to malloc() instead of the typical 12-16 bytes. <dsh3059@ritcv.UUCP (Denise Hinds)> writes... > Could you please tell us how you set the gemdos path ? <preston@felix.UUCP (Preston Bannister)> writes... > current directory. If you set your PATH environment variable to: > > PATH=c:\bin > > GEM will look in c:\bin for the application and any .RSC files. > > The problems are: > > 1. GEM doesn't provide any way of setting the environment variables. > > I use GEMBOOT, which provides a means of setting the environment > variables _before_ the desktop comes up. > > 2. The application may look for other required data files in the > current directory. > > I consider this bad design on the part of the application. Does > anyone out there have a work around (not including copying the > application's data files into all directories :-) ? > > 3. The path seperator character expected by GEM is ';' (semi-colon). > > I use MWC's msh, Beckmeyer's Micro C-shell, and Gulam. They all > use ',' (comma) as a seperator. This caused two problems that > confused me for quite a while: > > 1) GEM applications invoked from a shell didn't always work. > > The problem was that GEM didn't grok the PATH set up by the shell, > and the application couldn't find it's .RSC and other files. > > 2) The shells couldn't handle the PATH set up for GEM. > > I used to set up PATH as: > > PATH=C:\APP;C:\BIN;C:\ETC;C:\ > > which worked fine from the desktop, and GEM could find > application's and their .RSC files in any of the listed > directories. > > The problem was that seemed to confuse MWC's msh. It couldn't > seem to find it's startup file "profile" no matter _where_ I put > it. The symptom was some obscure message (like "End of file in '"), > which didn't help in finding the problem. > > There is an AES function: shel_find() that will search through the > directories listed in PATH for the given file name, and returns the > full path for the file if found. > > Now, if shel_find() recognized ',' as a delimiter, or if all the > shells used ';', all this would work together rather nicely... > *WHEW* Lots of stuff here... Again in dLibs, there is a function called pfindfile() which will use the PATH to find a specified file (with one of a list of extension, if there is no extension). It recognizes both ',' and ';' as separators in the PATH list. There is also a popen() function which works like fopen(), but uses pfindfile() to locate the file. If applications used these functions, most of the above problems would be solved. The one remaining problem is that the PATH is only set properly by shell programs, so you have to be in a shell for this to work... OR you need a way to change the DESKTOP's environment (after boot time) to change the value of the SHELL environment variable. The following is a uuencoded ARChive containing executables and source for SETPATH which will change the PATH variable in the PARENT process's environment. To use this propoerly, run it from the desktop (so the desktop is the parent). Included in the source is a modified version of the getenv() and putenv() calls in dLibs. They handle environments in TOS format or MWC (MS-DOS) format, or even mixed. I hope I've answered a few questions... enjoy... ------------------------------CUT--HERE------------------------------ table !"#$%&'()*+,-./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%;@ a # !H a a end Dale Schumacher ..ihnp4!meccts!stag!syntel!dal (alias: Dalnefre')
dag@chinet.UUCP (Daniel A. Glasser) (03/04/88)
In article <350@stag.UUCP> syntel!dal@stag.UUCP (Dale Schumacher) writes: [much omitted] >> 3) How reliable are the malloc() and free() functions >> provided with MWC. [more omitted] >As for malloc() and free(), I can't comment on MWC's reliability, but I'm >pretty sure that they allocate memory from the stack/heap area, which means >that your program must ALWAYS reserve the maxiumum amount of memory that you >ever will want to allocate. The dLibs version allocates memory by requesting >heaps through the system Malloc() call (carefully avoiding the bugs therein) >and parcels out memory from those heaps with only 4-bytes overhead per call >to malloc() instead of the typical 12-16 bytes. The above is wrong. MWC does not allocate from the stack/heap area. If it did, the system() call would not work. The overhead per malloc is 4 bytes. The malloc/calloc/realloc/sbrk (and l versions of the forementioned) use the system Malloc() call, with a granularity to avoid the Gemdos Malloc bug. [lots of stuff omitted] > >*WHEW* Lots of stuff here... Again in dLibs, there is a function called >pfindfile() which will use the PATH to find a specified file (with one of >a list of extension, if there is no extension). It recognizes both ',' >and ';' as separators in the PATH list. There is also a popen() function >which works like fopen(), but uses pfindfile() to locate the file. If >applications used these functions, most of the above problems would be >solved. > MWC provides the functions getenv() and path(). path() searches a selected path (need not be PATH) for a particular file. The "popen()" function provided by dLib is useful, but its name conflicts with the popen() unix function. Some people may feel this is not a problem, but portability is a major issue at MWC. Rather than clutter up the documentation and library with functions that are a simple combination of other functions we let the user construct his/her own. None of the above is to disparrage the work or comments of Dale Schumacher, who has done the ST programming community a great service, and whos contributions are appreciated by many, including myself. I don't have dLibs, I managed to miss it, but I find that his postings are usually very useful. MWC remains committed to providing a complete and robust library with complete and accurate documentation. The documentation does lag the library, but we have only withdrawn one standard Unix library function, crypt, from the library (it was never documented) since we first shipped, and with each new release, the library becomes more populated. > Dale Schumacher > ..ihnp4!meccts!stag!syntel!dal > (alias: Dalnefre') Daniel A. Glasser M68000 product development Mark Williams Co. ...{ihnp4 cbmvax}!mwc!dag -- Daniel A. Glasser ...!ihnp4!chinet!dag || ...!ihnp4!mwc!dag || ...!ihnp4!mwc!gorgon!dag One of those things that goes "BUMP!!! (ouch!)" in the night.