Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5075 in orxonox.OLD for trunk/src/defs


Ignore:
Timestamp:
Aug 19, 2005, 3:21:27 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: redirected all printf-output to the shell
This is just for testing purposes, and will be changed again in the future (perhaps)

Location:
trunk/src/defs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/defs/debug.h

    r5048 r5075  
    2727
    2828#include "confincl.h"
     29#include "shell.h"
    2930
    3031#include <stdio.h>
     
    9798#define PRINTFVDEBUG  PRINTF5
    9899
     100//#ifdef
     101//#define PRINTF(x)        PRINT(x)
     102#define PRINT_EXEC       Shell::addBufferLineStatic
     103
    99104#ifdef DEBUG
    100105
     
    105110#define PRINTF1 \
    106111    if (SOFT_DEBUG_LEVEL >= ERR) \
    107       printf("ERROR::%s:%d:", __FILE__, __LINE__) && printf
     112      printf("ERROR::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC
    108113#else
    109114#define PRINTF1 if (NO)
     
    113118#define PRINTF2 \
    114119     if (SOFT_DEBUG_LEVEL >= WARN) \
    115        printf("WARNING::%s:%d:", __FILE__, __LINE__) && printf
     120       printf("WARNING::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC
    116121
    117122#else
     
    122127#define PRINTF3 \
    123128     if (SOFT_DEBUG_LEVEL >= INFO) \
    124        printf("INFO::%s:%d:", __FILE__, __LINE__) && printf
     129       printf("INFO::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC
    125130#else
    126131#define PRINTF3 if (NO)
     
    130135#define PRINTF4 \
    131136     if (SOFT_DEBUG_LEVEL >= DEBUG) \
    132        printf("DEBUG::%s:%d:", __FILE__, __LINE__) && printf
     137       printf("DEBUG::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC
    133138#else
    134139#define PRINTF4 if (NO)
     
    138143#define PRINTF5 \
    139144     if (SOFT_DEBUG_LEVEL >= vDEBUG) \
    140        printf("VERYDEBUG::%s:%d:", __FILE__, __LINE__) && printf
     145       printf("VERYDEBUG::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC
    141146#else
    142147#define PRINTF5 if (NO)
     
    148153
    149154#define PRINTF0 \
    150     printf("%s:%d::", __FILE__, __LINE__) && printf
     155    printf("%s:%d::", __FILE__, __LINE__) && PRINT_EXEC
    151156
    152157
     
    168173#define PRINT1  \
    169174  if (SOFT_DEBUG_LEVEL >= ERR)  \
    170     printf
     175    PRINT_EXEC
    171176#else
    172177#define PRINT1 if (NO)
     
    176181#define PRINT2 \
    177182  if (SOFT_DEBUG_LEVEL >= WARN) \
    178     printf
     183    PRINT_EXEC
    179184
    180185#else
     
    185190#define PRINT3 \
    186191  if (SOFT_DEBUG_LEVEL >= INFO) \
    187     printf
     192    PRINT_EXEC
    188193#else
    189194#define PRINT3 if (NO)
     
    193198#define PRINT4 \
    194199  if (SOFT_DEBUG_LEVEL >= DEBUG) \
    195     printf
     200    PRINT_EXEC
    196201#else
    197202#define PRINT4 if (NO)
     
    201206#define PRINT5 \
    202207     if (SOFT_DEBUG_LEVEL >= vDEBUG) \
    203        printf("VERYDEBUG::%s:%d:", __FILE__, __LINE__) && printf
     208       PRINT_EXEC("VERYDEBUG::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC
    204209#else
    205210#define PRINT5 if (NO)
     
    212217
    213218#define PRINT0 \
    214   printf
     219  PRINT_EXEC
    215220
    216221#endif /* _DEBUG_H */
  • trunk/src/defs/stdincl.h

    r4697 r5075  
    22  \file stdincl.h
    33  \brief This file includes default headers that nearly every Class needs.
    4  
     4
    55  no Class is defined here, but many headers to classes, and more general Headers like the openGL-header.
    66*/
     
    2323
    2424#include "error.h"
    25 #include "debug.h"
    2625#include "globals.h"
    2726
Note: See TracChangeset for help on using the changeset viewer.