Category : Pascal Source Code
Archive   : PASTOOLS.ZIP
Filename : STRLIB.INC

 
Output of file : STRLIB.INC contained in archive : PASTOOLS.ZIP

const strlib_tag: string[90]
= #0'@(#)CURRENT_FILE LAST_UPDATE Long string library 1.0'#0;
#log Long string library 1.0

{--
-- Long string package
--
-- Author: S.H.Smith, 25-apr-86
--
--}


{--
-- Package specification
--
--}

type
string_buffer_pointer = ^string_buffer;
string_buffer = array[1..maxint] of char;

long_string_record = record
length: integer;
max_length: integer;
value: string_buffer_pointer;
end;

long_string_pointer = ^long_string_record;
short_string = string[255];


function new_long_string(max: integer): long_string_pointer;
var
str: long_string_pointer;

begin
new(str);
with str^ do
begin
length := 0;
max_length := max;
getmem(value,str^.max_length);
end;
new_long_string := str;
end;


function copy_long_string(old: long_string_pointer): long_string_pointer;
var
str: long_string_pointer;
i: integer;
begin
str := new_long_string(old^.max_length);
str^.length := old^.length
str^.value^ := old^.value;
copy_long_string := str;
end;




  3 Responses to “Category : Pascal Source Code
Archive   : PASTOOLS.ZIP
Filename : STRLIB.INC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/