summaryrefslogtreecommitdiff
blob: 212b8d63d1e326d601de7c1a1d936f7025756500 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
Fix building with C++14:
* Add 'noexcept(false)' to throwing destructors in C++11 mode
* Properly guard C declarations with extern "C" scopes
* Avoid erroneous overloaded suffix operator errors, due to missing spaces
* Add explicit casts to avoid -Wnarrowing errors
* Add 'this->' for dependent identifiers in derived class templates,
  previously required -fpermissive

--- a/bvAlignedReads.cpp
+++ b/bvAlignedReads.cpp
@@ -126,7 +126,11 @@
 }
 
 
-bvAlignedReads :: ~bvAlignedReads() {
+bvAlignedReads :: ~bvAlignedReads()
+#if __cplusplus >= 201103L
+   noexcept(false)
+#endif
+{
 
 
    assert( pBamView_->aBVAlignedReads_.remove( this ) );
--- a/bvAlignedReads.h
+++ b/bvAlignedReads.h
@@ -81,7 +81,11 @@
                    const FileName& filReferenceSequenceFile,
                    bamView* pBamView );
 
-   ~bvAlignedReads();
+   ~bvAlignedReads()
+#if __cplusplus >= 201103L
+   noexcept(false)
+#endif
+   ;
 
    bool operator==( const bvAlignedReads& myBVAlignedReads ) const {
       return( this == &myBVAlignedReads );
--- a/chromatData.h
+++ b/chromatData.h
@@ -58,6 +58,9 @@
 #ifndef CHROMATDATA_DEFINED
 #define CHROMATDATA_DEFINED
 
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 #ifndef FLOAT
 #define FLOAT		double
@@ -131,4 +134,8 @@
 int freeChromatData();
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
--- a/compareContigs.cpp
+++ b/compareContigs.cpp
@@ -126,6 +126,9 @@
 
 
 compareContigs :: ~compareContigs() 
+#if __cplusplus >= 201103L
+   noexcept(false)
+#endif
 { 
 
    if ( !bCalledFromMakeJoins_ ) {
--- a/compareContigs.h
+++ b/compareContigs.h
@@ -137,7 +137,11 @@
    compareContigs( ContigWin* pContigWin, const int nConsPos1);
    compareContigs(); // for assemblyView
 
-   ~compareContigs();
+   ~compareContigs()
+#if __cplusplus >= 201103L
+   noexcept(false)
+#endif
+   ;
 
    // this makes RWTPtrOrderedVector in ConsEd happy
    bool operator==( const compareContigs& compC ) const {

--- a/filePopupAndGetAceFilename.cpp
+++ b/filePopupAndGetAceFilename.cpp
@@ -317,7 +317,7 @@
       struct tm* pTM = localtime( &( pAceFile->stat_.st_mtime ) );
       
       strftime( szDateTime, nDateTimeSize,  
-                quote(%H)":"quote(%M)":"quote(%S)" %e-%h-%Y",
+                quote(%H) ":" quote(%M) ":" quote(%S) " %e-%h-%Y",
                 pTM );
 
       RWCString soDescription = RWCString( szDateTime ) + "    " + (*pAceFile);
@@ -620,7 +620,7 @@
       struct tm* pTM = localtime( &( pAceFile->stat_.st_mtime ) );
       
       strftime( szDateTime, nDateTimeSize,  
-                quote(%H)":"quote(%M)":"quote(%S)" %e-%h-%Y",
+                quote(%H) ":" quote(%M) ":" quote(%S) " %e-%h-%Y",
                 pTM );
 
       RWCString soDescription = RWCString( szDateTime ) + "    " + (*pAceFile);
--- a/findTraceExtrema.h
+++ b/findTraceExtrema.h
@@ -44,8 +44,15 @@
 
 #include    "chromatData.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int findTraceExtrema( ChromatData *chromatData );
 
+#ifdef __cplusplus
+}
+#endif
 
 #endif
 
--- a/makeUpper.h
+++ b/makeUpper.h
@@ -42,6 +42,14 @@
 #ifndef MAKEUPPER_INCLUDED
 #define MAKEUPPER_INCLUDED
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void makeUpper( char* szStringOfMixedCase );
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
--- a/nextPhredPipeline.cpp
+++ b/nextPhredPipeline.cpp
@@ -476,7 +476,7 @@
 void nextPhredPipeline :: openAndLockControlFile() {
 
 
-   nFDControlFile_ = open( filControlFile_.data(), O_CREAT |O_RDWR );
+   nFDControlFile_ = open( filControlFile_.data(), O_CREAT |O_RDWR, 0600);
    if ( nFDControlFile_ == -1 ) {
       THROW_FILE_ERROR( filControlFile_ );
    }
--- a/readABI.h
+++ b/readABI.h
@@ -56,10 +56,18 @@
 
 #include    "chromatData.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifdef ANSI_C
 ChromatData *readABI( char *fn, int *status );
 #else
 ChromatData *readABI();
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
--- a/readData.h
+++ b/readData.h
@@ -44,6 +44,14 @@
 
 #include    "chromatData.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 ChromatData *readData( char *filename, int* status );
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
--- a/readESD.h
+++ b/readESD.h
@@ -53,6 +53,10 @@
 
 #include "chromatData.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef unsigned int4           DWORD;
 typedef unsigned char           TCHAR;
 typedef char                    BYTE;
@@ -187,5 +191,7 @@
 ChromatData *readESD();
 #endif
 
-
+#ifdef __cplusplus
+}
+#endif
 
--- a/readSCF.h
+++ b/readSCF.h
@@ -56,6 +56,10 @@
 
 #include    "chromatData.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* ---- Constants ---- */
 #define SCF_MAGIC (((((int4)'.'<<8)+(int4)'s'<<8)+(int4)'c'<<8)+(int4)'f')
 #define scale(V,OLDMAX,NEWMAX) (int2)( (FLOAT) V * (FLOAT) NEWMAX / (FLOAT) OLDMAX )
@@ -144,4 +148,8 @@
 int readSCF3();
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
--- a/readsense_bitmaps.h
+++ b/readsense_bitmaps.h
@@ -56,10 +56,10 @@
 static const int forward_bitmap_height = 19;
 static char forward_bitmap_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00,
-   0xf8, 0xff, 0x00, 0x00, 0xf8, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0xff, 0x07,
-   0xf8, 0xff, 0xff, 0x0f, 0xf8, 0xff, 0xff, 0x07, 0xf8, 0xff, 0x1f, 0x00,
-   0xf8, 0xff, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, (char)0xf8, 0x07, 0x00, 0x00,
+   (char)0xf8, (char)0xff, 0x00, 0x00, (char)0xf8, (char)0xff, 0x3f, 0x00, (char)0xf8, (char)0xff, (char)0xff, 0x07,
+   (char)0xf8, (char)0xff, (char)0xff, 0x0f, (char)0xf8, (char)0xff, (char)0xff, 0x07, (char)0xf8, (char)0xff, 0x1f, 0x00,
+   (char)0xf8, (char)0xff, 0x00, 0x00, (char)0xf8, 0x07, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00};
 
@@ -67,10 +67,10 @@
 static const int reverse_bitmap_height = 19;
 static char reverse_bitmap_bits[] = {
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xf8, 0x07,
-   0x00, 0xc0, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07, 0xf8, 0xff, 0xff, 0x07,
-   0xfc, 0xff, 0xff, 0x07, 0xf8, 0xff, 0xff, 0x07, 0x00, 0xfe, 0xff, 0x07,
-   0x00, 0xc0, 0xff, 0x07, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x07,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, (char)0xf8, 0x07,
+   0x00, (char)0xc0, (char)0xff, 0x07, 0x00, (char)0xff, (char)0xff, 0x07, (char)0xf8, (char)0xff, (char)0xff, 0x07,
+   (char)0xfc, (char)0xff, (char)0xff, 0x07, (char)0xf8, (char)0xff, (char)0xff, 0x07, 0x00, (char)0xfe, (char)0xff, 0x07,
+   0x00, (char)0xc0, (char)0xff, 0x07, 0x00, 0x00, (char)0xf8, 0x07, 0x00, 0x00, 0x00, 0x07,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00};
 
--- a/readType.h
+++ b/readType.h
@@ -56,11 +56,19 @@
 
 #include    "chromatData.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifdef ANSI_C
 int readType( char *filename );
 #else
 int readType();
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 
--- a/rwtptrsortedvector.h
+++ b/rwtptrsortedvector.h
@@ -57,7 +57,6 @@
 #ifdef USE_USING_IN_PUBLIC_TEMPLATE_CLASSES
    using RWTPtrOrderedVector<TP>::nCurrentLength_;
    using RWTPtrOrderedVector<TP>::isEmpty;
-   using RWTPtrOrderedVector<TP>::nCurrentLength_;
    using RWTPtrOrderedVector<TP>::length;
    using RWTPtrOrderedVector<TP>::ppArray_;
    using RWTPtrOrderedVector<TP>::data;
@@ -84,7 +83,7 @@
       if ( nInsertBeforeIndex == RW_NPOS )
          nInsertBeforeIndex = nCurrentLength_;
 
-      insertAt( nInsertBeforeIndex, pVal );
+      this->insertAt( nInsertBeforeIndex, pVal );
    }
 
    // don't copy this.  copy mbtValOrderedVectorOfRWCString's method instead
--- a/rwtvalsortedvector.h
+++ b/rwtvalsortedvector.h
@@ -74,7 +74,7 @@
       if ( nPos == RW_NPOS ) 
          nPos = nCurrentLength_;
 
-      insertAt( nPos, val );
+      this->insertAt( nPos, val );
    }
 
 
--- a/rwUtil.h
+++ b/rwUtil.h
@@ -51,6 +51,10 @@
 *|***************************************************************************|*
 */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifdef ANSI_C
 int2  inSwpSint2( char *ptr );
 int4  inSwpSint4( char *ptr );
@@ -97,3 +101,6 @@
 int writeUint4();
 #endif
 
+#ifdef __cplusplus
+}
+#endif
--- a/soGetDateTime.cpp
+++ b/soGetDateTime.cpp
@@ -62,13 +62,13 @@
    else if ( nFormat == nDotInMiddle ) {
       strftime( szDateTime, 
                 nDateTimeSize,
-                "%y%m%d."quote(%H)quote(%M)quote(%S),
+                "%y%m%d." quote(%H)quote(%M)quote(%S),
                 localtime( &timee ) );
    }
    else {
       strftime( szDateTime, 
                 nDateTimeSize,
-                "%y%m%d:"quote(%H)quote(%M)quote(%S),
+                "%y%m%d:" quote(%H)quote(%M)quote(%S),
                 localtime( &timee ) );
    }
                 
--- a/szGetTime.h
+++ b/szGetTime.h
@@ -42,9 +42,15 @@
 #ifndef szGetTime_included
 #define szGetTime_included
 
-char *szGetTime();
+#ifdef __cplusplus
+extern "C" {
+#endif
 
+char *szGetTime();
 
+#ifdef __cplusplus
+}
+#endif
 
 #endif