summaryrefslogtreecommitdiffstats
path: root/source/ap/vim/patches/7.3.321
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2012-09-26 01:10:42 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:51:55 +0200
commit9664bee729d487bcc0a0bc35859f8e13d5421c75 (patch)
treeb428a16618e36ed864a8d76ea3435e19a452bf90 /source/ap/vim/patches/7.3.321
parent75a4a592e5ccda30715f93563d741b83e0dcf39e (diff)
downloadcurrent-9664bee729d487bcc0a0bc35859f8e13d5421c75.tar.gz
current-9664bee729d487bcc0a0bc35859f8e13d5421c75.tar.xz
Slackware 14.0slackware-14.0
Wed Sep 26 01:10:42 UTC 2012 Slackware 14.0 x86_64 stable is released! We're perfectionists here at Slackware, so this release has been a long time a-brewing. But we think you'll agree that it was worth the wait. Slackware 14.0 combines modern components, ease of use, and flexible configuration... our "KISS" philosophy demands it. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Thanks to everyone who helped make this happen. The Slackware team, the upstream developers, and (of course) the awesome Slackware user community. Have fun! :-)
Diffstat (limited to 'source/ap/vim/patches/7.3.321')
-rw-r--r--source/ap/vim/patches/7.3.321304
1 files changed, 304 insertions, 0 deletions
diff --git a/source/ap/vim/patches/7.3.321 b/source/ap/vim/patches/7.3.321
new file mode 100644
index 000000000..6303b013c
--- /dev/null
+++ b/source/ap/vim/patches/7.3.321
@@ -0,0 +1,304 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.3.321
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.3.321
+Problem: Code not following Vim style.
+Solution: Fix the style. (Elias Diem)
+Files: src/os_qnx.c
+
+
+*** ../vim-7.3.320/src/os_qnx.c 2011-06-19 01:14:22.000000000 +0200
+--- src/os_qnx.c 2011-09-21 19:48:08.000000000 +0200
+***************
+*** 24,33 ****
+ #if defined(FEAT_GUI_PHOTON)
+ PhChannelParms_t parms;
+
+! memset( &parms, 0, sizeof( parms ) );
+ parms.flags = Ph_DYNAMIC_BUFFER;
+
+! is_photon_available = (PhAttach( NULL, &parms ) != NULL) ? TRUE : FALSE;
+ #endif
+ }
+
+--- 24,33 ----
+ #if defined(FEAT_GUI_PHOTON)
+ PhChannelParms_t parms;
+
+! memset(&parms, 0, sizeof(parms));
+ parms.flags = Ph_DYNAMIC_BUFFER;
+
+! is_photon_available = (PhAttach(NULL, &parms) != NULL) ? TRUE : FALSE;
+ #endif
+ }
+
+***************
+*** 39,46 ****
+ /* Turn on the clipboard for a console vim when photon is running */
+ void qnx_clip_init()
+ {
+! if( is_photon_available == TRUE && !gui.in_use)
+! clip_init( TRUE );
+ }
+
+ /*****************************************************************************/
+--- 39,46 ----
+ /* Turn on the clipboard for a console vim when photon is running */
+ void qnx_clip_init()
+ {
+! if (is_photon_available == TRUE && !gui.in_use)
+! clip_init(TRUE);
+ }
+
+ /*****************************************************************************/
+***************
+*** 48,79 ****
+
+ /* No support for owning the clipboard */
+ int
+! clip_mch_own_selection( VimClipboard *cbd )
+ {
+ return FALSE;
+ }
+
+ void
+! clip_mch_lose_selection( VimClipboard *cbd )
+ {
+ }
+
+ void
+! clip_mch_request_selection( VimClipboard *cbd )
+ {
+ int type = MLINE, clip_length = 0, is_type_set = FALSE;
+ void *cbdata;
+ PhClipHeader *clip_header;
+ char_u *clip_text = NULL;
+
+! cbdata = PhClipboardPasteStart( PhInputGroup( NULL ));
+! if( cbdata != NULL )
+ {
+ /* Look for the vim specific clip first */
+! clip_header = PhClipboardPasteType( cbdata, CLIP_TYPE_VIM );
+! if( clip_header != NULL && clip_header->data != NULL )
+ {
+! switch( *(char *) clip_header->data )
+ {
+ default: /* fallthrough to line type */
+ case 'L': type = MLINE; break;
+--- 48,79 ----
+
+ /* No support for owning the clipboard */
+ int
+! clip_mch_own_selection(VimClipboard *cbd)
+ {
+ return FALSE;
+ }
+
+ void
+! clip_mch_lose_selection(VimClipboard *cbd)
+ {
+ }
+
+ void
+! clip_mch_request_selection(VimClipboard *cbd)
+ {
+ int type = MLINE, clip_length = 0, is_type_set = FALSE;
+ void *cbdata;
+ PhClipHeader *clip_header;
+ char_u *clip_text = NULL;
+
+! cbdata = PhClipboardPasteStart(PhInputGroup(NULL));
+! if (cbdata != NULL)
+ {
+ /* Look for the vim specific clip first */
+! clip_header = PhClipboardPasteType(cbdata, CLIP_TYPE_VIM);
+! if (clip_header != NULL && clip_header->data != NULL)
+ {
+! switch(*(char *) clip_header->data)
+ {
+ default: /* fallthrough to line type */
+ case 'L': type = MLINE; break;
+***************
+*** 86,112 ****
+ }
+
+ /* Try for just normal text */
+! clip_header = PhClipboardPasteType( cbdata, CLIP_TYPE_TEXT );
+! if( clip_header != NULL )
+ {
+ clip_text = clip_header->data;
+ clip_length = clip_header->length - 1;
+
+! if( clip_text != NULL && is_type_set == FALSE )
+ type = MAUTO;
+ }
+
+! if( (clip_text != NULL) && (clip_length > 0) )
+ {
+! clip_yank_selection( type, clip_text, clip_length, cbd );
+ }
+
+! PhClipboardPasteFinish( cbdata );
+ }
+ }
+
+ void
+! clip_mch_set_selection( VimClipboard *cbd )
+ {
+ int type;
+ long_u len;
+--- 86,112 ----
+ }
+
+ /* Try for just normal text */
+! clip_header = PhClipboardPasteType(cbdata, CLIP_TYPE_TEXT);
+! if (clip_header != NULL)
+ {
+ clip_text = clip_header->data;
+ clip_length = clip_header->length - 1;
+
+! if (clip_text != NULL && is_type_set == FALSE)
+ type = MAUTO;
+ }
+
+! if ((clip_text != NULL) && (clip_length > 0))
+ {
+! clip_yank_selection(type, clip_text, clip_length, cbd);
+ }
+
+! PhClipboardPasteFinish(cbdata);
+ }
+ }
+
+ void
+! clip_mch_set_selection(VimClipboard *cbd)
+ {
+ int type;
+ long_u len;
+***************
+*** 114,144 ****
+ PhClipHeader clip_header[2];
+
+ /* Prevent recursion from clip_get_selection() */
+! if( cbd->owned == TRUE )
+ return;
+
+ cbd->owned = TRUE;
+! clip_get_selection( cbd );
+ cbd->owned = FALSE;
+
+! type = clip_convert_selection( &str, &len, cbd );
+! if( type >= 0 )
+ {
+! text_clip = lalloc( len + 1, TRUE ); /* Normal text */
+
+! if( text_clip && vim_clip )
+ {
+! memset( clip_header, 0, sizeof( clip_header ) );
+
+! STRNCPY( clip_header[0].type, CLIP_TYPE_VIM, 8 );
+! clip_header[0].length = sizeof( vim_clip );
+ clip_header[0].data = vim_clip;
+
+! STRNCPY( clip_header[1].type, CLIP_TYPE_TEXT, 8 );
+ clip_header[1].length = len + 1;
+ clip_header[1].data = text_clip;
+
+! switch( type )
+ {
+ default: /* fallthrough to MLINE */
+ case MLINE: *vim_clip = 'L'; break;
+--- 114,144 ----
+ PhClipHeader clip_header[2];
+
+ /* Prevent recursion from clip_get_selection() */
+! if (cbd->owned == TRUE)
+ return;
+
+ cbd->owned = TRUE;
+! clip_get_selection(cbd);
+ cbd->owned = FALSE;
+
+! type = clip_convert_selection(&str, &len, cbd);
+! if (type >= 0)
+ {
+! text_clip = lalloc(len + 1, TRUE); /* Normal text */
+
+! if (text_clip && vim_clip)
+ {
+! memset(clip_header, 0, sizeof(clip_header));
+
+! STRNCPY(clip_header[0].type, CLIP_TYPE_VIM, 8);
+! clip_header[0].length = sizeof(vim_clip);
+ clip_header[0].data = vim_clip;
+
+! STRNCPY(clip_header[1].type, CLIP_TYPE_TEXT, 8);
+ clip_header[1].length = len + 1;
+ clip_header[1].data = text_clip;
+
+! switch(type)
+ {
+ default: /* fallthrough to MLINE */
+ case MLINE: *vim_clip = 'L'; break;
+***************
+*** 148,161 ****
+ #endif
+ }
+
+! vim_strncpy( text_clip, str, len );
+
+ vim_clip[ 1 ] = NUL;
+
+! PhClipboardCopy( PhInputGroup( NULL ), 2, clip_header);
+ }
+! vim_free( text_clip );
+ }
+! vim_free( str );
+ }
+ #endif
+--- 148,161 ----
+ #endif
+ }
+
+! vim_strncpy(text_clip, str, len);
+
+ vim_clip[ 1 ] = NUL;
+
+! PhClipboardCopy(PhInputGroup(NULL), 2, clip_header);
+ }
+! vim_free(text_clip);
+ }
+! vim_free(str);
+ }
+ #endif
+*** ../vim-7.3.320/src/version.c 2011-09-21 19:10:42.000000000 +0200
+--- src/version.c 2011-09-21 19:47:50.000000000 +0200
+***************
+*** 711,712 ****
+--- 711,714 ----
+ { /* Add new patch number below this line */
++ /**/
++ 321,
+ /**/
+
+--
+Bypasses are devices that allow some people to dash from point A to
+point B very fast while other people dash from point B to point A very
+fast. People living at point C, being a point directly in between, are
+often given to wonder what's so great about point A that so many people
+from point B are so keen to get there and what's so great about point B
+that so many people from point A are so keen to get there. They often
+wish that people would just once and for all work out where the hell
+they wanted to be.
+ -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///