mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Keeping up the fight for whitespace consistency
Sadly, some of the code being fixed is my own... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
46bb02e8fc
commit
43765d2897
2 changed files with 47 additions and 44 deletions
13
dive.c
13
dive.c
|
@ -341,15 +341,18 @@ static void copy_tl(struct tag_entry *st, struct tag_entry *dt)
|
|||
|
||||
/* Clear everything but the first element;
|
||||
* this works for taglist, picturelist, even dive computers */
|
||||
#define STRUCTURED_LIST_FREE(_type, _start, _free) {\
|
||||
#define STRUCTURED_LIST_FREE(_type, _start, _free) \
|
||||
{ \
|
||||
_type *_ptr = _start; \
|
||||
while (_ptr) { \
|
||||
_type *_next = _ptr->next; \
|
||||
_free(_ptr); \
|
||||
_ptr = _next; \
|
||||
}}
|
||||
} \
|
||||
}
|
||||
|
||||
#define STRUCTURED_LIST_COPY(_type, _first, _dest, _cpy) {\
|
||||
#define STRUCTURED_LIST_COPY(_type, _first, _dest, _cpy) \
|
||||
{ \
|
||||
_type *_sptr = _first; \
|
||||
_type **_dptr = &_dest; \
|
||||
while (_sptr) { \
|
||||
|
@ -1500,7 +1503,6 @@ extern void fill_pressures(struct gas_pressures *pressures, const double amb_pre
|
|||
pressures->he = get_he(mix) / 1000.0 * amb_pressure;
|
||||
pressures->n2 = (1000 - get_o2(mix) - get_he(mix)) / 1000.0 * amb_pressure;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static int find_cylinder_match(cylinder_t *cyl, cylinder_t array[], unsigned int used)
|
||||
|
@ -2612,7 +2614,8 @@ void dive_set_geodata_from_picture(struct dive *d, struct picture *pic)
|
|||
}
|
||||
}
|
||||
|
||||
static void picture_free( struct picture *p){
|
||||
static void picture_free(struct picture *p)
|
||||
{
|
||||
if (!p)
|
||||
return;
|
||||
free(p->filename);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue