summaryrefslogtreecommitdiffstats
path: root/library/listbox.tcl
blob: 27cb11486b259f907d6640aa4e0f82f52be5d4d8 (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
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
# listbox.tcl --
#
# This file defines the default bindings for Tk listbox widgets
# and provides procedures that help in implementing those bindings.
#
# RCS: @(#) $Id: listbox.tcl,v 1.15 2005/09/10 14:53:20 das Exp $
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1995 Sun Microsystems, Inc.
# Copyright (c) 1998 by Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.

#--------------------------------------------------------------------------
# tk::Priv elements used in this file:
#
# afterId -		Token returned by "after" for autoscanning.
# listboxPrev -		The last element to be selected or deselected
#			during a selection operation.
# listboxSelection -	All of the items that were selected before the
#			current selection operation (such as a mouse
#			drag) started;  used to cancel an operation.
#--------------------------------------------------------------------------

#-------------------------------------------------------------------------
# The code below creates the default class bindings for listboxes.
#-------------------------------------------------------------------------

# Note: the check for existence of %W below is because this binding
# is sometimes invoked after a window has been deleted (e.g. because
# there is a double-click binding on the widget that deletes it).  Users
# can put "break"s in their bindings to avoid the error, but this check
# makes that unnecessary.

bind Listbox <1> {
    if {[winfo exists %W]} {
	tk::ListboxBeginSelect %W [%W index @%x,%y]
    }
}

# Ignore double clicks so that users can define their own behaviors.
# Among other things, this prevents errors if the user deletes the
# listbox on a double click.

bind Listbox <Double-1> {
    # Empty script
}

bind Listbox <B1-Motion> {
    set tk::Priv(x) %x
    set tk::Priv(y) %y
    tk::ListboxMotion %W [%W index @%x,%y]
}
bind Listbox <ButtonRelease-1> {
    tk::CancelRepeat
    %W activate @%x,%y
}
bind Listbox <Shift-1> {
    tk::ListboxBeginExtend %W [%W index @%x,%y]
}
bind Listbox <Control-1> {
    tk::ListboxBeginToggle %W [%W index @%x,%y]
}
bind Listbox <B1-Leave> {
    set tk::Priv(x) %x
    set tk::Priv(y) %y
    tk::ListboxAutoScan %W
}
bind Listbox <B1-Enter> {
    tk::CancelRepeat
}

bind Listbox <Up> {
    tk::ListboxUpDown %W -1
}
bind Listbox <Shift-Up> {
    tk::ListboxExtendUpDown %W -1
}
bind Listbox <Down> {
    tk::ListboxUpDown %W 1
}
bind Listbox <Shift-Down> {
    tk::ListboxExtendUpDown %W 1
}
bind Listbox <Left> {
    %W xview scroll -1 units
}
bind Listbox <Control-Left> {
    %W xview scroll -1 pages
}
bind Listbox <Right> {
    %W xview scroll 1 units
}
bind Listbox <Control-Right> {
    %W xview scroll 1 pages
}
bind Listbox <Prior> {
    %W yview scroll -1 pages
    %W activate @0,0
}
bind Listbox <Next> {
    %W yview scroll 1 pages
    %W activate @0,0
}
bind Listbox <Control-Prior> {
    %W xview scroll -1 pages
}
bind Listbox <Control-Next> {
    %W xview scroll 1 pages
}
bind Listbox <Home> {
    %W xview moveto 0
}
bind Listbox <End> {
    %W xview moveto 1
}
bind Listbox <Control-Home> {
    %W activate 0
    %W see 0
    %W selection clear 0 end
    %W selection set 0
    event generate %W <<ListboxSelect>>
}
bind Listbox <Shift-Control-Home> {
    tk::ListboxDataExtend %W 0
}
bind Listbox <Control-End> {
    %W activate end
    %W see end
    %W selection clear 0 end
    %W selection set end
    event generate %W <<ListboxSelect>>
}
bind Listbox <Shift-Control-End> {
    tk::ListboxDataExtend %W [%W index end]
}
bind Listbox <<Copy>> {
    if {[selection own -displayof %W] eq "%W"} {
	clipboard clear -displayof %W
	clipboard append -displayof %W [selection get -displayof %W]
    }
}
bind Listbox <space> {
    tk::ListboxBeginSelect %W [%W index active]
}
bind Listbox <Select> {
    tk::ListboxBeginSelect %W [%W index active]
}
bind Listbox <Control-Shift-space> {
    tk::ListboxBeginExtend %W [%W index active]
}
bind Listbox <Shift-Select> {
    tk::ListboxBeginExtend %W [%W index active]
}
bind Listbox <Escape> {
    tk::ListboxCancel %W
}
bind Listbox <Control-slash> {
    tk::ListboxSelectAll %W
}
bind Listbox <Control-backslash> {
    if {[%W cget -selectmode] ne "browse"} {
	%W selection clear 0 end
	event generate %W <<ListboxSelect>>
    }
}

# Additional Tk bindings that aren't part of the Motif look and feel:

bind Listbox <2> {
    %W scan mark %x %y
}
bind Listbox <B2-Motion> {
    %W scan dragto %x %y
}

# The MouseWheel will typically only fire on Windows and Mac OS X.
# However, someone could use the "event generate" command to produce
# one on other platforms.

if {[tk windowingsystem] eq "aqua"} {
    bind Listbox <MouseWheel> {
        %W yview scroll [expr {- (%D)}] units
    }
    bind Listbox <Option-MouseWheel> {
        %W yview scroll [expr {-10 * (%D)}] units
    }
    bind Listbox <Shift-MouseWheel> {
        %W xview scroll [expr {- (%D)}] units
    }
    bind Listbox <Shift-Option-MouseWheel> {
        %W xview scroll [expr {-10 * (%D)}] units
    }
} else {
    bind Listbox <MouseWheel> {
        %W yview scroll [expr {- (%D / 120) * 4}] units
    }
}

if {"x11" eq [tk windowingsystem]} {
    # Support for mousewheels on Linux/Unix commonly comes through mapping
    # the wheel to the extended buttons.  If you have a mousewheel, find
    # Linux configuration info at:
    #	http://www.inria.fr/koala/colas/mouse-wheel-scroll/
    bind Listbox <4> {
	if {!$tk_strictMotif} {
	    %W yview scroll -5 units
	}
    }
    bind Listbox <5> {
	if {!$tk_strictMotif} {
	    %W yview scroll 5 units
	}
    }
}

# ::tk::ListboxBeginSelect --
#
# This procedure is typically invoked on button-1 presses.  It begins
# the process of making a selection in the listbox.  Its exact behavior
# depends on the selection mode currently in effect for the listbox;
# see the Motif documentation for details.
#
# Arguments:
# w -		The listbox widget.
# el -		The element for the selection operation (typically the
#		one under the pointer).  Must be in numerical form.

proc ::tk::ListboxBeginSelect {w el} {
    variable ::tk::Priv
    if {[$w cget -selectmode] eq "multiple"} {
	if {[$w selection includes $el]} {
	    $w selection clear $el
	} else {
	    $w selection set $el
	}
    } else {
	$w selection clear 0 end
	$w selection set $el
	$w selection anchor $el
	set Priv(listboxSelection) {}
	set Priv(listboxPrev) $el
    }
    event generate $w <<ListboxSelect>>
}

# ::tk::ListboxMotion --
#
# This procedure is called to process mouse motion events while
# button 1 is down.  It may move or extend the selection, depending
# on the listbox's selection mode.
#
# Arguments:
# w -		The listbox widget.
# el -		The element under the pointer (must be a number).

proc ::tk::ListboxMotion {w el} {
    variable ::tk::Priv
    if {$el == $Priv(listboxPrev)} {
	return
    }
    set anchor [$w index anchor]
    switch [$w cget -selectmode] {
	browse {
	    $w selection clear 0 end
	    $w selection set $el
	    set Priv(listboxPrev) $el
	    event generate $w <<ListboxSelect>>
	}
	extended {
	    set i $Priv(listboxPrev)
	    if {$i eq ""} {
		set i $el
		$w selection set $el
	    }
	    if {[$w selection includes anchor]} {
		$w selection clear $i $el
		$w selection set anchor $el
	    } else {
		$w selection clear $i $el
		$w selection clear anchor $el
	    }
	    if {![info exists Priv(listboxSelection)]} {
		set Priv(listboxSelection) [$w curselection]
	    }
	    while {($i < $el) && ($i < $anchor)} {
		if {[lsearch $Priv(listboxSelection) $i] >= 0} {
		    $w selection set $i
		}
		incr i
	    }
	    while {($i > $el) && ($i > $anchor)} {
		if {[lsearch $Priv(listboxSelection) $i] >= 0} {
		    $w selection set $i
		}
		incr i -1
	    }
	    set Priv(listboxPrev) $el
	    event generate $w <<ListboxSelect>>
	}
    }
}

# ::tk::ListboxBeginExtend --
#
# This procedure is typically invoked on shift-button-1 presses.  It
# begins the process of extending a selection in the listbox.  Its
# exact behavior depends on the selection mode currently in effect
# for the listbox;  see the Motif documentation for details.
#
# Arguments:
# w -		The listbox widget.
# el -		The element for the selection operation (typically the
#		one under the pointer).  Must be in numerical form.

proc ::tk::ListboxBeginExtend {w el} {
    if {[$w cget -selectmode] eq "extended"} {
	if {[$w selection includes anchor]} {
	    ListboxMotion $w $el
	} else {
	    # No selection yet; simulate the begin-select operation.
	    ListboxBeginSelect $w $el
	}
    }
}

# ::tk::ListboxBeginToggle --
#
# This procedure is typically invoked on control-button-1 presses.  It
# begins the process of toggling a selection in the listbox.  Its
# exact behavior depends on the selection mode currently in effect
# for the listbox;  see the Motif documentation for details.
#
# Arguments:
# w -		The listbox widget.
# el -		The element for the selection operation (typically the
#		one under the pointer).  Must be in numerical form.

proc ::tk::ListboxBeginToggle {w el} {
    variable ::tk::Priv
    if {[$w cget -selectmode] eq "extended"} {
	set Priv(listboxSelection) [$w curselection]
	set Priv(listboxPrev) $el
	$w selection anchor $el
	if {[$w selection includes $el]} {
	    $w selection clear $el
	} else {
	    $w selection set $el
	}
	event generate $w <<ListboxSelect>>
    }
}

# ::tk::ListboxAutoScan --
# This procedure is invoked when the mouse leaves an entry window
# with button 1 down.  It scrolls the window up, down, left, or
# right, depending on where the mouse left the window, and reschedules
# itself as an "after" command so that the window continues to scroll until
# the mouse moves back into the window or the mouse button is released.
#
# Arguments:
# w -		The entry window.

proc ::tk::ListboxAutoScan {w} {
    variable ::tk::Priv
    if {![winfo exists $w]} return
    set x $Priv(x)
    set y $Priv(y)
    if {$y >= [winfo height $w]} {
	$w yview scroll 1 units
    } elseif {$y < 0} {
	$w yview scroll -1 units
    } elseif {$x >= [winfo width $w]} {
	$w xview scroll 2 units
    } elseif {$x < 0} {
	$w xview scroll -2 units
    } else {
	return
    }
    ListboxMotion $w [$w index @$x,$y]
    set Priv(afterId) [after 50 [list tk::ListboxAutoScan $w]]
}

# ::tk::ListboxUpDown --
#
# Moves the location cursor (active element) up or down by one element,
# and changes the selection if we're in browse or extended selection
# mode.
#
# Arguments:
# w -		The listbox widget.
# amount -	+1 to move down one item, -1 to move back one item.

proc ::tk::ListboxUpDown {w amount} {
    variable ::tk::Priv
    $w activate [expr {[$w index active] + $amount}]
    $w see active
    switch [$w cget -selectmode] {
	browse {
	    $w selection clear 0 end
	    $w selection set active
	    event generate $w <<ListboxSelect>>
	}
	extended {
	    $w selection clear 0 end
	    $w selection set active
	    $w selection anchor active
	    set Priv(listboxPrev) [$w index active]
	    set Priv(listboxSelection) {}
	    event generate $w <<ListboxSelect>>
	}
    }
}

# ::tk::ListboxExtendUpDown --
#
# Does nothing unless we're in extended selection mode;  in this
# case it moves the location cursor (active element) up or down by
# one element, and extends the selection to that point.
#
# Arguments:
# w -		The listbox widget.
# amount -	+1 to move down one item, -1 to move back one item.

proc ::tk::ListboxExtendUpDown {w amount} {
    variable ::tk::Priv
    if {[$w cget -selectmode] ne "extended"} {
	return
    }
    set active [$w index active]
    if {![info exists Priv(listboxSelection)]} {
	$w selection set $active
	set Priv(listboxSelection) [$w curselection]
    }
    $w activate [expr {$active + $amount}]
    $w see active
    ListboxMotion $w [$w index active]
}

# ::tk::ListboxDataExtend
#
# This procedure is called for key-presses such as Shift-KEndData.
# If the selection mode isn't multiple or extend then it does nothing.
# Otherwise it moves the active element to el and, if we're in
# extended mode, extends the selection to that point.
#
# Arguments:
# w -		The listbox widget.
# el -		An integer element number.

proc ::tk::ListboxDataExtend {w el} {
    set mode [$w cget -selectmode]
    if {$mode eq "extended"} {
	$w activate $el
	$w see $el
        if {[$w selection includes anchor]} {
	    ListboxMotion $w $el
	}
    } elseif {$mode eq "multiple"} {
	$w activate $el
	$w see $el
    }
}

# ::tk::ListboxCancel
#
# This procedure is invoked to cancel an extended selection in
# progress.  If there is an extended selection in progress, it
# restores all of the items between the active one and the anchor
# to their previous selection state.
#
# Arguments:
# w -		The listbox widget.

proc ::tk::ListboxCancel w {
    variable ::tk::Priv
    if {[$w cget -selectmode] ne "extended"} {
	return
    }
    set first [$w index anchor]
    set last $Priv(listboxPrev)
    if {$last eq ""} {
	# Not actually doing any selection right now
	return
    }
    if {$first > $last} {
	set tmp $first
	set first $last
	set last $tmp
    }
    $w selection clear $first $last
    while {$first <= $last} {
	if {[lsearch $Priv(listboxSelection) $first] >= 0} {
	    $w selection set $first
	}
	incr first
    }
    event generate $w <<ListboxSelect>>
}

# ::tk::ListboxSelectAll
#
# This procedure is invoked to handle the "select all" operation.
# For single and browse mode, it just selects the active element.
# Otherwise it selects everything in the widget.
#
# Arguments:
# w -		The listbox widget.

proc ::tk::ListboxSelectAll w {
    set mode [$w cget -selectmode]
    if {$mode eq "single" || $mode eq "browse"} {
	$w selection clear 0 end
	$w selection set active
    } else {
	$w selection set 0 end
    }
    event generate $w <<ListboxSelect>>
}
8 /* Number of internal types */ #define H5G_NUSERTYPES (H5G_NTYPES - H5G_NLIBTYPES) #define H5G_USERTYPE(X) (8 + (X)) /* User defined types */ diff --git a/src/H5Groot.c b/src/H5Groot.c index 29cb46e..d7fbb49 100644 --- a/src/H5Groot.c +++ b/src/H5Groot.c @@ -246,8 +246,8 @@ H5G_mkroot(H5F_t *f, hbool_t create_root) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to verify symbol table") } /* end if */ #endif /* H5_STRICT_FORMAT_CHECKS */ - } /* end if */ - } /* end else */ + } /* end if */ + } /* end else */ /* Cache the root group's symbol table information in the root group symbol * table entry. It will have been allocated by now if it needs to be diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c index 2204209..88d990e 100644 --- a/src/H5Gtraverse.c +++ b/src/H5Gtraverse.c @@ -198,7 +198,7 @@ H5G__traverse_ud(const H5G_loc_t *grp_loc /*in,out*/, const H5O_link_t *lnk, H5G else cb_return = (link_class->trav_func)(lnk->name, cur_grp, lnk->u.ud.udata, lnk->u.ud.size, H5CX_get_lapl(), H5CX_get_dxpl()); -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ cb_return = (link_class->trav_func)(lnk->name, cur_grp, lnk->u.ud.udata, lnk->u.ud.size, H5CX_get_lapl(), H5CX_get_dxpl()); #endif /* H5_NO_DEPRECATED_SYMBOLS */ diff --git a/src/H5HFcache.c b/src/H5HFcache.c index ef2c4b2..0e1304f 100644 --- a/src/H5HFcache.c +++ b/src/H5HFcache.c @@ -1302,9 +1302,9 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG H5HF_indirect_t *iblock = (H5HF_indirect_t *)_thing; /* Indirect block info */ uint8_t * image = (uint8_t *)_image; /* Pointer into raw data buffer */ #ifndef NDEBUG - unsigned nchildren = 0; /* Track # of children */ - size_t max_child = 0; /* Track max. child entry used */ -#endif /* NDEBUG */ + unsigned nchildren = 0; /* Track # of children */ + size_t max_child = 0; /* Track max. child entry used */ +#endif /* NDEBUG */ uint32_t metadata_chksum; /* Computed metadata checksum value */ size_t u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ @@ -1378,7 +1378,7 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG max_child = u; } /* end if */ #endif /* NDEBUG */ - } /* end for */ + } /* end for */ /* Compute checksum */ metadata_chksum = H5_checksum_metadata((uint8_t *)_image, (size_t)(image - (uint8_t *)_image), 0); diff --git a/src/H5HG.c b/src/H5HG.c index 0a6955e..a50d29f 100644 --- a/src/H5HG.c +++ b/src/H5HG.c @@ -548,7 +548,7 @@ H5HG_insert(H5F_t *f, size_t size, const void *obj, H5HG_t *hobj /*out*/) HDmemset(heap->obj[idx].begin + H5HG_SIZEOF_OBJHDR(f) + size, 0, need - (H5HG_SIZEOF_OBJHDR(f) + size)); #endif /* OLD_WAY */ - } /* end if */ + } /* end if */ heap_flags |= H5AC__DIRTIED_FLAG; /* Return value */ diff --git a/src/H5MF.c b/src/H5MF.c index d4c79df..2fe78a3 100644 --- a/src/H5MF.c +++ b/src/H5MF.c @@ -1202,7 +1202,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: After H5FS_sect_add()\n", FUNC); #endif /* H5MF_ALLOC_DEBUG_MORE */ - } /* end if */ + } /* end if */ else { htri_t merged; /* Whether node was merged */ H5MF_sect_ud_t udata; /* User data for callback */ @@ -1369,7 +1369,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: H5MF__aggr_try_extend = %t\n", FUNC, ret_value); -#endif /* H5MF_ALLOC_DEBUG_MORE */ +#endif /* H5MF_ALLOC_DEBUG_MORE */ } /* end if */ /* If no extension so far, try to extend into a free-space section */ @@ -1395,7 +1395,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi "error extending block in free space manager") #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: Try to H5FS_sect_try_extend = %t\n", FUNC, ret_value); -#endif /* H5MF_ALLOC_DEBUG_MORE */ +#endif /* H5MF_ALLOC_DEBUG_MORE */ } /* end if */ /* For paged aggregation and a metadata block: try to extend into page end threshold */ @@ -1406,7 +1406,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi ret_value = TRUE; #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: Try to extend into the page end threshold = %t\n", FUNC, ret_value); -#endif /* H5MF_ALLOC_DEBUG_MORE */ +#endif /* H5MF_ALLOC_DEBUG_MORE */ } /* end if */ } /* end if */ } /* allow_extend */ @@ -2944,7 +2944,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) HDassert(fs_stat.serial_sect_count > 0); HDassert(fs_stat.alloc_sect_size > 0); HDassert(fs_stat.alloc_sect_size == fs_stat.sect_size); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end if */ else { HDassert(!H5F_addr_defined(fs_stat.addr)); diff --git a/src/H5MFsection.c b/src/H5MFsection.c index 473c1dc..597da76 100644 --- a/src/H5MFsection.c +++ b/src/H5MFsection.c @@ -648,7 +648,7 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata) #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: section is dropped\n", FUNC); #endif /* H5MF_ALLOC_DEBUG_MORE */ - } /* end if */ + } /* end if */ /* Adjust the section if it is not at page end but its size + prem is at page end */ else if (prem <= H5F_PGEND_META_THRES(udata->f)) { (*sect)->sect_info.size += prem; @@ -656,7 +656,7 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata) HDfprintf(stderr, "%s: section is adjusted {%a, %Hu}\n", FUNC, (*sect)->sect_info.addr, (*sect)->sect_info.size); #endif /* H5MF_ALLOC_DEBUG_MORE */ - } /* end if */ + } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5MM.c b/src/H5MM.c index 1effd6a..7b49c72 100644 --- a/src/H5MM.c +++ b/src/H5MM.c @@ -53,7 +53,7 @@ struct H5MM_block_t; /* Forward declaration for typedef */ typedef struct H5MM_block_t { unsigned char - sig[H5MM_SIG_SIZE]; /* Signature for the block, to indicate it was allocated with H5MM* interface */ + sig[H5MM_SIG_SIZE]; /* Signature for the block, to indicate it was allocated with H5MM* interface */ struct H5MM_block_t *next; /* Pointer to next block in the list of allocated blocks */ struct H5MM_block_t *prev; /* Pointer to previous block in the list of allocated blocks */ union { @@ -70,7 +70,7 @@ typedef struct H5MM_block_t { /********************/ /* Local Prototypes */ /********************/ -#if defined H5_MEMORY_ALLOC_SANITY_CHECK +#if defined H5_MEMORY_ALLOC_SANITY_CHECK static hbool_t H5MM__is_our_block(void *mem); static void H5MM__sanity_check_block(const H5MM_block_t *block); static void H5MM__sanity_check(void *mem); @@ -271,7 +271,7 @@ H5MM_malloc(size_t size) H5MM_block_head_s.u.info.in_use = TRUE; H5MM_init_s = TRUE; - } /* end if */ + } /* end if */ #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ if (size) { @@ -309,10 +309,10 @@ H5MM_malloc(size_t size) } /* end if */ else ret_value = NULL; -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ ret_value = HDmalloc(size); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ - } /* end if */ + } /* end if */ else ret_value = NULL; @@ -352,10 +352,10 @@ H5MM_calloc(size_t size) #if defined H5_MEMORY_ALLOC_SANITY_CHECK if (NULL != (ret_value = H5MM_malloc(size))) HDmemset(ret_value, 0, size); -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ ret_value = HDcalloc((size_t)1, size); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ - } /* end if */ + } /* end if */ else ret_value = NULL; @@ -417,14 +417,14 @@ H5MM_realloc(void *mem, size_t size) } else ret_value = H5MM_xfree(mem); -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ ret_value = HDrealloc(mem, size); /* Some platforms do not return NULL if size is zero. */ if (0 == size) ret_value = NULL; #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ - } /* end else */ + } /* end else */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5MM_realloc() */ @@ -542,10 +542,10 @@ H5MM_xfree(void *mem) } else HDfree(mem); -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ HDfree(mem); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ - } /* end if */ + } /* end if */ FUNC_LEAVE_NOAPI(NULL) } /* end H5MM_xfree() */ @@ -642,8 +642,8 @@ H5MM_get_alloc_stats(H5_alloc_stats_t *stats) stats->total_alloc_blocks_count = H5MM_total_alloc_blocks_count_s; stats->curr_alloc_blocks_count = H5MM_curr_alloc_blocks_count_s; stats->peak_alloc_blocks_count = H5MM_peak_alloc_blocks_count_s; - } /* end if */ -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ + } /* end if */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ if (stats) HDmemset(stats, 0, sizeof(H5_alloc_stats_t)); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ diff --git a/src/H5MMprivate.h b/src/H5MMprivate.h index b4a59ba..d957686 100644 --- a/src/H5MMprivate.h +++ b/src/H5MMprivate.h @@ -49,8 +49,8 @@ H5_DLL void * H5MM_xfree_const(const void *mem); H5_DLL void * H5MM_memcpy(void *dest, const void *src, size_t n); H5_DLL herr_t H5MM_get_alloc_stats(H5_alloc_stats_t *stats); #if defined H5_MEMORY_ALLOC_SANITY_CHECK -H5_DLL void H5MM_sanity_check_all(void); -H5_DLL void H5MM_final_sanity_check(void); +H5_DLL void H5MM_sanity_check_all(void); +H5_DLL void H5MM_final_sanity_check(void); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ #endif /* _H5MMprivate_H */ diff --git a/src/H5Ocache.c b/src/H5Ocache.c index a2ca561..778e77e 100644 --- a/src/H5Ocache.c +++ b/src/H5Ocache.c @@ -995,10 +995,10 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -1284,7 +1284,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image unsigned chunkno; /* Current chunk's index */ #ifndef NDEBUG unsigned nullcnt; /* Count of null messages (for sanity checking gaps in chunks) */ -#endif /* NDEBUG */ +#endif /* NDEBUG */ hbool_t mesgs_modified = FALSE; /* Whether any messages were modified when the object header was deserialized */ herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5Odtype.c b/src/H5Odtype.c index c1effad..e2e23a9 100644 --- a/src/H5Odtype.c +++ b/src/H5Odtype.c @@ -81,7 +81,7 @@ static herr_t H5O__dtype_debug(H5F_t *f, const void *_mesg, FILE *stream, int in if (H5T__upgrade_version((DT), (VERS)) < 0) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade " CLASS " encoding version") \ *(IOF) |= H5O_DECODEIO_DIRTY; \ - } /* end if */ + } /* end if */ #endif /* H5_STRICT_FORMAT_CHECKS */ /* This message derives from H5O message class */ diff --git a/src/H5Oint.c b/src/H5Oint.c index 3b8193c..1581c91 100644 --- a/src/H5Oint.c +++ b/src/H5Oint.c @@ -102,25 +102,25 @@ const H5O_msg_class_t *const H5O_msg_class_g[] = { H5O_MSG_LAYOUT, /*0x0008 Data Layout */ #ifdef H5O_ENABLE_BOGUS H5O_MSG_BOGUS_VALID, /*0x0009 "Bogus valid" (for testing) */ -#else /* H5O_ENABLE_BOGUS */ +#else /* H5O_ENABLE_BOGUS */ NULL, /*0x0009 "Bogus valid" (for testing) */ -#endif /* H5O_ENABLE_BOGUS */ - H5O_MSG_GINFO, /*0x000A Group information */ - H5O_MSG_PLINE, /*0x000B Data storage -- filter pipeline */ - H5O_MSG_ATTR, /*0x000C Attribute */ - H5O_MSG_NAME, /*0x000D Object name */ - H5O_MSG_MTIME, /*0x000E Object modification date and time */ - H5O_MSG_SHMESG, /*0x000F File-wide shared message table */ - H5O_MSG_CONT, /*0x0010 Object header continuation */ - H5O_MSG_STAB, /*0x0011 Symbol table */ - H5O_MSG_MTIME_NEW, /*0x0012 New Object modification date and time */ - H5O_MSG_BTREEK, /*0x0013 Non-default v1 B-tree 'K' values */ - H5O_MSG_DRVINFO, /*0x0014 Driver info settings */ - H5O_MSG_AINFO, /*0x0015 Attribute information */ - H5O_MSG_REFCOUNT, /*0x0016 Object's ref. count */ - H5O_MSG_FSINFO, /*0x0017 Free-space manager info */ - H5O_MSG_MDCI, /*0x0018 Metadata cache image */ - H5O_MSG_UNKNOWN /*0x0019 Placeholder for unknown message */ +#endif /* H5O_ENABLE_BOGUS */ + H5O_MSG_GINFO, /*0x000A Group information */ + H5O_MSG_PLINE, /*0x000B Data storage -- filter pipeline */ + H5O_MSG_ATTR, /*0x000C Attribute */ + H5O_MSG_NAME, /*0x000D Object name */ + H5O_MSG_MTIME, /*0x000E Object modification date and time */ + H5O_MSG_SHMESG, /*0x000F File-wide shared message table */ + H5O_MSG_CONT, /*0x0010 Object header continuation */ + H5O_MSG_STAB, /*0x0011 Symbol table */ + H5O_MSG_MTIME_NEW, /*0x0012 New Object modification date and time */ + H5O_MSG_BTREEK, /*0x0013 Non-default v1 B-tree 'K' values */ + H5O_MSG_DRVINFO, /*0x0014 Driver info settings */ + H5O_MSG_AINFO, /*0x0015 Attribute information */ + H5O_MSG_REFCOUNT, /*0x0016 Object's ref. count */ + H5O_MSG_FSINFO, /*0x0017 Free-space manager info */ + H5O_MSG_MDCI, /*0x0018 Metadata cache image */ + H5O_MSG_UNKNOWN /*0x0019 Placeholder for unknown message */ }; /* Format version bounds for object header */ @@ -1076,7 +1076,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks) H5O_chunk_proxy_t *chk_proxy; /* Proxy for chunk, to bring it into memory */ #ifndef NDEBUG size_t chkcnt = oh->nchunks; /* Count of chunks (for sanity checking) */ -#endif /* NDEBUG */ +#endif /* NDEBUG */ /* Bring the chunk into the cache */ /* (which adds to the object header) */ @@ -1124,7 +1124,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks) (oh->nmesgs + udata.common.merged_null_msgs) != udata.v1_pfx_nmesgs) HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "corrupt object header - incorrect # of messages") #endif /* H5_STRICT_FORMAT_CHECKS */ - } /* end if */ + } /* end if */ #ifdef H5O_DEBUG H5O__assert(oh); diff --git a/src/H5Opkg.h b/src/H5Opkg.h index fac5269..eece6b0 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -277,10 +277,10 @@ struct H5O_t { /* (This is to simulate a bug in earlier * versions of the library) */ -#endif /* H5O_ENABLE_BAD_MESG_COUNT */ +#endif /* H5O_ENABLE_BAD_MESG_COUNT */ #ifndef NDEBUG size_t ndecode_dirtied; /* Number of messages dirtied by decoding */ -#endif /* NDEBUG */ +#endif /* NDEBUG */ /* Chunk management information (not stored) */ size_t rc; /* Reference count of [continuation] chunks using this structure */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index d2aed18..dd7f9c7 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -37,14 +37,14 @@ typedef struct H5O_fill_t H5O_fill_t; #include "H5Spublic.h" /* Dataspace functions */ /* Private headers needed by this file */ -#include "H5private.h" /* Generic Functions */ +#include "H5private.h" /* Generic Functions */ #include "H5ACprivate.h" /* Metadata cache */ -#include "H5Fprivate.h" /* File access */ +#include "H5Fprivate.h" /* File access */ #include "H5HGprivate.h" /* Global Heaps */ #include "H5SLprivate.h" /* Skip lists */ -#include "H5Tprivate.h" /* Datatype functions */ +#include "H5Tprivate.h" /* Datatype functions */ #include "H5VLprivate.h" /* Virtual Object Layer */ -#include "H5Zprivate.h" /* I/O pipeline filters */ +#include "H5Zprivate.h" /* I/O pipeline filters */ /* Forward references of package typedefs */ typedef struct H5O_msg_class_t H5O_msg_class_t; @@ -67,8 +67,8 @@ typedef struct H5O_mesg_t H5O_mesg_t; /* Object header macros */ #define H5O_MESG_MAX_SIZE 65536 /*max obj header message size */ -#define H5O_ALL (-1) /* Operate on all messages of type */ -#define H5O_FIRST (-2) /* Operate on first message of type */ +#define H5O_ALL (-1) /* Operate on all messages of type */ +#define H5O_FIRST (-2) /* Operate on first message of type */ /* Flags needed when encoding messages */ #define H5O_MSG_NO_FLAGS_SET 0x00u @@ -96,10 +96,10 @@ typedef struct H5O_mesg_t H5O_mesg_t; /* #define H5O_ENABLE_BOGUS */ /* ========= Object Creation properties ============ */ -#define H5O_CRT_ATTR_MAX_COMPACT_NAME "max compact attr" /* Max. # of attributes to store compactly */ -#define H5O_CRT_ATTR_MIN_DENSE_NAME "min dense attr" /* Min. # of attributes to store densely */ +#define H5O_CRT_ATTR_MAX_COMPACT_NAME "max compact attr" /* Max. # of attributes to store compactly */ +#define H5O_CRT_ATTR_MIN_DENSE_NAME "min dense attr" /* Min. # of attributes to store densely */ #define H5O_CRT_OHDR_FLAGS_NAME "object header flags" /* Object header flags */ -#define H5O_CRT_PIPELINE_NAME "pline" /* Filter pipeline */ +#define H5O_CRT_PIPELINE_NAME "pline" /* Filter pipeline */ #define H5O_CRT_PIPELINE_DEF \ { \ {0, NULL, H5O_NULL_ID, {{0, HADDR_UNDEF}}}, H5O_PLINE_VERSION_1, 0, 0, NULL \ @@ -376,7 +376,7 @@ typedef struct H5O_link_t { * External File List Message * (Data structure in memory) */ -#define H5O_EFL_ALLOC 16 /*number of slots to alloc at once */ +#define H5O_EFL_ALLOC 16 /*number of slots to alloc at once */ #define H5O_EFL_UNLIMITED H5F_UNLIMITED /*max possible file size */ typedef struct H5O_efl_entry_t { diff --git a/src/H5Oshared.h b/src/H5Oshared.h index a8f76aa..aafa069 100644 --- a/src/H5Oshared.h +++ b/src/H5Oshared.h @@ -72,10 +72,10 @@ H5O_SHARED_DECODE(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *iofla #ifdef H5_STRICT_FORMAT_CHECKS if (*ioflags & H5O_DECODEIO_DIRTY) HGOTO_ERROR(H5E_OHDR, H5E_UNSUPPORTED, NULL, "unable to mark shared message dirty") -#else /* H5_STRICT_FORMAT_CHECKS */ +#else /* H5_STRICT_FORMAT_CHECKS */ *ioflags &= ~H5O_DECODEIO_DIRTY; #endif /* H5_STRICT_FORMAT_CHECKS */ - } /* end if */ + } /* end if */ else { /* Decode native message directly */ if (NULL == (ret_value = H5O_SHARED_DECODE_REAL(f, open_oh, mesg_flags, ioflags, p_size, p))) @@ -237,7 +237,7 @@ H5O_SHARED_DELETE(H5F_t *f, H5O_t *open_oh, void *_mesg) /* Decrement the reference count on the native message directly */ if (H5O_SHARED_DELETE_REAL(f, open_oh, _mesg) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement ref count for native message") - } /* end else */ + } /* end else */ #endif /* H5O_SHARED_DELETE_REAL */ done: @@ -288,7 +288,7 @@ H5O_SHARED_LINK(H5F_t *f, H5O_t *open_oh, void *_mesg) /* Increment the reference count on the native message directly */ if (H5O_SHARED_LINK_REAL(f, open_oh, _mesg) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "unable to increment ref count for native message") - } /* end else */ + } /* end else */ #endif /* H5O_SHARED_LINK_REAL */ done: @@ -333,7 +333,7 @@ H5O_SHARED_COPY_FILE(H5F_t *file_src, void *_native_src, H5F_t *file_dst, hbool_ if (NULL == (dst_mesg = H5O_SHARED_COPY_FILE_REAL(file_src, H5O_SHARED_TYPE, _native_src, file_dst, recompute_size, cpy_info, udata))) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy native message to another file") -#else /* H5O_SHARED_COPY_FILE_REAL */ +#else /* H5O_SHARED_COPY_FILE_REAL */ /* No copy file callback defined, just copy the message itself */ if (NULL == (dst_mesg = (H5O_SHARED_TYPE->copy)(_native_src, NULL))) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy native message") diff --git a/src/H5PLpath.c b/src/H5PLpath.c index 62ac936..d566f66 100644 --- a/src/H5PLpath.c +++ b/src/H5PLpath.c @@ -686,7 +686,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5PL__path_table_iterate_process_path() */ -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ static herr_t H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type_t iter_type, H5PL_iterate_t iter_op, void *op_data) @@ -908,7 +908,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5PL__find_plugin_in_path() */ -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ static herr_t H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *found, const char *dir, const void **plugin_info) diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 331ad4d..523553b 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -313,7 +313,7 @@ static const H5O_layout_t H5D_def_layout_compact_g = H5D_DEF_LAYOUT_COMPACT; static const H5O_layout_t H5D_def_layout_contig_g = H5D_DEF_LAYOUT_CONTIG; static const H5O_layout_t H5D_def_layout_chunk_g = H5D_DEF_LAYOUT_CHUNK; static const H5O_layout_t H5D_def_layout_virtual_g = H5D_DEF_LAYOUT_VIRTUAL; -#else /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ +#else /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ static H5O_layout_t H5D_def_layout_compact_g = H5D_DEF_LAYOUT_COMPACT; static H5O_layout_t H5D_def_layout_contig_g = H5D_DEF_LAYOUT_CONTIG; static H5O_layout_t H5D_def_layout_chunk_g = H5D_DEF_LAYOUT_CHUNK; diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 88a29d2..3872afe 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -493,7 +493,7 @@ static const hbool_t H5F_def_coll_md_write_flag_g = H5F_ACS_COLL_MD_WRITE_FLAG_DEF; /* Default setting for the collective metedata write flag */ static const MPI_Comm H5F_def_mpi_params_comm_g = H5F_ACS_MPI_PARAMS_COMM_DEF; /* Default MPI communicator */ static const MPI_Info H5F_def_mpi_params_info_g = H5F_ACS_MPI_PARAMS_INFO_DEF; /* Default MPI info struct */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ static const H5AC_cache_image_config_t H5F_def_mdc_initCacheImageCfg_g = H5F_ACS_META_CACHE_INIT_IMAGE_CONFIG_DEF; /* Default metadata cache image settings */ static const size_t H5F_def_page_buf_size_g = H5F_ACS_PAGE_BUFFER_SIZE_DEF; /* Default page buffer size */ diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h index 4013c0a..3e2244d 100644 --- a/src/H5Ppkg.h +++ b/src/H5Ppkg.h @@ -87,7 +87,7 @@ struct H5P_genclass_t { H5P_plist_type_t type; /* Type of property */ size_t nprops; /* Number of properties in class */ unsigned - plists; /* Number of property lists that have been created since the last modification to the class */ + plists; /* Number of property lists that have been created since the last modification to the class */ unsigned classes; /* Number of classes that have been derived since the last modification to the class */ unsigned ref_count; /* Number of outstanding ID's open on this class object */ hbool_t deleted; /* Whether this class has been deleted and is waiting for dependent classes & proplists diff --git a/src/H5SM.c b/src/H5SM.c index 6af4173..f74e36d 100644 --- a/src/H5SM.c +++ b/src/H5SM.c @@ -1092,7 +1092,7 @@ H5SM_try_share(H5F_t *f, H5O_t *open_oh, unsigned defer_flags, unsigned type_id, if (defer_flags & H5SM_WAS_DEFERRED) #ifndef NDEBUG deferred_type = ((H5O_shared_t *)mesg)->type; -#else /* NDEBUG */ +#else /* NDEBUG */ if ((((H5O_shared_t *)mesg)->type != H5O_SHARE_TYPE_HERE) && (((H5O_shared_t *)mesg)->type != H5O_SHARE_TYPE_SOHM)) HGOTO_DONE(FALSE); @@ -1408,7 +1408,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t if (defer) HDmemset(&shared.u, 0, sizeof(shared.u)); #endif /* H5_USING_MEMCHECKER */ - } /* end if */ + } /* end if */ else { htri_t share_in_ohdr; /* Whether the new message can be shared in another object's header */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 6db6e01..2868347 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -2126,7 +2126,7 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max /* Decrement number of blocks */ fast_dim_count--; } /* end while */ -#else /* NO_DUFFS_DEVICE */ +#else /* NO_DUFFS_DEVICE */ { size_t duffs_index; /* Counting index for Duff's device */ @@ -2169,7 +2169,7 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max } while (--duffs_index > 0); } /* end switch */ } -#endif /* NO_DUFFS_DEVICE */ +#endif /* NO_DUFFS_DEVICE */ #undef DUFF_GUTS /* Increment offset in destination buffer */ @@ -11749,7 +11749,7 @@ done: for (u = 0; u < H5S_MAX_RANK; u++) HDassert(!udata.ps_span_info[u]); - } /* end block */ + } /* end block */ #endif /* NDEBUG */ FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Spkg.h b/src/H5Spkg.h index 3075b6d..8737c99 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -286,7 +286,7 @@ typedef struct { H5S_sel_release_func_t release; /* Method to release current selection */ H5S_sel_is_valid_func_t is_valid; /* Method to determine if current selection is valid for dataspace */ H5S_sel_serial_size_func_t - serial_size; /* Method to determine number of bytes required to store current selection */ + serial_size; /* Method to determine number of bytes required to store current selection */ H5S_sel_serialize_func_t serialize; /* Method to store current selection in "serialized" form (a byte sequence suitable for storing on disk) */ H5S_sel_deserialize_func_t deserialize; /* Method to store create selection from "serialized" form (a byte @@ -294,7 +294,7 @@ typedef struct { H5S_sel_bounds_func_t bounds; /* Method to determine to smallest n-D bounding box containing the current selection */ H5S_sel_offset_func_t - offset; /* Method to determine linear offset of initial element in selection within dataspace */ + offset; /* Method to determine linear offset of initial element in selection within dataspace */ H5S_sel_unlim_dim_func_t unlim_dim; /* Method to get unlimited dimension of selection (or -1 for none) */ H5S_sel_num_elem_non_unlim_func_t num_elem_non_unlim; /* Method to get the number of elements in a slice through the unlimited dimension */ @@ -304,9 +304,9 @@ typedef struct { H5S_sel_shape_same_func_t shape_same; /* Method to determine if two dataspaces' selections are the same shape */ H5S_sel_intersect_block_func_t - intersect_block; /* Method to determine if a dataspaces' selection intersects a block */ - H5S_sel_adjust_u_func_t adjust_u; /* Method to adjust a selection by an offset */ - H5S_sel_adjust_s_func_t adjust_s; /* Method to adjust a selection by an offset (signed) */ + intersect_block; /* Method to determine if a dataspaces' selection intersects a block */ + H5S_sel_adjust_u_func_t adjust_u; /* Method to adjust a selection by an offset */ + H5S_sel_adjust_s_func_t adjust_s; /* Method to adjust a selection by an offset (signed) */ H5S_sel_project_scalar project_scalar; /* Method to construct scalar dataspace projection */ H5S_sel_project_simple project_simple; /* Method to construct simple dataspace projection */ H5S_sel_iter_init_func_t iter_init; /* Method to initialize iterator for current selection */ @@ -370,7 +370,7 @@ typedef struct H5S_sel_iter_class_t { H5S_sel_iter_next_block_func_t iter_next_block; /* Method to move selection iterator to the next block in the selection */ H5S_sel_iter_get_seq_list_func_t - iter_get_seq_list; /* Method to retrieve a list of offset/length sequences for selection iterator */ + iter_get_seq_list; /* Method to retrieve a list of offset/length sequences for selection iterator */ H5S_sel_iter_release_func_t iter_release; /* Method to release iterator for current selection */ } H5S_sel_iter_class_t; diff --git a/src/H5TS.c b/src/H5TS.c index 732f41c..6c4bb63 100644 --- a/src/H5TS.c +++ b/src/H5TS.c @@ -70,7 +70,7 @@ static herr_t H5TS__mutex_unlock(H5TS_mutex_t *mutex, unsigned int *lock_count); /* Global variable definitions */ #ifdef H5_HAVE_WIN_THREADS H5TS_once_t H5TS_first_init_g; -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ H5TS_once_t H5TS_first_init_g = PTHREAD_ONCE_INIT; #endif /* H5_HAVE_WIN_THREADS */ @@ -78,8 +78,8 @@ H5TS_once_t H5TS_first_init_g = PTHREAD_ONCE_INIT; H5TS_key_t H5TS_errstk_key_g; /* Error stack */ #ifdef H5_HAVE_CODESTACK H5TS_key_t H5TS_funcstk_key_g; /* Function stack */ -#endif /* H5_HAVE_CODESTACK */ -H5TS_key_t H5TS_apictx_key_g; /* API context */ +#endif /* H5_HAVE_CODESTACK */ +H5TS_key_t H5TS_apictx_key_g; /* API context */ /*******************/ /* Local Variables */ @@ -356,7 +356,7 @@ H5TS__mutex_acquire(H5TS_mutex_t *mutex, unsigned int lock_count, hbool_t *acqui #ifdef H5_HAVE_WIN_THREADS EnterCriticalSection(&mutex->CriticalSection); *acquired = TRUE; -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ /* Attempt to acquire the mutex lock */ if (0 == HDpthread_mutex_lock(&mutex->atomic_lock)) { pthread_t my_thread_id = HDpthread_self(); @@ -441,7 +441,7 @@ herr_t H5TS_mutex_lock(H5TS_mutex_t *mutex) #ifdef H5_HAVE_WIN_THREADS EnterCriticalSection(&mutex->CriticalSection); -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ /* Acquire the "attempt" lock, increment the attempt lock count, release the lock */ ret_value = HDpthread_mutex_lock(&mutex->atomic_lock2); if (ret_value) @@ -507,7 +507,7 @@ H5TS__mutex_unlock(H5TS_mutex_t *mutex, unsigned int *lock_count) #ifdef H5_HAVE_WIN_THREADS /* Releases ownership of the specified critical section object. */ LeaveCriticalSection(&mutex->CriticalSection); -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ /* Reset the lock count for this thread */ ret_value = HDpthread_mutex_lock(&mutex->atomic_lock); @@ -563,7 +563,7 @@ H5TS_mutex_unlock(H5TS_mutex_t *mutex) #ifdef H5_HAVE_WIN_THREADS /* Releases ownership of the specified critical section object. */ LeaveCriticalSection(&mutex->CriticalSection); -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ /* Decrement the lock count for this thread */ ret_value = HDpthread_mutex_lock(&mutex->atomic_lock); @@ -610,7 +610,7 @@ H5TSmutex_get_attempt_count(unsigned int *count) #ifdef H5_HAVE_WIN_THREADS /* Add Win32 equivalent here when async is supported */ -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ ret_value = HDpthread_mutex_lock(&H5_g.init_lock.atomic_lock2); if (ret_value) HGOTO_DONE(ret_value); @@ -689,7 +689,7 @@ H5TS_cancel_count_inc(void) #ifdef H5_HAVE_WIN_THREADS /* unsupported */ -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ /* Acquire the thread's cancellation counter */ cancel_counter = (H5TS_cancel_t *)H5TS_get_thread_local_value(H5TS_cancel_key_s); @@ -763,7 +763,7 @@ H5TS_cancel_count_dec(void) #ifdef H5_HAVE_WIN_THREADS /* unsupported */ -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ /* Acquire the thread's cancellation counter */ cancel_counter = (H5TS_cancel_t *)H5TS_get_thread_local_value(H5TS_cancel_key_s); diff --git a/src/H5TSprivate.h b/src/H5TSprivate.h index ccc7910..c0f2d2f 100644 --- a/src/H5TSprivate.h +++ b/src/H5TSprivate.h @@ -118,8 +118,8 @@ extern H5TS_once_t H5TS_first_init_g; /* Library initialization */ extern H5TS_key_t H5TS_errstk_key_g; /* Error stacks */ #ifdef H5_HAVE_CODESTACK extern H5TS_key_t H5TS_funcstk_key_g; /* Function stacks */ -#endif /* H5_HAVE_CODESTACK */ -extern H5TS_key_t H5TS_apictx_key_g; /* API contexts */ +#endif /* H5_HAVE_CODESTACK */ +extern H5TS_key_t H5TS_apictx_key_g; /* API contexts */ /* Library-scope routines */ /* (Only used within H5private.h macros) */ diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index e9991d8..8942b4f 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -339,7 +339,7 @@ typedef struct H5T_shared_t { size_t size; /*total size of an instance of this type */ unsigned version; /* Version of object header message to encode this object with */ hbool_t - force_conv; /* Set if this type always needs to be converted and H5T__conv_noop cannot be called */ + force_conv; /* Set if this type always needs to be converted and H5T__conv_noop cannot be called */ struct H5T_t * parent; /*parent type for derived datatypes */ H5VL_object_t *owned_vol_obj; /* Vol object owned by this type (free on close) */ union { diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h index e99895a..88a4fb4 100644 --- a/src/H5Tprivate.h +++ b/src/H5Tprivate.h @@ -27,9 +27,9 @@ typedef struct H5T_t H5T_t; #include "H5MMpublic.h" /* Memory management */ /* Private headers needed by this file */ -#include "H5private.h" /* Generic Functions */ -#include "H5Gprivate.h" /* Groups */ -#include "H5Rprivate.h" /* References */ +#include "H5private.h" /* Generic Functions */ +#include "H5Gprivate.h" /* Groups */ +#include "H5Rprivate.h" /* References */ #include "H5VLprivate.h" /* VOL Drivers */ /* Macro for size of temporary buffers to contain a single element */ diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c index 9b75bc4..5fb5a98 100644 --- a/src/H5Tvlen.c +++ b/src/H5Tvlen.c @@ -637,7 +637,7 @@ H5T__vlen_mem_str_getptr(void *_vl) #ifdef H5_NO_ALIGNMENT_RESTRICTIONS char *s = *(char **)_vl; /* Pointer to the user's string information */ #else - char *s = NULL; /* Pointer to the user's string information */ + char * s = NULL; /* Pointer to the user's string information */ #endif FUNC_ENTER_STATIC_NOERR @@ -728,7 +728,7 @@ H5T__vlen_mem_str_read(H5VL_object_t H5_ATTR_UNUSED *file, void *_vl, void *buf, #ifdef H5_NO_ALIGNMENT_RESTRICTIONS char *s = *(char **)_vl; /* Pointer to the user's string information */ #else - char *s; /* Pointer to the user's string information */ + char *s; /* Pointer to the user's string information */ #endif FUNC_ENTER_STATIC_NOERR diff --git a/src/H5VLpublic.h b/src/H5VLpublic.h index 12250aa..c853ef8 100644 --- a/src/H5VLpublic.h +++ b/src/H5VLpublic.h @@ -361,8 +361,8 @@ H5_DLL herr_t H5VLquery_optional(hid_t obj_id, H5VL_subclass_t subcls, int opt_t #endif /* Semi-public headers mainly for VOL connector authors */ -#include "H5VLconnector.h" /* VOL connector author routines */ +#include "H5VLconnector.h" /* VOL connector author routines */ #include "H5VLconnector_passthru.h" /* Pass-through VOL connector author routines */ -#include "H5VLnative.h" /* Native VOL connector macros, for VOL connector authors */ +#include "H5VLnative.h" /* Native VOL connector macros, for VOL connector authors */ #endif /* _H5VLpublic_H */ diff --git a/src/H5VM.c b/src/H5VM.c index 72ec045..14737d2 100644 --- a/src/H5VM.c +++ b/src/H5VM.c @@ -486,7 +486,7 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const #ifdef NO_INLINED_CODE dst_start = H5VM_hyper_stride(n, size, dst_size, dst_offset, dst_stride); src_start = H5VM_hyper_stride(n, size, src_size, src_offset, src_stride); -#else /* NO_INLINED_CODE */ +#else /* NO_INLINED_CODE */ /* in-line version of two calls to H5VM_hyper_stride() */ { hsize_t dst_acc; /*accumulator */ diff --git a/src/H5Z.c b/src/H5Z.c index b6f617d..bde5343 100644 --- a/src/H5Z.c +++ b/src/H5Z.c @@ -47,7 +47,7 @@ typedef struct H5Z_object_t { #ifdef H5_HAVE_PARALLEL hbool_t sanity_checked; /* Whether the sanity check for collectively calling H5Zunregister has been done */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ } H5Z_object_t; /* Enumerated type for dataset creation prelude callbacks */ @@ -181,7 +181,7 @@ next: } /* end for */ } /* end for */ } /* end if */ -#endif /* H5Z_DEBUG */ +#endif /* H5Z_DEBUG */ /* Free the table of filters */ if (H5Z_table_g) { @@ -255,11 +255,11 @@ H5Zregister(const void *cls) /* Set cls_real to point to the translated structure */ cls_real = &cls_new; -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ /* Deprecated symbols not allowed, throw an error */ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid H5Z_class_t version number"); #endif /* H5_NO_DEPRECATED_SYMBOLS */ - } /* end if */ + } /* end if */ if (cls_real->id < 0 || cls_real->id > H5Z_FILTER_MAX) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number") @@ -327,7 +327,7 @@ H5Z_register(const H5Z_class2_t *cls) #ifdef H5Z_DEBUG HDmemset(H5Z_stat_table_g + i, 0, sizeof(H5Z_stats_t)); #endif /* H5Z_DEBUG */ - } /* end if */ + } /* end if */ /* Filter already registered */ else { /* Replace old contents */ @@ -587,7 +587,7 @@ H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void H5_ATTR_PARA H5F_t *f = (H5F_t *)obj_ptr; /* File object for operations */ #ifdef H5_HAVE_PARALLEL H5Z_object_t *object = (H5Z_object_t *)key; -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ int ret_value = FALSE; /* Return value */ FUNC_ENTER_STATIC @@ -632,7 +632,7 @@ H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void H5_ATTR_PARA if (H5P_USER_TRUE == coll_md_read) H5CX_set_coll_metadata_read(TRUE); } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ /* Call the flush routine for mounted file hierarchies */ if (H5F_flush_mounts((H5F_t *)obj_ptr) < 0) diff --git a/src/H5Znbit.c b/src/H5Znbit.c index 8b928cf..46585fb 100644 --- a/src/H5Znbit.c +++ b/src/H5Znbit.c @@ -95,13 +95,13 @@ H5Z_class2_t H5Z_NBIT[1] = {{ }}; /* Local macros */ -#define H5Z_NBIT_ATOMIC 1 /* Atomic datatype class: integer/floating-point */ -#define H5Z_NBIT_ARRAY 2 /* Array datatype class */ -#define H5Z_NBIT_COMPOUND 3 /* Compound datatype class */ -#define H5Z_NBIT_NOOPTYPE 4 /* Other datatype class: nbit does no compression */ +#define H5Z_NBIT_ATOMIC 1 /* Atomic datatype class: integer/floating-point */ +#define H5Z_NBIT_ARRAY 2 /* Array datatype class */ +#define H5Z_NBIT_COMPOUND 3 /* Compound datatype class */ +#define H5Z_NBIT_NOOPTYPE 4 /* Other datatype class: nbit does no compression */ #define H5Z_NBIT_MAX_NPARMS 4096 /* Max number of parameters for filter */ -#define H5Z_NBIT_ORDER_LE 0 /* Little endian for datatype byte order */ -#define H5Z_NBIT_ORDER_BE 1 /* Big endian for datatype byte order */ +#define H5Z_NBIT_ORDER_LE 0 /* Little endian for datatype byte order */ +#define H5Z_NBIT_ORDER_BE 1 /* Big endian for datatype byte order */ /* Local variables */ diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c index 05309d1..3330c3f 100644 --- a/src/H5Zscaleoffset.c +++ b/src/H5Zscaleoffset.c @@ -103,14 +103,14 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ /* Local macros */ #define H5Z_SCALEOFFSET_TOTAL_NPARMS 20 /* Total number of parameters for filter */ -#define H5Z_SCALEOFFSET_PARM_SCALETYPE 0 /* "User" parameter for scale type */ -#define H5Z_SCALEOFFSET_PARM_SCALEFACTOR 1 /* "User" parameter for scale factor */ -#define H5Z_SCALEOFFSET_PARM_NELMTS 2 /* "Local" parameter for number of elements in the chunk */ -#define H5Z_SCALEOFFSET_PARM_CLASS 3 /* "Local" parameter for datatype class */ -#define H5Z_SCALEOFFSET_PARM_SIZE 4 /* "Local" parameter for datatype size */ -#define H5Z_SCALEOFFSET_PARM_SIGN 5 /* "Local" parameter for integer datatype sign */ -#define H5Z_SCALEOFFSET_PARM_ORDER 6 /* "Local" parameter for datatype byte order */ -#define H5Z_SCALEOFFSET_PARM_FILAVAIL 7 /* "Local" parameter for dataset fill value existence */ +#define H5Z_SCALEOFFSET_PARM_SCALETYPE 0 /* "User" parameter for scale type */ +#define H5Z_SCALEOFFSET_PARM_SCALEFACTOR 1 /* "User" parameter for scale factor */ +#define H5Z_SCALEOFFSET_PARM_NELMTS 2 /* "Local" parameter for number of elements in the chunk */ +#define H5Z_SCALEOFFSET_PARM_CLASS 3 /* "Local" parameter for datatype class */ +#define H5Z_SCALEOFFSET_PARM_SIZE 4 /* "Local" parameter for datatype size */ +#define H5Z_SCALEOFFSET_PARM_SIGN 5 /* "Local" parameter for integer datatype sign */ +#define H5Z_SCALEOFFSET_PARM_ORDER 6 /* "Local" parameter for datatype byte order */ +#define H5Z_SCALEOFFSET_PARM_FILAVAIL 7 /* "Local" parameter for dataset fill value existence */ #define H5Z_SCALEOFFSET_PARM_FILVAL 8 /* "Local" parameter for start location to store dataset fill value */ #define H5Z_SCALEOFFSET_CLS_INTEGER 0 /* Integer (datatype class) */ @@ -1232,7 +1232,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu */ minval_size = sizeof(unsigned long long) <= ((unsigned char *)*buf)[4] ? sizeof(unsigned long long) : ((unsigned char *)*buf)[4]; - minval = 0; + minval = 0; for (i = 0; i < minval_size; i++) { minval_mask = ((unsigned char *)*buf)[5 + i]; minval_mask <<= i * 8; diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c index 3f56e6e..c84095f 100644 --- a/src/H5Zshuffle.c +++ b/src/H5Zshuffle.c @@ -122,8 +122,8 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] size_t numofelements; /* Number of elements in buffer */ size_t i; /* Local index variables */ #ifdef NO_DUFFS_DEVICE - size_t j; /* Local index variable */ -#endif /* NO_DUFFS_DEVICE */ + size_t j; /* Local index variable */ +#endif /* NO_DUFFS_DEVICE */ size_t leftover; /* Extra bytes at end of buffer */ size_t ret_value = 0; /* Return value */ @@ -165,7 +165,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] j--; } /* end for */ -#else /* NO_DUFFS_DEVICE */ +#else /* NO_DUFFS_DEVICE */ { size_t duffs_index; /* Counting index for Duff's device */ @@ -208,7 +208,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] } while (--duffs_index > 0); } /* end switch */ } -#endif /* NO_DUFFS_DEVICE */ +#endif /* NO_DUFFS_DEVICE */ #undef DUFF_GUTS } /* end for */ @@ -236,7 +236,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] j--; } /* end for */ -#else /* NO_DUFFS_DEVICE */ +#else /* NO_DUFFS_DEVICE */ { size_t duffs_index; /* Counting index for Duff's device */ @@ -279,7 +279,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] } while (--duffs_index > 0); } /* end switch */ } -#endif /* NO_DUFFS_DEVICE */ +#endif /* NO_DUFFS_DEVICE */ #undef DUFF_GUTS } /* end for */ diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c index 8a702fd..57ecd0e 100644 --- a/src/H5Ztrans.c +++ b/src/H5Ztrans.c @@ -1033,7 +1033,7 @@ H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void *array, size_t array_size #if CHAR_MIN >= 0 else if (array_type == H5T_NATIVE_SCHAR) H5Z_XFORM_DO_OP5(signed char, array_size) -#else /* CHAR_MIN >= 0 */ +#else /* CHAR_MIN >= 0 */ else if (array_type == H5T_NATIVE_UCHAR) H5Z_XFORM_DO_OP5(unsigned char, array_size) #endif /* CHAR_MIN >= 0 */ diff --git a/src/H5detect.c b/src/H5detect.c index 264ce64..11a01ee 100644 --- a/src/H5detect.c +++ b/src/H5detect.c @@ -1140,7 +1140,7 @@ print_header(void) #ifdef H5_HAVE_GETPWUID struct passwd *pwd = NULL; #else - int pwd = 1; + int pwd = 1; #endif static const char *month_name[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; diff --git a/src/H5make_libsettings.c b/src/H5make_libsettings.c index 2afa531..617d1f5 100644 --- a/src/H5make_libsettings.c +++ b/src/H5make_libsettings.c @@ -144,7 +144,7 @@ print_header(void) #ifdef H5_HAVE_GETPWUID struct passwd *pwd = NULL; #else - int pwd = 1; + int pwd = 1; #endif static const char *month_name[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; diff --git a/src/H5private.h b/src/H5private.h index a539432..9432d4a 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -480,11 +480,11 @@ typedef unsigned char uint8_t; #if H5_SIZEOF_INT16_T >= 2 #elif H5_SIZEOF_SHORT >= 2 -typedef short int16_t; +typedef short int16_t; #undef H5_SIZEOF_INT16_T #define H5_SIZEOF_INT16_T H5_SIZEOF_SHORT #elif H5_SIZEOF_INT >= 2 -typedef int int16_t; +typedef int int16_t; #undef H5_SIZEOF_INT16_T #define H5_SIZEOF_INT16_T H5_SIZEOF_INT #else @@ -506,11 +506,11 @@ typedef unsigned uint16_t; #if H5_SIZEOF_INT32_T >= 4 #elif H5_SIZEOF_SHORT >= 4 -typedef short int32_t; +typedef short int32_t; #undef H5_SIZEOF_INT32_T #define H5_SIZEOF_INT32_T H5_SIZEOF_SHORT #elif H5_SIZEOF_INT >= 4 -typedef int int32_t; +typedef int int32_t; #undef H5_SIZEOF_INT32_T #define H5_SIZEOF_INT32_T H5_SIZEOF_INT #elif H5_SIZEOF_LONG >= 4 @@ -682,7 +682,7 @@ typedef struct { #endif /* HDabs */ #ifndef HDaccept #define HDaccept(A, B, C) accept((A), (B), (C)) /* mirror VFD */ -#endif /* HDaccept */ +#endif /* HDaccept */ #ifndef HDaccess #define HDaccess(F, M) access(F, M) #endif /* HDaccess */ @@ -709,7 +709,7 @@ typedef struct { #endif /* HDasin */ #ifndef HDasprintf #define HDasprintf asprintf /*varargs*/ -#endif /* HDasprintf */ +#endif /* HDasprintf */ #ifndef HDassert #define HDassert(X) assert(X) #endif /* HDassert */ @@ -736,7 +736,7 @@ typedef struct { #endif /* HDatol */ #ifndef HDbind #define HDbind(A, B, C) bind((A), (B), (C)) /* mirror VFD */ -#endif /* HDbind */ +#endif /* HDbind */ #ifndef HDbsearch #define HDbsearch(K, B, N, Z, F) bsearch(K, B, N, Z, F) #endif /* HDbsearch */ @@ -784,7 +784,7 @@ typedef struct { #endif /* HDclosedir */ #ifndef HDconnect #define HDconnect(A, B, C) connect((A), (B), (C)) /* mirror VFD */ -#endif /* HDconnect */ +#endif /* HDconnect */ #ifndef HDcos #define HDcos(X) cos(X) #endif /* HDcos */ @@ -1033,7 +1033,7 @@ typedef off_t h5_stat_size_t; #endif /* HDgetgroups */ #ifndef HDgethostbyaddr #define HDgethostbyaddr(A, B, C) gethostbyaddr((A), (B), (C)) /* mirror VFD */ -#endif /* HDgethostbyaddr */ +#endif /* HDgethostbyaddr */ #ifndef HDgethostname #define HDgethostname(N, L) gethostname(N, L) #endif /* HDgethostname */ @@ -1075,55 +1075,55 @@ typedef off_t h5_stat_size_t; #endif /* HDgmtime */ #ifndef HDhtonl #define HDhtonl(X) htonl((X)) /* mirror VFD */ -#endif /* HDhtonl */ +#endif /* HDhtonl */ #ifndef HDhtons #define HDhtons(X) htons((X)) /* mirror VFD */ -#endif /* HDhtons */ +#endif /* HDhtons */ #ifndef HDinet_addr #define HDinet_addr(C) inet_addr((C)) /* mirror VFD */ -#endif /* HDinet_addr */ +#endif /* HDinet_addr */ #ifndef HDinet_ntoa #define HDinet_ntoa(C) inet_ntoa((C)) /* mirror VFD */ -#endif /* HDinet_ntoa */ +#endif /* HDinet_ntoa */ #ifndef HDisalnum #define HDisalnum(C) isalnum((int)(C)) /*cast for solaris warning*/ -#endif /* HDisalnum */ +#endif /* HDisalnum */ #ifndef HDisalpha #define HDisalpha(C) isalpha((int)(C)) /*cast for solaris warning*/ -#endif /* HDisalpha */ +#endif /* HDisalpha */ #ifndef HDisatty #define HDisatty(F) isatty(F) #endif /* HDisatty */ #ifndef HDiscntrl #define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/ -#endif /* HDiscntrl */ +#endif /* HDiscntrl */ #ifndef HDisdigit #define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/ -#endif /* HDisdigit */ +#endif /* HDisdigit */ #ifndef HDisgraph #define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/ -#endif /* HDisgraph */ +#endif /* HDisgraph */ #ifndef HDislower #define HDislower(C) islower((int)(C)) /*cast for solaris warning*/ -#endif /* HDislower */ +#endif /* HDislower */ #ifndef HDisnan #define HDisnan(X) isnan(X) #endif /* HDisnan */ #ifndef HDisprint #define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/ -#endif /* HDisprint */ +#endif /* HDisprint */ #ifndef HDispunct #define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/ -#endif /* HDispunct */ +#endif /* HDispunct */ #ifndef HDisspace #define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/ -#endif /* HDisspace */ +#endif /* HDisspace */ #ifndef HDisupper #define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/ -#endif /* HDisupper */ +#endif /* HDisupper */ #ifndef HDisxdigit #define HDisxdigit(C) isxdigit((int)(C)) /*cast for solaris warning*/ -#endif /* HDisxdigit */ +#endif /* HDisxdigit */ #ifndef HDkill #define HDkill(P, S) kill(P, S) #endif /* HDkill */ @@ -1141,7 +1141,7 @@ typedef off_t h5_stat_size_t; #endif /* HDlink */ #ifndef HDlisten #define HDlisten(A, B) listen((A), (B)) /* mirror VFD */ -#endif /* HDlisten */ +#endif /* HDlisten */ #ifndef HDllround #define HDllround(V) llround(V) #endif /* HDround */ @@ -1225,10 +1225,10 @@ typedef off_t h5_stat_size_t; #endif /* HDnanosleep */ #ifndef HDntohl #define HDntohl(A) ntohl((A)) /* mirror VFD */ -#endif /* HDntohl */ +#endif /* HDntohl */ #ifndef HDntohs #define HDntohs(A) ntohs((A)) /* mirror VFD */ -#endif /* HDntohs */ +#endif /* HDntohs */ #ifndef HDopen #define HDopen(F, ...) open(F, __VA_ARGS__) #endif /* HDopen */ @@ -1351,7 +1351,7 @@ H5_DLL void HDsrand(unsigned int seed); #ifndef HDsrandom #define HDsrandom(S) srandom(S) #endif /* HDsrandom */ -#else /* H5_HAVE_RANDOM */ +#else /* H5_HAVE_RANDOM */ #ifndef HDrand #define HDrand() rand() #endif /* HDrand */ @@ -1429,7 +1429,7 @@ H5_DLL void HDsrand(unsigned int seed); #endif /* HDsetsid */ #ifndef HDsetsockopt #define HDsetsockopt(A, B, C, D, E) setsockopt((A), (B), (C), (D), (E)) /* mirror VFD */ -#endif /* HDsetsockopt */ +#endif /* HDsetsockopt */ #ifndef HDsetuid #define HDsetuid(U) setuid(U) #endif /* HDsetuid */ @@ -1438,7 +1438,7 @@ H5_DLL void HDsrand(unsigned int seed); #endif /* HDsetvbuf */ #ifndef HDshutdown #define HDshutdown(A, B) shutdown((A), (B)) /* mirror VFD */ -#endif /* HDshutdown */ +#endif /* HDshutdown */ #ifndef HDsigaction #define HDsigaction(S, A, O) sigaction((S), (A), (O)) #endif /* HDsigaction */ @@ -1486,13 +1486,13 @@ H5_DLL void HDsrand(unsigned int seed); #endif /* HDsleep */ #ifndef HDsnprintf #define HDsnprintf snprintf /*varargs*/ -#endif /* HDsnprintf */ +#endif /* HDsnprintf */ #ifndef HDsocket #define HDsocket(A, B, C) socket((A), (B), (C)) /* mirror VFD */ -#endif /* HDsocket */ +#endif /* HDsocket */ #ifndef HDsprintf #define HDsprintf sprintf /*varargs*/ -#endif /* HDsprintf */ +#endif /* HDsprintf */ #ifndef HDsqrt #define HDsqrt(X) sqrt(X) #endif /* HDsqrt */ @@ -1706,7 +1706,7 @@ H5_DLL int64_t HDstrtoll(const char *s, const char **rest, int base); * define these in terms of macros. */ #if !defined strdup && !defined H5_HAVE_STRDUP -extern char *strdup(const char *s); +extern char * strdup(const char *s); #endif #ifndef HDstrdup @@ -1992,7 +1992,7 @@ extern char H5libhdf5_settings[]; /* embedded library information */ #define H5TRACE11(R, T, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) /*void*/ #define H5TRACE12(R, T, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) /*void*/ #define H5TRACE_RETURN(V) /*void*/ -#endif /* H5_DEBUG_API */ +#endif /* H5_DEBUG_API */ /* Argument tracing macros (defined all the time) */ #define H5ARG_TRACE0(C, T) C, T @@ -2146,10 +2146,10 @@ extern hbool_t H5_libterm_g; /* Is the library being shutdown? */ #define H5_PUSH_FUNC H5CS_push(FUNC); #define H5_POP_FUNC H5CS_pop(); -#else /* H5_HAVE_CODESTACK */ +#else /* H5_HAVE_CODESTACK */ #define H5_PUSH_FUNC /* void */ #define H5_POP_FUNC /* void */ -#endif /* H5_HAVE_CODESTACK */ +#endif /* H5_HAVE_CODESTACK */ #ifdef H5_HAVE_MPE extern hbool_t H5_MPEinit_g; /* Has the MPE Library been initialized? */ @@ -2202,7 +2202,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); func_check = TRUE; \ } /* end if */ \ } /* end scope */ -#else /* NDEBUG */ +#else /* NDEBUG */ #define FUNC_ENTER_CHECK_NAME(asrt) #endif /* NDEBUG */ diff --git a/src/H5public.h b/src/H5public.h index 29c8b37..9e80316 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -95,9 +95,9 @@ extern "C" { #define H5_NO_EXPAND(x) (x) /* Version numbers */ -#define H5_VERS_MAJOR 1 /* For major interface/format changes */ +#define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 13 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 0 /* For tweaks, bug-fixes, or develop