|
Karsten Hopp |
2de159 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
2de159 |
Subject: Patch 7.3.321
|
|
Karsten Hopp |
2de159 |
Fcc: outbox
|
|
Karsten Hopp |
2de159 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
2de159 |
Mime-Version: 1.0
|
|
Karsten Hopp |
2de159 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
2de159 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
2de159 |
------------
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
Patch 7.3.321
|
|
Karsten Hopp |
2de159 |
Problem: Code not following Vim style.
|
|
Karsten Hopp |
2de159 |
Solution: Fix the style. (Elias Diem)
|
|
Karsten Hopp |
2de159 |
Files: src/os_qnx.c
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
*** ../vim-7.3.320/src/os_qnx.c 2011-06-19 01:14:22.000000000 +0200
|
|
Karsten Hopp |
2de159 |
--- src/os_qnx.c 2011-09-21 19:48:08.000000000 +0200
|
|
Karsten Hopp |
2de159 |
***************
|
|
Karsten Hopp |
2de159 |
*** 24,33 ****
|
|
Karsten Hopp |
2de159 |
#if defined(FEAT_GUI_PHOTON)
|
|
Karsten Hopp |
2de159 |
PhChannelParms_t parms;
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! memset( &parms, 0, sizeof( parms ) );
|
|
Karsten Hopp |
2de159 |
parms.flags = Ph_DYNAMIC_BUFFER;
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! is_photon_available = (PhAttach( NULL, &parms ) != NULL) ? TRUE : FALSE;
|
|
Karsten Hopp |
2de159 |
#endif
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
--- 24,33 ----
|
|
Karsten Hopp |
2de159 |
#if defined(FEAT_GUI_PHOTON)
|
|
Karsten Hopp |
2de159 |
PhChannelParms_t parms;
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! memset(&parms, 0, sizeof(parms));
|
|
Karsten Hopp |
2de159 |
parms.flags = Ph_DYNAMIC_BUFFER;
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! is_photon_available = (PhAttach(NULL, &parms) != NULL) ? TRUE : FALSE;
|
|
Karsten Hopp |
2de159 |
#endif
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
***************
|
|
Karsten Hopp |
2de159 |
*** 39,46 ****
|
|
Karsten Hopp |
2de159 |
/* Turn on the clipboard for a console vim when photon is running */
|
|
Karsten Hopp |
2de159 |
void qnx_clip_init()
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
! if( is_photon_available == TRUE && !gui.in_use)
|
|
Karsten Hopp |
2de159 |
! clip_init( TRUE );
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
/*****************************************************************************/
|
|
Karsten Hopp |
2de159 |
--- 39,46 ----
|
|
Karsten Hopp |
2de159 |
/* Turn on the clipboard for a console vim when photon is running */
|
|
Karsten Hopp |
2de159 |
void qnx_clip_init()
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
! if (is_photon_available == TRUE && !gui.in_use)
|
|
Karsten Hopp |
2de159 |
! clip_init(TRUE);
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
/*****************************************************************************/
|
|
Karsten Hopp |
2de159 |
***************
|
|
Karsten Hopp |
2de159 |
*** 48,79 ****
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
/* No support for owning the clipboard */
|
|
Karsten Hopp |
2de159 |
int
|
|
Karsten Hopp |
2de159 |
! clip_mch_own_selection( VimClipboard *cbd )
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
return FALSE;
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
void
|
|
Karsten Hopp |
2de159 |
! clip_mch_lose_selection( VimClipboard *cbd )
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
void
|
|
Karsten Hopp |
2de159 |
! clip_mch_request_selection( VimClipboard *cbd )
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
int type = MLINE, clip_length = 0, is_type_set = FALSE;
|
|
Karsten Hopp |
2de159 |
void *cbdata;
|
|
Karsten Hopp |
2de159 |
PhClipHeader *clip_header;
|
|
Karsten Hopp |
2de159 |
char_u *clip_text = NULL;
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! cbdata = PhClipboardPasteStart( PhInputGroup( NULL ));
|
|
Karsten Hopp |
2de159 |
! if( cbdata != NULL )
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
/* Look for the vim specific clip first */
|
|
Karsten Hopp |
2de159 |
! clip_header = PhClipboardPasteType( cbdata, CLIP_TYPE_VIM );
|
|
Karsten Hopp |
2de159 |
! if( clip_header != NULL && clip_header->data != NULL )
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
! switch( *(char *) clip_header->data )
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
default: /* fallthrough to line type */
|
|
Karsten Hopp |
2de159 |
case 'L': type = MLINE; break;
|
|
Karsten Hopp |
2de159 |
--- 48,79 ----
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
/* No support for owning the clipboard */
|
|
Karsten Hopp |
2de159 |
int
|
|
Karsten Hopp |
2de159 |
! clip_mch_own_selection(VimClipboard *cbd)
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
return FALSE;
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
void
|
|
Karsten Hopp |
2de159 |
! clip_mch_lose_selection(VimClipboard *cbd)
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
void
|
|
Karsten Hopp |
2de159 |
! clip_mch_request_selection(VimClipboard *cbd)
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
int type = MLINE, clip_length = 0, is_type_set = FALSE;
|
|
Karsten Hopp |
2de159 |
void *cbdata;
|
|
Karsten Hopp |
2de159 |
PhClipHeader *clip_header;
|
|
Karsten Hopp |
2de159 |
char_u *clip_text = NULL;
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! cbdata = PhClipboardPasteStart(PhInputGroup(NULL));
|
|
Karsten Hopp |
2de159 |
! if (cbdata != NULL)
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
/* Look for the vim specific clip first */
|
|
Karsten Hopp |
2de159 |
! clip_header = PhClipboardPasteType(cbdata, CLIP_TYPE_VIM);
|
|
Karsten Hopp |
2de159 |
! if (clip_header != NULL && clip_header->data != NULL)
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
! switch(*(char *) clip_header->data)
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
default: /* fallthrough to line type */
|
|
Karsten Hopp |
2de159 |
case 'L': type = MLINE; break;
|
|
Karsten Hopp |
2de159 |
***************
|
|
Karsten Hopp |
2de159 |
*** 86,112 ****
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
/* Try for just normal text */
|
|
Karsten Hopp |
2de159 |
! clip_header = PhClipboardPasteType( cbdata, CLIP_TYPE_TEXT );
|
|
Karsten Hopp |
2de159 |
! if( clip_header != NULL )
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
clip_text = clip_header->data;
|
|
Karsten Hopp |
2de159 |
clip_length = clip_header->length - 1;
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! if( clip_text != NULL && is_type_set == FALSE )
|
|
Karsten Hopp |
2de159 |
type = MAUTO;
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! if( (clip_text != NULL) && (clip_length > 0) )
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
! clip_yank_selection( type, clip_text, clip_length, cbd );
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! PhClipboardPasteFinish( cbdata );
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
void
|
|
Karsten Hopp |
2de159 |
! clip_mch_set_selection( VimClipboard *cbd )
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
int type;
|
|
Karsten Hopp |
2de159 |
long_u len;
|
|
Karsten Hopp |
2de159 |
--- 86,112 ----
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
/* Try for just normal text */
|
|
Karsten Hopp |
2de159 |
! clip_header = PhClipboardPasteType(cbdata, CLIP_TYPE_TEXT);
|
|
Karsten Hopp |
2de159 |
! if (clip_header != NULL)
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
clip_text = clip_header->data;
|
|
Karsten Hopp |
2de159 |
clip_length = clip_header->length - 1;
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! if (clip_text != NULL && is_type_set == FALSE)
|
|
Karsten Hopp |
2de159 |
type = MAUTO;
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! if ((clip_text != NULL) && (clip_length > 0))
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
! clip_yank_selection(type, clip_text, clip_length, cbd);
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! PhClipboardPasteFinish(cbdata);
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
void
|
|
Karsten Hopp |
2de159 |
! clip_mch_set_selection(VimClipboard *cbd)
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
int type;
|
|
Karsten Hopp |
2de159 |
long_u len;
|
|
Karsten Hopp |
2de159 |
***************
|
|
Karsten Hopp |
2de159 |
*** 114,144 ****
|
|
Karsten Hopp |
2de159 |
PhClipHeader clip_header[2];
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
/* Prevent recursion from clip_get_selection() */
|
|
Karsten Hopp |
2de159 |
! if( cbd->owned == TRUE )
|
|
Karsten Hopp |
2de159 |
return;
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
cbd->owned = TRUE;
|
|
Karsten Hopp |
2de159 |
! clip_get_selection( cbd );
|
|
Karsten Hopp |
2de159 |
cbd->owned = FALSE;
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! type = clip_convert_selection( &str, &len, cbd );
|
|
Karsten Hopp |
2de159 |
! if( type >= 0 )
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
! text_clip = lalloc( len + 1, TRUE ); /* Normal text */
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! if( text_clip && vim_clip )
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
! memset( clip_header, 0, sizeof( clip_header ) );
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! STRNCPY( clip_header[0].type, CLIP_TYPE_VIM, 8 );
|
|
Karsten Hopp |
2de159 |
! clip_header[0].length = sizeof( vim_clip );
|
|
Karsten Hopp |
2de159 |
clip_header[0].data = vim_clip;
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! STRNCPY( clip_header[1].type, CLIP_TYPE_TEXT, 8 );
|
|
Karsten Hopp |
2de159 |
clip_header[1].length = len + 1;
|
|
Karsten Hopp |
2de159 |
clip_header[1].data = text_clip;
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! switch( type )
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
default: /* fallthrough to MLINE */
|
|
Karsten Hopp |
2de159 |
case MLINE: *vim_clip = 'L'; break;
|
|
Karsten Hopp |
2de159 |
--- 114,144 ----
|
|
Karsten Hopp |
2de159 |
PhClipHeader clip_header[2];
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
/* Prevent recursion from clip_get_selection() */
|
|
Karsten Hopp |
2de159 |
! if (cbd->owned == TRUE)
|
|
Karsten Hopp |
2de159 |
return;
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
cbd->owned = TRUE;
|
|
Karsten Hopp |
2de159 |
! clip_get_selection(cbd);
|
|
Karsten Hopp |
2de159 |
cbd->owned = FALSE;
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! type = clip_convert_selection(&str, &len, cbd);
|
|
Karsten Hopp |
2de159 |
! if (type >= 0)
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
! text_clip = lalloc(len + 1, TRUE); /* Normal text */
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! if (text_clip && vim_clip)
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
! memset(clip_header, 0, sizeof(clip_header));
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! STRNCPY(clip_header[0].type, CLIP_TYPE_VIM, 8);
|
|
Karsten Hopp |
2de159 |
! clip_header[0].length = sizeof(vim_clip);
|
|
Karsten Hopp |
2de159 |
clip_header[0].data = vim_clip;
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! STRNCPY(clip_header[1].type, CLIP_TYPE_TEXT, 8);
|
|
Karsten Hopp |
2de159 |
clip_header[1].length = len + 1;
|
|
Karsten Hopp |
2de159 |
clip_header[1].data = text_clip;
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! switch(type)
|
|
Karsten Hopp |
2de159 |
{
|
|
Karsten Hopp |
2de159 |
default: /* fallthrough to MLINE */
|
|
Karsten Hopp |
2de159 |
case MLINE: *vim_clip = 'L'; break;
|
|
Karsten Hopp |
2de159 |
***************
|
|
Karsten Hopp |
2de159 |
*** 148,161 ****
|
|
Karsten Hopp |
2de159 |
#endif
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! vim_strncpy( text_clip, str, len );
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
vim_clip[ 1 ] = NUL;
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! PhClipboardCopy( PhInputGroup( NULL ), 2, clip_header);
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
! vim_free( text_clip );
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
! vim_free( str );
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
#endif
|
|
Karsten Hopp |
2de159 |
--- 148,161 ----
|
|
Karsten Hopp |
2de159 |
#endif
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! vim_strncpy(text_clip, str, len);
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
vim_clip[ 1 ] = NUL;
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
! PhClipboardCopy(PhInputGroup(NULL), 2, clip_header);
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
! vim_free(text_clip);
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
! vim_free(str);
|
|
Karsten Hopp |
2de159 |
}
|
|
Karsten Hopp |
2de159 |
#endif
|
|
Karsten Hopp |
2de159 |
*** ../vim-7.3.320/src/version.c 2011-09-21 19:10:42.000000000 +0200
|
|
Karsten Hopp |
2de159 |
--- src/version.c 2011-09-21 19:47:50.000000000 +0200
|
|
Karsten Hopp |
2de159 |
***************
|
|
Karsten Hopp |
2de159 |
*** 711,712 ****
|
|
Karsten Hopp |
2de159 |
--- 711,714 ----
|
|
Karsten Hopp |
2de159 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
2de159 |
+ /**/
|
|
Karsten Hopp |
2de159 |
+ 321,
|
|
Karsten Hopp |
2de159 |
/**/
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
--
|
|
Karsten Hopp |
2de159 |
Bypasses are devices that allow some people to dash from point A to
|
|
Karsten Hopp |
2de159 |
point B very fast while other people dash from point B to point A very
|
|
Karsten Hopp |
2de159 |
fast. People living at point C, being a point directly in between, are
|
|
Karsten Hopp |
2de159 |
often given to wonder what's so great about point A that so many people
|
|
Karsten Hopp |
2de159 |
from point B are so keen to get there and what's so great about point B
|
|
Karsten Hopp |
2de159 |
that so many people from point A are so keen to get there. They often
|
|
Karsten Hopp |
2de159 |
wish that people would just once and for all work out where the hell
|
|
Karsten Hopp |
2de159 |
they wanted to be.
|
|
Karsten Hopp |
2de159 |
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
|
|
Karsten Hopp |
2de159 |
|
|
Karsten Hopp |
2de159 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
2de159 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
2de159 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
2de159 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|