Make comment style more consistent

This commit is contained in:
Orestis Floros 2018-04-21 13:02:14 +03:00
parent a65914f338
commit e4d2b38552
No known key found for this signature in database
GPG Key ID: E9AD9F32E401E38F
21 changed files with 39 additions and 34 deletions

View File

@ -314,13 +314,13 @@ void cmd_rename_workspace(I3_CMD, const char *old_name, const char *new_name);
*/ */
void cmd_bar(I3_CMD, const char *bar_type, const char *bar_value, const char *bar_id); void cmd_bar(I3_CMD, const char *bar_type, const char *bar_value, const char *bar_id);
/* /**
* Implementation of 'shmlog <size>|toggle|on|off' * Implementation of 'shmlog <size>|toggle|on|off'
* *
*/ */
void cmd_shmlog(I3_CMD, const char *argument); void cmd_shmlog(I3_CMD, const char *argument);
/* /**
* Implementation of 'debuglog toggle|on|off' * Implementation of 'debuglog toggle|on|off'
* *
*/ */

View File

@ -13,7 +13,7 @@
#include <yajl/yajl_gen.h> #include <yajl/yajl_gen.h>
/* /**
* Holds an intermediate represenation of the result of a call to any command. * Holds an intermediate represenation of the result of a call to any command.
* When calling parse_command("floating enable, border none"), the parser will * When calling parse_command("floating enable, border none"), the parser will
* internally use this struct when calling cmd_floating and cmd_border. * internally use this struct when calling cmd_floating and cmd_border.

View File

@ -20,7 +20,8 @@
*/ */
Con *con_new_skeleton(Con *parent, i3Window *window); Con *con_new_skeleton(Con *parent, i3Window *window);
/* A wrapper for con_new_skeleton, to retain the old con_new behaviour /**
* A wrapper for con_new_skeleton, to retain the old con_new behaviour
* *
*/ */
Con *con_new(Con *parent, i3Window *window); Con *con_new(Con *parent, i3Window *window);
@ -220,7 +221,7 @@ void con_mark_toggle(Con *con, const char *mark, mark_mode_t mode);
*/ */
void con_mark(Con *con, const char *mark, mark_mode_t mode); void con_mark(Con *con, const char *mark, mark_mode_t mode);
/* /**
* Removes marks from containers. * Removes marks from containers.
* If con is NULL, all containers are considered. * If con is NULL, all containers are considered.
* If name is NULL, this removes all existing marks. * If name is NULL, this removes all existing marks.
@ -402,7 +403,7 @@ Con *con_descend_focused(Con *con);
*/ */
Con *con_descend_tiling_focused(Con *con); Con *con_descend_tiling_focused(Con *con);
/* /**
* Returns the leftmost, rightmost, etc. container in sub-tree. For example, if * Returns the leftmost, rightmost, etc. container in sub-tree. For example, if
* direction is D_LEFT, then we return the rightmost container and if direction * direction is D_LEFT, then we return the rightmost container and if direction
* is D_RIGHT, we return the leftmost container. This is because if we are * is D_RIGHT, we return the leftmost container. This is because if we are

View File

@ -16,7 +16,7 @@
SLIST_HEAD(variables_head, Variable); SLIST_HEAD(variables_head, Variable);
extern pid_t config_error_nagbar_pid; extern pid_t config_error_nagbar_pid;
/* /**
* An intermediate reprsentation of the result of a parse_config call. * An intermediate reprsentation of the result of a parse_config call.
* Currently unused, but the JSON output will be useful in the future when we * Currently unused, but the JSON output will be useful in the future when we
* implement a config parsing IPC command. * implement a config parsing IPC command.

View File

@ -343,7 +343,7 @@ uint32_t get_colorpixel(const char *hex) __attribute__((const));
#if defined(__APPLE__) #if defined(__APPLE__)
/* /**
* Taken from FreeBSD * Taken from FreeBSD
* Returns a pointer to a new string which is a duplicate of the * Returns a pointer to a new string which is a duplicate of the
* string, but only copies at most n characters. * string, but only copies at most n characters.

View File

@ -15,7 +15,7 @@
#include <config.h> #include <config.h>
/* /**
* Initializes the Match data structure. This function is necessary because the * Initializes the Match data structure. This function is necessary because the
* members representing boolean values (like dock) need to be initialized with * members representing boolean values (like dock) need to be initialized with
* -1 instead of 0. * -1 instead of 0.

View File

@ -137,7 +137,7 @@ Output *get_output_next(direction_t direction, Output *current, output_close_far
*/ */
Output *get_output_next_wrap(direction_t direction, Output *current); Output *get_output_next_wrap(direction_t direction, Output *current);
/* /**
* Creates an output covering the root window. * Creates an output covering the root window.
* *
*/ */

View File

@ -12,7 +12,10 @@
#include <config.h> #include <config.h>
/* This is used to keep a state to pass around when rendering a con in render_con(). */ /**
* This is used to keep a state to pass around when rendering a con in render_con().
*
*/
typedef struct render_params { typedef struct render_params {
/* A copy of the coordinates of the container which is being rendered. */ /* A copy of the coordinates of the container which is being rendered. */
int x; int x;
@ -39,7 +42,8 @@ typedef struct render_params {
*/ */
void render_con(Con *con, bool render_fullscreen); void render_con(Con *con, bool render_fullscreen);
/* /**
* Returns the height for the decorations * Returns the height for the decorations
*
*/ */
int render_deco_height(void); int render_deco_height(void);

View File

@ -20,7 +20,7 @@
/* Default shmlog size if not set by user. */ /* Default shmlog size if not set by user. */
extern const int default_shmlog_size; extern const int default_shmlog_size;
/* /**
* Header of the shmlog file. Used by i3/src/log.c and i3/i3-dump-log/main.c. * Header of the shmlog file. Used by i3/src/log.c and i3/i3-dump-log/main.c.
* *
*/ */

View File

@ -125,7 +125,7 @@ void i3_restart(bool forget_layout);
#if defined(__OpenBSD__) || defined(__APPLE__) #if defined(__OpenBSD__) || defined(__APPLE__)
/* /**
* Taken from FreeBSD * Taken from FreeBSD
* Find the first occurrence of the byte string s in byte string l. * Find the first occurrence of the byte string s in byte string l.
* *

View File

@ -121,7 +121,7 @@ static void draw_util_set_source_color(surface_t *surface, color_t color) {
cairo_set_source_rgba(surface->cr, color.red, color.green, color.blue, color.alpha); cairo_set_source_rgba(surface->cr, color.red, color.green, color.blue, color.alpha);
} }
/** /*
* Draw the given text using libi3. * Draw the given text using libi3.
* This function also marks the surface dirty which is needed if other means of * This function also marks the surface dirty which is needed if other means of
* drawing are used. This will be the case when using XCB to draw text. * drawing are used. This will be the case when using XCB to draw text.
@ -140,7 +140,7 @@ void draw_util_text(i3String *text, surface_t *surface, color_t fg_color, color_
cairo_surface_mark_dirty(surface->surface); cairo_surface_mark_dirty(surface->surface);
} }
/** /*
* Draws a filled rectangle. * Draws a filled rectangle.
* This function is a convenience wrapper and takes care of flushing the * This function is a convenience wrapper and takes care of flushing the
* surface as well as restoring the cairo state. * surface as well as restoring the cairo state.
@ -167,7 +167,7 @@ void draw_util_rectangle(surface_t *surface, color_t color, double x, double y,
cairo_restore(surface->cr); cairo_restore(surface->cr);
} }
/** /*
* Clears a surface with the given color. * Clears a surface with the given color.
* *
*/ */
@ -191,7 +191,7 @@ void draw_util_clear_surface(surface_t *surface, color_t color) {
cairo_restore(surface->cr); cairo_restore(surface->cr);
} }
/** /*
* Copies a surface onto another surface. * Copies a surface onto another surface.
* *
*/ */

View File

@ -99,7 +99,7 @@ i3String *i3string_from_ucs2(const xcb_char2b_t *from_ucs2, size_t num_glyphs) {
return str; return str;
} }
/** /*
* Copies the given i3string. * Copies the given i3string.
* Note that this will not free the source string. * Note that this will not free the source string.
*/ */

View File

@ -330,7 +330,7 @@ void cmd_move_con_to_workspace(I3_CMD, const char *which) {
ysuccess(true); ysuccess(true);
} }
/** /*
* Implementation of 'move [window|container] [to] workspace back_and_forth'. * Implementation of 'move [window|container] [to] workspace back_and_forth'.
* *
*/ */

View File

@ -312,7 +312,7 @@ bool con_has_managed_window(Con *con) {
return (con != NULL && con->window != NULL && con->window->id != XCB_WINDOW_NONE && con_get_workspace(con) != NULL); return (con != NULL && con->window != NULL && con->window->id != XCB_WINDOW_NONE && con_get_workspace(con) != NULL);
} }
/** /*
* Returns true if this node has regular or floating children. * Returns true if this node has regular or floating children.
* *
*/ */
@ -526,7 +526,7 @@ Con *con_get_fullscreen_covering_ws(Con *ws) {
return fs; return fs;
} }
/** /*
* Returns true if the container is internal, such as __i3_scratch * Returns true if the container is internal, such as __i3_scratch
* *
*/ */
@ -896,7 +896,7 @@ int con_num_children(Con *con) {
return children; return children;
} }
/** /*
* Returns the number of visible non-floating children of this container. * Returns the number of visible non-floating children of this container.
* For example, if the container contains a hsplit which has two children, * For example, if the container contains a hsplit which has two children,
* this will return 2 instead of 1. * this will return 2 instead of 1.

View File

@ -18,7 +18,7 @@ Config config;
struct modes_head modes; struct modes_head modes;
struct barconfig_head barconfigs = TAILQ_HEAD_INITIALIZER(barconfigs); struct barconfig_head barconfigs = TAILQ_HEAD_INITIALIZER(barconfigs);
/** /*
* Ungrabs all keys, to be called before re-grabbing the keys because of a * Ungrabs all keys, to be called before re-grabbing the keys because of a
* mapping_notify event or a configuration file reload * mapping_notify event or a configuration file reload
* *

View File

@ -59,7 +59,7 @@ static void floating_set_hint_atom(Con *con, bool floating) {
xcb_flush(conn); xcb_flush(conn);
} }
/** /*
* Called when a floating window is created or resized. * Called when a floating window is created or resized.
* This function resizes the window if its size is higher or lower than the * This function resizes the window if its size is higher or lower than the
* configured maximum/minimum size, respectively. * configured maximum/minimum size, respectively.

View File

@ -1580,7 +1580,7 @@ void ipc_send_workspace_event(const char *change, Con *current, Con *old) {
y(free); y(free);
} }
/** /*
* For the window events we send, along the usual "change" field, * For the window events we send, along the usual "change" field,
* also the window container, in "container". * also the window container, in "container".
*/ */
@ -1610,7 +1610,7 @@ void ipc_send_window_event(const char *property, Con *con) {
setlocale(LC_NUMERIC, ""); setlocale(LC_NUMERIC, "");
} }
/** /*
* For the barconfig update events, we send the serialized barconfig. * For the barconfig update events, we send the serialized barconfig.
*/ */
void ipc_send_barconfig_update_event(Barconfig *barconfig) { void ipc_send_barconfig_update_event(Barconfig *barconfig) {

View File

@ -32,7 +32,7 @@
* RLIM_INFINITY for i3 debugging versions. */ * RLIM_INFINITY for i3 debugging versions. */
struct rlimit original_rlimit_core; struct rlimit original_rlimit_core;
/** The number of file descriptors passed via socket activation. */ /* The number of file descriptors passed via socket activation. */
int listen_fds; int listen_fds;
/* We keep the xcb_prepare watcher around to be able to enable and disable it /* We keep the xcb_prepare watcher around to be able to enable and disable it

View File

@ -95,7 +95,7 @@ static int _prune_startup_sequences(void) {
return active_sequences; return active_sequences;
} }
/** /*
* Deletes a startup sequence, ignoring whether its timeout has elapsed. * Deletes a startup sequence, ignoring whether its timeout has elapsed.
* Useful when e.g. a window is moved between workspaces and its children * Useful when e.g. a window is moved between workspaces and its children
* shouldn't spawn on the original workspace. * shouldn't spawn on the original workspace.
@ -257,7 +257,7 @@ void startup_monitor_event(SnMonitorEvent *event, void *userdata) {
} }
} }
/** /*
* Renames workspaces that are mentioned in the startup sequences. * Renames workspaces that are mentioned in the startup sequences.
* *
*/ */
@ -273,7 +273,7 @@ void startup_sequence_rename_workspace(const char *old_name, const char *new_nam
} }
} }
/** /*
* Gets the stored startup sequence for the _NET_STARTUP_ID of a given window. * Gets the stored startup sequence for the _NET_STARTUP_ID of a given window.
* *
*/ */

View File

@ -914,7 +914,7 @@ Con *workspace_attach_to(Con *ws) {
return new; return new;
} }
/** /*
* Creates a new container and re-parents all of children from the given * Creates a new container and re-parents all of children from the given
* workspace into it. * workspace into it.
* *
@ -949,7 +949,7 @@ Con *workspace_encapsulate(Con *ws) {
return new; return new;
} }
/** /*
* Move the given workspace to the specified output. * Move the given workspace to the specified output.
* This returns true if and only if moving the workspace was successful. * This returns true if and only if moving the workspace was successful.
*/ */

View File

@ -42,7 +42,7 @@ typedef struct con_state {
bool child_mapped; bool child_mapped;
bool is_hidden; bool is_hidden;
/** The con for which this state is. */ /* The con for which this state is. */
Con *con; Con *con;
/* For reparenting, we have a flag (need_reparent) and the X ID of the old /* For reparenting, we have a flag (need_reparent) and the X ID of the old