
        s = Tcl_GetVar(interp,"match_max",0);
        if (buf_size != (new_size = 2*atoi(s))) {
                if (0 == (new_buf = realloc(buf,new_size+1))) {
                        tcl_error("failed to grow match buf to %d bytes",
                                new_size);
                        return(TCL_ERROR);
                }
                buf_size = new_size;
                buf = new_buf;
        }

        Listing 5

