/*
    ####             #    #     # #
    #   #            #    #       #          The FreeWare C library for
    #   #  ##   ###  #  # #     # ###             RISC OS machines
    #   # #  # #     # #  #     # #  #   ___________________________________
    #   # ####  ###  ##   #     # #  #
    #   # #        # # #  #     # #  #    Please refer to the accompanying
    ####   ### ####  #  # ##### # ###    documentation for conditions of use
    ________________________________________________________________________

    File:    Debug1.c.Debug1
    Author:  Julian Smith
    Version: 0.00 (04 Jun 1995)
    Purpose: Provides a set of Debug_ function which send stuff to stderr
*/


#include <stdarg.h>
#include <stdio.h>

#include "Desk.Debug.h"
#include "Desk.Error.h"

#include "Defs.h"


void	Desk_Debug_Initialise( void)
{
/* We're only a simple library...	*/
}


int	Desk_Debug_VPrintf( const char *format, va_list va)
	{
	Desk_Debug__LineNestingPrefix( stderr);
	return vfprintf( stderr, format, va);
	}

int	Desk_Debug_Printf( const char *format, ...)
{
va_list	va;
int	i;
Desk_Debug__LineNestingPrefix( stderr);
va_start(va, format);
i = Desk_Debug_VPrintf( format, va);
va_end(va);
return i;
}


void	Desk_Debug_Print( const char *text)
{
Desk_Debug__LineNestingPrefix( stderr);
fputs( text, stderr);
}


void	Desk_Debug_Finalise( void)
{
	Desk_Debug_Printf( Desk_error_PLACE "Desk_Debug_Finalise called\n");
}

