summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/regedit_dialog.c14
-rw-r--r--source3/utils/regedit_dialog.h8
-rw-r--r--source3/utils/regedit_hexedit.c16
-rw-r--r--source3/utils/regedit_treeview.c3
4 files changed, 25 insertions, 16 deletions
diff --git a/source3/utils/regedit_dialog.c b/source3/utils/regedit_dialog.c
index 04b88b5488..d5bd426e7c 100644
--- a/source3/utils/regedit_dialog.c
+++ b/source3/utils/regedit_dialog.c
@@ -179,8 +179,8 @@ static int dialog_getch(struct dialog *dia)
return c;
}
-struct dialog *dialog_center_new(TALLOC_CTX *ctx, const char *title, int nlines,
- int ncols)
+struct dialog *dialog_center_new(TALLOC_CTX *ctx, const char *title,
+ int nlines, int ncols)
{
struct dialog *dia;
int y, x;
@@ -447,7 +447,8 @@ int dialog_input(TALLOC_CTX *ctx, char **output, const char *title,
if (c == '\t' || c == KEY_BTAB) {
if (input_section) {
- if (form_driver(input,REQ_VALIDATION) == E_OK) {
+ int valid = form_driver(input, REQ_VALIDATION);
+ if (valid == E_OK) {
input_section = false;
if (c == '\t') {
menu_driver(dia->choices,
@@ -809,7 +810,8 @@ static void section_up(struct edit_dialog *edit)
if (edit->buf) {
hexedit_set_cursor(edit->buf);
} else {
- set_current_field(edit->input, edit->field[FLD_DATA]);
+ set_current_field(edit->input,
+ edit->field[FLD_DATA]);
pos_form_cursor(edit->input);
}
} else {
@@ -990,8 +992,8 @@ static WERROR edit_init_form(struct edit_dialog *edit, uint32_t type,
return WERR_OK;
}
-WERROR dialog_edit_value(TALLOC_CTX *ctx, struct registry_key *key, uint32_t type,
- const struct value_item *vitem)
+WERROR dialog_edit_value(TALLOC_CTX *ctx, struct registry_key *key,
+ uint32_t type, const struct value_item *vitem)
{
struct edit_dialog *edit;
#define DIALOG_RESIZE 2
diff --git a/source3/utils/regedit_dialog.h b/source3/utils/regedit_dialog.h
index edecbed576..ab171cf4d7 100644
--- a/source3/utils/regedit_dialog.h
+++ b/source3/utils/regedit_dialog.h
@@ -37,8 +37,8 @@ struct dialog {
struct dialog *dialog_new(TALLOC_CTX *ctx, const char *title, int nlines,
int ncols, int y, int x);
-struct dialog *dialog_center_new(TALLOC_CTX *ctx, const char *title, int nlines,
- int ncols);
+struct dialog *dialog_center_new(TALLOC_CTX *ctx, const char *title,
+ int nlines, int ncols);
struct dialog *dialog_choice_new(TALLOC_CTX *ctx, const char *title,
const char **choices, int nlines, int ncols,
@@ -67,8 +67,8 @@ int dialog_input(TALLOC_CTX *ctx, char **output, const char *title,
struct registry_key;
struct value_item;
-WERROR dialog_edit_value(TALLOC_CTX *ctx, struct registry_key *key, uint32_t type,
- const struct value_item *vitem);
+WERROR dialog_edit_value(TALLOC_CTX *ctx, struct registry_key *key,
+ uint32_t type, const struct value_item *vitem);
int dialog_select_type(TALLOC_CTX *ctx, int *type);
diff --git a/source3/utils/regedit_hexedit.c b/source3/utils/regedit_hexedit.c
index 40a4e40782..e2864e3fae 100644
--- a/source3/utils/regedit_hexedit.c
+++ b/source3/utils/regedit_hexedit.c
@@ -70,7 +70,8 @@ struct hexedit *hexedit_new(TALLOC_CTX *ctx, WINDOW *parent, int nlines,
}
buf->cursor_x = HEX_COL1;
- buf->status_line = derwin(buf->win, 1, LINE_WIDTH, max_rows(buf->win), 0);
+ buf->status_line = derwin(buf->win, 1, LINE_WIDTH, max_rows(buf->win),
+ 0);
if (buf->status_line == NULL) {
goto fail;
}
@@ -113,7 +114,9 @@ void hexedit_refresh(struct hexedit *buf)
end = buf->len;
}
- for (off = buf->offset, lineno = 0; off < end; off += BYTES_PER_LINE, ++lineno) {
+ for (off = buf->offset, lineno = 0;
+ off < end;
+ off += BYTES_PER_LINE, ++lineno) {
uint8_t *line = buf->data + off;
size_t i, endline;
@@ -150,7 +153,8 @@ void hexedit_refresh(struct hexedit *buf)
static void calc_cursor_offset(struct hexedit *buf)
{
- buf->cursor_offset = buf->offset + buf->cursor_y * BYTES_PER_LINE + buf->cursor_line_offset;
+ buf->cursor_offset = buf->offset + buf->cursor_y * BYTES_PER_LINE +
+ buf->cursor_line_offset;
}
static int offset_to_hex_col(size_t pos)
@@ -341,7 +345,8 @@ static void do_edit(struct hexedit *buf, int c)
if (!isprint(c)) {
c = '.';
}
- mvwaddch(buf->win, buf->cursor_y, ASCII_COL + buf->cursor_line_offset, c);
+ mvwaddch(buf->win, buf->cursor_y,
+ ASCII_COL + buf->cursor_line_offset, c);
cursor_right(buf);
} else {
if (!isxdigit(c)) {
@@ -365,7 +370,8 @@ static void do_edit(struct hexedit *buf, int c)
if (!isprint(c)) {
c = '.';
}
- mvwaddch(buf->win, buf->cursor_y, ASCII_COL + buf->cursor_line_offset, c);
+ mvwaddch(buf->win, buf->cursor_y,
+ ASCII_COL + buf->cursor_line_offset, c);
if (buf->cursor_x + 1 != HEX_COL2_END) {
cursor_right(buf);
diff --git a/source3/utils/regedit_treeview.c b/source3/utils/regedit_treeview.c
index f0c3bd81f8..c74f052c59 100644
--- a/source3/utils/regedit_treeview.c
+++ b/source3/utils/regedit_treeview.c
@@ -371,7 +371,8 @@ void tree_view_resize(struct tree_view *view, int nlines, int ncols,
post_menu(view->menu);
}
-static void print_path_recursive(WINDOW *label, struct tree_node *node, size_t *len)
+static void print_path_recursive(WINDOW *label, struct tree_node *node,
+ size_t *len)
{
if (node->parent)
print_path_recursive(label, node->parent, len);