Page 1 of 1

negative numbers in file-info

Posted: Tue Nov 28, 2006 4:30 pm
by cormullion
I noticed today that I'm getting negative numbers in file-info:

Code: Select all

(file-info "/Users/me/Documents/arch.img")
(-783613952 33188 0 501 501 1160658286 1160653047 1160653047)
I wonder why it doesn't return an unsigned decimal by default:

Code: Select all

(set 's (first (file-info "/Users/me/Documents/arch.img"))) 
-783613952
> (format {%u} s)
"3511353344"
It's not a problem, now that i know, just wondered why.

Posted: Fri Dec 01, 2006 12:29 am
by Lutz
The underlying OS function queried for this info reports the size as a signed 32-bit number.

Lutz

Posted: Fri Dec 01, 2006 1:08 am
by Lutz
... now that newLISP handles 64-bit size files this should probably reported differently, I have put it on my to-do list.

Lutz