File:  [gforth] / gforth / test / libcc.fs
Revision 1.2: download - view: text, annotated - select for diffs
Tue May 29 08:55:34 2007 UTC (14 years, 2 months ago) by anton
Branches: MAIN
CVS tags: HEAD
additional libcc test

    1: require libcc.fs
    2: 
    3: \c #include <string.h>
    4: \c #include <stdlib.h>
    5: 
    6: c-function strlen strlen a -- n
    7: cr s\" fooo\0" 2dup dump drop .s strlen cr .s drop cr 
    8: c-function labs labs n -- n
    9: 
   10: \c #include <sys/types.h>
   11: \c #include <unistd.h>
   12: c-function dlseek lseek n d n -- d
   13: 
   14: cr s\" fooo\0" 2dup dump drop .s strlen cr .s drop cr 
   15: -5 labs .s drop cr

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>