Ejemplo n.º 1
0
/*
 * getBracketLoc - find a matching '(' for a ')'
 */
static vi_rc getBracketLoc( i_mark *pos )
{
    vi_rc       rc;
    char        tmp[3];
    int         len;
//    linenum     lne;

    tmp[0] = '\\';
    tmp[1] = ')';
    tmp[2] = 0;
//    lne = CurrentPos.line;
    RegExpAttrSave( -1, NULL );
    rc = GetFind( tmp, pos, &len, FINDFL_BACKWARDS | FINDFL_NOERROR | FINDFL_NOCHANGE );
    RegExpAttrRestore();
    if( pos->line != CurrentPos.line ) {
        return( ERR_FIND_NOT_FOUND );
    }
    if( rc != ERR_NO_ERR ) {
        return( rc );
    }

    /*
     * find the matching '('
     */
    CurrentPos = *pos;
    CGimmeLinePtr( CurrentPos.line, &CurrentFcb, &CurrentLine );
    rc = FindMatch( pos );
    return( rc );

} /* getBracketLoc */
Ejemplo n.º 2
0
/*
 * FindTag - locate a given tag
 */
vi_rc FindTag( char *tag )
{
    vi_rc               rc;

    RegExpAttrSave( -1, &META[3] );
    rc = ColorFind( tag, 0 );
    RegExpAttrRestore();
    return( rc );

} /* FindTag */