aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tecbuf.c172
-rw-r--r--teccmd.c130
-rw-r--r--tecdisp.c94
-rw-r--r--tecexec.c33
-rw-r--r--tecmem.c27
-rw-r--r--teco.c64
-rw-r--r--tecparse.c82
-rw-r--r--tecstate.c22
-rw-r--r--tecterm.c40
-rw-r--r--tecundo.c21
10 files changed, 256 insertions, 429 deletions
diff --git a/tecbuf.c b/tecbuf.c
index fb5e740..b20966a 100644
--- a/tecbuf.c
+++ b/tecbuf.c
@@ -1,9 +1,11 @@
-char *tecbuf_c_version = "tecbuf.c: $Revision: 1.3 $";
+char *tecbuf_c_version = "tecbuf.c: $Revision: 1.4 $";
+
+struct buff_header *buff_create( char *name, char internal_flag );
/*
- * $Date: 2007/12/26 12:05:14 $
+ * $Date: 2007/12/26 13:28:30 $
* $Source: /cvsroot/videoteco/videoteco/tecbuf.c,v $
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
* $Locker: $
*/
@@ -71,8 +73,7 @@ char rcs_date[] = AUTO_DATE;
* it could not find one with the proper name.
*/
struct buff_header *
-buff_find(name)
-char *name;
+buff_find( char *name )
{
register struct buff_header *bp;
register char *cp1,*cp2;
@@ -120,14 +121,12 @@ unsigned int hash = stringHash( name );
* the Q register to be created.
*/
struct buff_header *
-buff_qfind(name,create_flag)
-char name;
-char create_flag;
+buff_qfind( char name, char create_flag )
{
register struct buff_header *hbp;
register int i;
char tmp_buffer[LINE_BUFFER_SIZE],tmp_message[LINE_BUFFER_SIZE];
-struct buff_header *buff_create();
+//struct buff_header *buff_create();
PREAMBLE();
(void) strcpy(tmp_buffer,TECO_INTERNAL_BUFFER_NAME);
@@ -162,9 +161,7 @@ struct buff_header *buff_create();
* problem of some sort.
*/
struct buff_header *
-buff_create(name,internal_flag)
-char *name;
-char internal_flag;
+buff_create( char *name, char internal_flag )
{
register struct buff_header *bp;
register struct buff_header *obp;
@@ -268,8 +265,7 @@ register int i = 0;
* the push Q register command ('[').
*/
struct buff_header *
-buff_duplicate(sbp)
-register struct buff_header *sbp;
+buff_duplicate( struct buff_header *sbp )
{
register struct buff_header *dbp;
register struct buff_line *slp;
@@ -347,10 +343,7 @@ register struct buff_line *dlp;
* destination.
*/
void
-movc3(source,dest,count)
-register char *source;
-register char *dest;
-register int count;
+movc3( char *source, char *dest, int count )
{
PREAMBLE();
@@ -369,8 +362,7 @@ register int count;
* all the lines in the buffer, all the display lines, etc.
*/
void
-buff_destroy(hbp)
-register struct buff_header *hbp;
+buff_destroy( struct buff_header *hbp )
{
register struct buff_header *bp;
register struct buff_line *lbp;
@@ -435,9 +427,7 @@ register struct buff_line *lbp;
* the buffer position resides on.
*/
struct buff_line *
-buff_find_line(hbp,position)
-register struct buff_header *hbp;
-int position;
+buff_find_line( struct buff_header *hbp, int position )
{
register struct buff_line *lbp;
register int i;
@@ -538,10 +528,8 @@ register int i;
* the specified position.
*/
int
-buff_find_offset(hbp,lbp,position)
-register struct buff_header *hbp;
-register struct buff_line *lbp;
-int position;
+buff_find_offset( struct buff_header *hbp,
+ struct buff_line *lbp, int position )
{
PREAMBLE();
@@ -574,9 +562,7 @@ int position;
* of characters at any one time.
*/
int
-buff_contents(hbp,position)
-register struct buff_header *hbp;
-register int position;
+buff_contents( struct buff_header *hbp, int position )
{
register struct buff_line *lbp;
register int i;
@@ -615,10 +601,8 @@ register int i;
* of characters at any one time.
*/
int
-buff_cached_contents(hbp,position,cache)
-register struct buff_header *hbp;
-int position;
-struct position_cache *cache;
+buff_cached_contents( struct buff_header *hbp,
+ int position, struct position_cache *cache )
{
register struct buff_line *lbp;
register int i;
@@ -702,10 +686,7 @@ buff_init()
* buffer already exists, we simply switch to it and don't modify it.
*/
int
-buff_openbuffer(name,buffer_number,readonly_flag)
-char *name;
-int buffer_number;
-int readonly_flag;
+buff_openbuffer( char *name, int buffer_number, int readonly_flag )
{
register struct buff_header *hbp = NULL;
@@ -775,9 +756,7 @@ int readonly_flag;
* made the 'current' edit buffer.
*/
int
-buff_openbuffnum(buffer_number,map_flag)
-int buffer_number;
-int map_flag;
+buff_openbuffnum( int buffer_number, int map_flag )
{
register struct buff_header *hbp;
@@ -808,8 +787,7 @@ int map_flag;
* list.
*/
void
-buff_reopenbuff(bp)
-register struct buff_header *bp;
+buff_reopenbuff( struct buff_header *bp )
{
register struct buff_header *obp;
@@ -862,9 +840,7 @@ register struct buff_header *obp;
* The edit buffer must already exist.
*/
int
-buff_read(hbp,name)
-struct buff_header *hbp;
-char *name;
+buff_read( struct buff_header *hbp, char *name )
{
int iochan;
char tmp_message[LINE_BUFFER_SIZE];
@@ -898,10 +874,7 @@ char *name;
* buffer.
*/
int
-buff_readfd(hbp,name,iochan)
-struct buff_header *hbp;
-char *name;
-int iochan;
+buff_readfd( struct buff_header *hbp, char *name, int iochan )
{
char iobuf[IO_BUFFER_SIZE];
char linebuf[IO_BUFFER_SIZE];
@@ -938,7 +911,7 @@ int iochan;
linebuf_cnt += 1;
bcount -= 1;
- if((*cp++ = *iop++) == '\n' || linebuf_cnt >= sizeof(linebuf)){
+ if((*cp++ = *iop++) == '\n' || (unsigned)linebuf_cnt >= sizeof(linebuf)){
lbp = buff_find_line(hbp,hbp->dot);
if(lbp == NULL){
error_status = FAIL;
@@ -1019,11 +992,7 @@ int iochan;
* wishes to write out the contents of the buffer.
*/
int
-buff_write(hbp,chan,start,end)
-struct buff_header *hbp;
-int chan;
-int start;
-int end;
+buff_write( struct buff_header *hbp, int chan, int start, int end )
{
register int bcount;
register struct buff_line *lbp;
@@ -1086,9 +1055,7 @@ int status;
* to some other edit buffer.
*/
int
-buff_switch(hbp,map_flag)
-struct buff_header *hbp;
-int map_flag;
+buff_switch( struct buff_header *hbp, int map_flag )
{
char tmp_message[LINE_BUFFER_SIZE];
char *cp;
@@ -1139,7 +1106,7 @@ int max_length;
buff_delete(curbuf,0,curbuf->zee);
- for(i = 0; i < sizeof(padd_buffer); i++){
+ for(i = 0; (unsigned)i < sizeof(padd_buffer); i++){
padd_buffer[i] = ' ';
}/* End FOR */
padd_buffer[sizeof(padd_buffer)-1] = '\0';
@@ -1280,11 +1247,7 @@ int max_length;
* at the buffer's current location.
*/
int
-buff_insert(hbp,position,buffer,length)
-struct buff_header *hbp;
-register int position;
-register char *buffer;
-register int length;
+buff_insert( struct buff_header *hbp, int position, char *buffer, int length )
{
struct buff_header fake_header;
struct buff_line *fake_line;
@@ -1361,13 +1324,12 @@ register char *cp;
* over using the byte-at-a-time routines.
*/
int
-buff_insert_from_buffer_with_undo(ct,dbp,dest_position,sbp,src_position,length)
-struct cmd_token *ct;
-struct buff_header *dbp;
-int dest_position;
-struct buff_header *sbp;
-int src_position;
-int length;
+buff_insert_from_buffer_with_undo( struct cmd_token *ct,
+ struct buff_header *dbp,
+ int dest_position,
+ struct buff_header *sbp,
+ int src_position,
+ int length )
{
register int i;
struct undo_token *ut = 0;
@@ -1799,12 +1761,11 @@ extern int tty_input_chan;
* also need to be un-inserted if the command is undone.
*/
int
-buff_insert_with_undo(ct,hbp,position,buffer,length)
-struct cmd_token *ct;
-struct buff_header *hbp;
-register int position;
-register char *buffer;
-register int length;
+buff_insert_with_undo( struct cmd_token *ct,
+ struct buff_header *hbp,
+ int position,
+ char *buffer,
+ int length )
{
struct undo_token *ut;
@@ -1839,10 +1800,9 @@ struct undo_token *ut;
* invalid, etc.
*/
int
-buff_insert_char(hbp,position,data)
-register struct buff_header *hbp;
-int position;
-char data;
+buff_insert_char( struct buff_header *hbp,
+ int position,
+ char data )
{
register struct buff_line *lbp;
struct buff_line *nlbp;
@@ -1982,11 +1942,10 @@ register int i,j;
* to be input can be undone if necessary.
*/
int
-buff_insert_char_with_undo(ct,hbp,position,data)
-struct cmd_token *ct;
-register struct buff_header *hbp;
-int position;
-char data;
+buff_insert_char_with_undo( struct cmd_token *ct,
+ struct buff_header *hbp,
+ int position,
+ char data )
{
struct undo_token *ut;
@@ -2018,10 +1977,9 @@ struct undo_token *ut;
* at the specified location in the buffer.
*/
void
-buff_delete(hbp,position,count)
-struct buff_header *hbp;
-int position;
-register int count;
+buff_delete( struct buff_header *hbp,
+ int position,
+ int count )
{
PREAMBLE();
@@ -2057,9 +2015,8 @@ register int count;
* the current buffer position.
*/
int
-buff_delete_char(hbp,position)
-register struct buff_header *hbp;
-int position;
+buff_delete_char( struct buff_header *hbp,
+ int position )
{
register struct buff_line *lbp;
struct buff_line *nlbp;
@@ -2208,11 +2165,10 @@ register int i,j;
* just move the line buffers over to the undo list.
*/
int
-buff_delete_with_undo(ct,hbp,position,count)
-struct cmd_token *ct;
-struct buff_header *hbp;
-int position;
-int count;
+buff_delete_with_undo( struct cmd_token *ct,
+ struct buff_header *hbp,
+ int position,
+ int count )
{
register char *cp;
struct undo_token *ut;
@@ -2410,11 +2366,10 @@ int bytes_deleted_so_far = 0;
* the specified position in the buffer.
*/
void
-buff_bulk_insert(hbp,position,count,lbp)
-struct buff_header *hbp;
-int position;
-int count;
-register struct buff_line *lbp;
+buff_bulk_insert( struct buff_header *hbp,
+ int position,
+ int count,
+ struct buff_line *lbp )
{
register struct buff_line *olbp;
int offset;
@@ -2514,8 +2469,7 @@ int offset;
* of bytes.
*/
struct buff_line *
-allocate_line_buffer(size)
-register int size;
+allocate_line_buffer( int size )
{
register struct buff_line *lbp;
@@ -2578,8 +2532,7 @@ register struct buff_line *lbp;
* associated storage as well as the buffer itself.
*/
void
-buff_free_line_buffer(lbp)
-register struct buff_line *lbp;
+buff_free_line_buffer( struct buff_line *lbp )
{
PREAMBLE();
@@ -2614,8 +2567,7 @@ register struct buff_line *lbp;
* This routine will delete an entire list of line buffers
*/
void
-buff_free_line_buffer_list(lbp)
-register struct buff_line *lbp;
+buff_free_line_buffer_list( struct buff_line *lbp )
{
register struct buff_line *olbp;
diff --git a/teccmd.c b/teccmd.c
index c1847aa..81a909c 100644
--- a/teccmd.c
+++ b/teccmd.c
@@ -1,9 +1,9 @@
-char *teccmd_c_version = "teccmd.c: $Revision: 1.2 $";
+char *teccmd_c_version = "teccmd.c: $Revision: 1.3 $";
/*
- * $Date: 2007/12/10 22:13:07 $
+ * $Date: 2007/12/26 13:28:30 $
* $Source: /cvsroot/videoteco/videoteco/teccmd.c,v $
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
* $Locker: $
*/
@@ -64,7 +64,7 @@ char *teccmd_c_version = "teccmd.c: $Revision: 1.2 $";
void cmd_checkpoint(void);
#endif /* CHECKPOINT */
- struct tags *tag_load_file();
+ struct tags *tag_load_file( char *string );
void srch_setbits(int *bit_table,char *string);
void srch_setbit(int *bit_table,unsigned char value);
@@ -100,10 +100,10 @@ char *teccmd_c_version = "teccmd.c: $Revision: 1.2 $";
* direction of search and the number of times to search.
*/
int
-cmd_search(arg1,arg2,search_tbl)
-int arg1;
-int arg2;
-struct search_buff *search_tbl;
+cmd_search(
+ int arg1,
+ int arg2,
+ struct search_buff *search_tbl )
{
int count;
char forwards;
@@ -190,10 +190,10 @@ int original_dot;
* This routine is used when the search progresses forward
*/
int
-cmd_forward_search(pos1,pos2,search_tbl)
-int pos1;
-int pos2;
-struct search_buff *search_tbl;
+cmd_forward_search(
+ int pos1,
+ int pos2,
+ struct search_buff *search_tbl )
{
register struct search_element *ep;
register unsigned char buffer_char;
@@ -332,10 +332,10 @@ struct position_cache running_position;
* This routine is used when the search progresses backwards
*/
int
-cmd_reverse_search(pos1,pos2,search_tbl)
-int pos1;
-int pos2;
-struct search_buff *search_tbl;
+cmd_reverse_search(
+ int pos1,
+ int pos2,
+ struct search_buff *search_tbl )
{
register struct search_element *ep;
register unsigned char buffer_char;
@@ -474,9 +474,9 @@ struct position_cache running_position;
* that this is all reversable.
*/
int
-set_search_string_with_undo(string,uct)
-char *string;
-struct cmd_token *uct;
+set_search_string_with_undo(
+ char *string,
+ struct cmd_token *uct )
{
register struct buff_header *qbp;
register struct undo_token *ut;
@@ -577,8 +577,7 @@ int new_length;
* in such a way that it works equally well backward or forward.
*/
int
-compile_search_string(search_tbl)
-struct search_buff *search_tbl;
+compile_search_string( struct search_buff *search_tbl )
{
register int position;
register char c;
@@ -957,8 +956,7 @@ char matchrepeat_flag = NO;
* entry.
*/
void
-srch_setallbits(bit_table)
-register int *bit_table;
+srch_setallbits( int *bit_table )
{
register int i;
@@ -979,8 +977,7 @@ register int i;
* simply invert the setting of the bits in the search table entry.
*/
void
-srch_invert_sense(bit_table)
-register int *bit_table;
+srch_invert_sense( int *bit_table )
{
register int i;
@@ -1000,9 +997,7 @@ register int i;
* It sets each corresponding bit in the search table to a 1.
*/
void
-srch_setbits(bit_table,string)
-register int *bit_table;
-register char *string;
+srch_setbits( int *bit_table, char *string )
{
register int c;
@@ -1022,9 +1017,7 @@ register int c;
* be set in the search table.
*/
void
-srch_setbit(bit_table,value)
-register int *bit_table;
-register unsigned char value;
+srch_setbit( int *bit_table, unsigned char value )
{
PREAMBLE();
@@ -1046,9 +1039,7 @@ register unsigned char value;
* hack it up a bit. This is not guaranteed to work, but...
*/
int
-cmd_write(hbp,filename)
-struct buff_header *hbp;
-char *filename;
+cmd_write( struct buff_header *hbp, char *filename )
{
char base_filename[TECO_FILENAME_COMPONENT_LENGTH + 1];
char path_name[TECO_FILENAME_TOTAL_LENGTH + 1];
@@ -1202,12 +1193,12 @@ int status;
* subdirectories that may be necessary.
*/
int
-cmd_writebak(fi,input_filename,pathname,output_filename,open_flags)
-int fi;
-char *pathname;
-char *input_filename;
-char *output_filename;
-int open_flags;
+cmd_writebak(
+ int fi,
+ char *pathname,
+ char *input_filename,
+ char *output_filename,
+ int open_flags )
{
char tmp_filename[TECO_FILENAME_TOTAL_LENGTH + 1];
char tmp_message[LINE_BUFFER_SIZE];
@@ -1289,8 +1280,7 @@ register int status;
* number of words.
*/
int
-cmd_wordmove(count)
-register int count;
+cmd_wordmove( int count )
{
register int c;
@@ -1364,7 +1354,7 @@ extern char susp_flag;
#ifdef JOB_CONTROL
if(susp_flag++ >= 4){
- signal(SIGTSTP,(void (*)())SIG_DFL);
+ signal(SIGTSTP,(void (*)(int))SIG_DFL);
}/* End IF */
#endif
@@ -1416,7 +1406,7 @@ struct itmlst {
#ifdef UNIX
if(suspend_is_okay_flag == YES){
kill(getpid(),SIGSTOP);
- signal(SIGTSTP,(void (*)())cmd_suspend);
+ signal(SIGTSTP,(void (*)(int))cmd_suspend);
}
#endif /* UNIX */
@@ -1514,7 +1504,7 @@ cmd_interrupt()
if(waiting_for_input_flag == NO){
restore_tty();
fprintf(stderr,"TECO aborted...\n");
- signal(SIGINT,(void (*)())SIG_DFL);
+ signal(SIGINT,(void (*)(int))SIG_DFL);
kill(getpid(),SIGINT);
}/* End IF */
}/* End IF */
@@ -1737,8 +1727,7 @@ register int length;
* user to execute operating system commands from within the editor.
*/
int
-cmd_oscmd(ct)
-register struct cmd_token *ct;
+cmd_oscmd( struct cmd_token *ct )
{
register char *cp;
int pid,w,status;
@@ -1796,7 +1785,7 @@ int buf_pipe[2];
close(2); dup(pipe_desc[1]);
close(pipe_desc[0]);
close(pipe_desc[1]);
- execl("/bin/csh","csh","-cf",cp,0);
+ execl("/bin/csh","csh","-cf",cp,0,NULL);
_exit(127);
}/* End IF */
#endif
@@ -1943,10 +1932,10 @@ register struct buff_header *qbp;
* of the buffer.
*/
int
-rename_edit_buffer(hbp,new_name,uct)
-register struct buff_header *hbp;
-register char *new_name;
-register struct cmd_token *uct;
+rename_edit_buffer(
+ struct buff_header *hbp,
+ char *new_name,
+ struct cmd_token *uct )
{
register int i;
register struct undo_token *ut;
@@ -1983,10 +1972,10 @@ int length;
* actual values are specific to Video TECO
*/
int
-cmd_setoptions(arg1,arg2,uct)
-int arg1;
-int arg2;
-struct undo_token *uct;
+cmd_setoptions(
+ int arg1,
+ int arg2,
+ struct undo_token *uct )
{
struct undo_token fake_token;
extern int tab_width;
@@ -2069,12 +2058,12 @@ extern int tab_width;
* is a flags word which says what to do with the tag
*/
int
-cmd_tags(uct,arg_count,arg1,arg2,string)
-struct cmd_token *uct;
-int arg_count;
-int arg1;
-int arg2;
-char *string;
+cmd_tags(
+ struct cmd_token *uct,
+ int arg_count,
+ int arg1,
+ int arg2,
+ char *string )
{
register struct undo_token *ut;
register struct tags *old_tags;
@@ -2191,8 +2180,7 @@ int hashval,skip_cnt;
* EMACS tags files, and builds an internal representation.
*/
struct tags *
-tag_load_file(string)
-register char *string;
+tag_load_file( char *string )
{
FILE *fd = NULL;
register struct tags *tp = NULL;
@@ -2573,8 +2561,7 @@ err:
}/* End Routine */
void
-tag_free_struct(tp)
-register struct tags *tp;
+tag_free_struct( struct tags *tp )
{
register struct tagent **tepp;
register struct tagent *tep;
@@ -2582,7 +2569,7 @@ register int i;
if(tp == NULL) return;
- for(i = 0, tepp = &tp->tagents[0]; i < ELEMENTS(tp->tagents); i++,tepp++){
+ for(i = 0, tepp = &tp->tagents[0]; (unsigned)i < ELEMENTS(tp->tagents); i++,tepp++){
while((tep = *tepp)){
*tepp = tep->te_next;
@@ -2609,8 +2596,7 @@ register int i;
}/* End Routine */
int
-tag_calc_hash(string)
-register char *string;
+tag_calc_hash( char *string )
{
register int hash = 0;
register int c;
@@ -2626,9 +2612,7 @@ register int shift = 0;
}/* End Routine */
void
-tag_dump_database(tp,uct)
-register struct tags *tp;
-struct cmd_token *uct;
+tag_dump_database( struct tags *tp, struct cmd_token *uct )
{
register struct tagent **tepp;
register struct tagent *tep;
@@ -2637,7 +2621,7 @@ char tmp_output[LINE_BUFFER_SIZE];
if(tp == NULL) return;
- for(i = 0, tepp = &tp->tagents[0]; i < ELEMENTS(tp->tagents); i++,tepp++){
+ for(i = 0, tepp = &tp->tagents[0]; (unsigned)i < ELEMENTS(tp->tagents); i++,tepp++){
tep = *tepp;
while(tep){
diff --git a/tecdisp.c b/tecdisp.c
index 9eaaf5a..1276e5e 100644
--- a/tecdisp.c
+++ b/tecdisp.c
@@ -1,9 +1,9 @@
-char *tecdisp_c_version = "tecdisp.c: $Revision: 1.2 $";
+char *tecdisp_c_version = "tecdisp.c: $Revision: 1.3 $";
/*
- * $Date: 2007/12/10 22:13:07 $
+ * $Date: 2007/12/26 13:28:30 $
* $Source: /cvsroot/videoteco/videoteco/tecdisp.c,v $
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
* $Locker: $
*/
@@ -57,6 +57,8 @@ char *tecdisp_c_version = "tecdisp.c: $Revision: 1.2 $";
extern int terminfo_magic_cookie_glitch;
#endif
+void screen_message( char *string );
+
/*
* Global Variables
*/
@@ -671,7 +673,6 @@ int offset;
if(vlp == y) continue;
if(vlp > y){
- void screen_message();
screen_message("insert_line confused");
}/* End IF */
@@ -696,9 +697,7 @@ int offset;
* has happened to the terminal.
*/
void
-screen_account_for_delete_line(y,count)
-int y;
-int count;
+screen_account_for_delete_line( int y, int count )
{
register int i,x;
register struct screen_line *top_lp,*bottom_lp;
@@ -757,9 +756,7 @@ register short *sp;
* has happened to the terminal appearence.
*/
void
-screen_account_for_insert_line(y,count)
-int y;
-int count;
+screen_account_for_insert_line( int y, int count )
{
register int i,x;
register struct screen_line *top_lp,*bottom_lp;
@@ -960,8 +957,7 @@ int first_change,last_change;
* operation.
*/
void
-screen_echo(data)
-char data;
+screen_echo( char data )
{
register int i;
@@ -1016,7 +1012,7 @@ register int i;
data = '$';
break;
case '\n':
- for(i = 0; i < strlen("<CR>"); i++){
+ for(i = 0; (unsigned)i < strlen("<CR>"); i++){
screen_echo("<CR>"[i]);
}/* End FOR */
return;
@@ -1028,7 +1024,7 @@ register int i;
* line.
*/
case '\t':
- for(i = 0; i < strlen(" "); i++){
+ for(i = 0; (unsigned)i < strlen(" "); i++){
screen_echo(" "[i]);
}/* End FOR */
return;
@@ -1063,8 +1059,7 @@ register int i;
* which would be very difficult to back out of.
*/
void
-screen_reset_echo(ct)
-register struct cmd_token *ct;
+screen_reset_echo( struct cmd_token *ct )
{
PREAMBLE();
@@ -1100,8 +1095,7 @@ register struct cmd_token *ct;
* they can be output messages from a user generated with the ^A command.
*/
void
-screen_message(string)
-register char *string;
+screen_message( char *string )
{
register short *sp;
register int i;
@@ -1170,8 +1164,7 @@ too_wide:
* is output to get the humans attention.
*/
void
-error_message(string)
-char *string;
+error_message( char *string )
{
PREAMBLE();
@@ -1213,9 +1206,9 @@ register short *sp;
* This routine copies out the current message up to a certain length.
*/
void
-screen_save_current_message(message_save_buff,message_save_max_length)
-char *message_save_buff;
-int message_save_max_length;
+screen_save_current_message(
+ char *message_save_buff,
+ int message_save_max_length )
{
int i;
short *sp;
@@ -1242,10 +1235,7 @@ short *sp;
* This routine is called to change the label line
*/
int
-screen_label_line(buffer,string,field)
-struct buff_header *buffer;
-char *string;
-int field;
+screen_label_line( struct buff_header *buffer, char *string, int field )
{
register short *sp;
register char *cp;
@@ -1501,8 +1491,7 @@ register struct screen_line *lp;
* specified window.
*/
int
-screen_display_window(wptr)
-register struct window *wptr;
+screen_display_window( struct window *wptr )
{
struct buff_header *hbp;
struct buff_line *tlbp,*blbp;
@@ -1687,8 +1676,7 @@ char saw_dot;
* structures which represent the current edit buffer.
*/
int
-screen_rebuild_from_scratch(wptr)
-register struct window *wptr;
+screen_rebuild_from_scratch( struct window *wptr )
{
struct buff_header *hbp;
struct buff_line *tlbp,*blbp;
@@ -1831,8 +1819,7 @@ int lines,olines;
* screen.
*/
void
-screen_scroll(count)
-int count;
+screen_scroll( int count )
{
struct window *wptr = curwin;
struct screen_line *sp;
@@ -1974,9 +1961,7 @@ struct window *wptr;
* specified window.
*/
void
-screen_free_window_format_lines(wptr,lbp)
-struct window *wptr;
-register struct buff_line *lbp;
+screen_free_window_format_lines( struct window *wptr, struct buff_line *lbp )
{
register struct format_line *sbp,*tsbp;
@@ -2039,8 +2024,7 @@ register struct format_line *sbp,*tsbp;
* screen array.
*/
void
-screen_free_format_lines(sbp)
-register struct format_line *sbp;
+screen_free_format_lines( struct format_line *sbp )
{
register struct format_line *osbp;
register struct format_line *next_win;
@@ -2110,9 +2094,7 @@ register struct format_line *next_win;
}/* End Routine */
void
-screen_check_format_lines(sbp,who)
-register struct format_line *sbp;
-int who;
+screen_check_format_lines( struct format_line *sbp, int who )
{
PREAMBLE();
@@ -2188,9 +2170,7 @@ register struct format_line *sbp;
* have a pointer to the next list of format lines for another window.
*/
struct format_line *
-screen_find_window_format_line(wptr,lbp)
-struct window *wptr;
-struct buff_line *lbp;
+screen_find_window_format_line( struct window *wptr, struct buff_line *lbp )
{
struct format_line *sbp;
@@ -2217,9 +2197,7 @@ struct format_line *sbp;
* of the data, i.e., ready to be written to the terminal.
*/
int
-screen_format_buff_line(wptr,lbp)
-struct window *wptr;
-struct buff_line *lbp;
+screen_format_buff_line( struct window *wptr, struct buff_line *lbp )
{
register struct format_line *sbp;
register char *cp;
@@ -2357,8 +2335,7 @@ char expand_buffer[MAXOF(32,MAX_TAB_WIDTH+1)];
* on, and the offset onto that line (in bytes).
*/
int
-screen_find_dot(wptr)
-struct window *wptr;
+screen_find_dot( struct window *wptr )
{
register struct buff_line *lbp;
register struct format_line *sbp;
@@ -2450,9 +2427,7 @@ struct buff_header *hbp = wptr->win_buffer;
* create one the hard way.
*/
struct format_line *
-allocate_format_buffer(wptr,lbp)
-struct window *wptr;
-struct buff_line *lbp;
+allocate_format_buffer( struct window *wptr, struct buff_line *lbp )
{
register struct format_line *sbp;
struct buff_header *hbp = wptr->win_buffer;
@@ -2554,9 +2529,7 @@ register int i,j;
* stolen from it as it is split into other windows.
*/
struct window *
-create_window(x_size,y_size)
-int x_size;
-int y_size;
+create_window( int x_size, int y_size )
{
register struct window *wptr;
register int i;
@@ -2626,10 +2599,7 @@ register int i;
* into two. This allows him to display several buffers simultaneously.
*/
struct window *
-screen_split_window(old_wptr,lines,buffer_number)
-register struct window *old_wptr;
-int lines;
-int buffer_number;
+screen_split_window( struct window *old_wptr, int lines, int buffer_number )
{
register int i;
register struct window *new_wptr;
@@ -2714,8 +2684,7 @@ register struct screen_line *lp;
* The space gets given back to the window next to it.
*/
void
-screen_delete_window(old_wptr)
-register struct window *old_wptr;
+screen_delete_window( struct window *old_wptr )
{
register int i;
@@ -2822,8 +2791,7 @@ register struct screen_line *lp;
* window.
*/
int
-window_switch(window_number)
-int window_number;
+window_switch( int window_number )
{
register struct window *wptr;
diff --git a/tecexec.c b/tecexec.c
index 6eff3e5..83af814 100644
--- a/tecexec.c
+++ b/tecexec.c
@@ -1,9 +1,9 @@
-char *tecexec_c_version = "tecexec.c: $Revision: 1.2 $";
+char *tecexec_c_version = "tecexec.c: $Revision: 1.3 $";
/*
- * $Date: 2007/12/10 22:13:07 $
+ * $Date: 2007/12/26 13:28:30 $
* $Source: /cvsroot/videoteco/videoteco/tecexec.c,v $
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
* $Locker: $
*/
@@ -51,6 +51,7 @@ char *tecexec_c_version = "tecexec.c: $Revision: 1.2 $";
int find_conditional_end(struct cmd_token *);
int compare_label(struct cmd_token *,struct cmd_token *);
void extract_label(struct cmd_token *,char *);
+ struct wildcard_expansion *expand_filename( char *wildcard_string );
@@ -66,9 +67,7 @@ char *tecexec_c_version = "tecexec.c: $Revision: 1.2 $";
* set by the parse state during syntax analysis.
*/
int
-execute_a_state(ct,uct)
-register struct cmd_token *ct;
-struct cmd_token *uct;
+execute_a_state( struct cmd_token *ct, struct cmd_token *uct )
{
register struct undo_token *ut;
char tmp_buffer[LINE_BUFFER_SIZE],tmp_message[LINE_BUFFER_SIZE];
@@ -140,7 +139,6 @@ char tmp_buffer[LINE_BUFFER_SIZE],tmp_message[LINE_BUFFER_SIZE];
{/* Local Block */
register struct buff_header *qbp;
struct wildcard_expansion *name_list,*np;
- struct wildcard_expansion *expand_filename();
ut = allocate_undo_token(uct);
if(ut == NULL) return(FAIL);
@@ -1954,7 +1952,6 @@ char tmp_buffer[LINE_BUFFER_SIZE],tmp_message[LINE_BUFFER_SIZE];
{/* Local Block */
int status;
struct wildcard_expansion *name_list,*np;
- struct wildcard_expansion *expand_filename();
char *filename;
if(curbuf->isreadonly){
@@ -2010,7 +2007,6 @@ char tmp_buffer[LINE_BUFFER_SIZE],tmp_message[LINE_BUFFER_SIZE];
case EXEC_C_READFILE:
{/* Local Block */
struct wildcard_expansion *name_list,*np;
- struct wildcard_expansion *expand_filename();
if(ct->ctx.carg == NULL || ct->ctx.carg[0] == '\0'){
error_message("?ER Requires a filename");
@@ -2065,7 +2061,6 @@ char tmp_buffer[LINE_BUFFER_SIZE],tmp_message[LINE_BUFFER_SIZE];
{/* Local Block */
struct buff_header *hbp,*old_buffer,*first_buffer;
struct wildcard_expansion *name_list,*np;
- struct wildcard_expansion *expand_filename();
/*
* Here if there is no string argument. It better be a numeric buffer
@@ -2248,7 +2243,6 @@ char tmp_buffer[LINE_BUFFER_SIZE],tmp_message[LINE_BUFFER_SIZE];
{/* Local Block */
struct buff_header *hbp,*old_buffer,*first_buffer;
struct wildcard_expansion *name_list,*np;
- struct wildcard_expansion *expand_filename();
/*
* Here if there is no string argument. It better be a numeric buffer
@@ -2569,8 +2563,7 @@ char tmp_buffer[LINE_BUFFER_SIZE],tmp_message[LINE_BUFFER_SIZE];
* on the Q register stack.
*/
int
-push_qregister(letter)
-char letter;
+push_qregister( char letter )
{
register struct buff_header *hbp;
register struct buff_header *qbp;
@@ -2604,9 +2597,7 @@ register struct buff_header *qbp;
* in it. The current use is for error messages.
*/
void
-extract_label(label_ptr,string1)
-register struct cmd_token *label_ptr;
-char *string1;
+extract_label( struct cmd_token *label_ptr, char *string1 )
{
register char *cp1;
@@ -2633,9 +2624,7 @@ register char *cp1;
* to see if they match.
*/
int
-compare_label(goto_ptr,label_ptr)
-register struct cmd_token *goto_ptr;
-register struct cmd_token *label_ptr;
+compare_label( struct cmd_token *goto_ptr, struct cmd_token *label_ptr )
{
char string1[PARSER_STRING_MAX],string2[PARSER_STRING_MAX];
char *cp1;
@@ -2688,8 +2677,7 @@ char *cp1;
* finds either the else, or the end of the conditional.
*/
int
-find_conditional_else(ct)
-register struct cmd_token *ct;
+find_conditional_else( struct cmd_token *ct )
{
register struct cmd_token *oct;
@@ -2725,8 +2713,7 @@ register struct cmd_token *ct;
* end of the conditional.
*/
int
-find_conditional_end(ct)
-register struct cmd_token *ct;
+find_conditional_end( struct cmd_token *ct )
{
register struct cmd_token *oct;
diff --git a/tecmem.c b/tecmem.c
index 9c063c8..a34a555 100644
--- a/tecmem.c
+++ b/tecmem.c
@@ -1,9 +1,9 @@
-char *tecmem_c_version = "tecmem.c: $Revision: 1.2 $";
+char *tecmem_c_version = "tecmem.c: $Revision: 1.3 $";
/*
- * $Date: 2007/12/10 22:13:07 $
+ * $Date: 2007/12/26 13:28:30 $
* $Source: /cvsroot/videoteco/videoteco/tecmem.c,v $
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
* $Locker: $
*/
@@ -74,9 +74,7 @@ void tecmem_verify(unsigned char,char *,char *);
* This routine is called to request memory
*/
char *
-tec_alloc(type,size)
-int type;
-int size;
+tec_alloc( int type, int size )
{
int actual_size;
register int i,j;
@@ -175,7 +173,7 @@ extern char outof_memory;
if(lookaside_lists[i] == NULL){
j = BIG_MALLOC_HUNK_SIZE / actual_size;
- cp = malloc((unsigned)(BIG_MALLOC_HUNK_SIZE));
+ cp = (char *)malloc((unsigned)(BIG_MALLOC_HUNK_SIZE));
if(cp == NULL){
printf("\nTECO: malloc failed!\n");
@@ -219,9 +217,7 @@ extern char outof_memory;
* by calling the tec_alloc routine.
*/
void
-tec_release(type,addr)
-unsigned char type;
-register char *addr;
+tec_release( unsigned char type, char *addr )
{
register struct memblock *mp;
register struct memlist *lp;
@@ -269,10 +265,7 @@ register int i;
* overwritten by checking the type code.
*/
void
-tecmem_verify(type,addr,message)
-unsigned char type;
-register char *addr;
-char *message;
+tecmem_verify( unsigned char type, char *addr, char *message )
{
register struct memblock *mp;
#if 0
@@ -324,7 +317,7 @@ initialize_memory_stats()
#if HAVE_SBRK
if(starting_break == NULL){
- starting_break = sbrk(0);
+ starting_break = (char *)sbrk(0);
}/* End IF */
#endif
@@ -410,7 +403,7 @@ int bss_in_use;
"MAXTYPE"
};
- if(i >= ELEMENTS(type_name_list)){
+ if((unsigned)i >= ELEMENTS(type_name_list)){
sprintf(
tmp_buffer,
"Unknown memory type index %d(%d)\n",
@@ -433,7 +426,7 @@ int bss_in_use;
}/* End FOR */
#if HAVE_SBRK
- current_break = sbrk(0);
+ current_break = (char *)sbrk(0);
if(current_break != sbrk(0)){
tec_panic("sbrk(0) seems to be allocating space!\n");
}/* End IF */
diff --git a/teco.c b/teco.c
index 4fa003c..c6b2455 100644
--- a/teco.c
+++ b/teco.c
@@ -1,10 +1,10 @@
-char *teco_c_version = "teco.c: $Revision: 1.2 $";
+char *teco_c_version = "teco.c: $Revision: 1.3 $";
char *copyright = "Copyright (c) 1985-2007 Paul Cantrell";
/*
- * $Date: 2007/12/10 22:13:07 $
+ * $Date: 2007/12/26 13:28:30 $
* $Source: /cvsroot/videoteco/videoteco/teco.c,v $
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
* $Locker: $
*/
@@ -113,6 +113,14 @@ char *copyright = "Copyright (c) 1985-2007 Paul Cantrell";
int match_name(char *,char *);
int map_baud(int);
+#ifdef __cplusplus
+extern "C" {
+#endif
+ struct passwd *getpwnam( const char * );
+#ifdef __cplusplus
+}
+#endif
+
/* TECO - Text Edit and COrrector
@@ -123,9 +131,7 @@ char *copyright = "Copyright (c) 1985-2007 Paul Cantrell";
* in the specified files, and generally gets things going.
*/
int
-main(argc,argv)
-int argc;
-char **argv;
+main( int argc, char **argv )
{
register int i;
@@ -770,16 +776,16 @@ int cmd_winch();
alarm(checkpoint_interval);
#endif /* CHECKPOINT */
- signal(SIGINT,(void (*)())cmd_interrupt);
+ signal(SIGINT,(void (*)(int))cmd_interrupt);
#ifdef JOB_CONTROL
if(suspend_is_okay_flag == YES){
- signal(SIGTSTP,(void (*)())cmd_suspend);
+ signal(SIGTSTP,(void (*)(int))cmd_suspend);
}
#endif
#ifdef SUN_STYLE_WINDOW_SIZING
- signal(SIGWINCH,(void (*)())cmd_winch);
+ signal(SIGWINCH,(void (*)(int))cmd_winch);
#endif
}/* End Routine */
@@ -895,9 +901,7 @@ char comment_flag = NO;
void
-check_for_forced_screen_size(argc,argv)
-int argc;
-char **argv;
+check_for_forced_screen_size( int argc, char **argv )
{
register int i;
char *cp, c;
@@ -962,10 +966,7 @@ char *cp, c;
*/
#ifdef UNIX
int
-handle_command_line(which_time,argc,argv)
-int which_time;
-int argc;
-char **argv;
+handle_command_line( int which_time, int argc, char **argv )
{
register int i;
extern struct buff_header *curbuf;
@@ -1339,13 +1340,11 @@ struct wildcard_expansion *name_list;
struct wildcard_expansion *name_list_end;
struct wildcard_expansion *
-expand_filename(wildcard_string)
-char *wildcard_string;
+expand_filename( char *wildcard_string )
{
char temp_name[TECO_FILENAME_TOTAL_LENGTH];
register char *cp,*sp;
struct passwd *pw;
-struct passwd *getpwnam();
PREAMBLE();
@@ -1384,10 +1383,7 @@ struct passwd *getpwnam();
}/* End Routine */
void
-process_directory(wildstr,path,flags)
-char *wildstr;
-char *path;
-int flags;
+process_directory( char *wildstr, char *path, int flags )
{
char directory_path[TECO_FILENAME_TOTAL_LENGTH];
struct wildcard_expansion *np;
@@ -1549,9 +1545,7 @@ read_directory:
* internal teco routines may support this behavior.
*/
int
-match_name(name,pattern)
-char *name;
-char *pattern;
+match_name( char *name, char *pattern )
{
char temp_buff[TECO_FILENAME_TOTAL_LENGTH];
register int c;
@@ -1648,8 +1642,7 @@ int pattern_char;
*
*/
void
-punt(exit_code)
-int exit_code;
+punt( int exit_code )
{
PREAMBLE();
@@ -1665,8 +1658,7 @@ int exit_code;
* This routine is called previous to punt to print an error string
*/
void
-tec_panic(string)
-char *string;
+tec_panic( char *string )
{
PREAMBLE();
@@ -1689,9 +1681,7 @@ char *string;
* after printing the supplied error string.
*/
void
-tec_error(code,string)
-int code;
-char *string;
+tec_error( int code, char *string )
{
PREAMBLE();
@@ -1736,8 +1726,7 @@ open_debug_log_file()
* representation, and maps it into a simple integer value.
*/
int
-map_baud(input_baud_rate)
-int input_baud_rate;
+map_baud( int input_baud_rate )
{
register int i;
int return_baud;
@@ -1796,7 +1785,7 @@ static int equivalent_baudrates[] = {
* Now scan the table for our input baud rate
*/
while(--i >= 0){
- if(input_baud_rate != encoded_bauds[i]) continue;
+ if((unsigned)input_baud_rate != encoded_bauds[i]) continue;
return_baud = equivalent_baudrates[i];
break;
}/* End While */
@@ -1815,8 +1804,7 @@ static int equivalent_baudrates[] = {
* errno error code.
*/
char *
-error_text(err_num)
-register int err_num;
+error_text( int err_num )
{
#ifdef VMS
diff --git a/tecparse.c b/tecparse.c
index 3c70a14..c528ce1 100644
--- a/tecparse.c
+++ b/tecparse.c
@@ -1,9 +1,9 @@
-char *tecparse_c_version = "tecparse.c: $Revision: 1.2 $";
+char *tecparse_c_version = "tecparse.c: $Revision: 1.3 $";
/*
- * $Date: 2007/12/10 22:13:07 $
+ * $Date: 2007/12/26 13:28:30 $
* $Source: /cvsroot/videoteco/videoteco/tecparse.c,v $
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
* $Locker: $
*/
@@ -68,6 +68,9 @@ char *tecparse_c_version = "tecparse.c: $Revision: 1.2 $";
void parser_clean_preserve_list(void);
int parser_getc(void);
int unpreserve_rubout_char(struct cmd_token *);
+ char * trace_convert_opcode_to_name( int opcode );
+ char * trace_convert_state_to_name( int state );
+ char * trace_convert_exec_state_to_name( int state );
@@ -162,8 +165,7 @@ static char no_mem = 0;
* parser tree and execute any associated code.
*/
int
-tecparse_syntax(c)
-int c;
+tecparse_syntax( int c )
{
register struct cmd_token *ct;
struct cmd_token trace_ct;
@@ -475,10 +477,10 @@ struct undo_token *ut;
* way the macro will execute.
*/
int
-tecmacro(qbp,input_ct,macro_cmd_list)
-register struct buff_header *qbp;
-struct cmd_token *input_ct;
-struct cmd_token **macro_cmd_list;
+tecmacro(
+ struct buff_header *qbp,
+ struct cmd_token *input_ct,
+ struct cmd_token **macro_cmd_list )
{
register struct cmd_token *ct;
struct cmd_token trace_ct;
@@ -730,9 +732,7 @@ cleanup:
* ^W, ^U.
*/
int
-parse_special_character(ct,c)
-register struct cmd_token *ct;
-register int c;
+parse_special_character( struct cmd_token *ct, int c )
{
char state_seen;
int tmp;
@@ -833,9 +833,7 @@ int tmp;
* that the edit buffer also gets backed up.
*/
struct cmd_token *
-parse_rubout_character(ct,preserve_flag)
-register struct cmd_token *ct;
-int preserve_flag;
+parse_rubout_character( struct cmd_token *ct, int preserve_flag )
{
register struct cmd_token *oct;
struct undo_token *ut;
@@ -911,8 +909,7 @@ char saved_opcode;
* list. It gets used in rubout / ^U / ^W processing.
*/
struct cmd_token *
-parse_rubout_cmd_token(ct)
-register struct cmd_token *ct;
+parse_rubout_cmd_token( struct cmd_token *ct )
{
register struct cmd_token *oct;
struct undo_token *ut;
@@ -1067,8 +1064,7 @@ printf("!!! iosb[0] is %d\n",qio_iosb[0]);
* that he can get them back if he wants.
*/
void
-preserve_rubout_char(the_byte)
-char the_byte;
+preserve_rubout_char( char the_byte )
{
register struct buff_header *qbp;
@@ -1102,8 +1098,7 @@ register struct buff_header *qbp;
* The return code determines whether this was done okay or not.
*/
int
-unpreserve_rubout_char(ct)
-struct cmd_token *ct;
+unpreserve_rubout_char( struct cmd_token *ct )
{
register struct buff_header *qbp;
int c;
@@ -1178,8 +1173,7 @@ register struct buff_header *qbp;
* into the specified Q-register.
*/
void
-parser_dump_command_line(qbp)
-register struct buff_header *qbp;
+parser_dump_command_line( struct buff_header *qbp )
{
register struct cmd_token *ct;
@@ -1206,8 +1200,7 @@ register struct cmd_token *ct;
* the specified Q-register.
*/
int
-parser_replace_command_line(qbp)
-register struct buff_header *qbp;
+parser_replace_command_line( struct buff_header *qbp )
{
register struct cmd_token *ct;
register struct cmd_token *first_different_ct;
@@ -1305,8 +1298,7 @@ register int cb_zee;
* the parse.
*/
struct cmd_token *
-allocate_cmd_token(old_token)
-register struct cmd_token *old_token;
+allocate_cmd_token( struct cmd_token *old_token )
{
register struct cmd_token *ct;
@@ -1362,8 +1354,7 @@ register struct cmd_token *ct;
* to be placed on the free list.
*/
void
-free_cmd_token(ct)
-register struct cmd_token *ct;
+free_cmd_token( struct cmd_token *ct )
{
PREAMBLE();
@@ -1405,8 +1396,7 @@ pause_while_in_input_wait()
* including cmd_tokens and undo_tokens.
*/
void
-parser_cleanup_ctlist(ct)
-register struct cmd_token *ct;
+parser_cleanup_ctlist( struct cmd_token *ct )
{
register struct cmd_token *oct;
@@ -1445,9 +1435,7 @@ register struct cmd_token *oct;
* and set the error state.
*/
int
-parse_any_arguments(ct,cmd_name)
-register struct cmd_token *ct;
-char *cmd_name;
+parse_any_arguments( struct cmd_token *ct, char *cmd_name )
{
char tmp_message[LINE_BUFFER_SIZE];
@@ -1478,9 +1466,7 @@ char tmp_message[LINE_BUFFER_SIZE];
* and set the error state.
*/
int
-parse_more_than_one_arg(ct,cmd_name)
-register struct cmd_token *ct;
-char *cmd_name;
+parse_more_than_one_arg( struct cmd_token *ct, char *cmd_name )
{
char tmp_message[LINE_BUFFER_SIZE];
@@ -1513,10 +1499,7 @@ char tmp_message[LINE_BUFFER_SIZE];
* legal. If they are not, it generates an error message.
*/
int
-parse_illegal_buffer_position(pos1,pos2,cmd_name)
-register int pos1;
-register int pos2;
-char *cmd_name;
+parse_illegal_buffer_position( int pos1, int pos2, char *cmd_name )
{
char illegal_position;
char tmp_message[LINE_BUFFER_SIZE];
@@ -1567,18 +1550,12 @@ parser_reset_echo()
* execution trace information.
*/
void
-trace_mode(phase,ct0,ct1)
-register int phase;
-struct cmd_token *ct0;
-struct cmd_token *ct1;
+trace_mode( int phase, struct cmd_token *ct0, struct cmd_token *ct1 )
{
register struct buff_header *qbp;
char tmp_message[LINE_BUFFER_SIZE];
register char *cp;
register char *state_name;
-char *trace_convert_state_to_name();
-char *trace_convert_opcode_to_name();
-char *trace_convert_exec_state_to_name();
PREAMBLE();
@@ -1799,8 +1776,7 @@ char *trace_convert_exec_state_to_name();
}
char *
-trace_convert_opcode_to_name(opcode)
-int opcode;
+trace_convert_opcode_to_name( int opcode )
{
PREAMBLE();
@@ -1841,8 +1817,7 @@ int opcode;
}/* End Routine */
char *
-trace_convert_state_to_name(state)
-int state;
+trace_convert_state_to_name( int state )
{
PREAMBLE();
@@ -1993,8 +1968,7 @@ int state;
char *
-trace_convert_exec_state_to_name(state)
-int state;
+trace_convert_exec_state_to_name( int state )
{
PREAMBLE();
diff --git a/tecstate.c b/tecstate.c
index e18f05d..340d5ab 100644
--- a/tecstate.c
+++ b/tecstate.c
@@ -1,9 +1,9 @@
-char *tecstate_c_version = "tecstate.c: $Revision: 1.2 $";
+char *tecstate_c_version = "tecstate.c: $Revision: 1.3 $";
/*
- * $Date: 2007/12/10 22:13:08 $
+ * $Date: 2007/12/26 13:28:31 $
* $Source: /cvsroot/videoteco/videoteco/tecstate.c,v $
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
* $Locker: $
*/
@@ -44,9 +44,7 @@ char *tecstate_c_version = "tecstate.c: $Revision: 1.2 $";
* to the state we left before.
*/
void
-parse_input_character(ct,uct)
-register struct cmd_token *ct;
-struct cmd_token *uct;
+parse_input_character( struct cmd_token *ct, struct cmd_token *uct )
{
char tmp_message[LINE_BUFFER_SIZE];
register struct cmd_token *oct = NULL;
@@ -631,8 +629,12 @@ register struct cmd_token *oct = NULL;
*/
case '?':
trace_mode_flag = !trace_mode_flag;
- screen_message(trace_mode_flag ? "Trace Mode ON" :
- "Trace Mode OFF");
+ {
+ char traceString[ 64 ];
+ if( trace_mode_flag ) strcpy( traceString, "Trace Mode ON" );
+ else strcpy( traceString, "Trace Mode OFF" );
+ screen_message( traceString );
+ }
ct->ctx.state = STATE_C_INITIALSTATE;
return;
@@ -2348,9 +2350,7 @@ register struct cmd_token *oct = NULL;
* not have got around to that yet.
*/
int
-parse_check_qname(ct,name)
-register struct cmd_token *ct;
-register char name;
+parse_check_qname( struct cmd_token *ct, char name )
{
char tmp_message[LINE_BUFFER_SIZE];
diff --git a/tecterm.c b/tecterm.c
index 666bffb..9f9901f 100644
--- a/tecterm.c
+++ b/tecterm.c
@@ -1,9 +1,9 @@
-char *tecterm_c_version = "tecterm.c: $Revision: 1.2 $";
+char *tecterm_c_version = "tecterm.c: $Revision: 1.3 $";
/*
- * $Date: 2007/12/10 22:13:08 $
+ * $Date: 2007/12/26 13:28:31 $
* $Source: /cvsroot/videoteco/videoteco/tecterm.c,v $
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
* $Locker: $
*/
@@ -53,7 +53,8 @@ char *tecterm_c_version = "tecterm.c: $Revision: 1.2 $";
void term_insert_line();
void term_delete_line();
- void term_puts();
+ void term_puts( char *termcap_string, int lines_affected );
+
int term_putc(int);
void term_flush();
@@ -332,9 +333,7 @@ term_clrtobot()
* and tries to use the optimum one.
*/
void
-term_insert_line(position,count)
-int position;
-register int count;
+term_insert_line( int position, int count )
{
/*
* Test whether the terminal supports an insert line escape sequence which
@@ -424,9 +423,7 @@ register int count;
* and tries to use the optimum one.
*/
void
-term_delete_line(position,count)
-int position;
-register int count;
+term_delete_line( int position, int count )
{
term_goto(0,position);
@@ -517,10 +514,7 @@ register int count;
* imbedded %d to be replaced with the single argument.
*/
int
-term_putnum(termcap_string,argument,affected)
-char *termcap_string;
-int argument;
-int affected;
+term_putnum( char *termcap_string, int argument, int affected )
{
register char *cp;
register char *dp;
@@ -594,9 +588,7 @@ one:
* This routine is called to output a termcap string with padding added.
*/
void
-term_puts(termcap_string,lines_affected)
-register char *termcap_string;
-int lines_affected;
+term_puts( char *termcap_string, int lines_affected )
{
register int delay;
register int mspc10;
@@ -651,7 +643,7 @@ register int mspc10;
*/
if(delay == 0) return;
if(term_speed <= 0) return;
- if(term_speed >= (sizeof(tmspc10)/sizeof(tmspc10[0]))) return;
+ if((unsigned)term_speed >= (sizeof(tmspc10)/sizeof(tmspc10[0]))) return;
/*
* Round up by half a character frame, and then do the delay.
@@ -702,9 +694,7 @@ register int mspc10;
* all other characters simply get output
*/
int
-term_goto(dest_x,dest_y)
-int dest_x;
-int dest_y;
+term_goto(int dest_x, int dest_y )
{
#ifdef TERMCAP
register char *cp;
@@ -878,9 +868,7 @@ sleep(5);
* all other characters simply get output
*/
int
-term_scroll_region(top,bottom)
-int top;
-int bottom;
+term_scroll_region( int top, int bottom )
{
register char *cp;
register char *dp;
@@ -1035,9 +1023,7 @@ int bottom;
* output buffer. If this fills the output buffer, flush the buffer.
*/
int
-term_putc(data)
-//char data;
-int data;
+term_putc( int data )
{
*scr_outbuf_ptr++ = data;
scr_outbuf_left -= 1;
diff --git a/tecundo.c b/tecundo.c
index 07115f0..917303e 100644
--- a/tecundo.c
+++ b/tecundo.c
@@ -1,9 +1,9 @@
-char *tecundo_c_version = "tecundo.c: $Revision: 1.2 $";
+char *tecundo_c_version = "tecundo.c: $Revision: 1.3 $";
/*
- * $Date: 2007/12/10 22:13:08 $
+ * $Date: 2007/12/26 13:28:31 $
* $Source: /cvsroot/videoteco/videoteco/tecundo.c,v $
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
* $Locker: $
*/
@@ -52,8 +52,7 @@ char *tecundo_c_version = "tecundo.c: $Revision: 1.2 $";
* to the program state.
*/
int
-parser_undo(ut)
-register struct undo_token *ut;
+parser_undo( struct undo_token *ut )
{
char tmp_message[LINE_BUFFER_SIZE];
register struct cmd_token *ct;
@@ -360,8 +359,7 @@ register struct cmd_token *ct;
* of it if we want.
*/
struct undo_token *
-allocate_undo_token(ct)
-register struct cmd_token *ct;
+allocate_undo_token( struct cmd_token *ct )
{
register struct undo_token *ut;
@@ -395,8 +393,7 @@ register struct undo_token *ut;
* to be placed on the free list.
*/
void
-free_undo_token(ut)
-register struct undo_token *ut;
+free_undo_token( struct undo_token *ut )
{
PREAMBLE();
@@ -416,8 +413,7 @@ register struct undo_token *ut;
* of the list is the first that needs to be undone.
*/
void
-tecundo_list(nut)
-register struct undo_token *nut;
+tecundo_list( struct undo_token *nut )
{
register struct undo_token *ut;
@@ -454,8 +450,7 @@ register struct undo_token *ut;
* the memory the block points to.
*/
void
-tecundo_cleanup(tut)
-register struct undo_token *tut;
+tecundo_cleanup( struct undo_token *tut )
{
register struct undo_token *ut;