; FPEngine code for Slayer
; Slayer - a desktop anti-virus for RISC OS
; Copyright (C) 1996 - 2000 Kiwi Software (UK)
;
; 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; either version 2 of the License, or
; any later version.
;
; 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
;
; info@kiwisoft.co.uk
; -------------------------------------------------------------------------


; Version 0.01 last updated 09/11/99 (Luke)
; simply return the file size of the file

#base 0
#type &FFD
#name ^.FileSize
#smile

TEMP	r12

#include "SlayEng:h.versions"

; 	=> 	r1 = filename

;	<=	r0 = crc (in this case actually file size)
			mov		r0,#17		;get file info with no path
			;		r1 already contains filename
			swi		XOS_File
			bvs		exit_from_error
			mov		r0,r4		;filesize
			mov		pc,r14		;return to sender

.exit_from_error	mvn		r0,#0
			ldmfd		r13!,{pc}	;unstack and return to caller


.copyright_string	dcb		" Kiwi Software (UK), 1999",0
			align

.version_text		dcb		"FileSize",0
			align

.copyright_str_pointer	dcd		copyright_string

.infoblocks_date	dcd		0	;will be filled in when cert
			dcd		0	;with UTC time

.plugin_reserved	dcd		0

.version_text_pointer	dcd		version_text

.infoblocks_version	dcd		FP_FileSize_Version

.plugin_crc		dcd		0

.plugin_header		dcb		"SLAY"
