j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: wmb Date: 2007-05-16 10:37:18 +0200 (Wed, 16 May 2007) New Revision: 385
Modified: cpu/x86/pc/olpc/gui.fth Log: OLPC graphical boot - suppressed "Can't open file" message for nonexistent icons.
Modified: cpu/x86/pc/olpc/gui.fth =================================================================== --- cpu/x86/pc/olpc/gui.fth 2007-05-16 08:36:26 UTC (rev 384) +++ cpu/x86/pc/olpc/gui.fth 2007-05-16 08:37:18 UTC (rev 385) @@ -26,10 +26,10 @@ ;
: $get-image ( filename$ -- true | adr,len false ) - ['] $read-open catch if 2drop true exit then ( ) - ifd @ fsize dup alloc-mem swap ( bmp-adr,len ) - 2dup ifd @ fgets over <> ( bmp-adr,len error? ) - ifd @ fclose ( bmp-adr,len ) + r/o open-file if drop true exit then >r ( r: fd ) + r@ fsize dup alloc-mem swap ( bmp-adr,len r: fd ) + 2dup r@ fgets over <> ( bmp-adr,len error? r: fd ) + r> fclose ( bmp-adr,len ) if free-mem true else false then ( true | bmp-adr,len false ) ; : $show ( filename$ -- )