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

    File:    File.AllocLoad0.c
    Author:  Copyright  1995 Julian Smith
    Version: 1.00 (19 Nov 1995)
    History: 1.00 ()
             1.01 (22 Jul 1995) JS Changed name from Desk_File_AllocLoad to 
                                   Desk_File_AllocLoad0
             1.02 (19 Nov 1995) JS Renamed to AllocLoad0.c
*/

#include "Desk.File.h"



char*	Desk_File_AllocLoad0( const char *filename)
{
int	length;
char*	buffer = Desk_File_AllocLoad( filename, &length);

if (!buffer)	return NULL;
buffer[ length] = 0;
/* 
This relies on Desk_File_AllocLoad allocating one extra byte, which it does
at the moment...	
 */

return buffer;
}
