HDTenEightyP/NetNews huggingface dataset:
From: swalter@nyx.cs.du.edu (DreamWeaver)
Subject: Re: [Stack Overflow] How do I find cause using Turbo Debugger?
Organization: University of Denver, Dept. of Math & Comp. Sci.
Date: Thu, 8 Oct 92 06:30:08 GMT


> If you also set the heap size, the data segment will be sized
> appropriately, so you won't have as much total space available.  
> But the 4K default "size" doesn't prevent your program from using 
> more space if it's available.

Granted ... but if it does "run off the end" and you don't have stack
checking on, then you end up playing in "uncharted territory".  that's all
I was implying.

-Scotty


Newsgroups: comp.lang.c
From: greyham@research.canon.oz.au (Graham Stoney)
Subject: Re: Productivity of a C programmer ?
Organization: Canon Information Systems Research Australia
Date: Tue, 13 Oct 1992 00:29:51 GMT

martinc@grover.cs.unc.edu (Charles R. Martin) writes:
>In article <qX3DsB2w165w@comtch.spk.wa.us> mhughes@comtch.spk.wa.us (Mark Hughes) writes:

>     The best thing to do is to ask a programmer to evaluate how long it 
>   will take a team to write your project, and then add 20% or so...

>... multiply by 2, and convert to the next highest unit.  (I.E., if the
>original estimate is 2 hours, make that 2.4 hours, 4.8 hours, and
>finally 4.8 days....)

... add the number you first thought of, and divide by your day of birth in
the month.

[Well, it's still probably better than an SLOC metric]

Greyham
From: jfc@nic.cerf.net (Co Ho)
Newsgroups: comp.lang.c
Subject: quoting of the Tao of Programming
Date: 14 Oct 92 17:30:37 GMT
Organization: CERFnet

I know that you are not supposed to post COPYRIGHTED material.  But would
it be ok to quote a segment (like a parable) from the book?

Thanks.

(I typed the whole thing up to made it wall paper in my office - that's
why I asked because on occasion, I have the urge to paste it right into
the conversation at hand...)

Newsgroups: comp.lang.c
From: int177c@aurora.cc.monash.edu.au (Jae J Won)
Subject: memory allocation in struct
Keywords: array, struct
Organization: Monash University, Melb., Australia.
Date: Wed, 14 Oct 1992 03:31:54 GMT

Hi,

I would dearly appreciate if someone could give me a quick advice with my prob
Please mail me if possible.
Here is the prob.:

typedef struct hmm {
	int value[100];
} HMM;

HMM a[10];

If I declare something like that, does it allocate memory for all of the
100 int's or just a pointer to value? I am having prob in that the stack allocation is going mad sometimes. I think it is because of above prob. If it doesn't
allocate all the 100 int's, then what should I do? Should I have a pointer
instead and personally malloc it and then access by the array method?
Thanks for any help.

Jae


Newsgroups: comp.lang.c
From: jes@grendel.demon.co.uk (Jim Segrave)
ReplyTo: jes@grendel.demon.co.uk
Subject: Re: NO NUMBERS! (or even SHORT INTS!)
Distribution: world
X-Mailer: cppnews $Revision: 1.18 $
Organization: None
Date: Sun, 4 Oct 1992 19:17:40 +0000


In article <mcdonald.355@aries.scs.uiuc.edu> mcdonald@aries.scs.uiuc.edu (J. D. McDonald) writes:
 
> OK look at this, which, like the nutation of the moon, is a better example:
> 
> #include <math.h>
> #include "astro.h"
> /* ....jupiter */
> p_jupiter (t, s, dml, ds, dm, da)
> double t, s;
> double *dml, *ds, *dm, *da;
> {
        ....
> 	*dml = (3.31364e-1-(1.0281e-2+4.692e-3*x1)*x1)*sx5+
> 	      (3.228e-3-(6.4436e-2-2.075e-3*x1)*x1)*cx5-
> 	      (3.083e-3+(2.75e-4-4.89e-4*x1)*x1)*s2x5+
> 	      2.472e-3*sx6+1.3619e-2*sx7+1.8472e-2*s2x7+6.717e-3*s3x7+
> 	      2.775e-3*s4x7+6.417e-3*s2x7*sx3+
> 	      (7.275e-3-1.253e-3*x1)*sx7*sx3+
> 	      2.439e-3*s3x7*sx3-(3.5681e-2+1.208e-3*x1)*sx7*cx3;
>         *dml += -3.767e-3*c2x7*sx3-(3.3839e-2+1.125e-3*x1)*cx7*sx3-
> 	      4.261e-3*s2x7*cx3+
> 	      (1.161e-3*x1-6.333e-3)*cx7*cx3+
> 	      2.178e-3*cx3-6.675e-3*c2x7*cx3-2.664e-3*c3x7*cx3-
> 	      2.572e-3*sx7*s2x3-3.567e-3*s2x7*s2x3+2.094e-3*cx7*c2x3+
> 	      3.342e-3*c2x7*c2x3;
         ... 
> Considering the name of the subroutine, you can guess pretty well what they 
> are for. They are the lowest terms in the series expansion for the orbit of 
> Jupiter. 
> 
> They come from a standard theory that is decades old. It is not going
> to change, ever. If, for some reason, such as a perturbing star passing
> nearby, the orbit changes, it's going to need a new theory.
> 
> Any names you give to these terms are going to be about as meaningful as
> the ones I have assigned to the temporary variables. Sure, I could
> assign more verbose names to those variables .... but who cares. The
> meaning of the variables in the subroutine parameters are indeed
> documented in the calling routine.
> 
> Oh yes. This is the **simplified** version. And there are several more 
> planets. We're talking about whole books of constants: Astronomical Formulae 
> for Calculators by Jean Meeus.  Richmond, Va., U.S.A., Willmann-Bell, 
> 1982 and Astronomy with your Personal Computer by Dr. Peter Duffett-
> Smith, Cambridge University Press, 1985. 
> 
> Frankly, I'm not worried about what to call them or that they are hard
> coded. I was **seriously** worried that they were wrong until I verified
> the output versus published values. If they are wrong, it is within
> the noise of my output and/or the published values are wrong too.

I agree that there is no benefit from inventing names for magic numbers
like these. I would simply want the program to comment the source of the
equations, and if possible include a few published values in the
comments which would allow me to check (if I had some reason to) that
the code actually produced the correct answers for the values quoted.

> 
> Doug McDonald
> 
> 
--
Jim Segrave (Segrave Software Services)     jes@grendel.demon.co.uk

Newsgroups: comp.lang.c
From: atbowler@thinkage.on.ca (Alan Bowler)
Subject: Re: What is RPG ???
Organization: /etc/organization
Date: Tue, 13 Oct 1992 22:07:01 GMT

In article <1992Oct9.193528.10564@spss.com> hosken@spss.com (Bill Hosken) writes:
>
>Calling RPG a 4GL is streching things a bit since it preceeded even
>2GL's.  RPG put into a program the features that originally were done
>with plug board wiring on tabulating machines.  The most widely
>used of these was the IBM 407 accounting machine.  With the
>right wiring of the plug board you could define breaks, subtotals,
>etc.  The people that did the plug board wiring found RPG a very
>natural step in migrating their applications to machines like the
>IBM 1401.
>

Finally, someone got the story right.   
Newsgroups: comp.lang.c,comp.software-eng,comp.sys.mac.programmer
From: cga66@cbnewse.cb.att.com (patrick.v.kauffold)
Subject: Re: Productivity of a C programmer ?
Organization: AT&T
Date: Fri, 9 Oct 1992 17:22:57 GMT

> Could any one show me the light on
> "Average productivity of a C programmer in today's industry in terms of
> number of lines of source code produced per day."

You will need to be very careful -- lots of the data you see is
derived by taking the total number of lines of code SLOC and dividing
by the total number of person-hours expended on the project, including
managers, clerks, whatever.  

You can find many "nominal" values, ranging from 1 SLOC/person/day
to 5 SLOC/person/day, in the literature (Boehm comes to mind).

IMHO, unless you have your own historical data on which to base
estimates, watch out.
Newsgroups: comp.lang.c
From: richw@sol.camb.inmet.com (Richard Wagner)
Subject: Re: Finding 0 bytes in a 32 bit word.
Organization: Intermetrics, Inc.
Date: Thu, 15 Oct 1992 19:20:58 GMT

In article <1992Oct15.150640.4822@cc.gatech.edu> byron@cc.gatech.edu (Byron A Jeff) writes:
>>  Along the same lines for findings the number of 1's I'd like to know if
>>  anyone has an efficient way of finding 0 bytes in a 32 bit word....
>>  It would greatly improve my string operations (concatenate, length, copy)
>>  if I could manipulate strings 4 bytes at a time....
>>
>>  I know that I can simply AND the bytes of the word together and a 0 result
>>  indicates a 0 within the word. But that'll take about the same amount of
>>  time as working with the individual bytes....


The 29000, a RISC chip made by Advanced Micro Devices, has an instruction that
does exactly what you want:  returns either a value of TRUE or FALSE in a
register depending on whether or not the source operand/register has any 0
bytes.  The instruction is provided specifically to support the kinds of fast
(0-terminated) string operations you're looking for.

Of course, that's not an answer to your question (unless you're running on a
29000).  I thought it might be interesting to know that, nevertheless:  it
makes me think that specific hardware support is needed and that there is no
target-independent way to do what you want quickly enough to make it worth the
bother.  I could be wrong...

Rich Wagner
Intermetrics, Inc.


Newsgroups: comp.lang.c
From: adam@microware.com (Adam Goldberg)
Subject: Re: MSC 6.0a internal error on TC code
Organization: Microware Systems Corp., Des Moines, Iowa
Date: Thu, 8 Oct 1992 13:43:02 GMT

zmahx11@ic.ac.uk (Arrigo G.B. Triulzi) writes:

>I recently bought the book "Advanced Graphics Programming in C and C++" and included with it was a set
>of disks with example source code. The author stated that the programs would compile (and were
>compiled) with TC 2.0 but they would work under MSC 6.0.
>Actually if you write a few "translations" of TC functions into MSC functions (e.g. clrscr()) most of the
>"simple" programs  work fine except one.
>On the function movedata() the MSC compiler (vers. 6.0a) comes up with an C1001 Internal Error, etc.
>Now, assuming the TC version works, why do I get an internal compiler error?
>(For people with the book: The file is msetjset.c showing the Mandelbrot to Julia set correspondence)
>A final point, there are no error messages until the C1001 line.

>Any pointers to valid solutions?

I've heard rumors of this happening before, and as I recall, a call was
made to Microsoft support:  their answer was something along the lines
of "either (a) Turn off optimization around that function, or (b) don't
do that".

It's an internal compiler error--hence a compiler bug.

-- 
Adam G.
adamg@microware.com, or ...!uunet!mcrware!adamg
The above is not to be construed in any way as the official or unofficial
statements of Microware, or any Microware employees.
Newsgroups: comp.lang.c
From: carlson@news.cis.ohio-state.edu (kurt carlson)
Subject: C with Modula-2 calls
Organization: The Ohio State University Department of Computer and Information Science
Date: Mon, 12 Oct 1992 19:08:36 GMT


Folks,

	I have a C program with calls to a Modula-2 library and
would like to know how to link the two together.

			Thanks In Advance,

			K.Carlson
Newsgroups: comp.lang.c
From: rwh@moose.cccs.umn.edu (RICHARD HOFFBECK)
Subject: Re: VCR+Plus code
News-Software: VAX/VMS VNEWS 1.41    
Reply-To: rwh@moose.cccs.umn.edu
Organization: Colon Cancer Control Study, University of Minnesota, Minneapolis
Date: Tue, 13 Oct 1992 19:31:00 GMT

In article <1992Oct13.153353.23310@mksol.dseg.ti.com>, tleck@mksol.dseg.ti.com (terrance l eck) writes:
> I'm not sure where to post this question so I'm trying here.
> Does anyone know how to translate VCR+Plus code. I would like to write
> a C program which will convert date, time, channel, and time length into
> the numeric code used by VCR+Plus. 
> Thanks,
> Terry 

These was a short note in sci.crypt a while back that the July issue of
Cryptologia (sp ?) had an article on how to work back from a given code
number to the time/date/channel values.  The poster said that the article
had all of the information necessary to throw together a routine to go
the other way and generate the code numbers for a given time/channel value.

Now all you have to do is find the journal.  The UofM dropped their
subscription last year :-(.

--rick

+-----------------------------------------------------------------+
| Richard Hoffbeck               INTERNET: rwh@moose.cccs.umn.edu |
| Colon Cancer Control Study     ATT     : (612) 627-4151         |
| University of Minnesota        CIS     : 72406,521              |
| Minneapolis, MN 55455                                           |
+-----------------------------------------------------------------+


Newsgroups: comp.lang.c
From: tim@shovel.Prime.COM (Tim Cantin)
Subject: Re: help needed with curses problem
Keywords: curses help
Organization: Prime Computer R&D
Date: Mon, 12 Oct 1992 13:24:26 GMT

> ...listing all of the curses functions I am using. This seems to
> indicate that the compiler is not able to find curses, even though I have 
> included the correct header file <curses.h> and compiled the program as follows:
>       cc -Xa -lcurses prog.c -o prog
> also tried cc -Xa -lcurses -ltermcap prog.c -o prog
>            cc -Xa -lcurses -ltermlib prog.c -o prog
>           cc -Xa -lcurses -ltermcap -ltermlib prog.c -o prog 
>           various combinations of the above with the same result.

The one you are concerned with here is -lcurses. Try typing this:

	ar t /usr/lib/libcurses.a

and see if all your unresolved functions are listed. If the file does not
exist that could be the problem, too. If you find libcurses.a somewhere
else, you can type:

	cc -Xa -Lsomewhereelse -lcurses prog.c -o prog

-- 
#include "stddisclaimer.h"
/* Tim Cantin          {uunet, csnet-relay}!primerd!tim || tim@s35.prime.com
   Prime Computer Inc. 10-21, 500 Old Conn. Path, Framingham, MA 01701 (USA) */
flames > /dev/null 2>&1
Newsgroups: comp.lang.c
From: alpha@waggen.twuug.com (Joe Wright)
Subject: No typedef
Organization: ALPHA, Box 68621, Va. Beach, VA 23455
X-Newsreader: TIN [version 1.1 PL6]
Date: Sun, 11 Oct 1992 19:26:57 GMT

My C compiler does not support typedef.  I emulate typedef like this:

#define nutyp struct nutyp
	nutyp {
		int ID;
		char Name[32];
	};

	nutyp Person, *PersPtr;

Is this 'as good as' a real typedef?  It seems to work here.
-- 
Joe Wright  alpha@waggen.twuug.com
Newsgroups: comp.lang.c
From: wkaufman@us.oracle.com (William Kaufman)
Subject: Re: struct/union
Keywords: struct
Organization: Oracle Corporation, Redwood Shores CA
Date: Thu, 15 Oct 1992 02:07:11 GMT
X-Disclaimer: This message was written by an unauthenticated user
              at Oracle Corporation.  The opinions expressed are those
              of the user and not necessarily those of Oracle.

In article <Bw3woA.1F8@ux1.cso.uiuc.edu> cs310as@ux1.cso.uiuc.edu (Tonya Yu) writes:
] Hi...
] I have a problem using pointer within in struct or at least i think that is 
] what the problem is.
] Is the following sturct declaration valid?

    Almost,...

]       typedef struct { int x;
]                        int y;
]                        FOO *junk_pointer; } FOO;

    The typedef isn't complete when the compiler hits the use of FOO in
the structure.  For self-referential structures, add a structure tag,
and use that in the declaration:

       typedef struct foo { int x;
                            int y;
                            struct foo *junk_pointer; } FOO;

    The other choice is to do the typedef first:

       typedef struct foo FOO;
       struct foo { int x;
                    int y;
                    FOO *junk_pointer; };

] I am getting an error message telling me to use union?

    This is, undoubtably, the most useless compiler error message I've
ever seen.

                                           -- Bill K.

Bill Kaufman               | "I mean ... it's not even been a two-and-two-make-
wkaufman@us.oracle.com     |  five sort of day, it's more like a two-and-two-
                           |  make ... *fish* ..."  -- "Cages", Dave McKean
Newsgroups: comp.lang.c
From: walduck@mpr.ca (Andrew Walduck)
Subject: Re: line number in C program
Organization: MPR Teltech Ltd., Burnaby, B.C., Canada
Date: Wed, 7 Oct 92 18:03:06 GMT

In article <1992Oct6.152949.12494@taumet.com> steve@taumet.com (Steve Clamage) writes:
>hm@cs.brown.edu (Harry Mamaysky) writes:
>
>
>>Is there a way for me to find out what line number is currently being
>>executed in a c program from within that program?
>
>>Will this method also work in C++?
>
>Here is a method portable across C and C++, which will display the
>source file name and the line number within that file where the
>statement appears.  __FILE__ and __LINE__ are predefined macros
>which are expanded at compile time.
>
>	printf("File %s, Line %ld\n", __FILE__, (long)__LINE__);
>
>Of course, you have to add the printf statements to your code.
>I have shown a cast to long and a "%ld" format, because the type
>of __LINE__ is not specified, and might be int or long depending
>on your implementation.
>
>Alternatively, you could have global variables which you set at
>strategic times to __FILE__ and/or __LINE__.
>-- 
>
>Steve Clamage, TauMetric Corp, steve@taumet.com
>Vice Chair, ANSI C++ Committee, X3J16

The slickest (and most portable) way to output __LINE__ 
involves using the preprocessor to stringize it.

Ie:
#define STR(x) VAL(x)
#define VAL(x) #x

printf("File %s, Line %s\n", __FILE__, STR(__LINE__));

But, we can now code this like:

printf("File " __FILE__ ", Line " STR(__LINE__) "\n");

and then...

fputs("File " __FILE__ ", Line " STR(__LINE__) "\n", stdout);

Andrew Walduck
P.S. The above is ANSI blessed, and should work on any ANSI compiler...

-- 
Andrew Walduck, MPR Canada, walduck@mprgate.mpr.ca
-------------------------------------------------------------------------------
(I hope someone will flatter me by using this as a .sig quote...)
 -- Reid Kneeland
From: gbrand@qualcom.qualcomm.com (Graham Brand)
Newsgroups: comp.lang.c
Subject: Problem with TC 2.0
Date: 16 Oct 92 00:31:04 GMT
Organization: Qualcomm, Inc., San Diego, CA

A simple question for the Turbo C wizards out there. I have a TC2.0
program which gives me a strange error. On compiling with the
default options, the linker gives me a strange error:
   _main not found in module C0S
or words to that effect. What is the cause and how do I fix it?

Cheers,
-Graham Brand (gbrand@qualcomm.com)
Newsgroups: comp.lang.c
From: farrell@fjord.reo.dec.com (John M. Farrell)
Subject: Typedefs or structs [was Re: Incomplete structure declarations: only within structs?]
Organization: Digital Equipment Corporation - UK Engineering
	<FARRELL.92Oct8114020@fjord.reo.dec.com>
	<1992Oct8.174425.16192@athena.mit.edu>
Date: Fri, 9 Oct 1992 13:05:41 GMT

>>>>> On 8 Oct 92 17:44:25 GMT, scs@adam.mit.edu (Steve Summit) said:

> ...I haven't found a way to forward reference a typedef in the same way.
> 
> In foo.h I have:
> 
>     typedef struct foo
>     {
>         size_t         len;
>         unsigned char *buf;
>     } FOO;
> 
> In bar.h I want:
> 
>     extern void bar (FOO *f);
> 
> And in bar.c:
> 
>     #include "bar.h"
>     #include "foo.h"
>     void bar (FOO *f)
>     {...
>

Steve> I'm not sure why people are so eager to define typedefs for structs.
Steve> It is, I suppose, a pattern followed by many textbook authors, and it
Steve> is also done automatically for you in C++.  However, if you insist on
Steve> defining typedefs for structures, you can run into several problems.

This supports the view that I am beginning to hold, that typedefs are not 
sufficiently well integrated with the rest of C to make them as usable as
plain old structs.

Do poeple agree that this is so, or is there some way to get around the
problem of incompleteley defined typedefs?

--
John M. Farrell                 | Internet: farrell@fjord.reo.dec.com
Digital Equipment Corporation   | 
P.O. Box 121                    | "One foot in the grave, 
Reading, RG1 0TU, UK.           |  and one foot on the pedal", TP     
Newsgroups: comp.lang.c
From: M14465@mwvm.mitre.org
Subject: Omission in previous message
Organization: The MITRE Corporation, McLean VA 22102
Date: Thu, 15 Oct 1992 11:51:01 GMT

Please use the signature line following this message to reply to my
previous mesage requesting help with Windows C and DLLs. Thanks!
(problems with making up the message).
 
Charlotte Wales, The MITRE Corporation
7525 Colshire Drive, McLean, VA 22102
phone: 703.883.7024 internet: charwing@mitre.org
Newsgroups: comp.lang.c,comp.lang.c++,comp.os.msdos.apps,comp.os.msdos.programmer
From: juphoff@zia.aoc.nrao.edu (The Road Warrior)
Subject: Re: A few glitches in Borland C++ 3.1
Organization: National Radio Astronomy Observatory, Socorro NM
Date: Thu, 8 Oct 92 21:12:17 GMT

In article <1992Oct4.173758.26139@ra.msstate.edu> cee1@ra.msstate.edu (Charles Evans) writes:
>First off, let me complement the work of those in Borland C++ 3.1 (AFX).
>Truly fine, indeed.  However, I have come across a few glitches (beyound the
>3 available patches) in BC++ 3.1
>
>1	When I run Turbo Profiler from Windows, it flips to DOS text, fine;
>	however, when I quit and it goes back to Windows all the graphics
>	are messed up and smeared. (I have a Trident 8900c if that helps.)
>	It's like Windows is not saving a copy of the graphics screen while
>	in DOS. 
>   ...
>	Anyone else had this 
>	problem with going to-and-from Turbo Profiler? Might it be a VESA
>	problem? It is running fine on my system (AMD386/40)

I've had the same problem from time to time (it comes and goes).  Running
a Gateway 386/33 w/ Diamond Speedstar card.  I'm curious as to how many
others have experienced this also. 

You mentioned 3 available patches...what are the patches?  (e-mail reply
would be much appreciated.)
-- 
Jeff Uphoff -- "Uppie"     |  The post office raises the price of stamps,
                           |  becomes a paying sponsor of the olympics,
juphoff@astro.phys.vt.edu  |  then purcahses ad time on tv to brag about it.
juphoff@zia.aoc.nrao.edu   |    Is this a great country or what?
Newsgroups: comp.lang.c,comp.lang.c++,comp.os.msdos.apps,comp.os.msdos.programmer
From: S.Culverhouse@lut.ac.uk
Subject: Re: A few glitches in Borland C++ 3.1
Reply-To: S.Culverhouse@lut.ac.uk (Simon C++)
Organization: Loughborough University, UK.
Date: Fri, 9 Oct 92 08:49:04 GMT

In article <1992Oct8.211217.17208@zia.aoc.nrao.edu> juphoff@zia.aoc.nrao.edu (The Road Warrior) writes:
>In article <1992Oct4.173758.26139@ra.msstate.edu> cee1@ra.msstate.edu (Charles Evans) writes:
>>First off, let me complement the work of those in Borland C++ 3.1 (AFX).
>>Truly fine, indeed.  However, I have come across a few glitches (beyound the
>>3 available patches) in BC++ 3.1
>>
>>1	When I run Turbo Profiler from Windows, it flips to DOS text, fine;
>>	however, when I quit and it goes back to Windows all the graphics
>>	are messed up and smeared. (I have a Trident 8900c if that helps.)
>>	It's like Windows is not saving a copy of the graphics screen while
>>	in DOS. 
>>   ...
>>	Anyone else had this 
>>	problem with going to-and-from Turbo Profiler? Might it be a VESA
>>	problem? It is running fine on my system (AMD386/40)
>

I also have a Trident and the same problem with the Profiler and the Debugger
for windows.  If I use the graphics drivers supplied with Windows than there is
no problem, but the Trident ones have a problem.  Does anybody know if Trident
have bought out a new version of the drivers for Windows 3.1 / BC++ 3.1.


BTW:  I fully agree, BC++ AFX 3.1 is a superb package, well worth the money
      spent on it.

----------------
   
   Simon C++ - Computing (Year 3)               Falkner Eggington Courts
                                                University of Technology
   Home System:   Hewlett Packard 9000/855      Loughborough
                  HP-UX,  Unix System V         LE 11  -  3HT 

   Mail address:  S.Culverhouse@uk.ac.lut       System name:  hpb
       or         culverho@uk.ac.lut.indigo     System name:  indigo

**************** Ich danke Ihnen fuer Ihre Aufmerksamkeit ! ********************