diff options
author | Jeremy White <jwhite@codeweavers.com> | 2020-04-21 09:05:27 -0500 |
---|---|---|
committer | Frediano Ziglio <freddy77@gmail.com> | 2020-04-21 15:57:30 +0100 |
commit | b4747ad50d7c40902731e8946f89e4e01c88afc7 (patch) | |
tree | 4dd6638c9956a92f7421612b2252df115058050d | |
parent | 8e22084f66a698a4790ce1fbef7485f314b07055 (diff) |
Make all multiline comments within the main x11spice tree consistent.
Acked-by: Frediano Ziglio <fziglio@redhat.com>
-rw-r--r-- | src/display.c | 17 | ||||
-rw-r--r-- | src/display.h | 3 | ||||
-rw-r--r-- | src/listen.c | 8 | ||||
-rw-r--r-- | src/options.c | 2 | ||||
-rw-r--r-- | src/scan.c | 8 | ||||
-rw-r--r-- | src/session.c | 6 | ||||
-rw-r--r-- | src/spice.c | 10 | ||||
-rw-r--r-- | src/tests/tests.c | 16 |
8 files changed, 29 insertions, 41 deletions
diff --git a/src/display.c b/src/display.c index f296aef..8757c2f 100644 --- a/src/display.c +++ b/src/display.c @@ -118,7 +118,7 @@ static void handle_damage_notify(display_t *display, xcb_damage_notify_event_t * dev->area.x, dev->area.y, dev->area.width, dev->area.height); /* The MORE flag is 0x80 on the level field; the proto documentation - is wrong on this point. Check the xorg server code to see */ + is wrong on this point. Check the xorg server code to see. */ if (dev->level & 0x80) return; @@ -129,7 +129,7 @@ static void handle_damage_notify(display_t *display, xcb_damage_notify_event_t * /* Compositing window managers such as mutter have a bad habit of sending whole screen updates, which ends up being harmful to user experience. - In that case, we want to stop trusting those damage reports */ + In that case, we want to stop trusting those damage reports. */ if (dev->area.width == display->width && dev->area.height == display->height) { display->fullscreen_damage_count++; } else { @@ -260,9 +260,8 @@ static int shm_cache_get(display_t *d, size_t size, shm_segment_t *segment) g_mutex_lock(&d->shm_cache_mutex); /* Check the cache for a segment of size 'size' or bigger. - * Use an exact-size segment if found. - * If not, use the smallest entry that is big enough. - */ + Use an exact-size segment if found. + If not, use the smallest entry that is big enough. */ for (i = 0; i < G_N_ELEMENTS(d->shm_cache); i++) { shm_segment_t *entry = &d->shm_cache[i]; @@ -318,9 +317,8 @@ static int shm_cache_add(display_t *d, shm_segment_t *segment) g_mutex_lock(&d->shm_cache_mutex); /* 'segment' is now unused, try to add it to the cache. - * Use an empty slot in the cache if available. - * If not, evict the smallest entry (which also must be smaller than 'segment') from the cache. - */ + Use an empty slot in the cache if available. + If not, evict the smallest entry (which also must be smaller than 'segment') from the cache. */ for (i = 0; i < G_N_ELEMENTS(d->shm_cache); i++) { shm_segment_t *entry = &d->shm_cache[i]; @@ -618,8 +616,7 @@ void destroy_shm_image(display_t *d, shm_image_t *shmi) int display_create_screen_images(display_t *d) { /* 'primary' and 'fullscreen' don't need to be SHM, normal buffers would work - * fine. Using SHM for all buffers is simpler though, and has no real downsides. - */ + fine. Using SHM for all buffers is simpler though, and has no real downsides. */ d->primary = create_shm_image(d, 0, 0); if (!d->primary) { return X11SPICE_ERR_NOSHM; diff --git a/src/display.h b/src/display.h index 75e83aa..f4cabc0 100644 --- a/src/display.h +++ b/src/display.h @@ -66,8 +66,7 @@ typedef struct { shm_image_t *scanline; /* The SHM cache holds up to 10 segments, this provides a good cache - * hit rate while keeping memory usage reasonable. - */ + hit rate while keeping memory usage reasonable. */ shm_segment_t shm_cache[10]; GMutex shm_cache_mutex; diff --git a/src/listen.c b/src/listen.c index 3ca6906..d00358d 100644 --- a/src/listen.c +++ b/src/listen.c @@ -156,11 +156,9 @@ static int try_port(const char *addr, int port) } close(sock); - /* - ** Oddly, you seem to get situations where the ipv6 bind will fail, - ** with address in use; you can then try again and bind to the ipv4, - ** but you then go on to get other failures. - */ + /* Oddly, you seem to get situations where the ipv6 bind will fail, + with address in use; you can then try again and bind to the ipv4, + but you then go on to get other failures. */ break; } diff --git a/src/options.c b/src/options.c index 41bddb8..ef817bb 100644 --- a/src/options.c +++ b/src/options.c @@ -499,7 +499,7 @@ int options_load(options_t *options, int argc, char *argv[]) if (rc == 0) { options_from_config(options); /* We parse command line arguments a second time to ensure - ** that command line options take precedence over config files */ + that command line options take precedence over config files */ rc = options_parse_arguments(argc, argv, options); if (rc == 0) rc = options_process_io(options); @@ -146,11 +146,9 @@ static void handle_scan_report(session_t *session, scan_report_t *r) if (drawable) { g_async_queue_push(session->draw_queue, drawable); spice_qxl_wakeup(&session->spice.display_sin); - /* - ** NOTE: the shmi is intentionally not freed at this point. - ** The call path will take care of that once it's been - ** pushed to Spice. - */ + /* NOTE: the shmi is intentionally not freed at this point. + The call path will take care of that once it's been + pushed to Spice. */ return; } else g_debug("Unexpected failure to create drawable"); diff --git a/src/session.c b/src/session.c index 7909787..b3990c0 100644 --- a/src/session.c +++ b/src/session.c @@ -451,10 +451,8 @@ int session_get_one_led(session_t *session, const char *name) void session_disconnect_client(session_t *session) { - /* - ** TODO: This is using a side effect of set_ticket that is not intentional. - ** It would be better to ask for a deliberate method of achieving this result. - */ + /* TODO: This is using a side effect of set_ticket that is not intentional. + It would be better to ask for a deliberate method of achieving this result. */ g_debug("client disconnect"); spice_server_set_ticket(session->spice.server, session->options.spice_password, 0, 0, TRUE); if (!session->options.spice_password || session->options.disable_ticketing) diff --git a/src/spice.c b/src/spice.c index 205edc3..8bb55b2 100644 --- a/src/spice.c +++ b/src/spice.c @@ -228,7 +228,7 @@ static void set_compression_level(QXLInstance *qin, int level) } /* Newer spice servers no longer transmit this information, - * so let's just disregard it */ + so let's just disregard it */ static void set_mm_time(QXLInstance *qin G_GNUC_UNUSED, uint32_t mm_time G_GNUC_UNUSED) { } @@ -334,10 +334,10 @@ static void update_area_complete(QXLInstance *qin G_GNUC_UNUSED, } /* spice sends AT scancodes (with a strange escape). - * But xf86PostKeyboardEvent expects scancodes. Apparently most of the time - * you just need to add MIN_KEYCODE, see xf86-input-keyboard/src/atKeynames - * and xf86-input-keyboard/src/kbd.c:PostKbdEvent: - * xf86PostKeyboardEvent(device, scanCode + MIN_KEYCODE, down); */ + But xf86PostKeyboardEvent expects scancodes. Apparently most of the time + you just need to add MIN_KEYCODE, see xf86-input-keyboard/src/atKeynames + and xf86-input-keyboard/src/kbd.c:PostKbdEvent: + xf86PostKeyboardEvent(device, scanCode + MIN_KEYCODE, down); */ #define MIN_KEYCODE 8 /* *INDENT-OFF* - Prevent indent from shifting style on us */ diff --git a/src/tests/tests.c b/src/tests/tests.c index fdb2e9c..5241e0d 100644 --- a/src/tests/tests.c +++ b/src/tests/tests.c @@ -228,15 +228,13 @@ void test_tallscreen(xdummy_t *xdummy, gconstpointer user_data) test_common_stop(&test, &server); } -/* -** The 'script' type test is a special case. -** It is set up to allow us to run any shell script we like. -** It will start a dummy X server, attach a spice server to it. -** Then it will start *another* dummy X server, and pass the information -** about both X servers to the script. -** The second dummy server allows us to run the spicy client and actually -** test true spice functionality. -*/ +/* The 'script' type test is a special case. + It is set up to allow us to run any shell script we like. + It will start a dummy X server, attach a spice server to it. + Then it will start *another* dummy X server, and pass the information + about both X servers to the script. + The second dummy server allows us to run the spicy client and actually + test true spice functionality. */ void test_script(xdummy_t *xdummy, gconstpointer user_data) { test_t test = { }; |