HDTenEightyP/NetNews huggingface dataset:
From: mwyllie@at4cad.intel.com (Mary Wyllie)
Newsgroups: comp.lang.c
Subject: Looking for ideas to translate strings to function calls in C.
Date: 30 Jul 92 21:27:15 GMT
Followup-To: mwyllie@at4cad.intel.com
Organization: intel
Originator: mwyllie@at4cad

I am looking for a way to translate a string message to a function call in C.
I'm currently looking at a scheme where I build a table of function information
for the functions I match which includes a string to match, a function pointer
and a list of parameters to be passed.  For example:

void func1();
void func2();

Tfunc_info function_table[] = 
{
    "func1", func1, { aString, aInteger, aDouble },  /* types are enum. */
    "func2", func2, { aInteger, aDouble },
}

The message might look like: "func1 hello! 4 6.78"

I then parse the string, match the function, and read in the proper type of 
variables.  I am having difficulty, however, finding an appropriate way to
make a generic function call with the function pointer, passing parameters
that may be any number and combination of types (ie. the call cannot be 
dependent on the types of the parameters).

I have tried building the parameter list from a single pointer. 

  CALL:  (*function_ptr)(parms);

Some values look good, some are garbage.  I suspect I'm running into 
inconsistencies between how the parameters get stacked, and how I'm writing 
them to memory.  

I have also tried keeping an array of generic pointers to the parameters, and 
then dereferencing the pointers to make the function call.  In this case, my
function call is dependent on the number of parameters.  

  CALL:  switch(num_parms)
         {
         case 0:  (*function_ptr)();
                  break;
         case 1:  (*function_ptr)(*(parms[0]));
                  break;
         case 1:  (*function_ptr)(*(parms[0]), *(parms[1]));
                  break;
           etc.
         }
    
However, if I do this, I cannot (and still keep the call generic) make sure I 
properly typecast the values when they get passed to the function.

Worst possible case is that each function I need to call, has a wrapper 
function around it to take care of the appropriate parameters.  However, I 
would like to create a more general purpose mechanism.

I hope I have described the problem well enough for you to understand what I'm
trying to do.  Does anyone have any ideas of how to make this work?...or
a better way to solve the problem?

Thanks.

Mary
Newsgroups: comp.lang.c
From: maven@eskimo.celestial.com (Norman Hamer)
Subject: Borland C++ problems
Organization: <<< ESKIMO NORTH (206)-FOR-EVER >>>
Distribution: us
Date: Fri, 31 Jul 1992 04:47:17 GMT

Sigh. I'm working with Borland C++ v3.0 under MSDOS to compile (mainly)
a BBS package called MavenCit (a Citadel clone)... I've purchased their
3.1 update, but it can't compile the code into a working executable
without a LOT of work. (And this was supposed to be a bugfix of the
compiler... NOT!)... anyway. The problem I'm having now is that the 3.0
version of the compiler doesn't seem to want to work on my machine since
I upgraded to 32 megs of RAM. (General protection fault #13)... does
anyone know how to coerce it to work, or failing that know how to
disable memory > 16 megs without actually removing the RAM (which I'm
understandably reluctant to do)... 

 Or am I just screwed?

 Please mail reply to maven@eskimo.celestial.com, or if your site can't
route to that then kwoelfel@sumax.seattleu.edu as I don't read this
newsgroup often enough to catch a reply...

 Thanks...
From: ni10+@andrew.cmu.edu (Nenad Ivezic)
Newsgroups: comp.lang.c
Subject: freeware c libs
Date: 22 Jul 92 00:45:37 GMT
Organization: Masters student, Civil Engineering, Carnegie Mellon, Pittsburgh, PA

Does anybody know of any good freeware c libraries with implementations of
standard data types (hash tables, lists, ...) and sorting/searching algorithms.

Thanks.

- Nenad
From: glenn@curie.ces.cwru.edu
Newsgroups: comp.lang.c
Date: 17 Jul 92 10:46 MDT
Subject: Array bounds checking
Nf-ID: #N:GLENN.92Jul17104644@curie.ces.cw:1802369180:001:1316
Nf-From: curie.ces.cwru.edu!glenn    Jul 17 10:46:00 1992



Hey there.  I've inherited a pathetic piece of "software", chock full
o' things like

foo = (char *) malloc (strlen (bar));
strcpy (foo, bar);

I've got 4 or 5 malloc debugging systems, so most problems like the
above are solved now, but I'm trying to figure out a way to check for
things like this:

void foo(void)
{
	int local[5];

	local[5] = 3;
}

Sure, I can change these to something like this:

void foo(void)
{
	int *local;

	local = (int *) malloc (sizeof (int) * 5);
	local[5] = 3;
	free (local);
}

(which my picky malloc debuggers will point out to me.)

But this sucks.  When I'm not debugging, I'd really like that array of
ints to be on the stack.

Any suggestions about systems that might do something like this?  I
know about CodeCenter (formerly Saber) C, which will do this in its
sleep, but it's quite costly, and I'd like to either find or write
something GNUish.

If there's nothing out there, I'd appreciate suggestions on how best
to do this.  What I'm thinking about currently is an option to GCC
like -fruntime-bounds-check.  If anyone's given this some thought, I'd
love to hear about it.

--
Glenn Crocker                   |  Hackers aren't unethical, they're
glenn@ces.cwru.edu              |  "Differently-ethical."
CWRU, Cleveland, OH             |
W (216)368-6133 H (216)791-4610 |

Newsgroups: comp.lang.c
From: andy@research.canon.oz.au (Andy Newman)
Subject: Re: Variable length records
Organization: Canon Information Systems Research Australia
Date: Thu, 30 Jul 1992 01:07:56 GMT

wirzeniu@klaava.Helsinki.FI (Lars Wirzenius) writes:
>My gcc 2.2.2 under Linux doesn't seem to support it, at least with the
>default options:

GCC uses 0 length arrays for this... from the manual...

Arrays of Length Zero
=====================

   Zero-length arrays are allowed in GNU C.  They are very useful as
the last element of a structure which is really a header for a
variable-length object:

     struct line {
       int length;
       char contents[0];
     };

     {
       struct line *thisline = (struct line *)
         malloc (sizeof (struct line) + this_length);
       thisline->length = this_length;
     }

   In standard C, you would have to give `contents' a length of 1,
which means either you waste space or complicate the argument to
`malloc'.



-- 
Andy Newman (andy@research.canon.oz.au)		"Int. God's own type"
Xref: sparky comp.lang.c:11800 comp.sys.amiga.programmer:11845
From: dillon@overload.Berkeley.CA.US (Matthew Dillon)
Newsgroups: comp.lang.c,comp.sys.amiga.programmer
Subject: Re:  Matt Dillon's DICE (Amiga C) and rand() function
Distribution: world
Date: 30 Jul 92 22:57:34 PST
Organization: Not an Organization

In article <1992Jul29.163704.26489@proxxi.se> elias@proxxi.se (Elias M}rtensson (proxxi)) writes:
>CADS_COLE@GALLUA.BITNET (Kevin Cole; Washington DC) writes:
>
>>Date Sent:  29-Jul-1992  08:09:36
>
>>Greetings from the void,
>
>>Here's a very short C program that doesn't do what the documentation claims.
>>According to Matt Dillon's DICE documents, I can limit the range of values
>>Thanx.
>
>>     #include <stdio.h>
>>     #include <stdlib.h>
>>     #define RAND_MAX ((1023))
>>     main()
>>     {
>>	int i;
>>	for (;;)
>>	{
>>	 i = rand();
>>	 printf("Random number %04X (%d)\n",i,i);
>>	}
>>...

    Uh, rand() returns a number between 0 and 0x7FFFFFFF inclusive (i.e. a
    positive integer).	You limit it with a mod or logical and function:

    #define RAND_MAX	1000	   /*	0-999	*/

    main()
    {
	int i;

	for (;;) {
	    i = rand() % RAND_MAX;
	    printf("Random number %d\n", i);
	}
	/* not reached */
    }


    Note that in many cases people need random numbers that are power of 2
    ranged, i.e. 1, 2, 4, 8 ... etc..  For this you can use a logical AND
    which is *much* faster.  For example,   (rand() & 1023) returns a
    number between 0 and 1023 inclusive.

					    -Matt

--

    Matthew Dillon	    dillon@Overload.Berkeley.CA.US
    891 Regal Rd.	    uunet.uu.net!overload!dillon
    Berkeley, Ca. 94708     ham: KC6LVW (no mail drop)
    USA
Newsgroups: comp.lang.c
From: wkaufman@us.oracle.com (William Kaufman)
Subject: Re: Pointers to freed memory
Organization: Oracle Corporation, Redwood Shores CA
Date: Fri, 31 Jul 1992 03:59:05 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.

    Sorry to post asking for random machine specifics, but this one
intrigued me.  If what Steve says is true, there's a whole lot of busted
code out there,...some of it with my name on it,...

In article <1992Jul30.164035.7349@taumet.com> steve@taumet.com (Steve Clamage) writes:
] 
] The C Standard states that the value of the pointer after a call to free
] is 'indeterminate'.  This means that just reading the value might
] produce a runtime fault.

    Well, OK, the pointer will be useless, but will it really be
dangerous?  What he's got is essentially:

        struct something *p = (struct something *)rand();

Could this assignment really cause a fault?  Even if p is never
dereferenced?  I know this is an improper question, but what machines is
this true for?

    I can't count the times that I've freed a circular list the way the
original poster did--save the old "next" pointer, free this one, move on
to the saved "next".  If what you say is true, you'd have to stop at
one-before-the-end and free that one without checking the next pointer.

                                           -- Bill K.

Bill Kaufman,          | "...all conscious species are plastic and
Corporate Lackey       |  all plastic species are conscious."
wkaufman@us.oracle.com |                     -- Yew-Kwang Ng
From: hotsenp@seq.uncwil.edu
Newsgroups: comp.lang.c
Date: 17 Jul 92 19:01 MDT
Subject: Re: C Language Reference
Nf-ID: #R:ken.711364829@uctcs:-1130486183:1992Jul17.150158.20552@seq.uncwi:-1622428129:001:263
Nf-From: seq.uncwil.edu!hotsenp    Jul 17 19:01:00 1992


ken@uctcs.cs.uct.ac.za (Ken MacGregor) writes:

>I would like to obtain a copy of the ANSI C Language Reference
>Document.  Does anyone know from whom it is available and the cost.
	
 	If any one has any idea I would like one too......

			THANKS IN ADVANCE....


Newsgroups: comp.lang.c
From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
Subject: Re: initiaklizing union members
Organization: Computer Science, University of Melbourne, Australia
Distribution: usa
Date: Sun, 26 Jul 1992 18:09:46 GMT

torek@horse.ee.lbl.gov (Chris Torek) writes:

>If you have an ANSI C compiler, you can get away with this:
>
>	struct Row {
>		int	Type;
>		union {
>			int	ival;
>			char	*sval;
>		} value;
>	};
>	struct Row_str {
>		int	Type;
>		union {
>			char	*sval;
>			int	ival;
>		} value;
>	};
>	static Row r0 = { 0, 1234 };
>	static Row_str r1_str = { 1, "string" };
>	#define	r1 (*(struct Row *)&r1_str)

Isn't it the case that *technically*, to be sure that the definitions
for Row and Row_str are are compatible, you have to define them in
seperate compilation units?

-- 
Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
This .signature VIRUS is a self-referential statement that is true - but 
you will only be able to consistently believe it if you copy it to your own
.signature file!
Newsgroups: comp.lang.c
From: Leonid A. Broukhis <leo@ipmce.su>
Subject: Re: unsigned long to long without lossage (Help)
Reply-To: leo@ipmce.su
Organization: unknown
Date: Tue, 21 Jul 92 12:44:15 +0400

	There is NO WAY to portably convert unsigned long to long
without lossage, because unsigned long can have 64 bits, but long -
53 bits (as in one xSoviet mainframe "Elbrus") :-) . Everything else
works OK on it (e.g. "enquire" runs successfully).

	Regards,
-- 
	Leonid A. Broukhis
From: bardo@ief-paris-sud.fr (Bardo Muller)
Newsgroups: comp.lang.c
Subject: Re: freeware c libs
Keywords: hash tables, lists, stacks, queues, dictionaries, sequences, sorted sequences, priority queues, graphs, points, segments ...
Date: 24 Jul 92 05:37:22 GMT
Reply-To: bardo@ief-paris-sud.fr
Organization: Universite de Paris

The LEDA library of efficient data types and algorithms is now available
via anonymous ftp.

SITE:  sbsvax.cs.uni-sb.de (134.96.252.31)

FILE:  /pub/LEDA/LEDA-<version>.tar.Z   (compressed tar file)

.. plus other sites.

Looks complete.
Newsgroups: comp.lang.c
From: darcy@druid.uucp (D'Arcy J.M. Cain)
Subject: Re: HIgher problems at hand. HELP!
Date: Tue, 28 Jul 1992 10:40:59 GMT
Organization: D'Arcy Cain Consulting

Ross Ridge <ross@zooid.guild.org> writes:
>fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) writes:
>>darcy@druid.uucp (D'Arcy J.M. Cain) writes:
>>>#define		const
>>Do *not* #define keywords unless you have absolutely no alternative.
>>>#include	<string.h>
>>Now what happens if string.h happens to contain
>>	const CHAR_BIT = 8;
>>or some such?
>Include files are very unlikely to contain external definitions like this.
>Remeber in C there is world of difference between "#define CHAR_BIT 8"
>and "/*static*/ const /*int*/ CHAR_BIT = 8;".  But who knows what's 
>in <string.h> so it would be better if the "#define const" was placed
>after the "#include <string.h>". 

Except that the whole point is to prevent any warnings with full checking
turned on.  Putting the define after the include would cause warnings
when strstr was redefined.  Note that you can't leave it off either since
the function calls both strlen and strncmp.

Other than changing the language itself I don't believe there is a "right"
way to code strstr(3).  Anything you do is a kluge.  My kluge simply has
the benefit of not producing warnings.  However you do have to be aware
in case you do have that really strange hardware where this doesn't work.
That's why I put four lines of comment before the define.

-- 
D'Arcy J.M. Cain (darcy@druid.com)  |
D'Arcy Cain Consulting              |   There's no government
Toronto, Ontario, Canada            |   like no government!
+1 416 424 2871          DoD#0082   |
From: wirzeniu@klaava.Helsinki.FI (Lars Wirzenius)
Newsgroups: comp.lang.c
Subject: Re: array element swap help
Date: 31 Jul 92 11:38:29 GMT
Organization: University of Helsinki

amorgan@Xenon.Stanford.EDU (Crunchy Frog) writes:
>>The best way to speed it up is to eliminate it altogether.  
>
>Huh?  Maybe the constant drug use is getting to me, but I don't see how
>you can do that.  Sure, you can reduce it by using a better sort
>(as you say below), but to sort things you have to change their position.

Uh, no.  You only need to define the collating order in some suitable
way, and have _any_ array sorted, regardless of their contents.  See, no
swapping.

Sorry, couldn't resist.

I was being unclear, what I meant was to reduce the number of swaps.

--
Lars.Wirzenius@helsinki.fi
From: andy@orchid.bdc.ubc.ca (Andrew Dwelly)
Newsgroups: comp.lang.c
Subject: PL/1 -> C
Date: 21 Jul 92 22:46:54 GMT
Organization: University of British Columbia, Vancouver, B.C., Canada


I can't believe I've been asked to do this. Sigh, there's someone 
here with a huge PL/1 program who'd like it translated to C. Are
there any public domain or commercial systems capable of doing this ?

Andy Dwelly andy@bcu.ubc.ca
From: orenalex@bimacs.BITNET (Alex Oren)
Newsgroups: comp.lang.c
Subject: Re: About the 'F' in RTFM
Date: 28 Jul 92 16:57:17 GMT
Organization: Math department, Bar-Ilan University, Ramat-Gan, ISRAEL

In article <1992Jul23.155203.11430@newshost.lanl.gov> jlg@cochiti.lanl.gov (Jim Giles) writes:
>In article <1992Jul17.202448.19848@wyvern.tw>, alpha@wyvern.twuug.com writes:
>|>
>|> Proposed change to 'standard' practice.  'RTFM' is now 'RTM'.
>|> The 'F' does not relate to any known adjective for Manual.
>|> 'Read The Manual' should suffice.
>
>The usual interpretation of the F is an accurate description of the quality
>of most UNIX manuals.  The correct response to `RTFM' is "I *did* read it,
>and it didn't answer the question I wanted answered."
>
>--
>J. Giles

The response I heard was:   FTFM&FU2
(Don't remember if it was in the C users journal or Dr. Dobbs)


Arivederci,
Alex.
From: ychung@news.cis.ohio-state.edu (yiu fai chung)
Newsgroups: comp.lang.c
Subject: How can I return two value to a procedure ???
Date: 22 Jul 92 12:41:50 GMT
Article-I.D.: honeydew.9207222041.AA00524
Organization: The Ohio State University Department of Computer and Information Science

I would like to return two values of two variables.
How can I do that ?

This is what I wrote:
void change_value( int *i, int *j )
{
  *i = 2;
  *j = 3;
  return (*i, *j);
}
Xref: sparky comp.lang.c:11769 comp.unix.programmer:4020 comp.unix.questions:9587
From: stsshol@st.unocal.com (Herb Lam)
Newsgroups: comp.lang.c,comp.unix.programmer,comp.unix.questions
Subject: How to test if device is busy?
Date: 30 Jul 92 17:14:38 GMT
Distribution: usa
Organization: Unocal Corporation
Originator: stsshol@anteater

I need to find out how to test whether a tape device is busy 
(i.e. if it is performing some read or write operation) before 
I try to unmount the tape drive.  Is there some general function
that can accomplish this?  I looked into ioctl under the mag 
tape category and mtio.h but I couldn't find anything that could
do this.  Any suggestions?  

Thanks.
From: ark@alice.att.com (Andrew Koenig)
Newsgroups: comp.lang.c
Subject: Re: Pointers outside of array boundary
Date: 29 Jul 92 04:22:30 GMT
Article-I.D.: alice.23344
Reply-To: ark@alice.UUCP ()
Organization: AT&T Bell Laboratories, Liberty Corner NJ

In article <1992Jul28.180945.22332@hubcap.clemson.edu> mjs@hubcap.clemson.edu (M. J. Saltzman) writes:

> 	float x = malloc(10*sizeof(float));
> 	--x;

> My question is: Can anyone name an existing machine on which this code
> could fail, or give a really convincing hypothetical argument why it
> is a bad idea?

The most fundamental reason is that it WILL fail in any implementation
that rigorously checks for conformance with the Standard.

A more practical reason: suppose you're on a machine where addresses are
(segment,offset) pairs, such as on Intel hardware.  Suppose further that
the hardware checks for offset underflow or overflow in address arithmetic.
Then it is entirely possible for malloc to return a pointer to the beginning
of a segment and --x to cause it to underflow.  Worse, the error might
be detected only when you have the bad luck to call malloc at the wrong time.
-- 
				--Andrew Koenig
				  ark@europa.att.com
From: jlg@cochiti.lanl.gov (Jim Giles)
Newsgroups: comp.lang.c
Subject: Re: About the 'F' in RTFM
Date: 23 Jul 92 15:52:03 GMT
Article-I.D.: newshost.1992Jul23.155203.11430
Organization: Los Alamos National Laboratory

In article <1992Jul17.202448.19848@wyvern.tw>, alpha@wyvern.twuug.com writes:
|> 
|> Proposed change to 'standard' practice.  'RTFM' is now 'RTM'.
|> The 'F' does not relate to any known adjective for Manual.
|> 'Read The Manual' should suffice.

The usual interpretation of the F is an accurate description of the quality
of most UNIX manuals.  The correct response to `RTFM' is "I *did* read it,
and it didn't answer the question I wanted answered."

-- 
J. Giles
Newsgroups: comp.lang.c,comp.parallel
From: cros@tls-cs.cert.fr (Patrice Cros)
Subject: About PCC2 (Ardent computer?)
Followup-To: comp.lang.c
Organization: CERT Toulouse Dept of Computer Science, FRANCE
Date: 30 Jul 92 13:19:01 GMT




	I know that exists some  C compiler  (called PCC2), which  has
been first developed by ATT, then  adapted to  take into  account some
parallelism, (maybe by Ardent Computer).

	How  to get (by ftp or other)  existing documentation (refs if
publications  have  been  done, etc...), and/or product itself for Sun
platform, if possible?

Thanks to answer by e-mail to:

Patrice Cros		E-mail: cros@tls-cs.cert.fr
CERT/DERI		Tel:	+33 61 55 70 61
	Department of Computer Science
2, av. Edouard Belin	Fax:	+33 61 55 71 72
B.P. 4025		Telex:	521596 F
31055 TOULOUSE Cedex	France
From: ptran@envmsa.eas.asu.edu (Phi-Long Tran)
Newsgroups: comp.lang.c
Subject: Re: Array question....
Keywords: help?
Date: 23 Jul 92 01:15:00 GMT
Distribution: ca
Organization: Arizona State University, Tempe, AZ
News-Software: VAX/VMS VNEWS 1.4-b1

In article <14ks9uINNgmj@agate.berkeley.edu>,
mdr@ocf.berkeley.edu (Mike Rogoff) writes...

>Forgive my naivity, but could somebody help me with dynamically
>allocating arrays?  How would you go about it?  If you just
>malloc a bunch of space, can you reference it with array [] subscripts
>and have it work?

     You want to declare a pointer to an array:

     MyType (*paryMyType)[MAX_ELEMENTQ];

The above declares a pointer to an array of MAX_ELEMENTQ items.  Variable
paryMyType is like any other pointer that you can use with malloc, calloc,
free, etc.  Since paryMyType points to an array, "*paryMyType" is the
array, thus you would say,

     (*paryMyType)[0] = /* Etcetera. */

     I think the word is spelled, "naivite".

---
Phi-Long Tran
ptran@asuvax.eas.asu.edu
Arizona State University
Newsgroups: comp.lang.c
From: progers@ajpo.sei.cmu.edu (Pat Rogers)
Subject: Tools for C documentation/reverse engineering
Organization: Software Engineering Institute
Date: Fri, 24 Jul 1992 20:30:51 GMT

Does anybody have pointers to tools which reverse engineer and document 
C code (along 2167 format lines)?

Thanks!

p rogers
sbs engineering 

Newsgroups: comp.lang.c,comp.os.msdos.programmer
From: twpierce@amhux1.amherst.edu (Tim Pierce)
Subject: Re: learning C?
Organization: Amherst College, Amherst MA
Date: Thu, 30 Jul 1992 17:39:16 GMT

In article <1683393E.RJONES1@ua1vm.ua.edu> RJONES1@ua1vm.ua.edu (Bart Jones) writes:
>   What advice would you all give to a (very) novice who wants to learn C
>on the Mac?

To get a computer.

-- 
____ Tim Pierce                / "You mean there are TWO of you, Pierce?
\  / twpierce@amherst.edu      /  God help us all."
 \/ (BITnet: TWPIERCE@AMHERST) /   -- Major Charles Emerson Winchester III
Newsgroups: comp.lang.c
From: elias@proxxi.se (Elias M}rtensson (proxxi))
Subject: Re: Functions Within Functions
Organization: proxxi
Date: Wed, 29 Jul 1992 23:53:30 GMT

wjb@cscsun2.larc.nasa.gov (William J. Bene) writes:

>Is there any way to declare functions within another function like in pascal?

Yes, GCC can do this, but since it isn't compatible with other versions
of C, I wouldn't do it unless I really needed to.

In GCC You can write something like:

int foo()
{
	int bar( int a ) { return a + 20; }

	printf( bar( 10 ) );
}

>================================
>William J. Bene
>Computer Sciences Corporation
>wjb@cscsun2.larc.nasa.gov

###################
# Elias Martenson #
# elias@proxxi.se #
###################

Newsgroups: comp.lang.c
From: epp@mala.bc.ca (Lorne Epp)
Newsgroups: comp.lang.c
Subject: Re: How can I return two value to a procedure ???
Date: 23 Jul 92 13:56:35 GMT
Organization: Malaspina College

In article <9207222041.AA00524@honeydew.cis.ohio-state.edu>, ychung@news.cis.ohio-state.edu (yiu fai chung) writes:
> I would like to return two values of two variables.
> How can I do that ?

Just delete your return statement:
 
> void change_value( int *i, int *j )	/* arguments are pointers to ints */
> {
>   *i = 2;		/* These lines alter the values of the variables */
>   *j = 3;		/* that the arguments point to. */
>   return (*i, *j);	/* delete this line */
> }

You would call the function like this:

int a=10,b=11;

change_value( &a, &b );		/* change_value expects pointer-to-int
				   arguments, so you pass address-of a
				   and b.	*/

/* Value of a is now 2; b is 3 */

Lorne Epp
epp@mala.bc.ca
Newsgroups: comp.lang.c