home *** CD-ROM | disk | FTP | other *** search
- /*
- tbsetmax.c
-
- % tb_SetMaxSize
-
- C-scape 3.2
- Copyright (c) 1988 by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- ---------------------
- 6/10/88 jdc created
- 7/06/89 jdc size == 0 now turns off limiting
-
- 3/28/90 jmd ansi-fied
- */
-
- #include "textbuf.h"
-
- int tb_SetMaxSize(tb_type tb, long size)
- {
- int ret = TRUE;
-
- if ( size <= 0L ) {
- tb->limit = FALSE;
- }
- else if ( size < tb->size ) {
- ret = FALSE;
- }
- else {
- tb->max_size = size;
- tb->limit = TRUE;
- }
- return(ret);
- }
-