[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] [C] debug udprint funktion ala printf



Kim Schulz <sslug@sslug> writes:

> jeg sidder og mangler en debug funktion der virker som printf (altså man
> kan samle en streng af X parametre). Det er meningen at det skal kunne
> slået til og fra via f.eks. en define. 
> Nogen der ligger inde med en sådanne, eller kan give et hint til hvordan
> det kan laves?

Ja, det gør GNU.

  GNU Nana: improved support for assertion checking and logging in GNU C/C++

  GNU Nana is a free library providing improved support for assertion
  checking (as in assert.h) and logging (printf style debugging) in
  GNU C and C++. It provides support for some of the ideas of Eiffel,
  VDM, Z and Anna in GNU C/C++. GNU Nana was developed by Phil Maker. 

http://www.gnu.org/software/nana/nana.html

Du kan f.eks. skrive

  #include <L.h>
  LG (FOOBAR, "hello world %i\n", 42);

hvilket vil svare til

  if (FOOBAR)
    fprintf (stderr, "hello world %i\n", 42);

Jeg har også stor glæde af I.h fra GNU Nana til assertion checking.

/Esben
-- 
Nutmeg is extremely poisonous if injected intravenously.


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:10 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *