1AUTRESIZEBLOCK(3) AUT FUNCTIONS AUTRESIZEBLOCK(3)
2
3
4
6 autresizeblock - resizes a memory block
7
9 #include "aut101.h"
10 char ∗autresize( Source, OldSize, NewSize )
11 char ∗Source;
12 unsigned int OldSize;
13 unsigned int NewSize;
14
16 Source Pointer to the memory block to be resized.
17
18 OldSize Old size of the memory block.
19
20 NewSize New size of the memory block.
21
23 autresizeblock resizes a memory block from OldSize to NewSize. if New‐
24 Size is greater than OldSize then the new bytes are set to zero.
25
27 autresizeblock returns the pointer to the resized block.
28
30 "autresize: resize error, can't continue !"
31 System break can't be moved anymore, no more memory can be
32 retrieved from the system.
33
35 #include "aut101.h"
36 char ∗concatstring( t, s )
37 char ∗ t;
38 char ∗ s;
39 {
40 t = (char ∗)autresizeblock( t, strlen(t)+1, strlen(t)+strlen(s)+1);
41 strcat(t, s);
42 return t;
43 }
44
46 aut(1), autallocheap(3), autallocblock(3), autfreeblock(3), autfree‐
47 heap(3).
48
49
50
51
52
53
54ASIM/LIP6 October 1, 1997 AUTRESIZEBLOCK(3)