Mercurial > vim
comparison src/os_qnx.c @ 18810:44b855153d8e v8.1.2393
patch 8.1.2393: using old C style comments
Commit: https://github.com/vim/vim/commit/0f8737355d291679659579a48db1861b88970293
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Dec 5 20:28:46 2019 +0100
patch 8.1.2393: using old C style comments
Problem: Using old C style comments.
Solution: Use // comments where appropriate.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 05 Dec 2019 20:30:04 +0100 |
parents | 3147c7c2e86b |
children | 3365a601e73b |
comparison
equal
deleted
inserted
replaced
18809:8c6177fec9cb | 18810:44b855153d8e |
---|---|
34 #if (defined(FEAT_GUI_PHOTON) && defined(FEAT_CLIPBOARD)) || defined(PROTO) | 34 #if (defined(FEAT_GUI_PHOTON) && defined(FEAT_CLIPBOARD)) || defined(PROTO) |
35 | 35 |
36 #define CLIP_TYPE_VIM "VIMTYPE" | 36 #define CLIP_TYPE_VIM "VIMTYPE" |
37 #define CLIP_TYPE_TEXT "TEXT" | 37 #define CLIP_TYPE_TEXT "TEXT" |
38 | 38 |
39 /* Turn on the clipboard for a console vim when photon is running */ | 39 // Turn on the clipboard for a console vim when photon is running |
40 void qnx_clip_init(void) | 40 void qnx_clip_init(void) |
41 { | 41 { |
42 if (is_photon_available == TRUE && !gui.in_use) | 42 if (is_photon_available == TRUE && !gui.in_use) |
43 clip_init(TRUE); | 43 clip_init(TRUE); |
44 } | 44 } |
45 | 45 |
46 /*****************************************************************************/ | 46 ///////////////////////////////////////////////////////////////////////////// |
47 /* Clipboard */ | 47 // Clipboard |
48 | 48 |
49 /* No support for owning the clipboard */ | 49 // No support for owning the clipboard |
50 int | 50 int |
51 clip_mch_own_selection(Clipboard_T *cbd) | 51 clip_mch_own_selection(Clipboard_T *cbd) |
52 { | 52 { |
53 return FALSE; | 53 return FALSE; |
54 } | 54 } |
67 char_u *clip_text = NULL; | 67 char_u *clip_text = NULL; |
68 | 68 |
69 cbdata = PhClipboardPasteStart(PhInputGroup(NULL)); | 69 cbdata = PhClipboardPasteStart(PhInputGroup(NULL)); |
70 if (cbdata != NULL) | 70 if (cbdata != NULL) |
71 { | 71 { |
72 /* Look for the vim specific clip first */ | 72 // Look for the vim specific clip first |
73 clip_header = PhClipboardPasteType(cbdata, CLIP_TYPE_VIM); | 73 clip_header = PhClipboardPasteType(cbdata, CLIP_TYPE_VIM); |
74 if (clip_header != NULL && clip_header->data != NULL) | 74 if (clip_header != NULL && clip_header->data != NULL) |
75 { | 75 { |
76 switch(*(char *) clip_header->data) | 76 switch(*(char *) clip_header->data) |
77 { | 77 { |
78 default: /* fallthrough to line type */ | 78 default: // fallthrough to line type |
79 case 'L': type = MLINE; break; | 79 case 'L': type = MLINE; break; |
80 case 'C': type = MCHAR; break; | 80 case 'C': type = MCHAR; break; |
81 case 'B': type = MBLOCK; break; | 81 case 'B': type = MBLOCK; break; |
82 } | 82 } |
83 is_type_set = TRUE; | 83 is_type_set = TRUE; |
84 } | 84 } |
85 | 85 |
86 /* Try for just normal text */ | 86 // Try for just normal text |
87 clip_header = PhClipboardPasteType(cbdata, CLIP_TYPE_TEXT); | 87 clip_header = PhClipboardPasteType(cbdata, CLIP_TYPE_TEXT); |
88 if (clip_header != NULL) | 88 if (clip_header != NULL) |
89 { | 89 { |
90 clip_text = clip_header->data; | 90 clip_text = clip_header->data; |
91 clip_length = clip_header->length - 1; | 91 clip_length = clip_header->length - 1; |
107 int type; | 107 int type; |
108 long_u len; | 108 long_u len; |
109 char_u *text_clip, vim_clip[2], *str = NULL; | 109 char_u *text_clip, vim_clip[2], *str = NULL; |
110 PhClipHeader clip_header[2]; | 110 PhClipHeader clip_header[2]; |
111 | 111 |
112 /* Prevent recursion from clip_get_selection() */ | 112 // Prevent recursion from clip_get_selection() |
113 if (cbd->owned == TRUE) | 113 if (cbd->owned == TRUE) |
114 return; | 114 return; |
115 | 115 |
116 cbd->owned = TRUE; | 116 cbd->owned = TRUE; |
117 clip_get_selection(cbd); | 117 clip_get_selection(cbd); |
134 clip_header[1].length = len + 1; | 134 clip_header[1].length = len + 1; |
135 clip_header[1].data = text_clip; | 135 clip_header[1].data = text_clip; |
136 | 136 |
137 switch(type) | 137 switch(type) |
138 { | 138 { |
139 default: /* fallthrough to MLINE */ | 139 default: // fallthrough to MLINE |
140 case MLINE: *vim_clip = 'L'; break; | 140 case MLINE: *vim_clip = 'L'; break; |
141 case MCHAR: *vim_clip = 'C'; break; | 141 case MCHAR: *vim_clip = 'C'; break; |
142 case MBLOCK: *vim_clip = 'B'; break; | 142 case MBLOCK: *vim_clip = 'B'; break; |
143 } | 143 } |
144 | 144 |