diff options
-rw-r--r-- | tecbuf.c | 330 | ||||
-rw-r--r-- | teccmd.c | 301 | ||||
-rw-r--r-- | tecdebug.c | 62 | ||||
-rw-r--r-- | tecdisp.c | 378 | ||||
-rw-r--r-- | tecexec.c | 77 | ||||
-rw-r--r-- | tecmem.c | 43 | ||||
-rw-r--r-- | teco.c | 179 | ||||
-rw-r--r-- | tecparse.c | 233 | ||||
-rw-r--r-- | tecstate.c | 22 | ||||
-rw-r--r-- | tecterm.c | 264 | ||||
-rw-r--r-- | tecundo.c | 59 |
11 files changed, 891 insertions, 1057 deletions
@@ -63,14 +63,13 @@ char rcs_date[] = AUTO_DATE; extern struct window *curwin; extern char checkpoint_modified; -/* BUFF_FIND - Find the named buffer +/** + * \brief Find the named buffer * - * Function: - * - * This routine is called with the name of the buffer that we want to - * find. It searches all the buffer headers until it finds the name. - * It will either return the address of the buffer header, or null if - * it could not find one with the proper name. + * This routine is called with the name of the buffer that we want to + * find. It searches all the buffer headers until it finds the name. + * It will either return the address of the buffer header, or null if + * it could not find one with the proper name. */ struct buff_header * buff_find( char *name ) @@ -110,15 +109,14 @@ unsigned int hash = stringHash( name ); -/* BUFF_QFIND - Find the named Q register - * - * Function: +/** + * \brief Find the named Q register * - * This routine is called with the name of the Q register that we - * want to find. It constructs the internal name of the Q register - * and then calls buff_find to find the buffer. If the buffer is not - * found and the create flag is set, we call buff_create to cause - * the Q register to be created. + * This routine is called with the name of the Q register that we + * want to find. It constructs the internal name of the Q register + * and then calls buff_find to find the buffer. If the buffer is not + * found and the create flag is set, we call buff_create to cause + * the Q register to be created. */ struct buff_header * buff_qfind( char name, char create_flag ) @@ -151,14 +149,13 @@ char tmp_buffer[LINE_BUFFER_SIZE],tmp_message[LINE_BUFFER_SIZE]; -/* BUFF_CREATE - Create a new buffer - * - * Function: +/** + * \brief Create a new buffer * - * This routine is called when we need to create a new buffer. The caller - * should have already verified that this doesn't already exist. The - * routine returns the address of the new buffer, or NULL if there is a - * problem of some sort. + * This routine is called when we need to create a new buffer. The caller + * should have already verified that this doesn't already exist. The + * routine returns the address of the new buffer, or NULL if there is a + * problem of some sort. */ struct buff_header * buff_create( char *name, char internal_flag ) @@ -256,13 +253,12 @@ register int i = 0; -/* BUFF_DUPLICATE - Make a duplicate of a buffer +/** + * \brief Make a duplicate of a buffer * - * Function: - * - * This routine is called to duplicate the specified buffer and return - * a pointer to the duplicate. The current requirement for this is for - * the push Q register command ('['). + * This routine is called to duplicate the specified buffer and return + * a pointer to the duplicate. The current requirement for this is for + * the push Q register command ('['). */ struct buff_header * buff_duplicate( struct buff_header *sbp ) @@ -335,12 +331,11 @@ register struct buff_line *dlp; -/* MOVC3 - Copy the specified number of bytes - * - * Function: +/** + * \brief Copy the specified number of bytes * - * This routine copies 'n' bytes from the source to the - * destination. + * This routine copies 'n' bytes from the source to the + * destination. */ void movc3( char *source, char *dest, int count ) @@ -353,13 +348,12 @@ movc3( char *source, char *dest, int count ) -/* BUFF_DESTROY - Delete an existing buffer +/** + * \brief Delete an existing buffer * - * Function: - * - * This routine is called to delete an existing buffer. The routine is - * supplied the address of the buffer structure. We have to clean up - * all the lines in the buffer, all the display lines, etc. + * This routine is called to delete an existing buffer. The routine is + * supplied the address of the buffer structure. We have to clean up + * all the lines in the buffer, all the display lines, etc. */ void buff_destroy( struct buff_header *hbp ) @@ -419,12 +413,11 @@ register struct buff_line *lbp; -/* BUFF_FIND_LINE - Find the line structure that <position> is on - * - * Function: +/** + * \brief Find the line structure that \a position is on * - * This routine is called to find the line_buffer structure that - * the buffer position resides on. + * This routine is called to find the \p line_buffer structure that + * the buffer position resides on. */ struct buff_line * buff_find_line( struct buff_header *hbp, int position ) @@ -520,12 +513,11 @@ register int i; -/* BUFF_FIND_OFFSET - Find offset onto line structure that <position> is on +/** + * \brief Find offset onto line structure that \a position is on * - * Function: - * - * This routine is called to find the offset into the line_buffer of - * the specified position. + * This routine is called to find the offset into the \p line_buffer of + * the specified position. */ int buff_find_offset( struct buff_header *hbp, @@ -552,14 +544,13 @@ buff_find_offset( struct buff_header *hbp, -/* BUFF_CONTENTS - Return the character at the specified position - * - * Function: +/** + * \brief Return the character at the specified position * - * This routine is called to fetch the single character which is at - * the specified buffer position. This routine is generally called - * by routines which are low frequence or only handle a small number - * of characters at any one time. + * This routine is called to fetch the single character which is at + * the specified buffer position. This routine is generally called + * by routines which are low frequence or only handle a small number + * of characters at any one time. */ int buff_contents( struct buff_header *hbp, int position ) @@ -591,14 +582,13 @@ register int i; }/* End Routine */ -/* BUFF_CACHED_CONTENTS - Return the character and positional information +/** + * \brief Return the character and positional information * - * Function: - * - * This routine is called to fetch the single character which is at - * the specified buffer position. This routine is generally called - * by routines which are low frequence or only handle a small number - * of characters at any one time. + * This routine is called to fetch the single character which is at + * the specified buffer position. This routine is generally called + * by routines which are low frequence or only handle a small number + * of characters at any one time. */ int buff_cached_contents( struct buff_header *hbp, @@ -641,12 +631,11 @@ register int i; -/* BUFF_INIT - Routine to initialize the buffer routines - * - * Function: +/** + * \brief Routine to initialize the buffer routines * - * This routine is called before the first buffer operations to - * initialize the buffer routines. + * This routine is called before the first buffer operations to + * initialize the buffer routines. */ int buff_init() @@ -678,12 +667,11 @@ buff_init() -/* BUFF_OPENBUFFER - Routine to read a file into a TECO edit buffer +/** + * \brief Routine to read a file into a TECO edit buffer * - * Function: - * - * This routine is called to load a file into the named buffer. If the - * buffer already exists, we simply switch to it and don't modify it. + * This routine is called to load a file into the named buffer. If the + * buffer already exists, we simply switch to it and don't modify it. */ int buff_openbuffer( char *name, int buffer_number, int readonly_flag ) @@ -748,12 +736,11 @@ buff_openbuffer( char *name, int buffer_number, int readonly_flag ) -/* BUFF_OPENBUFFNUM - Routine to open buffer number 'n' - * - * Function: +/** + * \brief Routine to open buffer number 'n' * - * This routine is called with the number of a buffer which is to be - * made the 'current' edit buffer. + * This routine is called with the number of a buffer which is to be + * made the 'current' edit buffer. */ int buff_openbuffnum( int buffer_number, int map_flag ) @@ -779,12 +766,11 @@ buff_openbuffnum( int buffer_number, int map_flag ) -/* BUFF_REOPENBUFF - Called by undo to re-create an edit buffer +/** + * \brief Called by undo to re-create an edit buffer * - * Function: - * - * This routine is called to place a buffer back onto the buffer - * list. + * This routine is called to place a buffer back onto the buffer + * list. */ void buff_reopenbuff( struct buff_header *bp ) @@ -832,12 +818,11 @@ register struct buff_header *obp; -/* BUFF_READ - Routine to read a file into an existing TECO edit buffer +/** + * \brief Routine to read a file into an existing TECO edit buffer * - * Function: - * - * This routine is called to read a file into the specified edit buffer. - * The edit buffer must already exist. + * This routine is called to read a file into the specified edit buffer. + * The edit buffer must already exist. */ int buff_read( struct buff_header *hbp, char *name ) @@ -865,13 +850,12 @@ buff_read( struct buff_header *hbp, char *name ) -/* BUFF_READFD - Reads the file descriptor into the specified buffer - * - * Function: +/** + * \brief Reads the file descriptor into the specified buffer * - * This routine is called with a buffer and a file descriptor. The - * entire contents of the file descriptor are read into the specified - * buffer. + * This routine is called with a buffer and a file descriptor. The + * entire contents of the file descriptor are read into the specified + * buffer. */ int buff_readfd( struct buff_header *hbp, char *name, int iochan ) @@ -984,12 +968,11 @@ buff_readfd( struct buff_header *hbp, char *name, int iochan ) -/* BUFF_WRITE - Write the specified buffer out to a file +/** + * \brief Write the specified buffer out to a file * - * Function: - * - * This routine is generally called on an EW command when the user - * wishes to write out the contents of the buffer. + * This routine is generally called on an EW command when the user + * wishes to write out the contents of the buffer. */ int buff_write( struct buff_header *hbp, int chan, int start, int end ) @@ -1049,12 +1032,11 @@ int status; -/* BUFF_SWITCH - Switch the current edit buffer - * - * Function: +/** + * \brief Switch the current edit buffer * - * This routine is called when we wish to switch the current buffer - * to some other edit buffer. + * This routine is called when we wish to switch the current buffer + * to some other edit buffer. */ int buff_switch( struct buff_header *hbp, int map_flag ) @@ -1087,12 +1069,11 @@ char *cp; -/* BUFF_BUFFER_MAP - Build a map of the existing buffers. +/** + * \brief Build a map of the existing buffers. * - * Function: - * - * This routine is called when the buffer map buffer is entered. It is - * used to fill this routine with the appropriate text. + * This routine is called when the buffer map buffer is entered. It is + * used to fill this routine with the appropriate text. */ void buff_buffer_map() @@ -1241,12 +1222,11 @@ int max_length; -/* BUFF_INSERT - Insert a string at current position - * - * Function: +/** + * \brief Insert a string at current position * - * This routine is called to insert a string into the specified buffer - * at the buffer's current location. + * This routine is called to insert a string into the specified buffer + * at the buffer's current location. */ int buff_insert( struct buff_header *hbp, int position, char *buffer, int length ) @@ -1315,15 +1295,14 @@ register char *cp; -/* BUFF_INSERT_FROM_BUFFER_WITH_UNDO - Copy bytes from another buffer +/** + * \brief Copy bytes from another buffer * - * Function: - * - * This routine copies bytes from one buffer to another, arranging - * undo capability so that we can reverse the process. Because it - * knows the lengths of each line, this should be a very efficient - * method of inserting data, and should certainly have preference - * over using the byte-at-a-time routines. + * This routine copies bytes from one buffer to another, arranging + * undo capability so that we can reverse the process. Because it + * knows the lengths of each line, this should be a very efficient + * method of inserting data, and should certainly have preference + * over using the byte-at-a-time routines. */ int buff_insert_from_buffer_with_undo( struct cmd_token *ct, @@ -1755,12 +1734,11 @@ extern int tty_input_chan; }/* End Routine */ -/* BUFF_INSERT_WITH_UNDO - Insert a string and arrange for undo capability - * - * Function: +/** + * \brief Insert a string and arrange for undo capability * - * This routine is called when characters need to be inserted, and - * also need to be un-inserted if the command is undone. + * This routine is called when characters need to be inserted, and + * also need to be un-inserted if the command is undone. */ int buff_insert_with_undo( struct cmd_token *ct, @@ -1792,14 +1770,13 @@ struct undo_token *ut; -/* BUFF_INSERT_CHAR - Insert the specified character into the current position +/** + * \brief Insert the specified character into the current position * - * Function: - * - * This routine is called to insert the single character into the buffer - * at the current position (dot). It has to worry about such things as - * noting that the buffer has been modified, the screen display may be - * invalid, etc. + * This routine is called to insert the single character into the buffer + * at the current position (dot). It has to worry about such things as + * noting that the buffer has been modified, the screen display may be + * invalid, etc. */ int buff_insert_char( struct buff_header *hbp, @@ -1936,12 +1913,11 @@ register int i,j; }/* End Routine */ -/* BUFF_INSERT_CHAR_WITH_UNDO - Insert a single char with undo capability - * - * Function: +/** + * \brief Insert a single char with undo capability * - * This is an envelope routine which guarentees that the character - * to be input can be undone if necessary. + * This is an envelope routine which guarentees that the character + * to be input can be undone if necessary. */ int buff_insert_char_with_undo( struct cmd_token *ct, @@ -1971,12 +1947,11 @@ struct undo_token *ut; -/* BUFF_DELETE - Delete specified number of characters +/** + * \brief Delete specified number of characters * - * Function: - * - * This routine is called to delete the specified number of characters - * at the specified location in the buffer. + * This routine is called to delete the specified number of characters + * at the specified location in the buffer. */ void buff_delete( struct buff_header *hbp, @@ -2009,12 +1984,11 @@ buff_delete( struct buff_header *hbp, -/* BUFF_DELETE_CHAR - Delete the character at the current position - * - * Function: +/** + * \brief Delete the character at the current position * - * This routine is called to delete the single character which is at - * the current buffer position. + * This routine is called to delete the single character which is at + * the current buffer position. */ int buff_delete_char( struct buff_header *hbp, @@ -2157,14 +2131,13 @@ register int i,j; -/* BUFF_DELETE_WITH_UNDO - Clobber buffer positions and build undo list +/** + * \brief Clobber buffer positions and build undo list * - * Function: - * - * This routine is called when we want to delete a range of bytes in the - * buffer, and build an undo list so that we could replace them if we need - * to. This happens to be pretty efficient for a bulk delete since we can - * just move the line buffers over to the undo list. + * This routine is called when we want to delete a range of bytes in the + * buffer, and build an undo list so that we could replace them if we need + * to. This happens to be pretty efficient for a bulk delete since we can + * just move the line buffers over to the undo list. */ int buff_delete_with_undo( struct cmd_token *ct, @@ -2360,12 +2333,11 @@ int bytes_deleted_so_far = 0; -/* BUFF_BULK_INSERT - Insert a list of line buffer structures - * - * Function: +/** + * \brief Insert a list of line buffer structures * - * This routine is used to insert a list of line buffer structures at - * the specified position in the buffer. + * This routine is used to insert a list of line buffer structures at + * the specified position in the buffer. */ void buff_bulk_insert( struct buff_header *hbp, @@ -2462,13 +2434,12 @@ int offset; -/* ALLOCATE_LINE_BUFFER - Routine to allocate a line buffer structure +/** + * \brief Routine to allocate a line buffer structure * - * Function: - * - * This routine is used to allocate a line buffer structure with - * a data buffer large enough to accommodate the specified number - * of bytes. + * This routine is used to allocate a line buffer structure with + * a data buffer large enough to accommodate the specified number + * of bytes. */ struct buff_line * allocate_line_buffer( int size ) @@ -2526,12 +2497,11 @@ register struct buff_line *lbp; }/* End Routine */ -/* BUFF_FREE_LINE_BUFFER - Free up the associated storage - * - * Function: +/** + * \brief Free up the associated storage * - * This routine is called when a line buffer is deleted. It cleans up any - * associated storage as well as the buffer itself. + * This routine is called when a line buffer is deleted. It cleans up any + * associated storage as well as the buffer itself. */ void buff_free_line_buffer( struct buff_line *lbp ) @@ -2562,11 +2532,10 @@ buff_free_line_buffer( struct buff_line *lbp ) }/* End Routine */ -/* BUFF_FREE_LINE_BUFFER_LIST - Release a whole list of line buffers +/** + * \brief Release a whole list of line buffers * - * Function: - * - * This routine will delete an entire list of line buffers + * This routine will delete an entire list of line buffers */ void buff_free_line_buffer_list( struct buff_line *lbp ) @@ -2582,12 +2551,11 @@ register struct buff_line *olbp; }/* End Routine */ -/* BUFF_DEALLOCATE_LINE_BUFFER_LOOKASIDE_LIST - Free up lookaside list - * - * Function: +/** + * \brief Free up lookaside list * - * This routine frees up any format_lines we've cached on our local - * lookaside list. + * This routine frees up any format_lines we've cached on our local + * lookaside list. */ void buff_deallocate_line_buffer_lookaside_list() @@ -88,16 +88,15 @@ char *teccmd_c_version = "teccmd.c: $Revision: 1.3 $"; extern struct search_buff search_string; extern char suspend_is_okay_flag; -/* CMD_SEARCH - Execute a search command +/** + * \brief Execute a search command * - * Function: - * - * This is the runtime execution of the search command. ARG1 and ARG2 may - * specify a buffer range a,bS<mumble> in which case the search is - * constrained within the range. In this case, the direction of the search - * is determined by whether ARG1 is greater than or less than ARG2. - * If ARG2 == -1, then it is an ignored argument and ARG1 specifies the - * direction of search and the number of times to search. + * This is the runtime execution of the search command. \a arg1 and \a arg2 may + * specify a buffer range <tt>a,bS\<mumble\></tt> in which case the search is + * constrained within the range. In this case, the direction of the search + * is determined by whether \a arg1 is greater than or less than \a arg2. + * If \a arg2 == -1, then it is an ignored argument and \a arg1 specifies the + * direction of search and the number of times to search. */ int cmd_search( @@ -183,11 +182,10 @@ int original_dot; -/* CMD_FORWARD_SEARCH - Search in a forward direction - * - * Function: +/** + * \brief Search in a forward direction * - * This routine is used when the search progresses forward + * This routine is used when the search progresses forward */ int cmd_forward_search( @@ -325,11 +323,10 @@ struct position_cache running_position; -/* CMD_REVERSE_SEARCH - Search in a reverse direction +/** + * \brief Search in a reverse direction * - * Function: - * - * This routine is used when the search progresses backwards + * This routine is used when the search progresses backwards */ int cmd_reverse_search( @@ -464,14 +461,13 @@ struct position_cache running_position; -/* SET_SEARCH_STRING_WITH_UNDO - Sets Q-register '_' to the new search string - * - * Function: +/** + * \brief Sets Q-register '_' to the new search string * - * This routine is called from the exec functions when a search string - * is to be set. It takes care of loading Q-register '_' with the new - * search string, as well as setting up all the undo tokens to insure - * that this is all reversable. + * This routine is called from the exec functions when a search string + * is to be set. It takes care of loading Q-register '_' with the new + * search string, as well as setting up all the undo tokens to insure + * that this is all reversable. */ int set_search_string_with_undo( @@ -567,14 +563,13 @@ int new_length; -/* COMPILE_SEARCH_STRING - Creates the search table for a given input string +/** + * \brief Creates the search table for a given input string * - * Function: - * - * This routine parses the input search string and creates the search - * table which will describe to the search routines how to match the - * buffer characters. Note that the search table must be constructed - * in such a way that it works equally well backward or forward. + * This routine parses the input search string and creates the search + * table which will describe to the search routines how to match the + * buffer characters. Note that the search table must be constructed + * in such a way that it works equally well backward or forward. */ int compile_search_string( struct search_buff *search_tbl ) @@ -948,12 +943,11 @@ char matchrepeat_flag = NO; -/* SRCH_SETALLBITS - Set ALL the bits on for a search table entry - * - * Function: +/** + * \brief Set ALL the bits on for a search table entry * - * This routine makes ANY character match the search string table - * entry. + * This routine makes ANY character match the search string table + * entry. */ void srch_setallbits( int *bit_table ) @@ -968,13 +962,12 @@ register int i; }/* End Routine */ -/* SRCH_INVERT_SENSE - Invert the sense of a search table entry - * - * Function: +/** + * \brief Invert the sense of a search table entry * - * This routine is called when a 'NOT' modifier has been used, - * meaning that just the opposite matching should occur. We - * simply invert the setting of the bits in the search table entry. + * This routine is called when a 'NOT' modifier has been used, + * meaning that just the opposite matching should occur. We + * simply invert the setting of the bits in the search table entry. */ void srch_invert_sense( int *bit_table ) @@ -989,12 +982,11 @@ register int i; }/* End Routine */ -/* SRCH_SETBITS - Set the corresponding search bits to 'on' +/** + * \brief Set the corresponding search bits to 'on' * - * Function: - * - * This routine is called with a zero terminated string of characters. - * It sets each corresponding bit in the search table to a 1. + * This routine is called with a zero terminated string of characters. + * It sets each corresponding bit in the search table to a 1. */ void srch_setbits( int *bit_table, char *string ) @@ -1009,12 +1001,11 @@ register int c; }/* End Routine */ -/* SRCH_SETBIT - Set the corresponding search bit to 'on' - * - * Function: +/** + * \brief Set the corresponding search bit to 'on' * - * This routine is called with a char whose corresponding bit should - * be set in the search table. + * This routine is called with a char whose corresponding bit should + * be set in the search table. */ void srch_setbit( int *bit_table, unsigned char value ) @@ -1028,15 +1019,14 @@ srch_setbit( int *bit_table, unsigned char value ) -/* CMD_WRITE - Implements the EW command by writing out a buffer +/** + * \brief Implements the EW command by writing out a buffer * - * Function: - * - * This routine will write out the contents of the buffer after creating - * the appropriate backup files. If there is not already a file with the - * a .OLD extension, this is created. Otherwise, a .BAK file is created. - * If the name is so long that we can't append a of suffix, we have to - * hack it up a bit. This is not guaranteed to work, but... + * This routine will write out the contents of the buffer after creating + * the appropriate backup files. If there is not already a file with the + * a .OLD extension, this is created. Otherwise, a .BAK file is created. + * If the name is so long that we can't append a of suffix, we have to + * hack it up a bit. This is not guaranteed to work, but... */ int cmd_write( struct buff_header *hbp, char *filename ) @@ -1182,12 +1172,11 @@ int status; -/* CMD_WRITEBAK - Routine to open the BAK or OLD file - * - * Function: +/** + * \brief Routine to open the BAK or OLD file * - * This routine opens a channel to the backup file and creates any - * subdirectories that may be necessary. + * This routine opens a channel to the backup file and creates any + * subdirectories that may be necessary. */ int cmd_writebak( @@ -1273,13 +1262,12 @@ register int status; -/* CMD_WORDMOVE - Here to move within the edit buffer by words +/** + * \brief Here to move within the edit buffer by words * - * Function: - * - * Here in response to one of the 'word' commands. We move the - * current edit position forward or backward by the specified - * number of words. + * Here in response to one of the 'word' commands. We move the + * current edit position forward or backward by the specified + * number of words. */ int cmd_wordmove( int count ) @@ -1332,12 +1320,11 @@ cmd_wordmove( int count ) -/* CMD_SUSPEND - We get here on a suspend signal from the tty - * - * Function: +/** + * \brief We get here on a suspend signal from the tty * - * Here when the user has typed ^Z. We want to suspend back to the - * original shell. + * Here when the user has typed ^Z. We want to suspend back to the + * original shell. */ void cmd_suspend() @@ -1370,12 +1357,11 @@ extern char susp_flag; }/* End Routine */ -/* CMD_PAUSE - Here when we are ready to suspend back to the shell - * - * Function: +/** + * \brief Here when we are ready to suspend back to the shell * - * Here when the parser has noticed that the suspend flag is set, and - * is ready for us to suspend the process. + * Here when the parser has noticed that the suspend flag is set, and + * is ready for us to suspend the process. */ void cmd_pause() @@ -1451,13 +1437,12 @@ struct itmlst { -/* CMD_WINCH - We get here when the OS says the window changed size +/** + * \brief We get here when the OS says the window changed size * - * Function: - * - * Here when the OS says our window changed size. We just wanna - * call the screen package's resize entry point so it can build - * a new screen for us. + * Here when the OS says our window changed size. We just wanna + * call the screen package's resize entry point so it can build + * a new screen for us. */ void cmd_winch() @@ -1485,13 +1470,12 @@ cmd_winch() -/* CMD_INTERRUPT - We get here on an interrupt signal from the user - * - * Function: +/** + * \brief We get here on an interrupt signal from the user * - * Here when the user has typed ^C. We want to cause any current commands - * to abort. This gives the user a way to break out of infinite iterations - * and macros. + * Here when the user has typed ^C. We want to cause any current commands + * to abort. This gives the user a way to break out of infinite iterations + * and macros. */ void cmd_interrupt() @@ -1519,12 +1503,11 @@ cmd_interrupt() #ifdef CHECKPOINT -/* CMD_ALARM - Here to when the interval timer expires +/** + * \brief Here to when the interval timer expires * - * Function: - * - * This function is called periodically when the interval timer says - * it is time for us to checkpoint all our buffers. + * This function is called periodically when the interval timer says + * it is time for us to checkpoint all our buffers. */ cmd_alarm() { @@ -1559,12 +1542,11 @@ cmd_alarm() #ifdef CHECKPOINT -/* CMD_CHECKPOINT - Here to write all our buffers to a checkpoint file - * - * Function: +/** + * \brief Here to write all our buffers to a checkpoint file * - * Here we check out all the buffers and write out any which have - * ever been modified. + * Here we check out all the buffers and write out any which have + * ever been modified. */ void cmd_checkpoint() @@ -1675,12 +1657,11 @@ int i,status; #ifdef CHECKPOINT -/* REMOVE_CHECKPOINT_FILE - On exit we clean up the checkpoint file +/** + * \brief On exit we clean up the checkpoint file * - * Function: - * - * This routine is called when a clean exit is assured. We remove - * the checkpoint file so they don't clutter up the disk. + * This routine is called when a clean exit is assured. We remove + * the checkpoint file so they don't clutter up the disk. */ void remove_checkpoint_file() @@ -1700,12 +1681,11 @@ remove_checkpoint_file() #if defined(VMS) || defined(STARDENT) || defined(STARDENT_860) || defined(SEQUOIA) || defined(LOCUS_SYSV) || defined(SCO_386) -/* BZERO - Zero an array of bytes - * - * Function: +/** + * \brief Zero an array of bytes * - * This routine zeros an array of bytes. For some reason the VMS - * library doesn't seem to know about it. + * This routine zeros an array of bytes. For some reason the VMS + * library doesn't seem to know about it. */ bzero(array,length) register char *array; @@ -1721,12 +1701,11 @@ register int length; #ifdef UNIX -/* CMD_OSCMD - Issue a command to the operating system - * - * Function: +/** + * \brief Issue a command to the operating system * - * This routine is called in response to the EC command which allows the - * user to execute operating system commands from within the editor. + * This routine is called in response to the EC command which allows the + * user to execute operating system commands from within the editor. */ int cmd_oscmd( struct cmd_token *ct ) @@ -1863,12 +1842,11 @@ int buf_pipe[2]; #ifdef VMS -/* CMD_OSCMD - Issue a command to the operating system +/** + * \brief Issue a command to the operating system * - * Function: - * - * This routine is called in response to the EC command which allows the - * user to execute operating system commands from within the editor. + * This routine is called in response to the EC command which allows the + * user to execute operating system commands from within the editor. */ cmd_oscmd(ct) register struct cmd_token *ct; @@ -1884,14 +1862,13 @@ register struct cmd_token *ct; -/* LOAD_QNAME_REGISTER - Loads buffer name into q-register * - * - * Function: +/** + * \brief Loads buffer name into q-register * * - * This routine is called by a command operating on the text - * portion of a q-register if the specified q-register is *. - * In this case, we load the name of the current edit buffer - * into it so the user can easilly access it. + * This routine is called by a command operating on the text + * portion of a q-register if the specified q-register is *. + * In this case, we load the name of the current edit buffer + * into it so the user can easilly access it. */ void load_qname_register() @@ -1912,14 +1889,13 @@ register struct buff_header *qbp; }/* End Routine */ -/* RENAME_EDIT_BUFFER - Change the name of the specified edit buffer +/** + * \brief Change the name of the specified edit buffer * - * Function: - * - * This routine is called by parser exec routines which have - * loaded q-register *. Since the text portion of this q-register - * is the buffer name, it has the effect of changing the name - * of the buffer. + * This routine is called by parser exec routines which have + * loaded q-register *. Since the text portion of this q-register + * is the buffer name, it has the effect of changing the name + * of the buffer. */ int rename_edit_buffer( @@ -1953,13 +1929,12 @@ int length; -/* CMD_SETOPTIONS - Set runtime options via the EJ command - * - * Function: +/** + * \brief Set runtime options via the EJ command * - * This routine is called when the user sets runtime variables using - * the EJ command. Although the command is a classic TECO command, the - * actual values are specific to Video TECO + * This routine is called when the user sets runtime variables using + * the EJ command. Although the command is a classic TECO command, the + * actual values are specific to Video TECO */ int cmd_setoptions( @@ -2033,19 +2008,28 @@ extern int tab_width; -/* CMD_FTAGS - Perform UNIX tags function +/** + * \brief Perform UNIX tags function * - * Function: + * This routine performs various unix tags functions. The following + * functions are supported: * - * This routine performs various unix tags functions. The following - * functions are supported: - * - * ARG1: Function: - * - * none Load tags file indicated in <string> - * 0 (same as <none>) - * 1 Find tag entry which corresponds with <string>. ARG2 - * is a flags word which says what to do with the tag + * <table> + * <tr> + * <td>\b arg1</td> + * <td>\b Function</td> + * </tr><tr> + * <td>\e none</td> + * <td>Load tags file indicated in \a string</td> + * </tr><tr> + * <td>0</td> + * <td>(same as \e none)</td> + * </tr><tr> + * <td>1</td> + * <td>Find tag entry which corresponds with \a string. \a arg2 + * is a flags word which says what to do with the tag</td> + * </tr> + * </table> */ int cmd_tags( @@ -2162,12 +2146,11 @@ int hashval,skip_cnt; }/* End Routine */ -/* TAG_LOAD_FILE - Read in a tags file - * - * Function: +/** + * \brief Read in a tags file * - * This is a huge monolithic nasty routine which reads either VI or - * EMACS tags files, and builds an internal representation. + * This is a huge monolithic nasty routine which reads either VI or + * EMACS tags files, and builds an internal representation. */ struct tags * tag_load_file( char *string ) @@ -60,12 +60,11 @@ do_return_checks() do_preamble_checks(); } -/* TECDEBUG_CHECK_SCREEN_MAGIC - Check for matching magic numbers - * - * Function: +/** + * \brief Check for matching magic numbers * - * This routine checks that each saved screen array element has - * the correct magic number. + * This routine checks that each saved screen array element has + * the correct magic number. */ void tecdebug_check_screen_magic() @@ -95,12 +94,11 @@ register struct screen_line *sbp; -/* TECDEBUG_CHECK_BUFFER_MAGIC - Check for matching magic numbers - * - * Function: +/** + * \brief Check for matching magic numbers * - * This routine checks that each buffer header to check for - * the correct magic number. + * This routine checks that each buffer header to check for + * the correct magic number. */ void tecdebug_check_buffer_magic() @@ -160,12 +158,11 @@ register int count; -/* TECDEBUG_CHECK_LINE_MAGIC - Check for matching magic numbers - * - * Function: +/** + * \brief Check for matching magic numbers * - * This routine checks that each line buffer data structure for - * the correct magic number. + * This routine checks that each line buffer data structure for + * the correct magic number. */ void tecdebug_check_line_magic() @@ -222,12 +219,11 @@ register int count; -/* TECDEBUG_CHECK_FORMAT_MAGIC - Check for matching magic numbers - * - * Function: +/** + * \brief Check for matching magic numbers * - * This routine checks each screen format buffer data structure for - * the correct magic number. + * This routine checks each screen format buffer data structure for + * the correct magic number. */ void tecdebug_check_format_magic() @@ -272,14 +268,13 @@ register int count; -/* TECDEBUG_CHECK_COMPANION_POINTERS - Check for pointer consistency - * - * Function: +/** + * \brief Check for pointer consistency * - * This routine checks that each saved_screen entry points to - * a single format line which also points back. It's an error - * if a structure points to another structure which doesn't - * point back. + * This routine checks that each saved_screen entry points to + * a single format line which also points back. It's an error + * if a structure points to another structure which doesn't + * point back. */ void tecdebug_check_companion_pointers() @@ -334,14 +329,13 @@ register struct format_line *fbp; -/* TECDEBUG_CHECK_WINDOW_POINTERS - Check for window pointer consistency - * - * Function: +/** + * \brief Check for window pointer consistency * - * This routine checks that every format line is correctly chained with respect - * to which window it is connected to. An error occurs if the line_buffer does - * not chain down to it. Also, for every "next_window" pointer, all format - * structures chained off of it must belong to the same window. + * This routine checks that every format line is correctly chained with respect + * to which window it is connected to. An error occurs if the line_buffer does + * not chain down to it. Also, for every "next_window" pointer, all format + * structures chained off of it must belong to the same window. */ void tecdebug_check_window_pointers() @@ -115,12 +115,11 @@ void screen_message( char *string ); extern char input_pending_flag; extern char resize_flag; -/* SCREEN_INIT - Initialize the TECO screen package +/** + * \brief Initialize the TECO screen package * - * Function: - * - * This entry point gives the screen package a chance to initialize - * itself. + * This entry point gives the screen package a chance to initialize + * itself. */ int screen_init() @@ -247,13 +246,12 @@ register short *sp; -/* SCREEN_RESIZE - Cause the screen to be refreshed at a new size - * - * Function: +/** + * \brief Cause the screen to be refreshed at a new size * - * This function is called when the size of the terminal screen has - * changed. This is common on a windowing terminal. This routine has - * to clean up the existing screen database and re-initialize it. + * This function is called when the size of the terminal screen has + * changed. This is common on a windowing terminal. This routine has + * to clean up the existing screen database and re-initialize it. */ void screen_resize() @@ -379,14 +377,13 @@ register struct screen_line *lp; -/* SCREEN_FINISH - Here when we are exiting the editor - * - * Function: +/** + * \brief Here when we are exiting the editor * - * This routine is called when TECO is being exited to give us a chance - * to cleanly leave the screen package. We put the cursor at the bottom - * of the screen, send any termination escape sequences that are required - * and flush it all out. + * This routine is called when TECO is being exited to give us a chance + * to cleanly leave the screen package. We put the cursor at the bottom + * of the screen, send any termination escape sequences that are required + * and flush it all out. */ void screen_finish() @@ -398,13 +395,12 @@ screen_finish() -/* SCREEN_REFRESH - Redraw the screen based on new database +/** + * \brief Redraw the screen based on new database * - * Function: - * - * This routine gets called after the new companion entries have been set - * up for the saved_screen database. Therefore, we can run through the - * lines and update only those which have changed. + * This routine gets called after the new companion entries have been set + * up for the saved_screen database. Therefore, we can run through the + * lines and update only those which have changed. */ void screen_refresh() @@ -600,13 +596,12 @@ char pos_flag; -/* SCREEN_OPTIMIZE_LINES - Optimize output with insert/delete line operations - * - * Function: +/** + * \brief Optimize output with insert/delete line operations * - * This routine looks for left over mappings between our saved screen - * array and the formatted format_line structures. Old mappings can - * tell us how lines that are still going to be visible have moved. + * This routine looks for left over mappings between our saved screen + * array and the formatted format_line structures. Old mappings can + * tell us how lines that are still going to be visible have moved. */ void screen_optimize_lines() @@ -688,13 +683,12 @@ int offset; -/* SCREEN_ACCOUNT_FOR_DELETE_LINE - Update screen database +/** + * \brief Update screen database * - * Function: - * - * This routine is called when a delete line sequence is sent to - * the terminal. It adjusts the screen database to reflect what - * has happened to the terminal. + * This routine is called when a delete line sequence is sent to + * the terminal. It adjusts the screen database to reflect what + * has happened to the terminal. */ void screen_account_for_delete_line( int y, int count ) @@ -747,13 +741,12 @@ register short *sp; }/* End Routine */ -/* SCREEN_ACCOUNT_FOR_INSERT_LINE - Update screen database - * - * Function: +/** + * \brief Update screen database * - * This routine is called when an insert line sequence is sent to - * the terminal. It adjusts the screen database to reflect what - * has happened to the terminal appearence. + * This routine is called when an insert line sequence is sent to + * the terminal. It adjusts the screen database to reflect what + * has happened to the terminal appearence. */ void screen_account_for_insert_line( int y, int count ) @@ -803,14 +796,13 @@ register short *sp; -/* SCREEN_OPTIMIZE_BY_PATTERN_MATCHING - More insert/delete line optimizations - * - * Function: +/** + * \brief More insert/delete line optimizations * - * This routine is called previous to the brute force screen repaint, - * but after the first crack at insert/delete line optimization. This - * routine looks for patterns of lines which indicate insert/delete - * line can save us some output. + * This routine is called previous to the brute force screen repaint, + * but after the first crack at insert/delete line optimization. This + * routine looks for patterns of lines which indicate insert/delete + * line can save us some output. */ void screen_optimize_by_pattern_matching() @@ -944,17 +936,16 @@ int first_change,last_change; -/* SCREEN_ECHO - Echo the character +/** + * \brief Echo the character * - * Function: - * - * This routine allows the parser to hand us input characters which need - * to be echoed. The reason this is done here instead of by the normal - * screen formatting routines is that some characters are echoed in a - * different way than they are normally displayed. The most notable - * example is newline which just indicates end of line in the normal - * buffer output, but which gets echoed as '<CR>' when it is an echo - * operation. + * This routine allows the parser to hand us input characters which need + * to be echoed. The reason this is done here instead of by the normal + * screen formatting routines is that some characters are echoed in a + * different way than they are normally displayed. The most notable + * example is newline which just indicates end of line in the normal + * buffer output, but which gets echoed as '\<CR\>' when it is an echo + * operation. */ void screen_echo( char data ) @@ -1050,13 +1041,12 @@ register int i; }/* End Routine */ -/* SCREEN_RESET_ECHO - Reset the echo line - * - * Function: +/** + * \brief Reset the echo line * - * This routine is called to reset the echo line according to the current - * list of command tokens. This is used after difficult things like rubout - * which would be very difficult to back out of. + * This routine is called to reset the echo line according to the current + * list of command tokens. This is used after difficult things like rubout + * which would be very difficult to back out of. */ void screen_reset_echo( struct cmd_token *ct ) @@ -1086,13 +1076,12 @@ screen_reset_echo( struct cmd_token *ct ) -/* SCREEN_MESSAGE - Place a message in the message line +/** + * \brief Place a message in the message line * - * Function: - * - * This routine allows the parser to hand us messages which need to be - * displayed. These can be error messages generated by the parse, or - * they can be output messages from a user generated with the ^A command. + * This routine allows the parser to hand us messages which need to be + * displayed. These can be error messages generated by the parse, or + * they can be output messages from a user generated with the ^A command. */ void screen_message( char *string ) @@ -1155,13 +1144,12 @@ too_wide: }/* End Routine */ -/* ERROR_MESSAGE - Place an error message in the message line - * - * Function: +/** + * \brief Place an error message in the message line * - * This routine allows the parser to hand us error messages - * which need to be displayed. In addition, the BELL character - * is output to get the humans attention. + * This routine allows the parser to hand us error messages + * which need to be displayed. In addition, the BELL character + * is output to get the humans attention. */ void error_message( char *string ) @@ -1173,11 +1161,10 @@ error_message( char *string ) }/* End Routine */ -/* SCREEN_RESET_MESSAGE - Reset the message line - * - * Function: +/** + * \brief Reset the message line * - * This routine is called to reset the message line to null + * This routine is called to reset the message line to null */ void screen_reset_message() @@ -1199,11 +1186,10 @@ register short *sp; }/* End Routine */ -/* SCREEN_SAVE_CURRENT_MESSAGE - Copy out the current message +/** + * \brief Copy out the current message * - * Function: - * - * This routine copies out the current message up to a certain length. + * This routine copies out the current message up to a certain length. */ void screen_save_current_message( @@ -1228,11 +1214,10 @@ short *sp; -/* SCREEN_LABEL_LINE - Routine to change the contents of the label line - * - * Function: +/** + * \brief Routine to change the contents of the label line * - * This routine is called to change the label line + * This routine is called to change the label line */ int screen_label_line( struct buff_header *buffer, char *string, int field ) @@ -1329,12 +1314,11 @@ register struct window *wptr; -/* SCREEN_LABEL_WINDOW - Routine to set the window number field +/** + * \brief Routine to set the window number field * - * Function: - * - * This routine is called to modify the TECONAME field of the - * label lines to reflect the window number. + * This routine is called to modify the TECONAME field of the + * label lines to reflect the window number. */ int screen_label_window() @@ -1415,13 +1399,12 @@ int field = LABEL_C_TECONAME; -/* SCREEN_FORMAT_WINDOWS - Generate display contents for all windows - * - * Function: +/** + * \brief Generate display contents for all windows * - * This is the main entry point to the screen formatting function. - * It causes screen format_lines to be generated for all the buffers - * that are currently visible on the screen. + * This is the main entry point to the screen formatting function. + * It causes screen format_lines to be generated for all the buffers + * that are currently visible on the screen. */ void screen_format_windows() @@ -1436,14 +1419,13 @@ register struct window *wptr; }/* End Routine */ -/* SCREEN_REFORMAT_WINDOWS - Reformat windows (because tab size changed) +/** + * \brief Reformat windows (because tab size changed) * - * Function: - * - * This entry point is called when the format buffers of all the - * displayed windows need to be regenerated. The current case in - * mind is when the user changes the tab stops - this causes all - * the format lines to be obsolete. + * This entry point is called when the format buffers of all the + * displayed windows need to be regenerated. The current case in + * mind is when the user changes the tab stops - this causes all + * the format lines to be obsolete. */ void screen_reformat_windows() @@ -1482,13 +1464,12 @@ register struct screen_line *lp; }/* End Routine */ -/* SCREEN_DISPLAY_WINDOW - Generate display for a window - * - * Function: +/** + * \brief Generate display for a window * - * This routine is called to build up the format line descriptor - * structures which represent the edit buffer displayed in the - * specified window. + * This routine is called to build up the format line descriptor + * structures which represent the edit buffer displayed in the + * specified window. */ int screen_display_window( struct window *wptr ) @@ -1668,12 +1649,11 @@ char saw_dot; -/* SCREEN_REBUILD_FROM_SCRATCH - Things have changed a lot, just rebuild it +/** + * \brief Things have changed a lot, just rebuild it * - * Function: - * - * This routine is called to build up the format line descriptor - * structures which represent the current edit buffer. + * This routine is called to build up the format line descriptor + * structures which represent the current edit buffer. */ int screen_rebuild_from_scratch( struct window *wptr ) @@ -1809,14 +1789,13 @@ int lines,olines; -/* SCREEN_SCROLL - Move the current screen up or down specified # lines - * - * Function: +/** + * \brief Move the current screen up or down specified # lines * - * Here in response to the ES command. The user can scroll the screen - * up and down using this command. The current edit position does not - * move, so it is pointless to move it such that 'dot' moves off of the - * screen. + * Here in response to the ES command. The user can scroll the screen + * up and down using this command. The current edit position does not + * move, so it is pointless to move it such that 'dot' moves off of the + * screen. */ void screen_scroll( int count ) @@ -1876,13 +1855,12 @@ register int i; -/* SCREEN_GC_FORMAT_LINES - Garbage collect unused format line structures +/** + * \brief Garbage collect unused format line structures * - * Function: - * - * This routine determines which format structures are in use and - * deallocates the rest of them so that we don't use an excessive - * number of them. + * This routine determines which format structures are in use and + * deallocates the rest of them so that we don't use an excessive + * number of them. */ void screen_gc_format_lines() @@ -1952,13 +1930,12 @@ struct window *wptr; -/* SCREEN_FREE_WINDOW_FORMAT_LINES - Deallocate a window's format lines - * - * Function: +/** + * \brief Deallocate a window's format lines * - * This routine is called to deallocate the list of format lines - * linked off of a line buffer, if they are associated with the - * specified window. + * This routine is called to deallocate the list of format lines + * linked off of a line buffer, if they are associated with the + * specified window. */ void screen_free_window_format_lines( struct window *wptr, struct buff_line *lbp ) @@ -2013,15 +1990,14 @@ register struct format_line *sbp,*tsbp; -/* SCREEN_FREE_FORMAT_LINES - Deallocate a list of format lines +/** + * \brief Deallocate a list of format lines * - * Function: - * - * This routine will clean up all the storage associated with a list of - * format lines. It is called with the address of the head of the list, - * and it will continue on down until the entire list is cleaned up. - * It will also take care of cleaning up any companion pointers from the - * screen array. + * This routine will clean up all the storage associated with a list of + * format lines. It is called with the address of the head of the list, + * and it will continue on down until the entire list is cleaned up. + * It will also take care of cleaning up any companion pointers from the + * screen array. */ void screen_free_format_lines( struct format_line *sbp ) @@ -2131,12 +2107,9 @@ screen_check_format_lines( struct format_line *sbp, int who ) } -/* SCREEN_DEALLOCATE_FORMAT_LOOKASIDE_LIST - * - * Function: - * - * This routine frees up any format_lines we've cached on our local - * lookaside list. +/** + * This routine frees up any format_lines we've cached on our local + * lookaside list. */ void screen_deallocate_format_lookaside_list() @@ -2156,18 +2129,17 @@ register struct format_line *sbp; -/* SCREEN_FIND_WINDOW_FORMAT_LINE - Finds format lines for a particular window - * - * Function: +/** + * \brief Finds format lines for a particular window * - * Each buffer line has chained off of it the format lines which hold - * the data as it appears on the screen. In order to handle multiple - * windows, we need the ability to have a format line per visible - * window. Thus, from the buff_line structure, we chain off a list - * of format lines. Since a buffer line may need many format lines to - * represent it (because it may wrap) we need a list. In addition, - * we want to have one of these lists on a per-window basis, so we - * have a pointer to the next list of format lines for another window. + * Each buffer line has chained off of it the format lines which hold + * the data as it appears on the screen. In order to handle multiple + * windows, we need the ability to have a format line per visible + * window. Thus, from the buff_line structure, we chain off a list + * of format lines. Since a buffer line may need many format lines to + * represent it (because it may wrap) we need a list. In addition, + * we want to have one of these lists on a per-window basis, so we + * have a pointer to the next list of format lines for another window. */ struct format_line * screen_find_window_format_line( struct window *wptr, struct buff_line *lbp ) @@ -2188,13 +2160,12 @@ struct format_line *sbp; -/* SCREEN_FORMAT_BUFF_LINE - Create the format_line structures for a buff line +/** + * \brief Create the format_line structures for a buff line * - * Function: - * - * This routine is called with the address of a buff_line structure. It - * creates the format_line structures which represent the printed version - * of the data, i.e., ready to be written to the terminal. + * This routine is called with the address of a buff_line structure. It + * creates the format_line structures which represent the printed version + * of the data, i.e., ready to be written to the terminal. */ int screen_format_buff_line( struct window *wptr, struct buff_line *lbp ) @@ -2326,13 +2297,12 @@ char expand_buffer[MAXOF(32,MAX_TAB_WIDTH+1)]; -/* SCREEN_FIND_DOT - Find position of dot in a format_line - * - * Function: +/** + * \brief Find position of dot in a format_line * - * There are several times that we need to find the format buffer that is - * associated with dot. This routine determines which format_line dot is - * on, and the offset onto that line (in bytes). + * There are several times that we need to find the format buffer that is + * associated with dot. This routine determines which format_line dot is + * on, and the offset onto that line (in bytes). */ int screen_find_dot( struct window *wptr ) @@ -2418,13 +2388,12 @@ struct buff_header *hbp = wptr->win_buffer; -/* ALLOCATE_FORMAT_BUFFER - Routine to return a format_line structure - * - * Function: +/** + * \brief Routine to return a format_line structure * - * This routine will return a format_line structure to the caller. It - * first looks on the free list, and if there is not one there, it will - * create one the hard way. + * This routine will return a format_line structure to the caller. It + * first looks on the free list, and if there is not one there, it will + * create one the hard way. */ struct format_line * allocate_format_buffer( struct window *wptr, struct buff_line *lbp ) @@ -2487,12 +2456,11 @@ struct buff_header *hbp = wptr->win_buffer; -/* SCREEN_REDRAW - Cause a redraw of the screen +/** + * \brief Cause a redraw of the screen * - * Function: - * - * This routine is called when the screen may have become corrupted - * and needs to be refreshed. + * This routine is called when the screen may have become corrupted + * and needs to be refreshed. */ void screen_redraw() @@ -2519,14 +2487,13 @@ register int i,j; -/* CREATE_WINDOW - Create a window data structure - * - * Function: +/** + * \brief Create a window data structure * - * This function is called to create a window data structure which - * then occupies some portion of the screen. The initial structure - * starts out owning all but the reserved lines, but then lines are - * stolen from it as it is split into other windows. + * This function is called to create a window data structure which + * then occupies some portion of the screen. The initial structure + * starts out owning all but the reserved lines, but then lines are + * stolen from it as it is split into other windows. */ struct window * create_window( int x_size, int y_size ) @@ -2591,12 +2558,11 @@ register int i; -/* SCREEN_SPLIT_WINDOW - Make two where there is only one +/** + * \brief Make two where there is only one * - * Function: - * - * This routine is called when the user wants to split the current window - * into two. This allows him to display several buffers simultaneously. + * This routine is called when the user wants to split the current window + * into two. This allows him to display several buffers simultaneously. */ struct window * screen_split_window( struct window *old_wptr, int lines, int buffer_number ) @@ -2676,12 +2642,11 @@ register struct screen_line *lp; -/* SCREEN_DELETE_WINDOW - Here to delete a window - * - * Function: +/** + * \brief Here to delete a window * - * This function is called when a user wants to delete a window. - * The space gets given back to the window next to it. + * This function is called when a user wants to delete a window. + * The space gets given back to the window next to it. */ void screen_delete_window( struct window *old_wptr ) @@ -2783,12 +2748,11 @@ register struct screen_line *lp; -/* WINDOW_SWITCH - Switch to a new window +/** + * \brief Switch to a new window * - * Function: - * - * This function is called to switch the current window to a different - * window. + * This function is called to switch the current window to a different + * window. */ int window_switch( int window_number ) @@ -55,16 +55,15 @@ char *tecexec_c_version = "tecexec.c: $Revision: 1.3 $"; -/* EXECUTE_A_STATE - Do the runtime execution part of a command +/** + * \brief Do the runtime execution part of a command * - * Function: - * - * This routine is called to execute the runtime part of a command token. - * This could be during immediate execution mode, directly after a token - * gets parsed, or it could be during final stages when we are either - * running commands which cannot be undone (like ex), or simply complex - * things like an iteration. The execute_state which we dispatch on was - * set by the parse state during syntax analysis. + * This routine is called to execute the runtime part of a command token. + * This could be during immediate execution mode, directly after a token + * gets parsed, or it could be during final stages when we are either + * running commands which cannot be undone (like ex), or simply complex + * things like an iteration. The execute_state which we dispatch on was + * set by the parse state during syntax analysis. */ int execute_a_state( struct cmd_token *ct, struct cmd_token *uct ) @@ -2555,12 +2554,11 @@ char tmp_buffer[LINE_BUFFER_SIZE],tmp_message[LINE_BUFFER_SIZE]; -/* PUSH_QREGISTER - Push a Q register onto the stack - * - * Function: +/** + * \brief Push a Q register onto the stack * - * This routine is called to make a copy of a Q register and place it - * on the Q register stack. + * This routine is called to make a copy of a Q register and place it + * on the Q register stack. */ int push_qregister( char letter ) @@ -2589,12 +2587,11 @@ register struct buff_header *qbp; }/* End Routine */ -/* EXTRACT_LABEL - Build a string with the contents of the label in it +/** + * \brief Build a string with the contents of the label in it * - * Function: - * - * This routine is called to build a string with the label name - * in it. The current use is for error messages. + * This routine is called to build a string with the label name + * in it. The current use is for error messages. */ void extract_label( struct cmd_token *label_ptr, char *string1 ) @@ -2616,12 +2613,11 @@ register char *cp1; }/* End Routine */ -/* COMPARE_LABEL - Test if this is our label - * - * Function: +/** + * \brief Test if this is our label * - * This routine is called by the GOTO function to compare labels - * to see if they match. + * This routine is called by the GOTO function to compare labels + * to see if they match. */ int compare_label( struct cmd_token *goto_ptr, struct cmd_token *label_ptr ) @@ -2667,14 +2663,13 @@ char *cp1; -/* FIND_CONDITIONAL_ELSE - Routine to find the else of a conditional +/** + * \brief Routine to find the else of a conditional * - * Function: - * - * This routine is called by the conditional expressions when the - * specified condition has not been met and we want to execute the - * else clause of the conditional. The routine searches until it - * finds either the else, or the end of the conditional. + * This routine is called by the conditional expressions when the + * specified condition has not been met and we want to execute the + * else clause of the conditional. The routine searches until it + * finds either the else, or the end of the conditional. */ int find_conditional_else( struct cmd_token *ct ) @@ -2705,12 +2700,11 @@ find_conditional_else( struct cmd_token *ct ) }/* End Routine */ -/* FIND_CONDITIONAL_END - Routine to find the close of a conditional - * - * Function: +/** + * \brief Routine to find the close of a conditional * - * This routine is called to skip over the else clause and find the - * end of the conditional. + * This routine is called to skip over the else clause and find the + * end of the conditional. */ int find_conditional_end( struct cmd_token *ct ) @@ -2733,13 +2727,12 @@ find_conditional_end( struct cmd_token *ct ) -/* EXEC_DOQ0 - Execute Q register zero as a macro - * - * Function: +/** + * \brief Execute Q register zero as a macro * - * This routine is called to execute Q register zero as a macro on - * startup. This allows the user to initialize things from his teco.ini - * before teco reaches command level. + * This routine is called to execute Q register zero as a macro on + * startup. This allows the user to initialize things from his teco.ini + * before teco reaches command level. */ int exec_doq0() @@ -67,11 +67,10 @@ int memstat_by_type[TYPE_C_MAXTYPE-TYPE_C_MINTYPE+1]; void tecmem_verify(unsigned char,char *,char *); -/* TEC_ALLOC - Routine to allocate some memory +/** + * \brief Routine to allocate some memory * - * Function: - * - * This routine is called to request memory + * This routine is called to request memory */ char * tec_alloc( int type, int size ) @@ -209,12 +208,11 @@ extern char outof_memory; }/* End Routine */ -/* TEC_RELEASE - Envelope routine for free() - * - * Function: +/** + * \brief Envelope routine for free() * - * This routine is called to release memory which was previously allocated - * by calling the tec_alloc routine. + * This routine is called to release memory which was previously allocated + * by calling the tec_alloc routine. */ void tec_release( unsigned char type, char *addr ) @@ -257,12 +255,11 @@ register int i; -/* TECMEM_VERIFY - Verify that structure type hasn't been corrupted - * - * Function: +/** + * \brief Verify that structure type hasn't been corrupted * - * This debug routine checks to see whether the memory block has been - * overwritten by checking the type code. + * This debug routine checks to see whether the memory block has been + * overwritten by checking the type code. */ void tecmem_verify( unsigned char type, char *addr, char *message ) @@ -291,12 +288,11 @@ register int i; -/* TEC_GC_LISTS - Garbage collect any local lookaside lists +/** + * \brief Garbage collect any local lookaside lists * - * Function: - * - * This routine is called before we call malloc for more memory in - * an attempt to find the memory on some local lookaside lists. + * This routine is called before we call malloc for more memory in + * an attempt to find the memory on some local lookaside lists. */ void tec_gc_lists() @@ -324,12 +320,11 @@ initialize_memory_stats() } -/* TECMEM_STATS - Insert memory statistics into the current buffer - * - * Function: +/** + * \brief Insert memory statistics into the current buffer * - * This routine is called by the buffer map routine to allow us to - * insert some memory statistics into the map. + * This routine is called by the buffer map routine to allow us to + * insert some memory statistics into the map. */ void tecmem_stats() @@ -123,12 +123,11 @@ extern "C" { -/* TECO - Text Edit and COrrector +/** + * \brief Text Edit and COrrector * - * Function: - * - * This is the entry point for TECO. It initializes the terminal, reads - * in the specified files, and generally gets things going. + * This is the entry point for TECO. It initializes the terminal, reads + * in the specified files, and generally gets things going. */ int main( int argc, char **argv ) @@ -201,13 +200,12 @@ register int i; #ifdef UNIX -/* INITIALIZE_TTY - Set the tty up the way we want it - * - * Function: +/** + * \brief Set the tty up the way we want it * - * This routine is called at startup time to set up the terminal the way - * that we require, i.e., it sets the tty modes. It also gives the screen - * package a chance to initialize itself. + * This routine is called at startup time to set up the terminal the way + * that we require, i.e., it sets the tty modes. It also gives the screen + * package a chance to initialize itself. */ void initialize_tty() @@ -431,13 +429,12 @@ initialize_tty() #if !HAVE_TCGETATTR -/* TCGETATTR - Mimic the POSIX terminal get/set functions - * - * Function: +/** + * \brief Mimic the POSIX terminal get/set functions * - * For a system being compiled with POSIX headers, but which doesn't - * actually have all the POSIX functions in libc, we have to fake up - * this call. + * For a system being compiled with POSIX headers, but which doesn't + * actually have all the POSIX functions in libc, we have to fake up + * this call. */ int tcgetattr(fd,termios_p) @@ -470,13 +467,12 @@ int status; #if !HAVE_TCSETATTR -/* TCSETATTR - Mimic the POSIX terminal get/set functions +/** + * \brief Mimic the POSIX terminal get/set functions * - * Function: - * - * For a system being compiled with POSIX headers, but which doesn't - * actually have all the POSIX functions in libc, we have to fake up - * this call. + * For a system being compiled with POSIX headers, but which doesn't + * actually have all the POSIX functions in libc, we have to fake up + * this call. */ tcsetattr(fd,flags,termios_p) int fd; @@ -509,13 +505,12 @@ int status; #ifdef VMS -/* INITIALIZE_TTY - Set the tty up the way we want it - * - * Function: +/** + * \brief Set the tty up the way we want it * - * This routine is called at startup time to set up the terminal the way - * that we require, i.e., it sets the tty modes. It also gives the screen - * package a chance to initialize itself. + * This routine is called at startup time to set up the terminal the way + * that we require, i.e., it sets the tty modes. It also gives the screen + * package a chance to initialize itself. */ void initialize_tty() @@ -592,12 +587,11 @@ struct sense_iosb { -/* RESTORE_TTY - Set the tty back to the way that it was - * - * Function: +/** + * \brief Set the tty back to the way that it was * - * This routine is called at exit time to set the terminal modes back - * how they were when we started. + * This routine is called at exit time to set the terminal modes back + * how they were when we started. */ void restore_tty() @@ -641,15 +635,14 @@ restore_tty() -/* TTY_INPUT_PENDING - Check if there is input waiting on the cmd channel +/** + * \brief Check if there is input waiting on the cmd channel * - * Function: - * - * This routine returns a true false indication of whether or not there - * is input waiting on the command channel. This generally gets used to - * set the input_pending_flag variable. Now it is set to only work if - * the baud rate is quite low, since some of the current side effects are - * undesirable. + * This routine returns a true false indication of whether or not there + * is input waiting on the command channel. This generally gets used to + * set the input_pending_flag variable. Now it is set to only work if + * the baud rate is quite low, since some of the current side effects are + * undesirable. */ int tty_input_pending() @@ -752,11 +745,10 @@ int err; -/* INIT_SIGNALS - Initialize the signal interface for our use - * - * Function: +/** + * \brief Initialize the signal interface for our use * - * This routine sets up the way that we want signals to behave + * This routine sets up the way that we want signals to behave */ void init_signals() @@ -792,12 +784,11 @@ int cmd_winch(); -/* TECO_INI - Routine to read the TECO_INI file - * - * Function: +/** + * \brief Routine to read the TECO_INI file * - * This routine reads the user's TECO_INI file and sets up the default - * Q-Register contents he has specified. It also executes Q-Register 0. + * This routine reads the user's TECO_INI file and sets up the default + * Q-Register contents he has specified. It also executes Q-Register 0. */ void teco_ini() @@ -957,12 +948,11 @@ char *cp, c; -/* HANDLE_COMMAND_LINE - OS Dependent Code to handle command line arguments +/** + * \brief OS Dependent Code to handle command line arguments * - * Function: - * - * This code handles the command line arguments to VTECO. This requires - * different processing for different operating systems. + * This code handles the command line arguments to VTECO. This requires + * different processing for different operating systems. */ #ifdef UNIX int @@ -1183,11 +1173,10 @@ long sub_pid; -/* EXPAND_FILENAME - Expand VMS wildcards to a list of files - * - * Function: +/** + * \brief Expand VMS wildcards to a list of files * - * This routine returns a linked list of expanded filenames. + * This routine returns a linked list of expanded filenames. */ struct wildcard_expansion * expand_filename(wildcard_string) @@ -1327,13 +1316,10 @@ char *cp,*sp; -/* - * EXPAND_FILENAME - Expand a wildcard specification to a list of files - * - * Function: - * - * This routine returns a linked list of expanded filenames. +/** + * \brief Expand a wildcard specification to a list of files * + * This routine returns a linked list of expanded filenames. */ #ifdef UNIX struct wildcard_expansion *name_list; @@ -1536,13 +1522,11 @@ read_directory: }/* End Routine */ -/* - * MATCH_NAME - Check whether a name satisfies a wildcard specification +/** + * \brief Check whether a name satisfies a wildcard specification * - * Function: - * - * This routine attempts to do csh style wildcard matching so that - * internal teco routines may support this behavior. + * This routine attempts to do csh style wildcard matching so that + * internal teco routines may support this behavior. */ int match_name( char *name, char *pattern ) @@ -1634,12 +1618,10 @@ int pattern_char; -/* PUNT - Exit with a specified error code - * - * Function: - * - * PUNT is called with an errno code with which we want to exit +/** + * \brief Exit with a specified error code * + * PUNT is called with an errno code with which we want to exit */ void punt( int exit_code ) @@ -1651,11 +1633,10 @@ punt( int exit_code ) }/* End Routine */ -/* TEC_PANIC - Print an error string +/** + * \brief Print an error string * - * Function: - * - * This routine is called previous to punt to print an error string + * This routine is called previous to punt to print an error string */ void tec_panic( char *string ) @@ -1673,12 +1654,11 @@ tec_panic( char *string ) }/* End Routine */ -/* TEC_ERROR - Exit with specified error code, printing an error string - * - * Function: +/** + * \brief Exit with specified error code, printing an error string * - * This routine is called to exit with the specified error code - * after printing the supplied error string. + * This routine is called to exit with the specified error code + * after printing the supplied error string. */ void tec_error( int code, char *string ) @@ -1696,12 +1676,11 @@ tec_error( int code, char *string ) }/* End Routine */ #if DEBUG_UNUSED -/* OPEN_DEBUG_LOG_FILE - Open a file to write debug output to - * - * Function: +/** + * \brief Open a file to write debug output to * - * This routine is called so that a log file is open for writing of - * debugging messages. + * This routine is called so that a log file is open for writing of + * debugging messages. */ void open_debug_log_file() @@ -1718,12 +1697,11 @@ open_debug_log_file() -/* MAP_BAUD - Map system dependent baud fields to a standard integer +/** + * \brief Map system dependent baud fields to a standard integer * - * Function: - * - * This routine takes an operating system specific baud rate - * representation, and maps it into a simple integer value. + * This routine takes an operating system specific baud rate + * representation, and maps it into a simple integer value. */ int map_baud( int input_baud_rate ) @@ -1796,12 +1774,11 @@ static int equivalent_baudrates[] = { -/* ERROR_TEXT - Return 'errno' style error string - * - * Function: +/** + * \brief Return 'errno' style error string * - * This routine is called to return the error string associated with an - * errno error code. + * This routine is called to return the error string associated with an + * errno error code. */ char * error_text( int err_num ) @@ -74,14 +74,13 @@ char *tecparse_c_version = "tecparse.c: $Revision: 1.3 $"; -/* TECPARSE - Main entry point of the parser +/** + * \brief Main entry point of the parser * - * Function: - * - * This routine reads input characters and builds the token - * list. It also calls the execute states as long as the go - * flag is set. When it hits the final parse state, it then - * executes any states which were not immediately executed. + * This routine reads input characters and builds the token + * list. It also calls the execute states as long as the go + * flag is set. When it hits the final parse state, it then + * executes any states which were not immediately executed. */ void tecparse() @@ -157,12 +156,11 @@ static char no_mem = 0; -/* TECPARSE_SYNTAX - Here to manipulate the tree according to new input - * - * Function: +/** + * \brief Here to manipulate the tree according to new input * - * This routine is called with an input byte to manipulate the - * parser tree and execute any associated code. + * This routine is called with an input byte to manipulate the + * parser tree and execute any associated code. */ int tecparse_syntax( int c ) @@ -463,18 +461,17 @@ struct undo_token *ut; -/* TECMACRO - Here to execute a Q register as a macro - * - * Function: +/** + * \brief Here to execute a Q register as a macro * - * This routine executes the specified q register as a macro. It returns - * SUCCESS or FAILURE depending on what happens within the macro. Note - * that it is very similar to the main parse routine. There are two major - * differences: First, the characters are gotton from the q-register - * rather than the input stream, and second, the entire parse is done - * to completion before any execution takes place. This means that the - * macro can modify the contents of the q-register without changing the - * way the macro will execute. + * This routine executes the specified q register as a macro. It returns + * SUCCESS or FAILURE depending on what happens within the macro. Note + * that it is very similar to the main parse routine. There are two major + * differences: First, the characters are gotton from the q-register + * rather than the input stream, and second, the entire parse is done + * to completion before any execution takes place. This means that the + * macro can modify the contents of the q-register without changing the + * way the macro will execute. */ int tecmacro( @@ -723,13 +720,12 @@ cleanup: -/* PARSE_SPECIAL_CHARACTER - Test for and handle special characters +/** + * \brief Test for and handle special characters * - * Function: - * - * This routine is called on each input character to determine whether - * it requires special handling. It catches characters such as rubout, - * ^W, ^U. + * This routine is called on each input character to determine whether + * it requires special handling. It catches characters such as rubout, + * ^W, ^U. */ int parse_special_character( struct cmd_token *ct, int c ) @@ -823,14 +819,13 @@ int tmp; -/* PARSE_RUBOUT_CHARACTER - Rubout the most recent character - * - * Function: +/** + * \brief Rubout the most recent character * - * This routine is called when a rubout character is typed. We have to - * back the parser up to the state it was in before the original char - * was typed, as well as performing any undo functions to make sure - * that the edit buffer also gets backed up. + * This routine is called when a rubout character is typed. We have to + * back the parser up to the state it was in before the original char + * was typed, as well as performing any undo functions to make sure + * that the edit buffer also gets backed up. */ struct cmd_token * parse_rubout_character( struct cmd_token *ct, int preserve_flag ) @@ -901,12 +896,11 @@ char saved_opcode; -/* PARSE_RUBOUT_CMD_TOKEN - Rubout the most recent command token - * - * Function: +/** + * \brief Rubout the most recent command token * - * This routine is called to remove the last token on the command - * list. It gets used in rubout / ^U / ^W processing. + * This routine is called to remove the last token on the command + * list. It gets used in rubout / ^U / ^W processing. */ struct cmd_token * parse_rubout_cmd_token( struct cmd_token *ct ) @@ -945,11 +939,10 @@ struct undo_token *ut; -/* PARSER_GETC - Return next input character +/** + * \brief Return next input character * - * Function: - * - * This routine is called by the parser when another input byte is needed. + * This routine is called by the parser when another input byte is needed. */ int parser_getc() @@ -1053,15 +1046,14 @@ printf("!!! iosb[0] is %d\n",qio_iosb[0]); -/* PRESERVE_RUBOUT_CHARCTER - Save rubbed out characters - * - * Function: +/** + * \brief Save rubbed out characters * - * This routine is called in response to the user rubbing out input - * characters with rubout, ^U, or ^W. Sometimes he does this by - * mistake, and can delete large amounts of typing unintentially. - * This routine saves these characters in a special Q-register so - * that he can get them back if he wants. + * This routine is called in response to the user rubbing out input + * characters with rubout, ^U, or ^W. Sometimes he does this by + * mistake, and can delete large amounts of typing unintentially. + * This routine saves these characters in a special Q-register so + * that he can get them back if he wants. */ void preserve_rubout_char( char the_byte ) @@ -1089,13 +1081,12 @@ register struct buff_header *qbp; -/* UNPRESERVE_RUBOUT_CHAR - Poke a rubbed out char back into the parse - * - * Function: +/** + * \brief Poke a rubbed out char back into the parse * - * This routine is called on behalf of a ^R command which causes the - * most recent rubbed out character to be restored to the parse tree. - * The return code determines whether this was done okay or not. + * This routine is called on behalf of a ^R command which causes the + * most recent rubbed out character to be restored to the parse tree. + * The return code determines whether this was done okay or not. */ int unpreserve_rubout_char( struct cmd_token *ct __attribute__((unused))) @@ -1133,12 +1124,11 @@ int c; -/* PARSER_CLEAN_PRESERVE_LIST - Zero the rubout preserve Q-register +/** + * \brief Zero the rubout preserve Q-register * - * Function: - * - * This routine is called at double-escape time to clean up the - * special Q-register so that it doesn't grow without bounds. + * This routine is called at double-escape time to clean up the + * special Q-register so that it doesn't grow without bounds. */ void parser_clean_preserve_list() @@ -1165,12 +1155,11 @@ register struct buff_header *qbp; -/* PARSER_DUMP_COMMAND_LINE - Copy the current parse tree into a Q-register - * - * Function: +/** + * \brief Copy the current parse tree into a Q-register * - * This routine copies the input bytes from the current command string - * into the specified Q-register. + * This routine copies the input bytes from the current command string + * into the specified Q-register. */ void parser_dump_command_line( struct buff_header *qbp ) @@ -1192,12 +1181,11 @@ register struct cmd_token *ct; -/* PARSER_REPLACE_COMMAND_LINE - Replace current parse tree +/** + * \brief Replace current parse tree * - * Function: - * - * This routine replaces the current command string with the contents - * the specified Q-register. + * This routine replaces the current command string with the contents + * the specified Q-register. */ int parser_replace_command_line( struct buff_header *qbp ) @@ -1287,15 +1275,14 @@ register int cb_zee; -/* ALLOCATE_CMD_TOKEN - Allocate a command token structure - * - * Function: +/** + * \brief Allocate a command token structure * - * This routine is called to allocate a command token structure. If there - * is one on the free list, it is used, otherwise we allocate one. If - * an old_token was specified, the context area is copied into the new - * token, which has the effect of rippling the context forward through - * the parse. + * This routine is called to allocate a command token structure. If there + * is one on the free list, it is used, otherwise we allocate one. If + * an old_token was specified, the context area is copied into the new + * token, which has the effect of rippling the context forward through + * the parse. */ struct cmd_token * allocate_cmd_token( struct cmd_token *old_token ) @@ -1346,12 +1333,11 @@ register struct cmd_token *ct; -/* FREE_CMD_TOKEN - Routine to place a cmd token on the free list - * - * Function: +/** + * \brief Routine to place a cmd token on the free list * - * This routine is called with the address of the command token - * to be placed on the free list. + * This routine is called with the address of the command token + * to be placed on the free list. */ void free_cmd_token( struct cmd_token *ct ) @@ -1363,14 +1349,13 @@ free_cmd_token( struct cmd_token *ct ) }/* End Routine */ -/* PAUSE_WHILE_IN_INPUT_WAIT - Pauses with the terminal in a good state +/** + * \brief Pauses with the terminal in a good state * - * Function: - * - * This routine is called to pause the editor while we have been in - * an input wait state. The big deal here is that we want to remove - * the reverse video box that may be on the echo line before we pause - * back to the system command processor. + * This routine is called to pause the editor while we have been in + * an input wait state. The big deal here is that we want to remove + * the reverse video box that may be on the echo line before we pause + * back to the system command processor. */ void pause_while_in_input_wait() @@ -1388,12 +1373,11 @@ pause_while_in_input_wait() -/* PARSER_CLEANUP_CTLIST - Routine to deallocate all the blocks on a ct list - * - * Function: +/** + * \brief Routine to deallocate all the blocks on a ct list * - * This function deallocates all the blocks on a command token list, - * including cmd_tokens and undo_tokens. + * This function deallocates all the blocks on a command token list, + * including cmd_tokens and undo_tokens. */ void parser_cleanup_ctlist( struct cmd_token *ct ) @@ -1426,13 +1410,12 @@ register struct cmd_token *oct; -/* PARSE_ANY_ARGUMENTS - Called by routines that don't want any arguments +/** + * \brief Called by routines that don't want any arguments * - * Function: - * - * This function is called by states which don't want to accept any - * arguments. If there are any present, it will generate an error message - * and set the error state. + * This function is called by states which don't want to accept any + * arguments. If there are any present, it will generate an error message + * and set the error state. */ int parse_any_arguments( struct cmd_token *ct, char *cmd_name ) @@ -1457,13 +1440,12 @@ char tmp_message[LINE_BUFFER_SIZE]; }/* End Routine */ -/* PARSE_MORE_THAN_ONE_ARG - Called by routines that only want one arg - * - * Function: +/** + * \brief Called by routines that only want one arg * - * This function is called by states which only want to accept one - * argument. If there are two present, it will generate an error message - * and set the error state. + * This function is called by states which only want to accept one + * argument. If there are two present, it will generate an error message + * and set the error state. */ int parse_more_than_one_arg( struct cmd_token *ct, char *cmd_name ) @@ -1491,12 +1473,11 @@ char tmp_message[LINE_BUFFER_SIZE]; -/* PARSE_ILLEGAL_BUFFER_POSITION - Check for illegal buffer positions - * - * Function: +/** + * \brief Check for illegal buffer positions * - * This routine is called to verify that buffer positions specified are - * legal. If they are not, it generates an error message. + * This routine is called to verify that buffer positions specified are + * legal. If they are not, it generates an error message. */ int parse_illegal_buffer_position( int pos1, int pos2, char *cmd_name ) @@ -1523,12 +1504,11 @@ char tmp_message[LINE_BUFFER_SIZE]; -/* PARSER_RESET_ECHO - Re-echo the input line +/** + * \brief Re-echo the input line * - * Function: - * - * This is just an entry point to restore the echo line from a module - * that doesn't want to know about the cmd_list structure. + * This is just an entry point to restore the echo line from a module + * that doesn't want to know about the cmd_list structure. */ void parser_reset_echo() @@ -1541,13 +1521,12 @@ parser_reset_echo() -/* TRACE_MODE - Trace execution of commands - * - * Function: +/** + * \brief Trace execution of commands * - * This routine is called at parse and execute time if tracing has been - * enabled by the ? command. It causes q-register ? to be filled with - * execution trace information. + * This routine is called at parse and execute time if tracing has been + * enabled by the ? command. It causes q-register ? to be filled with + * execution trace information. */ void trace_mode( int phase, struct cmd_token *ct0, struct cmd_token *ct1 ) @@ -36,12 +36,11 @@ char *tecstate_c_version = "tecstate.c: $Revision: 1.3 $"; -/* PARSE_INPUT_CHARACTER - Continue the parse with the supplied character +/** + * \brief Continue the parse with the supplied character * - * Function: - * - * We re-enter the parser with a new character at this point. We jump back - * to the state we left before. + * We re-enter the parser with a new character at this point. We jump back + * to the state we left before. */ void parse_input_character( struct cmd_token *ct, struct cmd_token *uct ) @@ -2340,14 +2339,13 @@ register struct cmd_token *oct = NULL; -/* PARSE_CHECK_QNAME - Check that the specified Q-register name is ok - * - * Function: +/** + * \brief Check that the specified Q-register name is ok * - * This routine is called when a parse state wants to verify that the - * specified Q-register name is syntactically correct. It does not - * verify that the Q-register exists, because the execute phase may just - * not have got around to that yet. + * This routine is called when a parse state wants to verify that the + * specified Q-register name is syntactically correct. It does not + * verify that the Q-register exists, because the execute phase may just + * not have got around to that yet. */ int parse_check_qname( struct cmd_token *ct, char name ) @@ -110,12 +110,11 @@ short tmspc10[] = { }; #endif -/* TERM_INIT - Initialize the terminal for cursor operations +/** + * \brief Initialize the terminal for cursor operations * - * Function: - * - * This entry point gives the terminal package a chance to initialize - * the terminal for cursor type operations. + * This entry point gives the terminal package a chance to initialize + * the terminal for cursor type operations. */ void term_init() @@ -180,14 +179,13 @@ term_init() -/* TERM_FINISH - Here when we are exiting the editor - * - * Function: +/** + * \brief Here when we are exiting the editor * - * This routine is called when TECO is being exited to give us a chance - * to cleanly leave the screen package. We put the cursor at the bottom - * of the screen, send any termination escape sequences that are required - * and flush it all out. + * This routine is called when TECO is being exited to give us a chance + * to cleanly leave the screen package. We put the cursor at the bottom + * of the screen, send any termination escape sequences that are required + * and flush it all out. */ void term_finish() @@ -216,13 +214,12 @@ term_finish() -/* TERM_STANDOUT - Set standout mode on the terminal - * - * Function: +/** + * \brief Set standout mode on the terminal * - * This routine is called to set the highlighting standout - * mode. All characters output from now on will typically - * be reverse video, or whatever attribute the terminal uses. + * This routine is called to set the highlighting standout + * mode. All characters output from now on will typically + * be reverse video, or whatever attribute the terminal uses. */ void term_standout() @@ -244,13 +241,12 @@ term_standout() }/* End Routine */ -/* TERM_STANDEND - Clear standout mode on the terminal +/** + * \brief Clear standout mode on the terminal * - * Function: - * - * This routine is called to reset the highlighting standout - * mode. All characters output from now on will be in the - * normal rendition mode. + * This routine is called to reset the highlighting standout + * mode. All characters output from now on will be in the + * normal rendition mode. */ void term_standend() @@ -272,12 +268,11 @@ term_standend() }/* End Routine */ -/* TERM_CLRTOEOL - Clear to End Of Line - * - * Function: +/** + * \brief Clear to End Of Line * - * This routine sends the ESCape sequence to clear all characters - * from the present position until the end of the line. + * This routine sends the ESCape sequence to clear all characters + * from the present position until the end of the line. */ void term_clrtoeol() @@ -296,12 +291,11 @@ term_clrtoeol() }/* End Routine */ -/* TERM_CLRTOBOT - Clear to End Of Screen +/** + * \brief Clear to End Of Screen * - * Function: - * - * This routine sends the ESCape sequence to clear all characters - * from the present position until the end of the terminal screen. + * This routine sends the ESCape sequence to clear all characters + * from the present position until the end of the terminal screen. */ void term_clrtobot() @@ -324,13 +318,12 @@ term_clrtobot() -/* TERM_INSERT_LINE - Perform an insert-line terminal function - * - * Function: +/** + * \brief Perform an insert-line terminal function * - * This routine is called to output the insert-line escape sequence. - * It checks to see what insert-line capabilities the terminal has, - * and tries to use the optimum one. + * This routine is called to output the insert-line escape sequence. + * It checks to see what insert-line capabilities the terminal has, + * and tries to use the optimum one. */ void term_insert_line( int position, int count ) @@ -414,13 +407,12 @@ term_insert_line( int position, int count ) -/* TERM_DELETE_LINE - Perform an delete-line terminal function - * - * Function: +/** + * \brief Perform an delete-line terminal function * - * This routine is called to output the delete-line escape sequence. - * It checks to see what delete-line capabilities the terminal has, - * and tries to use the optimum one. + * This routine is called to output the delete-line escape sequence. + * It checks to see what delete-line capabilities the terminal has, + * and tries to use the optimum one. */ void term_delete_line( int position, int count ) @@ -506,12 +498,11 @@ term_delete_line( int position, int count ) #ifdef TERMCAP -/* TERM_PUTNUM - Output a termcap string which takes a single argument +/** + * \brief Output a termcap string which takes a single argument * - * Function: - * - * This routine is called to output a termcap string which has an - * imbedded %d to be replaced with the single argument. + * This routine is called to output a termcap string which has an + * imbedded %d to be replaced with the single argument. */ int term_putnum( char *termcap_string, int argument, int affected ) @@ -581,11 +572,10 @@ one: #ifdef TERMCAP -/* TERM_PUTS - Output a termcap string with padding - * - * Function: +/** + * \brief Output a termcap string with padding * - * This routine is called to output a termcap string with padding added. + * This routine is called to output a termcap string with padding added. */ void term_puts( char *termcap_string, int lines_affected ) @@ -666,32 +656,35 @@ register int mspc10; -/* TERM_GOTO - Send sequence to position the terminal cursor +/** + * \brief Send sequence to position the terminal cursor * - * Function: + * This routine provides direct cursoring capability by using the + * CM termcap/terminfo string. This string looks like a \p printf which + * must be interpreted by this code. This allows pretty much + * arbitrary terminal escape sequences to be supported. The meaning + * of the special characters in the string are: * - * This routine provides direct cursoring capability by using the - * CM termcap/terminfo string. This string looks like a printf which - * must be interpreted by this code. This allows pretty much - * arbitrary terminal escape sequences to be supported. The meaning - * of the special characters in the string are: + * <table> + * <tr><td>\c \%d</td> <td>Same as in \p printf</td></tr> + * <tr><td>\c \%2</td> <td>like \c \%2d</td></tr> + * <tr><td>\c \%3</td> <td>like \c \%3d</td></tr> + * <tr><td>\c \%.</td> <td>gives \c \%c hacking special case characters</td></tr> + * <tr><td>\c \%+x</td> <td>like \c \%c but adding \e x first</td></tr> + * </table> * - * %d - Same as in printf - * %2 - like %2d - * %3 - like %3d - * %. - gives %c hacking special case characters - * %+x - like %c but adding x first + * The following codes affect the state but don't use up a value * - * The following codes affect the state but don't use up a value + * <table> + * <tr><td>\c \%\>xy</td> <td>if value \> \e x add \e y</td></tr> + * <tr><td>\c \%r</td> <td>reverses row column</td></tr> + * <tr><td>\c \%i</td> <td>increments row column (for one origin indexing)</td></tr> + * <tr><td>\c \%\%</td> <td>gives \c \%</td></tr> + * <tr><td>\c \%B</td> <td>BCD (2 decimal digits encoded in one byte)</td></tr> + * <tr><td>\c \%D</td> <td>Delta Data (backwards bcd)</td></tr> + * </table> * - * %>xy if value > x add y - * %r reverses row column - * %i increments row column (for one origin indexing) - * %% gives % - * %B BCD (2 decimal digits encoded in one byte) - * %D Delta Data (backwards bcd) - * - * all other characters simply get output + * all other characters simply get output */ int term_goto(int dest_x, int dest_y ) @@ -841,31 +834,34 @@ sleep(5); #ifdef TERMCAP -/* TERM_SCROLL_REGION - Send sequence to set up a scroll region ala VT100 - * - * Function: +/** + * \brief Send sequence to set up a scroll region ala VT100 * - * This routine is identical to term_goto in most respects, except that - * it is sending the 'set scroll region' escape sequence instead of the - * cursor position sequence. The following escapes are defined for - * substituting row and column: + * This routine is identical to \p term_goto in most respects, except that + * it is sending the 'set scroll region' escape sequence instead of the + * cursor position sequence. The following escapes are defined for + * substituting row and column: * - * %d - Same as in printf - * %2 - like %2d - * %3 - like %3d - * %. - gives %c hacking special case characters - * %+x - like %c but adding x first + * <table> + * <tr><td>\c \%d</td> <td>Same as in \p printf</td></tr> + * <tr><td>\c \%2</td> <td>like \c \%2d</td></tr> + * <tr><td>\c \%3</td> <td>like \c \%3d</td></tr> + * <tr><td>\c \%.</td> <td>gives \c \%c hacking special case characters</td></tr> + * <tr><td>\c \%+x</td> <td>like \c \%c but adding \e x first</td></tr> + * </table> * - * The following codes affect the state but don't use up a value + * The following codes affect the state but don't use up a value * - * %>xy if value > x add y - * %r reverses row column - * %i increments row column (for one origin indexing) - * %% gives % - * %B BCD (2 decimal digits encoded in one byte) - * %D Delta Data (backwards bcd) + * <table> + * <tr><td>\c \%\>xy</td> <td>if value \> \e x add \e y</td></tr> + * <tr><td>\c \%r</td> <td>reverses row column</td></tr> + * <tr><td>\c \%i</td> <td>increments row column (for one origin indexing)</td></tr> + * <tr><td>\c \%\%</td> <td>gives \c \%</td></tr> + * <tr><td>\c \%B</td> <td>BCD (2 decimal digits encoded in one byte)</td></tr> + * <tr><td>\c \%D</td> <td>Delta Data (backwards bcd)</td></tr> + * </table> * - * all other characters simply get output + * all other characters simply get output */ int term_scroll_region( int top, int bottom ) @@ -991,13 +987,12 @@ setwhich: #ifdef TERMINFO -/* TERM_SCROLL_REGION - Set up a scroll region - * - * Function: +/** + * \brief Set up a scroll region * - * This routine is called to set up a scrolling region on the - * terminal. This is typically being used to emulate insert/delete - * line. + * This routine is called to set up a scrolling region on the + * terminal. This is typically being used to emulate insert/delete + * line. */ int term_scroll_region(top,bottom) @@ -1015,12 +1010,11 @@ int bottom; -/* TERM_PUTC - Output a single character +/** + * \brief Output a single character * - * Function: - * - * This routine is called to output a single character to the screen - * output buffer. If this fills the output buffer, flush the buffer. + * This routine is called to output a single character to the screen + * output buffer. If this fills the output buffer, flush the buffer. */ int term_putc( int data ) @@ -1036,12 +1030,11 @@ term_putc( int data ) }/* End Routine */ -/* TERM_FLUSH - Flush any data in the output buffer - * - * Function: +/** + * \brief Flush any data in the output buffer * - * This routine flushes any bytes sitting in the screen output - * buffer to the terminal. + * This routine flushes any bytes sitting in the screen output + * buffer to the terminal. */ void term_flush() @@ -1069,13 +1062,12 @@ term_flush() -/* INIT_TERMCAP - Read in the termcap description of the tty +/** + * \brief Read in the termcap description of the tty * - * Function: - * - * This routine looks up the terminal description in the termcap file, and - * sets up the stuff for the screen package. It also checks that the tty - * has certain basic capabilities that we require. + * This routine looks up the terminal description in the termcap file, and + * sets up the stuff for the screen package. It also checks that the tty + * has certain basic capabilities that we require. */ int init_term_description() @@ -1336,12 +1328,11 @@ char *termcap = :kh=\\E[H:k1=\\EOP:k2=\\EOQ:k3=\\EOR:k4=\\EOS:pt:sr=5\\EM:xn:xv:"; -/* TGETENT - Version of TGETENT for Non-UNIX systems - * - * Function: +/** + * \brief Version of TGETENT for Non-UNIX systems * - * This routine is used on non-UNIX systems to return a termcap - * description into the specified buffer. + * This routine is used on non-UNIX systems to return a termcap + * description into the specified buffer. */ int tgetent(buffer,term_name) @@ -1399,12 +1390,11 @@ FILE *fd; }/* End Routine */ -/* SCAN_TERMCAP - Attempt to find a terminal description in the termcap file - * - * Function: +/** + * \brief Attempt to find a terminal description in the termcap file * - * This routine scans the termcap file for an entry which matches our - * terminal, and returns non-zero if it finds it. + * This routine scans the termcap file for an entry which matches our + * terminal, and returns non-zero if it finds it. */ scan_termcap(fd,temp_buffer,term_name) FILE *fd; @@ -1469,12 +1459,11 @@ char status; -/* TGETNUM - Version of TGETNUM for Non-UNIX systems +/** + * \brief Version of TGETNUM for Non-UNIX systems * - * Function: - * - * This routine is used on non-UNIX systems to return a specific - * termcap number from the termcap description of our terminal. + * This routine is used on non-UNIX systems to return a specific + * termcap number from the termcap description of our terminal. */ int tgetnum(num_name) @@ -1517,12 +1506,11 @@ char minus_seen = 0; }/* End Routine */ -/* TGETSTR - Version of TGETSTR for Non-UNIX systems - * - * Function: +/** + * \brief Version of TGETSTR for Non-UNIX systems * - * This routine is used on non-UNIX systems to return a specific - * termcap string from the termcap description of our terminal. + * This routine is used on non-UNIX systems to return a specific + * termcap string from the termcap description of our terminal. */ char * tgetstr(str_name,buffer_ptr) @@ -44,12 +44,11 @@ char *tecundo_c_version = "tecundo.c: $Revision: 1.3 $"; -/* PARSER_UNDO - Execute an UNDO command +/** + * \brief Execute an UNDO command * - * Function: - * - * This routine is called with an undo token to reverse some changes - * to the program state. + * This routine is called with an undo token to reverse some changes + * to the program state. */ int parser_undo( struct undo_token *ut ) @@ -347,16 +346,15 @@ register struct cmd_token *ct; -/* ALLOCATE_UNDO_TOKEN - Allocate an undo token structure - * - * Function: +/** + * \brief Allocate an undo token structure * - * This routine is called to allocate an undo token structure. If there - * is one on the free list, it is used, otherwise we allocate one. UNDO - * tokens are used so that we can back out of operations which change - * some state other than that of the parser. The normal case is that we - * make some change to the edit buffer, and want to be able to back out - * of it if we want. + * This routine is called to allocate an undo token structure. If there + * is one on the free list, it is used, otherwise we allocate one. UNDO + * tokens are used so that we can back out of operations which change + * some state other than that of the parser. The normal case is that we + * make some change to the edit buffer, and want to be able to back out + * of it if we want. */ struct undo_token * allocate_undo_token( struct cmd_token *ct ) @@ -385,12 +383,11 @@ register struct undo_token *ut; -/* FREE_UNDO_TOKEN - Routine to place an undo token on the free list - * - * Function: +/** + * \brief Routine to place an undo token on the free list * - * This routine is called with the address of the undo token - * to be placed on the free list. + * This routine is called with the address of the undo token + * to be placed on the free list. */ void free_undo_token( struct undo_token *ut ) @@ -404,13 +401,12 @@ free_undo_token( struct undo_token *ut ) -/* TECUNDO_LIST - Cause a list of undo structures to be backed out +/** + * \brief Cause a list of undo structures to be backed out * - * Function: - * - * This routine is called with the head of a list of undo tokens that - * need to be undone. They are placed on the list such that the head - * of the list is the first that needs to be undone. + * This routine is called with the head of a list of undo tokens that + * need to be undone. They are placed on the list such that the head + * of the list is the first that needs to be undone. */ void tecundo_list( struct undo_token *nut ) @@ -440,14 +436,13 @@ register struct undo_token *ut; -/* TECUNDO_CLEANUP - Place the list of undo tokens back on the free list - * - * Function: +/** + * \brief Place the list of undo tokens back on the free list * - * This routine is called with the head of a list of undo tokens. It - * places them back on the undo free list while releasing any resources - * they may have allocated. For example, the MEMFREE token has to free - * the memory the block points to. + * This routine is called with the head of a list of undo tokens. It + * places them back on the undo free list while releasing any resources + * they may have allocated. For example, the MEMFREE token has to free + * the memory the block points to. */ void tecundo_cleanup( struct undo_token *tut ) |