HDTenEightyP/NetNews huggingface dataset:
From: cp01395@dcsc.dla.mil (Duane L. Rezac)
Newsgroups: comp.lang.c
Subject: Re: TC++ 1.0 spawn() question.
Date: 13 Oct 92 12:37:57 GMT
Organization: Defense Construction Supply Center, Columbus

From article <nhu1H8ug2a@atlantis.psu.edu>, by newton@wilbur.psu.edu (Cynthia Newton):
> 
> If I want to spawn a process using spawn, it only works if the file name
> is in DOS's PATH variable. How can I explicitely give the location of a
> file? e.g.
> 
> spawnvp(P_WAIT,"test.exe",NULL); <-works if the location is in PATH
> spawnvp(P_WAIT,"C:\TEST\TEST.EXE",NULL) <-does not work, perror says
> no such file or directory.
> 
> I'm using TC++ 1.0.
> 
> THANKS.
I think that you also have to give the files's name in argv[0] -

spawnvp(P_WAIT,"C:\test\test.exe","c:\test\test.exe",NULL);

I had to do this for spawnl.






Duane L. Rezac
-- 
+-----------------------+---------------------------------------------------+
| Duane L. Rezac |These views are my own, and NOT representitive of my place|
|    drezac@dcsc.dla.mil                                  of Employment.    |
+-----------------------+---------------------------------------------------+
From: mike@pacsoft.com (Mike Stefanik)
Newsgroups: comp.lang.c
Subject: Re: Strings and integer sizes
Date: 8 Oct 92 17:54:45 GMT
Organization: Pacific Software Group, Riverside, CA

In article <3568@carrousel.and.nl> jos@and.nl (Jos Horsmeier) writes:
>So, I agree that a sequence of bytes '1', '2', '3', without a terminating
>zero-valued byte does _not_ conform to the conceptual string type, but 
>I disagree that char zoe[3] = "123"; would be an erroneous initializer.

This *is* an erroneous initializer because you are initializing a three-
character array with four characters. The side effects can be subtle; for
example, consider the following program:

    #include <stdio.h>
    
    char foo[3] = "foo";
    char bar[3] = "bar";
    
    main()
    {
        printf("%s is %d characters\n", foo, strlen(foo));
	return 0;
    }

On my system (UNIX, GCC compiler) this produces "foobar is 6 characters".
On your box, it may cause a core dump, or (worst case) appear to act correctly
even when memory is being inappropriately stomped upon.
-- 
Mike Stefanik  mike@pacsoft.com  ...!uunet!pacsoft!mike  (714) 681-2623
Pacific Software Group, Riverside, CA
Newsgroups: comp.lang.c,comp.lang.fortran,comp.lang.pascal,sci.math.num-analysi
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: Numerical Analysis on a PC-languages?
Organization: Queen's University
Date: Thu, 15 Oct 1992 15:51:36 GMT

In article <1992Oct14.234123.14543@draco.macsch.com> dnl@convex.is.macsch.com (David Lombard) writes:
>
>I'd be willing to do certain (read context dependent) numerical work in C.
>
>YOU WOULD HAVE TO BE INCREDIBLY MASOCHISTIC TO DO ANY MANNER OF NUMERICAL
>WORK IN PASCAL.

That may be true, but Turbo Pascal is a much better platform than standard 
Pascal, and I do numerical work in it all the time.  I've never used C for 
this, but I know that the richer data structures of TP would make it very 
difficult to port what I've written to C; I'd have to go to C++.  I think 
Fortran 77 suffers the same problems as plain C, only more so:  data 
structures are very limited.  I've never taken a close look at Fortran 90, 
not having a compiler for it available.

There are two main disadvantages to TP.  The first is that it's weaker than 
Fortran at handling arrays.  The second is that it's difficult to link in 
foreign code.  The poor optimization of Borland TP is not a problem; you 
can buy an optimizing compiler from Stony Brook.  The total price of TP plus 
SBP+ is $350, i.e. about what a good Fortran compiler costs, but you get a 
much  better language.


Duncan Murdoch
dmurdoch@mast.queensu.ca
From: bobe@tvnews.tv.tek.com (Bob Elkind)
Newsgroups: comp.lang.c,comp.lang.c++,comp.os.msdos.apps,comp.os.msdos.programmer
Subject: Re: A few glitches in Borland C++ 3.1
Date: 13 Oct 92 15:42:40 GMT
Organization: Tektronix TV Measurement Systems, Beaverton, OR

The trident BBS has two new sets of video drivers for Windows 3.1.  One set
is a 2nd release, dated 23-June-92.  The other set is a beta release dated
25-Sept-92.  Usually their drivers are posted on Compuserve WINADV forum.

The  trident BBS can be reached at 415 691-1016.

Bob Elkind
Tektronix TV Products
bobe@tv.tv.tek.com
Newsgroups: comp.lang.c
From: byron@cc.gatech.edu (Byron A Jeff)
Subject: Re: "Illegal Pointer Arithmetic" error
Reply-To: byron@cc.gatech.edu (Byron A Jeff)
Organization: Georgia Institute of Technology
Distribution: usa
Date: Fri, 9 Oct 1992 15:28:36 GMT

In article <30SEP199207430542@accvio.intel.com> dmills@accvio.intel.com (Dave Mills) writes:
>In article <6518@blue.cis.pitt.edu.UUCP>, willdm+@pitt.edu (William D Moore) writes...
>>Can anyone tell me why I get the compile time error "Illegal Pointer 
>>Arithmetic" ... 
>
>>ParseCommand(buf,args)
>>char *buf;
>>char **args;
>>{
>>	while(buf!=NULL)
>>	{
>>		/*
>>		  Strip out the white space between each argument,
>>		  and insert a NULL termination at the end of each
>>		  argument instead.
>>		*/
>>		if(isspace(*buf))
>>		{
>>------------->	     *buf++=NULL;
>
>There's a difference (noted in the FAQ, I presume) between NULL and NUL.  Your
>"while(buf!=NULL)" refers correctly to a "NULL pointer".  "*buf++=NULL;",
>though doesn't make sense.  The NUL character (ASCII 0) is defined as NUL with
>one 'L', and that's what you want to stuff into buf. 

Dave I don't think that's the problem. The error is caused by a lack of spacing.
What William wants the code to do is:

   *buf++ = NULL;

However because of the spacing there is an ambigous arithmetic construct here.
The compiler is probably interpreting this as:

   *buf+ += NULL;

which is not only illegal arithmetic but also a syntax error. 

Note that if you don't provide sufficient whitespace in your programs that
sometimes the compiler will get confused. It also makes your code more readable.

BAJ
---
Another random extraction from the mental bit stream of...
Byron A. Jeff - PhD student operating in parallel!
Georgia Tech, Atlanta GA 30332   Internet: byron@cc.gatech.edu
From: hosken@spss.com (Bill Hosken)
Subject: Re: What is RPG ???
Organization: SPSS, Inc.
Date: Fri, 9 Oct 1992 19:35:28 GMT

In article <Oct06.213159.62770@yuma.ACNS.ColoState.EDU>, sgcraw@CS.ColoState.EDU (stewart crawford) 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 ?
> 
> 
> From the paucity of responses and the negative tone of those posted,
> please let me shed some light on this poor language based on my two
> years of programming with it...
> 
> TRUE, RPG was the first 4GL when it came to file processing.

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.

Bill.
From: murphy@npri6.npri.com (David P. Murphy)
Newsgroups: comp.lang.c
Subject: you probably already know this about prototypes
Keywords: prototypes obvious rtfm ansi_c
Date: 14 Oct 92 14:55:15 GMT
Distribution: world
Organization: NPRI, Alexandria VA

i always thought that prototypes were a Good Idea,
and that the proper method of creating a prototype was
to cut&paste the actual function declaration.

well, this worked fine under VAXC.  now that i'm trying to
get our software working on an ALPHA machine using DECC,
i'm finding a little tiny problem:  declaration a prototype
in the same module as that function may or may not be an error!
of course, it turned out that i was "doing something wrong",
so i am posting this to help others realize that creating
a valid prototype actually requires some thought.

here is the entire C file (no headers!)

        /* prototypes
         */
        long Blip(long a1, char a2, unsigned short a3, void *a4);
        long Blop(long a1, char a2, unsigned short a3, void *a4);

        /* new style of argument declaration, compiles okay
         */
        long Blip(long a1, char a2, unsigned short a3, void *a4)
        {
        	return(1);
        }

        /* old style of argument declaration, fails to compile
         */
        long Blop(a1, a2, a3, a4)
        long a1;
        char a2;
        unsigned short a3;
        void *a4;
        {
        	return(1);
        }

here is the output of the $ CC command, regardless of the /STANDARD= setting:

        long Blop(a1, a2, a3, a4)
        .....^
        %CC-E-DECINCREDEC, In this declaration, the type of Blop is not
        compatible with the types of previous declarations of Blop.
        at line number 16 in file DKA300:[MURPHY]Z.C;1

arrgh!  i requested enlightenment from DSN (a DEC support service);
and Jeff Marsh very kindly pointed out that i should have RTFM:

> The documentation is correct; you can mix prototypes with the "old style"
> of function definitions but it is a little trickier than I at first thought.
> The compilier is doing the right thing as specified by the ANSI C standard.
> The relevant section is 3.5.4.3, paragraph 6 of "semantics."
>
> What you have to make sure is that the datatypes of the arguments
> appearing in the prototype match the datatypes of the "old style" arguments
> *with the default argument promotion rules applied.*
> (Section 3.2 of the ANSI C standard covers conversions and promotions.)
>
> In your example, "char" is promoted to "int", and "unsigned short" is
> promoted to "int".  So if you change your prototype to:
>
>     long Blop(long theDate, int outdtp, int outlen, void *outval);
>
> then everything should work.

it does.  Live and Learn, i suppose  :-|
i'm gonna have to ask santa for a copy of the standard . . .

ok
dpm
-- 
murphy@npri6.npri.com 602 Cameron St. Alexandria, VA 22314 (703) 683-9090

              When every one is dead the Great Game is finished.  Not before.
                              --- Hurree Babu, "Kim"
From: herbst@seq.uncwil.edu (R.T. Herbst)
Subject: programmer productivity
Keywords: line productivity
Organization: Univ. of North Carolina @ Wilmington
Date: Sat, 10 Oct 1992 10:48:53 GMT


From concert!gatech!darwin.sura.net!zaphod.mps.ohio-state.edu!uwm.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!geoserv!rolf Sat Oct 10 06:25:31 EDT 1992
Article: 54418 of comp.lang.c
Newsgroups: comp.lang.c,comp.software-eng,comp.sys.mac.programmer
From: rolf@geoserv (Rolf Wilson)
Subject: Re: Productivity of a C programmer ?
Reply-To: rolf@geoserv.isgs.uiuc.edu
Organization: University of Illinois at Urbana
Date: Fri, 9 Oct 1992 21:33:38 GMT

mhughes@comtch.spk.wa.us (Mark Hughes) writes:

>cjh1@ellis.uchicago.edu (chi ju huang) writes:
>> 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."
>> 
>> What I need is the number (lines/day), the conditions and the assumptions
>> under which the number is derived, and the reliable source of this model.
> 
>  "There ain't no sech animal."  The number of lines per day a programmer 
>turns out can vary incredibly.  Much of the programmer's work is thinking 
>- and that reduces the number of lines, usually.  Other times, the 
>programmer will spew out a hundred or a thousand lines in a day.  One 
>good rule of thumb is that the time to program a project increases 
>geometrically with the size of the program, not linearly.  A small 
>program can be written in 15 minutes...  but a program 20 times larger 
>may take a month...  Etc.
> 
   I once spent a month improving and rewriting a 6000 line program.
When I was done it was 4000 lines long. Was my productivity negative?

>  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...
> 
  And then double it. Most programmers are pretty good at estimating
their programming time, but don't seem to realize that they may only
get half of their day to program in.
-- 
Rolf Wilson     Illinois State Geological Survey    rolf@geoserv.isgs.uiuc.edu

Counting lines of code is nonsense.
What is really desired on a daily or other basis is the answer to the
question
"What does the program do today( this month etc) 
that it did not do yesterday (last month etc)."
This requires that there exists a functional description of the program
either in a documentation file of in the head of the programmer.
For example:
/*Documentation
* 1. Read two character strings.
* 2. Compare the strings.
* 3. Display equal if the string are equal.
* 4. If not equal display the smaller the two strings.
*/
One can then associate the number of lines of code with each of the 
above functions and the overall time required to do the program.
In K&R first edition it is written " ... A program can be conidered to be
a sequence of functions ..."
The above program can be written using gets(), strcmp(), if(), and printf().
One could also write the program inventing the above functions in the
process. Using and reusing functions has to be more productive.
Counting lines of code is nonsense.
herbst@seq.uncwil.edu
From: jes@grendel.demon.co.uk (Jim Segrave)
Newsgroups: comp.lang.c
Subject: Re: Finding 0 bytes in a 32 bit word.
Date: 16 Oct 92 23:27:40 GMT
Organization: None
ReplyTo: jes@grendel.demon.co.uk
X-Mailer: cppnews $Revision: 1.18 $


In article <1992Oct15.192058.23768@inmet.camb.inmet.com> richw@sol.camb.inmet.com (Richard Wagner) writes:

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

But of course trying this could give you an exception if you have a memory
manager which can control access at the byte level, since you may read
up to 3 bytes off the end of a string, which could be at the end of your
memory space.

> 
--
Jim Segrave (Segrave Software Services)     jes@grendel.demon.co.uk
Newsgroups: comp.lang.c,comp.software-eng,comp.sys.mac.programmer
From: d88-jwa@alv.nada.kth.se (Jon Wtte)
Subject: Re: Productivity of a C programmer ?
Originator: d88-jwa@alv.nada.kth.se
Organization: Royal Institute of Technology, Stockholm, Sweden
	<qX3DsB2w165w@comtch.spk.wa.us>
Date: Fri, 9 Oct 1992 21:18:00 GMT

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

I'm sure you lost a zero there.

I was asked to make an estimate, I made it silently and spoke
twice the figure, and then we broke the budget by another
100%... (That was due to inexact and changing specs though)
Still made the product on record time, think nothing else :-)

There's a good book on these things, called "The Mythical Man-
Month"

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Suedoise (not french speaking) --

   What we need is a good GNU [...] licence manager implementation.
                     -- Raphael Manfredi
Newsgroups: comp.lang.c
From: enzler@gelag.ch (S.Enzler )
Subject: ANSI-C TO K&R-C
Organization: Grossenbacher Elektronik AG, Switzerland
Date: Tue, 13 Oct 1992 07:58:04 GMT

Hello,
i am looking for a program, that converts ANSI-C to K&R-C, especially function
prototyping and function declarations, because my sun cc accepts only K&R.

Thanks in advance     
                   Stephan Enzler
From: jos@and.nl (Jos Horsmeier)
Newsgroups: comp.lang.c
Subject: Re: Strings and integer sizes
Date: 10 Oct 92 12:08:41 GMT
Organization: AND Software BV Rotterdam

In article <1992Oct9.173755.18595@athena.mit.edu> scs@adam.mit.edu (Steve Summit) writes:
|In article <395@ulogic.UUCP>, hartman@ulogic.UUCP (Richard M. Hartman) writes:
|> In article <3568@carrousel.and.nl> jos@and.nl (Jos Horsmeier) writes:
|>> [quotes ANSI C Standard and, with copious explanations, concludes that]
|>> I disagree that char zoe[3] = "123"; would be an erroneous initializer.
|> 
|> It is erroneous.
|
|False, as Lars has already pointed out.  Jos was right to begin
|with:
|
|	zoe[3] = "123";
|
|is perfectly legal, although whether it's a good idea or not is
|an entirely different question.

[ the `final words' about character array initialization deleted ... ]

|	char a8[2] = "abc";
|
|(By the way, I can't prove that the definition of a8[] must
|elicit a diagnostic from a conforming compiler.  String literal
|initializers are not mentioned in section 3.5.7 Constraints, only
|in Semantics, where excess initializers are not mentioned.  It's
|not clear that a single character in a string literal identifier
|is formally an "initializer in an initializer list."  Someone
|could bring up this point in comp.std.c, if they wanted to.)

Well, since we started this discussion here, allow me to write some
last words about your a8[] example. This is definitely an error,
because ANSI-C 3.5.7 Initialization, reads:

Constraints

There shall be no more initializers in an initializer list than there
are objects to initialize.

[ end quote ]

Using a string literal as an initializer _is_ some sort of an exception
to the rule, and the terminating '\0' valued byte is in a tricky
position here: according to the `shall' clause, it's not supposed to be
there, but according to a rule in the same paragraph, this is allowed.
But not so for the character `c' in your example: it's not a '\0'
valued initializer and it's the _third_ initializer in the list, 
where just two where expected. I always look upon string literal init-
ializers as some sort of short-hand template that has to have the 
same size as the aggregate object being initialized, or at least:
has to _look_ the same size (or less) than the object.

kind regards,

Jos aka jos@and.nl
Newsgroups: comp.lang.c
From: blume@tyrolia.Princeton.EDU (Matthias Blume)
Subject: Re: Strings and integer sizes
Reply-To: blume@tyrolia.Princeton.EDU (Matthias Blume)
Organization: Dept. of Computer Science, Princeton University
Date: Wed, 7 Oct 1992 14:08:44 GMT

In article <718167097snx@grendel.demon.co.uk>, jes@grendel.demon.co.uk
(Jim Segrave) writes:
|> 
|> In article <9227705.8771@mulga.cs.mu.OZ.AU> fjh@munta.cs.mu.OZ.AU
(Fergus James HENDERSON) writes:
|> 
|> > 
|> > >Multiple choice question:
|> > >
|> > >A string is stored
|> > >	a. in an array of characters
|> > >	b. in an array of characters terminated with 0
|> > >	c. in an array of characters terminated with '\0'
|> > 
|> > Well, the answer is:
|> > 	d. all of the above
|> 
|> What about:
|> 
|> char zoe[3] = "123";
|> 
|> neither b. nor c. applies here.
|>  

Right, but this is *not* a string at all!  It's a character array together
with an initializer, which *looks* like a string.

-Matthias
From: jfc@nic.cerf.net (Co Ho)
Newsgroups: comp.lang.c
Subject: Q:What's the best way of keeping appointments in Calendar apps?
Date: 14 Oct 92 18:26:25 GMT
Organization: CERFnet

The program: a simple Appointment/Calendar program that support recurring
             appointments.

The scenario: Professor X. teaching a MWF class from 8-9am for next Spring
             (Jan-Jun 93).  He also on a committee that meet every third
             Wed. of the month at 8am for the entire 1993 year.

Questions: What's the best data structure and algorithm should I employ to
           manage his calendar book and give warning for his conflicting  
           appointments? 

           Is there any sources on the same kind of problem that you know of?

My works so far:

  Using simple structure to keep track of the appointment - for example:
the Wed. morning class at 8am - and the recuring frequency - 7 days in
this case.  The problem with this is I can not specify the recurring
frequency of the meeting in every third Wed. of the month.  If I use
another data element to keep track of that kind of frequency and then what
about appointments that repeat every two months, every year???
  
  More over, this simple data structure required Professor X. to set a
recurring appointment for his class on Mon, Wed, and Fri separately - but
in reality they are more or less the same kind, that he should be able to
specify as once.
  
  Please help me see some light in good software design practice here.

  Thank you.

PS: This is not a strictly C question - but since I implement it in C, I
am more or less posting it to this newsgroup.  (The truth is, good
programmers tend to hang out in this newsgroup more than the other.  I
also post similar questions to comp.programming and comp.sources.wanted
and have no result so far - so, please don't flame me!)

==========================================================================
Co Ho.    Software Development Coordinator for Fullerton Community College
jfc@nic.cerf.net                    (the oldest, still existing one in CA)
(714) 992-7274                     321 E. Chapman Ave., Fullerton CA 92632

"It would take some time to catch up with all of the Technology, but it
would take even more time to build up human relationship, which one would
you choose to invest your time in?"
==========================================================================
Newsgroups: comp.lang.c,alt.folklore.computers
From: peter@NeoSoft.com (Peter da Silva)
Subject: Re: What is RPG ???
Organization: NeoSoft Communications Services -- (713) 684-5900
Distribution: na
Date: Sun, 11 Oct 1992 23:16:18 GMT

RPG is sort of a batch spreadsheet. Imagine crossing COBOL and Lotus 1-2-3.

Which explains why it's so popular in accounting shops, of course...
-- 
Peter da Silva.  <peter@sugar.neosoft.com>.
 `-_-'   "Segodnja volka obnimal?"
  'U`  
Dette kan umulig vaere mitt rom, eftersom jeg ikke puster ammoniakk.
Newsgroups: comp.lang.c
From: cuffell@spot.Colorado.EDU (CUFFELL TIMOTHY MICH)
Subject: Re: lint
Organization: University of Colorado, Boulder
Date: Sat, 10 Oct 1992 05:00:47 GMT

While we're on the subject, does anyone know of a PD/shareware version of lint
for the MS-DOS platform?