🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Fred Fish's dbug package on STs

#29284
From: Freddy Kreuger
Date: Wed, 18 Nov 1987 16:15
61 lines
2257 bytes
Following are my changes to Fred Fish'd now-public-domain debugging macro
package.  It fixes a few problems and adds support for the profiling timing
stuff.  Also, to compile dbug, have a getopts library ready.  I used the
getopt code from mkprog, posted to comp.sources a while ago (last year?).
[Use Mark William's C Compiler, know what you are doing.  Make the 
getopt library first with 'ar rs libopts.a getopt.o ...' then compile
dbug.o with that library included on the command line ('-lopts').   Be sure
to define ATARI when compiling '-DATARI'.

Make the dbug library with 'ar rs libdbug.a dbug.o'.  Then compile
analyze.c with the '-f' floating pt option, the dbug library '-ldbug'
and '-lopts'.  Yes, a lot of work, eh?  I should've just written a new 
makefile.]

Diffs: (produced by MWC diff: diff dbug.c newdbug.c)

=====---------===========-----------===========-----------========-------
68 a 69,71
> #ifdef ATARI
> #define HZ (200)
> #endif
240 c 243
< #if unix || AMIGA
---
> #if unix || AMIGA || ATARI
1766 c 1769
< #endif
---
> # endif
1804 a 1808,1833
> 
> #if ATARI
> 
> #include <time.h>
> static int first_clock = TRUE;
> static clock_t begin;
> static clock_t elapsed;
> 
> LOCAL unsigned long Clock ()
> {
>     register clock_t now;
>     register unsigned long millisec = 0;
> 
> 	if (first_clock == TRUE) {
> 	    first_clock = FALSE;
> 	    now = clock();
> 	    begin = now;
> 	}
> 	now = clock();
> 	millisec = (now - begin) * (1000 / HZ );
> 
>     return (millisec);
> 
> }
> #endif
> 
=====---------===========-----------===========-----------========-------

Greg Onufer
University of the Pacific
Postmaster and Root
Technical Details
Message-ID: <763@uop.EDU>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!elroy!cit-vax!ucla-cs!zen!ucbvax!ucdavis!uop!exodus

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!elroy!cit-vax!ucla-cs!zen!ucbvax!ucdavis!uop!exodus
From: exodus@uop.EDU (Freddy Kreuger)
Newsgroups: comp.sys.atari.st
Subject: Fred Fish's dbug package on STs
Message-ID: <763@uop.EDU>
Date: Wed, 18-Nov-87 11:15:02 EST
Article-I.D.: uop.763
Posted: Wed Nov 18 11:15:02 1987
Date-Received: Sun, 22-Nov-87 15:49:53 EST
Organization: Somewhere perpendicular to reality...
Lines: 61
Keywords: diffs, dbug, fish, mcdonalds (TM)