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

    File:    File.Size.c
    Author:  Copyright  1993 Jason Williams, 1994 Tony Houghton
    Version: 1.02 (24 Sep 1994)
    Purpose: Reads the size of the given file
*/

#include "kernel.h"

#include "Desk.file.h"

extern int Desk_File_Size(const char *filename)
{
  _kernel_osfile_block osfile;

  if (_kernel_osfile(17, filename, &osfile) == 1)
    return (osfile.start);
  else
    return (0);
}
