HDTenEightyP/NetNews huggingface dataset:
From: jcv26@cas.org (Jon Vander Hill)
Subject: Seeking review of C/C++ debugging tools
Organization: Chemical Abstracts Service, Columbus, Ohio
Date: Thu, 17 Dec 1992 16:05:44 GMT

At one time in the recent past, I saw a post that was an 
independant comparative review of tools like dbx, CodeCenter,
Purify, Sentinal, and so on.  Of course, now, when that 
information is needed, I can't find it!  I'd greatly
appreciate it if some kind soul would forward this (or similar)
information to me by email.

Thanks!

Jon Vander Hill, System Engineer              Chemical Abstracts Service
internet: jon@cas.org (preferred)             P.O. Box 3012 (preferred)
          jon@cas.bitnet                      2540 Olentangy River Road
uucp:     uunet!osu-cis!chemabs!jon           Columbus, Ohio 43210
bitnet:   jon@CAS                             USA
phone:    (614) 447-3600


-- 
Jon Vander Hill
jon@cas.org
From: chelf@lunatix.uucp (Chad Helfenberger)
Newsgroups: comp.lang.c
Subject: Re: Turbo C with built-in assembler??????
Date: 17 Dec 92 16:04:48 GMT
Organization: Lexington Public Access Unix. -KY- (606) 255-9121

In article <BzE1tL.105@uxa.ecn.bgu.edu> msjle@uxa.ecn.bgu.edu (Joi L. Ellis) writes:
>
>The 'built in assembler' is *not* the same assembler as Tasm.  It takes
>either in-line code or source files with a different extension.  It also
>doesn't follow the same syntax rules, so it often won't compile a Tasm
>source.
>
>Tasm comes as part of Borland C, not Turbo C.  (*frown*)

No doubt.

>I've gathered from my reading of the manuals, that the
>built-in-assembler is not intended as a serious tool but a quick hack to
>be able to accomplish something that may not be easily accessible
>directly from C. 
>
>I'm still trying to get a copy of Tasm from my dealer, but the twit isn't
>returning my  calls.  Maybe it's not available separately?

I hope it is.  I seem to remember back in the v1 days, you could get it 
separately.  Maybe I'm wrong though.  I'm using masm now, and I despise that 
program.  Especially codeview.


-- 
Chad Helfenberger
(chelf@lunatix.uucp) 
Newsgroups: comp.lang.c
From: jim@edscom.demon.co.uk (Jim Thomas)
Subject: Re: SWITCH Statement Question
X-Disclaimer: #include <std/witty/disclaimer.h>
Reply-To: Jim Thomas <jthomas@edscom.demon.co.uk>
Organization: EDS-Scicon, Milton Keynes, UK
Distribution: usa
Date: Fri, 18 Dec 1992 12:57:35 GMT

>>>>> On 15 Dec 92 19:24:55 GMT, u-mwong%peruvian.cs.utah.edu@cs.utah.edu (Michael Wong) said:


>>    I have a question regarding the SWITCH statement in C.  I'm having
>> conflicting answers from people at work and need some help.  How does
>> the SWITCH statement process the CASE statements?  It's not clear to
>> me how it works internally.  The following example will help clarify
>> my question...

>>    Will using a SWITCH statement run faster if it had few CASE
>> statements and IF statements were used to aid in the processing than
>> using a SWITCH statement that had a very long list of CASE
>> statements.  In other words, compared to:

>> switch (key) { <50 CASE statements here> }

>> would this following code be faster, if the SWITCH was broken down
>> using IFs:

>> if (...)
>> {
>>   switch (key)
>>   {
>>     <10 CASE statements here>
>>   }
>> }
>> else if (...)
>> {
>>   switch (key)
>>   {
>>     <10 CASE statements here>
>>   }
>> }
>> else if (...)
>>   <more SWITCH statements>


>>    I'm worried about speed, but I also want to keep the code easy to
>> understand.  I'd appreciate if someone could tell me exactly how SWITCH
>> works internally!

This is all compiler specific. I use Microsoft C and it handles switch
statements very effeciently, building a combination of jumps and small
sparse jump tables as required by the kind of cases you use. 

I have found that unless you know a lot about how the compiler works it
is never a good idea to try and second guess it. If you add code to make
it more effecient you may make it harder for the compiler to optimise
your code.

If speed or size is a problem after implementation then maybe look at
stuff like this but otherwise try to make the code as readable as
possible.


--
Jim Thomas, EDS-Scicon Ltd,Wavendon,Wavendon Tower,Milton Keynes,MK17 8LX,UK
jim@edscom.demon.co.uk   Tel:  +44 908 284522
Opinions expressed are my own, and are not necessarily those of my employer.
Newsgroups: comp.lang.c
From: jar@solva.ifi.uio.no (Jo Are Rosland)
Subject: Re: What does the following pointer syntax mean...???
X-Md4-Signature: 85a7bad887e9df831992cc596a3996d0
Organization: Dept. of Informatics, University of Oslo, Norway
Date: Wed, 16 Dec 1992 14:57:10 GMT
Originator: jar@solva.ifi.uio.no

In article <BzC2B3.L6x@cs.uiuc.edu> ctaylor@cs.uiuc.edu (Conrad Taylor) writes:

       Could someone explain what the following pointer syntax
   is doing:

       *ptr = (*ptr)->link;
	      ^^^^^^^^^^^^
   ?  Thanks in advance to all that reply to this post.

ptr is a pointer to a pointer to a structure containing the field
"link".  It looks like this:

Before:

 ptr
+---+   +---+   +-----+   +-----+
| O-+-->| O-+-->|link-+-->|link |
+---+   +---+   |  :  |   |  :  |
                |  :  |   |  :  |
                |  :  |   |  :  |
                +-----+   +-----+

After:

 ptr          +--------------------+
+---+   +---+ | +-----+   +-----+  |
| O-+-->| O-+-+ |link-+-->|link |<-+
+---+   +---+   |  :  |   |  :  |
                |  :  |   |  :  |
                |  :  |   |  :  |
                +-----+   +-----+


Link is a pointer on to another instance of the same structure type.
The effect of your code is to update the anonymous pointer that ptr
points to, with the value of the link field in the structure.  This
probably has the effect of pointing this anonymous pointer to the
"next" element in a linked list.

This kind of code is useful inside a function that wants to update a
pointer that walks down a linked list.  "ptr" is probably a parameter
to a function like this.  The user of this function needs to call it
with a pointer to the pointer (s)he wants to update.


Hope this helps,
--
Jo Are Rosland
jar@ifi.uio.no
Newsgroups: comp.lang.c
From: ulf@julius.c3consult.comm.se (Ulf Lagerstedt)
Subject: Inventory of methods for software development
Organization: Communicator C3Consult AB
Distribution: comp
Date: Thu, 17 Dec 1992 16:38:57 GMT



 (I asked this a while ago in comp.software.eng, with limited success.
 If the subject is slightly inappropriate for this newsgroup, I apologize.
 I urge you to mail your answers. Thanks.)


I am about to do a survey or inventory of methods for software development.
With methods, I mean documented procedures and conceptual models for
either the entire development process or some parts thereof.

Anything worth being called a method in this sense is of interest.
Obviously, a complete inventory would be very large, but I hope
to be able to compile information about at least a large share of
the more widespread methods.

I wish to get as much information as possible about each method,
but the following will do fine:

                                                (for instance)

Name:                                           Coad/Yordon OOA and OOD
Key characteristics:                            Object oriented
Parts of development process concerned:         Analysis, design
Software tools supporting the method:           ...etc.
Result/output from method:
References:
- Documentation (title, author, etc):
- Organizations (commercial or other):


Please, if you have any references to a particular method, or if you
know of similar work elsewhere, mail me a reply. If there is enough
interest, I'll gladly post a summary. Your help is appreciated.

--
Ulf Lagerstedt, Communicator C3Consult, Sweden  /  ulf@c3consult.comm.se
Newsgroups: comp.lang.c
From: pjones@asl.slb.com
Subject: Passing variable length arguments -twice- ... revisited.
Reply-To: pjones@asl.slb.com
Organization: Schlumberger/Anadrill Sugar Land, TX
Date: Tue, 15 Dec 92 16:46:04 GMT



This is the same question as before, but with the necessary details.  Thanks
to all who answered with the vprintf() suggestions ... I learned something
there.  The problem with vprintf() is that it prints only in black and white
... it ignores the textcolor() and textbackground() settings that I am 
using.  So the new questions are:

 1. Can I pass the arguments to cprintf()?  The code below does not work
    with cprintf() (I didn't expect it to),  but it does work with vprintf().

 2. If the answer to #1 is "No",  can I get vprintf() to print in the
    colors already selected?

I am using Borland C++ 3.1,  and I have called the help desk. I've also 
looked in FAQ and only vprintf() is mentioned.

If any of you are offended with some flaw in my programming style,  I bow
before you in shame and hope that one day you may forgive my transgressions.

-----

void disp_error(char *msg, ...)
{
  box error_box( double_line, DOS_COLOR, WARNING_COLOR );
  struct text_info ti;
  int top=10, left=10, bottom=14, right=70;
  char underneath[800];
  va_list ap;

  // Handle variable parameters.
  va_start(ap,msg);

  // Get the current settings ... to be restored later.
  gettextinfo(&ti);

  // Save what will be under the box
  gettext(left, top, right, bottom, underneath);

  // Reset screen to full size,  and draw the box.
  window(1,1, ti.screenwidth, ti.screenheight);
  error_box.draw(top, bottom, left, right);

  // Write 'Error' in the window
  gotoxy(((right-left)>>1)+left-4, top);
  cprintf("  ERROR  ");

  // Set the window just inside the box borders, then print the message.
  window(left+1, top+1, right-1, bottom-1);
  gotoxy(1,1);
  vprintf(msg, ap);  // CAN I USE cprint() SOMEHOW???

  // Wait for key press
  window(left, top, right, bottom);
  press_any_key((right-left)/2 - 19, bottom-top+1);

  // Restore stuff underneath
  puttext(left, top, right, bottom, underneath);

  restore_settings(&ti);

  va_end(ap);
}
----

Thanks in advance,
Phil Jones
pjones@asl.sinet.slb.com
Newsgroups: comp.lang.c
From: wade@nb.rockwell.com (Wade Guthrie)
Subject: Re: Question to test general C knowledge
Organization: Rockwell International
Date: Fri, 11 Dec 1992 21:41:28 GMT


One question that I particularly like, although few applicants ever get it, is:

what does:

 printf("shop"+1); 

do?

Wade
wade@nb.rockwell.com
From: torek@horse.ee.lbl.gov (Chris Torek)
Newsgroups: comp.lang.c
Subject: Re: How precise is preprocessor math? (I'm using gcc)
Date: 15 Dec 1992 20:22:35 GMT
Organization: Lawrence Berkeley Laboratory, Berkeley CA
NNTP-Posting-Host: 128.3.112.15

In article <EJH.92Dec15111402@khonshu.colorado.edu>
ejh@khonshu.colorado.edu (Edward J. Hartnett) writes:
>  double q, x, y, rho, Rg;
>#define Q1 2.*6371.0/GRIDSPACE_KM*(1.+sin(70.))
>  Rg = 6371.0/GRIDSPACE_KM; 
>  q = 2.*Rg*(1.+sin(70.));
>  printf("Q1=%g  q=%g\n",Q1,q);

The calculation of Q1 is not done in `the preprocessor', but rather
in the compiler.  ANSI C preprocessor arithmetic is strictly integral,
but only constructs like `#if' actually do `preprocessor math'.

>to what precision is this calculation done?

(For that particular answer, I will defer to gnu.gcc.help.  Note that
this gets into issues of cross-compilation: what happens if the
compiler is run on, say, a VAX---which uses DEC-specific floating
point---to be run on an 80486, which has IEEE?  A compiler *can*
push all the work off into the runtime, in order to sidestep this
issue, but that is not good for speed.)
-- 
In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 510 486 5427)
Berkeley, CA		Domain:	torek@ee.lbl.gov
Newsgroups: comp.lang.c,comp.lang.c++,comp.lang.pascal
From: richard@crowded-house.den.mmc.com (Richard Armstrong)
Subject: Re: Executing Code during SYSTEM() calls?
Organization: Martin Marietta
Date: Thu, 17 Dec 1992 16:35:45 GMT

In article <1992Dec14.173329.45635@kuhub.cc.ukans.edu> jwilson@kuhub.cc.ukans.edu writes:
>I am working on writing a front end program which will transfer
>files from a VAX/VMS system to a SUN/UNIX system via FTP.  I have
>the file handling and idiot-proofing done but I have not discovered
>a method of using the FTP mechanism while the c code is still executing.
>I have been using the ANSI function system().  However, once the intrepreter
>has control of the system, I can no longer issue commands to login to the
>sun system with USER and PASSWD.  It is necessary to hide the login from
>the user for reasons of simplicity and security.  Does anyone know of a
>mechanism which 'C' or FTP provides to accomplish this task?  Any help
>would be greatly appreciated.
>
>-Jason
>jwilson@kuhub.cc.ukans.edu

Look at .netrc for the sun side.  You want to create a macro that executes
when you log onto the sun.  You can issue any ftp commands in this .netrc 
file.  That is how I get automatic ftp logins and file transfers to happen
without user intervention. I think this is what you were trying to do.

The user still needs to issue the first user id and password, but after that,
it can all happen automatically. Depending on how you have things setup, you
could have that first user-id exist without a password, and have that userid
.cshrc issue the ftp command, and immediately log out.

I have to do this all the time, so if you need further assistance, then email
me.


-- 
My company never said any of this... I didn't either.
Richard Armstrong, Software Engineer, Martin Marietta
Email->>>> richard@crowded-house.den.mmc.com <<<<-Email 

Newsgroups: comp.lang.c
From: jlg@cochiti.lanl.gov (J. Giles)
Subject: Re: Question to test general C knowledge
Organization: Los Alamos National Laboratory
Date: Fri, 11 Dec 1992 19:43:14 GMT

In early drafts of the standard, the expression:

   i = ++i;

was (coincidentally) well defined.

The only indeterminacy in the expression was the order of the 
two assignments.  And in this case, both orders actually yield 
the same result.  The above expression is a special case of an
arbitraty expression involving `++i' being assigned to `i'
which is, in general, *NOT* the same in both orders of doing 
the assignment.  

The early drafts of the standard allowed such expressions, and left 
the order of the side effects unspecified.  (The word "unspecified" 
has a special meaning within the standard document: the word applies 
to legal program constructs for which the standard deliberately leaves 
loose requirements.)

The final version of the standard, though, contains the following 
(3.3, lines 5-7):

   Between the previous and next sequence point an object shall have its
   stored value modified at most once by the evaluation of an expression.
   Furthermore, the prior value shall be accessed only to determine the
   value to be stored.

This explicitly disallows the above expressions.  A standard conforming
implementation is permitted to do anything it wants with programs which
violate the standard.  It could, for example, send an angry email note
to Dennis Ritchie and then go into an infinite loop.  However, acceptable
behavior (what you would be willing to buy from a vendor, or even use
as freeware) would be to issue a warning message and then do what the
earlier drafts of the standard would actually have allowed.

In general, the compiler can't detect all examples of violations to 
the above rule anyway:

   *j = ++(*i);

How would the compiler necessarily know whether `i' and `j' pointed
to the same place?

-- 
J. Giles
Newsgroups: comp.lang.c
From: rob@magrana1.uucp (Rob Duncan)
Subject: yacc parser
Organization: Pomegranate Technology, Inc.
Date: Sat, 19 Dec 1992 02:19:54 GMT

Does anyone know whether a freely available yacc/bison parser exists
for C (preferably ANSI)?  Also, is there a C lexer available built on
lex/flex?  I want to try out some data-parallel extensions to C and
would rather not build the compiler right from the ground up.

Thanks,
-- 
Rob Duncan                                       Talk: +1-415-325-8780
Pomegranate Technology, Inc.                      Fax: +1-415-325-8780
235 Embarcadero Road               UUCP: ...!uunet!magrana1!rob.duncan
Palo Alto, CA 94301               Internet: rob.duncan@pomegranate.com
From: wong@fraser.sfu.ca (Sam S. Wong)
Newsgroups: comp.lang.c
Subject: Need help: array of pointers to member functions C++.
Date: 16 Dec 92 17:22:49 GMT
Article-I.D.: sfu.wong.724526569
Organization: Simon Fraser University, Burnaby, B.C., Canada

HELP: I can't assign the address of my integer member functions to a pointer 
in my array of pointers to integer functions. What's wrong?

-------------------------------------
 


class dummy {
 public:
 int hello(void);
};

int just_hello (void);

dummy dumb;              
int (*fnptr[10])();


main()
{ 
  dumb.hello();
  fnptr[1] = just_hello;
  (*fnptr[1])();
  fnptr[1] = dummy::hello;  // <- compile error   
  fnptr[1] = dumb.hello;    // <- compile error
  (*fnptr[1])();
}


int dummy::hello (void)
{
  printf ("\nhello");
}


int just_hello (void)
{
  printf ("\njust_hello");
}


-----------------------------------------------------
Newsgroups: comp.lang.c
From: wieck@jwminhh.hanse.de (Jan Wieck)
Subject: Re: How to do an efficient ROTATE in C?
Organization: Private Site under Mach386
X-Newsreader: Tin 1.1 PL4
Date: Thu, 17 Dec 1992 06:28:42 GMT

mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
: > Distribution: ba
: 
: Someone's leaking ba...
: 
: In article <71576@cup.portal.com>, Aurelius@cup.portal.com (Mark Christian Barnes) writes:
: 
: > Most C compilers will do rotates, i.e. logical shifts,
: 
: As I understand and use the terms, a rotate and a logical shift are not
: at all the same thing.  As I use the terms, given a 16-bit datum
: holding 0x74a0, a logical shift left by 4 bits would produce 0x4a00,
: while a rotate left by 4 bits would produce 0x4a07.

This is the equivalence to the functionality of a ROL-assembly-instruction
for an 8086. Most microprocessors (from the 4-bit days up to today) have
two kind's of rotate-functions. One of the above functionality, and one
where the bits are shifted through the carryflag. In that case your result
may be 0x4a03 or 0x4a0b, depending on the previous state of the carryflag.
The carryflag is set after the operation. This is the functionality of a
RCL-instruction for an 8086.


Until later, Jan

-- 
# Any language keeps its own misunderstandings; #
# why shouldn't programming languages do?       #
#                                               #
#            wieck@jwminhh.hanse.de (Jan Wieck) #
Newsgroups: comp.lang.c
From: rioj7@fel.tno.nl (M.L.M.Veraart)
Subject: Re: How to run a program from another program using Turbo C??
Organization: TNO Physics and Electronics Laboratory
Date: Tue, 15 Dec 92 08:11:06 GMT

890560p@dragon.acadiau.ca (Trevor Porter) writes:

>Subject line says it all.  Any help will be greatly appreciated.

>-- 
> 
The functions you are looking for are spawn?() and exec?().
At the place of ? you substitute the kind of function (see the manual).
Does it search the path, does it has a fixed number of argumets etc.
The spawn?() function leaves the current program in memory, and when the
child process finishes it gains execution again.
The exec?() function replaces the current program.

Mario
-- 
Mario Veraart                  TNO Physics and Electronics Laboratory
email: rioj7@fel.tno.nl        The Hague       The Netherlands
"If all else fails, show pretty pictures and animated videos, 
 and don't talk about performance",  David Bailey
Newsgroups: comp.lang.c
From: alien@yoyo.cc.monash.edu.au (Diego Barros)
Subject: Signal() function & CTRL-C checking...
Organization: Monash University General Access Unix
X-Newsreader: TIN [version 1.1 PL8]
Date: Wed, 16 Dec 1992 05:39:39 GMT

I have a quesiton concerning the signal function and how it is used. I'm
trying to set up a routine which is called when anyone of 4 interrupts
occur. When one of them does occur then a single function is called
which will clean up and exit the program. The main reason is to detect
when the user presses CTRL-C to break program execution.

Could someone please explain what exactly the signal prototype in the
signal.h file is declaring (in english?!?) :) As knowing what the
function is declared as would of course help my understanding as to how
to use the function call.  

<signal.h>	extern void (*signal(int __sig, (*__func)(int)))(int);

And how should I declare the function which is called when one of the 4
interrupts occur, what's its prototype? And how is signal called
exactly?

Any help, and short C source examples showing the outline and procedures
to do this would be greatly appreciated. 


Thanks in advance...
Cheers... :) 


-- 
			-------------------------
	      -----------------
   _____     : Mmmmm Donuts... :	 Diego Barros - Alien
  /     \    o ----------------   Mail : alien@yoyo.cc.monash.edu.au
From: kdq@quest.UUCP (Kevin D. Quitt)
Newsgroups: comp.lang.c
Subject: Re: Peek/Poke in C
Date: Fri, 18 Dec 92 21:39:54 PST
Reply-To: srhqla!quest!kdq
Organization: Job quest  (805) 251-8210,  So Cal: (800) 400-8210

cad28526@uxa.cso.uiuc.edu (Chuck Douglas) writes:
> pal@regent.e-technik.tu-muenchen.dbp.de (Peter Loibl) writes:
> >ericwebb@blackwlf.gwinnett.com (eric webb) writes:
> >>Hi again.. does anyone know how to do equivalent of BASIC's PEEK & POKE
> >>statements in C?
> >I am sorry for my ignorance, but what are PEEK and POKE doing? If you
> >describe their task, then this would be lots of help for all the
> >"C-Gurus" here.
> PEEK and POKE are used in Applesoft BASIC to look at (PEEK) the contents
> of or put (POKE) a value in to a specific memory address.  I really
> don't believe that there is anything analogous to it in C.  At least
> nothing that would serve the use it does in Applesoft.

    What happened to pointers?  Did they go away?  (try *charptr =
value for pokes and value = *charptr for peek).


 _
Kevin D. Quitt      96.37% of all statistics are made up.     srhqla!quest!kdq
Newsgroups: comp.lang.c
From: etlnbb@etlxd30.ericsson.se 
Subject: Turbo C routines/libraries???????
Reply-To: etlnbb@etlxd30.ericsson.se
Organization: Ericsson Telecom AB
Date: Wed, 16 Dec 1992 13:30:34 GMT


If anyone has any useful Turbo C libraries/routines would you be kind enough
to send them to me? I'm particularly interested in:

- screen handling (opening windows/dialog boxes etc)
- printer handling (send data to printer/testing if LPT is ready etc)
- graphics (drawing graphs etc)

However, any routines deemed useful would be gratefully received!
Unfortunately, can't ftp so can any files be sent via e-mail to
  etlnbb@etlxd30.ericsson.se

Thanks in advance

Neil

Newsgroups: comp.lang.c
From: wieck@jwminhh.hanse.de (Jan Wieck)
Subject: Re: TSR sources : request .
Organization: Private Site under Mach386
X-Newsreader: Tin 1.1 PL4
Date: Mon, 14 Dec 1992 22:36:39 GMT

rodnay@chen.bgu.ac.il (guy rodnay) writes:
: 
: Hi !
: ------
: 
: I would very much apreciate any help on TSR's and any memory
: resident information (sources , if possible ) .
: 

Any Program can be made stay resident.

- Under MVS write some JCL and do SUBMIT.
- Under BS2000 try SUBMIT (not sure, long time ago).
- Under VMS use SUBMIT with a DCL-procedure.
- Under UNIX use & as the last part of the commandline.
  In some cases you need nohup(1).

So, where is the Problem? And if there is anyone, it isn't a C-problem!!!


Until later, Jan

-- 
# Any language keeps its own misunderstandings; #
# why shouldn't programming languages do?       #
#                                               #
#            wieck@jwminhh.hanse.de (Jan Wieck) #
Newsgroups: comp.lang.c,gnu.gcc.help