Skip to content

Commit a4ef2c0

Browse files
committed
updated for version 7.3.321
Problem: Code not following Vim style. Solution: Fix the style. (Elias Diem)
1 parent 456ae48 commit a4ef2c0

File tree

2 files changed

+36
-34
lines changed

2 files changed

+36
-34
lines changed

src/os_qnx.c

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ void qnx_init()
2424
#if defined(FEAT_GUI_PHOTON)
2525
PhChannelParms_t parms;
2626

27-
memset( &parms, 0, sizeof( parms ) );
27+
memset(&parms, 0, sizeof(parms));
2828
parms.flags = Ph_DYNAMIC_BUFFER;
2929

30-
is_photon_available = (PhAttach( NULL, &parms ) != NULL) ? TRUE : FALSE;
30+
is_photon_available = (PhAttach(NULL, &parms) != NULL) ? TRUE : FALSE;
3131
#endif
3232
}
3333

@@ -39,41 +39,41 @@ void qnx_init()
3939
/* Turn on the clipboard for a console vim when photon is running */
4040
void qnx_clip_init()
4141
{
42-
if( is_photon_available == TRUE && !gui.in_use)
43-
clip_init( TRUE );
42+
if (is_photon_available == TRUE && !gui.in_use)
43+
clip_init(TRUE);
4444
}
4545

4646
/*****************************************************************************/
4747
/* Clipboard */
4848

4949
/* No support for owning the clipboard */
5050
int
51-
clip_mch_own_selection( VimClipboard *cbd )
51+
clip_mch_own_selection(VimClipboard *cbd)
5252
{
5353
return FALSE;
5454
}
5555

5656
void
57-
clip_mch_lose_selection( VimClipboard *cbd )
57+
clip_mch_lose_selection(VimClipboard *cbd)
5858
{
5959
}
6060

6161
void
62-
clip_mch_request_selection( VimClipboard *cbd )
62+
clip_mch_request_selection(VimClipboard *cbd)
6363
{
6464
int type = MLINE, clip_length = 0, is_type_set = FALSE;
6565
void *cbdata;
6666
PhClipHeader *clip_header;
6767
char_u *clip_text = NULL;
6868

69-
cbdata = PhClipboardPasteStart( PhInputGroup( NULL ));
70-
if( cbdata != NULL )
69+
cbdata = PhClipboardPasteStart(PhInputGroup(NULL));
70+
if (cbdata != NULL)
7171
{
7272
/* Look for the vim specific clip first */
73-
clip_header = PhClipboardPasteType( cbdata, CLIP_TYPE_VIM );
74-
if( clip_header != NULL && clip_header->data != NULL )
73+
clip_header = PhClipboardPasteType(cbdata, CLIP_TYPE_VIM);
74+
if (clip_header != NULL && clip_header->data != NULL)
7575
{
76-
switch( *(char *) clip_header->data )
76+
switch(*(char *) clip_header->data)
7777
{
7878
default: /* fallthrough to line type */
7979
case 'L': type = MLINE; break;
@@ -86,59 +86,59 @@ clip_mch_request_selection( VimClipboard *cbd )
8686
}
8787

8888
/* Try for just normal text */
89-
clip_header = PhClipboardPasteType( cbdata, CLIP_TYPE_TEXT );
90-
if( clip_header != NULL )
89+
clip_header = PhClipboardPasteType(cbdata, CLIP_TYPE_TEXT);
90+
if (clip_header != NULL)
9191
{
9292
clip_text = clip_header->data;
9393
clip_length = clip_header->length - 1;
9494

95-
if( clip_text != NULL && is_type_set == FALSE )
95+
if (clip_text != NULL && is_type_set == FALSE)
9696
type = MAUTO;
9797
}
9898

99-
if( (clip_text != NULL) && (clip_length > 0) )
99+
if ((clip_text != NULL) && (clip_length > 0))
100100
{
101-
clip_yank_selection( type, clip_text, clip_length, cbd );
101+
clip_yank_selection(type, clip_text, clip_length, cbd);
102102
}
103103

104-
PhClipboardPasteFinish( cbdata );
104+
PhClipboardPasteFinish(cbdata);
105105
}
106106
}
107107

108108
void
109-
clip_mch_set_selection( VimClipboard *cbd )
109+
clip_mch_set_selection(VimClipboard *cbd)
110110
{
111111
int type;
112112
long_u len;
113113
char_u *text_clip, vim_clip[2], *str = NULL;
114114
PhClipHeader clip_header[2];
115115

116116
/* Prevent recursion from clip_get_selection() */
117-
if( cbd->owned == TRUE )
117+
if (cbd->owned == TRUE)
118118
return;
119119

120120
cbd->owned = TRUE;
121-
clip_get_selection( cbd );
121+
clip_get_selection(cbd);
122122
cbd->owned = FALSE;
123123

124-
type = clip_convert_selection( &str, &len, cbd );
125-
if( type >= 0 )
124+
type = clip_convert_selection(&str, &len, cbd);
125+
if (type >= 0)
126126
{
127-
text_clip = lalloc( len + 1, TRUE ); /* Normal text */
127+
text_clip = lalloc(len + 1, TRUE); /* Normal text */
128128

129-
if( text_clip && vim_clip )
129+
if (text_clip && vim_clip)
130130
{
131-
memset( clip_header, 0, sizeof( clip_header ) );
131+
memset(clip_header, 0, sizeof(clip_header));
132132

133-
STRNCPY( clip_header[0].type, CLIP_TYPE_VIM, 8 );
134-
clip_header[0].length = sizeof( vim_clip );
133+
STRNCPY(clip_header[0].type, CLIP_TYPE_VIM, 8);
134+
clip_header[0].length = sizeof(vim_clip);
135135
clip_header[0].data = vim_clip;
136136

137-
STRNCPY( clip_header[1].type, CLIP_TYPE_TEXT, 8 );
137+
STRNCPY(clip_header[1].type, CLIP_TYPE_TEXT, 8);
138138
clip_header[1].length = len + 1;
139139
clip_header[1].data = text_clip;
140140

141-
switch( type )
141+
switch(type)
142142
{
143143
default: /* fallthrough to MLINE */
144144
case MLINE: *vim_clip = 'L'; break;
@@ -148,14 +148,14 @@ clip_mch_set_selection( VimClipboard *cbd )
148148
#endif
149149
}
150150

151-
vim_strncpy( text_clip, str, len );
151+
vim_strncpy(text_clip, str, len);
152152

153153
vim_clip[ 1 ] = NUL;
154154

155-
PhClipboardCopy( PhInputGroup( NULL ), 2, clip_header);
155+
PhClipboardCopy(PhInputGroup(NULL), 2, clip_header);
156156
}
157-
vim_free( text_clip );
157+
vim_free(text_clip);
158158
}
159-
vim_free( str );
159+
vim_free(str);
160160
}
161161
#endif

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,8 @@ static char *(features[]) =
709709

710710
static int included_patches[] =
711711
{ /* Add new patch number below this line */
712+
/**/
713+
321,
712714
/**/
713715
320,
714716
/**/

0 commit comments

Comments
 (0)