HDTenEightyP/NetNews huggingface dataset:
Newsgroups: comp.lang.fortran,comp.programming,comp.unix.questions
Subject: Re: Subroutine Tree Generator
From: ecmtwhk@ccu1.aukuni.ac.nz (Thomas Koenig)
Date: Tue, 21 Jul 1992 22:40:57 GMT
Organization: University of Auckland, New Zealand.

zaphiri@watson.ibm.com (Zaphiris Christidis) writes:

>Does anybody know if there exists any tool or program in the public
>domain, that could take as an input a FORTRAN source code, and give
>as an output the subroutine calling tree of the code graphically?

I believe it is getting time for a FAQ on comp.lang.fortran, I've read
too many (quite legitimate) queries about how to do this kind of thing
in the last weeks...

Anyway, NAG toolpack can do what you want.  It can be gotten either from
NAG directly for a small fee, or via anonymous ftp from a number of sites
(check out archie for toolpack*). It's quite a large system, written
in FORTRAN itself, and can do a number of other very handy things, like
declaring all your variables for you (I found that invaluable in clearing
up old code), converting some FORTRAN 66 - style IF/GOTO combinations
into IF () THEN/ELSEIF/ENDIF, and a lot more.

Hope this helps
-- 
Thomas Koenig, ecmtwhk@ccu1.aukuni.ac.nz, ib09@rz.uni-karlsruhe.de
The joy of engineering is to find a straight line on a double logarithmic
diagram.
Newsgroups: comp.lang.fortran
From: drpatton@undergrad.math.waterloo.edu (Dave Patton)
Subject: Help with Brent's multiple-precision library
Keywords: Brent's
Organization: University of Waterloo
Date: Thu, 30 Jul 1992 21:59:26 GMT


Hi there.

I am attempting to use Brent's Multiple-precision library with a MIPS Fortran 77
compiler.  I would like to run a program which is fairly simple in nature but
which requires very high precision for certain choices of parameters.

Does anyone know how to run a simple program, which makes use of the AUGMENT
preprocessor?
Also, I seem to be encountering numerous compile errors with the library
routines.  Is this as a result of machine-dependent code, or am I missing 
something more obvious?

Thanks in advance for your suggestions!

Dave
Organization: Arizona State University
Date: Wednesday, 22 Jul 1992 16:06:07 MST
From: Bill Barney <IDWXB@ASUACAD.BITNET>
Newsgroups: comp.lang.fortran
Subject: Mouse support for MS Fortran 5.1

I have searched through the MS Fortran 5.1 manuals and can find
no reference to any mouse support routines.  Am I missing something
or did they really leave this out?

I am trying to convert an old application to compile under
MSF5.1 and eliminate calls to an obsolete graphics library by
substituting calls to the MSF graphics library.  It works fine
except for a function that apparently waits for a mouse
click and returns the x and y coordinates of the mouse pointer.

(I don't even have any documentation on the old mouse
routine; that's one of the reasons I am trying to eliminate it.)

If anyone knows of a MSF 5.1 function to return the mouse
location, or knows of some public domain code I could use,
please let me know.  (It's a logitech mouse, but I believe it
emulates a regular microsoft serial mouse.)

Private e-mail preferred; I will summarize to the net if there
is interest.  Thanks!

Bill Barney
Arizona State University
Department of Chemistry
idwxb@asuvm.inre.asu.edu
Newsgroups: comp.lang.fortran
From: adk@sun13.SCRI.FSU.EDU (Tony Kennedy)
Newsgroups: comp.lang.fortran
Subject: Re: Variable repeat count specifier for FORMAT statments
Date: 27 Jul 92 16:43:06 GMT
	<1992Jul24.012058.21162@ncsa.uiuc.edu> <nn1.712013604@Ra.MsState.Edu>
	<1992Jul26.034324.28621@ncsa.uiuc.edu>
Distribution: na
Organization: SCRI, Florida State University
In-reply-to: hirchert@ncsa.uiuc.edu's message of 26 Jul 92 03:43:24 GMT

>> Kurt Hirchert <hirchert@ncsa.uiuc.edu> writes:

   hirchert> ... (FORTRAN has no reserved words.)

Except of course that

      PROGAM ANNOY
      END
     & FOO = 22.0
      END

is not valid!
From: nn1@Ra.MsState.Edu (N. Narenthiran)
Newsgroups: comp.lang.fortran
Subject: Re: Variable repeat count specifier for FORMAT statments
Date: 24 Jul 92 21:33:24 GMT
Distribution: na
Organization: Mississippi State University

hirchert@ncsa.uiuc.edu (Kurt Hirchert) writes:

>In article <1992Jul23.215113.16531@jhunix.hcf.jhu.edu> psun@jhunix.hcf.jhu.edu (Peter Sun) writes:
  {..deleted..}
>situations, I would build the format on the fly:
  {..deleted..}
>		      character*80 fmt
>		      ...
>		      write (fmt,'(a,i3,a)') '(',n,'(I8))'
>		      write (*,fmt) whatever_it_is_you_wanted_to_write
  {..deleted..}
>-- 
>Kurt W. Hirchert     hirchert@ncsa.uiuc.edu
>National Center for Supercomputing Applications

But,
  Is the statement WRITE (*,FMT='(I5)') I standard conforming or not?
If it is, is it ok to name a character string as FMT?

have a nice day.
naren.
From: emarkp@ocf.berkeley.edu (E. Mark Ping)
Newsgroups: comp.lang.c
Subject: Re: About the 'F' in RTFM
Date: 24 Jul 1992 02:33:16 GMT
Organization: U.C. Berkeley Open Computing Facility
NNTP-Posting-Host: earthquake.berkeley.edu

In article <1992Jul22.204957.24599@mole-end> mat@mole-end writes:
>In article <1992Jul20.171054.20325@druid.uucp>, darcy@druid.uucp (D'Arcy J.M. Cain) writes:
>> ark@alice.UUCP () writes:
>> >'RTFM' does stand for 'Read The Manual'.  The 'F' is silent.
> 
>> I suppose that depends on how stupid the question is.  :-)
>
>Then you'd want'em to read the Fool's Manual?
						  ^^^^

  I think that's spelled "Phule's", in which case there is no "F."

  :-)
-- 
Another student, lost in the sea that is called Bezerekely.  His name?
E. Mark Ping
emarkp@ocf.Berkeley.EDU

  "Stand aside, I take large steps."  --Michael Dorn
  "Say, that's a nice bike." --Cyberdyne Systems T-1000
  "Pituita es."  --Unknown Latin Scholar
From: jyan@dciem.dciem.dnd.ca (Joseph Yan)
Newsgroups: comp.lang.c
Subject: timing problem
Keywords: C++ Video Seminar Satellite
Date: 22 Jul 92 18:04:10 GMT
Organization: Defence and Civil Institute of Environmental Medicine

Hi folks!  I'd like to solicit any help I can about this timing problem:

I'm working on some data acquisition from a "black box" that outputs
reports of a device's position and orientation.  Unfortunately, this
box will output a report at a frequency between 20 reports/sec to 50
reports/sec and the time interval between reports varies depending on
the time taken to process info within the "black box" and whether or not
there are any invalid reports in between.  My problem is that I want to
be able to analyze this data for velocities and accelerations so if the
time interval between reports varies, I'd like to store the time of the
report along with the report itself.  The time should be accurate to at
least 10 ms but the clock() function in C and the other time functions
I've looked at are only accurate to 55 ms (because it's updated 18.2
ticks/sec).  I tried some assembler code using function call 2Ch which
is supposed to report the time to hundredths of a second but I found
that it also was only updated at 18.2 ticks/sec.  In one technical
reference I flipped through, I read that the MC146818A Real Time Clock
generates a timer tick 1024 times/sec and this would be great but I
haven't figured out how to access it.

I'm using a 386 and accessing the "black box" through the RS-232 port
but that's probably not important.

Is there any kind soul out there, who can help this poor soul by telling
me how, or if it's even possible, to access a timer which is accurate to
10 ms?  Please reply directly to jyan@dretor.dciem.dnd.ca if you have
the answer.

Joe
Newsgroups: comp.lang.c
From: markh@csd4.csd.uwm.edu (Mark William Hopkins)
Subject: My view of variable naming conventions (was: Hungarian...)
Organization: Computing Services Division, University of Wisconsin - Milwaukee
Date: Mon, 27 Jul 1992 01:33:10 GMT

I've always followed these rules in naming objects, like variables in C (or
Pascal):

(0) Declare as close to 0 variables and parameters at any scoping level as
    possible.
(1) Declare all objects as local as possible, even within a statement block.
(2) Use generic names for generic objects, and short, common (and appropriate)
    natural language words for objects with semantic content.

and these rules:
(3) If you have to comment on a variable's use, then you've named it wrong.
    Rename it.
(4) If you run into numerous name clashes, then you've violated (0) and (1).
    Eliminate the extraneous fluff.
(5) If you find yourself getting confused about types, then you're not
    thinking straight about what your program is supposed to be doing.
    Go back to the drawing board.

Experience with my own code and other people's code have borne out this
assessment time and time again:

    If you find yourself reverting to Hungarian Notation,
    then you've violated all the above, (0) through (5).
Newsgroups: comp.lang.c
From: s1110238@giaeb.cc.monash.edu.au (Lee Hollingworth)
Subject: Re: Balancing Binary Search Trees
Organization: Monash University, Melb., Australia.
Date: Wed, 29 Jul 1992 11:03:53 GMT

Alan.Tai@bbs.oit.unc.edu (Alan Tai) writes:

>I currently have a binary search tree to store an alphabetized list of
>words, but would like it to be optimized for speed of retrieval.  Could
>someone please post some example code for balancing binary trees, or
>even suggest a book that might have this code.  So far, I haven't come
>across any texts that have this, though.  Thanks!

I would suggest you check out AVL trees, a couple of good texts are;
    Data Structures and Program Design in C
    Kruse, Leung, Tondo
    Prentice Hall

    Data Structures Using C
    Tenenbaum, Langsam, Augenstein
    Prentice Hall

And if you have any Pascal to C experience, or just want to read an
excellent commentary on AVL trees then I would suggest;
    Algorithms+Data Structures = Programs
    Wirth
    Prentice Hall

If you would like an AVL tree C source file e-mail me...

Lee Hollingworth
s1110238@giaeb.cc.monash.edu.au

Newsgroups: comp.lang.c
From: friedric@kirk.fmi.uni-passau.de (Carsten Friedrich)
Subject: atexit, signal
Keywords: atexit signal
Organization: University of Passau, Germany
Date: Tue, 21 Jul 1992 20:07:16 GMT

hi,

i don't know if my questions belong to comp.lang.c++ or comp.lang.c,
as they are both standart c, but compiled with g++.
so i'm posting it to both. hope you forgive me.

1) in my program i'm waiting for a child to exit:

void ttt()
{
	do_something();
}	

.
.
signal(SIGCHLD, ttt);
.
.

after do_something() my parent process terminates, but as far as
i understood the man-pages, it should continue, where it was
interrupted before :(. can anyone tell me what i'm doing wrong ?

2.) K&R and stdlib.h say there is a function called atexit. but
	my linker complains that there isn't. any ideas ???

i'm using g++ version 2.0 to 2.2

	greetings,
		carsten

friedric@kirk.fmi.uni-passau.de
friedric@forwiss.uni-passau.de
From: wiz@toz.buffalo.ny.us (The WIZ)
Newsgroups: comp.lang.c
Subject: Borland's TC++ 1.01 Bugs
Date: 31 Jul 92 17:09:10 GMT
Organization: The Tower of Zot - (716)691-3865


        I have borland TC++ 1.01 and I have discovered some bugs in the 
large and huge memory models (confirmed with the debugger).  There are 
problems with the Malloc and Strcpy functions.  I was wondering if anyone 
knew of patches for this version, and also if there is a Borland 
newsgroup on the net...

---------------------------------------------------------------------
wiz@toz.buffalo.ny.us (The WIZ)
-- Change this!
Newsgroups: comp.lang.c
From: reid@metis.tti.com (Reid Kneeland)
Subject: Re: About the 'F' in RTFM
Followup-To: /dev/null
Organization: Transaction Technology Inc.
Date: Thu, 23 Jul 1992 18:22:54 GMT

In article <Brqs71.KCs@watdragon.waterloo.edu> bbobak@violet.waterloo.edu (Brad Bobak) writes:
>In article <1992Jul21.005916.22447@organpipe.uug.arizona.edu>, dave@cs.arizona.edu (Dave Schaumann) writes:
>> 
>> A frank discussion of the f-word below; those of tender constitutions may
>> wish to press 'n' now.  Also, the discussion is related to C only by the
>> most tenuous of relations...
>> 
>> In article <1992Jul20.162942.14863@mic.ucla.edu>, stephen@eggneb (Stephen Schimpf) writes:
>> >> > |Proposed change to 'standard' practice.  'RTFM' is now 'RTM'.
>> >> > |The 'F' does not relate to any known adjective for Manual.
>> >> > |'Read The Manual' should suffice.
>> >> > 
>> >> > fabulous? famous? fancy? fantastic? fascinating? fateful? favourable?
>> >> > fine? forgiving? forgotten? formidable? funky? funny? ;-)

PLEASE, take this the F out of comp.lang.c.

=====================================================================
Reid Kneeland
reid@ttidca.tti.com  (that's MISTER reid@ttidca.tti.com to you!)
{philabs,psivax,pyramid,quad1,rdlvax,retix,rutgers}!ttidca!reid
Transaction Technology Inc., Santa Monica, CA, USA (310) 450-9111 x2499
The opinions expressed above do not necessarily etc etc...

Never trust a man who can count to 1,023 on his fingers.
Newsgroups: comp.lang.c
From: dylan@ibmpcug.co.uk (Matthew Farwell)
Subject: Re: About the 'F' in RTFM
Organization: The IBM PC User Group, UK.
Date: Thu, 23 Jul 1992 12:29:12 GMT

In article <1992Jul21.005916.22447@organpipe.uug.arizona.edu> dave@cs.arizona.edu (Dave Schaumann) writes:
>Presumably, "f-ck" refers to the act of intercourse.

Of course not.  It stands for filesystem check.  And RTFM even makes
sense.

Dylan.
-- 
It is no coincidence that in no known language does the phrase 'As
pretty as an Airport' appear -- Douglas Adams
Newsgroups: comp.lang.c
From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
Subject: Re: HIgher problems at hand. HELP!
Organization: Computer Science, University of Melbourne, Australia
Date: Sat, 25 Jul 1992 20:29:41 GMT

darcy@druid.uucp (D'Arcy J.M. Cain) writes:

>/*
> * strstr - find first occurrence of wanted in s
> *
> * based on code by Henry Spencer
> * modified for ANSI by D'Arcy J.M. Cain
> */
>
>/* The following define required for full checking.  The problem is that */
>/* the function has to ultimately assign a const char * to the return */
>/* value which has to be char *.  The answer is to drop the use of */
>/* const in this module and trust the code to do the right thing */
>#define		const

Yuck!
Do *not* #define keywords unless you have absolutely no alternative.

>#include	<string.h>

Now what happens if string.h happens to contain
	const CHAR_BIT = 8;
or some such?

>char	*strstr(const char *s, const char *wanted)

This is a *different* prototype to the externally visible one, since
this one doesn't include "const". An implementation is well within it's
rights to give you a warning at link time, and probably even an error.

>{
>	size_t len;
>	char firstc;
>
>	/*
>	 * The odd placement of the two tests is so "" is findable.
>	 * Also, we inline the first char for speed.
>	 */
>	firstc = *wanted;
>	len = strlen(wanted);
>
>	while (*s != firstc || strncmp(s, wanted, len) != 0)
>		if (*s++ == '\0')
>			return(NULL);
>
>	return(s);
>}

The solution to the const problem is just to put a cast in the final return
statement:
	return (const char *) s;

-- 
Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
This .signature VIRUS is a self-referential statement that is true - but 
you will only be able to consistently believe it if you copy it to your own
.signature file!
Newsgroups: comp.lang.c
Subject: HELP!!with wordprocessor font
From: beshir@vax1.mankato.msus.edu
Date: 30 Jul 92 14:53:18 -0600
Organization: Mankato State University


	



	        HI, is  there any one  worked with multibilogal
	languages, if so i need same help  with turbo-c, textmode
and the bgi
  please e-mail
	
    
Newsgroups: comp.lang.c
From: rchattam@nyx.cs.du.edu (King Chattam)
Subject: MEASURE EXEC TIME OF FORTRAN PROGRAMS ?
Organization: Nyx, Public Access Unix @ U. of Denver Math/CS dept.
Distribution: na
Date: Tue, 21 Jul 92 23:49:25 GMT

Hello everyone,
  I am using Microsoft FORTRAN on a DOS 5.0 PC. I want to 
measure the execution time of some of my FORTRAN programs. Does
anyone have a FORTRAN or FORTRAN callable C function which 
will answer my question? If such a routine is available 
in some public domain, the address of it also will suffice.
Thanks for your help
From: dmills@accvio.intel.com (Dave Mills)
Newsgroups: comp.lang.c
Subject: Re: Functions Within Functions
Date: 29 Jul 92 20:20:00 GMT
Organization: Intel Corporation
News-Software: VAX/VMS VNEWS 1.41

In article <Bs5w39.5ox@news.larc.nasa.gov>, wjb@cscsun2.larc.nasa.gov (William J. Bene) writes...
>Is there any way to declare functions within another function like in pascal?
> 

No, not in C.  As a matter of fact, someone who posts on the net quite often (I
don't remember who) has a statement like "C is not a block structured language
like Pascal" (or some-such quote) in his .sig file.  I never knew why, but it
does answer your question. 

>================================
>William J. Bene
>Computer Sciences Corporation
>wjb@cscsun2.larc.nasa.gov
-----------------
David Mills
Intel Corporation
dmills@intel.com
Newsgroups: comp.lang.c
From: jle9162@venus.tamu.edu (ECKHARDT, JASON LEE)
Subject: Re: Balancing Binary Search Trees
News-Software: VAX/VMS VNEWS 1.41    
Organization: Texas A&M University, Academic Computing Services
Distribution: usa
Date: Thu, 30 Jul 1992 04:24:00 GMT

In article <1992Jul29.014821.2675@samba.oit.unc.edu>, Alan.Tai@bbs.oit.unc.edu (Alan Tai) writes...
>I currently have a binary search tree to store an alphabetized list of
>words, but would like it to be optimized for speed of retrieval.  Could
>someone please post some example code for balancing binary trees, or
>even suggest a book that might have this code.  So far, I haven't come
>across any texts that have this, though.  Thanks!> 

  An AVL implementation of a binary tree is a good way to keep a close to
perfectly balanced tree at all times.  The insertions and deletions will
be the only algorithms to change. They will be slightly more complex as 
rotations of unbalanced portions of the tree are required. The added complexity
is almost always worth the added speed of searching obtained from a balanced
tree though. 
  Good reference for AVL trees are 'Data Structures and Program design in C'
by Kruse, et al. or Knuth  vol. 3.

Hope it helps...jason

Newsgroups: comp.lang.c
From: ajg@controls.ccd.harris.com (Arnold Goldberg)
Subject: Re: Old C -> Ansi C translator
Organization: Harris Controls and Compositions
Date: Fri, 24 Jul 1992 14:44:25 GMT

>>>>> On 18 Jul 92 19:00 MDT, mwormley@zeus.calpoly.edu said:
	mwormley> In article <1992Jul18.012036.27033@infonode.ingr.com> dlu@infonode.ingr.com (David Lu) writes:
>Hi,
>
>Does anyone know of a program for converting "Old"/"K & R" C to ANSI C ?
>And where can I get a copy of it ?
>
>I am desperately need a Old to ANSI C translator to convert my C files 
>to ANSI C compilance.
>

I think gcc comes with "protoize" and "unprotoize".
Haven't used it, so don't know if and how they work.




--
------------------------------------------------------------------------
Arnold Goldberg                            Email:  ajg@ccd.harris.com
Phone: (407)242-5051                       Snail:  Harris Corporation
Fax  : (407)242-4262                               407 John Rodes Blvd.
                                                   Melbourne, FL 32905

The opinions expressed are my own and do not in any way represent Harris 
------------------------------------------------------------------------
From: torek@horse.ee.lbl.gov (Chris Torek)
Newsgroups: comp.lang.c
Subject: Re: initiaklizing union members
Date: 26 Jul 1992 01:58:00 GMT
Organization: Lawrence Berkeley Laboratory, Berkeley
Distribution: usa
Reply-To: torek@horse.ee.lbl.gov (Chris Torek)
NNTP-Posting-Host: 128.3.112.15

In article <1708@toro.MTS.ML.COM> scott@toro.MTS.ML.COM (Scott Strool)
writes:
[given]
>>struct Row {
>>	int Type;
>>	union {
>>		int ival;
>>		char *sval;
>>	} value;
>>};

>>how would i set value with a static declaration:
>> 
>>static Row r0 = { 0, 1234 };
>>static Row r1 = { 1, "string" };

In article <5391@dsacg3.dsac.dla.mil> nto0302@dsacg3.dsac.dla.mil
(Bob Fisher) writes:
>I don't know if this is a compiler problem or a syntax problem.  I
>suggest that you try initializing Row r1 with a pointer, not a string.
>If that doesn't help, try placing int Type after the union.  The union
>may or may not be aligning on a word boundary.

None of these suggestions are even close.

In ANSI C, only the initializer for r0 is legal.  Unions may be
initialized, but only via the first member.  There is no way to
select some other member in an initializer.

In Classic C, the situation is even worse:  Unions can NEVER be
initialized.

If you have an ANSI C compiler, you can get away with this:

	struct Row {
		int	Type;
		union {
			int	ival;
			char	*sval;
		} value;
	};
	struct Row_str {
		int	Type;
		union {
			char	*sval;
			int	ival;
		} value;
	};
	static Row r0 = { 0, 1234 };
	static Row_str r1_str = { 1, "string" };
	#define	r1 (*(struct Row *)&r1_str)

If you have a Classic C compiler ... forget it.  Use runtime
initializers.
-- 
In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 510 486 5427)
Berkeley, CA		Domain:	torek@ee.lbl.gov
Newsgroups: comp.lang.c
From: spuler@coral.cs.jcu.edu.au (David Spuler)
Subject: Re: Good Books on C - question
Organization: James Cook University
Date: 23 Jul 92 05:06:10 GMT

In <1992Jul22.161157.1@jaguar.uofs.edu> littlec1@jaguar.uofs.edu (Chris Little) writes:

>I just started reading this group, so excuse me if I'm raising an issue
>already or frequently discussed.  I am interested in a top-5/top-10 list
>of books that aid one who is experienced in programming (but not in C)
>to learn C.  He has some knowledge of C, so is not a complete novice.  He
>expects to use it for rather large and complex applications in the future.

I have recently published a book which is intended for experienced programmers
and covers both introductory issues and advanced issues - therefore it should
wear well with C experience.

It's contents are:

	PART I: The C Language
  1 "Introduction to C"
  2 "Variable declarations and types"
  3 "Operators"
  4 "Control statements"
  5 "Structured types"
  6 "Strings"
  7 "Functions"
  8 "Pointers"
  9 "Input and output"
  10 "File operations"
  11 "The preprocessor"
  12 "Standard library functions"

	PART II: Advanced Issues
  13 "Large programs"
  14 "Functions and pointers revisited"
  15 "Efficiency"
  16 "Debugging techniques"
  17 "Program style"
  18 "Portability"
  19 "UNIX systems programming"

--
David Spuler, James Cook University of North Queensland, Australia
Author of "Comprehensive C", Prentice-Hall, 1992, pp416, ISBN  0-13-156514-1
INTRO TOPICS: types, operators, structures, strings, fns, ptrs, files etc etc
ADVANCED TOPICS: efficiency, debugging, style, portability, large programs
Newsgroups: comp.lang.c