Skip to content

Commit 67f22b1

Browse files
Committing clang-format changes
1 parent d1f57f6 commit 67f22b1

File tree

179 files changed

+1335
-1360
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+1335
-1360
lines changed

benchmark/idioms/cjson/cJSON.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -718,8 +718,8 @@ parse_string(cJSON *const item, parse_buffer *const input_buffer)
718718
{
719719
const unsigned char *input_pointer = buffer_at_offset(input_buffer) + 1;
720720
const unsigned char *input_end = buffer_at_offset(input_buffer) + 1;
721-
unsigned char *output_pointer = NULL;
722-
unsigned char *output = NULL;
721+
unsigned char * output_pointer = NULL;
722+
unsigned char * output = NULL;
723723

724724
/* not a string */
725725
if (buffer_at_offset(input_buffer)[0] != '\"') {
@@ -833,8 +833,8 @@ static cJSON_bool
833833
print_string_ptr(const unsigned char *const input, printbuffer *const output_buffer)
834834
{
835835
const unsigned char *input_pointer = NULL;
836-
unsigned char *output = NULL;
837-
unsigned char *output_pointer = NULL;
836+
unsigned char * output = NULL;
837+
unsigned char * output_pointer = NULL;
838838
size_t output_length = 0;
839839
/* numbers of additional characters needed for escaping */
840840
size_t escape_characters = 0;
@@ -1014,7 +1014,7 @@ cJSON_ParseWithLengthOpts(const char *value, size_t buffer_length, const char **
10141014
cJSON_bool require_null_terminated)
10151015
{
10161016
parse_buffer buffer = {0, 0, 0, 0, {0, 0, 0}};
1017-
cJSON *item = NULL;
1017+
cJSON * item = NULL;
10181018

10191019
/* reset error position */
10201020
global_error.json = NULL;
@@ -1099,7 +1099,7 @@ print(const cJSON *const item, cJSON_bool format, const internal_hooks *const ho
10991099
{
11001100
static const size_t default_buffer_size = 256;
11011101
printbuffer buffer[1];
1102-
unsigned char *printed = NULL;
1102+
unsigned char * printed = NULL;
11031103

11041104
memset(buffer, 0, sizeof(buffer));
11051105

@@ -1423,7 +1423,7 @@ print_array(const cJSON *const item, printbuffer *const output_buffer)
14231423
{
14241424
unsigned char *output_pointer = NULL;
14251425
size_t length = 0;
1426-
cJSON *current_element = item->child;
1426+
cJSON * current_element = item->child;
14271427

14281428
if (output_buffer == NULL) {
14291429
return false;
@@ -1578,7 +1578,7 @@ print_object(const cJSON *const item, printbuffer *const output_buffer)
15781578
{
15791579
unsigned char *output_pointer = NULL;
15801580
size_t length = 0;
1581-
cJSON *current_item = item->child;
1581+
cJSON * current_item = item->child;
15821582

15831583
if (output_buffer == NULL) {
15841584
return false;

examples/C_plus_plus_example/H5Timing.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ typedef struct H5Timer {
2525
double start;
2626
double end;
2727
size_t data_size;
28-
char *name;
28+
char * name;
2929
} H5Timer;
3030

3131
typedef struct H5TimerClass {

examples/C_plus_plus_example/multidataset_plugin.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ typedef struct H5D_rw_multi_t {
1717
hid_t mem_type_id; /* memory datatype ID */
1818
hid_t mem_space_id; /* memory selection dataspace ID */
1919
union {
20-
void *rbuf; /* pointer to read buffer */
20+
void * rbuf; /* pointer to read buffer */
2121
const void *wbuf; /* pointer to write buffer */
2222
} u;
2323
} H5D_rw_multi_t;
2424
#endif
2525

2626
typedef struct multidataset_array {
27-
std::vector<char *> *temp_mem;
27+
std::vector<char *> * temp_mem;
2828
std::vector<hsize_t> *start;
2929
std::vector<hsize_t> *end;
3030
hsize_t last_end;

examples/bdcats.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ main(int argc, char **argv)
5757
pdcid_t region_xx, region_yy, region_zz, region_pxx, region_pyy, region_pzz, region_id11, region_id22;
5858
perr_t ret;
5959

60-
float *x, *y, *z;
61-
float *px, *py, *pz;
62-
int *id1, *id2;
60+
float * x, *y, *z;
61+
float * px, *py, *pz;
62+
int * id1, *id2;
6363
uint64_t numparticles;
6464
int ndim = 1;
6565
uint64_t *offset;
@@ -101,11 +101,11 @@ main(int argc, char **argv)
101101
if (cont_id == 0)
102102
LOG_ERROR("Failed to create container");
103103

104-
// open objects
104+
// open objects
105105
#ifdef ENABLE_MPI
106106
obj_xx = PDCobj_open_col("obj-var-xx", pdc_id);
107107
#else
108-
obj_xx = PDCobj_open("obj-var-xx", pdc_id);
108+
obj_xx = PDCobj_open("obj-var-xx", pdc_id);
109109
#endif
110110
if (obj_xx == 0) {
111111
LOG_ERROR("Error when open object %s\n", "obj-var-xx");
@@ -114,7 +114,7 @@ main(int argc, char **argv)
114114
#ifdef ENABLE_MPI
115115
obj_yy = PDCobj_open_col("obj-var-yy", pdc_id);
116116
#else
117-
obj_yy = PDCobj_open("obj-var-xx", pdc_id);
117+
obj_yy = PDCobj_open("obj-var-xx", pdc_id);
118118
#endif
119119
if (obj_yy == 0) {
120120
LOG_ERROR("Error when open object %s\n", "obj-var-yy");
@@ -123,7 +123,7 @@ main(int argc, char **argv)
123123
#ifdef ENABLE_MPI
124124
obj_zz = PDCobj_open_col("obj-var-zz", pdc_id);
125125
#else
126-
obj_zz = PDCobj_open("obj-var-xx", pdc_id);
126+
obj_zz = PDCobj_open("obj-var-xx", pdc_id);
127127
#endif
128128
if (obj_zz == 0) {
129129
LOG_ERROR("Error when open object %s\n", "obj-var-zz");
@@ -132,7 +132,7 @@ main(int argc, char **argv)
132132
#ifdef ENABLE_MPI
133133
obj_pxx = PDCobj_open_col("obj-var-pxx", pdc_id);
134134
#else
135-
obj_pxx = PDCobj_open("obj-var-xx", pdc_id);
135+
obj_pxx = PDCobj_open("obj-var-xx", pdc_id);
136136
#endif
137137
if (obj_pxx == 0) {
138138
LOG_ERROR("Error when open object %s\n", "obj-var-pxx");
@@ -141,7 +141,7 @@ main(int argc, char **argv)
141141
#ifdef ENABLE_MPI
142142
obj_pyy = PDCobj_open_col("obj-var-pyy", pdc_id);
143143
#else
144-
obj_pyy = PDCobj_open("obj-var-xx", pdc_id);
144+
obj_pyy = PDCobj_open("obj-var-xx", pdc_id);
145145
#endif
146146
if (obj_pyy == 0) {
147147
LOG_ERROR("Error when open object %s\n", "obj-var-pyy");
@@ -150,7 +150,7 @@ main(int argc, char **argv)
150150
#ifdef ENABLE_MPI
151151
obj_pzz = PDCobj_open_col("obj-var-pzz", pdc_id);
152152
#else
153-
obj_pzz = PDCobj_open("obj-var-xx", pdc_id);
153+
obj_pzz = PDCobj_open("obj-var-xx", pdc_id);
154154
#endif
155155
if (obj_pzz == 0) {
156156
LOG_ERROR("Error when open object %s\n", "obj-var-pzz");

examples/bdcats_batch.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ main(int argc, char **argv)
6666
char obj_name[128];
6767
float *x, *y, *z;
6868
float *px, *py, *pz;
69-
int *id1, *id2;
69+
int * id1, *id2;
7070
// int x_dim = 64;
7171
// int y_dim = 64;
7272
// int z_dim = 64;
@@ -177,7 +177,7 @@ main(int argc, char **argv)
177177
#ifdef ENABLE_MPI
178178
obj_xx[i] = PDCobj_open_col(obj_name, pdc_id);
179179
#else
180-
obj_xx[i] = PDCobj_open(obj_name, pdc_id);
180+
obj_xx[i] = PDCobj_open(obj_name, pdc_id);
181181
#endif
182182
if (obj_xx[i] == 0) {
183183
LOG_ERROR("Error getting an object id of %s from server, exit...\n", "obj-var-xx");
@@ -187,7 +187,7 @@ main(int argc, char **argv)
187187
#ifdef ENABLE_MPI
188188
obj_yy[i] = PDCobj_open_col(obj_name, pdc_id);
189189
#else
190-
obj_yy[i] = PDCobj_open(obj_name, pdc_id);
190+
obj_yy[i] = PDCobj_open(obj_name, pdc_id);
191191
#endif
192192
if (obj_yy[i] == 0) {
193193
LOG_ERROR("Error getting an object id of %s from server, exit...\n", "obj-var-yy");
@@ -197,7 +197,7 @@ main(int argc, char **argv)
197197
#ifdef ENABLE_MPI
198198
obj_zz[i] = PDCobj_open_col(obj_name, pdc_id);
199199
#else
200-
obj_zz[i] = PDCobj_open(obj_name, pdc_id);
200+
obj_zz[i] = PDCobj_open(obj_name, pdc_id);
201201
#endif
202202
if (obj_zz[i] == 0) {
203203
LOG_ERROR("Error getting an object id of %s from server, exit...\n", "obj-var-zz");
@@ -207,7 +207,7 @@ main(int argc, char **argv)
207207
#ifdef ENABLE_MPI
208208
obj_pxx[i] = PDCobj_open_col(obj_name, pdc_id);
209209
#else
210-
obj_pxx[i] = PDCobj_open(obj_name, pdc_id);
210+
obj_pxx[i] = PDCobj_open(obj_name, pdc_id);
211211
#endif
212212
if (obj_pxx[i] == 0) {
213213
LOG_ERROR("Error getting an object id of %s from server, exit...\n", "obj-var-pxx");
@@ -217,7 +217,7 @@ main(int argc, char **argv)
217217
#ifdef ENABLE_MPI
218218
obj_pyy[i] = PDCobj_open_col(obj_name, pdc_id);
219219
#else
220-
obj_pyy[i] = PDCobj_open(obj_name, pdc_id);
220+
obj_pyy[i] = PDCobj_open(obj_name, pdc_id);
221221
#endif
222222
if (obj_pyy[i] == 0) {
223223
LOG_ERROR("Error getting an object id of %s from server, exit...\n", "obj-var-pyy");
@@ -227,7 +227,7 @@ main(int argc, char **argv)
227227
#ifdef ENABLE_MPI
228228
obj_pzz[i] = PDCobj_open_col(obj_name, pdc_id);
229229
#else
230-
obj_pzz[i] = PDCobj_open(obj_name, pdc_id);
230+
obj_pzz[i] = PDCobj_open(obj_name, pdc_id);
231231
#endif
232232
if (obj_pzz[i] == 0) {
233233
LOG_ERROR("Error getting an object id of %s from server, exit...\n", "obj-var-pzz");

examples/bdcats_old.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ main(int argc, char **argv)
5656
pdcid_t region_x, region_y, region_z, region_px, region_py, region_pz, region_id1, region_id2;
5757
pdcid_t region_xx, region_yy, region_zz, region_pxx, region_pyy, region_pzz, region_id11, region_id22;
5858
perr_t ret;
59-
float *x, *y, *z;
60-
float *px, *py, *pz;
61-
int *id1, *id2;
59+
float * x, *y, *z;
60+
float * px, *py, *pz;
61+
int * id1, *id2;
6262
uint64_t numparticles;
6363
int ndim = 1;
6464
uint64_t *offset;

examples/haccio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ mask | int16 | 2 bytes
2626
* ------------------
2727
*/
2828

29-
static char *VAR_NAMES[NUM_VARS] = {"xx", "yy", "zz", "vx", "vy", "vz", "phi", "phd", "mask"};
29+
static char * VAR_NAMES[NUM_VARS] = {"xx", "yy", "zz", "vx", "vy", "vz", "phi", "phd", "mask"};
3030
static pdc_var_type_t VAR_TYPES[NUM_VARS] = {PDC_FLOAT, PDC_FLOAT, PDC_FLOAT, PDC_FLOAT, PDC_FLOAT,
3131
PDC_FLOAT, PDC_FLOAT, PDC_INT64, PDC_INT16};
3232
static int NUM_PARTICLES = (1 * 1024 * 1024);
33-
void *buffers[NUM_VARS];
33+
void * buffers[NUM_VARS];
3434

3535
MPI_Comm comm;
3636

examples/haccio_v2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ mask | int16 | 2 bytes
2626
* ------------------
2727
*/
2828

29-
static char *VAR_NAMES[NUM_VARS] = {"xx", "yy", "zz", "vx", "vy", "vz", "phi", "phd", "mask"};
29+
static char * VAR_NAMES[NUM_VARS] = {"xx", "yy", "zz", "vx", "vy", "vz", "phi", "phd", "mask"};
3030
static pdc_var_type_t VAR_TYPES[NUM_VARS] = {PDC_FLOAT, PDC_FLOAT, PDC_FLOAT, PDC_FLOAT, PDC_FLOAT,
3131
PDC_FLOAT, PDC_FLOAT, PDC_INT64, PDC_INT16};
3232
static int NUM_PARTICLES = (1 * 1024 * 1024);
33-
void *buffers[NUM_VARS];
33+
void * buffers[NUM_VARS];
3434

3535
MPI_Comm comm;
3636

examples/llsm/llsm_aux/csvReader.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ csv_parse_header(char *line, char *field_types)
3434
{
3535
csv_header_t *first_header = NULL;
3636
csv_header_t *last_header = NULL;
37-
char *token = NULL;
38-
char *saveptr = NULL;
37+
char * token = NULL;
38+
char * saveptr = NULL;
3939
int field_index = 0;
4040
int in_quotes = 0;
4141
int value_start = 0;
@@ -89,11 +89,11 @@ csv_parse_header(char *line, char *field_types)
8989
csv_row_t *
9090
csv_parse_row(char *line, csv_header_t *header)
9191
{
92-
csv_cell_t *first_cell = NULL;
93-
csv_cell_t *last_cell = NULL;
92+
csv_cell_t * first_cell = NULL;
93+
csv_cell_t * last_cell = NULL;
9494
csv_header_t *current_header = header;
95-
char *token = NULL;
96-
char *saveptr = NULL;
95+
char * token = NULL;
96+
char * saveptr = NULL;
9797
int field_index = 0;
9898
int in_quotes = 0;
9999
int value_start = 0;
@@ -181,7 +181,7 @@ csv_parse_file(char *file_name, char *field_types)
181181
}
182182

183183
// Read the first line of the file
184-
char *line = NULL;
184+
char * line = NULL;
185185
size_t len = 0;
186186
ssize_t read = getline(&line, &len, fp);
187187

examples/llsm/llsm_aux/csvReader.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@
88
#include "pdc_list.h"
99

1010
typedef struct csv_header_t {
11-
char *field_name;
11+
char * field_name;
1212
int field_index;
1313
char field_type;
1414
struct csv_header_t *next;
1515
} csv_header_t;
1616

1717
typedef struct csv_cell_t {
18-
char *field_value;
19-
csv_header_t *header;
18+
char * field_value;
19+
csv_header_t * header;
2020
struct csv_cell_t *next;
2121
} csv_cell_t;
2222

2323
typedef struct csv_row_t {
24-
csv_cell_t *first_cell;
24+
csv_cell_t * first_cell;
2525
struct csv_row_t *next;
2626
} csv_row_t;
2727

2828
typedef struct csv_table_t {
2929
csv_header_t *first_header;
30-
csv_row_t *first_row;
30+
csv_row_t * first_row;
3131
} csv_table_t;
3232

3333
/**

0 commit comments

Comments
 (0)