Coding style fixes
- opening braces are on the same line as the if statement - opening braces are not on the same line as the function name - space between for/while/if and opening parenthesis Signed-off-by: Dawid Gajownik <gajownik@gmail.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
committed by
Bryce Harrington
parent
5e653caa4a
commit
74a635b1ec
+23
-13
@@ -138,7 +138,8 @@ struct rdp_peer_context {
|
|||||||
typedef struct rdp_peer_context RdpPeerContext;
|
typedef struct rdp_peer_context RdpPeerContext;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
rdp_backend_config_init(struct rdp_backend_config *config) {
|
rdp_backend_config_init(struct rdp_backend_config *config)
|
||||||
|
{
|
||||||
config->width = 640;
|
config->width = 640;
|
||||||
config->height = 480;
|
config->height = 480;
|
||||||
config->bind_address = NULL;
|
config->bind_address = NULL;
|
||||||
@@ -250,7 +251,8 @@ rdp_peer_refresh_nsc(pixman_region32_t *damage, pixman_image_t *image, freerdp_p
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pixman_image_flipped_subrect(const pixman_box32_t *rect, pixman_image_t *img, BYTE *dest) {
|
pixman_image_flipped_subrect(const pixman_box32_t *rect, pixman_image_t *img, BYTE *dest)
|
||||||
|
{
|
||||||
int stride = pixman_image_get_stride(img);
|
int stride = pixman_image_get_stride(img);
|
||||||
int h;
|
int h;
|
||||||
int toCopy = (rect->x2 - rect->x1) * 4;
|
int toCopy = (rect->x2 - rect->x1) * 4;
|
||||||
@@ -393,7 +395,8 @@ finish_frame_handler(void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct weston_mode *
|
static struct weston_mode *
|
||||||
rdp_insert_new_mode(struct weston_output *output, int width, int height, int rate) {
|
rdp_insert_new_mode(struct weston_output *output, int width, int height, int rate)
|
||||||
|
{
|
||||||
struct weston_mode *ret;
|
struct weston_mode *ret;
|
||||||
ret = zalloc(sizeof *ret);
|
ret = zalloc(sizeof *ret);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
@@ -406,7 +409,8 @@ rdp_insert_new_mode(struct weston_output *output, int width, int height, int rat
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct weston_mode *
|
static struct weston_mode *
|
||||||
ensure_matching_mode(struct weston_output *output, struct weston_mode *target) {
|
ensure_matching_mode(struct weston_output *output, struct weston_mode *target)
|
||||||
|
{
|
||||||
struct weston_mode *local;
|
struct weston_mode *local;
|
||||||
|
|
||||||
wl_list_for_each(local, &output->mode_list, link) {
|
wl_list_for_each(local, &output->mode_list, link) {
|
||||||
@@ -418,7 +422,8 @@ ensure_matching_mode(struct weston_output *output, struct weston_mode *target) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
rdp_switch_mode(struct weston_output *output, struct weston_mode *target_mode) {
|
rdp_switch_mode(struct weston_output *output, struct weston_mode *target_mode)
|
||||||
|
{
|
||||||
struct rdp_output *rdpOutput = container_of(output, struct rdp_output, base);
|
struct rdp_output *rdpOutput = container_of(output, struct rdp_output, base);
|
||||||
struct rdp_peers_item *rdpPeer;
|
struct rdp_peers_item *rdpPeer;
|
||||||
rdpSettings *settings;
|
rdpSettings *settings;
|
||||||
@@ -558,13 +563,13 @@ rdp_destroy(struct weston_compositor *ec)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
int rdp_listener_activity(int fd, uint32_t mask, void *data) {
|
int rdp_listener_activity(int fd, uint32_t mask, void *data)
|
||||||
|
{
|
||||||
freerdp_listener* instance = (freerdp_listener *)data;
|
freerdp_listener* instance = (freerdp_listener *)data;
|
||||||
|
|
||||||
if (!(mask & WL_EVENT_READABLE))
|
if (!(mask & WL_EVENT_READABLE))
|
||||||
return 0;
|
return 0;
|
||||||
if (!instance->CheckFileDescriptor(instance))
|
if (!instance->CheckFileDescriptor(instance)) {
|
||||||
{
|
|
||||||
weston_log("failed to check FreeRDP file descriptor\n");
|
weston_log("failed to check FreeRDP file descriptor\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -572,7 +577,8 @@ int rdp_listener_activity(int fd, uint32_t mask, void *data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
int rdp_implant_listener(struct rdp_backend *b, freerdp_listener* instance) {
|
int rdp_implant_listener(struct rdp_backend *b, freerdp_listener* instance)
|
||||||
|
{
|
||||||
int i, fd;
|
int i, fd;
|
||||||
int rcount = 0;
|
int rcount = 0;
|
||||||
void* rfds[MAX_FREERDP_FDS];
|
void* rfds[MAX_FREERDP_FDS];
|
||||||
@@ -645,7 +651,8 @@ rdp_peer_context_free(freerdp_peer* client, RdpPeerContext* context)
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
rdp_client_activity(int fd, uint32_t mask, void *data) {
|
rdp_client_activity(int fd, uint32_t mask, void *data)
|
||||||
|
{
|
||||||
freerdp_peer* client = (freerdp_peer *)data;
|
freerdp_peer* client = (freerdp_peer *)data;
|
||||||
|
|
||||||
if (!client->CheckFileDescriptor(client)) {
|
if (!client->CheckFileDescriptor(client)) {
|
||||||
@@ -934,7 +941,8 @@ static BOOL xf_peer_post_connect(freerdp_peer *client)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static FREERDP_CB_RET_TYPE
|
static FREERDP_CB_RET_TYPE
|
||||||
xf_mouseEvent(rdpInput *input, UINT16 flags, UINT16 x, UINT16 y) {
|
xf_mouseEvent(rdpInput *input, UINT16 flags, UINT16 x, UINT16 y)
|
||||||
|
{
|
||||||
wl_fixed_t wl_x, wl_y, axis;
|
wl_fixed_t wl_x, wl_y, axis;
|
||||||
RdpPeerContext *peerContext = (RdpPeerContext *)input->context;
|
RdpPeerContext *peerContext = (RdpPeerContext *)input->context;
|
||||||
struct rdp_output *output;
|
struct rdp_output *output;
|
||||||
@@ -983,7 +991,8 @@ xf_mouseEvent(rdpInput *input, UINT16 flags, UINT16 x, UINT16 y) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static FREERDP_CB_RET_TYPE
|
static FREERDP_CB_RET_TYPE
|
||||||
xf_extendedMouseEvent(rdpInput *input, UINT16 flags, UINT16 x, UINT16 y) {
|
xf_extendedMouseEvent(rdpInput *input, UINT16 flags, UINT16 x, UINT16 y)
|
||||||
|
{
|
||||||
wl_fixed_t wl_x, wl_y;
|
wl_fixed_t wl_x, wl_y;
|
||||||
RdpPeerContext *peerContext = (RdpPeerContext *)input->context;
|
RdpPeerContext *peerContext = (RdpPeerContext *)input->context;
|
||||||
struct rdp_output *output;
|
struct rdp_output *output;
|
||||||
@@ -1071,7 +1080,8 @@ xf_input_unicode_keyboard_event(rdpInput *input, UINT16 flags, UINT16 code)
|
|||||||
|
|
||||||
|
|
||||||
static FREERDP_CB_RET_TYPE
|
static FREERDP_CB_RET_TYPE
|
||||||
xf_suppress_output(rdpContext *context, BYTE allow, RECTANGLE_16 *area) {
|
xf_suppress_output(rdpContext *context, BYTE allow, RECTANGLE_16 *area)
|
||||||
|
{
|
||||||
RdpPeerContext *peerContext = (RdpPeerContext *)context;
|
RdpPeerContext *peerContext = (RdpPeerContext *)context;
|
||||||
|
|
||||||
if (allow)
|
if (allow)
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ char *server_parameters="--use-pixman --width=320 --height=240";
|
|||||||
* @returns true if successfully saved file; false otherwise.
|
* @returns true if successfully saved file; false otherwise.
|
||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
write_surface_as_png(const struct surface* weston_surface, const char *fname) {
|
write_surface_as_png(const struct surface* weston_surface, const char *fname)
|
||||||
|
{
|
||||||
cairo_surface_t *cairo_surface;
|
cairo_surface_t *cairo_surface;
|
||||||
cairo_status_t status;
|
cairo_status_t status;
|
||||||
int bpp = 4; /* Assume ARGB */
|
int bpp = 4; /* Assume ARGB */
|
||||||
@@ -73,7 +74,8 @@ write_surface_as_png(const struct surface* weston_surface, const char *fname) {
|
|||||||
* when no longer used; or, NULL in case of error.
|
* when no longer used; or, NULL in case of error.
|
||||||
*/
|
*/
|
||||||
static struct surface*
|
static struct surface*
|
||||||
load_surface_from_png(const char *fname) {
|
load_surface_from_png(const char *fname)
|
||||||
|
{
|
||||||
struct surface *reference;
|
struct surface *reference;
|
||||||
cairo_surface_t *reference_cairo_surface;
|
cairo_surface_t *reference_cairo_surface;
|
||||||
cairo_status_t status;
|
cairo_status_t status;
|
||||||
@@ -138,7 +140,8 @@ load_surface_from_png(const char *fname) {
|
|||||||
* free'd when done using it.
|
* free'd when done using it.
|
||||||
*/
|
*/
|
||||||
static struct surface*
|
static struct surface*
|
||||||
create_screenshot_surface(struct client *client) {
|
create_screenshot_surface(struct client *client)
|
||||||
|
{
|
||||||
struct surface* screenshot;
|
struct surface* screenshot;
|
||||||
screenshot = xzalloc(sizeof *screenshot);
|
screenshot = xzalloc(sizeof *screenshot);
|
||||||
if (screenshot == NULL)
|
if (screenshot == NULL)
|
||||||
@@ -163,7 +166,8 @@ create_screenshot_surface(struct client *client) {
|
|||||||
* longer needed.
|
* longer needed.
|
||||||
*/
|
*/
|
||||||
static struct surface *
|
static struct surface *
|
||||||
capture_screenshot_of_output(struct client *client) {
|
capture_screenshot_of_output(struct client *client)
|
||||||
|
{
|
||||||
struct surface *screenshot;
|
struct surface *screenshot;
|
||||||
|
|
||||||
/* Create a surface to hold the screenshot */
|
/* Create a surface to hold the screenshot */
|
||||||
|
|||||||
@@ -218,7 +218,8 @@ emit_event(xmlNodePtr parent, struct zuc_event *event)
|
|||||||
* @return the formatted time string upon success, NULL otherwise.
|
* @return the formatted time string upon success, NULL otherwise.
|
||||||
*/
|
*/
|
||||||
static char *
|
static char *
|
||||||
as_duration(long ms) {
|
as_duration(long ms)
|
||||||
|
{
|
||||||
char *str = NULL;
|
char *str = NULL;
|
||||||
|
|
||||||
if (asprintf(&str, "%1.3f", ms / 1000.0) < 0) {
|
if (asprintf(&str, "%1.3f", ms / 1000.0) < 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user