File: BranchOverNewBuffer.fth

package info (click to toggle)
fcode-utils 1.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 46,768 kB
  • sloc: ansic: 9,717; csh: 241; makefile: 129; sh: 17
file content (33 lines) | stat: -rw-r--r-- 781 bytes parent folder | download | duplicates (20)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
\  Test case:  a normal-size branch that takes place across the point
\      where the output buffer was expanded.
\  We will use a body generated by the "Verbal Bottles of Beer" script
\  To just almost but not quite fill up the buffer.
\  A parameter of 645 does it

fcode-version2          \  Sixteen-bit offsets.

headers

\  Try various tricks to force an allocation of the space
\      just above the output buffer so that the realloc of
\      the output buffer will be forced into a new space
f[
       fload LotsOfAliases.fth
  f]

: a-lot-of-beer
    ." We're about a third of the way into a school-bus trip" cr
    ." that started with a thousand bottles." cr

fload Almost_a_Buffer_of_Beer.fth

    0 if

fload No_Beer.fth

    then
    ." It's so over."
;

fcode-end