HDTenEightyP/NetNews huggingface dataset:
From: mat@mole-end
Subject: Re: About the 'F' in RTFM
Organization: :
Date: Wed, 22 Jul 1992 20:49:57 GMT

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?
-- 
 (This man's opinions are his own.)
 From mole-end				Mark Terribile

 uunet!mole-end!mat, Somewhere in Matawan, NJ
Newsgroups: comp.lang.c
From: alpha@wyvern.twuug.com (Joe Wright)
Subject: compiler broken?
Organization: Box 68621, Virginia Beach, 23455
X-Newsreader: Tin 1.1 PL4
Date: Sat, 25 Jul 1992 05:48:48 GMT

Is this 'normal'?  I wrote the following routine some days ago
on my C/80 system:

rdlin() {
	int i;
	for (i = 0; i < length && ((record[i] = getc(infile)) != EOF); ++i)
		;
	return i;
}

It worked fine on my C/80 system but failed on another i486 Unix
system.  It turned out that if the character read was 0xff it was
promoted to -1 (EOF) and caused an 'early' exit.  I fixed it:

rdlin() {
	int c, i;
	for (i = 0; i < length; ++i) {
		if ((c = getc(infile)) == EOF)
			break;
		record[i] = c;
	}
	return i;
}

Question:  Is the Unix compiler broken?  
-- 
Joe Wright  alpha@wyvern.twuug.com    
Newsgroups: comp.lang.c
From: drice@ponder.csci.unt.edu (Keith Rice)
Subject: Re: Summary: Why use "extern" on function prototypes.
Organization: University of North Texas
Distribution: usa
Date: Tue, 21 Jul 1992 17:31:01 GMT

> From Mike: ARIEL.LERC.NASA.GOV!SMNEYLN@uunet.ca Tue Jul  7 13:06:09 1992
>
> I checked in 'C the Complete Reference' by the C god himself, H.Schildt.

IMHO, B. Kernighan and D. Ritchie are the C 'gods' and H. Schildt is the
highly esteemed guru.

--
***************************************************************************
* D. Keith Rice -- University of North Texas -- drice@ponder.csci.unt.edu *
***************************************************************************
* Beta Test: To voluntarily entrust one's data, livelihood and sanity to  *
*            hardware or software intended to destroy all three.  In      *
*            earlier days, virgins were selected to beta test volcanoes.  *
***************************************************************************
From: rickb@asi.com (Rick Broussard)
Newsgroups: comp.lang.c
Subject: Integer tests
Date: 20 Jul 92 23:20:58 GMT
Article-I.D.: asi.1992Jul20.232058.1228
Organization: Adaptive Solutions, Inc.,  Beaverton Oregon

Does anyone know of a set of "C" verification tests that only use
integers, or which has an integer only subset?  Please email me
at rickb@asicom or {uunet,ogicse}adaptive!rickb if you can give me
any help.  Thanks in advance.
From: limes@ouroborous.Eng.Sun.COM (Greg Limes)
Newsgroups: comp.lang.c
Subject: Re: About the 'F' in RTFM
Date: 22 Jul 1992 18:50:23 GMT
Organization: Sun Microsystems, Inc.
NNTP-Posting-Host: ouroborous

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.

When some bonehead calls you up for the third time in an hour asking
questions the he can find in Section I of the Unix Programming Manual
or (worse) in the READ ME FIRST!!! document, telling him to RTM just
does not have enough emotional impact.
From: dave@cs.arizona.edu
Newsgroups: comp.lang.c
Date: 18 Jul 92 02:07 MDT
Subject: Re: (Help) dynamic use of sprintf ?
Nf-ID: #R:brself.711345285@hal:945470687:1992Jul17.220700.24800@organpipe:-583476856:001:1024
Nf-From: cs.arizona.edu!dave    Jul 18 02:07:00 1992


In article <brself.711345285@hal>, brself@hal (Ben Self) writes:
>Often when formatting strings or converting numerics to alphas, sprintf ()
>appears as an extremely attractive possibility.  Unfortunately, it does not
>fit well with dynamic allocation nor is it easily safe guarded from 
>segmentation faults and bus errors.

[various methods of determining the length of a number's decimal
[representation deleted

The solution to this problem is to observe that most numbers are really
rather short.  Unless you're using a package that provides accuracy
beyond the normal limitations, you could simply use a static buffer
of 30 or 40 bytes.  You can then use strlen() to determine the size
of any dynamically allocated buffers you require.

-- 
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: darcy@druid.uucp (D'Arcy J.M. Cain)
Subject: Re: Hungarian notation
Date: Fri, 24 Jul 1992 14:56:08 GMT
Organization: D'Arcy Cain Consulting

[apologies if you see this twice - I think it failed the first time]

ian@airs.com (Ian Lance Taylor) writes:
>darcy@druid.uucp (D'Arcy J.M. Cain) writes:
>>the position in a file.  You can deal with the abstract concept without
>>getting involved in the details of the bits that are used to implement it.
>The last statement is precisely how Hungarian notation should be used.
>In my opinion, using different type prefixes for int and long is
>senseless.  Using different type prefixes for file position vs. some

I must admit that I had assumed that Petzold in "Programming Windows"
was speaking authoritively on Hungarian Notation.  In that book he is
quite specific about using separate prefixes for ints and longs.  After
reading the Simonyi paper recently posted I find I am in more agreement
than after reading Petzold.  I still don't like Hungarian but perhaps
brain damage is too harsh an epithet.

-- 
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   |
From: jjk@po.CWRU.Edu
Newsgroups: comp.lang.c
Date: 17 Jul 92 18:05 MDT
Subject: Re: Compatibility between Microsoft-C a
Nf-ID: #R:4z+mbaf.prastogi@netcom.com:1279130672:1992Jul17.140520.8318@usenet.ins:-1056406313:001:2228
Nf-From: po.CWRU.Edu!jjk    Jul 17 18:05:00 1992



>How different is Microsoft-C Compild module and Borland C compiled modules.
>DO they follow different conventions for generating the assembly code and the
>object code. Is it possible to link object modules and libraries generated by
>different compilers. 

So far I've found three major differences:

  1.  Microsoft puts the stack in the default data segment regardless
      of memory model, whereas Borland puts the stack in the default data
      segment only in the "small data" models (tiny, small, & medium).
      This is easily taken care of by setting the SS=DS option in the 
      Options | Compiler | Code Generation menu to "Always".

  2.  Some of the library's code may access Microsoft-specific globals
      or internal run-time library functions.  If this occurs, your 
      program will not link.  If you have the Microsoft run-time library
      (xLIBCE.LIB) you can link it in to resolve the references.  Two
      warnings:  first, the xLIBCE.LIB must come after the Borland Cx.LIB
      in the link.  Using the IDE puts Cx.LIB last by default.  You must
      provide for this inside your Project window.  Second, there may be
      name collisions for dissimilar items, or functions that behave differ-
      ently.

  3.  Finally, the method in which floating point values are returned from
      functions differs.  Borland returns floats, doubles, and long doubles
      on ST(0), or in the floating point emulator's top of stack if you aren't
      using the coprocessor.  Microsoft returns them into static variables.
      (See the Borland C++ Programmer's Guide's "Interfacing With Assembly
      Language" chapter and the Microsoft Macro Assembler Programmer's
      Guide's "Mixed-Language Programming" chapter for full explanations).
      What this basically means is that a Microsoft-generated function calling
      the run-time library will get Borland's function and (a) the function
      will not return the value where the calling function looks for it and
      (b) your floating-point stack overflows quickly, since values are not
      being popped from it.  If anyone has a solution to this problem, I'd
      like to know.

Jeff Kellam
banshee@natinst.com
-- 
jjk@po.cwru.edu

Xref: sparky comp.lang.c:11711 comp.sys.amiga.programmer:11783
From: CADS_COLE@GALLUA.BITNET (Kevin Cole; Washington DC)
Newsgroups: comp.lang.c,comp.sys.amiga.programmer
Subject: Re: Matt Dillon's DICE (Amiga C) and rand() function
Date: 29 Jul 92 17:00:44 GMT
Organization: Gallaudet Research Institute

In article <1992Jul29.081247.1@gallua>, I wrote:

> Here's a very short C program that doesn't do what the documentation claims. 
> According to Matt Dillon's DICE documents, I can limit the range of values
> returned by rand() if I define the variable RAND_MAX to something other than
> the default.  I've tried various values, but I continue to get these huge
> (32-bit) numbers.  Tell me I'm not missing something obvious. 
> 
>      #include <stdio.h>
>      #include <stdlib.h>
>      #define RAND_MAX ((1023))
>      main()
>      {
>       int i;
>       for (;;)
>       {
>        i = rand();
>        printf("Random number %04X (%d)\n",i,i);
>       }
>       return(0);
>      }

Thanks all.  The *REAL* answer is "Friends don't let friends program stoned."
I'm recovering from a broken elbow, and the doc's got me on all sorts of brain-
deadening chemicals. 

First, I must confess that I carelessly used the word variable, when I meant 
constant.  In Matt Dillon's documentation, it says that RAND_MAX is defined in 
stdlib.h.  Sure enough there was a 

   #define RAND_MAX ((1 << (sizeof(int)*8) - 1)

or something like that.  I foolishly assumed from the doc that changing that 
would change the behavior of rand().  If I hadn't been on pain-killers, I might
have realized that the program I wrote never actually USED my re-definition,
and that there was no way for rand() to know about a constant in the main
program that was never actually passed to it. 

Some of you explained that what the documentation was actually suggesting was a
re-compilation of the library containing rand(), after redefining RAND_MAX. The
pain-killers have worn off sufficiently enough that I knew I didn't want to do
that.  (But just in case I was still brain-dead, one author pointed out that
this wasn't exactly a bright idea.) 

Two of you offered the correct solution:  Use the modulus operator %.  (One was 
the guy who explained why I didn't want to recompile rand().)

Anyway, many, many thanks to:

Ben Jackson, Dept Biological Structure-University of Washington
   <BJACKSON@GLIA.BIOSTR.WASHINGTON.EDU>
Anthony Lapadula, University of New Hampshire  -  Durham, NH
   <AL@KEPLER.UNH.EDU>
Daniel Barrett, University of Massachusetts, Amherst
   <BARRETT@GLEEP.CS.UMASS.EDU>
John C. Chu, UB
   <CHU@ACSU.BUFFALO.EDU>
Boris
   <BORIS%MSC.CORNELL.EDU@CRNLMSC3.BITNET>
Chris Torek, Lawrence Berkeley Laboratory, Berkeley
   <TOREK%HORSE.EE.LBL.GOV@LBL.BITNET>
Nick Ruprecht, Institut fuer Informatik der Universitaet Freiburg
   <RUPRECHT@CORSE.INFORMATIK.UNI-FREIBURG.DE>
-- 

 ========== U.S. Mail =============================== E-Mail =================
 Kevin Cole      <Flatline>           |  Bitnet: CADS_COLE@GALLUA.BITNET
 Gallaudet Research Institute  (GRI)  |  Internet: KJCOLE@GALLUX.GALLAUDET.EDU
 Washington, D.C.  20002-3625         |  UUCP: ...!psuvax!gallua.bitnet!kjcole
 (202) 651-5575  x4592                |  The WELL:   kjcole
From: bsullivn@nixeidsc.sni.ie (Bryan O'Sullivan)
Newsgroups: comp.lang.c
Subject: Re: While problem
Date: 28 Jul 92 09:47:24 GMT
Article-I.D.: nixeidsc.135
Reply-To: bryan@sc.sni.ie
Organization: Siemens-Nixdorf Software Development Centre, Dublin
X-Newsreader: Tin 1.1 PL3



: Although this may work, I do not believe it is portable.

You're right; it isn't.  Oops.

	-- Bryan

-- 
Bryan O'Sullivan                                             +353-1-767551 x225
Siemens-Nixdorf Informationssysteme AG                          bryan@sc.sni.ie
Software Development Centre                    "Theory like mist on eyeglasses.
Dublin                                          Obscure facts." -- Charlie Chan
From: tpradeep@cs.tamu.edu
Newsgroups: comp.lang.c
Date: 17 Jul 92 18:37 MDT
Subject: How to implement a bit array?
Nf-ID: #N:1992Jul17.143744.12549@tamsun.ta:-1367172306:001:633
Nf-From: cs.tamu.edu!tpradeep    Jul 17 18:37:00 1992


Howdy netters,

In my project I need an array of 30000 elements which have {0,1} values only.
I guesss a good way to implement this is such that each element takes just
one bit. Can someone suggest me a good struct/union implementation for
a bit array.

Ideally I should be able to do the following operations:

     whatever.whatever...[13467] = 1; // or 0

     if( whatever.whatever...[i] ) {  code }

However the following is acceptable ( worst case)

   BitSet(Array, 13467, 1);

   if( IsBitSet(Array, i) ) { code }


Thank you for your help. If need be, I'll summerize the responses on the net.

Pradeep
tpradeep@cs.tamu.edu
From: wirzeniu@klaava.Helsinki.FI (Lars Wirzenius)
Newsgroups: comp.lang.c
Subject: Re: Variable length records
Date: 25 Jul 92 09:17:02 GMT
Organization: University of Helsinki

gurgle@netcom.com (Pete Gontier) writes:
>typedef struct
>{
>	short   count;
>   float   data[ ];
>}
>foo;
>
>I refer to the second member as an "open array." Its behavior is this:
>	o  it may appear only as the last member of a structure
>	o  it does not contribute to the value returned by sizeof(foo)
>   o  it may be addressed, of course, with an arbitrary index

Are there any particular reasons to not use

	typedef struct {
		short count;
		float data[1];
	} foo;

(and similar over-allocation and using "too large" indexes) instead?
This version only assumes that there won't be any problems for accessing
elements outside the data array.

And, except for a minor gain in convenience for allocation and
deallocation, is either of these preferable to

	typedef struct {
		short count;
		float *data;
	} foo;

(and allocating the memory for data separately) which _is_ ANSI
compliant?

>I got worried about its portability so I paged through some manuals.
>Both major C compilers for the Mac support it. Turbo C and Microsoft
>C for the PC support it. According to Harbison and Steele, ANSI does
>*not* support it. And from experience I know that AT&T cfront 2.1 (the
>most common "standard" for C++) does not support it. I'm a little bit
>suprised that it's not in the ANSI standard, but after my research I
>felt it was common enough that I'd use it with impunity. And now I've

>just checked with 'gcc' 1.39, and it doesn't like it. Perhaps 2.x does.

My gcc 2.2.2 under Linux doesn't seem to support it, at least with the
default options:

	foo.c:3: field `data' has incomplete type

>Not knowing about records simply means you have to implement it yourself.
>There are no problems, as long as your compiler cooperates, with UNIX.

Actually, I don't think any special compiler cooperation is required. 
To output the last version above to a file you do:

	fwrite(&foo.count, sizeof(foo.count), 1, outfile);
	fwrite(foo.data, sizeof(float), foo.count, outfile);

(with error checking, of course) and similarly to read it.  (You might
wish to use text files, to achieve better data portability.)

--
Lars.Wirzenius@helsinki.fi
From: lerman@seltd.UUCP (Kenneth Lerman)
Newsgroups: comp.lang.objective-c
Subject: Re: Object Oriented Design Question
Date: 25 Jul 92 12:59:25 GMT
Reply-To: lerman@seltd.UUCP (Kenneth Lerman)
Organization: Systems Essentials Limited

In article <fQbGjid@quack.sac.ca.us> rmd@quack.sac.ca.us (Robert M. Diamond) writes:
|Hello,
|	I am attempting to design a system which reads data in from a
|file and writes it back to another file.  Data items can be of various
|basic types, like number, string, date or time.  They can be read from
|the file or calculated from other read or calculated data items.  They
|can be stored in the database (in various ways) or marked for temporary
|use only.  The scheme I have come up with is thus:  
|Have a class "data_item" which can store itself or retrieve its value.
|Have subclasses "numeric_data_item," "date_data_item, " etc. which
|instantiate the ::store() and ::retrieve() functions.
|	The problem is that the typed_data_item either needs to know how
|to store itself in each possible way, or the storage_class has to know
|how to store each possible type, or I must create classes for the
|cartesian product of type and storage class.
|	This is my first OOD project, and I would appreciate any ideas
|that people can come up with.
|	thanx,
|	Robert Diamond
|	+1 415 493-4122

The examples you give (of numeric, date,...) are primitive types.
What is the need to store them in more than one way?

The classic way of "factoring" a M x N problem like this is to develop
an intermediate representation (IR).  Then write M functions or
methods (one for each of the M classes) to write the data in the IR.
Lastly, write N functions or methods to convert the IR to the N target
representations. 

Stepstone's AsciiFiler class and facility enable every object to be
saved (usually without writing specialized code for that object) in an
ASCII representation.  If you have access to that product, the source
may give you some ideas on how to store and read graphs of complex
objects. 

Ken




-- 
Kenneth Lerman                  ...!uunet!casey!gaboon!seltd!lerman
Systems Essentials Limited                            (203)426-4430
55 Main Street
Newtown, CT 06470
From: gbol@rglnext.geol.vt.edu (Gregory Lampshire)
Newsgroups: comp.lang.objective-c
Subject: merits of dynamic loading and runtime type identification in a GUI?
Date: 31 Jul 92 14:26:02 GMT





I would appreciate if anyone could point out a paper or a discussion which  
argues the merits of dynamic object code loading and runtime type  
identification in GUI appilication kits.  What I am wondering is if ObjC  
is inherently better then C++ for building GUI application kits.  I would  
hope that the argument would be based on some software engineering  
principles etc of cohesion,  coupling etc...  I would also suppose that in  
the best case CLOS or Smalltalk-80 would be the ideal but I am mainly  
interested in maintaining some rudiments of runtime efficiency and C  
compatibility.


I am wondering if it is inherently better to write a GUI application kit  
in C++ or in something like ObjC.


--
Gregory Lampshire 
Virginia Tech 
Bradley Department of Electrical Engineering
gbol@rglnext.geol.vt.edu (NeXTmail welcome)
------------------------
My opinions are my very own and do not reflect the opinions of any  
employer
From: lozinski@cup.portal.com (Christopher A Lozinski)
Newsgroups: comp.lang.objective-c
Subject: Re: Objective-C for Windows
Date: Thu, 30 Jul 92 22:13:29 PDT
Organization: The Portal System (TM)
Distribution: world
  <1992Jul13.153217.262@pages.com> <19@seltd.UUCP>

It is interesting to see the increased e-mail traffic on Objective-C
for Windows.  This is good, since Objective-C has some significant
advantages over C++ for writing Windows Applications.  Objective-C
has an architecture which fits gracefully and efficiently on top of
Microsoft Windows.  Microsoft Windows and Objective-C are both based
on message passing, where the message is determined by an integer,
and the receiver looks up the function to be executed.  Futhermore
they both have a one-to-one mapping between message integer, and a
string defining the message.  This similarity between the products
reduces the effort required of the developer.  

     Furthermore, in order to allow assembly of objects, dynamically
linked libraries need to be dynamically bound, and this is made
possible by Objective-C.  Thus Objective-C will open a software components 
market place under Microsoft Windows. 

   I would like to respond to Ken Lerman's inquiries into the
requirements in the Windows market.  This market has several
requirements.  First it needs Stepstone to release the Objective-C
translator running under Windows.  BPG has no interest in doing this
work and is waiting for Stepstone to release the product.  Once the
basic translator is available running under Windows, then it is
possible to make the significant extensions needed to meet the needs
of Windows Developers.  In my humble Opinion, it is desirable that
the Stepstone translator run with the award winning Borland compiler.
This service is best provided by a Borland Key Developer with close
access to the new product releases from Borland, someone who has
imput into the new product release cycle.  It is desirable that the
product make it easy to create a DLL, and ship with a DLL
demonstration program.  A user interface tool kit and Window Builder
are required.  One solution is to provide an interface to Smalltalk
which has excellent user interface builer products available, and is
much like Objective-C.  Finally, some specialized services are
required in the area of Dynamic Link Libraries, and BPG is already
helping one of its clients in this area. 

    I hope that this answers your questions Ken Lerman.  And now for a
tiny commercial plug.  If you are looking for these features, you can
either wait for Stepstone to provide them, or else you can purchase
the Borland extensions to Objective-C now.

Christopher Lozinski
Vendor Borland Extensions to Objective-C.

Berkeley Productivity Group
35032 Maidstone Court
Newark, CA 94560
Tel:(510) 795-6086
CompuServe:71201,1175
Internet:lozinski@cup.portal.com
From: lerman@seltd.UUCP (Kenneth Lerman)
Newsgroups: comp.lang.objective-c
Subject: Re: Objective-C for Windows
Date: 28 Jul 92 21:54:26 GMT
Reply-To: lerman@seltd.UUCP (Kenneth Lerman)
Organization: Systems Essentials Limited

In article <1992Jul13.153217.262@pages.com> bwebster@pages.com writes:

...
|with that compiler; no C++ support is in the language itself. However if  
|there's enough interest in this, call K.K. Tan at StepStone and cajole him into  
|allowing Chris to get the source code so that he can make it easy to create OC  
|classes in DLLs and use a different DOS extender than the old Rational one  
|StepStone is using. This will get rid of the annoying requirement that you exit  
|Windows to compile your code.
...

Stepstone is already working on building a compiler which will not
require that you exit Windows to compiler your code.  It is unlikely
IMHO that Chris will get the source to Stepstone's compiler.  It is
more likely that Stepstone (or someone else with access to the source)
will modify the compiler to make it "better" for the generation of DLLs.

If I thought there was sufficient demand for such, I might do it
myself.  I would also need a specification for the desired changes (or
enhancements).  Can someone out there tell me specifically what it is
you want?                                     ^^^^^^^^^^^^  What
specific changes should be made to the generated code?

Ken


-- 
Kenneth Lerman                  ...!uunet!casey!gaboon!seltd!lerman
Systems Essentials Limited                            (203)426-4430
55 Main Street
Newtown, CT 06470
Newsgroups: comp.lang.postscript