Annotation of gforth/ec/builttag.fs, revision 1.1
1.1 ! pazsan 1: \ builttag.fs
! 2:
! 3: variable builtnr
! 4: create linebuf 200 chars allot
! 5: create filename 200 chars allot
! 6: 0 value fd
! 7:
! 8: : s'
! 9: [char] ' parse postpone sliteral ; immediate
! 10:
! 11: : builttag
! 12: sourcefilename filename place
! 13: 'n filename count + 1 chars - c!
! 14: filename count r/o bin open-file
! 15: IF drop 0 builtnr !
! 16: ELSE >r linebuf 100 r@ read-line drop drop
! 17: linebuf swap 0 -rot 0 -rot >number 2drop drop 1+
! 18: builtnr ! r> close-file throw
! 19: THEN
! 20: filename count r/w bin create-file throw to fd
! 21: base @ >r decimal
! 22: builtnr @ s>d <# #S #> fd write-file throw
! 23: s" constant built#" fd write-line throw
! 24: s' const create builtdate ," ' fd write-file throw
! 25: time&date >r >r >r
! 26: s>d <# ': hold # # #> fd write-file throw
! 27: s>d <# bl hold # # #> fd write-file throw
! 28: drop
! 29: r> s>d <# '. hold # # #> fd write-file throw
! 30: r> s>d <# '. hold # # #> fd write-file throw
! 31: r> s>d <# # # # # #> fd write-file throw
! 32: s' "' fd write-line throw
! 33: s' : .built cr ." Built #" built# . ." Date " builtdate count type cr ;'
! 34: fd write-line throw
! 35: fd close-file throw
! 36: filename count included
! 37: r> base ! ;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>