HDTenEightyP/NetNews huggingface dataset:
From: fisherm@infonode.ingr.com (Matthew Fisher)
Subject: Problem with BCC 3.1
Organization: Intergraph Corporation, Huntsville, AL.
Date: Tue, 29 Sep 1992 20:04:25 GMT

Hello all,

    I using Borland C++ 3.1 under windows.  I have a file of about 2000 lines.
The file is just one long list of 

if(a)
{}
else if(b)
{}
else if(c)
{}
else .....

The compiler seem to hate this construct.  After about 800 lines it promptly
run out of memory.  I have 16mg on board and a 50mg swap space for windows!
I saw the /s option in the manual but it had no noticable effect.
Is this a bug or a strange feature of the compiler?
I talk up Borland products around here and was quite chagrined when our in
house Unix compiler had no problems with this file.
Please repond by email, my rn is off line.

take it easy,
Matthew E Fisher
fisherm@infonode.ingr.com

Newsgroups: comp.lang.c
From: kauffman@slab.unt.edu (DON KAUFFMAN)
Subject: The FAQ is on its way?
Organization: School of Library & Info Sci, UNT
Date: Mon, 28 Sep 1992 21:58:25 GMT

>
>The FAQ is on its way.  (This is mentioned in 3.3.)
>

	I keep reading that the FAQ is on its way, and I keep
	waiting for it to be posted, but I never see it.  I'm
	going to assume that this means that it isn't ever
	posted and only sent to people who have questions about
	it.  So I ask:  How can I get the comp.lang.c FAQ list?
Xref: sparky comp.lang.c:14307 sci.space:13765
From: agc@bmdhh298.bnr.ca (Alan Carter)
Newsgroups: comp.lang.c,comp.unix.progammer,sci.space
Subject: Re: Easter
Date: 30 Sep 92 12:40:04 GMT
Organization: BNR-Europe-Limited, Maidenhead, England

In article <8f4.ANN@saxon.UUCP>, fletcher@saxon.UUCP (Edward F Eaglehouse) writes:
|> I don't have any actual code to calculate Easter, but if I remember
|> correctly Easter falls on the first Sunday following the first full moon
|> after the Vernal Equinox.
|> 
|> An astronomical programmer should be able to provide this one.  Somebody in
|> sci.space probably can give us a formula.

It's in Knuth Vol. 1 (what isn't?). Algorithm E, Exercise 14, Section 1.3.2.
He comments "Easter is supposedly the 'first Sunday following the first full 
moon which occurs on or after March 21st.' Actually perturbations in the
moon's orbit do not make this strictly true, but we are concerned here 
with the 'calendar moon' rather than the actual moon. The Nth of March is
a calendar full moon."

Odd that Easter Sunday is what it is based on. I thought Christians put
more emphasis on the Crucifiction and Resurrection than on Easter
Sunday, which was a day that not much happened on. 

   Alan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Maidenhead itself is too snobby to be pleasant. It is the haunt of the
   river swell and his overdressed female companion. It is the town of showy
   hotels, patronized chiefly by dudes and ballet girls. 

   Three Men In A Boat, Jerome K. Jerome, 1889
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: javier@atina.ar (Javier Lopez)
Newsgroups: comp.lang.c
Subject: question about const type qualifier
Summary: const qualifier in an array of pointers
Keywords: const, odt
Date: 2 Oct 92 17:52:44 GMT
Organization: MREyC, Argentina.


Hello
	I was trying to compile gnu uucp and the following assigments weren't
allowed by the compiler.

...
const char *az[20];
...
	az[0] = "hello world\n";   /* This assignemnt */
	...

The message error was that it wasn't an lvalue.


Extracted from K&R II page 40
"For an array, the const qualifier says that the elements will not be altered"

Since the definition char *az[20]  means that az is an array of pointers to char
I think that the compiler messages are correct, so gnu code is wrong.

I'm correct or I'm missing the point ?

Please replies to
javier@atina.mrec.ar

Thanks in advance

Francisco Javier Lopez
United Nations Development Program
Argentine Foreing Office
From: johnr@ee.uts.edu.au (John Reekie)
Newsgroups: comp.lang.c
Subject: Re: looking for portability- and good-style ruules
Date: 1 Oct 92 03:30:28 GMT
Organization: University of Technology, Sydney
NNTP-Posting-Host: schutz.ee.uts.edu.au

"hans friedrich steffani" <GM08@DKAUNI2.BITNET> writes:


>within a new EC-project with many partners on many sites
>we are looking for a collection of rules to do 'good', well
>documented and portable programming in C.
>Where can i get this?

The FAQ contains some references to style guides available
by ftp. You might also want to look at the following books:

David Strakker, C Style: Standard and Guidelines, Prentice-Hall 1992.
Andrew Koenig, C Traps and Pitfalls, Addison-Wesley, 1989.
Darnell and Margolis, C: A Software Engineering Approach, Springer 91.

(The last is a textbook, but contains some useful "how-not-to"s.)

Regards

John Reekie

Newsgroups: comp.lang.c,comp.lang.c++,comp.std.c,comp.std.c++
From: s1159377@giaec.cc.monash.edu.au (T.  FOOEY..  Furnell.)
Subject: Some simple C advice needed..
Organization: Monash University College Gippsland, Churchill, 3842, Australia
Date: Wed, 30 Sep 1992 01:14:44 GMT

Me again,  " The Problem Child. "

I an trying to learn how to do screen designs using Turbo C++
A friend has created a "World generation" program for the amiga
and we are converting it to run on an IBM Clone, with a SVGA monitor
So far we have converted everything except how to create the screens.

We aren't sure as to the procedures for initialising, and then setting
the screen modes (especially mode 13h.?).

Could some kind soul explain briefly what C implementations we need
and what order they need to be in. Also any examples (code) would
be V-much appreciated.

Thanks in advance.
FOOEY..
+------------------------------------------------------------------------+
|   From:   Trevor  FOOEY..  Furnell       |   There is nothing that     |
|   Monash University College Gippsland.   |   cannot be taken from you  |
|   Churchill, Victoria, Australia.        |   by someone who wants      |
|   s1159377@giaec.cc.monash.edu.au        |   it bad enough...          |
+------------------------------------------------------------------------+
.
Newsgroups: comp.lang.c
From: dwf@kepler.unh.edu (Dennis W Fitanides)
Subject: freopen() How do I get back stdin and stdout?
Summary: Is it possible?
Organization: University of New Hampshire  -  Durham, NH
Distribution: usa
Date: Tue, 29 Sep 1992 20:18:14 GMT

Hello:
	I have a compression program that uses freopen() to reopen stdin and
stdout.  I've read numerous documents from many sources (including K&R,
the man pages and AIX Info) that all state that freopen() always closes
the original file descriptor.  What I need to do is to "reopen" the 
freopen()'d file descriptor (stdin in this case).
	Basically, what is happening, is that I'm calling a file compression
function from main() and the file compression function freopen()s stdin &
stdout, and when it returns, main() can no longer use these file descriptors,
nor can any spawned child use them either (which makes sense).
	I tried doing a close() on the file, but that does not fix the problem.
I still can no longer use stdin or stdout.
	The manuals I read do not tell how to fix the file descriptor once
freopen() has done its job.  I need to reuse stdin and stdout after the
freopen() is done and control is back in main(), if this is possible.

	Any help in this area would be greatly appreciated.  I'm pretty clueless,
as I have expended all my local resources.

			-Thanks in advance,

			 Nick Fitanides (fitanide@lmig.com)
From: sjjoos@uswnvg.com (Steven Joos)
Newsgroups: comp.lang.c
Subject: Needed Cobb Groups ITC journal source files.
Date: 5 Oct 92 06:00:23 GMT
Organization: US West NewVector, Inc., Bellevue, WA
Originator: sjjoos@nv2.uswnvg.com

Help ! I had a disk crash and lost every single source file Archive that
I had downloaded from the Cobb Groups BBS for the Inside Turbo C
journal. I called the Cobb Group and they said that they discontinued the BBS
service, and that I could not get the files unless I had an account on
compuserve. Many of my projects used bits and pieces from the articles
in the journal, and I have no account on compuserve. I would gladly
reimberse someone for the cost of gathering up the PC format ARC's and
ZIP's and sending them to me. I had the source for every issue that was
published from early 1989 to present.

Thanks 

Steven J Joos
N4MRN
sjjoos@uswnvg.com

Newsgroups: comp.lang.c
From: silvia@rcf.rsmas.miami.edu
Subject: multiple data segments
Reply-To: silvia@rcf.rsmas.miami.edu
Organization: RSMAS
Date: Tue, 29 Sep 92 00:21:23 GMT

Does anyone know how i can create multiple data segments without going to the huge memory model? I have tried several different ways but no luck. Any help would be greatly appreciated. Please e-mail responses. Thanks.

                       Manolo
Newsgroups: comp.lang.c
From: "chris perkins" <chris.perkins@canrem.com>
Subject: undefined ?? question
Reply-To: "chris perkins" <chris.perkins@canrem.com>
Organization: Canada Remote Systems
Distribution: comp
Date: 2 Oct 92 05:22:49 EST


In message From: phd85@keele (D.H. Holden)
Subject: Undefined ?? Question. I know I'm missing something.

DH>   Can somebody tell me why the following gives the error below,
DH>#include <stdio.h>  /* i've also tried #include "stdio.h" */
DH>#include <math.h>  /* i've also tried #include "math.h" */

DH>main()
DH>{
DH>   double answer;

DH>   answer = sqrt(10.0);
DH>   printf("%f", answer);
DH>}

DH>  error is:

DH>Undefined:
DH>_sqrt

The program looks okay to me.  Have you checked that you are linking
in the appropriate library? (i.e. a math or floating point library)

Regards,

Chris
---
  DeLuxe/386 1.25 #9629  Best wishes,            Chris Perkins
--
Canada Remote Systems  - Toronto, Ontario
World's Largest PCBOARD System - 416-629-7000/629-7044
Newsgroups: comp.lang.c
From: sue@netcom.com (Sue Miller)
Subject: Re: Determining variable type at run-time (followup q.)
Organization: Netcom - Online Communication Services (408 241-9760 guest)
Date: Fri, 2 Oct 1992 20:51:36 GMT

In article <369@ulogic.UUCP> hartman@ulogic.UUCP (Richard M. Hartman) writes:
>In article <1992Oct1.173644@is.morgan.com> berlin@is.morgan.com (Alexander Berlin) writes:
>>In article <359@ulogic.UUCP>, hartman@ulogic.UUCP (Richard M. Hartman) writes:
>>
>>|> Safer would be:
>>|>
>>|> x.type = 2;
>>|> x.value = malloc(strlen(str));
>>|> strcpy(x.value, str);
>>|> OutPut(x);
>>|> 
>>Doesn't look very safe to me.
>
>Sorry.  Third most common error in C.
>
>   x.value = malloc(strlen(str)+1);
>   strcpy(x.value, str);

How about the fact that you didn't check to make sure that
malloc actually returned the buffer you requested?

The worst thing is, I've seen "production" code which lacked
these sorts of checks.  Argh.
From: hartman@ulogic.UUCP (Richard M. Hartman)
Newsgroups: comp.lang.c
Subject: Re: Recommended compilers for DOS? Turbo or MS?
Date: 29 Sep 92 21:38:53 GMT
Article-I.D.: ulogic.313
Distribution: usa
Organization: negligable

And just to muddy the waters, Zortech C++ also does Ansi C and is 
available on a number of platforms.

For DOS only, I tend to prefer Borland.  Their IDE is a nice environment
to work in, it's fast and produces decent code.



		-Richard Hartman
		hartman@ulogic.COM

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"Badges?  I don' got to show you no stinkin' badges!"
Newsgroups: comp.lang.c
From: abutler@ariel.demon.co.uk (Tony Butler)
Subject: Turbo C++ problem 
Distribution: world
Organization: Megadodo, Inc.
Date: Sat, 26 Sep 1992 16:25:50 +0000


In article <289@ulogic.UUCP> hartman@ulogic.UUCP writes:

> 
> In MSDOS even the text modes are "graphics modes"  e.g. 80x25, 16 color
> mode is "mode 3".  I don't remember offhand the mode #s for other modes
> but if your C compiler has a setmode() function the documentation should
> cover it.  Otherwise you'll have to use bios int 10 (I think that's the
> video function interrupt...) and find something that documents the values
> you need to pass to it.  It's been a long time since I've done anything
> like that otherwise I'd be giving details, but I hope I'm pointing you
> in the right direction at least.....
> 

Thanks, I'm, using Turbo C v2, which doesn't have a setmode() function.
I know how to call int 10, the problem is that any documentation I have
read (even regarding int 10) does *not* mention 43/50 line modes, just
the 25 line modes & other graphic modes. Obviously there must be *some*
way to do it apart from having ansi.sys installed.

   Tony.


 ----------------------------------------------------------------------------
| Tony Butler                           Internet: abutler@ariel.demon.co.uk  |
| Surrey,                                 TCP/IP: 158.152.8.125              |
| England.                               Fidonet: Anthony Butler @ 2:250/408 |
 ----------------------------------------------------------------------------

Newsgroups: comp.lang.c
From: mjs@hubcap.clemson.edu (M. J. Saltzman)
Subject: Re: source code for POW function
Organization: Clemson University, Clemson SC
Date: Fri, 2 Oct 1992 14:27:33 GMT

In article <1992Oct2.072336.27284@organpipe.uug.arizona.edu> dave@cs.arizona.edu (Dave Schaumann) writes:
>In article <1992Oct1.091307.260@winkle.bhpese.oz.au>, clarke@winkle writes:
>>Can anybody on the net supply me with a copy of the source code for the
>>"POW" function.
>
>Well, you could start out with
>
>double pow( double x, double y ) { return exp( log(x) * y ) ; }
>
>The "official" version of pow() is just that plus some special-case
>stuff and error checking.

I should hope not!  As Plauger points out in _The_Standard_C_Library_,
the computation of log(x) causes a loss of precision that can make the
result of exp(log(x)*y) inaccurate.  The pow() function must either 
compute in extended precision, or it must use some other technique
to ensure that accuracy is maintained.

See Plauger for a sample implementation.  See Cody and Waite,
_Software_Manual_for_the_Elementary_Functions_, Prentice Hall, 1980,
for detailed exposition.

>
>-- 
>Dave Schaumann			dave@cs.arizona.edu


-- 
		Matthew Saltzman
		Clemson University Math Sciences
		mjs@clemson.edu
Newsgroups: comp.lang.c
From: gordon@osiris.cso.uiuc.edu (John Gordon)
Subject: Re: Stack Overflow ( HELP PLEASE )
Organization: University of Illinois at Urbana
Date: Mon, 5 Oct 1992 04:09:02 GMT

cs125b52@ih-nxt01 (cs125 student) writes:

>     I'm using a recursive function to mimic "floodfill" for SVGA. 
>Unfortunately, my new function keeps giving me a stack overflow.  How do I
>increase the stack?  Could anybody give me a hint?  I've tried different
>memory models and everything else I could think of. 

	Here's what I use:

	extern unsigned _stklen = 64000;

	This statement must (I think) be global; i.e. put it outside of
	all functions.
 
---
John Gordon                        My incredibly witty saying has been 
gordon@osiris.cso.uiuc.edu         Politically Corrected into oblivion.
Newsgroups: comp.lang.c
From: pal@regent.e-technik.tu-muenchen.dbp.de (Peter Loibl)
Subject: Re: C help...pretty please.
Organization: Technical University of Munich, Germany
Date: Tue, 29 Sep 1992 13:56:14 GMT

dalessan@clam.rutgers.edu (Gene Dalessan) writes:


>#include <math.h>
>#include <stdio.h>
>main()
>{
>double val=-1.0;

>do {
> printf("hyperbolic cos %f is %f\n",val,cosh(val));
> val +=0.1;
> } while (val<=1.0);
>}


>PLEASE help...Why do I get undefined _cosh?

>I'm learning C know and this example is out of the book.
>I need the cosh for a numerical meth problem.

>Gene

Well, you probably forgot to link the math library. If you are
working on a UNIX machine it looks like this:

cc myprog.c -lm -o myprog

-lm will link the math-lib and -o will name the binary file as myprog.

If you work on another machine, then you will have to look up how 
to set the compiler options.

Peter
pal@regent.e-technik.tu-muenchen.de
Newsgroups: comp.lang.c
From: bobm@Ingres.COM (Bob McQueer)
Subject: Re: What is RPG ???
Date: 2 Oct 92 20:18:38 GMT

In <books.12.0@fsunuc.physics.fsu.edu>,
	dated Fri, 2 Oct 92 12:30:03 GMT,
	books@fsunuc.physics.fsu.edu (Roger Books) writes:
> In article <1992Oct2.015817.183@wsuhub.uc.twsu.edu> ckcheng@wsuhub.uc.twsu.edu writes:
> 
> >     Hey, does anybody heard of RPG (language or system?, NOT role playing
> game>) ?  Can anyone talk about it in this category or open a new category ?
> 
> Report Program Generater
> 

Or if you prefer, Random Paper Generator :-).  Actually, it was used enough that
you will find a few companies making versions of it for the PC environment
and such things (take a look through some of those PC mail order catalogs).
I last saw it being used in a Campus environment in the late 70's.
Newsgroups: comp.lang.c
From: silvia@rcf.rsmas.miami.edu
Subject: ansi standards
Reply-To: silvia@rcf.rsmas.miami.edu
Organization: RSMAS
Date: Sun, 4 Oct 92 14:45:09 GMT

Does anyone have the ANSI standards? Or know were I could get them? Please e-mail.



         Manolo
From: johe@pbutv.pb.se (Jonas Heyman)
Subject: read/write to passwd file
Date: Sun, 27 Sep 1992 01:53:40 GMT
Organization: Pressbyr}n , Svenska AB


Hi,

The following code below writes a passwd entry to the
passwd file.
Now I also want to delete an entry, how is that done ?

Thanks in advance for help, Jonas.

#include <stdio.h>
#include <pwd.h>
#include <string.h>
#include <stdlib.h>

main()
{
  struct passwd {
    char *pw_name;
    char *pw_passwd;
    int pw_uid;
    int pw_gid;
    char *pw_age;
    char *pw_comment;
    char *pw_gecos;
    char *pw_dir;
    char *pw_shell;
  };

  FILE *f;
  static struct passwd entry={"test","toomzwx65WmxY",0,1,"",
				"test","test","/users/test","/bin/sh"};
  struct passwd *ptr;
  ptr=&entry;

  if((f=fopen("/etc/passwd","a")) == NULL ) {
    fprintf(stderr,"Can't open password file\n");
    exit(EXIT_FAILURE);
  }

  if((putpwent(ptr,f))!=0) {
    fprintf(stderr,"Error writing passwd file\n");
    exit(EXIT_FAILURE);
  }
}
-- 

   /johe@pbutv.pb.se/
From: meattle@usc.edu (Saumya Meattle)
Newsgroups: comp.lang.c
Subject: C libraries
Date: 28 Sep 1992 11:16:36 -0700
Organization: University of Southern California, Los Angeles, CA
Distribution: usa
NNTP-Posting-Host: sal-sun95.usc.edu


I am looking for ftp adresses where I can get C graphics libraries by
anonymous ftp.

Could someone please mail me the ftp addresses.

Please reply by private mail.

Thanks.

Saumya Meattle
email: meattle@aludra.usc.edu
Newsgroups: comp.lang.c,comp.lang.c++
From: ctaylor@sparc7.cs.uiuc.edu (Conrad W Taylor)
Subject: Fast array transfer with 2D arrays...?
Organization: University of Illinois at Urbana-Champaign
Date: Tue, 6 Oct 1992 01:07:22 GMT

         Would anyone know how to do a fast array transfer with
a 2D array?  I have seen this in an advance c programming book
by Anderson & Anderson, but I cannot remember the details of the
construct that was given.  They used a 1D array in the book, I
think.  Thanks in advance to all that reply to this post.

-Conrad

ps: My e-mail is ctaylor@silver.lcs.mit.edu
    or u21749@uicvm.uic.edu.

Note:  What I mean by a fast array transfer
       for those who are unclear to what I
       am talking about:

       int main(void)
       {
         int a[5] = {1,2,3,4,5};
         int b[5];

         /* Then some code to copy the contents */
         /* of array a into b. */

         b = a;  /* I think this would work with Pascal, */
                 /* but this doesn't work for C. */
         .
         .
         .
         return 0;
        }

        I hope that this makes it clear.

Newsgroups: comp.lang.c
From: hermann@uran.informatik.uni-bonn.de (Hermann Stamm)
Subject: C-formattors (problems with very long lines)
Reply-To: hermann@uran.informatik.uni-bonn.de (Hermann Stamm)
Organization: Praktische Informatik III
Date: Tue, 29 Sep 1992 07:38:35 GMT


Hello all!

I am programming a big project implementing polymorphism
and (upgradable) generic data-types in ANSI-C.

For this reason I have to make very intensive Use of
the C-Preprocessor. For example see the little Macro-call

   DEF_graph(int,bool)

which introduces the datatype "graph" with vertex-information
of type "int" and edge-information of type "bool" with
about 40 functions (methods) working on (new_vertex, sort_edges, ...)
and many algorithms (DFS, BFS, CONNECTED_COMPONENTS, ...).

The problem now is, that this macro expands to roughly 80.000
bytes of ASCII-Text, and by the nature of macro-replacement,
this is a single logical line. It works fine, but when debugging
I need to work on the preprocessed text, and this is not very 
easy to read because of such long lines.

I tried to use "indent" and "cb" on the preprocessed text,
but got errors, because both programs produced the following
ugly result:

  .....   XYZ->ABC ......

was transformed to

 .... XYZ-
>ABC ....

This results in a compiler-error.
I wrote my own simple "C-beautifier", which simply does the
following:

   - discard empty lines
   - insert a '\n' after each ';' found

This works fine, but now I have 2 questions:

  1. Is this a correct transformation of any C-Source ?

  2. Is there a beautifier available working correct even
     on very long Source-lines ?


Thanks in advance,

   Hermann.
From: Michael_Pizolato@afs.com (Michael Pizolato)
Newsgroups: comp.lang.objective-c
Subject: Re: NO NUMBERS! (or even SHORT INTS!)
Date: 29 Sep 92 13:33:20 GMT
Reply-To: Michael_Pizolato@afs.com

In article <1992Sep28.003421.1246@RedBrick.COM> jfr@RedBrick.COM () writes:
>The problem I started thinking about is WHY IN THE WORLD WOULD ANYONE
>USE SHORT INTS IN A PROGRAM, particularly one done for a workstation-level
>machine (i.e., large memory model, etc).  I can see the need for memory
>conservation to some degree, but certainly there is no performance
>benefit on most machines today (there may even be a performance penalty

Well, there are really several reasons...

Oh, but of course you were kidding!  Never mind.

Michael

--
Michael_Pizolato@afs.com
~18 kyu
Q16
NeXTMail appreciated
Organization: Penn State University
Date: Mon, 5 Oct 1992 10:53:04 EDT
From: <MKK2@psuvm.psu.edu>
Newsgroups: comp.lang.objective-c
Subject: Class Library Contents

When you buy or download a good Objective-C compiler, you naturally hope that
it will come with a good class library that will help you get your projects
going with the minimum of muss and fuss.

   What classes would you hope to see?  Set, Bag, Stack, Collection, Vector,
Matrix, SerialPort, RawDisk, etc etc etc??

   What class libraries do you use?  What's good about them?  What's bad
about them?

No email, please.  I am trying to get some public discussion going on this
important subject.

         REMEMBER:  Reduce, Reuse, Recycle 8-)
Newsgroups: comp.lang.objective-c