/* * PushFileStackAndMsg - push the file stack, and display a message */ vi_rc PushFileStackAndMsg( void ) { vi_rc rc; rc = PushFileStack(); if( rc == ERR_NO_ERR ) { Message1( "Current position saved; %d entries on file stack", fDepth ); } return( rc ); } /* PushFileStackAndMsg */
/* * TagHunt - hunt for a specified tag */ vi_rc TagHunt( char *str ) { char buff[MAX_STR], file[FILENAME_MAX]; int num; vi_rc rc; rc = LocateTag( str, file, buff ); if( rc == ERR_NO_ERR ) { PushFileStack(); rc = EditFile( file, FALSE ); if( rc == ERR_NO_ERR ) { if( buff[0] != '/' ) { num = atoi( buff ); rc = GoToLineNoRelCurs( num ); } else { rc = FindTag( buff ); if( rc < ERR_NO_ERR ) { strcpy( buff, str ); ColorFind( buff, 0 ); rc = ERR_TAG_NOT_FOUND; } } } else { PopFileStack(); } } if( rc == ERR_TAG_NOT_FOUND ) { Error( GetErrorMsg( rc ), str ); rc = DO_NOT_CLEAR_MESSAGE_WINDOW; } return( rc ); } /* TagHunt */