Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing parserm.h

LTI_Insert (lines 4363-4382)

4363  #Ifnot; ! TARGET_GLULX
4364   
4365  [ LTI_Insert i ch  b y;
4366   
4367      ! Protect us from strict mode, as this isn't an array in quite the
4368      ! sense it expects
4369      b = buffer;
4370   
4371      ! Insert character ch into buffer at point i.
4372      ! Being careful not to let the buffer possibly overflow:
4373      y = b-->0;
4374      if (y > INPUT_BUFFER_LEN) y = INPUT_BUFFER_LEN;
4375   
4376      ! Move the subsequent text along one character:
4377      for (y=y+WORDSIZE : y>i : y--) b->y = b->(y-1);
4378      b->i = ch;
4379   
4380      ! And the text is now one character longer:
4381      if (b-->0 < INPUT_BUFFER_LEN) (b-->0)++;
4382  ];


Last updated 27 February 2004. The librarian in charge of this page is Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight. Please email any comments, suggestions or corrections to cedenqs@inform-fiction.org.