/* %Src=tst-blk.c %Dir=\rltraynh/c/stuff/ %Date=93/03/11-10:02am */ /* #define DEBUGGING */ /* #define TESTING 1 */ #include "stdlib.h" #include "stdio.h" #include "string.h" #ifdef __TURBOC__ /*** PC-Specific stuff goes in this block ***/ #include "conio.h" #endif #include "..\xci\xci.h" #include "..\base\tu.h" #include "..\base\tf.h" #include "..\base\tu-toks.h" #include ".\tu-blk.h" char *Prog_version = "Tst-tf (V-0.0)"; /********************* SPECIFIC THINGS YOU SHOULD LOOK AT **************/ /* The following are allocted in Init_tu_blk() */ struct Blk_struct *GG_scratch_block = NULL; /* scratch pad area */ #define DEF_BLK_32000 32000 char *GG_block_xs; /** a string; other good sizes might be 81 chars, 133, etc or 35M (!;) **/ #define MAX_GG_BLOCK_XS_SIZE 255 /*************************************************************** END THINGS ***/ #include "..\base\tu.c" #include "..\base\tf.c" #include "..\base\tu-toks.c" #include ".\tu-blk.c" /*---------------------------------------------- Function prototypes ----*/ void Init_tst_blk (short argc, char *argv[]); void Run_command_loop (struct Blk_struct *Blk); /*------------------------*/ int main (int argc, char *argv[]) /*------------------------*/ { int i; /** BEGIN **/ GG_verbose = 1; /* report system results */ printf ("---tst-blk.c :: argc = %d\n", argc); for (i=0; i Blk_start; /* start at top */ while (1==1) /* do forever */ { GG_sys = system ("cls"); printf ("-----------------------------------------------------------------\n"); Show_lines_starting_at_in_text_block (INP_blk_ptr, Cur_char, Height); printf ("-----------------------------------------------------------------\n"); printf ("==>"); Input (GG_command_lower); Trim (GG_command_lower); strcpy (GG_command_upper, GG_command_lower); Upper (GG_command_upper); if (strcmp (GG_command_upper, "QQ") == 0) return; /** EXIT BACK **/ } /* end forever */ }