Skip to content

Commit

Permalink
Updated pointer declarations to the right of spaces (-par)indent 2.2.13.
Browse files Browse the repository at this point in the history
  • Loading branch information
allinurl committed Apr 2, 2023
1 parent f2bd49a commit 1fac919
Show file tree
Hide file tree
Showing 29 changed files with 613 additions and 606 deletions.
16 changes: 8 additions & 8 deletions src/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,25 +63,25 @@ bitmap_sizeof (uint32_t i) {
}

void
free_bitmap (bitmap * bm) {
free_bitmap (bitmap *bm) {
free ((uint32_t *) bm->bmp);
free (bm);
}

int
bitmap_set_bit (word_t * words, uint32_t n) {
bitmap_set_bit (word_t *words, uint32_t n) {
words[WORD_OFFSET (n)] |= ((word_t) 1 << BIT_OFFSET (n));
return 0;
}

int
bitmap_get_bit (word_t * words, uint32_t n) {
bitmap_get_bit (word_t *words, uint32_t n) {
word_t bit = words[WORD_OFFSET (n)] & ((word_t) 1 << BIT_OFFSET (n));
return bit != 0;
}

uint32_t
bitmap_count_set (const bitmap * bm) {
bitmap_count_set (const bitmap *bm) {
uint32_t i, n = 0, len = 0;

if (!bm)
Expand All @@ -95,7 +95,7 @@ bitmap_count_set (const bitmap * bm) {
}

uint32_t
bitmap_ffs (bitmap * bm) {
bitmap_ffs (bitmap *bm) {
uint32_t i, pos = 1, len = 0;
uint32_t __bitset;

Expand Down Expand Up @@ -125,7 +125,7 @@ bitmap_create (uint32_t bit) {
}

int
bitmap_realloc (bitmap * bm, uint32_t bit) {
bitmap_realloc (bitmap *bm, uint32_t bit) {
uint32_t *tmp = NULL;
uint32_t oldlen = 0, newlen = 0;

Expand All @@ -147,7 +147,7 @@ bitmap_realloc (bitmap * bm, uint32_t bit) {
}

bitmap *
bitmap_copy (const bitmap * bm) {
bitmap_copy (const bitmap *bm) {
bitmap *ret;

if (!bm)
Expand All @@ -161,7 +161,7 @@ bitmap_copy (const bitmap * bm) {
}

int
bitmap_key_exists (bitmap * bm, uint32_t bit) {
bitmap_key_exists (bitmap *bm, uint32_t bit) {
if (bm->len < bit)
bitmap_realloc (bm, bit);

Expand Down
12 changes: 6 additions & 6 deletions src/color.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ extract_color (char *color) {
* On error, 1 is returned.
* On success, 0 is returned. */
static int
parse_bg_fg_color (GColorPair * pair, const char *value) {
parse_bg_fg_color (GColorPair *pair, const char *value) {
char bgcolor[COLOR_STR_LEN] = "", fgcolor[COLOR_STR_LEN] = "";
int ret = 0;

Expand All @@ -468,7 +468,7 @@ parse_bg_fg_color (GColorPair * pair, const char *value) {

/* Assign color attributes from the given config string to GColors. */
static void
locate_attr_color (GColors * color, const char *attr) {
locate_attr_color (GColors *color, const char *attr) {
if (strstr (attr, "bold"))
color->attr |= A_BOLD;
if (strstr (attr, "underline"))
Expand All @@ -488,7 +488,7 @@ locate_attr_color (GColors * color, const char *attr) {
* On error, 1 is returned.
* On success, 0 is returned. */
static int
parse_attr_color (GColors * color, const char *value) {
parse_attr_color (GColors *color, const char *value) {
char *line, *ptr, *start;
int ret = 0;

Expand Down Expand Up @@ -521,7 +521,7 @@ parse_attr_color (GColors * color, const char *value) {
* On error, 1 is returned.
* On success, 0 is returned. */
static int
parse_module_color (GColors * color, const char *value) {
parse_module_color (GColors *color, const char *value) {
char *line = xstrdup (value), *p;

p = strrchr (line, ' ');
Expand Down Expand Up @@ -648,7 +648,7 @@ get_color_by_item_module (GColorItem item, GModule module) {
* On error, it aborts.
* On success, the color properties are assigned */
static void
parse_color_line (GColorPair * pair, GColors * color, char *line) {
parse_color_line (GColorPair *pair, GColors *color, char *line) {
char *val;
int item = 0;
size_t idx;
Expand Down Expand Up @@ -687,7 +687,7 @@ parse_color_line (GColorPair * pair, GColors * color, char *line) {
* On error, or if color already exists, the given color is freed.
* On success, or if not color found, store color properties */
static void
prepend_color (GColors ** color) {
prepend_color (GColors **color) {
/* create a list of colors if one does not exist */
if (color_list == NULL) {
color_list = list_create (*color);
Expand Down
2 changes: 1 addition & 1 deletion src/commons.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ new_gagents (uint32_t size) {

/* Clean the array of agents. */
void
free_agents_array (GAgents * agents) {
free_agents_array (GAgents *agents) {
int i;

if (agents == NULL)
Expand Down
12 changes: 6 additions & 6 deletions src/csv.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ panel_lookup (GModule module) {

/* Iterate over the string and escape CSV output. */
static void
escape_cvs_output (FILE * fp, char *s) {
escape_cvs_output (FILE *fp, char *s) {
while (*s) {
switch (*s) {
case '"':
Expand All @@ -122,7 +122,7 @@ escape_cvs_output (FILE * fp, char *s) {
*
* On success, outputs item value. */
static void
print_csv_metric_block (FILE * fp, GMetrics * nmetrics) {
print_csv_metric_block (FILE *fp, GMetrics *nmetrics) {
/* basic metrics */
fprintf (fp, "\"%" PRIu64 "\",", nmetrics->hits);
fprintf (fp, "\"%4.2f%%\",", nmetrics->hits_perc);
Expand Down Expand Up @@ -163,7 +163,7 @@ print_csv_metric_block (FILE * fp, GMetrics * nmetrics) {
* On error, it exits early.
* On success, outputs item value. */
static void
print_csv_sub_items (FILE * fp, GHolder * h, int idx, GPercTotals totals) {
print_csv_sub_items (FILE *fp, GHolder *h, int idx, GPercTotals totals) {
GMetrics *nmetrics;
GSubList *sub_list = h->items[idx].sub_list;
GSubItem *iter;
Expand All @@ -190,7 +190,7 @@ print_csv_sub_items (FILE * fp, GHolder * h, int idx, GPercTotals totals) {
*
* On success, outputs item value. */
static void
print_csv_data (FILE * fp, GHolder * h, GPercTotals totals) {
print_csv_data (FILE *fp, GHolder *h, GPercTotals totals) {
GMetrics *nmetrics;
int i;

Expand All @@ -214,7 +214,7 @@ print_csv_data (FILE * fp, GHolder * h, GPercTotals totals) {
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
/* Output general statistics information. */
static void
print_csv_summary (FILE * fp) {
print_csv_summary (FILE *fp) {
char now[DATE_TIME];
char *source = NULL;
const char *fmt;
Expand Down Expand Up @@ -292,7 +292,7 @@ print_csv_summary (FILE * fp) {

/* Entry point to generate a a csv report writing it to the fp */
void
output_csv (GHolder * holder, const char *filename) {
output_csv (GHolder *holder, const char *filename) {
GModule module;
GPercTotals totals;
const GPanel *panel = NULL;
Expand Down
4 changes: 2 additions & 2 deletions src/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ setup_sigsegv_handler (void) {
}

static void
dump_struct_data (FILE * fp, GLog * glog, int pid) {
dump_struct_data (FILE *fp, GLog *glog, int pid) {
fprintf (fp, "==%d== FILE: %s\n", pid, glog->props.filename);
fprintf (fp, "==%d== Line number: %" PRIu64 "\n", pid, glog->processed);
fprintf (fp, "==%d== Invalid data: %" PRIu64 "\n", pid, glog->invalid);
Expand All @@ -159,7 +159,7 @@ dump_struct_data (FILE * fp, GLog * glog, int pid) {
/* Dump to the standard output the values of the overall parsed log
* data. */
static void
dump_struct (FILE * fp) {
dump_struct (FILE *fp) {
int pid = getpid (), i;

if (!log_data)
Expand Down

0 comments on commit 1fac919

Please sign in to comment.