SpaceBubble  v0.98
Macros | Functions | Variables
trace.c File Reference

Wii trace module. More...

#include <stdio.h>
#include <gccore.h>
#include <ogcsys.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdarg.h>
#include <time.h>
#include "trace.h"

Macros

#define MAX_BUFFER_SIZE   8192
 

Functions

int traceOpen (char *filename)
 
int traceClose ()
 
char * getDate ()
 
int traceEvent (char *functionName, int threadNr, char *event,...)
 
int traceEventRaw (char character)
 

Variables

bool traceOn = false
 
FILE * fp = NULL
 

Detailed Description

Wii trace module.

Author
wplaat

Copyright (C) 2008-2010 PlaatSoft

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Macro Definition Documentation

#define MAX_BUFFER_SIZE   8192

Function Documentation

char* getDate ( )

Create trace timestamp

Author
wplaat
Returns
The timestamp in Dutch format.
int traceClose ( )

Close trace file

Author
wplaat
int traceEvent ( char *  functionName,
int  threadNr,
char *  event,
  ... 
)

Save trace event in trace file

Author
wplaat
Parameters
functionNameThe functionName
threadNrThe thread number [0=main thread, 1=network thread]
eventThe event discription
...Optional parameters.
Returns
Zero is succesful.
int traceEventRaw ( char  character)

Save trace event in trace file.

Author
wplaat
Parameters
characterThe character range between 0...255
Returns
Zero is succesful.
int traceOpen ( char *  filename)

Create trace file

Author
wplaat
Parameters
filenameThe filename of the trace file

Variable Documentation

FILE* fp = NULL
bool traceOn = false