HDTenEightyP/NetNews huggingface dataset:
From: david@llustig.palo-alto.ca.us (David Schachter)
Subject: Re: About the 'F' in RTFM
Organization: Greenwire Consulting
Date: Tue, 21 Jul 92 05:37:38 GMT

In article <23215@alice.att.com> ark@alice.UUCP () writes:
>In article <1992Jul17.202448.19848@wyvern.twuug.com> alpha@wyvern.twuug.com (Joe Wright) 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.
>
>'RTFM' does stand for 'Read The Manual'.  The 'F' is silent.
>-- 
>				--Andrew Koenig
>				  ark@europa.att.com

Mr. Koenig (about whom much is written, but little eaten) is incorrect.  The
'F' is from the days of Ye Olde Englishe, when it stood for 'S'.  "RTFM" means
"Read the Silly Manual."  Some think, incorrectly, it stands for "Members of
The Same Sex."  Thank you for the opportunity to obfuscate this up.

Next thing you know, Koenig will be saying "The 'F' is silent, as in 'phlegm.'"
Sheesh.

(This posting is fact-free.  Read my lips.  No huge new tax increases.)
-- 
                                               David Schachter
|
| internet:    david@llustig.palo-alto.ca.us
| uucp:        ...!{mips,decwrl,sgi}!llustig!david
Newsgroups: comp.lang.c,comp.lang.c++
From: philco@microsoft.com (Phillip Cooper)
Subject: Re: Pascal vs C
Date: 22 Jul 92 20:14:54 GMT
Organization: Microsoft Corporation

In article <1992Jun13.220259.17547@beaver.cs.washington.edu> andrewb@lynx.cs.washington.edu (Andrew Berg) writes:
>ded@aplcen.apl.jhu.edu (nod sivad) writes:
>: >You can use "goto" e.g.
>: >
>: >{
>: >   for(...) {
>: >      for(...) {
>: >         if(...) goto exloop;
>: >      }
>: >   }
>: >exloop:
>: >}
>: >
>: >Sure, it is not a very good style, but is should work.
>: 
>: On the contrary, it is excellent style.  Purists will claim you 
>: should use a flag to break the loops, but this both makes the code slower and
>: more opaque.  Your method is the preferred method with C and C++; don't
>: listen to the demands of flatulant purists ;-)
>: 
>: Ada has a better method, but that's a different newsgroup.
>: 
>: 					me
>
>I think that the only time goto's are inherintly bad is when they are used 
>hither and thither (as in BASIC).  Breaking out from a loop, especially if the
>label is well named, should not pose a readability problem to anyone, whereas
>using a bunch of flags and patchy logic can cause terriffic stress headaches
>even for the origional programmer.
>
	What is it with this group and BASIC?  Are you people that
out of touch? GOTOS and line numbers have not been used in BASIC
programs in YEARS!  I know it is stylish to look down your noses at
this language, but if you still think of BASIC in terms of line numbers
and GOTO's, you're living in the the distant past.

Phil.

Newsgroups: comp.lang.c
From: darcy@druid.uucp (D'Arcy J.M. Cain)
Subject: Re: HIgher problems at hand. HELP!
Date: Sat, 25 Jul 1992 14:22:16 GMT
Organization: D'Arcy Cain Consulting

shulick@navajo.ucs.indiana.edu writes:
>int strstr(char *data, char *chunk)

Actually, strstr() returns a char *.  The actual prototype is:

    char *strstr(const char *, const char *);

>What's wrong with this subroutine?  I'm making strstr() since Amiga C
>doesn't have it.
>I do stuff like ..  d  = strstr("foobar", "bar");
>and d comes up like 139579275 or some weird value, where it's SUPPOSED to

Are you sure that the Amiga doesn't have this routine built in or something?
If you are expecting an int index into the string and actually get back a
pointer you may see results such as these.

>Can I pass both *str and str[25]?  For instance..

Yes.  See question 2.4 in the comp.lang.c FAQ.

And if the Amiga really doesn't have a strstr here it is:

/*
 * 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

#include	<string.h>

char	*strstr(const char *s, const char *wanted)
{
	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);
}

-- 
D'Arcy J.M. Cain (darcy@druid.com)  |
D'Arcy Cain Consulting              |   There's no government
Toronto, Ontario, Canada            |   like no government!
+1 416 424 2871          DoD#0082   |
Newsgroups: comp.lang.c
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.lang.c
Subject: Re: Pointers outside of array boundary
Date: 29 Jul 1992 18:23:36 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: telecaster.think.com

In article <1992Jul29.151518.19815@hubcap.clemson.edu> mjs@hubcap.clemson.edu (M. J. Saltzman) writes:
>In this case, wasting the 0th element of an array
>seems like a relatively small price to pay, if that's the only way 
>to write 1-based code.

But it's not.  You can also use a macro, e.g.

#define AREF(array,index) (array)[(index)-1]

While this looks like it will require an extra subtraction for every array
access, if the array you're indexing is automatic or global (as opposed to
dynamically allocated by malloc()) then a decent compiler should be able to
optimize it away, by precomputing the constant address array-1 (yes, this
is precisely the address that the original poster was trying to compute in
his C code -- the difference here is that the compiler is doing it, and it
knows whether it's valid for the target architecture, while the application
programmer can stick to writing portable code).
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
From: smee@bristol.ac.uk (Paul Smee)
Newsgroups: comp.lang.c
Subject: Re: Functions Within Functions
Date: 30 Jul 92 10:04:57 GMT
Reply-To: P.Smee@bristol.ac.uk (Paul Smee)
Organization: University of Bristol

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?

Quick answer is 'no', not as such.  (And, it's a feature of PL/1 which I'd
grown to love, and miss now I've turned to C.)

Longer answer is that depending on exactly what effect you are after
(and perhaps on 'style' rules within your organisation) it is often
possible to simulate the effect by using 'static' functions.  If you
declare a function as such (e.g. 'static int getfred (args) {... etc')
when you define it, then it is only accessible to other functions which
are contained within the same source file, and which can't be called by
functions which were compiled in separate source files.

-- 
Paul Smee, Computing Service, University of Bristol, Bristol BS8 1UD, UK
 P.Smee@bristol.ac.uk - ..!uunet!uknet!bsmail!p.smee - Tel +44 272 303132
Newsgroups: comp.lang.c
From: cheselka@cactus.org (Michael R. M. Cheselka)
Subject: srand() rand() question
Organization: Capital Area Central Texas UNIX Society, PO Box 9786, Austin, TX 78766-9786
Distribution: usa
Date: Fri, 31 Jul 1992 11:39:13 GMT

  /* What is wrong with this program?  Is it the multiple calls to srand()?
     rand() is not random at all, and soon duplicates it's self in a repeating
     pattern.  Is it illegal to repeatedly call srand()? */
  
  
  
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
  
  /* The purpose of this program is to create a one megabyte( 1,048,576
     bytes) file containing only print and white space characters.  Usefull to 
     time modem speeds. The characters must be as random as posible, or
     else compression will skew the results. */ 
  
  
  main()
{
  unsigned long count = 1048576;
  unsigned char character;
  unsigned int seed = 67483 ;
  srand( seed);
  while ( count > 0 )
    {
      character = rand();
      if (isprint(character))
        {
          printf("%c", character);
          --count;        
          /*          seed += 3;   Trying for some extra randomness here...
                      srand( seed);    */
        } 
      else if (isspace(character))
        {
          printf("%c", character);
          --count;          
          /*          seed += 5;    And here, doesn't work...
                      srand( seed);    */
        }
    }
}
-- 
cheselka@cactus.org         N5UVV          Michael R. M. Cheselka
os9@gnu.ai.mit.edu        (512)452-9412v ( 24hours answer. mach.)
membership@cactus.org Hangs out on 145.21mhz 400 W. 34th st. #103
{...}!cs.utexas!cactus.org!cheselka     Austin, Texas, 78705-1331
Newsgroups: comp.lang.c
From: kbass@gmuvax2.gmu.edu (Ken Bass)
Subject: Need help with byte addressable bitfields
Organization: George Mason University, Fairfax, Va.
Distribution: na
Date: Sun, 26 Jul 1992 04:44:14 GMT

I'd like to know your suggestions on how to define and access a bitfield
that is both bit and byte addressable. The application is to maintain a
ram image in a memory mapped i/o system.

Lets say we have WidgetRamImg of type WidgetRamImgDef where

typedef struct {
   unsigned int bit0;
         ...
   unsigned int bit32;
} WidgetRamImgDef;

WidgetRamImgDef WidgetRamImg;

I'd like to say WidgetRamImg=0x0; at init time, but the type is wrong.
Casting to WidgetRamImgDef does not work either.

Any suggestions?


-- 
Ken Bass (kbass@gmuvax2.gmu.edu)              |   Telecommunications  
George Mason University                       |   Techniques Corp, 
Student, Department of Electrical Engineering |   Software Engineer 
Newsgroups: comp.lang.c
From: mat@mole-end
Subject: Re: About the 'F' in RTFM
Organization: :
Date: Wed, 22 Jul 1992 20:48:02 GMT

In article <1992Jul20.080425.15775@metapro.DIALix.oz.au>, bernie@metapro.DIALix.oz.au (Bernd Felsche) writes:
> In <3122@dozo.and.nl> jos@and.nl (Jos Horsmeier) writes:

> >In article <1992Jul17.202448.19848@wyvern.twuug.com>
>    alpha@wyvern.twuug.com (Joe Wright) 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? ;-)
 
> Well, it used to be funny. Nowadays, after the marketing
> types have combed through the pages, extracting most
> remnants of wit, the "f" stands for something else.
 
> "Formidable" could also be an appropriate adjective.

And after the marketroids have removed all the tongue-in-cheek passages,
most of the truth is gone, too.  Then it's a Fibbin' Manual.
-- 
 (This man's opinions are his own.)
 From mole-end				Mark Terribile

 uunet!mole-end!mat, Somewhere in Matawan, NJ
From: lim@omega.chem.yale.edu
Newsgroups: comp.lang.c
Date: 18 Jul 92 14:49 MDT
Subject: strtok code
Nf-ID: #N:1992Jul18.104906.17404@news.yale:1573232862:001:346
Nf-From: omega.chem.yale.edu!lim    Jul 18 14:49:00 1992


Could someone please send me a code of strtok function?
thanks.
-dcl

* Dongchul Lim                   | Phone (203) 432-6288            *
* Dept. of Chemistry, Yale Univ. | Email: lim@rani.chem.yale.edu   *
* 225 Prospect Street            |            (130.132.25.60)      *
* New Haven, CT 06511            |                                 *
From: "gregory pleau" <gregory.pleau@canrem.com>
Newsgroups: comp.lang.c
Subject: soundblaster
Date: 24 Jul 92 02:05:36 EST
Reply-To: "gregory pleau" <gregory.pleau@canrem.com>
Distribution: comp
Organization: Canada Remote Systems


Does anybody out there have information regarding accessing the
Soundblaster type audio cards , or the ATI Stereo F/X type audio cards?

I intend to program an arcade style video game, and release it as
shareware, but I am stuck on this kink, basically, I could spend my
money on the (now outdated) development kit, or get Borland C++ 3.1.
I have opted for the latter.

Thanx
--
Canada Remote Systems  - Toronto, Ontario/Detroit, MI
World's Largest PCBOARD System - 416-629-7000/629-7044
From: mwormley@zeus.calpoly.edu
Newsgroups: comp.lang.c
Date: 18 Jul 92 19:00 MDT
Subject: Re: Old C -> Ansi C translator
Nf-ID: #R:1992Jul18.012036.27033@infonode.:-583211294:1992Jul18.150030.184670@zeus.cal:-1047353243:001:562
Nf-From: zeus.calpoly.edu!mwormley    Jul 18 19:00:00 1992


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.
>
>please post or reply to dlu@dazixca.ingr.com
>
>Thanks in advances
>


   I know first-hand how valuable a program like this program is.  I found a
program called 'cproto'.  I'm sure that the source is around somewhere.  It
works great.

      worm
From: brazile@cs.utexas.edu (P. Jason Brazile)
Newsgroups: comp.lang.c
Subject: Re: Spelling Checkers..
Date: 28 Jul 1992 10:02:21 -0500
Organization: CS Dept, University of Texas at Austin
NNTP-Posting-Host: latexo.cs.utexas.edu

In article <memo.545029@cix.compulink.co.uk> time@cix.compulink.co.uk writes:
>I have been asked to write a spelling checker, I have get a list of word but 
>i am looking for a fast/efficient/small method of codeing the word list, any 
>suggestions or pointers to books/code samples would be most wellcome. 

You are welcome to look at the source to jspell - an ispell-like spelling 
checker I wrote in C that runs under MSDOS. It will run under UNIX, too, when
I finish the curses interface. I use a simple statistical method of compressing
the words and then store them in a chained hash table which is pregenerated
and loaded in at run time. I had to do some less than obvious things to get
the program + ~50,000 words to fit in 640K of memory.

The source is available via anonymous ftp:

			math.utexas.edu:/pub/jspell
===
Jason Brazile 					brazile@cs.utexas.edu
Graduate Student				Dept of Computer Science 
"People say I'm apathetic but I don't care" 	University of Texas
Newsgroups: comp.lang.c
From: mjs@hubcap.clemson.edu (M. J. Saltzman)
Subject: Re: Pointers to freed memory
Organization: Clemson University, Clemson SC
Date: Fri, 31 Jul 1992 14:14:11 GMT

In article <1992Jul31.035905.20683@oracle.us.oracle.com> wkaufman@us.oracle.com (William Kaufman) writes:
>[...]
>    I can't count the times that I've freed a circular list the way the
>original poster did--save the old "next" pointer, free this one, move on
 ^^^^^^^^^^^^^^ That's me.
>to the saved "next".  If what you say is true, you'd have to stop at
>one-before-the-end and free that one without checking the next pointer.

My solution, after the discussion here, was to break the circle before
freeing:
	p = tail;
	q = p->next;
	p->next = NULL;
	while ( p ) {
	  q = p->next;
	  free(p);
	  p = q;
	}
Now, q will never contain the address of a freed element, and there is no
special boundary case.  (Note that insertions at the head of a singly-linked
circular list are facilitated by pointing to the tail element instead of the 
head.)



-- 
		Matthew Saltzman
		Clemson University Math Sciences
		mjs@clemson.edu
From: jamiller@hpcupt1.cup.hp.com (Jim Miller)
Date: Mon, 20 Jul 1992 18:20:48 GMT
Subject: Re: About the 'F' in RTFM
Organization: Hewlett Packard, Cupertino
Newsgroups: comp.lang.c


Hey Joe, "Fine" does relate to a known adjective for Manual.

Seldom applies, but really! I saw a fine manual once, about 15 years ago.  :-)


   jim -  K&R I *is* a Fine&Fabulous&Fantastic Manual, IMHO  - miller
   jamiller@cup.hp.com
   (a.k.a James A. Miller; Jim the JAM; stupid; @!?$$!; ... )
   Anything I say will be used against me ...
   But my company doesn't know or approve or condone anything of mine here.
Newsgroups: comp.lang.c
From: scs@adam.mit.edu (Steve Summit)
Subject: Re: Variable length records
Organization: none, at the moment
Date: Thu, 30 Jul 1992 20:31:26 GMT

In article <1992Jul30.002228.5973@klaava.Helsinki.FI>, wirzeniu@klaava.Helsinki.FI (Lars Wirzenius) writes:
> On the other hand, perhaps this thread is getting a bit too long: if you
> want strict conformance and portability, use a separately allocated
> array, if you prefer a little bit of convenience, use the others.  And
> the '[1]' version (see earlier posts) may even have both qualities (I'm
> not quite certain).

It does.  As the comp.lang.c frequently-asked questions (FAQ)
list says,

	This technique is popular, although Dennis Ritchie has called it
	"unwarranted chumminess with the compiler."  The ANSI C standard
	allows it only implicitly.  It seems to be portable to all known
	implementations.  (Compilers which check array bounds carefully
	might issue warnings.)

	References: ANSI Rationale Sec. 3.5.4.2 pp. 54-5.

I wish it were possible to state unambiguously that the usage is
strictly conforming, and to point at a single statement in the
Standard to support the claim.  I know of at least one satisfying
"proof" (due to Mark Brader), but it's a bit involved.  (As the
Jargon file says, "A language lawyer is distinguished by the
ability to show you the five sentences scattered through a
200-plus-page manual that together imply the answer to your
question `if only you had thought to look there'.")

Without question, the "chummy" idioms are so widespread that most
compilers would probably strive to support them even if they were
not quite Standard.

Actually, if you're willing to trust the Rationale (which is, of
course, "not part of American National Standard X3.159-1989," the
section referenced in the above FAQ list entry is quite direct in
stating that such variable-size structures are permissible, as
long as the declared array size is greater than 0.

					Steve Summit
					scs@adam.mit.edu
From: kencham@ulysses.cs.umn.edu (Deepak)
Newsgroups: comp.lang.c
Subject: Re: Balancing Binary Search Trees
Date: 30 Jul 92 22:30:41 GMT
Distribution: usa
Organization: University of Minnesota

Try using a Red-Black tree - they maintain the height of the binary tree balanced with a constant overhead. Cormen et. al. has a good discussion on the matter.

Hope that helps.

Deepak
-- 
********************************************************************************
*  Deepak R. Kenchammana-Hosekote            		*******     ******     *
*  Dept. of CSci, University of Minnesota    		 ***  *** *** ***      *
*  1:((612) 626-8396(o),(612) 339-8997(r))     		 ***   *****  ***      *
*  kencham@ulysses.cs.umn.edu 		       		*****        *****     *
********************************************************************************
From: torek@horse.ee.lbl.gov (Chris Torek)
Newsgroups: comp.lang.c
Subject: Re: Array question....
Date: 26 Jul 1992 01:50:57 GMT
Organization: Lawrence Berkeley Laboratory, Berkeley
Distribution: ca
Reply-To: torek@horse.ee.lbl.gov (Chris Torek)
NNTP-Posting-Host: 128.3.112.15
Keywords: help?

>In article <14ks9uINNgmj@agate.berkeley.edu>,
>mdr@ocf.berkeley.edu (Mike Rogoff) writes...
>>... If you just malloc a bunch of space, can you reference it with
>>array [] subscripts and have it work?

It is not *quite* like that:  malloc returns a value, and you have to
store that value in some object in order to use it more than once.
The type of this object determines what operations are legal, and the
size you pass to malloc figures into how many subscripts, if any, are
legal.  But this is essentially correct.

	char *p;

	p = malloc(300);

If p is not set to NULL, then p[0] through p[299] are all legal, and
all produce an object of type `char'.

	int *q;

	q = malloc(10 * sizeof *q);

If q is not set to NULL, q[0] through q[9] are all legal, and all
produce an object of type `int'.

For more information, see the FAQ.

In article <22JUL199218153390@envmsa.eas.asu.edu>
ptran@envmsa.eas.asu.edu (Phi-Long Tran) writes:
>     You want to declare a pointer to an array:
>
>     MyType (*paryMyType)[MAX_ELEMENTQ];

Probably not.  A pointer to an array can point to zero or more
contiguous arrays, so that, e.g., you could write:

	paryMyType = malloc(6 * sizeof *paryMyType);

Now if paryMyType is not NULL, p[0] through p[5] are all legal, and
all produce an object of type `array MAX_ELEMENTQ of MyType'.  Each
of those array objects can in turn be subscripted, so if MAX_ELEMENTQ
is at least 9, then

	paryMyType[3][4]

is legal and is an object of type `MyType'.

If you only wanted a single linear set of `MyType's, it would be
simpler to write

	MyType *m;

	m = malloc(33 * sizeof *m);

Now if m is not NULL, m[0] through m[32] are all legal, etc.
-- 
In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 510 486 5427)
Berkeley, CA		Domain:	torek@ee.lbl.gov
From: dave@cs.arizona.edu (Dave Schaumann)
Newsgroups: comp.lang.c
Subject: Re: Function name : C preprocessor question
Date: 31 Jul 92 04:12:03 GMT
Reply-To: dave@cs.arizona.edu (Dave Schaumann)
Organization: University of Arizona

In article <1992Jul30.224332.3277@news2.cis.umn.edu>, kencham@ulysses (Deepak) writes:
>I was wondering if there was anyway to get the name of function that is
>being currently executed. The scenario is as follows : 
>
>Suppose you have a debugging macro that is defined as follows :
>
>#define DEBUGSTR(x)  fprintf(stderr , "In File : %s , Function :%s error : %s"\
>			__FILE__ , <GOD-KNOWS-WHAT> , x )
>

The short answer is this can't be done.  The C standard defines the
process of compiling so that macro processing phase can run completely
independantly from the parsing phase.  Since there is no way to know
a function name before parsing begins, there is no way a conforming
compiler can have a __FUNCTION__ macro as you describe above.

That said, it wouldn't be difficult to write a C compiler that /could/
define such a macro, and in fact, at least one (GNU's gcc) provides
just such an extension.

If you have this feature available to you, and you don't care much about
portability, go ahead and use it.  In my experience, though, the __FILE__
and __LINE__ macros are suitable for a debugging log unless you are
creating log entries from a lot of different points in your file.

-- 
You unlock this door with the key of imagination.  Beyond it is another
dimension: a dimension if sound, a dimension of sight, a dimension of mind.
You're moving into a land of both shadow and substance, of things and ideas.
You've just crossed over into... the Twilight Zone.
Newsgroups: comp.lang.c
From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
Subject: Re: Why is Turbo C slower then Turbo Pascal?
Keywords: Why C slower then Pascal?
Organization: Computer Science, University of Melbourne, Australia
Distribution: na
Date: Tue, 21 Jul 1992 13:47:10 GMT

silver@fraser.sfu.ca (Craig Silver) writes:

>     I've got Turbo C++ 1.01 and Turbo Pascal 5.  I thought Turbo
>C++ was supposed to be a comparatively fast compiler.  But compared
>with TP, it's got to be *atleast three times slower*!!
> 
>     Why is this and is there anything I can do to speed up my
>TCPP?  Thanks for your response.

Get a later version of Turbo C++.
Later versions have a faster compiler front-end (the front end is supposed to
be nearly twice as fast; I don't know about the overall effect on compilation
speed).
Later versions also have pre-compiled headers. Turbo Pascal uses units instead
of .h & .c files, and it automatically pre-compiles unit interfaces. This is
probably the reason for the factor of 3 performance difference that you are
observing.

--
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!