1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Code not following Vim style.
12 Solution: Fix the style. (Elias Diem)
16 *** ../vim-7.3.320/src/os_qnx.c 2011-06-19 01:14:22.000000000 +0200
17 --- src/os_qnx.c 2011-09-21 19:48:08.000000000 +0200
20 #if defined(FEAT_GUI_PHOTON)
21 PhChannelParms_t parms;
23 ! memset( &parms, 0, sizeof( parms ) );
24 parms.flags = Ph_DYNAMIC_BUFFER;
26 ! is_photon_available = (PhAttach( NULL, &parms ) != NULL) ? TRUE : FALSE;
31 #if defined(FEAT_GUI_PHOTON)
32 PhChannelParms_t parms;
34 ! memset(&parms, 0, sizeof(parms));
35 parms.flags = Ph_DYNAMIC_BUFFER;
37 ! is_photon_available = (PhAttach(NULL, &parms) != NULL) ? TRUE : FALSE;
43 /* Turn on the clipboard for a console vim when photon is running */
46 ! if( is_photon_available == TRUE && !gui.in_use)
50 /*****************************************************************************/
52 /* Turn on the clipboard for a console vim when photon is running */
55 ! if (is_photon_available == TRUE && !gui.in_use)
59 /*****************************************************************************/
63 /* No support for owning the clipboard */
65 ! clip_mch_own_selection( VimClipboard *cbd )
71 ! clip_mch_lose_selection( VimClipboard *cbd )
76 ! clip_mch_request_selection( VimClipboard *cbd )
78 int type = MLINE, clip_length = 0, is_type_set = FALSE;
80 PhClipHeader *clip_header;
81 char_u *clip_text = NULL;
83 ! cbdata = PhClipboardPasteStart( PhInputGroup( NULL ));
84 ! if( cbdata != NULL )
86 /* Look for the vim specific clip first */
87 ! clip_header = PhClipboardPasteType( cbdata, CLIP_TYPE_VIM );
88 ! if( clip_header != NULL && clip_header->data != NULL )
90 ! switch( *(char *) clip_header->data )
92 default: /* fallthrough to line type */
93 case 'L': type = MLINE; break;
96 /* No support for owning the clipboard */
98 ! clip_mch_own_selection(VimClipboard *cbd)
104 ! clip_mch_lose_selection(VimClipboard *cbd)
109 ! clip_mch_request_selection(VimClipboard *cbd)
111 int type = MLINE, clip_length = 0, is_type_set = FALSE;
113 PhClipHeader *clip_header;
114 char_u *clip_text = NULL;
116 ! cbdata = PhClipboardPasteStart(PhInputGroup(NULL));
117 ! if (cbdata != NULL)
119 /* Look for the vim specific clip first */
120 ! clip_header = PhClipboardPasteType(cbdata, CLIP_TYPE_VIM);
121 ! if (clip_header != NULL && clip_header->data != NULL)
123 ! switch(*(char *) clip_header->data)
125 default: /* fallthrough to line type */
126 case 'L': type = MLINE; break;
131 /* Try for just normal text */
132 ! clip_header = PhClipboardPasteType( cbdata, CLIP_TYPE_TEXT );
133 ! if( clip_header != NULL )
135 clip_text = clip_header->data;
136 clip_length = clip_header->length - 1;
138 ! if( clip_text != NULL && is_type_set == FALSE )
142 ! if( (clip_text != NULL) && (clip_length > 0) )
144 ! clip_yank_selection( type, clip_text, clip_length, cbd );
147 ! PhClipboardPasteFinish( cbdata );
152 ! clip_mch_set_selection( VimClipboard *cbd )
159 /* Try for just normal text */
160 ! clip_header = PhClipboardPasteType(cbdata, CLIP_TYPE_TEXT);
161 ! if (clip_header != NULL)
163 clip_text = clip_header->data;
164 clip_length = clip_header->length - 1;
166 ! if (clip_text != NULL && is_type_set == FALSE)
170 ! if ((clip_text != NULL) && (clip_length > 0))
172 ! clip_yank_selection(type, clip_text, clip_length, cbd);
175 ! PhClipboardPasteFinish(cbdata);
180 ! clip_mch_set_selection(VimClipboard *cbd)
186 PhClipHeader clip_header[2];
188 /* Prevent recursion from clip_get_selection() */
189 ! if( cbd->owned == TRUE )
193 ! clip_get_selection( cbd );
196 ! type = clip_convert_selection( &str, &len, cbd );
199 ! text_clip = lalloc( len + 1, TRUE ); /* Normal text */
201 ! if( text_clip && vim_clip )
203 ! memset( clip_header, 0, sizeof( clip_header ) );
205 ! STRNCPY( clip_header[0].type, CLIP_TYPE_VIM, 8 );
206 ! clip_header[0].length = sizeof( vim_clip );
207 clip_header[0].data = vim_clip;
209 ! STRNCPY( clip_header[1].type, CLIP_TYPE_TEXT, 8 );
210 clip_header[1].length = len + 1;
211 clip_header[1].data = text_clip;
215 default: /* fallthrough to MLINE */
216 case MLINE: *vim_clip = 'L'; break;
218 PhClipHeader clip_header[2];
220 /* Prevent recursion from clip_get_selection() */
221 ! if (cbd->owned == TRUE)
225 ! clip_get_selection(cbd);
228 ! type = clip_convert_selection(&str, &len, cbd);
231 ! text_clip = lalloc(len + 1, TRUE); /* Normal text */
233 ! if (text_clip && vim_clip)
235 ! memset(clip_header, 0, sizeof(clip_header));
237 ! STRNCPY(clip_header[0].type, CLIP_TYPE_VIM, 8);
238 ! clip_header[0].length = sizeof(vim_clip);
239 clip_header[0].data = vim_clip;
241 ! STRNCPY(clip_header[1].type, CLIP_TYPE_TEXT, 8);
242 clip_header[1].length = len + 1;
243 clip_header[1].data = text_clip;
247 default: /* fallthrough to MLINE */
248 case MLINE: *vim_clip = 'L'; break;
254 ! vim_strncpy( text_clip, str, len );
258 ! PhClipboardCopy( PhInputGroup( NULL ), 2, clip_header);
260 ! vim_free( text_clip );
269 ! vim_strncpy(text_clip, str, len);
273 ! PhClipboardCopy(PhInputGroup(NULL), 2, clip_header);
275 ! vim_free(text_clip);
280 *** ../vim-7.3.320/src/version.c 2011-09-21 19:10:42.000000000 +0200
281 --- src/version.c 2011-09-21 19:47:50.000000000 +0200
285 { /* Add new patch number below this line */
291 Bypasses are devices that allow some people to dash from point A to
292 point B very fast while other people dash from point B to point A very
293 fast. People living at point C, being a point directly in between, are
294 often given to wonder what's so great about point A that so many people
295 from point B are so keen to get there and what's so great about point B
296 that so many people from point A are so keen to get there. They often
297 wish that people would just once and for all work out where the hell
299 -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
301 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
302 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
303 \\\ an exciting new programming language -- http://www.Zimbu.org ///
304 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///