HDTenEightyP/NetNews huggingface dataset:
From: dboddy@pulsar.lrmsc.loral.com (Dave Boddy 5973)
Newsgroups: comp.lang.c
Subject: Re: Integter to ASCII conversions
Date: 28 Jan 93 19:28:12 GMT
Organization: Loral Rolm Mil-Spec Computers

In article <1993Jan28.152011.1308@uvm.edu> cblaise@moose.uvm.edu (Chris Blaise,Free Amy Fisher!) writes:
>
>	Anyone know of a library function to convert an integer
>to a string?  I've search high and low and am about to break
>down and write my own...
>
> Thanks
> TTYL
> Chris

You can use the sprintf function to do this i.e.

int  num;
char s[10];

num= 4;
sprintf(s,"%d",num);
/* s now has the ascii equivalent of num */


-- 
-----------------------------------------------------------------------------------
Hey! They're lighting their arrows!...Can they DO that?   (Gary Larson)
DoD # 0677   (408) 432-5973  dboddy@pulsar.lrmsc.loral.com
Newsgroups: comp.lang.c,comp.sys.hp,comp.sys.sgi,comp.benchmarks,comp.software-eng
From: wynn@cms-stl.com (Tim Wynn)
Subject: Tools for determining "code coverage"?
Followup-To: comp.software-eng
Organization: Computerized Medical Systems, Inc.
Date: Wed, 27 Jan 1993 21:53:07 GMT


We are developing software on HP and SGI workstations in C under X 
and UNIX. As part of our software testing effort, we are required to 
show the total number of lines of source code covered by the final 
acceptance test.   This does not mean we are looking for a 
tool to count source lines; we are lloking for a tool which will
tell us the number of source line which were executed during a
particular run.  We would appreciate any information about automated 
tools to accomplish this.
From: hartman@ulogic.UUCP (Richard M. Hartman)
Newsgroups: comp.lang.c
Subject: Re: Conversion of BASIC c
Date: 25 Jan 93 13:26:54 GMT
Organization: negligable

In article <11434.107.uupcb@cutting.hou.tx.us> david.brooks@cutting.hou.tx.us (David Brooks) writes:
|RMH> I am tired of hearing this!  I don't care what they claim, but that
|RMH> new language with functions, subroutines, etc is NOT BASIC!  They've
|RMH> reinvented Algol or Pascal, or something, but >BASIC< is the language
|RMH> with numbers on every line that you find on C64, Atari 800 and old
|RMH> Apples.
|RMH> You know, the one that already has billions of variants even before
|RMH> trying to bring in an entirely new structured language and giving it
|RMH> the same name?  To call the new language by the same name is a
|RMH> disservice
|RMH> to everyone still making use of the real one.
|
|RMH>                -Richard Hartman
|RMH>                hartman@uLogic.COM
|
|   What should we call a language that will compile old BASIC code and yet
|adds functions, subroutines, etc., which still looks a lot like BASIC but
|with added flexibility? How about BASIC++ ? =)

Facetious though you may have been, that's not a half bad suggestion.
At least it would imply that the language has been changed. 

Try this: If C++ had been released without a name change (still 
called "C") what would the reaction have been?



		-Richard Hartman
		hartman@ulogic.COM

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"Smoke me a kipper, I'll be back for breakfast!"		-"Ace" Rimmer
From: volpe@bart.NoSubdomain.NoDomain (Christopher R Volpe)
Newsgroups: comp.lang.c
Subject: Re:  can a pointer cast to a void* be compared to (void*)0 ?
Date: 22 Jan 93 15:44:22 GMT
Reply-To: volpe@ausable.crd.ge.com
Organization: GE Corporate Research & Development

In article <alien.02pi@acheron.amigans.gen.nz>, alien@acheron.amigans.gen.nz (Ross Smith) writes:
|> 
|> Sorry, you've got it backwards. (The FAQ explains this in all its gory
|> detail :-)
|> 
|> A null pointer is required to remain a null pointer when cast to any other
|> pointer type (except function pointers, which are a special case), and the
|> integer zero and any null pointer are required to cast to to each other
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Wrong. You cannot cast an int variable (which happens to contain the value
zero) to a pointer type and expect to get a NULL pointer. Only an
"integral constant expression having the value zero" can be so cast.

-Chris

-- 
==================
Chris Volpe
G.E. Corporate R&D
volpecr@crd.ge.com
Newsgroups: comp.lang.c
From: gilmour@binah.cc.brandeis.edu (Jeffrey R. Gilmour)
Subject: Turbo C FOPEN error
Reply-To: gilmour@binah.cc.brandeis.edu
Organization: Brandeis University
Date: Wed, 27 Jan 1993 05:36:43 GMT

I can't figure out what's wrong.  This program works fine as long as there's
less than 16 files (it doesn't actually matter what drive).  I haven't come
across anything explaining it in the manual.  The error happens at runtime 
during the 'stream = fopen(name...' line.  Anybody?

/*
**      FOPENERR.C
*/
 
#include "stdio.h"
#include "io.h"
#include "dos.h"
 
void main(void)
{
        int done;
        char name[15];
        struct find_t test;
        struct ftime ft;
        FILE *stream;
 
        done = _dos_findfirst("a:*.*", _A_NORMAL, &test);
        while (!done) {
                strcpy(name, "a:");
                strcat(name, test.name);
                if ((stream = fopen(name, "r")) == NULL) {
                        printf("Error in opening filename.\n");
                        exit (1);
                }
 
                getftime(fileno(stream), &ft);
                printf("%-16s%7lu\t%2u/%02u/%u\n", name,
                        test.size, ft.ft_month,
                        ft.ft_day, ft.ft_year+1980);
                done = _dos_findnext(&test);
        }
        fclose(stream);
}

___________________________________ 
|__/~~~~~\__/~~~~\__/~~~~\__/~~~~\_|/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
|____/~\____/~\_____/~\_____/~\____|\                                          /
|____/~\____/~~~\___/~~~\___/~~~\__|/   T h i s   S p a c e   f o r   R e n t  \
|____/~\____/~\_____/~\_____/~\____|\                                          /
|__/~~~\____/~~~~\__/~\_____/~\____|/       GILMOUR@BINAH.CC.BRANDEIS.EDU      \
|__________________________________|\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Newsgroups: comp.lang.c
From: rob@zorro.cecer.army.mil (Rob Knauerhase)
Subject: long long and preproccessing
Organization: US Army Corps of Engineers Construction Engineering Research Labs
Date: Fri, 22 Jan 1993 21:17:20 GMT

We have a question about "long long".  The following program (x.c):

#define HUGE long
typedef	long		HIST;
main()
{
	HIST HUGE x;
}

compiles and runs with cc on a Sparc/SunOS.  It does not on an Intergraph
using their "acc".

However, the following program (y.c):

main()
{
	long long x;
}

fails to compile on both Sun (using cc) and Intergraph.

Both compile with gcc on the Sun.

Any ideas why x.c works and y.c doesn't?

Rob (et al.)
--
Rob Knauerhase [rob@amber.cecer.army.mil]  Office of GRASS Integration
Construction Engineering Research Labs, US Army Corps of Engineers
"See, when the GOVERNMENT spends money, it creates jobs; whereas when the
 money is left in the hands of TAXPAYERS, God only knows what they do with it.
 Bake it into pies, probably.  Anything to avoid creating jobs." -- Dave Barry
From: dsallard@protocol.zycad.com (Dave Sallard - Protocol/Zycad)
Newsgroups: comp.lang.c
Subject: Re: Learning c++
Date: 28 Jan 1993 17:43:53 -0500
Organization: Protocol A Division of Zycad Corp
Distribution: world
NNTP-Posting-Host: badboy.protocol.zycad.com


In article <00966E60.98255E60@Msu.oscs.montana.edu>, gjb7307@Msu.oscs.montana.edu writes:
|> In article <1993Jan19.233110.2873@ringer.cs.utsa.edu>, pnarsipu@ringer.cs.utsa.edu (Praasad Y. Narsipur) writes:
|> >I want to C++ language. I`m a moderate C programmer.
|> >Suggest me book so that i can learn C++ programming.
|> >Some say that if he is a good programmer in C, then it is difficult
|> >to learn C++(rather shift over to C++)Is that true. Also tell me the
|> 
|>  not exactly, i think what you have heard is that it is difficult to
|>  go from structured programming to object-oriented programming simply
|>  because we try to impose limitations and look at future problems when
|>  we should be focusing on the NOW.  The limitations and future problems
|>  usually turn out not to exist.
|> 
|> >difference between Borland C++ and Turbo C++. I'm confused by this.
|> 
|>  _Currently_, Borland C++ is the DOS environment, whereas Turbo C++ is
|>  the Windows environment.
|> 

Actually, if I have it correct, Borland C++ is a larger version of the C++ implementation which include
a lot of additional material in terms of manuals and example code.  I believe it
also includes the Turbo Assembler and Debugger setups as well.  The Turbo C++ only
includes the IDE (Integrated Development Environment).  Both can be had for the
DOS environment or the Windows environment.

I have the Borland C++ with application development (Retail $795, upgrade $199, --
I couldn't resist!)

|> >Please let me know about this. Thanks in advance.
|> 
|> 
Xref: sparky comp.lang.c:20141 comp.robotics:3034 gnu.gcc.help:3016
From: tch@cis.ksu.edu (Thomas C Hampton )
Newsgroups: comp.lang.c,comp.robotics,gnu.gcc.help
Subject: Looking for a backend to gcc for M68HC16...
Date: 24 Jan 1993 17:37:00 GMT
Organization: Kansas State University, Dept. of Computing and Information Sciences
Distribution: world
NNTP-Posting-Host: cygnus.cis.ksu.edu

The subject really says it all.  I would like to be able to cross
compile to the 68hc16 using gcc, but I need a backend to gcc for the
hc16. 

Thanks.
--
Tom C Hampton			    College of Engineering
Kansas State University		      Compter Science
NASA Mobile Robotics Research Group   Electrical and Computer Engineering
	"When we are invited to live on this earth, there is no reason
	 we should not visit the basement."
					-Jaques Cousteau
From: scjones@thor.sdrc.com (Larry Jones)
Newsgroups: comp.lang.c
Subject: Re: Preprocessor question
Date: 28 Jan 93 14:59:46 GMT

In article <1099@quirm.terminus.ericsson.se>, srl@terminus.ericsson.se (Steve Langstaff) writes:
> In article 1k44lqINNjr3@rs2.hrz.th-darmstadt.de, misar@rbg.informatik.th-darmstadt.de (Walter Misar) writes:
> : #define stringify(x) #x
> : #define str_exp(x) stringify(x)		/* this extra level IS necessary */
> : static char *junk = str_exp(JUNK) "ways ....";
> 
> Why is the extra level necessary?

Because stringify produces a string containing the actual argument
*without* expanding any macros it contains; if you want the macros
expanded, then you have to use another level of macro.  This allows you
to get either the expanded value like you want above, or the unexpanded
value like you want for doing things like:

	#define debug_val(i) printf(stringify(i) " = %d\n", i)
	...
	debug_val(JUNK);

to get the output:

	JUNK = 50
----
Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH  45150-2789  513-576-2070
larry.jones@sdrc.com
These pictures will remind us of more than we want to remember.
-- Calvin's Mom
Newsgroups: comp.lang.c,comp.lang.fortran,sci.engr.mech
From: gliran@.ic.ac.uk (Mr G. Liran)
Subject: Re: Bilinear Interpolation ...
Organization: Imperial College
Date: Wed, 27 Jan 93 17:32:36 GMT

Hi,
	I am a student of Aeronautical Engineering and I need to write
a quick subroutine to do Bilinear Interpolation.  I have no idea how to 
do this and would greatly appreciate some help via e-mail or by post ...

gliran@ic.ac.uk
					| |
			             --=oOo=--
				"Always check Six ..."
From: misar@rbg.informatik.th-darmstadt.de (Walter Misar)
Newsgroups: comp.lang.c
Subject: Re: Unwanted float to double conversion in variable length arg lists?
Date: 22 Jan 1993 15:43:12 GMT
Organization: TH Darmstadt
Distribution: world
NNTP-Posting-Host: rbhp65.rbg.informatik.th-darmstadt.de

In article <C18924.2yp@inews.Intel.COM>, dmarer@td2cad.intel.com (Dennis Marer) writes:
> I've got a curious problem when passing floats in a variable length argument
> list...they are automatically converted to doubles, EVEN when I typecast.

[....]

> I have explicitly typecast a real number to (float), and it still ends 
> up on the stack as a double!  This is the same on various compilers,
> including Gnu C and IBM C for the AIX operating system.  This seems incorrect
> to me, and I'm afraid that if I assume it how things are supposed to be
> implemented, I'll have portability problems.
> 
> Is this correct? Are all ANSI C compilers implemented this way?  --> Why?

If there's no prototype, or in a variable length argument list, chars and
shorts get converted to int, and floats to double. This behavior is correct
ANSI. Why is it done this way ? Cause it's the way pre-ANSI compilers did
it. This was implemented this way, so you hadn't to typecast all arguments
to int, when calling a function that expected ints. Normally an ANSI compiler
does this real nice, if you use prototypes, but it has to fail in variable
length arguments. 

-- 
Walter Misar                                | It is impossible to enjoy
misar@rbg.informatik.th-darmstadt.de        | idling thoroughly unless
                                            | one has plenty of work to do.
From: kdq@quest.UUCP (Kevin D. Quitt)
Newsgroups: comp.lang.c
Subject: Re: offsetof in case labels
Date: Mon, 25 Jan 93 16:43:27 PST
Reply-To: srhqla!quest!kdq
Organization: Job quest  (805) 251-8210,  So Cal: (800) 400-8210

roberts@g2syd.genasys.com.au (Robert Swan) writes:

> We have a problem on various machines using the offsetof macro from
> stddef.h in case labels.  These machines all reject the expression as
> being non-constant.
> 
> A representative of one of the machine vendors (IBM), has glibly stated
> that the compiler is doing the right thing by rejecting it.  He has
> quoted the ANSI standard arguing (in fairly obscure terms) that the
> compiler is free to treat various pointer expressions as non constant.
...
> Should offsetof be usable in case labels?

    Yes.  From ANSI (not ISO) 4.1.5 (_word_ is an italic word):

Common Definitions <stddef.h>

The following types and macros are defined in the standard header
<stddef.h>...
The macros are NULL which expands to an implementation-defined null
pointer constant, and offsetof( _type_, _member-expression_ ) which
expands to an integral constant expression that has size size_t, the
value of which is the offset in bytes, to the structure member
(designated by _member-expression_), from the beginning of its
structure (designated by _type_).  The _member-designator_ shall be
such that given

static _type_ t;

then the expression &(t._member-expression_) evaluates to a address
constant.  (If the specified member is a bit-field, the behaviour is
undefined).


    So, unless you're using a bit-field member, it's gotta work.


 _
Kevin D. Quitt      96.37% of all statistics are made up.     srhqla!quest!kdq
From: tacchi@ccu.umanitoba.ca (Mark G. Tacchi)
Newsgroups: comp.lang.objective-c
Subject: Re: Any books or FAQ?
Date: 25 Jan 93 22:38:29 GMT
Organization: University of Manitoba, Winnipeg, Canada

In <mcampbel.727987864@eola.cs.ucf.edu> mcampbel@cs.ucf.edu (Mike Campbell ) writes:

>Is there a FAQ for this group?  If so, where?  Lacking that, can anyone
>recommend any books for this language?

If you are looking for a good intro book, try 'An Introduction to Object
Oriented Programming' written by Budd.  It is a blue hardcover with a picture
of a platypus.  I thought it was good reading, maybe you will too.


-Mark



-- 
Mark G. Tacchi                                    tacchi@next01.cc.umanitoba.ca
  Unix Support Group                                        (NeXT Mail Welcome)
  University of Manitoba Computer Services
 "My opinions are my own, and do not necessarily reflect those of my employer."
Newsgroups: comp.lang.objective-c
From: Hans.Becker@infolog.se (Hans Becker)
Subject: Re: why no class variables?
Organization: Infologics AB, Sollentuna, Sweden
Date: Mon, 25 Jan 1993 14:20:43 GMT

In article <30@seltd.UUCP> lerman@seltd.UUCP (Kenneth Lerman) writes:
> Note that the semantics of the above proposal differ from the simple
> use of static variables in that every subclass has its own private
> copy of the class variables of each of its superclasses.  It is a pain
> in the neck to implement this functionality using other mechanisms.


I agree. Class variables are necessary in many applications. Static 
variables solve some problems, but they are not a good substitute for 
class variables. The proposed syntax seems to be ok.

Hans Becker, Infologics AB, 
BOX 91, S-191 22 Sollentuna, Sweden
Phone +46-8-922044
Hans.Becker@infolog.se
Newsgroups: comp.lang.objective-c
From: wave@media.mit.edu (Michael B. Johnson)
Subject: why no class variables?
Organization: MIT Media Laboratory
Date: Fri, 22 Jan 1993 13:38:37 GMT

Hi folks.  For a project I've been doing for some time now, I need to keep
some state info in the Class of a given object.  I'm annoyed by the fact
that I can't add instance variables to a Class object, and have to "simulate"
them with static variables.  Off the top of my head, I don't understand this
restriction.  Can someone out there convince me that this is a necessary 
and proper restriction?

For those who care, the situation for where I need them is that I have a set
of classes which, at run-time, start up companion processes on other machines.
The machines that could run a given class are queried when the class is
+initialize'ed, and then when an instance of that class is requested, that
list is queried to find the best host at that time to run the new instance
on.  I need to keep this list of possibleHosts somewhere, and it seems 
appropriate to make it a class instance variable, but as far as I can tell,
there's now way in ObjC to do this.  Pleae correct me if I'm wrong...


-- 

-->  Michael B. Johnson
-->  MIT Media Lab      --  Computer Graphics & Animation Group
-->  (617) 253-0663     --  wave@media-lab.media.mit.edu
From: mcampbel@cs.ucf.edu (Mike Campbell )
Subject: Any books or FAQ?
Organization: University of Central Florida
Distribution: comp
Date: Mon, 25 Jan 1993 18:51:04 GMT

Is there a FAQ for this group?  If so, where?  Lacking that, can anyone
recommend any books for this language?

(And here I thought this group was dead..... 2 messages in 3 weeks <g>)
From: jack@richsun.cpg.trs.reuter.com (Jack Gidding)
Newsgroups: comp.lang.objective-c
Subject: Re: why no class variables?
Date: 25 Jan 93 15:26:36 GMT

In article <1993Jan22.133837.13502@news.media.mit.edu>  
wave@media.mit.edu (Michael B. Johnson) writes:
> Hi folks.  For a project I've been doing for some time now, I need  
to keep
> some state info in the Class of a given object.  I'm annoyed by the  
fact
> that I can't add instance variables to a Class object, and have to  
"simulate"
> them with static variables.  Off the top of my head, I don't  
understand this
> restriction.  Can someone out there convince me that this is a  
necessary 
> and proper restriction?
> 


I wholeheartedly agree! I think that these are necessary as well.  
Class variables are important for doing things exactly as you  
mentioned. 

I have the same problem. I set up some initialization for a class  
when the first one is created. By faking the class variables with  
static variables means that I have to restrict my subclassing. Grrr.

For me, I need the static variables for time optimization. I look up  
function references and store them. Its a long story, but its a  
necessary optimization in our real-time system.

---
Jack Gidding    Sr. Development Engineer   
Reuters         1400 Kensington Road   Oak Brook,IL 60521

jack@richsun.cpg.trs.reuter.com        NeXT mail welcome!
-----------------------------------------------------------
"Credit is a euphemism for debt."      - Billy McKenzie




Newsgroups: comp.lang.postscript
From: david@oahu.cs.ucla.edu (David Dantowitz)
Subject: Re: Is there a PostScript Code Beautifier?
Organization: UCLA, Computer Science Department
Date: Tue, 26 Jan 93 00:00:59 GMT


Check the Adobe file server for ps format.  It works great for most
code.  I've used it for years.  It had one bug last I checked in
handling long lines.

David
-- 
David Dantowitz
david@cs.ucla.edu

Singing Barbershop when I'm not doing parallel simulation
Newsgroups: comp.lang.postscript
From: steveg@iplmail.orl.mmc.com (Steve Gabrilowitz)
Subject: Re: Selective Printing
Organization: Martin Marietta
Date: Fri, 22 Jan 1993 17:42:10 GMT

In article <1993Jan22.021050.10101@VFL.Paramax.COM>, wrp@pslsrv1.gvl.unisys.com (Bill Pringle) writes:
|> In article <1993Jan20.030501.13068@cucs5.cs.cuhk.hk> mklai@ie.cuhk.hk (Edmund M K Lai) writes:
|> >Are there any public domain software that allows the user to 
|> >print only selected pages from a large postscript file?
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|> You can try my pspages.  It will let you print any set of pages,
|> as well as even or odd.  It will also print them in reverse order
|> if you ask it nicely. :^)
|> ============================================================================

What platform is it for?  Where is it available?  Filename?

-- 



I think
I think I am
Therefore I am!
I think...



                            Steve Gabrilowitz
                            Martin Marietta, Orlando Fl.
                            steve-gabrilowitz@orl.mmc.com
                            Fidonet 1:363/1701 (407-380-1701)
From: gohel@zeus.csee.usf.edu (Himanshu Gohel)
Newsgroups: comp.lang.postscript
Subject: Re: PS for beginners
Keywords: PostScript by Example
Date: 19 Jan 93 04:24:24 GMT
Reply-To: gohel@csee.usf.edu
Followup-To: poster
Distribution: usa
Organization: U of South Florida, Dept. of Computer Science

I just started reading this newsgroup, so I don't know if the following
has already been pointed out.

"PostScript by Example" seemed to be a nice book that I saw in
the bookstore.  But it seems like if you wanted to learn in depth
programming, it would not be as useful as the red book/blue book
combination.

There was another book, I can't remember the exact name but it
was called Visual PostScript or something.  Quite good.

-- 
Himanshu Gohel, Gohel@csee.usf.edu
U of South Florida, Tampa, FL 33620-3140
Newsgroups: comp.lang.postscript
Subject: Display PostScript
From: dayne@cache.declab.usu.edu
Date: 22 Jan 93 14:46:07 MDT
Reply-To: dayne@cache.declab.usu.edu
Distribution: world
Organization: Digital Equipment Corporation
Keywords: display postscript, DPS, postscript

I would like to look into using display postscript on the DEC Station 5000 running Ultrix v.4.2.  I have located the include files and the libraries.  I own a NeXT and am used to making wraps of PostScript code, generating C files to use in my graphics programs.  Is there some way to do the same sort of thing on the DEC Stations.

Dayne Medlyn
dayne@cc.usu.edu
Newsgroups: comp.lang.postscript