linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* error func
@ 2005-07-08 10:41 raja
  2005-07-08 10:59 ` Rechberger Markus
  2005-07-09 17:36 ` Glynn Clements
  0 siblings, 2 replies; 3+ messages in thread
From: raja @ 2005-07-08 10:41 UTC (permalink / raw)
  To: linux-c-programming

hi,
   I am writing a function that takes the return value of the another 
function and gives the  status of the function.
if
   error("functionName",arguments)
here the function with Name "functionName " is to be executed with the 
corresponding argunents.But by knowing the function name how can i get 
the address if that function and how can i execute the function with the 
arguments.

thanking you

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: error func
  2005-07-08 10:41 error func raja
@ 2005-07-08 10:59 ` Rechberger Markus
  2005-07-09 17:36 ` Glynn Clements
  1 sibling, 0 replies; 3+ messages in thread
From: Rechberger Markus @ 2005-07-08 10:59 UTC (permalink / raw)
  To: raja, linux-c-programming

Hey,

how about managing a table of all functions? and iterate over that
table using strcmp or so?

Markus

On 7/8/05, raja <vnagaraju@effigent.net> wrote:
> hi,
>    I am writing a function that takes the return value of the another
> function and gives the  status of the function.
> if
>    error("functionName",arguments)
> here the function with Name "functionName " is to be executed with the
> corresponding argunents.But by knowing the function name how can i get
> the address if that function and how can i execute the function with the
> arguments.
> 
> thanking you
> -
> To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: error func
  2005-07-08 10:41 error func raja
  2005-07-08 10:59 ` Rechberger Markus
@ 2005-07-09 17:36 ` Glynn Clements
  1 sibling, 0 replies; 3+ messages in thread
From: Glynn Clements @ 2005-07-09 17:36 UTC (permalink / raw)
  To: raja; +Cc: linux-c-programming


raja wrote:

>    I am writing a function that takes the return value of the another 
> function and gives the  status of the function.
> if
>    error("functionName",arguments)
> here the function with Name "functionName " is to be executed with the 
> corresponding argunents.But by knowing the function name how can i get 
> the address if that function

dlsym().

> and how can i execute the function with the arguments.

You can't portably make a function call where the number of arguments
isn't known at compile time.

-- 
Glynn Clements <glynn@gclements.plus.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-07-09 17:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-08 10:41 error func raja
2005-07-08 10:59 ` Rechberger Markus
2005-07-09 17:36 ` Glynn Clements

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).