Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing parserm.h

LTI_Insert (lines 3528-3551)

3528  !  Provided for use by language definition files
3529  ! ----------------------------------------------------------------------------
3530   
3531  [ LTI_Insert i ch  b y;
3532   
3533    !   Protect us from strict mode, as this isn't an array in quite the
3534    !   sense it expects
3535        b = buffer;
3536   
3537    !   Insert character ch into buffer at point i.
3538   
3539    !   Being careful not to let the buffer possibly overflow:
3540   
3541        y = b->1;
3542        if (y > b->0) y = b->0;
3543   
3544    !   Move the subsequent text along one character:
3545   
3546        for (y=y+2: y>i : y--) b->y = b->(y-1);
3547        b->i = ch;
3548   
3549    !   And the text is now one character longer:
3550        if (b->1 < b->0) (b->1)++;
3551  ];


Last updated 27 February 2004. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.