Netdude Manual
Prev |  | Next

# nd_debug

## Name

nd_debug --

## Synopsis

    void        nd_debug_enter                  (const char *function);
    void        nd_debug_return                 (const char *function);
    #define     D                               (x)
    #define     D_ASSERT                        (exp, msg)
    #define     D_ASSERT_PTR                    (ptr)
    #define     D_ENTER
    #define     D_RETURN
    #define     D_RETURN_                       (x)
    void        nd_debug_gtk_widget_unref       (GtkWidget *w);
    void        nd_debug_gtk_object_set_data_full
                                                (GtkObject *object,
                                                 const gchar *key,
                                                 gpointer data,
                                                 GtkDestroyNotify destroy);
    #define     gtk_widget_unref
    #define     gtk_object_set_data_full

## Description

## Details

### nd_debug_enter ()

    void        nd_debug_enter                  (const char *function);

`function` :

### nd_debug_return ()

    void        nd_debug_return                 (const char *function);

`function` :

### D()

    #define     D(x)

Use this macro to output debugging information. `x` is the content as you would pass it to `printf()`, including braces to make the arguments appear as one argument to the macro. The macro is automatically deleted if -DDEBUG is not passed at build time.

`x` :

  debugging information.

### D_ASSERT()

    #define     D_ASSERT(exp, msg)

The macro outputs `msg` if the expression `exp` evaluates to FALSE.

`exp` :

  expression to evaluate.

`msg` :

  message to output if `exp` fails.

### D_ASSERT_PTR()

    #define     D_ASSERT_PTR(ptr)

The macro asserts the existence (i.e. non-NULL-ness) of the given pointer, and outpus a message if it is NULL.

`ptr` :

  pointer to check.

### D_ENTER

    #define     D_ENTER

The macro updates internal debugging state when entering the function where this macro is used. Use it at the beginning of a function, but don't forget to properly match up D_ENTER with D_RETURN! The macro outpus the name of the entered function indented by the current nesting level.

### D_RETURN

    #define     D_RETURN

The macro updates internal debugging state when leaving the function where this macro is used. Use this macro wherever the function can be left, and don't forget D_ENTER.

### D_RETURN_()

    #define     D_RETURN_(x)

Same as D_RETURN, but for return with an argument.

`x` :

  return value.

### nd_debug_gtk_widget_unref ()

    void        nd_debug_gtk_widget_unref       (GtkWidget *w);

`w` :

### nd_debug_gtk_object_set_data_full ()

    void        nd_debug_gtk_object_set_data_full
                                                (GtkObject *object,
                                                 const gchar *key,
                                                 gpointer data,
                                                 GtkDestroyNotify destroy);

`object` :

`key` :

`data` :

`destroy` :

### gtk_widget_unref

    #define gtk_widget_unref         nd_debug_gtk_widget_unref

### gtk_object_set_data_full

    #define gtk_object_set_data_full nd_debug_gtk_object_set_data_full

Prev | Home | Next
nd_clipboard | Up | nd_dialog